@strapi/content-manager 5.1.1 → 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-CpJNPBgk.js → ComponentConfigurationPage-Br8hp2Xt.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CpJNPBgk.js.map → ComponentConfigurationPage-Br8hp2Xt.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-TYDPg5WG.mjs → ComponentConfigurationPage-DhwMhiRn.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-TYDPg5WG.mjs.map → ComponentConfigurationPage-DhwMhiRn.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CFDe6SA1.js → EditConfigurationPage-BG7rpPjL.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CFDe6SA1.js.map → EditConfigurationPage-BG7rpPjL.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DqL8Pq5r.mjs → EditConfigurationPage-CWao3CZ3.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-DqL8Pq5r.mjs.map → EditConfigurationPage-CWao3CZ3.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-khfP2CR3.js → EditViewPage-BUtpHsMz.js} +11 -5
- package/dist/_chunks/EditViewPage-BUtpHsMz.js.map +1 -0
- package/dist/_chunks/{EditViewPage-RXrFLav2.mjs → EditViewPage-hiwZg61J.mjs} +12 -6
- package/dist/_chunks/EditViewPage-hiwZg61J.mjs.map +1 -0
- package/dist/_chunks/{Field--rQeS6Zj.mjs → Field-BQQLwyUs.mjs} +3 -3
- package/dist/_chunks/{Field--rQeS6Zj.mjs.map → Field-BQQLwyUs.mjs.map} +1 -1
- package/dist/_chunks/{Field-C1ftmTe9.js → Field-DEdug-Ll.js} +3 -3
- package/dist/_chunks/{Field-C1ftmTe9.js.map → Field-DEdug-Ll.js.map} +1 -1
- package/dist/_chunks/{Form-COtGXyUE.mjs → Form-DwJovCha.mjs} +2 -2
- package/dist/_chunks/{Form-COtGXyUE.mjs.map → Form-DwJovCha.mjs.map} +1 -1
- package/dist/_chunks/{Form-CwdX5oLw.js → Form-v5pkY-X_.js} +2 -2
- package/dist/_chunks/{Form-CwdX5oLw.js.map → Form-v5pkY-X_.js.map} +1 -1
- package/dist/_chunks/{History-DKS2aqqM.js → History-40apIShV.js} +4 -11
- package/dist/_chunks/History-40apIShV.js.map +1 -0
- package/dist/_chunks/{History-BevwkPO1.mjs → History-B9uJsxZl.mjs} +4 -11
- package/dist/_chunks/History-B9uJsxZl.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DNfZDtDA.mjs → ListConfigurationPage-CA4oi4Hj.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-DNfZDtDA.mjs.map → ListConfigurationPage-CA4oi4Hj.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-LSYSPZHH.js → ListConfigurationPage-DAGbWDIL.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-LSYSPZHH.js.map → ListConfigurationPage-DAGbWDIL.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-C1PyuYRS.mjs → ListViewPage-Ca8F1NL-.mjs} +3 -3
- package/dist/_chunks/{ListViewPage-C1PyuYRS.mjs.map → ListViewPage-Ca8F1NL-.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-DlUpqLIo.js → ListViewPage-CjaHQ2_V.js} +3 -3
- package/dist/_chunks/{ListViewPage-DlUpqLIo.js.map → ListViewPage-CjaHQ2_V.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-m8wt3sf6.js → NoContentTypePage-CGxqLI8j.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-m8wt3sf6.js.map → NoContentTypePage-CGxqLI8j.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-C9q744z1.mjs → NoContentTypePage-CwfnU-aN.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-C9q744z1.mjs.map → NoContentTypePage-CwfnU-aN.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DLfPsA0Q.js → NoPermissionsPage-CY3_QduF.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DLfPsA0Q.js.map → NoPermissionsPage-CY3_QduF.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-8BM-LWta.mjs → NoPermissionsPage-iPk2lFR6.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-8BM-LWta.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-OMriCP_L.js → Relations-CGerEwji.js} +3 -3
- package/dist/_chunks/{Relations-OMriCP_L.js.map → Relations-CGerEwji.js.map} +1 -1
- package/dist/_chunks/{Relations-D25xRcFy.mjs → Relations-DGWa9W2j.mjs} +3 -3
- package/dist/_chunks/{Relations-D25xRcFy.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-BvGihCJp.mjs → index-V8MWkDSd.mjs} +53 -61
- package/dist/_chunks/index-V8MWkDSd.mjs.map +1 -0
- package/dist/_chunks/{index-DqZnjo8F.js → index-tN1hpOMN.js} +48 -56
- package/dist/_chunks/index-tN1hpOMN.js.map +1 -0
- package/dist/_chunks/{layout-ykHSe2KQ.mjs → layout-Bue_C6ui.mjs} +3 -3
- package/dist/_chunks/{layout-ykHSe2KQ.mjs.map → layout-Bue_C6ui.mjs.map} +1 -1
- package/dist/_chunks/{layout-CmaemAO3.js → layout-BzX903CL.js} +3 -3
- package/dist/_chunks/{layout-CmaemAO3.js.map → layout-BzX903CL.js.map} +1 -1
- package/dist/_chunks/{relations-D9fKsCLY.js → relations-C4HcWYYJ.js} +6 -3
- package/dist/_chunks/relations-C4HcWYYJ.js.map +1 -0
- package/dist/_chunks/{relations-u-Vz51Ea.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-RXrFLav2.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-khfP2CR3.js.map +0 -1
- package/dist/_chunks/History-BevwkPO1.mjs.map +0 -1
- package/dist/_chunks/History-DKS2aqqM.js.map +0 -1
- package/dist/_chunks/index-BvGihCJp.mjs.map +0 -1
- package/dist/_chunks/index-DqZnjo8F.js.map +0 -1
- package/dist/_chunks/relations-D9fKsCLY.js.map +0 -1
- package/dist/_chunks/relations-u-Vz51Ea.mjs.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,9 +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 { toggleNotification } = strapiAdmin.useNotification();
|
4045
|
-
const { copy } = strapiAdmin.useClipboard();
|
4046
4062
|
const { trackUsage } = strapiAdmin.useTracking();
|
4063
|
+
const [{ query }] = strapiAdmin.useQueryParams();
|
4047
4064
|
const { data, error } = useGetPreviewUrlQuery({
|
4048
4065
|
params: {
|
4049
4066
|
contentType: model
|
@@ -4057,51 +4074,25 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4057
4074
|
if (!data?.data?.url || error) {
|
4058
4075
|
return null;
|
4059
4076
|
}
|
4060
|
-
const { url } = data.data;
|
4061
|
-
const handleCopyLink = () => {
|
4062
|
-
copy(url);
|
4063
|
-
toggleNotification({
|
4064
|
-
message: formatMessage({
|
4065
|
-
id: "content-manager.preview.copy.success",
|
4066
|
-
defaultMessage: "Copied preview link"
|
4067
|
-
}),
|
4068
|
-
type: "success"
|
4069
|
-
});
|
4070
|
-
};
|
4071
4077
|
const handleClick = () => {
|
4072
4078
|
trackUsage("willOpenPreview");
|
4073
4079
|
};
|
4074
4080
|
return {
|
4075
4081
|
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4076
|
-
content: /* @__PURE__ */ jsxRuntime.
|
4077
|
-
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
4083
|
-
|
4084
|
-
|
4085
|
-
|
4086
|
-
|
4087
|
-
|
4088
|
-
|
4089
|
-
|
4090
|
-
}
|
4091
|
-
),
|
4092
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
4093
|
-
designSystem.IconButton,
|
4094
|
-
{
|
4095
|
-
type: "button",
|
4096
|
-
label: formatMessage({
|
4097
|
-
id: "preview.copy.label",
|
4098
|
-
defaultMessage: "Copy preview link"
|
4099
|
-
}),
|
4100
|
-
onClick: handleCopyLink,
|
4101
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
|
4102
|
-
}
|
4103
|
-
)
|
4104
|
-
] })
|
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
|
+
) })
|
4105
4096
|
};
|
4106
4097
|
};
|
4107
4098
|
const FEATURE_ID = "preview";
|
@@ -4133,7 +4124,7 @@ const index = {
|
|
4133
4124
|
app.router.addRoute({
|
4134
4125
|
path: "content-manager/*",
|
4135
4126
|
lazy: async () => {
|
4136
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4127
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-BzX903CL.js"));
|
4137
4128
|
return {
|
4138
4129
|
Component: Layout
|
4139
4130
|
};
|
@@ -4153,7 +4144,7 @@ const index = {
|
|
4153
4144
|
async registerTrads({ locales }) {
|
4154
4145
|
const importedTrads = await Promise.all(
|
4155
4146
|
locales.map((locale) => {
|
4156
|
-
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 }) => {
|
4157
4148
|
return {
|
4158
4149
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4159
4150
|
locale
|
@@ -4211,5 +4202,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
|
|
4211
4202
|
exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
4212
4203
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
4213
4204
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4205
|
+
exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
|
4214
4206
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4215
|
-
//# sourceMappingURL=index-
|
4207
|
+
//# sourceMappingURL=index-tN1hpOMN.js.map
|