@strapi/content-manager 0.0.0-experimental.65b9961ce81496e349024ceb95be1d5946f2c429 → 0.0.0-experimental.702fcf7aec9be82c4485a8bd49e235293c37f022
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-CO977CPh.js → ComponentConfigurationPage-BaGEn2nd.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CO977CPh.js.map → ComponentConfigurationPage-BaGEn2nd.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CQroR9Qk.mjs → ComponentConfigurationPage-EIYRzIr6.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CQroR9Qk.mjs.map → ComponentConfigurationPage-EIYRzIr6.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BPgoE-kf.js → EditConfigurationPage-BQGdJb6Z.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BPgoE-kf.js.map → EditConfigurationPage-BQGdJb6Z.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-tVCJ5vWC.mjs → EditConfigurationPage-ByaNUj_q.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-tVCJ5vWC.mjs.map → EditConfigurationPage-ByaNUj_q.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-8mOu02ji.mjs → EditViewPage-BgeC8L9X.mjs} +38 -8
- package/dist/_chunks/EditViewPage-BgeC8L9X.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-BMVgUNOX.js → EditViewPage-s_qVLiC6.js} +37 -7
- package/dist/_chunks/EditViewPage-s_qVLiC6.js.map +1 -0
- package/dist/_chunks/{Field-CdSLKFQk.js → Field-0AdG2t0D.js} +27 -7
- package/dist/_chunks/Field-0AdG2t0D.js.map +1 -0
- package/dist/_chunks/{Field-CJPYzwD7.mjs → Field-DbpDop_h.mjs} +27 -7
- package/dist/_chunks/Field-DbpDop_h.mjs.map +1 -0
- package/dist/_chunks/{Form-eP5bZwap.js → Form-BpC9hWi-.js} +2 -2
- package/dist/_chunks/{Form-eP5bZwap.js.map → Form-BpC9hWi-.js.map} +1 -1
- package/dist/_chunks/{Form-DJOJ-GF1.mjs → Form-Xb-u04dn.mjs} +2 -2
- package/dist/_chunks/{Form-DJOJ-GF1.mjs.map → Form-Xb-u04dn.mjs.map} +1 -1
- package/dist/_chunks/{History-MnQLtk1g.mjs → History-DLl10NEN.mjs} +22 -92
- package/dist/_chunks/History-DLl10NEN.mjs.map +1 -0
- package/dist/_chunks/{History-B-Mrquzu.js → History-sJ61vusJ.js} +21 -91
- package/dist/_chunks/History-sJ61vusJ.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-C0n4rUzH.js → ListConfigurationPage-C00guBjQ.js} +4 -3
- package/dist/_chunks/ListConfigurationPage-C00guBjQ.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-BcycI8Lw.mjs → ListConfigurationPage-mbZQmEZ3.mjs} +5 -4
- package/dist/_chunks/ListConfigurationPage-mbZQmEZ3.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-q0SHVPUS.js → ListViewPage-DDVpN1ql.js} +28 -6
- package/dist/_chunks/ListViewPage-DDVpN1ql.js.map +1 -0
- package/dist/_chunks/{ListViewPage-CRXONXwZ.mjs → ListViewPage-iRJ5AUjS.mjs} +28 -6
- package/dist/_chunks/{ListViewPage-CRXONXwZ.mjs.map → ListViewPage-iRJ5AUjS.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Bh3komDV.js → NoContentTypePage-BvkII4H4.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-Bh3komDV.js.map → NoContentTypePage-BvkII4H4.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-ukzFRF3z.mjs → NoContentTypePage-DI8VWkVK.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-ukzFRF3z.mjs.map → NoContentTypePage-DI8VWkVK.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BGBpj_Y1.js → NoPermissionsPage-BZjHQTpb.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BGBpj_Y1.js.map → NoPermissionsPage-BZjHQTpb.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-B4sD7Ble.mjs → NoPermissionsPage-DckHN3oZ.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-B4sD7Ble.mjs.map → NoPermissionsPage-DckHN3oZ.mjs.map} +1 -1
- package/dist/_chunks/Preview-BDOUHeaW.mjs +267 -0
- package/dist/_chunks/Preview-BDOUHeaW.mjs.map +1 -0
- package/dist/_chunks/Preview-CS2aV-BU.js +286 -0
- package/dist/_chunks/Preview-CS2aV-BU.js.map +1 -0
- package/dist/_chunks/{Relations-B53wYe8g.js → Relations-DEIQO39t.js} +43 -16
- package/dist/_chunks/Relations-DEIQO39t.js.map +1 -0
- package/dist/_chunks/{Relations-CIexb8gr.mjs → Relations-J-8HC3zX.mjs} +44 -17
- package/dist/_chunks/Relations-J-8HC3zX.mjs.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-CJ2vYwuT.mjs → index-DzTs9ga-.mjs} +180 -81
- package/dist/_chunks/index-DzTs9ga-.mjs.map +1 -0
- package/dist/_chunks/{index-DbT2sx-Q.js → index-uXHSvmlw.js} +177 -77
- package/dist/_chunks/index-uXHSvmlw.js.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-vzKSrr7p.mjs → layout-BhIZkPuB.mjs} +3 -3
- package/dist/_chunks/{layout-vzKSrr7p.mjs.map → layout-BhIZkPuB.mjs.map} +1 -1
- package/dist/_chunks/{layout-CeBSIkmP.js → layout-zA_F2rU4.js} +3 -3
- package/dist/_chunks/{layout-CeBSIkmP.js.map → layout-zA_F2rU4.js.map} +1 -1
- package/dist/_chunks/{relations-DI0lguF0.mjs → relations-BoCufH_z.mjs} +6 -7
- package/dist/_chunks/relations-BoCufH_z.mjs.map +1 -0
- package/dist/_chunks/{relations-Cl-6t9iz.js → relations-DnUyZQaL.js} +6 -7
- package/dist/_chunks/relations-DnUyZQaL.js.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/constants.d.ts +1 -0
- package/dist/admin/src/preview/index.d.ts +4 -0
- 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 -144
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +344 -144
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
- package/dist/server/src/controllers/utils/metadata.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/index.d.ts +4 -4
- package/dist/server/src/preview/constants.d.ts +2 -0
- package/dist/server/src/preview/constants.d.ts.map +1 -0
- 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 +4 -0
- package/dist/server/src/preview/index.d.ts.map +1 -0
- 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 +15 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview-config.d.ts +30 -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 +18 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -0
- 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/document-metadata.d.ts +8 -8
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +4 -4
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
- package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
- package/dist/server/src/utils/index.d.ts +2 -0
- package/dist/server/src/utils/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-8mOu02ji.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-BMVgUNOX.js.map +0 -1
- package/dist/_chunks/Field-CJPYzwD7.mjs.map +0 -1
- package/dist/_chunks/Field-CdSLKFQk.js.map +0 -1
- package/dist/_chunks/History-B-Mrquzu.js.map +0 -1
- package/dist/_chunks/History-MnQLtk1g.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-BcycI8Lw.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-C0n4rUzH.js.map +0 -1
- package/dist/_chunks/ListViewPage-q0SHVPUS.js.map +0 -1
- package/dist/_chunks/Relations-B53wYe8g.js.map +0 -1
- package/dist/_chunks/Relations-CIexb8gr.mjs.map +0 -1
- package/dist/_chunks/index-CJ2vYwuT.mjs.map +0 -1
- package/dist/_chunks/index-DbT2sx-Q.js.map +0 -1
- package/dist/_chunks/relations-Cl-6t9iz.js.map +0 -1
- package/dist/_chunks/relations-DI0lguF0.mjs.map +0 -1
@@ -4,12 +4,13 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const strapiAdmin = require("@strapi/admin/strapi-admin");
|
5
5
|
const React = require("react");
|
6
6
|
const designSystem = require("@strapi/design-system");
|
7
|
+
const mapValues = require("lodash/fp/mapValues");
|
7
8
|
const reactIntl = require("react-intl");
|
8
9
|
const reactRouterDom = require("react-router-dom");
|
10
|
+
const styledComponents = require("styled-components");
|
9
11
|
const yup = require("yup");
|
10
12
|
const pipe = require("lodash/fp/pipe");
|
11
13
|
const dateFns = require("date-fns");
|
12
|
-
const styledComponents = require("styled-components");
|
13
14
|
const qs = require("qs");
|
14
15
|
const toolkit = require("@reduxjs/toolkit");
|
15
16
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
@@ -32,6 +33,7 @@ function _interopNamespace(e) {
|
|
32
33
|
return Object.freeze(n);
|
33
34
|
}
|
34
35
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
36
|
+
const mapValues__default = /* @__PURE__ */ _interopDefault(mapValues);
|
35
37
|
const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
|
36
38
|
const pipe__default = /* @__PURE__ */ _interopDefault(pipe);
|
37
39
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
@@ -989,9 +991,10 @@ const formatEditLayout = (data, {
|
|
989
991
|
currentPanelIndex += 2;
|
990
992
|
} else {
|
991
993
|
if (!panels[currentPanelIndex]) {
|
992
|
-
panels.push([]);
|
994
|
+
panels.push([row]);
|
995
|
+
} else {
|
996
|
+
panels[currentPanelIndex].push(row);
|
993
997
|
}
|
994
|
-
panels[currentPanelIndex].push(row);
|
995
998
|
}
|
996
999
|
return panels;
|
997
1000
|
}, []);
|
@@ -1682,10 +1685,10 @@ const useDocumentActions = () => {
|
|
1682
1685
|
update
|
1683
1686
|
};
|
1684
1687
|
};
|
1685
|
-
const ProtectedHistoryPage =
|
1686
|
-
() => Promise.resolve().then(() => require("./History-
|
1688
|
+
const ProtectedHistoryPage = React__namespace.lazy(
|
1689
|
+
() => Promise.resolve().then(() => require("./History-sJ61vusJ.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1687
1690
|
);
|
1688
|
-
const routes$
|
1691
|
+
const routes$2 = [
|
1689
1692
|
{
|
1690
1693
|
path: ":collectionType/:slug/:id/history",
|
1691
1694
|
Component: ProtectedHistoryPage
|
@@ -1695,32 +1698,45 @@ const routes$1 = [
|
|
1695
1698
|
Component: ProtectedHistoryPage
|
1696
1699
|
}
|
1697
1700
|
];
|
1701
|
+
const ProtectedPreviewPage = React__namespace.lazy(
|
1702
|
+
() => Promise.resolve().then(() => require("./Preview-CS2aV-BU.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
|
+
];
|
1698
1714
|
const ProtectedEditViewPage = React.lazy(
|
1699
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1715
|
+
() => Promise.resolve().then(() => require("./EditViewPage-s_qVLiC6.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1700
1716
|
);
|
1701
1717
|
const ProtectedListViewPage = React.lazy(
|
1702
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1718
|
+
() => Promise.resolve().then(() => require("./ListViewPage-DDVpN1ql.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1703
1719
|
);
|
1704
1720
|
const ProtectedListConfiguration = React.lazy(
|
1705
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1721
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-C00guBjQ.js")).then((mod) => ({
|
1706
1722
|
default: mod.ProtectedListConfiguration
|
1707
1723
|
}))
|
1708
1724
|
);
|
1709
1725
|
const ProtectedEditConfigurationPage = React.lazy(
|
1710
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1726
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-BQGdJb6Z.js")).then((mod) => ({
|
1711
1727
|
default: mod.ProtectedEditConfigurationPage
|
1712
1728
|
}))
|
1713
1729
|
);
|
1714
1730
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1715
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1731
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-BaGEn2nd.js")).then((mod) => ({
|
1716
1732
|
default: mod.ProtectedComponentConfigurationPage
|
1717
1733
|
}))
|
1718
1734
|
);
|
1719
1735
|
const NoPermissions = React.lazy(
|
1720
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1736
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-BZjHQTpb.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1721
1737
|
);
|
1722
1738
|
const NoContentType = React.lazy(
|
1723
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1739
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-BvkII4H4.js")).then((mod) => ({ default: mod.NoContentType }))
|
1724
1740
|
);
|
1725
1741
|
const CollectionTypePages = () => {
|
1726
1742
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1732,7 +1748,7 @@ const CollectionTypePages = () => {
|
|
1732
1748
|
const CLONE_RELATIVE_PATH = ":collectionType/:slug/clone/:origin";
|
1733
1749
|
const CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;
|
1734
1750
|
const LIST_RELATIVE_PATH = ":collectionType/:slug";
|
1735
|
-
const LIST_PATH = `/content-manager
|
1751
|
+
const LIST_PATH = `/content-manager/collection-types/:slug`;
|
1736
1752
|
const routes = [
|
1737
1753
|
{
|
1738
1754
|
path: LIST_RELATIVE_PATH,
|
@@ -1766,6 +1782,7 @@ const routes = [
|
|
1766
1782
|
path: "no-content-types",
|
1767
1783
|
Component: NoContentType
|
1768
1784
|
},
|
1785
|
+
...routes$2,
|
1769
1786
|
...routes$1
|
1770
1787
|
];
|
1771
1788
|
const DocumentActions = ({ actions: actions2 }) => {
|
@@ -1864,6 +1881,11 @@ const DocumentActionButton = (action) => {
|
|
1864
1881
|
) : null
|
1865
1882
|
] });
|
1866
1883
|
};
|
1884
|
+
const MenuItem = styledComponents.styled(designSystem.Menu.Item)`
|
1885
|
+
&:hover {
|
1886
|
+
background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
|
1887
|
+
}
|
1888
|
+
`;
|
1867
1889
|
const DocumentActionsMenu = ({
|
1868
1890
|
actions: actions2,
|
1869
1891
|
children,
|
@@ -1922,48 +1944,32 @@ const DocumentActionsMenu = ({
|
|
1922
1944
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1923
1945
|
actions2.map((action) => {
|
1924
1946
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
1925
|
-
|
1947
|
+
MenuItem,
|
1926
1948
|
{
|
1927
1949
|
disabled: action.disabled,
|
1928
1950
|
onSelect: handleClick(action),
|
1929
1951
|
display: "block",
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
designSystem.Flex,
|
1952
|
-
{
|
1953
|
-
alignItems: "center",
|
1954
|
-
background: "alternative100",
|
1955
|
-
borderStyle: "solid",
|
1956
|
-
borderColor: "alternative200",
|
1957
|
-
borderWidth: "1px",
|
1958
|
-
height: 5,
|
1959
|
-
paddingLeft: 2,
|
1960
|
-
paddingRight: 2,
|
1961
|
-
hasRadius: true,
|
1962
|
-
color: "alternative600",
|
1963
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", lineHeight: 1, children: formatMessage({ id: "global.new", defaultMessage: "New" }) })
|
1964
|
-
}
|
1965
|
-
)
|
1966
|
-
] })
|
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
|
+
) })
|
1967
1973
|
},
|
1968
1974
|
action.id
|
1969
1975
|
);
|
@@ -2074,6 +2080,18 @@ const DocumentActionModal = ({
|
|
2074
2080
|
typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
|
2075
2081
|
] }) });
|
2076
2082
|
};
|
2083
|
+
const transformData = (data) => {
|
2084
|
+
if (Array.isArray(data)) {
|
2085
|
+
return data.map(transformData);
|
2086
|
+
}
|
2087
|
+
if (typeof data === "object" && data !== null) {
|
2088
|
+
if ("apiData" in data) {
|
2089
|
+
return data.apiData;
|
2090
|
+
}
|
2091
|
+
return mapValues__default.default(transformData)(data);
|
2092
|
+
}
|
2093
|
+
return data;
|
2094
|
+
};
|
2077
2095
|
const PublishAction$1 = ({
|
2078
2096
|
activeTab,
|
2079
2097
|
documentId,
|
@@ -2187,7 +2205,7 @@ const PublishAction$1 = ({
|
|
2187
2205
|
documentId,
|
2188
2206
|
params
|
2189
2207
|
},
|
2190
|
-
formValues
|
2208
|
+
transformData(formValues)
|
2191
2209
|
);
|
2192
2210
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2193
2211
|
navigate({
|
@@ -2303,7 +2321,7 @@ const UpdateAction = ({
|
|
2303
2321
|
documentId: cloneMatch.params.origin,
|
2304
2322
|
params
|
2305
2323
|
},
|
2306
|
-
document
|
2324
|
+
transformData(document)
|
2307
2325
|
);
|
2308
2326
|
if ("data" in res) {
|
2309
2327
|
navigate(
|
@@ -2324,7 +2342,7 @@ const UpdateAction = ({
|
|
2324
2342
|
documentId,
|
2325
2343
|
params
|
2326
2344
|
},
|
2327
|
-
document
|
2345
|
+
transformData(document)
|
2328
2346
|
);
|
2329
2347
|
if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2330
2348
|
setErrors(formatValidationErrors(res.error));
|
@@ -2337,7 +2355,7 @@ const UpdateAction = ({
|
|
2337
2355
|
model,
|
2338
2356
|
params
|
2339
2357
|
},
|
2340
|
-
document
|
2358
|
+
transformData(document)
|
2341
2359
|
);
|
2342
2360
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2343
2361
|
navigate(
|
@@ -2542,7 +2560,7 @@ const RelativeTime = React__namespace.forwardRef(
|
|
2542
2560
|
});
|
2543
2561
|
const unit = intervals.find((intervalUnit) => {
|
2544
2562
|
return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
|
2545
|
-
});
|
2563
|
+
}) ?? "seconds";
|
2546
2564
|
const relativeTime = dateFns.isPast(timestamp) ? -interval[unit] : interval[unit];
|
2547
2565
|
const customInterval = customIntervals.find(
|
2548
2566
|
(custom) => interval[custom.unit] < custom.threshold
|
@@ -2576,19 +2594,29 @@ const getDisplayName = ({
|
|
2576
2594
|
return email ?? "";
|
2577
2595
|
};
|
2578
2596
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2579
|
-
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2597
|
+
const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
|
2580
2598
|
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2581
|
-
|
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
|
+
}) }) });
|
2582
2604
|
};
|
2583
2605
|
const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
|
2584
2606
|
const { formatMessage } = reactIntl.useIntl();
|
2585
2607
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
2608
|
+
const params = reactRouterDom.useParams();
|
2586
2609
|
const title = isCreating ? formatMessage({
|
2587
2610
|
id: "content-manager.containers.edit.title.new",
|
2588
2611
|
defaultMessage: "Create an entry"
|
2589
2612
|
}) : documentTitle;
|
2590
2613
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
|
2591
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
2614
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
2615
|
+
strapiAdmin.BackButton,
|
2616
|
+
{
|
2617
|
+
fallback: params.collectionType === SINGLE_TYPES ? void 0 : `../${COLLECTION_TYPES}/${params.slug}`
|
2618
|
+
}
|
2619
|
+
),
|
2592
2620
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
|
2593
2621
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
|
2594
2622
|
/* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
|
@@ -3025,7 +3053,7 @@ const Panel = React__namespace.forwardRef(({ children, title }, ref) => {
|
|
3025
3053
|
justifyContent: "stretch",
|
3026
3054
|
alignItems: "flex-start",
|
3027
3055
|
children: [
|
3028
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", children: title }),
|
3056
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", textColor: "neutral600", children: title }),
|
3029
3057
|
children
|
3030
3058
|
]
|
3031
3059
|
}
|
@@ -3275,18 +3303,10 @@ const SelectedEntriesTableContent = ({
|
|
3275
3303
|
search: row.locale && `?plugins[i18n][locale]=${row.locale}`
|
3276
3304
|
},
|
3277
3305
|
state: { from: pathname },
|
3278
|
-
label: formatMessage(
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3282
|
-
{
|
3283
|
-
id: "content-manager.components.ListViewHelperPluginTable.row-line",
|
3284
|
-
defaultMessage: "item line {number}"
|
3285
|
-
},
|
3286
|
-
{ number: index2 + 1 }
|
3287
|
-
)
|
3288
|
-
}
|
3289
|
-
),
|
3306
|
+
label: formatMessage({
|
3307
|
+
id: "content-manager.bulk-publish.edit",
|
3308
|
+
defaultMessage: "Edit"
|
3309
|
+
}),
|
3290
3310
|
target: "_blank",
|
3291
3311
|
marginLeft: "auto",
|
3292
3312
|
variant: "ghost",
|
@@ -3930,17 +3950,27 @@ const HistoryAction = ({ model, document }) => {
|
|
3930
3950
|
const { formatMessage } = reactIntl.useIntl();
|
3931
3951
|
const [{ query }] = strapiAdmin.useQueryParams();
|
3932
3952
|
const navigate = reactRouterDom.useNavigate();
|
3953
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
3954
|
+
const { pathname } = reactRouterDom.useLocation();
|
3933
3955
|
const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
|
3934
3956
|
if (!window.strapi.features.isEnabled("cms-content-history")) {
|
3935
3957
|
return null;
|
3936
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
|
+
};
|
3937
3967
|
return {
|
3938
3968
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
|
3939
3969
|
label: formatMessage({
|
3940
3970
|
id: "content-manager.history.document-action",
|
3941
3971
|
defaultMessage: "Content History"
|
3942
3972
|
}),
|
3943
|
-
onClick:
|
3973
|
+
onClick: handleOnClick,
|
3944
3974
|
disabled: (
|
3945
3975
|
/**
|
3946
3976
|
* The user is creating a new document.
|
@@ -4008,6 +4038,72 @@ const { setInitialData } = actions;
|
|
4008
4038
|
const reducer = toolkit.combineReducers({
|
4009
4039
|
app: reducer$1
|
4010
4040
|
});
|
4041
|
+
const previewApi = contentManagerApi.injectEndpoints({
|
4042
|
+
endpoints: (builder) => ({
|
4043
|
+
getPreviewUrl: builder.query({
|
4044
|
+
query({ query, params }) {
|
4045
|
+
return {
|
4046
|
+
url: `/content-manager/preview/url/${params.contentType}`,
|
4047
|
+
method: "GET",
|
4048
|
+
config: {
|
4049
|
+
params: query
|
4050
|
+
}
|
4051
|
+
};
|
4052
|
+
}
|
4053
|
+
})
|
4054
|
+
})
|
4055
|
+
});
|
4056
|
+
const { useGetPreviewUrlQuery } = previewApi;
|
4057
|
+
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4058
|
+
const { formatMessage } = reactIntl.useIntl();
|
4059
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
4060
|
+
const { pathname } = reactRouterDom.useLocation();
|
4061
|
+
const [{ query }] = strapiAdmin.useQueryParams();
|
4062
|
+
const { data, error } = useGetPreviewUrlQuery({
|
4063
|
+
params: {
|
4064
|
+
contentType: model
|
4065
|
+
},
|
4066
|
+
query: {
|
4067
|
+
documentId,
|
4068
|
+
locale: document?.locale,
|
4069
|
+
status: document?.status
|
4070
|
+
}
|
4071
|
+
});
|
4072
|
+
if (!data?.data?.url || error) {
|
4073
|
+
return null;
|
4074
|
+
}
|
4075
|
+
const trackNavigation = () => {
|
4076
|
+
const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
|
4077
|
+
trackUsage("willNavigate", { from: pathname, to: destinationPathname });
|
4078
|
+
};
|
4079
|
+
return {
|
4080
|
+
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4081
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
|
4082
|
+
designSystem.Button,
|
4083
|
+
{
|
4084
|
+
variant: "tertiary",
|
4085
|
+
tag: reactRouterDom.Link,
|
4086
|
+
to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
|
4087
|
+
onClick: trackNavigation,
|
4088
|
+
flex: "auto",
|
4089
|
+
children: formatMessage({
|
4090
|
+
id: "content-manager.preview.panel.button",
|
4091
|
+
defaultMessage: "Open preview"
|
4092
|
+
})
|
4093
|
+
}
|
4094
|
+
) })
|
4095
|
+
};
|
4096
|
+
};
|
4097
|
+
const FEATURE_ID = "preview";
|
4098
|
+
const previewAdmin = {
|
4099
|
+
bootstrap(app) {
|
4100
|
+
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
4101
|
+
return;
|
4102
|
+
}
|
4103
|
+
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4104
|
+
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4105
|
+
}
|
4106
|
+
};
|
4011
4107
|
const index = {
|
4012
4108
|
register(app) {
|
4013
4109
|
const cm = new ContentManagerPlugin();
|
@@ -4027,7 +4123,7 @@ const index = {
|
|
4027
4123
|
app.router.addRoute({
|
4028
4124
|
path: "content-manager/*",
|
4029
4125
|
lazy: async () => {
|
4030
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4126
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-zA_F2rU4.js"));
|
4031
4127
|
return {
|
4032
4128
|
Component: Layout
|
4033
4129
|
};
|
@@ -4040,11 +4136,14 @@ const index = {
|
|
4040
4136
|
if (typeof historyAdmin.bootstrap === "function") {
|
4041
4137
|
historyAdmin.bootstrap(app);
|
4042
4138
|
}
|
4139
|
+
if (typeof previewAdmin.bootstrap === "function") {
|
4140
|
+
previewAdmin.bootstrap(app);
|
4141
|
+
}
|
4043
4142
|
},
|
4044
4143
|
async registerTrads({ locales }) {
|
4045
4144
|
const importedTrads = await Promise.all(
|
4046
4145
|
locales.map((locale) => {
|
4047
|
-
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-
|
4146
|
+
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 }) => {
|
4048
4147
|
return {
|
4049
4148
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4050
4149
|
locale
|
@@ -4102,5 +4201,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
|
|
4102
4201
|
exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
4103
4202
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
4104
4203
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4204
|
+
exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
|
4105
4205
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4106
|
-
//# sourceMappingURL=index-
|
4206
|
+
//# sourceMappingURL=index-uXHSvmlw.js.map
|