@strapi/content-manager 0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c → 0.0.0-next.f4ec69568d980c6fee91ce2ee0f41c138347aa81

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 (89) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-BpM_Hc7r.mjs → ComponentConfigurationPage-WXfrBq-Q.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-BpM_Hc7r.mjs.map → ComponentConfigurationPage-WXfrBq-Q.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-CL9CAMaL.js → ComponentConfigurationPage-_g_oKvB0.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-CL9CAMaL.js.map → ComponentConfigurationPage-_g_oKvB0.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-_prbqpTM.mjs → EditConfigurationPage-CRbOzCGy.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-_prbqpTM.mjs.map → EditConfigurationPage-CRbOzCGy.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-ILWo0h1e.js → EditConfigurationPage-PD0wJ9L3.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-ILWo0h1e.js.map → EditConfigurationPage-PD0wJ9L3.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-DAtscabN.mjs → EditViewPage-5Vpyf6AO.mjs} +38 -8
  10. package/dist/_chunks/EditViewPage-5Vpyf6AO.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-BqZvBN4s.js → EditViewPage-B_tonadE.js} +37 -7
  12. package/dist/_chunks/EditViewPage-B_tonadE.js.map +1 -0
  13. package/dist/_chunks/{Field-CcoQiiz1.js → Field-CbqsLSaw.js} +26 -6
  14. package/dist/_chunks/Field-CbqsLSaw.js.map +1 -0
  15. package/dist/_chunks/{Field-D-mgn1tH.mjs → Field-CvMC_y_i.mjs} +26 -6
  16. package/dist/_chunks/Field-CvMC_y_i.mjs.map +1 -0
  17. package/dist/_chunks/{Form-CmLbZDfi.js → Form-BB0z-JxK.js} +2 -2
  18. package/dist/_chunks/{Form-CmLbZDfi.js.map → Form-BB0z-JxK.js.map} +1 -1
  19. package/dist/_chunks/{Form-BxyeWiXW.mjs → Form-DcK34IgP.mjs} +2 -2
  20. package/dist/_chunks/{Form-BxyeWiXW.mjs.map → Form-DcK34IgP.mjs.map} +1 -1
  21. package/dist/_chunks/{History-uECUbCZB.js → History-BD4ZcdUO.js} +7 -61
  22. package/dist/_chunks/History-BD4ZcdUO.js.map +1 -0
  23. package/dist/_chunks/{History-BOhLaq_g.mjs → History-Bcj_FGwn.mjs} +8 -62
  24. package/dist/_chunks/History-Bcj_FGwn.mjs.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-D_bBSFNW.js → ListConfigurationPage-BLxjX7Pw.js} +4 -3
  26. package/dist/_chunks/ListConfigurationPage-BLxjX7Pw.js.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-D0vQez6F.mjs → ListConfigurationPage-D6cBGWEz.mjs} +5 -4
  28. package/dist/_chunks/ListConfigurationPage-D6cBGWEz.mjs.map +1 -0
  29. package/dist/_chunks/{ListViewPage-ns-bmy5C.mjs → ListViewPage-_2xuTV87.mjs} +16 -5
  30. package/dist/_chunks/{ListViewPage-ns-bmy5C.mjs.map → ListViewPage-_2xuTV87.mjs.map} +1 -1
  31. package/dist/_chunks/{ListViewPage-BkZ83b1A.js → ListViewPage-nUnSzeLc.js} +16 -5
  32. package/dist/_chunks/{ListViewPage-BkZ83b1A.js.map → ListViewPage-nUnSzeLc.js.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-BA5ZKMDR.mjs → NoContentTypePage-D07aE8fc.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-BA5ZKMDR.mjs.map → NoContentTypePage-D07aE8fc.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-C1439s4s.js → NoContentTypePage-DerCWb61.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-C1439s4s.js.map → NoContentTypePage-DerCWb61.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-B0GdMw1Q.mjs → NoPermissionsPage-Bft8fI7p.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-B0GdMw1Q.mjs.map → NoPermissionsPage-Bft8fI7p.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-CPGwsVfb.js → NoPermissionsPage-BrcLxQs2.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-CPGwsVfb.js.map → NoPermissionsPage-BrcLxQs2.js.map} +1 -1
  41. package/dist/_chunks/Preview-_n0hyyGd.mjs +256 -0
  42. package/dist/_chunks/Preview-_n0hyyGd.mjs.map +1 -0
  43. package/dist/_chunks/Preview-d3J-Ku7A.js +275 -0
  44. package/dist/_chunks/Preview-d3J-Ku7A.js.map +1 -0
  45. package/dist/_chunks/{Relations-d-8Uef_-.js → Relations-BIX7Mm2F.js} +3 -3
  46. package/dist/_chunks/{Relations-d-8Uef_-.js.map → Relations-BIX7Mm2F.js.map} +1 -1
  47. package/dist/_chunks/{Relations-BIGPMSW4.mjs → Relations-C_1bopDf.mjs} +3 -3
  48. package/dist/_chunks/{Relations-BIGPMSW4.mjs.map → Relations-C_1bopDf.mjs.map} +1 -1
  49. package/dist/_chunks/{en-CZw4xdPY.mjs → en-CfIXaZf9.mjs} +9 -2
  50. package/dist/_chunks/{en-CZw4xdPY.mjs.map → en-CfIXaZf9.mjs.map} +1 -1
  51. package/dist/_chunks/{en-Bdpa50w3.js → en-DTWPCdTS.js} +9 -2
  52. package/dist/_chunks/{en-Bdpa50w3.js.map → en-DTWPCdTS.js.map} +1 -1
  53. package/dist/_chunks/{index-3_WeHXYp.mjs → index-NgJzBbDY.mjs} +110 -106
  54. package/dist/_chunks/index-NgJzBbDY.mjs.map +1 -0
  55. package/dist/_chunks/{index-BgaeYWIy.js → index-PscLJrm0.js} +104 -100
  56. package/dist/_chunks/index-PscLJrm0.js.map +1 -0
  57. package/dist/_chunks/{layout-ByFyQRDH.js → layout-BFjOzyo2.js} +3 -3
  58. package/dist/_chunks/{layout-ByFyQRDH.js.map → layout-BFjOzyo2.js.map} +1 -1
  59. package/dist/_chunks/{layout-CrTxOnCy.mjs → layout-D5HneXd1.mjs} +3 -3
  60. package/dist/_chunks/{layout-CrTxOnCy.mjs.map → layout-D5HneXd1.mjs.map} +1 -1
  61. package/dist/_chunks/{relations-BlpLgngh.mjs → relations-BIjRMG_U.mjs} +6 -3
  62. package/dist/_chunks/relations-BIjRMG_U.mjs.map +1 -0
  63. package/dist/_chunks/{relations-C5RSW926.js → relations-BPyA_0mB.js} +6 -3
  64. package/dist/_chunks/relations-BPyA_0mB.js.map +1 -0
  65. package/dist/admin/index.js +1 -1
  66. package/dist/admin/index.mjs +4 -4
  67. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  68. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  69. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  70. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  71. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  72. package/dist/admin/src/preview/routes.d.ts +3 -0
  73. package/dist/admin/src/router.d.ts +1 -1
  74. package/dist/server/index.js.map +1 -1
  75. package/dist/server/index.mjs.map +1 -1
  76. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  77. package/package.json +8 -8
  78. package/dist/_chunks/EditViewPage-BqZvBN4s.js.map +0 -1
  79. package/dist/_chunks/EditViewPage-DAtscabN.mjs.map +0 -1
  80. package/dist/_chunks/Field-CcoQiiz1.js.map +0 -1
  81. package/dist/_chunks/Field-D-mgn1tH.mjs.map +0 -1
  82. package/dist/_chunks/History-BOhLaq_g.mjs.map +0 -1
  83. package/dist/_chunks/History-uECUbCZB.js.map +0 -1
  84. package/dist/_chunks/ListConfigurationPage-D0vQez6F.mjs.map +0 -1
  85. package/dist/_chunks/ListConfigurationPage-D_bBSFNW.js.map +0 -1
  86. package/dist/_chunks/index-3_WeHXYp.mjs.map +0 -1
  87. package/dist/_chunks/index-BgaeYWIy.js.map +0 -1
  88. package/dist/_chunks/relations-BlpLgngh.mjs.map +0 -1
  89. package/dist/_chunks/relations-C5RSW926.js.map +0 -1
