@strapi/content-manager 5.0.5 → 5.1.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-DWxHeClF.mjs → ComponentConfigurationPage-BpM_Hc7r.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DWxHeClF.mjs.map → ComponentConfigurationPage-BpM_Hc7r.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-B6_S7HuK.js → ComponentConfigurationPage-CL9CAMaL.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-B6_S7HuK.js.map → ComponentConfigurationPage-CL9CAMaL.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CU1UZNov.js → EditConfigurationPage-ILWo0h1e.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CU1UZNov.js.map → EditConfigurationPage-ILWo0h1e.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CPNOHO6p.mjs → EditConfigurationPage-_prbqpTM.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CPNOHO6p.mjs.map → EditConfigurationPage-_prbqpTM.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-DaF3tkZZ.js → EditViewPage-BqZvBN4s.js} +3 -3
- package/dist/_chunks/{EditViewPage-DaF3tkZZ.js.map → EditViewPage-BqZvBN4s.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-DNSIfKKP.mjs → EditViewPage-DAtscabN.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-DNSIfKKP.mjs.map → EditViewPage-DAtscabN.mjs.map} +1 -1
- package/dist/_chunks/{Field-DH47H7B8.js → Field-CcoQiiz1.js} +4 -4
- package/dist/_chunks/Field-CcoQiiz1.js.map +1 -0
- package/dist/_chunks/{Field-ArMLuLzP.mjs → Field-D-mgn1tH.mjs} +4 -4
- package/dist/_chunks/Field-D-mgn1tH.mjs.map +1 -0
- package/dist/_chunks/{Form-CT2R0sf0.mjs → Form-BxyeWiXW.mjs} +2 -2
- package/dist/_chunks/{Form-CT2R0sf0.mjs.map → Form-BxyeWiXW.mjs.map} +1 -1
- package/dist/_chunks/{Form-8jrwSm8k.js → Form-CmLbZDfi.js} +2 -2
- package/dist/_chunks/{Form-8jrwSm8k.js.map → Form-CmLbZDfi.js.map} +1 -1
- package/dist/_chunks/{History-DL1eBEu4.mjs → History-BOhLaq_g.mjs} +17 -33
- package/dist/_chunks/History-BOhLaq_g.mjs.map +1 -0
- package/dist/_chunks/{History-CfXujgPi.js → History-uECUbCZB.js} +17 -33
- package/dist/_chunks/History-uECUbCZB.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DnGxJY6S.mjs → ListConfigurationPage-D0vQez6F.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-DnGxJY6S.mjs.map → ListConfigurationPage-D0vQez6F.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-n2omMsK6.js → ListConfigurationPage-D_bBSFNW.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-n2omMsK6.js.map → ListConfigurationPage-D_bBSFNW.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-DM8PgfPi.js → ListViewPage-BkZ83b1A.js} +3 -3
- package/dist/_chunks/{ListViewPage-DM8PgfPi.js.map → ListViewPage-BkZ83b1A.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-BzY1kZ43.mjs → ListViewPage-ns-bmy5C.mjs} +3 -3
- package/dist/_chunks/{ListViewPage-BzY1kZ43.mjs.map → ListViewPage-ns-bmy5C.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Dng14IxY.mjs → NoContentTypePage-BA5ZKMDR.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-Dng14IxY.mjs.map → NoContentTypePage-BA5ZKMDR.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CQgAmFxY.js → NoContentTypePage-C1439s4s.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-CQgAmFxY.js.map → NoContentTypePage-C1439s4s.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CvDTxLVe.mjs → NoPermissionsPage-B0GdMw1Q.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CvDTxLVe.mjs.map → NoPermissionsPage-B0GdMw1Q.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CDMclDMB.js → NoPermissionsPage-CPGwsVfb.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CDMclDMB.js.map → NoPermissionsPage-CPGwsVfb.js.map} +1 -1
- package/dist/_chunks/{Relations-u-F7eBc1.mjs → Relations-BIGPMSW4.mjs} +3 -3
- package/dist/_chunks/{Relations-u-F7eBc1.mjs.map → Relations-BIGPMSW4.mjs.map} +1 -1
- package/dist/_chunks/{Relations-DPgT9YBQ.js → Relations-d-8Uef_-.js} +3 -3
- package/dist/_chunks/{Relations-DPgT9YBQ.js.map → Relations-d-8Uef_-.js.map} +1 -1
- package/dist/_chunks/{en-Bm0D0IWz.js → en-Bdpa50w3.js} +6 -2
- package/dist/_chunks/{en-Bm0D0IWz.js.map → en-Bdpa50w3.js.map} +1 -1
- package/dist/_chunks/{en-DKV44jRb.mjs → en-CZw4xdPY.mjs} +6 -2
- package/dist/_chunks/{en-DKV44jRb.mjs.map → en-CZw4xdPY.mjs.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-CpWBTebP.mjs → index-3_WeHXYp.mjs} +83 -16
- package/dist/_chunks/index-3_WeHXYp.mjs.map +1 -0
- package/dist/_chunks/{index-By9LCuJo.js → index-BgaeYWIy.js} +81 -14
- package/dist/_chunks/index-BgaeYWIy.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-DgVwKNX2.js → layout-ByFyQRDH.js} +3 -3
- package/dist/_chunks/{layout-DgVwKNX2.js.map → layout-ByFyQRDH.js.map} +1 -1
- package/dist/_chunks/{layout-Dyy-wd_i.mjs → layout-CrTxOnCy.mjs} +3 -3
- package/dist/_chunks/{layout-Dyy-wd_i.mjs.map → layout-CrTxOnCy.mjs.map} +1 -1
- package/dist/_chunks/{relations-BSPEL9Tj.mjs → relations-BlpLgngh.mjs} +2 -2
- package/dist/_chunks/{relations-BSPEL9Tj.mjs.map → relations-BlpLgngh.mjs.map} +1 -1
- package/dist/_chunks/{relations-Cybx8J7k.js → relations-C5RSW926.js} +2 -2
- package/dist/_chunks/{relations-Cybx8J7k.js.map → relations-C5RSW926.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
- package/dist/admin/src/preview/index.d.ts +1 -1
- package/dist/admin/src/preview/services/preview.d.ts +3 -0
- package/package.json +6 -6
- package/dist/_chunks/Field-ArMLuLzP.mjs.map +0 -1
- package/dist/_chunks/Field-DH47H7B8.js.map +0 -1
- package/dist/_chunks/History-CfXujgPi.js.map +0 -1
- package/dist/_chunks/History-DL1eBEu4.mjs.map +0 -1
- package/dist/_chunks/index-By9LCuJo.js.map +0 -1
- package/dist/_chunks/index-CpWBTebP.mjs.map +0 -1
@@ -293,7 +293,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
293
293
|
*/
|
294
294
|
getAllDocuments: builder.query({
|
295
295
|
query: ({ model, params }) => ({
|
296
|
-
url: `/content-manager/collection-types/${model}
|
296
|
+
url: `/content-manager/collection-types/${model}`,
|
297
297
|
method: "GET",
|
298
298
|
config: {
|
299
299
|
params
|
@@ -1686,7 +1686,7 @@ const useDocumentActions = () => {
|
|
1686
1686
|
};
|
1687
1687
|
};
|
1688
1688
|
const ProtectedHistoryPage = React.lazy(
|
1689
|
-
() => Promise.resolve().then(() => require("./History-
|
1689
|
+
() => Promise.resolve().then(() => require("./History-uECUbCZB.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1690
1690
|
);
|
1691
1691
|
const routes$1 = [
|
1692
1692
|
{
|
@@ -1699,31 +1699,31 @@ const routes$1 = [
|
|
1699
1699
|
}
|
1700
1700
|
];
|
1701
1701
|
const ProtectedEditViewPage = React.lazy(
|
1702
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1702
|
+
() => Promise.resolve().then(() => require("./EditViewPage-BqZvBN4s.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1703
1703
|
);
|
1704
1704
|
const ProtectedListViewPage = React.lazy(
|
1705
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1705
|
+
() => Promise.resolve().then(() => require("./ListViewPage-BkZ83b1A.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1706
1706
|
);
|
1707
1707
|
const ProtectedListConfiguration = React.lazy(
|
1708
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1708
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-D_bBSFNW.js")).then((mod) => ({
|
1709
1709
|
default: mod.ProtectedListConfiguration
|
1710
1710
|
}))
|
1711
1711
|
);
|
1712
1712
|
const ProtectedEditConfigurationPage = React.lazy(
|
1713
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1713
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-ILWo0h1e.js")).then((mod) => ({
|
1714
1714
|
default: mod.ProtectedEditConfigurationPage
|
1715
1715
|
}))
|
1716
1716
|
);
|
1717
1717
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1718
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1718
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-CL9CAMaL.js")).then((mod) => ({
|
1719
1719
|
default: mod.ProtectedComponentConfigurationPage
|
1720
1720
|
}))
|
1721
1721
|
);
|
1722
1722
|
const NoPermissions = React.lazy(
|
1723
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1723
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-CPGwsVfb.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1724
1724
|
);
|
1725
1725
|
const NoContentType = React.lazy(
|
1726
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1726
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-C1439s4s.js")).then((mod) => ({ default: mod.NoContentType }))
|
1727
1727
|
);
|
1728
1728
|
const CollectionTypePages = () => {
|
1729
1729
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -4023,13 +4023,80 @@ const { setInitialData } = actions;
|
|
4023
4023
|
const reducer = toolkit.combineReducers({
|
4024
4024
|
app: reducer$1
|
4025
4025
|
});
|
4026
|
+
const previewApi = contentManagerApi.injectEndpoints({
|
4027
|
+
endpoints: (builder) => ({
|
4028
|
+
getPreviewUrl: builder.query({
|
4029
|
+
query({ query, params }) {
|
4030
|
+
return {
|
4031
|
+
url: `/content-manager/preview/url/${params.contentType}`,
|
4032
|
+
method: "GET",
|
4033
|
+
config: {
|
4034
|
+
params: query
|
4035
|
+
}
|
4036
|
+
};
|
4037
|
+
}
|
4038
|
+
})
|
4039
|
+
})
|
4040
|
+
});
|
4041
|
+
const { useGetPreviewUrlQuery } = previewApi;
|
4042
|
+
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4043
|
+
const { formatMessage } = reactIntl.useIntl();
|
4044
|
+
const { toggleNotification } = strapiAdmin.useNotification();
|
4045
|
+
const { copy } = strapiAdmin.useClipboard();
|
4046
|
+
const { data, error } = useGetPreviewUrlQuery({
|
4047
|
+
params: {
|
4048
|
+
contentType: model
|
4049
|
+
},
|
4050
|
+
query: {
|
4051
|
+
documentId,
|
4052
|
+
locale: document?.locale,
|
4053
|
+
status: document?.status
|
4054
|
+
}
|
4055
|
+
});
|
4056
|
+
if (!data?.data?.url || error) {
|
4057
|
+
return null;
|
4058
|
+
}
|
4059
|
+
const { url } = data.data;
|
4060
|
+
const handleCopyLink = () => {
|
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
|
+
});
|
4069
|
+
};
|
4070
|
+
return {
|
4071
|
+
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4072
|
+
content: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, width: "100%", children: [
|
4073
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", tag: reactRouterDom.Link, to: url, target: "_blank", flex: "auto", children: formatMessage({
|
4074
|
+
id: "content-manager.preview.panel.button",
|
4075
|
+
defaultMessage: "Open preview"
|
4076
|
+
}) }),
|
4077
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
4078
|
+
designSystem.IconButton,
|
4079
|
+
{
|
4080
|
+
type: "button",
|
4081
|
+
label: formatMessage({
|
4082
|
+
id: "preview.copy.label",
|
4083
|
+
defaultMessage: "Copy preview link"
|
4084
|
+
}),
|
4085
|
+
onClick: handleCopyLink,
|
4086
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
|
4087
|
+
}
|
4088
|
+
)
|
4089
|
+
] })
|
4090
|
+
};
|
4091
|
+
};
|
4026
4092
|
const FEATURE_ID = "preview";
|
4027
4093
|
const previewAdmin = {
|
4028
4094
|
bootstrap(app) {
|
4029
4095
|
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
4030
|
-
return
|
4096
|
+
return;
|
4031
4097
|
}
|
4032
|
-
|
4098
|
+
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4099
|
+
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4033
4100
|
}
|
4034
4101
|
};
|
4035
4102
|
const index = {
|
@@ -4051,7 +4118,7 @@ const index = {
|
|
4051
4118
|
app.router.addRoute({
|
4052
4119
|
path: "content-manager/*",
|
4053
4120
|
lazy: async () => {
|
4054
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4121
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-ByFyQRDH.js"));
|
4055
4122
|
return {
|
4056
4123
|
Component: Layout
|
4057
4124
|
};
|
@@ -4071,7 +4138,7 @@ const index = {
|
|
4071
4138
|
async registerTrads({ locales }) {
|
4072
4139
|
const importedTrads = await Promise.all(
|
4073
4140
|
locales.map((locale) => {
|
4074
|
-
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-
|
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-Bdpa50w3.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 }) => {
|
4075
4142
|
return {
|
4076
4143
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4077
4144
|
locale
|
@@ -4130,4 +4197,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
|
4130
4197
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
4131
4198
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4132
4199
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4133
|
-
//# sourceMappingURL=index-
|
4200
|
+
//# sourceMappingURL=index-BgaeYWIy.js.map
|