@strapi/content-manager 5.4.0 → 5.4.2
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.
- package/dist/_chunks/{ComponentConfigurationPage-DKuCF_uX.mjs → ComponentConfigurationPage-BaJMOQyq.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DKuCF_uX.mjs.map → ComponentConfigurationPage-BaJMOQyq.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-Cjr64OS0.js → ComponentConfigurationPage-N-CTtgQa.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-Cjr64OS0.js.map → ComponentConfigurationPage-N-CTtgQa.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BeikGxvq.js → EditConfigurationPage-BHkjAbxH.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BeikGxvq.js.map → EditConfigurationPage-BHkjAbxH.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CyqSP6ru.mjs → EditConfigurationPage-CKK-5LfX.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CyqSP6ru.mjs.map → EditConfigurationPage-CKK-5LfX.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-PrPHZN_9.mjs → EditViewPage-B11aeMcf.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-PrPHZN_9.mjs.map → EditViewPage-B11aeMcf.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-pyqEgLgP.js → EditViewPage-QPUftxUd.js} +3 -3
- package/dist/_chunks/{EditViewPage-pyqEgLgP.js.map → EditViewPage-QPUftxUd.js.map} +1 -1
- package/dist/_chunks/{Field-DuAYQka5.mjs → Field-Bj_RgtGo.mjs} +20 -21
- package/dist/_chunks/Field-Bj_RgtGo.mjs.map +1 -0
- package/dist/_chunks/{Field-fKtb7rWK.js → Field-DUK83cfh.js} +19 -20
- package/dist/_chunks/Field-DUK83cfh.js.map +1 -0
- package/dist/_chunks/{Form-BPXw-S-J.js → Form-DHmBRlHd.js} +2 -2
- package/dist/_chunks/{Form-BPXw-S-J.js.map → Form-DHmBRlHd.js.map} +1 -1
- package/dist/_chunks/{Form-Dxh71ckp.mjs → Form-DLMSoXV7.mjs} +2 -2
- package/dist/_chunks/{Form-Dxh71ckp.mjs.map → Form-DLMSoXV7.mjs.map} +1 -1
- package/dist/_chunks/{History-CGblSVMc.mjs → History-CfCSNlG9.mjs} +8 -6
- package/dist/_chunks/History-CfCSNlG9.mjs.map +1 -0
- package/dist/_chunks/{History-BGGn9JGY.js → History-Di3zm4HT.js} +7 -5
- package/dist/_chunks/History-Di3zm4HT.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-TIM0JveM.mjs → ListConfigurationPage-0mtv_iqk.mjs} +5 -4
- package/dist/_chunks/ListConfigurationPage-0mtv_iqk.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-D3Avyi4t.js → ListConfigurationPage-Cq361KIt.js} +4 -3
- package/dist/_chunks/ListConfigurationPage-Cq361KIt.js.map +1 -0
- package/dist/_chunks/{ListViewPage-C975eW-t.mjs → ListViewPage-BxLVROX8.mjs} +50 -49
- package/dist/_chunks/ListViewPage-BxLVROX8.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-DtAHWFMV.js → ListViewPage-DFDcG8gM.js} +50 -49
- package/dist/_chunks/ListViewPage-DFDcG8gM.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-SgNTVGjF.mjs → NoContentTypePage-BRfDd67_.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-SgNTVGjF.mjs.map → NoContentTypePage-BRfDd67_.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-BFjWZX0i.js → NoContentTypePage-BSyvnDZZ.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-BFjWZX0i.js.map → NoContentTypePage-BSyvnDZZ.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-D4XYRoPf.mjs → NoPermissionsPage-CV9V8KWa.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-D4XYRoPf.mjs.map → NoPermissionsPage-CV9V8KWa.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-j7oulOpl.js → NoPermissionsPage-DyLphsn_.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-j7oulOpl.js.map → NoPermissionsPage-DyLphsn_.js.map} +1 -1
- package/dist/_chunks/{Preview-Cy6fuAnd.mjs → Preview-C_B1nx3g.mjs} +66 -31
- package/dist/_chunks/Preview-C_B1nx3g.mjs.map +1 -0
- package/dist/_chunks/{Preview-Bx1WfmKJ.js → Preview-D_3aO6Ly.js} +63 -28
- package/dist/_chunks/Preview-D_3aO6Ly.js.map +1 -0
- package/dist/_chunks/{Relations-DUrYWw0N.mjs → Relations-C6pwmDXh.mjs} +3 -3
- package/dist/_chunks/{Relations-DUrYWw0N.mjs.map → Relations-C6pwmDXh.mjs.map} +1 -1
- package/dist/_chunks/{Relations-CXQqwRXC.js → Relations-Cne2AlrL.js} +3 -3
- package/dist/_chunks/{Relations-CXQqwRXC.js.map → Relations-Cne2AlrL.js.map} +1 -1
- package/dist/_chunks/{en-69jRDM9j.mjs → en-DhFUjrNW.mjs} +3 -2
- package/dist/_chunks/{en-69jRDM9j.mjs.map → en-DhFUjrNW.mjs.map} +1 -1
- package/dist/_chunks/{en-DAgtrRoa.js → en-Ic0kXjxB.js} +3 -2
- package/dist/_chunks/{en-DAgtrRoa.js.map → en-Ic0kXjxB.js.map} +1 -1
- package/dist/_chunks/{index-Ta--2bRa.mjs → index-BpxR3En4.mjs} +55 -30
- package/dist/_chunks/index-BpxR3En4.mjs.map +1 -0
- package/dist/_chunks/{index-_j7lH3CO.js → index-T-aWjbj2.js} +54 -29
- package/dist/_chunks/index-T-aWjbj2.js.map +1 -0
- package/dist/_chunks/{layout-BDwU2I_y.js → layout-BEuNwv-F.js} +3 -3
- package/dist/_chunks/{layout-BDwU2I_y.js.map → layout-BEuNwv-F.js.map} +1 -1
- package/dist/_chunks/{layout-C8H4oKDo.mjs → layout-DhMZ_lDx.mjs} +3 -3
- package/dist/_chunks/{layout-C8H4oKDo.mjs.map → layout-DhMZ_lDx.mjs.map} +1 -1
- package/dist/_chunks/{relations-Ch70q86O.mjs → relations-BdnxoX6f.mjs} +2 -2
- package/dist/_chunks/{relations-Ch70q86O.mjs.map → relations-BdnxoX6f.mjs.map} +1 -1
- package/dist/_chunks/{relations-CPfMNzM6.js → relations-kLcuobLk.js} +2 -2
- package/dist/_chunks/{relations-CPfMNzM6.js.map → relations-kLcuobLk.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/services/documents.d.ts +0 -3
- package/dist/server/index.js +56 -9
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +57 -10
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -1
- package/dist/server/src/preview/index.d.ts.map +1 -1
- package/dist/server/src/preview/services/index.d.ts +1 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -1
- package/dist/server/src/preview/services/preview-config.d.ts +2 -0
- package/dist/server/src/preview/services/preview-config.d.ts.map +1 -1
- package/dist/server/src/preview/utils.d.ts +1 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -1
- package/dist/server/src/register.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/_chunks/Field-DuAYQka5.mjs.map +0 -1
- package/dist/_chunks/Field-fKtb7rWK.js.map +0 -1
- package/dist/_chunks/History-BGGn9JGY.js.map +0 -1
- package/dist/_chunks/History-CGblSVMc.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-D3Avyi4t.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-TIM0JveM.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-C975eW-t.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-DtAHWFMV.js.map +0 -1
- package/dist/_chunks/Preview-Bx1WfmKJ.js.map +0 -1
- package/dist/_chunks/Preview-Cy6fuAnd.mjs.map +0 -1
- package/dist/_chunks/index-Ta--2bRa.mjs.map +0 -1
- package/dist/_chunks/index-_j7lH3CO.js.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.",
|
@@ -291,7 +292,7 @@ const en = {
|
|
291
292
|
"history.restore.confirm.title": "Are you sure you want to restore this version?",
|
292
293
|
"history.restore.confirm.message": "{isDraft, select, true {The restored content will override your draft.} other {The restored content won't be published, it will override the draft and be saved as pending changes. You'll be able to publish the changes at anytime.}}",
|
293
294
|
"history.restore.success.title": "Version restored.",
|
294
|
-
"history.restore.success.message": "
|
295
|
+
"history.restore.success.message": "A past version of the content was restored.",
|
295
296
|
"history.restore.error.message": "Could not restore version.",
|
296
297
|
"validation.error": "There are validation errors in your document. Please fix them before saving.",
|
297
298
|
"bulk-publish.edit": "Edit"
|
@@ -300,4 +301,4 @@ exports.default = en;
|
|
300
301
|
exports.groups = groups;
|
301
302
|
exports.models = models;
|
302
303
|
exports.pageNotFound = pageNotFound;
|
303
|
-
//# sourceMappingURL=en-
|
304
|
+
//# sourceMappingURL=en-Ic0kXjxB.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"en-
|
1
|
+
{"version":3,"file":"en-Ic0kXjxB.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -3,16 +3,16 @@ 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 {
|
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";
|
13
|
+
import { stringify } from "qs";
|
12
14
|
import pipe from "lodash/fp/pipe";
|
13
15
|
import { intervalToDuration, isPast } from "date-fns";
|
14
|
-
import { styled } from "styled-components";
|
15
|
-
import { stringify } from "qs";
|
16
16
|
import { createSlice, combineReducers } from "@reduxjs/toolkit";
|
17
17
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
18
18
|
const v = glob[path];
|
@@ -274,7 +274,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
274
274
|
url: `/content-manager/collection-types/${model}`,
|
275
275
|
method: "GET",
|
276
276
|
config: {
|
277
|
-
params
|
277
|
+
params: stringify(params, { encode: true })
|
278
278
|
}
|
279
279
|
}),
|
280
280
|
providesTags: (result, _error, arg) => {
|
@@ -462,9 +462,6 @@ const buildValidParams = (query) => {
|
|
462
462
|
{}
|
463
463
|
)
|
464
464
|
};
|
465
|
-
if ("_q" in validQueryParams) {
|
466
|
-
validQueryParams._q = encodeURIComponent(validQueryParams._q);
|
467
|
-
}
|
468
465
|
return validQueryParams;
|
469
466
|
};
|
470
467
|
const isBaseQueryError = (error) => {
|
@@ -1664,7 +1661,7 @@ const useDocumentActions = () => {
|
|
1664
1661
|
};
|
1665
1662
|
};
|
1666
1663
|
const ProtectedHistoryPage = React.lazy(
|
1667
|
-
() => import("./History-
|
1664
|
+
() => import("./History-CfCSNlG9.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1668
1665
|
);
|
1669
1666
|
const routes$2 = [
|
1670
1667
|
{
|
@@ -1677,7 +1674,7 @@ const routes$2 = [
|
|
1677
1674
|
}
|
1678
1675
|
];
|
1679
1676
|
const ProtectedPreviewPage = React.lazy(
|
1680
|
-
() => import("./Preview-
|
1677
|
+
() => import("./Preview-C_B1nx3g.mjs").then((mod) => ({ default: mod.ProtectedPreviewPage }))
|
1681
1678
|
);
|
1682
1679
|
const routes$1 = [
|
1683
1680
|
{
|
@@ -1690,31 +1687,31 @@ const routes$1 = [
|
|
1690
1687
|
}
|
1691
1688
|
];
|
1692
1689
|
const ProtectedEditViewPage = lazy(
|
1693
|
-
() => import("./EditViewPage-
|
1690
|
+
() => import("./EditViewPage-B11aeMcf.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1694
1691
|
);
|
1695
1692
|
const ProtectedListViewPage = lazy(
|
1696
|
-
() => import("./ListViewPage-
|
1693
|
+
() => import("./ListViewPage-BxLVROX8.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1697
1694
|
);
|
1698
1695
|
const ProtectedListConfiguration = lazy(
|
1699
|
-
() => import("./ListConfigurationPage-
|
1696
|
+
() => import("./ListConfigurationPage-0mtv_iqk.mjs").then((mod) => ({
|
1700
1697
|
default: mod.ProtectedListConfiguration
|
1701
1698
|
}))
|
1702
1699
|
);
|
1703
1700
|
const ProtectedEditConfigurationPage = lazy(
|
1704
|
-
() => import("./EditConfigurationPage-
|
1701
|
+
() => import("./EditConfigurationPage-CKK-5LfX.mjs").then((mod) => ({
|
1705
1702
|
default: mod.ProtectedEditConfigurationPage
|
1706
1703
|
}))
|
1707
1704
|
);
|
1708
1705
|
const ProtectedComponentConfigurationPage = lazy(
|
1709
|
-
() => import("./ComponentConfigurationPage-
|
1706
|
+
() => import("./ComponentConfigurationPage-BaJMOQyq.mjs").then((mod) => ({
|
1710
1707
|
default: mod.ProtectedComponentConfigurationPage
|
1711
1708
|
}))
|
1712
1709
|
);
|
1713
1710
|
const NoPermissions = lazy(
|
1714
|
-
() => import("./NoPermissionsPage-
|
1711
|
+
() => import("./NoPermissionsPage-CV9V8KWa.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1715
1712
|
);
|
1716
1713
|
const NoContentType = lazy(
|
1717
|
-
() => import("./NoContentTypePage-
|
1714
|
+
() => import("./NoContentTypePage-BRfDd67_.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1718
1715
|
);
|
1719
1716
|
const CollectionTypePages = () => {
|
1720
1717
|
const { collectionType } = useParams();
|
@@ -1859,6 +1856,11 @@ const DocumentActionButton = (action) => {
|
|
1859
1856
|
) : null
|
1860
1857
|
] });
|
1861
1858
|
};
|
1859
|
+
const MenuItem = styled(Menu.Item)`
|
1860
|
+
&:hover {
|
1861
|
+
background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
|
1862
|
+
}
|
1863
|
+
`;
|
1862
1864
|
const DocumentActionsMenu = ({
|
1863
1865
|
actions: actions2,
|
1864
1866
|
children,
|
@@ -1917,11 +1919,13 @@ const DocumentActionsMenu = ({
|
|
1917
1919
|
/* @__PURE__ */ jsxs(Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1918
1920
|
actions2.map((action) => {
|
1919
1921
|
return /* @__PURE__ */ jsx(
|
1920
|
-
|
1922
|
+
MenuItem,
|
1921
1923
|
{
|
1922
1924
|
disabled: action.disabled,
|
1923
1925
|
onSelect: handleClick(action),
|
1924
1926
|
display: "block",
|
1927
|
+
isVariantDanger: action.variant === "danger",
|
1928
|
+
isDisabled: action.disabled,
|
1925
1929
|
children: /* @__PURE__ */ jsx(Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxs(
|
1926
1930
|
Flex,
|
1927
1931
|
{
|
@@ -2077,6 +2081,7 @@ const PublishAction$1 = ({
|
|
2077
2081
|
const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();
|
2078
2082
|
const isListView = useMatch(LIST_PATH) !== null;
|
2079
2083
|
const isCloning = useMatch(CLONE_PATH) !== null;
|
2084
|
+
const { id } = useParams();
|
2080
2085
|
const { formatMessage } = useIntl();
|
2081
2086
|
const canPublish = useDocumentRBAC("PublishAction", ({ canPublish: canPublish2 }) => canPublish2);
|
2082
2087
|
const { publish } = useDocumentActions();
|
@@ -2179,10 +2184,12 @@ const PublishAction$1 = ({
|
|
2179
2184
|
transformData(formValues)
|
2180
2185
|
);
|
2181
2186
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2187
|
+
if (id === "create") {
|
2188
|
+
navigate({
|
2189
|
+
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
2190
|
+
search: rawQuery
|
2191
|
+
});
|
2192
|
+
}
|
2186
2193
|
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2187
2194
|
setErrors(formatValidationErrors(res.error));
|
2188
2195
|
}
|
@@ -2266,7 +2273,7 @@ const UpdateAction = ({
|
|
2266
2273
|
*/
|
2267
2274
|
disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
|
2268
2275
|
label: formatMessage({
|
2269
|
-
id: "
|
2276
|
+
id: "global.save",
|
2270
2277
|
defaultMessage: "Save"
|
2271
2278
|
}),
|
2272
2279
|
onClick: async () => {
|
@@ -2576,12 +2583,18 @@ const DocumentStatus = ({ status = "draft", size = "S", ...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(
|
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, {})
|
@@ -3915,17 +3928,27 @@ const HistoryAction = ({ model, document }) => {
|
|
3915
3928
|
const { formatMessage } = useIntl();
|
3916
3929
|
const [{ query }] = useQueryParams();
|
3917
3930
|
const navigate = useNavigate();
|
3931
|
+
const { trackUsage } = useTracking();
|
3932
|
+
const { pathname } = useLocation();
|
3918
3933
|
const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });
|
3919
3934
|
if (!window.strapi.features.isEnabled("cms-content-history")) {
|
3920
3935
|
return null;
|
3921
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
|
+
};
|
3922
3945
|
return {
|
3923
3946
|
icon: /* @__PURE__ */ jsx(ClockCounterClockwise, {}),
|
3924
3947
|
label: formatMessage({
|
3925
3948
|
id: "content-manager.history.document-action",
|
3926
3949
|
defaultMessage: "Content History"
|
3927
3950
|
}),
|
3928
|
-
onClick:
|
3951
|
+
onClick: handleOnClick,
|
3929
3952
|
disabled: (
|
3930
3953
|
/**
|
3931
3954
|
* The user is creating a new document.
|
@@ -4012,6 +4035,7 @@ const { useGetPreviewUrlQuery } = previewApi;
|
|
4012
4035
|
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4013
4036
|
const { formatMessage } = useIntl();
|
4014
4037
|
const { trackUsage } = useTracking();
|
4038
|
+
const { pathname } = useLocation();
|
4015
4039
|
const [{ query }] = useQueryParams();
|
4016
4040
|
const { data, error } = useGetPreviewUrlQuery({
|
4017
4041
|
params: {
|
@@ -4026,8 +4050,9 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4026
4050
|
if (!data?.data?.url || error) {
|
4027
4051
|
return null;
|
4028
4052
|
}
|
4029
|
-
const
|
4030
|
-
|
4053
|
+
const trackNavigation = () => {
|
4054
|
+
const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
|
4055
|
+
trackUsage("willNavigate", { from: pathname, to: destinationPathname });
|
4031
4056
|
};
|
4032
4057
|
return {
|
4033
4058
|
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
@@ -4037,7 +4062,7 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4037
4062
|
variant: "tertiary",
|
4038
4063
|
tag: Link,
|
4039
4064
|
to: { pathname: "preview", search: stringify(query, { encode: false }) },
|
4040
|
-
onClick:
|
4065
|
+
onClick: trackNavigation,
|
4041
4066
|
flex: "auto",
|
4042
4067
|
children: formatMessage({
|
4043
4068
|
id: "content-manager.preview.panel.button",
|
@@ -4076,7 +4101,7 @@ const index = {
|
|
4076
4101
|
app.router.addRoute({
|
4077
4102
|
path: "content-manager/*",
|
4078
4103
|
lazy: async () => {
|
4079
|
-
const { Layout } = await import("./layout-
|
4104
|
+
const { Layout } = await import("./layout-DhMZ_lDx.mjs");
|
4080
4105
|
return {
|
4081
4106
|
Component: Layout
|
4082
4107
|
};
|
@@ -4096,7 +4121,7 @@ const index = {
|
|
4096
4121
|
async registerTrads({ locales }) {
|
4097
4122
|
const importedTrads = await Promise.all(
|
4098
4123
|
locales.map((locale) => {
|
4099
|
-
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-
|
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-DhFUjrNW.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 }) => {
|
4100
4125
|
return {
|
4101
4126
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4102
4127
|
locale
|
@@ -4158,4 +4183,4 @@ export {
|
|
4158
4183
|
capitalise as y,
|
4159
4184
|
useUpdateContentTypeConfigurationMutation as z
|
4160
4185
|
};
|
4161
|
-
//# sourceMappingURL=index-
|
4186
|
+
//# sourceMappingURL=index-BpxR3En4.mjs.map
|