@@ -7,10 +7,10 @@ const designSystem = require("@strapi/design-system");
7
7
  const mapValues = require("lodash/fp/mapValues");
8
8
  const reactIntl = require("react-intl");
9
9
  const reactRouterDom = require("react-router-dom");
10
+ const styledComponents = require("styled-components");
10
11
  const yup = require("yup");
11
12
  const pipe = require("lodash/fp/pipe");
12
13
  const dateFns = require("date-fns");
13
- const styledComponents = require("styled-components");
14
14
  const qs = require("qs");
15
15
  const toolkit = require("@reduxjs/toolkit");
16
16
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -1685,10 +1685,10 @@ const useDocumentActions = () => {
1685
1685
  update
1686
1686
  };
1687
1687
  };
1688
- const ProtectedHistoryPage = React.lazy(
1689
- () => Promise.resolve().then(() => require("./History-uECUbCZB.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1688
+ const ProtectedHistoryPage = React__namespace.lazy(
1689
+ () => Promise.resolve().then(() => require("./History-BD4ZcdUO.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-d3J-Ku7A.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-BqZvBN4s.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1715
+ () => Promise.resolve().then(() => require("./EditViewPage-B_tonadE.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1703
1716
  );
1704
1717
  const ProtectedListViewPage = React.lazy(
1705
- () => Promise.resolve().then(() => require("./ListViewPage-BkZ83b1A.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1718
+ () => Promise.resolve().then(() => require("./ListViewPage-nUnSzeLc.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1706
1719
  );
1707
1720
  const ProtectedListConfiguration = React.lazy(
1708
- () => Promise.resolve().then(() => require("./ListConfigurationPage-D_bBSFNW.js")).then((mod) => ({
1721
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-BLxjX7Pw.js")).then((mod) => ({
1709
1722
  default: mod.ProtectedListConfiguration
1710
1723
  }))
1711
1724
  );
1712
1725
  const ProtectedEditConfigurationPage = React.lazy(
1713
- () => Promise.resolve().then(() => require("./EditConfigurationPage-ILWo0h1e.js")).then((mod) => ({
1726
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-PD0wJ9L3.js")).then((mod) => ({
1714
1727
  default: mod.ProtectedEditConfigurationPage
1715
1728
  }))
1716
1729
  );
1717
1730
  const ProtectedComponentConfigurationPage = React.lazy(
1718
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-CL9CAMaL.js")).then((mod) => ({
1731
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-_g_oKvB0.js")).then((mod) => ({
1719
1732
  default: mod.ProtectedComponentConfigurationPage
1720
1733
  }))
1721
1734
  );
1722
1735
  const NoPermissions = React.lazy(
1723
- () => Promise.resolve().then(() => require("./NoPermissionsPage-CPGwsVfb.js")).then((mod) => ({ default: mod.NoPermissions }))
1736
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-BrcLxQs2.js")).then((mod) => ({ default: mod.NoPermissions }))
1724
1737
  );
1725
1738
  const NoContentType = React.lazy(
1726
- () => Promise.resolve().then(() => require("./NoContentTypePage-C1439s4s.js")).then((mod) => ({ default: mod.NoContentType }))
1739
+ () => Promise.resolve().then(() => require("./NoContentTypePage-DerCWb61.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 }) => {
@@ -1867,6 +1881,11 @@ const DocumentActionButton = (action) => {
1867
1881
  ) : null
1868
1882
  ] });
1869
1883
  };
1884
+ const MenuItem = styledComponents.styled(designSystem.Menu.Item)`
1885
+ &:hover {
1886
+ background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
1887
+ }
1888
+ `;
1870
1889
  const DocumentActionsMenu = ({
1871
1890
  actions: actions2,
1872
1891
  children,
@@ -1925,48 +1944,32 @@ const DocumentActionsMenu = ({
1925
1944
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1926
1945
  actions2.map((action) => {
1927
1946
  return /* @__PURE__ */ jsxRuntime.jsx(
1928
- designSystem.Menu.Item,
1947
+ MenuItem,
1929
1948
  {
1930
1949
  disabled: action.disabled,
1931
1950
  onSelect: handleClick(action),
1932
1951
  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
- ] })
1952
+ isVariantDanger: action.variant === "danger",
1953
+ isDisabled: action.disabled,
1954
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
1955
+ designSystem.Flex,
1956
+ {
1957
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1958
+ gap: 2,
1959
+ tag: "span",
1960
+ children: [
1961
+ /* @__PURE__ */ jsxRuntime.jsx(
1962
+ designSystem.Flex,
1963
+ {
1964
+ tag: "span",
1965
+ color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1966
+ children: action.icon
1967
+ }
1968
+ ),
1969
+ action.label
1970
+ ]
1971
+ }
1972
+ ) })
1970
1973
  },
1971
1974
  action.id
1972
1975
  );
@@ -2557,7 +2560,7 @@ const RelativeTime = React__namespace.forwardRef(
2557
2560
  });
2558
2561
  const unit = intervals.find((intervalUnit) => {
2559
2562
  return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
2560
- });
2563
+ }) ?? "seconds";
2561
2564
  const relativeTime = dateFns.isPast(timestamp) ? -interval[unit] : interval[unit];
2562
2565
  const customInterval = customIntervals.find(
2563
2566
  (custom) => interval[custom.unit] < custom.threshold
@@ -2591,19 +2594,29 @@ const getDisplayName = ({
2591
2594
  return email ?? "";
2592
2595
  };
2593
2596
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2594
- const DocumentStatus = ({ status = "draft", ...restProps }) => {
2597
+ const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
2595
2598
  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) }) });
2599
+ const { formatMessage } = reactIntl.useIntl();
2600
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, size, variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
2601
+ id: `content-manager.containers.List.${status}`,
2602
+ defaultMessage: capitalise(status)
2603
+ }) }) });
2597
2604
  };
