@strapi/content-manager 5.3.0 → 5.4.1

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 (78) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-Cr0ttPAZ.js → ComponentConfigurationPage-ClKl_TA2.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-Cr0ttPAZ.js.map → ComponentConfigurationPage-ClKl_TA2.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-UGIFDkPO.mjs → ComponentConfigurationPage-D3ZWDAHG.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-UGIFDkPO.mjs.map → ComponentConfigurationPage-D3ZWDAHG.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-7hF4_8yK.mjs → EditConfigurationPage-BYCBSJxP.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-7hF4_8yK.mjs.map → EditConfigurationPage-BYCBSJxP.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-Ds3BOL2z.js → EditConfigurationPage-OWez0Kxp.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-Ds3BOL2z.js.map → EditConfigurationPage-OWez0Kxp.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-CA98g5_g.mjs → EditViewPage-5pdbvsO_.mjs} +3 -3
  10. package/dist/_chunks/{EditViewPage-CA98g5_g.mjs.map → EditViewPage-5pdbvsO_.mjs.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-DoQm9llG.js → EditViewPage-BEs5iGDi.js} +3 -3
  12. package/dist/_chunks/{EditViewPage-DoQm9llG.js.map → EditViewPage-BEs5iGDi.js.map} +1 -1
  13. package/dist/_chunks/{Field-CQtLQzHl.js → Field-DNHm4wHx.js} +18 -19
  14. package/dist/_chunks/Field-DNHm4wHx.js.map +1 -0
  15. package/dist/_chunks/{Field-B2C1tq9_.mjs → Field-DcKuFHYK.mjs} +18 -19
  16. package/dist/_chunks/Field-DcKuFHYK.mjs.map +1 -0
  17. package/dist/_chunks/{Form-CxQ2pPjq.mjs → Form-CGwM_-5c.mjs} +2 -2
  18. package/dist/_chunks/{Form-CxQ2pPjq.mjs.map → Form-CGwM_-5c.mjs.map} +1 -1
  19. package/dist/_chunks/{Form-YQaS3_NH.js → Form-CoRxWJOz.js} +2 -2
  20. package/dist/_chunks/{Form-YQaS3_NH.js.map → Form-CoRxWJOz.js.map} +1 -1
  21. package/dist/_chunks/{History-DbdpigyF.js → History-BcUTQrfG.js} +7 -54
  22. package/dist/_chunks/History-BcUTQrfG.js.map +1 -0
  23. package/dist/_chunks/{History-DTYKr2Cg.mjs → History-DEvr3Q_V.mjs} +8 -55
  24. package/dist/_chunks/History-DEvr3Q_V.mjs.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-DRGhXnUA.js → ListConfigurationPage-BE_Ho7tV.js} +4 -3
  26. package/dist/_chunks/ListConfigurationPage-BE_Ho7tV.js.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-DQG-j52q.mjs → ListConfigurationPage-BM4zZZcM.mjs} +5 -4
  28. package/dist/_chunks/ListConfigurationPage-BM4zZZcM.mjs.map +1 -0
  29. package/dist/_chunks/{ListViewPage-DAekmnvp.mjs → ListViewPage-BK2mkrql.mjs} +3 -3
  30. package/dist/_chunks/{ListViewPage-DAekmnvp.mjs.map → ListViewPage-BK2mkrql.mjs.map} +1 -1
  31. package/dist/_chunks/{ListViewPage-CVIEfYWN.js → ListViewPage-BkT8Eao0.js} +3 -3
  32. package/dist/_chunks/{ListViewPage-CVIEfYWN.js.map → ListViewPage-BkT8Eao0.js.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-5kwUPeFg.mjs → NoContentTypePage-BvcAutu9.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-5kwUPeFg.mjs.map → NoContentTypePage-BvcAutu9.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-CTcfA2-Q.js → NoContentTypePage-C8mtyc4H.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-CTcfA2-Q.js.map → NoContentTypePage-C8mtyc4H.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-pVeCVj9a.js → NoPermissionsPage-B5Y9Y78B.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-pVeCVj9a.js.map → NoPermissionsPage-B5Y9Y78B.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-d-JtEVAw.mjs → NoPermissionsPage-BmbRz7PR.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-d-JtEVAw.mjs.map → NoPermissionsPage-BmbRz7PR.mjs.map} +1 -1
  41. package/dist/_chunks/{Preview-COsm52rZ.js → Preview-BF8ZDYqS.js} +59 -80
  42. package/dist/_chunks/Preview-BF8ZDYqS.js.map +1 -0
  43. package/dist/_chunks/{Preview-gkmvcwhu.mjs → Preview-DcexhKJE.mjs} +62 -83
  44. package/dist/_chunks/Preview-DcexhKJE.mjs.map +1 -0
  45. package/dist/_chunks/{Relations-Beo_uDz1.js → Relations-BKnoK1R0.js} +3 -3
  46. package/dist/_chunks/{Relations-Beo_uDz1.js.map → Relations-BKnoK1R0.js.map} +1 -1
  47. package/dist/_chunks/{Relations-7ItTFWp7.mjs → Relations-BjIzc4EK.mjs} +3 -3
  48. package/dist/_chunks/{Relations-7ItTFWp7.mjs.map → Relations-BjIzc4EK.mjs.map} +1 -1
  49. package/dist/_chunks/{en-D_BMf0hT.mjs → en-CfIXaZf9.mjs} +4 -2
  50. package/dist/_chunks/{en-D_BMf0hT.mjs.map → en-CfIXaZf9.mjs.map} +1 -1
  51. package/dist/_chunks/{en-CHOp_xJv.js → en-DTWPCdTS.js} +4 -2
  52. package/dist/_chunks/{en-CHOp_xJv.js.map → en-DTWPCdTS.js.map} +1 -1
  53. package/dist/_chunks/{index-D3IiO0X8.mjs → index-BW-rXkjn.mjs} +53 -36
  54. package/dist/_chunks/index-BW-rXkjn.mjs.map +1 -0
  55. package/dist/_chunks/{index-CJX65DLa.js → index-DOzAG2cq.js} +52 -35
  56. package/dist/_chunks/index-DOzAG2cq.js.map +1 -0
  57. package/dist/_chunks/{layout-OhrmoJVB.mjs → layout-DFVbgjp2.mjs} +3 -3
  58. package/dist/_chunks/{layout-OhrmoJVB.mjs.map → layout-DFVbgjp2.mjs.map} +1 -1
  59. package/dist/_chunks/{layout-9fI2_QJt.js → layout-RC3W2obV.js} +3 -3
  60. package/dist/_chunks/{layout-9fI2_QJt.js.map → layout-RC3W2obV.js.map} +1 -1
  61. package/dist/_chunks/{relations-sRERvWmr.mjs → relations-Dogh8HWI.mjs} +2 -2
  62. package/dist/_chunks/{relations-sRERvWmr.mjs.map → relations-Dogh8HWI.mjs.map} +1 -1
  63. package/dist/_chunks/{relations-DIT8sP52.js → relations-zam7-5H7.js} +2 -2
  64. package/dist/_chunks/{relations-DIT8sP52.js.map → relations-zam7-5H7.js.map} +1 -1
  65. package/dist/admin/index.js +1 -1
  66. package/dist/admin/index.mjs +1 -1
  67. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  68. package/package.json +7 -7
  69. package/dist/_chunks/Field-B2C1tq9_.mjs.map +0 -1
  70. package/dist/_chunks/Field-CQtLQzHl.js.map +0 -1
  71. package/dist/_chunks/History-DTYKr2Cg.mjs.map +0 -1
  72. package/dist/_chunks/History-DbdpigyF.js.map +0 -1
  73. package/dist/_chunks/ListConfigurationPage-DQG-j52q.mjs.map +0 -1
  74. package/dist/_chunks/ListConfigurationPage-DRGhXnUA.js.map +0 -1
  75. package/dist/_chunks/Preview-COsm52rZ.js.map +0 -1
  76. package/dist/_chunks/Preview-gkmvcwhu.mjs.map +0 -1
  77. package/dist/_chunks/index-CJX65DLa.js.map +0 -1
  78. package/dist/_chunks/index-D3IiO0X8.mjs.map +0 -1
