@strapi/content-manager 0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd → 0.0.0-next.6ed779c066310248c506ce3d2cdae97f59f700ef
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-BAxom7-k.js → ComponentConfigurationPage-6pw-DvAu.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BAxom7-k.js.map → ComponentConfigurationPage-6pw-DvAu.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-B36OKtL2.mjs → ComponentConfigurationPage-B4Nft8f5.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-B36OKtL2.mjs.map → ComponentConfigurationPage-B4Nft8f5.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DImKLLtc.mjs → EditConfigurationPage-BHOCGzAM.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-DImKLLtc.mjs.map → EditConfigurationPage-BHOCGzAM.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DIOXG1LU.js → EditConfigurationPage-DXBEGkOc.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-DIOXG1LU.js.map → EditConfigurationPage-DXBEGkOc.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-DOojAmY3.mjs → EditViewPage-CdRxfy5B.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-DOojAmY3.mjs.map → EditViewPage-CdRxfy5B.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-BJTtFINj.js → EditViewPage-Ck6Duztu.js} +3 -3
- package/dist/_chunks/{EditViewPage-BJTtFINj.js.map → EditViewPage-Ck6Duztu.js.map} +1 -1
- package/dist/_chunks/{Field-BUdpxeok.mjs → Field-DDSx-gBR.mjs} +4 -4
- package/dist/_chunks/Field-DDSx-gBR.mjs.map +1 -0
- package/dist/_chunks/{Field-Cd_7-NMN.js → Field-T3F_jdGo.js} +4 -4
- package/dist/_chunks/Field-T3F_jdGo.js.map +1 -0
- package/dist/_chunks/{Form-CvmozLEg.js → Form-C-wjP4UH.js} +2 -2
- package/dist/_chunks/{Form-CvmozLEg.js.map → Form-C-wjP4UH.js.map} +1 -1
- package/dist/_chunks/{Form-FvECgpg7.mjs → Form-DBXQL3w4.mjs} +2 -2
- package/dist/_chunks/{Form-FvECgpg7.mjs.map → Form-DBXQL3w4.mjs.map} +1 -1
- package/dist/_chunks/{History-BrJK6rOJ.mjs → History-CynfBe3Q.mjs} +4 -4
- package/dist/_chunks/{History-BrJK6rOJ.mjs.map → History-CynfBe3Q.mjs.map} +1 -1
- package/dist/_chunks/{History-BKdIMKtv.js → History-DMFKKvIA.js} +4 -4
- package/dist/_chunks/{History-BKdIMKtv.js.map → History-DMFKKvIA.js.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-9b3E9h-2.js → ListConfigurationPage-BDV_ABiG.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-9b3E9h-2.js.map → ListConfigurationPage-BDV_ABiG.js.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-zfE5Eiby.mjs → ListConfigurationPage-D2_aIJSH.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-zfE5Eiby.mjs.map → ListConfigurationPage-D2_aIJSH.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-DAi3yyAI.mjs → ListViewPage-BJq_SQj8.mjs} +3 -3
- package/dist/_chunks/{ListViewPage-DAi3yyAI.mjs.map → ListViewPage-BJq_SQj8.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-D2dphT74.js → ListViewPage-Z3jPNVn2.js} +3 -3
- package/dist/_chunks/{ListViewPage-D2dphT74.js.map → ListViewPage-Z3jPNVn2.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-C9fdm3RZ.mjs → NoContentTypePage-CEdKqCfY.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-C9fdm3RZ.mjs.map → NoContentTypePage-CEdKqCfY.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-jbsv0rT5.js → NoContentTypePage-ZvbWHVfG.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-jbsv0rT5.js.map → NoContentTypePage-ZvbWHVfG.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-_UqvbKRz.mjs → NoPermissionsPage-BjzbHoxM.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-_UqvbKRz.mjs.map → NoPermissionsPage-BjzbHoxM.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-Cv49Tn6c.js → NoPermissionsPage-D9hyWZPp.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-Cv49Tn6c.js.map → NoPermissionsPage-D9hyWZPp.js.map} +1 -1
- package/dist/_chunks/{Relations-yPvOfnAH.js → Relations-BlhtPLZk.js} +6 -3
- package/dist/_chunks/Relations-BlhtPLZk.js.map +1 -0
- package/dist/_chunks/{Relations-BiPLjS2M.mjs → Relations-ChkJKzz8.mjs} +6 -3
- package/dist/_chunks/Relations-ChkJKzz8.mjs.map +1 -0
- 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-DxrTDLl6.mjs → fr--pg5jUbt.mjs} +2 -2
- package/dist/_chunks/{fr-DxrTDLl6.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
- package/dist/_chunks/{fr-C6t7ywEg.js → fr-B2Kyv8Z9.js} +2 -2
- package/dist/_chunks/{fr-C6t7ywEg.js.map → fr-B2Kyv8Z9.js.map} +1 -1
- package/dist/_chunks/{index-8iXplttQ.js → index-Bi51q_DG.js} +96 -14
- package/dist/_chunks/index-Bi51q_DG.js.map +1 -0
- package/dist/_chunks/{index-CRpPqPiy.mjs → index-C0PXR_tv.mjs} +98 -16
- package/dist/_chunks/index-C0PXR_tv.mjs.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-bDqD3GPd.mjs → layout-B5XH5gpH.mjs} +3 -3
- package/dist/_chunks/{layout-bDqD3GPd.mjs.map → layout-B5XH5gpH.mjs.map} +1 -1
- package/dist/_chunks/{layout-3n539-Sr.js → layout-MJxdu163.js} +3 -3
- package/dist/_chunks/{layout-3n539-Sr.js.map → layout-MJxdu163.js.map} +1 -1
- package/dist/_chunks/{relations-Ce65PWrd.mjs → relations-D9fqpVRO.mjs} +6 -3
- package/dist/_chunks/relations-D9fqpVRO.mjs.map +1 -0
- package/dist/_chunks/{relations-Cqr96EzB.js → relations-lCDy3D3D.js} +6 -3
- package/dist/_chunks/relations-lCDy3D3D.js.map +1 -0
- 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-BUdpxeok.mjs.map +0 -1
- package/dist/_chunks/Field-Cd_7-NMN.js.map +0 -1
- package/dist/_chunks/Relations-BiPLjS2M.mjs.map +0 -1
- package/dist/_chunks/Relations-yPvOfnAH.js.map +0 -1
- package/dist/_chunks/index-8iXplttQ.js.map +0 -1
- package/dist/_chunks/index-CRpPqPiy.mjs.map +0 -1
- package/dist/_chunks/relations-Ce65PWrd.mjs.map +0 -1
- package/dist/_chunks/relations-Cqr96EzB.js.map +0 -1
@@ -1,6 +1,6 @@
|
|
1
|
-
import { More, Cross, WarningCircle, ListPlus, Pencil, Trash, Check, CrossCircle, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, ClockCounterClockwise, Feather } from "@strapi/icons";
|
1
|
+
import { More, Cross, WarningCircle, ListPlus, Pencil, Trash, Check, CrossCircle, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, ClockCounterClockwise, Link as Link$1, Feather } from "@strapi/icons";
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
3
|
-
import { useStrapiApp, createContext, useQueryParams, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useForm, useTracking, useGuidedTour, BackButton, DescriptionComponentRenderer, useTable, Table } from "@strapi/admin/strapi-admin";
|
3
|
+
import { useStrapiApp, createContext, useQueryParams, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useForm, useTracking, useGuidedTour, BackButton, DescriptionComponentRenderer, useTable, Table, useClipboard } from "@strapi/admin/strapi-admin";
|
4
4
|
import * as React from "react";
|
5
5
|
import { lazy } from "react";
|
6
6
|
import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, Box, SingleSelect, SingleSelectOption, IconButton, Loader, Tooltip, LinkButton } from "@strapi/design-system";
|
@@ -271,7 +271,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
271
271
|
*/
|
272
272
|
getAllDocuments: builder.query({
|
273
273
|
query: ({ model, params }) => ({
|
274
|
-
url: `/content-manager/collection-types/${model}
|
274
|
+
url: `/content-manager/collection-types/${model}`,
|
275
275
|
method: "GET",
|
276
276
|
config: {
|
277
277
|
params
|
@@ -1664,7 +1664,7 @@ const useDocumentActions = () => {
|
|
1664
1664
|
};
|
1665
1665
|
};
|
1666
1666
|
const ProtectedHistoryPage = lazy(
|
1667
|
-
() => import("./History-
|
1667
|
+
() => import("./History-CynfBe3Q.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1668
1668
|
);
|
1669
1669
|
const routes$1 = [
|
1670
1670
|
{
|
@@ -1677,31 +1677,31 @@ const routes$1 = [
|
|
1677
1677
|
}
|
1678
1678
|
];
|
1679
1679
|
const ProtectedEditViewPage = lazy(
|
1680
|
-
() => import("./EditViewPage-
|
1680
|
+
() => import("./EditViewPage-CdRxfy5B.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1681
1681
|
);
|
1682
1682
|
const ProtectedListViewPage = lazy(
|
1683
|
-
() => import("./ListViewPage-
|
1683
|
+
() => import("./ListViewPage-BJq_SQj8.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1684
1684
|
);
|
1685
1685
|
const ProtectedListConfiguration = lazy(
|
1686
|
-
() => import("./ListConfigurationPage-
|
1686
|
+
() => import("./ListConfigurationPage-D2_aIJSH.mjs").then((mod) => ({
|
1687
1687
|
default: mod.ProtectedListConfiguration
|
1688
1688
|
}))
|
1689
1689
|
);
|
1690
1690
|
const ProtectedEditConfigurationPage = lazy(
|
1691
|
-
() => import("./EditConfigurationPage-
|
1691
|
+
() => import("./EditConfigurationPage-BHOCGzAM.mjs").then((mod) => ({
|
1692
1692
|
default: mod.ProtectedEditConfigurationPage
|
1693
1693
|
}))
|
1694
1694
|
);
|
1695
1695
|
const ProtectedComponentConfigurationPage = lazy(
|
1696
|
-
() => import("./ComponentConfigurationPage-
|
1696
|
+
() => import("./ComponentConfigurationPage-B4Nft8f5.mjs").then((mod) => ({
|
1697
1697
|
default: mod.ProtectedComponentConfigurationPage
|
1698
1698
|
}))
|
1699
1699
|
);
|
1700
1700
|
const NoPermissions = lazy(
|
1701
|
-
() => import("./NoPermissionsPage-
|
1701
|
+
() => import("./NoPermissionsPage-BjzbHoxM.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1702
1702
|
);
|
1703
1703
|
const NoContentType = lazy(
|
1704
|
-
() => import("./NoContentTypePage-
|
1704
|
+
() => import("./NoContentTypePage-CEdKqCfY.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1705
1705
|
);
|
1706
1706
|
const CollectionTypePages = () => {
|
1707
1707
|
const { collectionType } = useParams();
|
@@ -4001,13 +4001,95 @@ const { setInitialData } = actions;
|
|
4001
4001
|
const reducer = combineReducers({
|
4002
4002
|
app: reducer$1
|
4003
4003
|
});
|
4004
|
+
const previewApi = contentManagerApi.injectEndpoints({
|
4005
|
+
endpoints: (builder) => ({
|
4006
|
+
getPreviewUrl: builder.query({
|
4007
|
+
query({ query, params }) {
|
4008
|
+
return {
|
4009
|
+
url: `/content-manager/preview/url/${params.contentType}`,
|
4010
|
+
method: "GET",
|
4011
|
+
config: {
|
4012
|
+
params: query
|
4013
|
+
}
|
4014
|
+
};
|
4015
|
+
}
|
4016
|
+
})
|
4017
|
+
})
|
4018
|
+
});
|
4019
|
+
const { useGetPreviewUrlQuery } = previewApi;
|
4020
|
+
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4021
|
+
const { formatMessage } = useIntl();
|
4022
|
+
const { toggleNotification } = useNotification();
|
4023
|
+
const { copy } = useClipboard();
|
4024
|
+
const { trackUsage } = useTracking();
|
4025
|
+
const { data, error } = useGetPreviewUrlQuery({
|
4026
|
+
params: {
|
4027
|
+
contentType: model
|
4028
|
+
},
|
4029
|
+
query: {
|
4030
|
+
documentId,
|
4031
|
+
locale: document?.locale,
|
4032
|
+
status: document?.status
|
4033
|
+
}
|
4034
|
+
});
|
4035
|
+
if (!data?.data?.url || error) {
|
4036
|
+
return null;
|
4037
|
+
}
|
4038
|
+
const { url } = data.data;
|
4039
|
+
const handleCopyLink = () => {
|
4040
|
+
copy(url);
|
4041
|
+
toggleNotification({
|
4042
|
+
message: formatMessage({
|
4043
|
+
id: "content-manager.preview.copy.success",
|
4044
|
+
defaultMessage: "Copied preview link"
|
4045
|
+
}),
|
4046
|
+
type: "success"
|
4047
|
+
});
|
4048
|
+
};
|
4049
|
+
const handleClick = () => {
|
4050
|
+
trackUsage("willOpenPreview");
|
4051
|
+
};
|
4052
|
+
return {
|
4053
|
+
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4054
|
+
content: /* @__PURE__ */ jsxs(Flex, { gap: 2, width: "100%", children: [
|
4055
|
+
/* @__PURE__ */ jsx(
|
4056
|
+
Button,
|
4057
|
+
{
|
4058
|
+
variant: "tertiary",
|
4059
|
+
tag: Link,
|
4060
|
+
to: url,
|
4061
|
+
onClick: handleClick,
|
4062
|
+
target: "_blank",
|
4063
|
+
flex: "auto",
|
4064
|
+
children: formatMessage({
|
4065
|
+
id: "content-manager.preview.panel.button",
|
4066
|
+
defaultMessage: "Open preview"
|
4067
|
+
})
|
4068
|
+
}
|
4069
|
+
),
|
4070
|
+
/* @__PURE__ */ jsx(
|
4071
|
+
IconButton,
|
4072
|
+
{
|
4073
|
+
type: "button",
|
4074
|
+
label: formatMessage({
|
4075
|
+
id: "preview.copy.label",
|
4076
|
+
defaultMessage: "Copy preview link"
|
4077
|
+
}),
|
4078
|
+
onClick: handleCopyLink,
|
4079
|
+
children: /* @__PURE__ */ jsx(Link$1, {})
|
4080
|
+
}
|
4081
|
+
)
|
4082
|
+
] })
|
4083
|
+
};
|
4084
|
+
};
|
4004
4085
|
const FEATURE_ID = "preview";
|
4005
4086
|
const previewAdmin = {
|
4006
4087
|
bootstrap(app) {
|
4007
4088
|
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
4008
|
-
return
|
4089
|
+
return;
|
4009
4090
|
}
|
4010
|
-
|
4091
|
+
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4092
|
+
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4011
4093
|
}
|
4012
4094
|
};
|
4013
4095
|
const index = {
|
@@ -4029,7 +4111,7 @@ const index = {
|
|
4029
4111
|
app.router.addRoute({
|
4030
4112
|
path: "content-manager/*",
|
4031
4113
|
lazy: async () => {
|
4032
|
-
const { Layout } = await import("./layout-
|
4114
|
+
const { Layout } = await import("./layout-B5XH5gpH.mjs");
|
4033
4115
|
return {
|
4034
4116
|
Component: Layout
|
4035
4117
|
};
|
@@ -4049,7 +4131,7 @@ const index = {
|
|
4049
4131
|
async registerTrads({ locales }) {
|
4050
4132
|
const importedTrads = await Promise.all(
|
4051
4133
|
locales.map((locale) => {
|
4052
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-
|
4134
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-CZw4xdPY.mjs"), "./translations/es.json": () => import("./es-D34tqjMw.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr--pg5jUbt.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-BHqhDq4V.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
|
4053
4135
|
return {
|
4054
4136
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4055
4137
|
locale
|
@@ -4110,4 +4192,4 @@ export {
|
|
4110
4192
|
capitalise as y,
|
4111
4193
|
useUpdateContentTypeConfigurationMutation as z
|
4112
4194
|
};
|
4113
|
-
//# sourceMappingURL=index-
|
4195
|
+
//# sourceMappingURL=index-C0PXR_tv.mjs.map
|