@strapi/content-manager 5.1.0 → 5.2.0
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-CL9CAMaL.js → ComponentConfigurationPage-Br8hp2Xt.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CL9CAMaL.js.map → ComponentConfigurationPage-Br8hp2Xt.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-BpM_Hc7r.mjs → ComponentConfigurationPage-DhwMhiRn.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BpM_Hc7r.mjs.map → ComponentConfigurationPage-DhwMhiRn.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-ILWo0h1e.js → EditConfigurationPage-BG7rpPjL.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-ILWo0h1e.js.map → EditConfigurationPage-BG7rpPjL.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-_prbqpTM.mjs → EditConfigurationPage-CWao3CZ3.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-_prbqpTM.mjs.map → EditConfigurationPage-CWao3CZ3.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-BqZvBN4s.js → EditViewPage-BUtpHsMz.js} +11 -5
- package/dist/_chunks/EditViewPage-BUtpHsMz.js.map +1 -0
- package/dist/_chunks/{EditViewPage-DAtscabN.mjs → EditViewPage-hiwZg61J.mjs} +12 -6
- package/dist/_chunks/EditViewPage-hiwZg61J.mjs.map +1 -0
- package/dist/_chunks/{Field-D-mgn1tH.mjs → Field-BQQLwyUs.mjs} +3 -3
- package/dist/_chunks/{Field-D-mgn1tH.mjs.map → Field-BQQLwyUs.mjs.map} +1 -1
- package/dist/_chunks/{Field-CcoQiiz1.js → Field-DEdug-Ll.js} +3 -3
- package/dist/_chunks/{Field-CcoQiiz1.js.map → Field-DEdug-Ll.js.map} +1 -1
- package/dist/_chunks/{Form-BxyeWiXW.mjs → Form-DwJovCha.mjs} +2 -2
- package/dist/_chunks/{Form-BxyeWiXW.mjs.map → Form-DwJovCha.mjs.map} +1 -1
- package/dist/_chunks/{Form-CmLbZDfi.js → Form-v5pkY-X_.js} +2 -2
- package/dist/_chunks/{Form-CmLbZDfi.js.map → Form-v5pkY-X_.js.map} +1 -1
- package/dist/_chunks/{History-uECUbCZB.js → History-40apIShV.js} +4 -11
- package/dist/_chunks/History-40apIShV.js.map +1 -0
- package/dist/_chunks/{History-BOhLaq_g.mjs → History-B9uJsxZl.mjs} +4 -11
- package/dist/_chunks/History-B9uJsxZl.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-D0vQez6F.mjs → ListConfigurationPage-CA4oi4Hj.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-D0vQez6F.mjs.map → ListConfigurationPage-CA4oi4Hj.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-D_bBSFNW.js → ListConfigurationPage-DAGbWDIL.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-D_bBSFNW.js.map → ListConfigurationPage-DAGbWDIL.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-ns-bmy5C.mjs → ListViewPage-Ca8F1NL-.mjs} +3 -3
- package/dist/_chunks/{ListViewPage-ns-bmy5C.mjs.map → ListViewPage-Ca8F1NL-.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-BkZ83b1A.js → ListViewPage-CjaHQ2_V.js} +3 -3
- package/dist/_chunks/{ListViewPage-BkZ83b1A.js.map → ListViewPage-CjaHQ2_V.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-C1439s4s.js → NoContentTypePage-CGxqLI8j.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-C1439s4s.js.map → NoContentTypePage-CGxqLI8j.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-BA5ZKMDR.mjs → NoContentTypePage-CwfnU-aN.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-BA5ZKMDR.mjs.map → NoContentTypePage-CwfnU-aN.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CPGwsVfb.js → NoPermissionsPage-CY3_QduF.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CPGwsVfb.js.map → NoPermissionsPage-CY3_QduF.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-B0GdMw1Q.mjs → NoPermissionsPage-iPk2lFR6.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-B0GdMw1Q.mjs.map → NoPermissionsPage-iPk2lFR6.mjs.map} +1 -1
- package/dist/_chunks/Preview-DRJhcaIO.mjs +267 -0
- package/dist/_chunks/Preview-DRJhcaIO.mjs.map +1 -0
- package/dist/_chunks/Preview-V8XOfrQf.js +286 -0
- package/dist/_chunks/Preview-V8XOfrQf.js.map +1 -0
- package/dist/_chunks/{Relations-d-8Uef_-.js → Relations-CGerEwji.js} +3 -3
- package/dist/_chunks/{Relations-d-8Uef_-.js.map → Relations-CGerEwji.js.map} +1 -1
- package/dist/_chunks/{Relations-BIGPMSW4.mjs → Relations-DGWa9W2j.mjs} +3 -3
- package/dist/_chunks/{Relations-BIGPMSW4.mjs.map → Relations-DGWa9W2j.mjs.map} +1 -1
- package/dist/_chunks/{en-Bdpa50w3.js → en-CHOp_xJv.js} +6 -1
- package/dist/_chunks/{en-Bdpa50w3.js.map → en-CHOp_xJv.js.map} +1 -1
- package/dist/_chunks/{en-CZw4xdPY.mjs → en-D_BMf0hT.mjs} +6 -1
- package/dist/_chunks/{en-CZw4xdPY.mjs.map → en-D_BMf0hT.mjs.map} +1 -1
- package/dist/_chunks/{index-3_WeHXYp.mjs → index-V8MWkDSd.mjs} +56 -49
- package/dist/_chunks/index-V8MWkDSd.mjs.map +1 -0
- package/dist/_chunks/{index-BgaeYWIy.js → index-tN1hpOMN.js} +51 -44
- package/dist/_chunks/index-tN1hpOMN.js.map +1 -0
- package/dist/_chunks/{layout-CrTxOnCy.mjs → layout-Bue_C6ui.mjs} +3 -3
- package/dist/_chunks/{layout-CrTxOnCy.mjs.map → layout-Bue_C6ui.mjs.map} +1 -1
- package/dist/_chunks/{layout-ByFyQRDH.js → layout-BzX903CL.js} +3 -3
- package/dist/_chunks/{layout-ByFyQRDH.js.map → layout-BzX903CL.js.map} +1 -1
- package/dist/_chunks/{relations-C5RSW926.js → relations-C4HcWYYJ.js} +6 -3
- package/dist/_chunks/relations-C4HcWYYJ.js.map +1 -0
- package/dist/_chunks/{relations-BlpLgngh.mjs → relations-C8eyDiIO.mjs} +6 -3
- package/dist/_chunks/relations-C8eyDiIO.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/preview/components/PreviewHeader.d.ts +2 -0
- package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
- package/dist/admin/src/preview/routes.d.ts +3 -0
- package/package.json +6 -6
- package/dist/_chunks/EditViewPage-BqZvBN4s.js.map +0 -1
- package/dist/_chunks/EditViewPage-DAtscabN.mjs.map +0 -1
- package/dist/_chunks/History-BOhLaq_g.mjs.map +0 -1
- package/dist/_chunks/History-uECUbCZB.js.map +0 -1
- package/dist/_chunks/index-3_WeHXYp.mjs.map +0 -1
- package/dist/_chunks/index-BgaeYWIy.js.map +0 -1
- package/dist/_chunks/relations-BlpLgngh.mjs.map +0 -1
- package/dist/_chunks/relations-C5RSW926.js.map +0 -1
@@ -1685,10 +1685,10 @@ const useDocumentActions = () => {
|
|
1685
1685
|
update
|
1686
1686
|
};
|
1687
1687
|
};
|
1688
|
-
const ProtectedHistoryPage =
|
1689
|
-
() => Promise.resolve().then(() => require("./History-
|
1688
|
+
const ProtectedHistoryPage = React__namespace.lazy(
|
1689
|
+
() => Promise.resolve().then(() => require("./History-40apIShV.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1690
1690
|
);
|
1691
|
-
const routes$
|
1691
|
+
const routes$2 = [
|
1692
1692
|
{
|
1693
1693
|
path: ":collectionType/:slug/:id/history",
|
1694
1694
|
Component: ProtectedHistoryPage
|
@@ -1698,32 +1698,45 @@ const routes$1 = [
|
|
1698
1698
|
Component: ProtectedHistoryPage
|
1699
1699
|
}
|
1700
1700
|
];
|
1701
|
+
const ProtectedPreviewPage = React__namespace.lazy(
|
1702
|
+
() => Promise.resolve().then(() => require("./Preview-V8XOfrQf.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
|
+
];
|
1701
1714
|
const ProtectedEditViewPage = React.lazy(
|
1702
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1715
|
+
() => Promise.resolve().then(() => require("./EditViewPage-BUtpHsMz.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1703
1716
|
);
|
1704
1717
|
const ProtectedListViewPage = React.lazy(
|
1705
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1718
|
+
() => Promise.resolve().then(() => require("./ListViewPage-CjaHQ2_V.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1706
1719
|
);
|
1707
1720
|
const ProtectedListConfiguration = React.lazy(
|
1708
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1721
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-DAGbWDIL.js")).then((mod) => ({
|
1709
1722
|
default: mod.ProtectedListConfiguration
|
1710
1723
|
}))
|
1711
1724
|
);
|
1712
1725
|
const ProtectedEditConfigurationPage = React.lazy(
|
1713
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1726
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-BG7rpPjL.js")).then((mod) => ({
|
1714
1727
|
default: mod.ProtectedEditConfigurationPage
|
1715
1728
|
}))
|
1716
1729
|
);
|
1717
1730
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1718
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1731
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-Br8hp2Xt.js")).then((mod) => ({
|
1719
1732
|
default: mod.ProtectedComponentConfigurationPage
|
1720
1733
|
}))
|
1721
1734
|
);
|
1722
1735
|
const NoPermissions = React.lazy(
|
1723
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1736
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-CY3_QduF.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1724
1737
|
);
|
1725
1738
|
const NoContentType = React.lazy(
|
1726
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1739
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-CGxqLI8j.js")).then((mod) => ({ default: mod.NoContentType }))
|
1727
1740
|
);
|
1728
1741
|
const CollectionTypePages = () => {
|
1729
1742
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1769,6 +1782,7 @@ const routes = [
|
|
1769
1782
|
path: "no-content-types",
|
1770
1783
|
Component: NoContentType
|
1771
1784
|
},
|
1785
|
+
...routes$2,
|
1772
1786
|
...routes$1
|
1773
1787
|
];
|
1774
1788
|
const DocumentActions = ({ actions: actions2 }) => {
|
@@ -2593,7 +2607,11 @@ const getDisplayName = ({
|
|
2593
2607
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2594
2608
|
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2595
2609
|
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2596
|
-
|
2610
|
+
const { formatMessage } = reactIntl.useIntl();
|
2611
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
|
2612
|
+
id: `content-manager.containers.List.${status}`,
|
2613
|
+
defaultMessage: capitalise(status)
|
2614
|
+
}) }) });
|
2597
2615
|
};
|
2598
2616
|
const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
|
2599
2617
|
const { formatMessage } = reactIntl.useIntl();
|
@@ -4041,8 +4059,8 @@ const previewApi = contentManagerApi.injectEndpoints({
|
|
4041
4059
|
const { useGetPreviewUrlQuery } = previewApi;
|
4042
4060
|
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4043
4061
|
const { formatMessage } = reactIntl.useIntl();
|
4044
|
-
const {
|
4045
|
-
const {
|
4062
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
4063
|
+
const [{ query }] = strapiAdmin.useQueryParams();
|
4046
4064
|
const { data, error } = useGetPreviewUrlQuery({
|
4047
4065
|
params: {
|
4048
4066
|
contentType: model
|
@@ -4056,37 +4074,25 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4056
4074
|
if (!data?.data?.url || error) {
|
4057
4075
|
return null;
|
4058
4076
|
}
|
4059
|
-
const
|
4060
|
-
|
4061
|
-
copy(url);
|
4062
|
-
toggleNotification({
|
4063
|
-
message: formatMessage({
|
4064
|
-
id: "content-manager.preview.copy.success",
|
4065
|
-
defaultMessage: "Copied preview link"
|
4066
|
-
}),
|
4067
|
-
type: "success"
|
4068
|
-
});
|
4077
|
+
const handleClick = () => {
|
4078
|
+
trackUsage("willOpenPreview");
|
4069
4079
|
};
|
4070
4080
|
return {
|
4071
4081
|
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4072
|
-
content: /* @__PURE__ */ jsxRuntime.
|
4073
|
-
|
4074
|
-
|
4075
|
-
|
4076
|
-
|
4077
|
-
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
4083
|
-
|
4084
|
-
|
4085
|
-
|
4086
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
|
4087
|
-
}
|
4088
|
-
)
|
4089
|
-
] })
|
4082
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
|
4083
|
+
designSystem.Button,
|
4084
|
+
{
|
4085
|
+
variant: "tertiary",
|
4086
|
+
tag: reactRouterDom.Link,
|
4087
|
+
to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
|
4088
|
+
onClick: handleClick,
|
4089
|
+
flex: "auto",
|
4090
|
+
children: formatMessage({
|
4091
|
+
id: "content-manager.preview.panel.button",
|
4092
|
+
defaultMessage: "Open preview"
|
4093
|
+
})
|
4094
|
+
}
|
4095
|
+
) })
|
4090
4096
|
};
|
4091
4097
|
};
|
4092
4098
|
const FEATURE_ID = "preview";
|
@@ -4118,7 +4124,7 @@ const index = {
|
|
4118
4124
|
app.router.addRoute({
|
4119
4125
|
path: "content-manager/*",
|
4120
4126
|
lazy: async () => {
|
4121
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4127
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-BzX903CL.js"));
|
4122
4128
|
return {
|
4123
4129
|
Component: Layout
|
4124
4130
|
};
|
@@ -4138,7 +4144,7 @@ const index = {
|
|
4138
4144
|
async registerTrads({ locales }) {
|
4139
4145
|
const importedTrads = await Promise.all(
|
4140
4146
|
locales.map((locale) => {
|
4141
|
-
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-
|
4147
|
+
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-CHOp_xJv.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 }) => {
|
4142
4148
|
return {
|
4143
4149
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4144
4150
|
locale
|
@@ -4196,5 +4202,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
|
|
4196
4202
|
exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
4197
4203
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
4198
4204
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4205
|
+
exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
|
4199
4206
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4200
|
-
//# sourceMappingURL=index-
|
4207
|
+
//# sourceMappingURL=index-tN1hpOMN.js.map
|