2598
2605
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2599
2606
  const { formatMessage } = reactIntl.useIntl();
2600
2607
  const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
2608
+ const params = reactRouterDom.useParams();
2601
2609
  const title = isCreating ? formatMessage({
2602
2610
  id: "content-manager.containers.edit.title.new",
2603
2611
  defaultMessage: "Create an entry"
2604
2612
  }) : documentTitle;
2605
2613
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2606
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
2614
+ /* @__PURE__ */ jsxRuntime.jsx(
2615
+ strapiAdmin.BackButton,
2616
+ {
2617
+ fallback: params.collectionType === SINGLE_TYPES ? void 0 : `../${COLLECTION_TYPES}/${params.slug}`
2618
+ }
2619
+ ),
2607
2620
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2608
2621
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
2609
2622
  /* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
@@ -3290,18 +3303,10 @@ const SelectedEntriesTableContent = ({
3290
3303
  search: row.locale && `?plugins[i18n][locale]=${row.locale}`
3291
3304
  },
3292
3305
  state: { from: pathname },
3293
- label: formatMessage(
3294
- { id: "app.component.HelperPluginTable.edit", defaultMessage: "Edit {target}" },
3295
- {
3296
- target: formatMessage(
3297
- {
3298
- id: "content-manager.components.ListViewHelperPluginTable.row-line",
3299
- defaultMessage: "item line {number}"
3300
- },
3301
- { number: index2 + 1 }
3302
- )
3303
- }
3304
- ),
3306
+ label: formatMessage({
3307
+ id: "content-manager.bulk-publish.edit",
3308
+ defaultMessage: "Edit"
3309
+ }),
3305
3310
  target: "_blank",
3306
3311
  marginLeft: "auto",
3307
3312
  variant: "ghost",
@@ -3945,17 +3950,27 @@ const HistoryAction = ({ model, document }) => {
3945
3950
  const { formatMessage } = reactIntl.useIntl();
3946
3951
  const [{ query }] = strapiAdmin.useQueryParams();
3947
3952
  const navigate = reactRouterDom.useNavigate();
3953
+ const { trackUsage } = strapiAdmin.useTracking();
3954
+ const { pathname } = reactRouterDom.useLocation();
3948
3955
  const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
3949
3956
  if (!window.strapi.features.isEnabled("cms-content-history")) {
3950
3957
  return null;
3951
3958
  }
3959
+ const handleOnClick = () => {
3960
+ const destination = { pathname: "history", search: pluginsQueryParams };
3961
+ trackUsage("willNavigate", {
3962
+ from: pathname,
3963
+ to: `${pathname}/${destination.pathname}`
3964
+ });
3965
+ navigate(destination);
3966
+ };
3952
3967
  return {
3953
3968
  icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
3954
3969
  label: formatMessage({
3955
3970
  id: "content-manager.history.document-action",
3956
3971
  defaultMessage: "Content History"
3957
3972
  }),
3958
- onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3973
+ onClick: handleOnClick,
3959
3974
  disabled: (
3960
3975
  /**
3961
3976
  * The user is creating a new document.
@@ -4041,8 +4056,8 @@ const previewApi = contentManagerApi.injectEndpoints({
4041
4056
  const { useGetPreviewUrlQuery } = previewApi;
4042
4057
  const PreviewSidePanel = ({ model, documentId, document }) => {
4043
4058
  const { formatMessage } = reactIntl.useIntl();
4044
- const { toggleNotification } = strapiAdmin.useNotification();
4045
- const { copy } = strapiAdmin.useClipboard();
4059
+ const { trackUsage } = strapiAdmin.useTracking();
4060
+ const [{ query }] = strapiAdmin.useQueryParams();
4046
4061
  const { data, error } = useGetPreviewUrlQuery({
4047
4062
  params: {
4048
4063
  contentType: model
@@ -4056,37 +4071,25 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
4056
4071
  if (!data?.data?.url || error) {
4057
4072
  return null;
4058
4073
  }
4059
- const { url } = data.data;
4060
- const handleCopyLink = () => {
4061
- copy(url);
4062
- toggleNotification({
4063
- message: formatMessage({
4064
- id: "content-manager.preview.copy.success",
4065
- defaultMessage: "Copied preview link"
4066
- }),
4067
- type: "success"
4068
- });
4074
+ const handleClick = () => {
4075
+ trackUsage("willOpenPreview");
4069
4076
  };
4070
4077
  return {
4071
4078
  title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
4072
- content: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, width: "100%", children: [
4073
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", tag: reactRouterDom.Link, to: url, target: "_blank", flex: "auto", children: formatMessage({
4074
- id: "content-manager.preview.panel.button",
4075
- defaultMessage: "Open preview"
4076
- }) }),
4077
- /* @__PURE__ */ jsxRuntime.jsx(
4078
- designSystem.IconButton,
4079
- {
4080
- type: "button",
4081
- label: formatMessage({
4082
- id: "preview.copy.label",
4083
- defaultMessage: "Copy preview link"
4084
- }),
4085
- onClick: handleCopyLink,
4086
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
4087
- }
4088
- )
4089
- ] })
4079
+ content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
4080
+ designSystem.Button,
4081
+ {
4082
+ variant: "tertiary",
4083
+ tag: reactRouterDom.Link,
4084
+ to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
4085
+ onClick: handleClick,
4086
+ flex: "auto",
4087
+ children: formatMessage({
4088
+ id: "content-manager.preview.panel.button",
4089
+ defaultMessage: "Open preview"
4090
+ })
4091
+ }
4092
+ ) })
4090
4093
  };
