@strapi/content-manager 0.0.0-next.959c5589d0d3efa25d7ca014656d9ff48c173399 → 0.0.0-next.ac654f8b8646bf964ebd39d4313c4afab0917a24
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-gsCd80MU.js → ComponentConfigurationPage-CuKGBO3B.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-gsCd80MU.js.map → ComponentConfigurationPage-CuKGBO3B.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CIjXcRAB.mjs → ComponentConfigurationPage-DITz-KUa.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CIjXcRAB.mjs.map → ComponentConfigurationPage-DITz-KUa.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DHDQKBzw.js → EditConfigurationPage-aJ6Nk-e2.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-DHDQKBzw.js.map → EditConfigurationPage-aJ6Nk-e2.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BglmD_BF.mjs → EditConfigurationPage-dpdSMBbB.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BglmD_BF.mjs.map → EditConfigurationPage-dpdSMBbB.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-C4iTxUPU.js → EditViewPage-CUUoPbuf.js} +37 -7
- package/dist/_chunks/EditViewPage-CUUoPbuf.js.map +1 -0
- package/dist/_chunks/{EditViewPage-CiwVPMaK.mjs → EditViewPage-HR-LggHQ.mjs} +38 -8
- package/dist/_chunks/EditViewPage-HR-LggHQ.mjs.map +1 -0
- package/dist/_chunks/{Field-DIjL1b5d.mjs → Field-D8UDC53O.mjs} +43 -24
- package/dist/_chunks/Field-D8UDC53O.mjs.map +1 -0
- package/dist/_chunks/{Field-DhXEK8y1.js → Field-PPOGQJFw.js} +42 -23
- package/dist/_chunks/Field-PPOGQJFw.js.map +1 -0
- package/dist/_chunks/{Form-CmNesrvR.mjs → Form-B63Fj3Fj.mjs} +2 -2
- package/dist/_chunks/{Form-CmNesrvR.mjs.map → Form-B63Fj3Fj.mjs.map} +1 -1
- package/dist/_chunks/{Form-CwmJ4sWe.js → Form-BcGPmYEy.js} +2 -2
- package/dist/_chunks/{Form-CwmJ4sWe.js.map → Form-BcGPmYEy.js.map} +1 -1
- package/dist/_chunks/{History-BLCCNgCt.js → History-2wgFZpc9.js} +20 -90
- package/dist/_chunks/History-2wgFZpc9.js.map +1 -0
- package/dist/_chunks/{History-D-99Wh30.mjs → History-HLNHu2qZ.mjs} +21 -91
- package/dist/_chunks/History-HLNHu2qZ.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-JPWZz7Kg.mjs → ListConfigurationPage-CdZ3dURz.mjs} +5 -4
- package/dist/_chunks/ListConfigurationPage-CdZ3dURz.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DxWpeZrO.js → ListConfigurationPage-DJpH0BQ7.js} +4 -3
- package/dist/_chunks/ListConfigurationPage-DJpH0BQ7.js.map +1 -0
- package/dist/_chunks/{ListViewPage-CIQekSFz.js → ListViewPage-BSlwetiz.js} +62 -39
- package/dist/_chunks/ListViewPage-BSlwetiz.js.map +1 -0
- package/dist/_chunks/{ListViewPage-DSK3f0ST.mjs → ListViewPage-DmNN9hbm.mjs} +62 -39
- package/dist/_chunks/ListViewPage-DmNN9hbm.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-D99LU1YP.mjs → NoContentTypePage-Bn5ihosL.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-D99LU1YP.mjs.map → NoContentTypePage-Bn5ihosL.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-C5cxKvC2.js → NoContentTypePage-T65BK8ML.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-C5cxKvC2.js.map → NoContentTypePage-T65BK8ML.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DBrBw-0y.mjs → NoPermissionsPage-DaUbhwgn.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DBrBw-0y.mjs.map → NoPermissionsPage-DaUbhwgn.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-Oy4tmUrW.js → NoPermissionsPage-DzKfa6Jp.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-Oy4tmUrW.js.map → NoPermissionsPage-DzKfa6Jp.js.map} +1 -1
- package/dist/_chunks/Preview-DfMsSYsj.js +286 -0
- package/dist/_chunks/Preview-DfMsSYsj.js.map +1 -0
- package/dist/_chunks/Preview-KmWscqhk.mjs +267 -0
- package/dist/_chunks/Preview-KmWscqhk.mjs.map +1 -0
- package/dist/_chunks/{Relations-BBmhcWFV.mjs → Relations-7f9zi6m0.mjs} +6 -3
- package/dist/_chunks/Relations-7f9zi6m0.mjs.map +1 -0
- package/dist/_chunks/{Relations-eG-9p_qS.js → Relations-DvizPJ_G.js} +6 -3
- package/dist/_chunks/Relations-DvizPJ_G.js.map +1 -0
- package/dist/_chunks/{en-DKV44jRb.mjs → en-CfIXaZf9.mjs} +14 -3
- package/dist/_chunks/{en-DKV44jRb.mjs.map → en-CfIXaZf9.mjs.map} +1 -1
- package/dist/_chunks/{en-Bm0D0IWz.js → en-DTWPCdTS.js} +14 -3
- package/dist/_chunks/{en-Bm0D0IWz.js.map → en-DTWPCdTS.js.map} +1 -1
- package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
- package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
- package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
- package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
- package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
- package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
- package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
- package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
- package/dist/_chunks/{index-BIWDoFLK.js → index-Bi9g8evM.js} +147 -74
- package/dist/_chunks/index-Bi9g8evM.js.map +1 -0
- package/dist/_chunks/{index-BrUzbQ30.mjs → index-Dh8PRBs6.mjs} +151 -78
- package/dist/_chunks/index-Dh8PRBs6.mjs.map +1 -0
- package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
- package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
- package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
- package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
- package/dist/_chunks/{layout-lMc9i1-Z.js → layout-B5gVWKG8.js} +3 -3
- package/dist/_chunks/{layout-lMc9i1-Z.js.map → layout-B5gVWKG8.js.map} +1 -1
- package/dist/_chunks/{layout-_5-cXs34.mjs → layout-BUFUpPWR.mjs} +3 -3
- package/dist/_chunks/{layout-_5-cXs34.mjs.map → layout-BUFUpPWR.mjs.map} +1 -1
- package/dist/_chunks/{relations-BRHithi8.js → relations-BUm40kVE.js} +6 -3
- package/dist/_chunks/relations-BUm40kVE.js.map +1 -0
- package/dist/_chunks/{relations-B_VLk-DD.mjs → relations-CDnV9k0m.mjs} +6 -3
- package/dist/_chunks/relations-CDnV9k0m.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +4 -4
- package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
- package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
- package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
- package/dist/admin/src/preview/index.d.ts +1 -1
- package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
- package/dist/admin/src/preview/routes.d.ts +3 -0
- package/dist/admin/src/preview/services/preview.d.ts +3 -0
- package/dist/admin/src/router.d.ts +1 -1
- package/dist/server/index.js +344 -136
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +345 -137
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/history/services/utils.d.ts +2 -3
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/preview/controllers/index.d.ts +2 -0
- package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/preview.d.ts +13 -0
- package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
- package/dist/server/src/preview/index.d.ts.map +1 -1
- package/dist/server/src/preview/routes/index.d.ts +8 -0
- package/dist/server/src/preview/routes/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/preview.d.ts +4 -0
- package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
- package/dist/server/src/preview/services/index.d.ts +16 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview-config.d.ts +32 -0
- package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview.d.ts +12 -0
- package/dist/server/src/preview/services/preview.d.ts.map +1 -0
- package/dist/server/src/preview/utils.d.ts +19 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -0
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/services/document-manager.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/shared/contracts/index.d.ts +1 -0
- package/dist/shared/contracts/index.d.ts.map +1 -1
- package/dist/shared/contracts/preview.d.ts +27 -0
- package/dist/shared/contracts/preview.d.ts.map +1 -0
- package/dist/shared/index.js +4 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs +4 -0
- package/dist/shared/index.mjs.map +1 -1
- package/package.json +10 -10
- package/dist/_chunks/EditViewPage-C4iTxUPU.js.map +0 -1
- package/dist/_chunks/EditViewPage-CiwVPMaK.mjs.map +0 -1
- package/dist/_chunks/Field-DIjL1b5d.mjs.map +0 -1
- package/dist/_chunks/Field-DhXEK8y1.js.map +0 -1
- package/dist/_chunks/History-BLCCNgCt.js.map +0 -1
- package/dist/_chunks/History-D-99Wh30.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-DxWpeZrO.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-JPWZz7Kg.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-CIQekSFz.js.map +0 -1
- package/dist/_chunks/ListViewPage-DSK3f0ST.mjs.map +0 -1
- package/dist/_chunks/Relations-BBmhcWFV.mjs.map +0 -1
- package/dist/_chunks/Relations-eG-9p_qS.js.map +0 -1
- package/dist/_chunks/index-BIWDoFLK.js.map +0 -1
- package/dist/_chunks/index-BrUzbQ30.mjs.map +0 -1
- package/dist/_chunks/relations-BRHithi8.js.map +0 -1
- package/dist/_chunks/relations-B_VLk-DD.mjs.map +0 -1
@@ -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 {
|
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) => {
|
@@ -271,7 +271,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
271
271
|
*/
|
272
272
|
getAllDocuments: builder.query({
|
273
273
|
query: ({ model, params }) => ({
|
274
|
-
url: `/content-manager/collection-types/${model}
|
274
|
+
url: `/content-manager/collection-types/${model}`,
|
275
275
|
method: "GET",
|
276
276
|
config: {
|
277
277
|
params
|
@@ -1663,10 +1663,10 @@ const useDocumentActions = () => {
|
|
1663
1663
|
update
|
1664
1664
|
};
|
1665
1665
|
};
|
1666
|
-
const ProtectedHistoryPage = lazy(
|
1667
|
-
() => import("./History-
|
1666
|
+
const ProtectedHistoryPage = React.lazy(
|
1667
|
+
() => import("./History-HLNHu2qZ.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1668
1668
|
);
|
1669
|
-
const routes$
|
1669
|
+
const routes$2 = [
|
1670
1670
|
{
|
1671
1671
|
path: ":collectionType/:slug/:id/history",
|
1672
1672
|
Component: ProtectedHistoryPage
|
@@ -1676,32 +1676,45 @@ const routes$1 = [
|
|
1676
1676
|
Component: ProtectedHistoryPage
|
1677
1677
|
}
|
1678
1678
|
];
|
1679
|
+
const ProtectedPreviewPage = React.lazy(
|
1680
|
+
() => import("./Preview-KmWscqhk.mjs").then((mod) => ({ default: mod.ProtectedPreviewPage }))
|
1681
|
+
);
|
1682
|
+
const routes$1 = [
|
1683
|
+
{
|
1684
|
+
path: ":collectionType/:slug/:id/preview",
|
1685
|
+
Component: ProtectedPreviewPage
|
1686
|
+
},
|
1687
|
+
{
|
1688
|
+
path: ":collectionType/:slug/preview",
|
1689
|
+
Component: ProtectedPreviewPage
|
1690
|
+
}
|
1691
|
+
];
|
1679
1692
|
const ProtectedEditViewPage = lazy(
|
1680
|
-
() => import("./EditViewPage-
|
1693
|
+
() => import("./EditViewPage-HR-LggHQ.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1681
1694
|
);
|
1682
1695
|
const ProtectedListViewPage = lazy(
|
1683
|
-
() => import("./ListViewPage-
|
1696
|
+
() => import("./ListViewPage-DmNN9hbm.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1684
1697
|
);
|
1685
1698
|
const ProtectedListConfiguration = lazy(
|
1686
|
-
() => import("./ListConfigurationPage-
|
1699
|
+
() => import("./ListConfigurationPage-CdZ3dURz.mjs").then((mod) => ({
|
1687
1700
|
default: mod.ProtectedListConfiguration
|
1688
1701
|
}))
|
1689
1702
|
);
|
1690
1703
|
const ProtectedEditConfigurationPage = lazy(
|
1691
|
-
() => import("./EditConfigurationPage-
|
1704
|
+
() => import("./EditConfigurationPage-dpdSMBbB.mjs").then((mod) => ({
|
1692
1705
|
default: mod.ProtectedEditConfigurationPage
|
1693
1706
|
}))
|
1694
1707
|
);
|
1695
1708
|
const ProtectedComponentConfigurationPage = lazy(
|
1696
|
-
() => import("./ComponentConfigurationPage-
|
1709
|
+
() => import("./ComponentConfigurationPage-DITz-KUa.mjs").then((mod) => ({
|
1697
1710
|
default: mod.ProtectedComponentConfigurationPage
|
1698
1711
|
}))
|
1699
1712
|
);
|
1700
1713
|
const NoPermissions = lazy(
|
1701
|
-
() => import("./NoPermissionsPage-
|
1714
|
+
() => import("./NoPermissionsPage-DaUbhwgn.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1702
1715
|
);
|
1703
1716
|
const NoContentType = lazy(
|
1704
|
-
() => import("./NoContentTypePage-
|
1717
|
+
() => import("./NoContentTypePage-Bn5ihosL.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1705
1718
|
);
|
1706
1719
|
const CollectionTypePages = () => {
|
1707
1720
|
const { collectionType } = useParams();
|
@@ -1713,7 +1726,7 @@ const CollectionTypePages = () => {
|
|
1713
1726
|
const CLONE_RELATIVE_PATH = ":collectionType/:slug/clone/:origin";
|
1714
1727
|
const CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;
|
1715
1728
|
const LIST_RELATIVE_PATH = ":collectionType/:slug";
|
1716
|
-
const LIST_PATH = `/content-manager
|
1729
|
+
const LIST_PATH = `/content-manager/collection-types/:slug`;
|
1717
1730
|
const routes = [
|
1718
1731
|
{
|
1719
1732
|
path: LIST_RELATIVE_PATH,
|
@@ -1747,6 +1760,7 @@ const routes = [
|
|
1747
1760
|
path: "no-content-types",
|
1748
1761
|
Component: NoContentType
|
1749
1762
|
},
|
1763
|
+
...routes$2,
|
1750
1764
|
...routes$1
|
1751
1765
|
];
|
1752
1766
|
const DocumentActions = ({ actions: actions2 }) => {
|
@@ -1845,6 +1859,11 @@ const DocumentActionButton = (action) => {
|
|
1845
1859
|
) : null
|
1846
1860
|
] });
|
1847
1861
|
};
|
1862
|
+
const MenuItem = styled(Menu.Item)`
|
1863
|
+
&:hover {
|
1864
|
+
background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
|
1865
|
+
}
|
1866
|
+
`;
|
1848
1867
|
const DocumentActionsMenu = ({
|
1849
1868
|
actions: actions2,
|
1850
1869
|
children,
|
@@ -1903,48 +1922,32 @@ const DocumentActionsMenu = ({
|
|
1903
1922
|
/* @__PURE__ */ jsxs(Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1904
1923
|
actions2.map((action) => {
|
1905
1924
|
return /* @__PURE__ */ jsx(
|
1906
|
-
|
1925
|
+
MenuItem,
|
1907
1926
|
{
|
1908
1927
|
disabled: action.disabled,
|
1909
1928
|
onSelect: handleClick(action),
|
1910
1929
|
display: "block",
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
Flex,
|
1933
|
-
{
|
1934
|
-
alignItems: "center",
|
1935
|
-
background: "alternative100",
|
1936
|
-
borderStyle: "solid",
|
1937
|
-
borderColor: "alternative200",
|
1938
|
-
borderWidth: "1px",
|
1939
|
-
height: 5,
|
1940
|
-
paddingLeft: 2,
|
1941
|
-
paddingRight: 2,
|
1942
|
-
hasRadius: true,
|
1943
|
-
color: "alternative600",
|
1944
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", fontWeight: "bold", lineHeight: 1, children: formatMessage({ id: "global.new", defaultMessage: "New" }) })
|
1945
|
-
}
|
1946
|
-
)
|
1947
|
-
] })
|
1930
|
+
isVariantDanger: action.variant === "danger",
|
1931
|
+
isDisabled: action.disabled,
|
1932
|
+
children: /* @__PURE__ */ jsx(Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxs(
|
1933
|
+
Flex,
|
1934
|
+
{
|
1935
|
+
color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
|
1936
|
+
gap: 2,
|
1937
|
+
tag: "span",
|
1938
|
+
children: [
|
1939
|
+
/* @__PURE__ */ jsx(
|
1940
|
+
Flex,
|
1941
|
+
{
|
1942
|
+
tag: "span",
|
1943
|
+
color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
|
1944
|
+
children: action.icon
|
1945
|
+
}
|
1946
|
+
),
|
1947
|
+
action.label
|
1948
|
+
]
|
1949
|
+
}
|
1950
|
+
) })
|
1948
1951
|
},
|
1949
1952
|
action.id
|
1950
1953
|
);
|
@@ -2270,7 +2273,7 @@ const UpdateAction = ({
|
|
2270
2273
|
*/
|
2271
2274
|
disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
|
2272
2275
|
label: formatMessage({
|
2273
|
-
id: "
|
2276
|
+
id: "global.save",
|
2274
2277
|
defaultMessage: "Save"
|
2275
2278
|
}),
|
2276
2279
|
onClick: async () => {
|
@@ -2535,7 +2538,7 @@ const RelativeTime = React.forwardRef(
|
|
2535
2538
|
});
|
2536
2539
|
const unit = intervals.find((intervalUnit) => {
|
2537
2540
|
return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
|
2538
|
-
});
|
2541
|
+
}) ?? "seconds";
|
2539
2542
|
const relativeTime = isPast(timestamp) ? -interval[unit] : interval[unit];
|
2540
2543
|
const customInterval = customIntervals.find(
|
2541
2544
|
(custom) => interval[custom.unit] < custom.threshold
|
@@ -2569,19 +2572,29 @@ const getDisplayName = ({
|
|
2569
2572
|
return email ?? "";
|
2570
2573
|
};
|
2571
2574
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2572
|
-
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2575
|
+
const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
|
2573
2576
|
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2574
|
-
|
2577
|
+
const { formatMessage } = useIntl();
|
2578
|
+
return /* @__PURE__ */ jsx(Status, { ...restProps, size, variant: statusVariant, children: /* @__PURE__ */ jsx(Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
|
2579
|
+
id: `content-manager.containers.List.${status}`,
|
2580
|
+
defaultMessage: capitalise(status)
|
2581
|
+
}) }) });
|
2575
2582
|
};
|
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, {})
|
@@ -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
|
-
|
3273
|
-
|
3274
|
-
|
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:
|
3951
|
+
onClick: handleOnClick,
|
3937
3952
|
disabled: (
|
3938
3953
|
/**
|
3939
3954
|
* The user is creating a new document.
|
@@ -4001,13 +4016,70 @@ const { setInitialData } = actions;
|
|
4001
4016
|
const reducer = combineReducers({
|
4002
4017
|
app: reducer$1
|
4003
4018
|
});
|
4019
|
+
const previewApi = contentManagerApi.injectEndpoints({
|
4020
|
+
endpoints: (builder) => ({
|
4021
|
+
getPreviewUrl: builder.query({
|
4022
|
+
query({ query, params }) {
|
4023
|
+
return {
|
4024
|
+
url: `/content-manager/preview/url/${params.contentType}`,
|
4025
|
+
method: "GET",
|
4026
|
+
config: {
|
4027
|
+
params: query
|
4028
|
+
}
|
4029
|
+
};
|
4030
|
+
}
|
4031
|
+
})
|
4032
|
+
})
|
4033
|
+
});
|
4034
|
+
const { useGetPreviewUrlQuery } = previewApi;
|
4035
|
+
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4036
|
+
const { formatMessage } = useIntl();
|
4037
|
+
const { trackUsage } = useTracking();
|
4038
|
+
const { pathname } = useLocation();
|
4039
|
+
const [{ query }] = useQueryParams();
|
4040
|
+
const { data, error } = useGetPreviewUrlQuery({
|
4041
|
+
params: {
|
4042
|
+
contentType: model
|
4043
|
+
},
|
4044
|
+
query: {
|
4045
|
+
documentId,
|
4046
|
+
locale: document?.locale,
|
4047
|
+
status: document?.status
|
4048
|
+
}
|
4049
|
+
});
|
4050
|
+
if (!data?.data?.url || error) {
|
4051
|
+
return null;
|
4052
|
+
}
|
4053
|
+
const trackNavigation = () => {
|
4054
|
+
const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
|
4055
|
+
trackUsage("willNavigate", { from: pathname, to: destinationPathname });
|
4056
|
+
};
|
4057
|
+
return {
|
4058
|
+
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4059
|
+
content: /* @__PURE__ */ jsx(Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsx(
|
4060
|
+
Button,
|
4061
|
+
{
|
4062
|
+
variant: "tertiary",
|
4063
|
+
tag: Link,
|
4064
|
+
to: { pathname: "preview", search: stringify(query, { encode: false }) },
|
4065
|
+
onClick: trackNavigation,
|
4066
|
+
flex: "auto",
|
4067
|
+
children: formatMessage({
|
4068
|
+
id: "content-manager.preview.panel.button",
|
4069
|
+
defaultMessage: "Open preview"
|
4070
|
+
})
|
4071
|
+
}
|
4072
|
+
) })
|
4073
|
+
};
|
4074
|
+
};
|
4004
4075
|
const FEATURE_ID = "preview";
|
4005
4076
|
const previewAdmin = {
|
4006
4077
|
bootstrap(app) {
|
4007
4078
|
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
4008
|
-
return
|
4079
|
+
return;
|
4009
4080
|
}
|
4010
|
-
|
4081
|
+
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4082
|
+
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4011
4083
|
}
|
4012
4084
|
};
|
4013
4085
|
const index = {
|
@@ -4029,7 +4101,7 @@ const index = {
|
|
4029
4101
|
app.router.addRoute({
|
4030
4102
|
path: "content-manager/*",
|
4031
4103
|
lazy: async () => {
|
4032
|
-
const { Layout } = await import("./layout-
|
4104
|
+
const { Layout } = await import("./layout-BUFUpPWR.mjs");
|
4033
4105
|
return {
|
4034
4106
|
Component: Layout
|
4035
4107
|
};
|
@@ -4049,7 +4121,7 @@ const index = {
|
|
4049
4121
|
async registerTrads({ locales }) {
|
4050
4122
|
const importedTrads = await Promise.all(
|
4051
4123
|
locales.map((locale) => {
|
4052
|
-
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-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 }) => {
|
4053
4125
|
return {
|
4054
4126
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4055
4127
|
locale
|
@@ -4076,9 +4148,10 @@ export {
|
|
4076
4148
|
HOOKS as H,
|
4077
4149
|
InjectionZone as I,
|
4078
4150
|
useDocument as J,
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4151
|
+
useGetPreviewUrlQuery as K,
|
4152
|
+
index as L,
|
4153
|
+
useContentManagerContext as M,
|
4154
|
+
useDocumentActions as N,
|
4082
4155
|
Panels as P,
|
4083
4156
|
RelativeTime as R,
|
4084
4157
|
SINGLE_TYPES as S,
|
@@ -4110,4 +4183,4 @@ export {
|
|
4110
4183
|
capitalise as y,
|
4111
4184
|
useUpdateContentTypeConfigurationMutation as z
|
4112
4185
|
};
|
4113
|
-
//# sourceMappingURL=index-
|
4186
|
+
//# sourceMappingURL=index-Dh8PRBs6.mjs.map
|