@@ -245,6 +245,7 @@ const en = {
245
245
  "preview.header.close": "Close preview",
246
246
  "preview.copy.label": "Copy preview link",
247
247
  "preview.copy.success": "Copied preview link",
248
+ "preview.tabs.label": "Preview status",
248
249
  "relation.add": "Add relation",
249
250
  "relation.disconnect": "Remove",
250
251
  "relation.error-adding-relation": "An error occurred while trying to add the relation.",
@@ -293,10 +294,11 @@ const en = {
293
294
  "history.restore.success.title": "Version restored.",
294
295
  "history.restore.success.message": "The content of the restored version is not published yet.",
295
296
  "history.restore.error.message": "Could not restore version.",
296
- "validation.error": "There are validation errors in your document. Please fix them before saving."
297
+ "validation.error": "There are validation errors in your document. Please fix them before saving.",
298
+ "bulk-publish.edit": "Edit"
297
299
  };
298
300
  exports.default = en;
299
301
  exports.groups = groups;
300
302
  exports.models = models;
301
303
  exports.pageNotFound = pageNotFound;
302
- //# sourceMappingURL=en-CHOp_xJv.js.map
304
+ //# sourceMappingURL=en-DTWPCdTS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en-CHOp_xJv.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en-DTWPCdTS.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,15 +3,15 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
3
3
  import { useStrapiApp, createContext, useQueryParams, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useForm, useTracking, useGuidedTour, BackButton, DescriptionComponentRenderer, useTable, Table } from "@strapi/admin/strapi-admin";
4
4
  import * as React from "react";
5
5
  import { lazy } from "react";
6
- import { Button, Menu, VisuallyHidden, Flex, Dialog, Modal, Typography, Radio, Status, Box, SingleSelect, SingleSelectOption, IconButton, Loader, Tooltip, LinkButton } from "@strapi/design-system";
6
+ import { Menu, Button, VisuallyHidden, Flex, Dialog, Modal, Typography, Radio, Status, Box, SingleSelect, SingleSelectOption, IconButton, Loader, Tooltip, LinkButton } from "@strapi/design-system";
7
7
  import mapValues from "lodash/fp/mapValues";
8
8
  import { useIntl } from "react-intl";
9
9
  import { useParams, useNavigate, Navigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
10
+ import { styled } from "styled-components";
10
11
  import * as yup from "yup";
11
12
  import { ValidationError } from "yup";
12
13
  import pipe from "lodash/fp/pipe";
13
14
  import { intervalToDuration, isPast } from "date-fns";
14
- import { styled } from "styled-components";
15
15
  import { stringify } from "qs";
16
16
  import { createSlice, combineReducers } from "@reduxjs/toolkit";
17
17
  const __variableDynamicImportRuntimeHelper = (glob, path) => {
@@ -1664,7 +1664,7 @@ const useDocumentActions = () => {
1664
1664
  };
1665
1665
  };
1666
1666
  const ProtectedHistoryPage = React.lazy(
1667
- () => import("./History-DTYKr2Cg.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1667
+ () => import("./History-DEvr3Q_V.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1668
1668
  );
1669
1669
  const routes$2 = [
1670
1670
  {
@@ -1677,7 +1677,7 @@ const routes$2 = [
1677
1677
  }
1678
1678
  ];
1679
1679
  const ProtectedPreviewPage = React.lazy(
1680
- () => import("./Preview-gkmvcwhu.mjs").then((mod) => ({ default: mod.ProtectedPreviewPage }))
1680
+ () => import("./Preview-DcexhKJE.mjs").then((mod) => ({ default: mod.ProtectedPreviewPage }))
1681
1681
  );
1682
1682
  const routes$1 = [
1683
1683
  {
@@ -1690,31 +1690,31 @@ const routes$1 = [
1690
1690
  }
1691
1691
  ];
1692
1692
  const ProtectedEditViewPage = lazy(
1693
- () => import("./EditViewPage-CA98g5_g.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1693
+ () => import("./EditViewPage-5pdbvsO_.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1694
1694
  );
1695
1695
  const ProtectedListViewPage = lazy(
1696
- () => import("./ListViewPage-DAekmnvp.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1696
+ () => import("./ListViewPage-BK2mkrql.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1697
1697
  );
1698
1698
  const ProtectedListConfiguration = lazy(
1699
- () => import("./ListConfigurationPage-DQG-j52q.mjs").then((mod) => ({
1699
+ () => import("./ListConfigurationPage-BM4zZZcM.mjs").then((mod) => ({
1700
1700
  default: mod.ProtectedListConfiguration
1701
1701
  }))
1702
1702
  );
1703
1703
  const ProtectedEditConfigurationPage = lazy(
1704
- () => import("./EditConfigurationPage-7hF4_8yK.mjs").then((mod) => ({
1704
+ () => import("./EditConfigurationPage-BYCBSJxP.mjs").then((mod) => ({
1705
1705
  default: mod.ProtectedEditConfigurationPage
1706
1706
  }))
1707
1707
  );
1708
1708
  const ProtectedComponentConfigurationPage = lazy(
1709
- () => import("./ComponentConfigurationPage-UGIFDkPO.mjs").then((mod) => ({
1709
+ () => import("./ComponentConfigurationPage-D3ZWDAHG.mjs").then((mod) => ({
1710
1710
  default: mod.ProtectedComponentConfigurationPage
1711
1711
  }))
1712
1712
  );
1713
1713
  const NoPermissions = lazy(
1714
- () => import("./NoPermissionsPage-d-JtEVAw.mjs").then((mod) => ({ default: mod.NoPermissions }))
1714
+ () => import("./NoPermissionsPage-BmbRz7PR.mjs").then((mod) => ({ default: mod.NoPermissions }))
1715
1715
  );
1716
1716
  const NoContentType = lazy(
1717
- () => import("./NoContentTypePage-5kwUPeFg.mjs").then((mod) => ({ default: mod.NoContentType }))
1717
+ () => import("./NoContentTypePage-BvcAutu9.mjs").then((mod) => ({ default: mod.NoContentType }))
1718
1718
  );
1719
1719
  const CollectionTypePages = () => {
1720
1720
  const { collectionType } = useParams();
@@ -1859,6 +1859,11 @@ const DocumentActionButton = (action) => {
1859
1859
  ) : null
1860
1860
  ] });
1861
1861
  };
1862
+ const MenuItem = styled(Menu.Item)`
1863
+ &:hover {
1864
+ background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
1865
+ }
1866
+ `;
1862
1867
  const DocumentActionsMenu = ({
1863
1868
  actions: actions2,
1864
1869
  children,
@@ -1917,11 +1922,13 @@ const DocumentActionsMenu = ({
1917
1922
  /* @__PURE__ */ jsxs(Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1918
1923
  actions2.map((action) => {
1919
1924
  return /* @__PURE__ */ jsx(
1920
- Menu.Item,
1925
+ MenuItem,
1921
1926
  {
1922
1927
  disabled: action.disabled,
1923
1928
  onSelect: handleClick(action),
1924
1929
  display: "block",
1930
+ isVariantDanger: action.variant === "danger",
1931
+ isDisabled: action.disabled,
1925
1932
  children: /* @__PURE__ */ jsx(Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxs(
1926
1933
  Flex,
1927
1934
  {
@@ -2266,7 +2273,7 @@ const UpdateAction = ({
2266
2273
  */
2267
2274
  disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
2268
2275
  label: formatMessage({
2269
- id: "content-manager.containers.Edit.save",
2276
+ id: "global.save",
2270
2277
  defaultMessage: "Save"
2271
2278
  }),
2272
2279
  onClick: async () => {
@@ -2531,7 +2538,7 @@ const RelativeTime = React.forwardRef(
2531
2538
  });
2532
2539
  const unit = intervals.find((intervalUnit) => {
2533
2540
  return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
2534
- });
2541
+ }) ?? "seconds";
2535
2542
  const relativeTime = isPast(timestamp) ? -interval[unit] : interval[unit];
2536
2543
  const customInterval = customIntervals.find(
2537
2544
  (custom) => interval[custom.unit] < custom.threshold
@@ -2565,10 +2572,10 @@ const getDisplayName = ({
2565
2572
  return email ?? "";
2566
2573
  };
2567
2574
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2568
- const DocumentStatus = ({ status = "draft", ...restProps }) => {
2575
+ const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
2569
2576
  const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2570
2577
  const { formatMessage } = useIntl();
2571
- return /* @__PURE__ */ jsx(Status, { ...restProps, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsx(Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
2578
+ return /* @__PURE__ */ jsx(Status, { ...restProps, size, variant: statusVariant, children: /* @__PURE__ */ jsx(Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
2572
2579
  id: `content-manager.containers.List.${status}`,
2573
2580
  defaultMessage: capitalise(status)
2574
2581
  }) }) });
@@ -2576,12 +2583,18 @@ const DocumentStatus = ({ status = "draft", ...restProps }) => {
2576
2583
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2577
2584
  const { formatMessage } = useIntl();
2578
2585
  const isCloning = useMatch(CLONE_PATH) !== null;
2586
+ const params = useParams();
2579
2587
  const title = isCreating ? formatMessage({
2580
2588
  id: "content-manager.containers.edit.title.new",
2581
2589
  defaultMessage: "Create an entry"
2582
2590
  }) : documentTitle;
2583
2591
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2584
- /* @__PURE__ */ jsx(BackButton, {}),
2592
+ /* @__PURE__ */ jsx(
2593
+ BackButton,
2594
+ {
2595
+ fallback: params.collectionType === SINGLE_TYPES ? void 0 : `../${COLLECTION_TYPES}/${params.slug}`
2596
+ }
2597
+ ),
2585
2598
  /* @__PURE__ */ jsxs(Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2586
2599
  /* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", children: title }),
2587
2600
  /* @__PURE__ */ jsx(HeaderToolbar, {})
@@ -3268,18 +3281,10 @@ const SelectedEntriesTableContent = ({
3268
3281
  search: row.locale && `?plugins[i18n][locale]=${row.locale}`
3269
3282
  },
3270
3283
  state: { from: pathname },
3271
- label: formatMessage(
3272
- { id: "app.component.HelperPluginTable.edit", defaultMessage: "Edit {target}" },
3273
- {
3274
- target: formatMessage(
3275
- {
3276
- id: "content-manager.components.ListViewHelperPluginTable.row-line",
3277
- defaultMessage: "item line {number}"
3278
- },
3279
- { number: index2 + 1 }
3280
- )
3281
- }
3282
- ),
3284
+ label: formatMessage({
3285
+ id: "content-manager.bulk-publish.edit",
3286
+ defaultMessage: "Edit"
3287
+ }),
3283
3288
  target: "_blank",
3284
3289
  marginLeft: "auto",
3285
3290
  variant: "ghost",
@@ -3923,17 +3928,27 @@ const HistoryAction = ({ model, document }) => {
3923
3928
  const { formatMessage } = useIntl();
3924
3929
  const [{ query }] = useQueryParams();
3925
3930
  const navigate = useNavigate();
3931
+ const { trackUsage } = useTracking();
3932
+ const { pathname } = useLocation();
3926
3933
  const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });
3927
3934
  if (!window.strapi.features.isEnabled("cms-content-history")) {
3928
3935
  return null;
3929
3936
  }
3937
+ const handleOnClick = () => {
3938
+ const destination = { pathname: "history", search: pluginsQueryParams };
3939
+ trackUsage("willNavigate", {
3940
+ from: pathname,
3941
+ to: `${pathname}/${destination.pathname}`
3942
+ });
3943
+ navigate(destination);
3944
+ };
3930
3945
  return {
3931
3946
  icon: /* @__PURE__ */ jsx(ClockCounterClockwise, {}),
3932
3947
  label: formatMessage({
3933
3948
  id: "content-manager.history.document-action",
3934
3949
  defaultMessage: "Content History"
3935
3950
  }),
3936
- onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3951
+ onClick: handleOnClick,
3937
3952
  disabled: (
3938
3953
  /**
3939
3954
  * The user is creating a new document.
@@ -4020,6 +4035,7 @@ const { useGetPreviewUrlQuery } = previewApi;
4020
4035
  const PreviewSidePanel = ({ model, documentId, document }) => {
4021
4036
  const { formatMessage } = useIntl();
4022
4037
  const { trackUsage } = useTracking();
4038
+ const { pathname } = useLocation();
4023
4039
  const [{ query }] = useQueryParams();
4024
4040
  const { data, error } = useGetPreviewUrlQuery({
4025
4041
  params: {
@@ -4034,8 +4050,9 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
4034
4050
  if (!data?.data?.url || error) {
4035
4051
  return null;
4036
4052
  }
4037
- const handleClick = () => {
4038
- trackUsage("willOpenPreview");
4053
+ const trackNavigation = () => {
4054
+ const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
4055
+ trackUsage("willNavigate", { from: pathname, to: destinationPathname });
4039
4056
  };
4040
4057
  return {
4041
4058
  title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
@@ -4045,7 +4062,7 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
4045
4062
  variant: "tertiary",
4046
4063
  tag: Link,
4047
4064
  to: { pathname: "preview", search: stringify(query, { encode: false }) },
4048
- onClick: handleClick,
4065
+ onClick: trackNavigation,
4049
4066
  flex: "auto",
4050
4067
  children: formatMessage({
4051
4068
  id: "content-manager.preview.panel.button",
@@ -4084,7 +4101,7 @@ const index = {
4084
4101
  app.router.addRoute({
4085
4102
  path: "content-manager/*",
4086
4103
  lazy: async () => {
4087
- const { Layout } = await import("./layout-OhrmoJVB.mjs");
4104
+ const { Layout } = await import("./layout-DFVbgjp2.mjs");
4088
4105
  return {
4089
4106
  Component: Layout
4090
4107
  };
@@ -4104,7 +4121,7 @@ const index = {
4104
4121
  async registerTrads({ locales }) {
4105
4122
  const importedTrads = await Promise.all(
4106
4123
  locales.map((locale) => {
4107
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-D_BMf0hT.mjs"), "./translations/es.json": () => import("./es-D34tqjMw.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr--pg5jUbt.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-BHqhDq4V.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
4124
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-CfIXaZf9.mjs"), "./translations/es.json": () => import("./es-D34tqjMw.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr--pg5jUbt.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-BHqhDq4V.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
4108
4125
  return {
4109
4126
  data: prefixPluginTranslations(data, PLUGIN_ID),
4110
4127
  locale
@@ -4166,4 +4183,4 @@ export {
4166
4183
  capitalise as y,
4167
4184
  useUpdateContentTypeConfigurationMutation as z
4168
4185
  };
4169
- //# sourceMappingURL=index-D3IiO0X8.mjs.map
4186
+ //# sourceMappingURL=index-BW-rXkjn.mjs.map