4091
4094
  };
4092
4095
  const FEATURE_ID = "preview";
@@ -4118,7 +4121,7 @@ const index = {
4118
4121
  app.router.addRoute({
4119
4122
  path: "content-manager/*",
4120
4123
  lazy: async () => {
4121
- const { Layout } = await Promise.resolve().then(() => require("./layout-ByFyQRDH.js"));
4124
+ const { Layout } = await Promise.resolve().then(() => require("./layout-BFjOzyo2.js"));
4122
4125
  return {
4123
4126
  Component: Layout
4124
4127
  };
@@ -4138,7 +4141,7 @@ const index = {
4138
4141
  async registerTrads({ locales }) {
4139
4142
  const importedTrads = await Promise.all(
4140
4143
  locales.map((locale) => {
4141
- 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-Bdpa50w3.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 }) => {
4144
+ 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-DTWPCdTS.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 }) => {
4142
4145
  return {
4143
4146
  data: prefixPluginTranslations(data, PLUGIN_ID),
4144
4147
  locale
@@ -4196,5 +4199,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
4196
4199
  exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
4197
4200
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
4198
4201
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
4202
+ exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
4199
4203
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
4200
- //# sourceMappingURL=index-BgaeYWIy.js.map
4204
+ //# sourceMappingURL=index-PscLJrm0.js.map