@strapi/content-manager 0.0.0-next.6d1431fe2a53b80b47ad9f00187cd7bae9d5f46b → 0.0.0-next.72ea34aaac6f60a1e1b8041850c21bed9eceb064
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-BXrB6Fyz.js → ComponentConfigurationPage-ClKl_TA2.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BXrB6Fyz.js.map → ComponentConfigurationPage-ClKl_TA2.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CS4dK8sJ.mjs → ComponentConfigurationPage-D3ZWDAHG.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CS4dK8sJ.mjs.map → ComponentConfigurationPage-D3ZWDAHG.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-KPmdp3nZ.mjs → EditConfigurationPage-BYCBSJxP.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-KPmdp3nZ.mjs.map → EditConfigurationPage-BYCBSJxP.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BFrTf6Wt.js → EditConfigurationPage-OWez0Kxp.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BFrTf6Wt.js.map → EditConfigurationPage-OWez0Kxp.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-BnPxp-t3.mjs → EditViewPage-5pdbvsO_.mjs} +37 -7
- package/dist/_chunks/EditViewPage-5pdbvsO_.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-CCj-eG0Y.js → EditViewPage-BEs5iGDi.js} +36 -6
- package/dist/_chunks/EditViewPage-BEs5iGDi.js.map +1 -0
- package/dist/_chunks/{Field-SRNzJb2F.js → Field-DNHm4wHx.js} +41 -22
- package/dist/_chunks/Field-DNHm4wHx.js.map +1 -0
- package/dist/_chunks/{Field-DSDtEDLU.mjs → Field-DcKuFHYK.mjs} +41 -22
- package/dist/_chunks/Field-DcKuFHYK.mjs.map +1 -0
- package/dist/_chunks/{Form-C8z5hjjO.mjs → Form-CGwM_-5c.mjs} +2 -2
- package/dist/_chunks/{Form-C8z5hjjO.mjs.map → Form-CGwM_-5c.mjs.map} +1 -1
- package/dist/_chunks/{Form-DbQ4gxkw.js → Form-CoRxWJOz.js} +2 -2
- package/dist/_chunks/{Form-DbQ4gxkw.js.map → Form-CoRxWJOz.js.map} +1 -1
- package/dist/_chunks/{History-C23owO-n.js → History-BcUTQrfG.js} +7 -55
- package/dist/_chunks/History-BcUTQrfG.js.map +1 -0
- package/dist/_chunks/{History-CuPXsYZL.mjs → History-DEvr3Q_V.mjs} +8 -56
- package/dist/_chunks/History-DEvr3Q_V.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-CyfKtibC.js → ListConfigurationPage-BE_Ho7tV.js} +4 -3
- package/dist/_chunks/ListConfigurationPage-BE_Ho7tV.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-ChKIEXi-.mjs → ListConfigurationPage-BM4zZZcM.mjs} +5 -4
- package/dist/_chunks/ListConfigurationPage-BM4zZZcM.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-BicHoHdt.mjs → ListViewPage-BK2mkrql.mjs} +16 -5
- package/dist/_chunks/{ListViewPage-BicHoHdt.mjs.map → ListViewPage-BK2mkrql.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-BLcdkiiW.js → ListViewPage-BkT8Eao0.js} +16 -5
- package/dist/_chunks/{ListViewPage-BLcdkiiW.js.map → ListViewPage-BkT8Eao0.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Clby61Hd.mjs → NoContentTypePage-BvcAutu9.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-Clby61Hd.mjs.map → NoContentTypePage-BvcAutu9.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-D9NSOYTF.js → NoContentTypePage-C8mtyc4H.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-D9NSOYTF.js.map → NoContentTypePage-C8mtyc4H.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CPcXGv0N.js → NoPermissionsPage-B5Y9Y78B.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CPcXGv0N.js.map → NoPermissionsPage-B5Y9Y78B.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DD72Qxzx.mjs → NoPermissionsPage-BmbRz7PR.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DD72Qxzx.mjs.map → NoPermissionsPage-BmbRz7PR.mjs.map} +1 -1
- package/dist/_chunks/Preview-BF8ZDYqS.js +286 -0
- package/dist/_chunks/Preview-BF8ZDYqS.js.map +1 -0
- package/dist/_chunks/Preview-DcexhKJE.mjs +267 -0
- package/dist/_chunks/Preview-DcexhKJE.mjs.map +1 -0
- package/dist/_chunks/{Relations-mHVb9pZH.js → Relations-BKnoK1R0.js} +3 -3
- package/dist/_chunks/{Relations-mHVb9pZH.js.map → Relations-BKnoK1R0.js.map} +1 -1
- package/dist/_chunks/{Relations-BK3w1JyT.mjs → Relations-BjIzc4EK.mjs} +3 -3
- package/dist/_chunks/{Relations-BK3w1JyT.mjs.map → Relations-BjIzc4EK.mjs.map} +1 -1
- package/dist/_chunks/{en-pIGSfG2_.mjs → en-CfIXaZf9.mjs} +7 -2
- package/dist/_chunks/{en-pIGSfG2_.mjs.map → en-CfIXaZf9.mjs.map} +1 -1
- package/dist/_chunks/{en-tanszW-q.js → en-DTWPCdTS.js} +7 -2
- package/dist/_chunks/{en-tanszW-q.js.map → en-DTWPCdTS.js.map} +1 -1
- package/dist/_chunks/{index-Bl3BGqcN.mjs → index-BW-rXkjn.mjs} +77 -74
- package/dist/_chunks/index-BW-rXkjn.mjs.map +1 -0
- package/dist/_chunks/{index-KzSpgsQa.js → index-DOzAG2cq.js} +76 -73
- package/dist/_chunks/index-DOzAG2cq.js.map +1 -0
- package/dist/_chunks/{layout-DFhUhimv.mjs → layout-DFVbgjp2.mjs} +3 -3
- package/dist/_chunks/{layout-DFhUhimv.mjs.map → layout-DFVbgjp2.mjs.map} +1 -1
- package/dist/_chunks/{layout-CKU3YxH7.js → layout-RC3W2obV.js} +3 -3
- package/dist/_chunks/{layout-CKU3YxH7.js.map → layout-RC3W2obV.js.map} +1 -1
- package/dist/_chunks/{relations-KkpGHlgm.mjs → relations-Dogh8HWI.mjs} +2 -2
- package/dist/_chunks/{relations-KkpGHlgm.mjs.map → relations-Dogh8HWI.mjs.map} +1 -1
- package/dist/_chunks/{relations-CnyTxXmA.js → relations-zam7-5H7.js} +2 -2
- package/dist/_chunks/{relations-CnyTxXmA.js.map → relations-zam7-5H7.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- 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/router.d.ts +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/services/document-manager.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/_chunks/EditViewPage-BnPxp-t3.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-CCj-eG0Y.js.map +0 -1
- package/dist/_chunks/Field-DSDtEDLU.mjs.map +0 -1
- package/dist/_chunks/Field-SRNzJb2F.js.map +0 -1
- package/dist/_chunks/History-C23owO-n.js.map +0 -1
- package/dist/_chunks/History-CuPXsYZL.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-ChKIEXi-.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-CyfKtibC.js.map +0 -1
- package/dist/_chunks/Preview-DcrNJ6zU.mjs +0 -122
- package/dist/_chunks/Preview-DcrNJ6zU.mjs.map +0 -1
- package/dist/_chunks/Preview-DpB7tlma.js +0 -141
- package/dist/_chunks/Preview-DpB7tlma.js.map +0 -1
- package/dist/_chunks/index-Bl3BGqcN.mjs.map +0 -1
- package/dist/_chunks/index-KzSpgsQa.js.map +0 -1
@@ -7,10 +7,10 @@ const designSystem = require("@strapi/design-system");
|
|
7
7
|
const mapValues = require("lodash/fp/mapValues");
|
8
8
|
const reactIntl = require("react-intl");
|
9
9
|
const reactRouterDom = require("react-router-dom");
|
10
|
+
const styledComponents = require("styled-components");
|
10
11
|
const yup = require("yup");
|
11
12
|
const pipe = require("lodash/fp/pipe");
|
12
13
|
const dateFns = require("date-fns");
|
13
|
-
const styledComponents = require("styled-components");
|
14
14
|
const qs = require("qs");
|
15
15
|
const toolkit = require("@reduxjs/toolkit");
|
16
16
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
@@ -1686,7 +1686,7 @@ const useDocumentActions = () => {
|
|
1686
1686
|
};
|
1687
1687
|
};
|
1688
1688
|
const ProtectedHistoryPage = React__namespace.lazy(
|
1689
|
-
() => Promise.resolve().then(() => require("./History-
|
1689
|
+
() => Promise.resolve().then(() => require("./History-BcUTQrfG.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1690
1690
|
);
|
1691
1691
|
const routes$2 = [
|
1692
1692
|
{
|
@@ -1699,7 +1699,7 @@ const routes$2 = [
|
|
1699
1699
|
}
|
1700
1700
|
];
|
1701
1701
|
const ProtectedPreviewPage = React__namespace.lazy(
|
1702
|
-
() => Promise.resolve().then(() => require("./Preview-
|
1702
|
+
() => Promise.resolve().then(() => require("./Preview-BF8ZDYqS.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
|
1703
1703
|
);
|
1704
1704
|
const routes$1 = [
|
1705
1705
|
{
|
@@ -1712,31 +1712,31 @@ const routes$1 = [
|
|
1712
1712
|
}
|
1713
1713
|
];
|
1714
1714
|
const ProtectedEditViewPage = React.lazy(
|
1715
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1715
|
+
() => Promise.resolve().then(() => require("./EditViewPage-BEs5iGDi.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1716
1716
|
);
|
1717
1717
|
const ProtectedListViewPage = React.lazy(
|
1718
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1718
|
+
() => Promise.resolve().then(() => require("./ListViewPage-BkT8Eao0.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1719
1719
|
);
|
1720
1720
|
const ProtectedListConfiguration = React.lazy(
|
1721
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1721
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-BE_Ho7tV.js")).then((mod) => ({
|
1722
1722
|
default: mod.ProtectedListConfiguration
|
1723
1723
|
}))
|
1724
1724
|
);
|
1725
1725
|
const ProtectedEditConfigurationPage = React.lazy(
|
1726
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1726
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-OWez0Kxp.js")).then((mod) => ({
|
1727
1727
|
default: mod.ProtectedEditConfigurationPage
|
1728
1728
|
}))
|
1729
1729
|
);
|
1730
1730
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1731
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1731
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-ClKl_TA2.js")).then((mod) => ({
|
1732
1732
|
default: mod.ProtectedComponentConfigurationPage
|
1733
1733
|
}))
|
1734
1734
|
);
|
1735
1735
|
const NoPermissions = React.lazy(
|
1736
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1736
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-B5Y9Y78B.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1737
1737
|
);
|
1738
1738
|
const NoContentType = React.lazy(
|
1739
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1739
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-C8mtyc4H.js")).then((mod) => ({ default: mod.NoContentType }))
|
1740
1740
|
);
|
1741
1741
|
const CollectionTypePages = () => {
|
1742
1742
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1748,7 +1748,7 @@ const CollectionTypePages = () => {
|
|
1748
1748
|
const CLONE_RELATIVE_PATH = ":collectionType/:slug/clone/:origin";
|
1749
1749
|
const CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;
|
1750
1750
|
const LIST_RELATIVE_PATH = ":collectionType/:slug";
|
1751
|
-
const LIST_PATH = `/content-manager
|
1751
|
+
const LIST_PATH = `/content-manager/collection-types/:slug`;
|
1752
1752
|
const routes = [
|
1753
1753
|
{
|
1754
1754
|
path: LIST_RELATIVE_PATH,
|
@@ -1881,6 +1881,11 @@ const DocumentActionButton = (action) => {
|
|
1881
1881
|
) : null
|
1882
1882
|
] });
|
1883
1883
|
};
|
1884
|
+
const MenuItem = styledComponents.styled(designSystem.Menu.Item)`
|
1885
|
+
&:hover {
|
1886
|
+
background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
|
1887
|
+
}
|
1888
|
+
`;
|
1884
1889
|
const DocumentActionsMenu = ({
|
1885
1890
|
actions: actions2,
|
1886
1891
|
children,
|
@@ -1939,48 +1944,32 @@ const DocumentActionsMenu = ({
|
|
1939
1944
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1940
1945
|
actions2.map((action) => {
|
1941
1946
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
1942
|
-
|
1947
|
+
MenuItem,
|
1943
1948
|
{
|
1944
1949
|
disabled: action.disabled,
|
1945
1950
|
onSelect: handleClick(action),
|
1946
1951
|
display: "block",
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
designSystem.Flex,
|
1969
|
-
{
|
1970
|
-
alignItems: "center",
|
1971
|
-
background: "alternative100",
|
1972
|
-
borderStyle: "solid",
|
1973
|
-
borderColor: "alternative200",
|
1974
|
-
borderWidth: "1px",
|
1975
|
-
height: 5,
|
1976
|
-
paddingLeft: 2,
|
1977
|
-
paddingRight: 2,
|
1978
|
-
hasRadius: true,
|
1979
|
-
color: "alternative600",
|
1980
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", lineHeight: 1, children: formatMessage({ id: "global.new", defaultMessage: "New" }) })
|
1981
|
-
}
|
1982
|
-
)
|
1983
|
-
] })
|
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
|
+
) })
|
1984
1973
|
},
|
1985
1974
|
action.id
|
1986
1975
|
);
|
@@ -2306,7 +2295,7 @@ const UpdateAction = ({
|
|
2306
2295
|
*/
|
2307
2296
|
disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
|
2308
2297
|
label: formatMessage({
|
2309
|
-
id: "
|
2298
|
+
id: "global.save",
|
2310
2299
|
defaultMessage: "Save"
|
2311
2300
|
}),
|
2312
2301
|
onClick: async () => {
|
@@ -2571,7 +2560,7 @@ const RelativeTime = React__namespace.forwardRef(
|
|
2571
2560
|
});
|
2572
2561
|
const unit = intervals.find((intervalUnit) => {
|
2573
2562
|
return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
|
2574
|
-
});
|
2563
|
+
}) ?? "seconds";
|
2575
2564
|
const relativeTime = dateFns.isPast(timestamp) ? -interval[unit] : interval[unit];
|
2576
2565
|
const customInterval = customIntervals.find(
|
2577
2566
|
(custom) => interval[custom.unit] < custom.threshold
|
@@ -2605,19 +2594,29 @@ const getDisplayName = ({
|
|
2605
2594
|
return email ?? "";
|
2606
2595
|
};
|
2607
2596
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2608
|
-
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2597
|
+
const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
|
2609
2598
|
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2610
|
-
|
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
|
+
}) }) });
|
2611
2604
|
};
|
2612
2605
|
const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
|
2613
2606
|
const { formatMessage } = reactIntl.useIntl();
|
2614
2607
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
2608
|
+
const params = reactRouterDom.useParams();
|
2615
2609
|
const title = isCreating ? formatMessage({
|
2616
2610
|
id: "content-manager.containers.edit.title.new",
|
2617
2611
|
defaultMessage: "Create an entry"
|
2618
2612
|
}) : documentTitle;
|
2619
2613
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
|
2620
|
-
/* @__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
|
+
),
|
2621
2620
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
|
2622
2621
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
|
2623
2622
|
/* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
|
@@ -3304,18 +3303,10 @@ const SelectedEntriesTableContent = ({
|
|
3304
3303
|
search: row.locale && `?plugins[i18n][locale]=${row.locale}`
|
3305
3304
|
},
|
3306
3305
|
state: { from: pathname },
|
3307
|
-
label: formatMessage(
|
3308
|
-
|
3309
|
-
|
3310
|
-
|
3311
|
-
{
|
3312
|
-
id: "content-manager.components.ListViewHelperPluginTable.row-line",
|
3313
|
-
defaultMessage: "item line {number}"
|
3314
|
-
},
|
3315
|
-
{ number: index2 + 1 }
|
3316
|
-
)
|
3317
|
-
}
|
3318
|
-
),
|
3306
|
+
label: formatMessage({
|
3307
|
+
id: "content-manager.bulk-publish.edit",
|
3308
|
+
defaultMessage: "Edit"
|
3309
|
+
}),
|
3319
3310
|
target: "_blank",
|
3320
3311
|
marginLeft: "auto",
|
3321
3312
|
variant: "ghost",
|
@@ -3959,17 +3950,27 @@ const HistoryAction = ({ model, document }) => {
|
|
3959
3950
|
const { formatMessage } = reactIntl.useIntl();
|
3960
3951
|
const [{ query }] = strapiAdmin.useQueryParams();
|
3961
3952
|
const navigate = reactRouterDom.useNavigate();
|
3953
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
3954
|
+
const { pathname } = reactRouterDom.useLocation();
|
3962
3955
|
const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
|
3963
3956
|
if (!window.strapi.features.isEnabled("cms-content-history")) {
|
3964
3957
|
return null;
|
3965
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
|
+
};
|
3966
3967
|
return {
|
3967
3968
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
|
3968
3969
|
label: formatMessage({
|
3969
3970
|
id: "content-manager.history.document-action",
|
3970
3971
|
defaultMessage: "Content History"
|
3971
3972
|
}),
|
3972
|
-
onClick:
|
3973
|
+
onClick: handleOnClick,
|
3973
3974
|
disabled: (
|
3974
3975
|
/**
|
3975
3976
|
* The user is creating a new document.
|
@@ -4056,6 +4057,7 @@ const { useGetPreviewUrlQuery } = previewApi;
|
|
4056
4057
|
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4057
4058
|
const { formatMessage } = reactIntl.useIntl();
|
4058
4059
|
const { trackUsage } = strapiAdmin.useTracking();
|
4060
|
+
const { pathname } = reactRouterDom.useLocation();
|
4059
4061
|
const [{ query }] = strapiAdmin.useQueryParams();
|
4060
4062
|
const { data, error } = useGetPreviewUrlQuery({
|
4061
4063
|
params: {
|
@@ -4070,8 +4072,9 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4070
4072
|
if (!data?.data?.url || error) {
|
4071
4073
|
return null;
|
4072
4074
|
}
|
4073
|
-
const
|
4074
|
-
|
4075
|
+
const trackNavigation = () => {
|
4076
|
+
const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
|
4077
|
+
trackUsage("willNavigate", { from: pathname, to: destinationPathname });
|
4075
4078
|
};
|
4076
4079
|
return {
|
4077
4080
|
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
@@ -4081,7 +4084,7 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4081
4084
|
variant: "tertiary",
|
4082
4085
|
tag: reactRouterDom.Link,
|
4083
4086
|
to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
|
4084
|
-
onClick:
|
4087
|
+
onClick: trackNavigation,
|
4085
4088
|
flex: "auto",
|
4086
4089
|
children: formatMessage({
|
4087
4090
|
id: "content-manager.preview.panel.button",
|
@@ -4120,7 +4123,7 @@ const index = {
|
|
4120
4123
|
app.router.addRoute({
|
4121
4124
|
path: "content-manager/*",
|
4122
4125
|
lazy: async () => {
|
4123
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4126
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-RC3W2obV.js"));
|
4124
4127
|
return {
|
4125
4128
|
Component: Layout
|
4126
4129
|
};
|
@@ -4140,7 +4143,7 @@ const index = {
|
|
4140
4143
|
async registerTrads({ locales }) {
|
4141
4144
|
const importedTrads = await Promise.all(
|
4142
4145
|
locales.map((locale) => {
|
4143
|
-
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 }) => {
|
4144
4147
|
return {
|
4145
4148
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4146
4149
|
locale
|
@@ -4200,4 +4203,4 @@ exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuer
|
|
4200
4203
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4201
4204
|
exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
|
4202
4205
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4203
|
-
//# sourceMappingURL=index-
|
4206
|
+
//# sourceMappingURL=index-DOzAG2cq.js.map
|