@strapi/content-manager 0.0.0-experimental.5d4d09ee13c3caee5f590cb81ac0eddc9b11e90d → 0.0.0-experimental.5d4d8671a4141a722aa70f22022a255988f07137
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-CQroR9Qk.mjs → ComponentConfigurationPage-BpM_Hc7r.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CQroR9Qk.mjs.map → ComponentConfigurationPage-BpM_Hc7r.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CO977CPh.js → ComponentConfigurationPage-CL9CAMaL.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CO977CPh.js.map → ComponentConfigurationPage-CL9CAMaL.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BPgoE-kf.js → EditConfigurationPage-ILWo0h1e.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BPgoE-kf.js.map → EditConfigurationPage-ILWo0h1e.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-tVCJ5vWC.mjs → EditConfigurationPage-_prbqpTM.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-tVCJ5vWC.mjs.map → EditConfigurationPage-_prbqpTM.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-BMVgUNOX.js → EditViewPage-BqZvBN4s.js} +3 -3
- package/dist/_chunks/EditViewPage-BqZvBN4s.js.map +1 -0
- package/dist/_chunks/{EditViewPage-8mOu02ji.mjs → EditViewPage-DAtscabN.mjs} +3 -3
- package/dist/_chunks/EditViewPage-DAtscabN.mjs.map +1 -0
- package/dist/_chunks/{Field-CdSLKFQk.js → Field-CcoQiiz1.js} +4 -4
- package/dist/_chunks/Field-CcoQiiz1.js.map +1 -0
- package/dist/_chunks/{Field-CJPYzwD7.mjs → Field-D-mgn1tH.mjs} +4 -4
- package/dist/_chunks/Field-D-mgn1tH.mjs.map +1 -0
- package/dist/_chunks/{Form-DJOJ-GF1.mjs → Form-BxyeWiXW.mjs} +2 -2
- package/dist/_chunks/{Form-DJOJ-GF1.mjs.map → Form-BxyeWiXW.mjs.map} +1 -1
- package/dist/_chunks/{Form-eP5bZwap.js → Form-CmLbZDfi.js} +2 -2
- package/dist/_chunks/{Form-eP5bZwap.js.map → Form-CmLbZDfi.js.map} +1 -1
- package/dist/_chunks/{History-MnQLtk1g.mjs → History-BOhLaq_g.mjs} +18 -34
- package/dist/_chunks/History-BOhLaq_g.mjs.map +1 -0
- package/dist/_chunks/{History-B-Mrquzu.js → History-uECUbCZB.js} +18 -34
- package/dist/_chunks/History-uECUbCZB.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-BcycI8Lw.mjs → ListConfigurationPage-D0vQez6F.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-BcycI8Lw.mjs.map → ListConfigurationPage-D0vQez6F.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-C0n4rUzH.js → ListConfigurationPage-D_bBSFNW.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-C0n4rUzH.js.map → ListConfigurationPage-D_bBSFNW.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-q0SHVPUS.js → ListViewPage-BkZ83b1A.js} +15 -4
- package/dist/_chunks/ListViewPage-BkZ83b1A.js.map +1 -0
- package/dist/_chunks/{ListViewPage-CRXONXwZ.mjs → ListViewPage-ns-bmy5C.mjs} +15 -4
- package/dist/_chunks/{ListViewPage-CRXONXwZ.mjs.map → ListViewPage-ns-bmy5C.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-ukzFRF3z.mjs → NoContentTypePage-BA5ZKMDR.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-ukzFRF3z.mjs.map → NoContentTypePage-BA5ZKMDR.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Bh3komDV.js → NoContentTypePage-C1439s4s.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-Bh3komDV.js.map → NoContentTypePage-C1439s4s.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-B4sD7Ble.mjs → NoPermissionsPage-B0GdMw1Q.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-B4sD7Ble.mjs.map → NoPermissionsPage-B0GdMw1Q.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BGBpj_Y1.js → NoPermissionsPage-CPGwsVfb.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BGBpj_Y1.js.map → NoPermissionsPage-CPGwsVfb.js.map} +1 -1
- package/dist/_chunks/{Relations-CIexb8gr.mjs → Relations-BIGPMSW4.mjs} +44 -17
- package/dist/_chunks/Relations-BIGPMSW4.mjs.map +1 -0
- package/dist/_chunks/{Relations-B53wYe8g.js → Relations-d-8Uef_-.js} +43 -16
- package/dist/_chunks/Relations-d-8Uef_-.js.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-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-CJ2vYwuT.mjs → index-3_WeHXYp.mjs} +113 -20
- package/dist/_chunks/index-3_WeHXYp.mjs.map +1 -0
- package/dist/_chunks/{index-DbT2sx-Q.js → index-BgaeYWIy.js} +112 -18
- 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-CeBSIkmP.js → layout-ByFyQRDH.js} +3 -3
- package/dist/_chunks/{layout-CeBSIkmP.js.map → layout-ByFyQRDH.js.map} +1 -1
- package/dist/_chunks/{layout-vzKSrr7p.mjs → layout-CrTxOnCy.mjs} +3 -3
- package/dist/_chunks/{layout-vzKSrr7p.mjs.map → layout-CrTxOnCy.mjs.map} +1 -1
- package/dist/_chunks/{relations-DI0lguF0.mjs → relations-BlpLgngh.mjs} +3 -7
- package/dist/_chunks/relations-BlpLgngh.mjs.map +1 -0
- package/dist/_chunks/{relations-Cl-6t9iz.js → relations-C5RSW926.js} +3 -7
- package/dist/_chunks/relations-C5RSW926.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/constants.d.ts +1 -0
- package/dist/admin/src/preview/index.d.ts +4 -0
- package/dist/admin/src/preview/services/preview.d.ts +3 -0
- package/dist/server/index.js +344 -144
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +344 -144
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
- package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/history/services/utils.d.ts +2 -3
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +4 -4
- package/dist/server/src/preview/constants.d.ts +2 -0
- package/dist/server/src/preview/constants.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/index.d.ts +2 -0
- package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/preview.d.ts +13 -0
- package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
- package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
- package/dist/server/src/preview/index.d.ts +4 -0
- package/dist/server/src/preview/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/index.d.ts +8 -0
- package/dist/server/src/preview/routes/index.d.ts.map +1 -0
- package/dist/server/src/preview/routes/preview.d.ts +4 -0
- package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
- package/dist/server/src/preview/services/index.d.ts +15 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview-config.d.ts +30 -0
- package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview.d.ts +12 -0
- package/dist/server/src/preview/services/preview.d.ts.map +1 -0
- package/dist/server/src/preview/utils.d.ts +18 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -0
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts +8 -8
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +4 -4
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
- package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
- package/dist/server/src/utils/index.d.ts +2 -0
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/dist/shared/contracts/index.d.ts +1 -0
- package/dist/shared/contracts/index.d.ts.map +1 -1
- package/dist/shared/contracts/preview.d.ts +27 -0
- package/dist/shared/contracts/preview.d.ts.map +1 -0
- package/dist/shared/index.js +4 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs +4 -0
- package/dist/shared/index.mjs.map +1 -1
- package/package.json +7 -7
- package/dist/_chunks/EditViewPage-8mOu02ji.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-BMVgUNOX.js.map +0 -1
- package/dist/_chunks/Field-CJPYzwD7.mjs.map +0 -1
- package/dist/_chunks/Field-CdSLKFQk.js.map +0 -1
- package/dist/_chunks/History-B-Mrquzu.js.map +0 -1
- package/dist/_chunks/History-MnQLtk1g.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-q0SHVPUS.js.map +0 -1
- package/dist/_chunks/Relations-B53wYe8g.js.map +0 -1
- package/dist/_chunks/Relations-CIexb8gr.mjs.map +0 -1
- package/dist/_chunks/index-CJ2vYwuT.mjs.map +0 -1
- package/dist/_chunks/index-DbT2sx-Q.js.map +0 -1
- package/dist/_chunks/relations-Cl-6t9iz.js.map +0 -1
- package/dist/_chunks/relations-DI0lguF0.mjs.map +0 -1
@@ -1,9 +1,10 @@
|
|
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";
|
7
|
+
import mapValues from "lodash/fp/mapValues";
|
7
8
|
import { useIntl } from "react-intl";
|
8
9
|
import { useParams, useNavigate, Navigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
|
9
10
|
import * as yup from "yup";
|
@@ -968,9 +969,10 @@ const formatEditLayout = (data, {
|
|
968
969
|
currentPanelIndex += 2;
|
969
970
|
} else {
|
970
971
|
if (!panels[currentPanelIndex]) {
|
971
|
-
panels.push([]);
|
972
|
+
panels.push([row]);
|
973
|
+
} else {
|
974
|
+
panels[currentPanelIndex].push(row);
|
972
975
|
}
|
973
|
-
panels[currentPanelIndex].push(row);
|
974
976
|
}
|
975
977
|
return panels;
|
976
978
|
}, []);
|
@@ -1662,7 +1664,7 @@ const useDocumentActions = () => {
|
|
1662
1664
|
};
|
1663
1665
|
};
|
1664
1666
|
const ProtectedHistoryPage = lazy(
|
1665
|
-
() => import("./History-
|
1667
|
+
() => import("./History-BOhLaq_g.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1666
1668
|
);
|
1667
1669
|
const routes$1 = [
|
1668
1670
|
{
|
@@ -1675,31 +1677,31 @@ const routes$1 = [
|
|
1675
1677
|
}
|
1676
1678
|
];
|
1677
1679
|
const ProtectedEditViewPage = lazy(
|
1678
|
-
() => import("./EditViewPage-
|
1680
|
+
() => import("./EditViewPage-DAtscabN.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1679
1681
|
);
|
1680
1682
|
const ProtectedListViewPage = lazy(
|
1681
|
-
() => import("./ListViewPage-
|
1683
|
+
() => import("./ListViewPage-ns-bmy5C.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1682
1684
|
);
|
1683
1685
|
const ProtectedListConfiguration = lazy(
|
1684
|
-
() => import("./ListConfigurationPage-
|
1686
|
+
() => import("./ListConfigurationPage-D0vQez6F.mjs").then((mod) => ({
|
1685
1687
|
default: mod.ProtectedListConfiguration
|
1686
1688
|
}))
|
1687
1689
|
);
|
1688
1690
|
const ProtectedEditConfigurationPage = lazy(
|
1689
|
-
() => import("./EditConfigurationPage-
|
1691
|
+
() => import("./EditConfigurationPage-_prbqpTM.mjs").then((mod) => ({
|
1690
1692
|
default: mod.ProtectedEditConfigurationPage
|
1691
1693
|
}))
|
1692
1694
|
);
|
1693
1695
|
const ProtectedComponentConfigurationPage = lazy(
|
1694
|
-
() => import("./ComponentConfigurationPage-
|
1696
|
+
() => import("./ComponentConfigurationPage-BpM_Hc7r.mjs").then((mod) => ({
|
1695
1697
|
default: mod.ProtectedComponentConfigurationPage
|
1696
1698
|
}))
|
1697
1699
|
);
|
1698
1700
|
const NoPermissions = lazy(
|
1699
|
-
() => import("./NoPermissionsPage-
|
1701
|
+
() => import("./NoPermissionsPage-B0GdMw1Q.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1700
1702
|
);
|
1701
1703
|
const NoContentType = lazy(
|
1702
|
-
() => import("./NoContentTypePage-
|
1704
|
+
() => import("./NoContentTypePage-BA5ZKMDR.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1703
1705
|
);
|
1704
1706
|
const CollectionTypePages = () => {
|
1705
1707
|
const { collectionType } = useParams();
|
@@ -2053,6 +2055,18 @@ const DocumentActionModal = ({
|
|
2053
2055
|
typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer
|
2054
2056
|
] }) });
|
2055
2057
|
};
|
2058
|
+
const transformData = (data) => {
|
2059
|
+
if (Array.isArray(data)) {
|
2060
|
+
return data.map(transformData);
|
2061
|
+
}
|
2062
|
+
if (typeof data === "object" && data !== null) {
|
2063
|
+
if ("apiData" in data) {
|
2064
|
+
return data.apiData;
|
2065
|
+
}
|
2066
|
+
return mapValues(transformData)(data);
|
2067
|
+
}
|
2068
|
+
return data;
|
2069
|
+
};
|
2056
2070
|
const PublishAction$1 = ({
|
2057
2071
|
activeTab,
|
2058
2072
|
documentId,
|
@@ -2166,7 +2180,7 @@ const PublishAction$1 = ({
|
|
2166
2180
|
documentId,
|
2167
2181
|
params
|
2168
2182
|
},
|
2169
|
-
formValues
|
2183
|
+
transformData(formValues)
|
2170
2184
|
);
|
2171
2185
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2172
2186
|
navigate({
|
@@ -2282,7 +2296,7 @@ const UpdateAction = ({
|
|
2282
2296
|
documentId: cloneMatch.params.origin,
|
2283
2297
|
params
|
2284
2298
|
},
|
2285
|
-
document
|
2299
|
+
transformData(document)
|
2286
2300
|
);
|
2287
2301
|
if ("data" in res) {
|
2288
2302
|
navigate(
|
@@ -2303,7 +2317,7 @@ const UpdateAction = ({
|
|
2303
2317
|
documentId,
|
2304
2318
|
params
|
2305
2319
|
},
|
2306
|
-
document
|
2320
|
+
transformData(document)
|
2307
2321
|
);
|
2308
2322
|
if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2309
2323
|
setErrors(formatValidationErrors(res.error));
|
@@ -2316,7 +2330,7 @@ const UpdateAction = ({
|
|
2316
2330
|
model,
|
2317
2331
|
params
|
2318
2332
|
},
|
2319
|
-
document
|
2333
|
+
transformData(document)
|
2320
2334
|
);
|
2321
2335
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2322
2336
|
navigate(
|
@@ -3004,7 +3018,7 @@ const Panel = React.forwardRef(({ children, title }, ref) => {
|
|
3004
3018
|
justifyContent: "stretch",
|
3005
3019
|
alignItems: "flex-start",
|
3006
3020
|
children: [
|
3007
|
-
/* @__PURE__ */ jsx(Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", children: title }),
|
3021
|
+
/* @__PURE__ */ jsx(Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", textColor: "neutral600", children: title }),
|
3008
3022
|
children
|
3009
3023
|
]
|
3010
3024
|
}
|
@@ -3987,6 +4001,82 @@ const { setInitialData } = actions;
|
|
3987
4001
|
const reducer = combineReducers({
|
3988
4002
|
app: reducer$1
|
3989
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 { data, error } = useGetPreviewUrlQuery({
|
4025
|
+
params: {
|
4026
|
+
contentType: model
|
4027
|
+
},
|
4028
|
+
query: {
|
4029
|
+
documentId,
|
4030
|
+
locale: document?.locale,
|
4031
|
+
status: document?.status
|
4032
|
+
}
|
4033
|
+
});
|
4034
|
+
if (!data?.data?.url || error) {
|
4035
|
+
return null;
|
4036
|
+
}
|
4037
|
+
const { url } = data.data;
|
4038
|
+
const handleCopyLink = () => {
|
4039
|
+
copy(url);
|
4040
|
+
toggleNotification({
|
4041
|
+
message: formatMessage({
|
4042
|
+
id: "content-manager.preview.copy.success",
|
4043
|
+
defaultMessage: "Copied preview link"
|
4044
|
+
}),
|
4045
|
+
type: "success"
|
4046
|
+
});
|
4047
|
+
};
|
4048
|
+
return {
|
4049
|
+
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4050
|
+
content: /* @__PURE__ */ jsxs(Flex, { gap: 2, width: "100%", children: [
|
4051
|
+
/* @__PURE__ */ jsx(Button, { variant: "tertiary", tag: Link, to: url, target: "_blank", flex: "auto", children: formatMessage({
|
4052
|
+
id: "content-manager.preview.panel.button",
|
4053
|
+
defaultMessage: "Open preview"
|
4054
|
+
}) }),
|
4055
|
+
/* @__PURE__ */ jsx(
|
4056
|
+
IconButton,
|
4057
|
+
{
|
4058
|
+
type: "button",
|
4059
|
+
label: formatMessage({
|
4060
|
+
id: "preview.copy.label",
|
4061
|
+
defaultMessage: "Copy preview link"
|
4062
|
+
}),
|
4063
|
+
onClick: handleCopyLink,
|
4064
|
+
children: /* @__PURE__ */ jsx(Link$1, {})
|
4065
|
+
}
|
4066
|
+
)
|
4067
|
+
] })
|
4068
|
+
};
|
4069
|
+
};
|
4070
|
+
const FEATURE_ID = "preview";
|
4071
|
+
const previewAdmin = {
|
4072
|
+
bootstrap(app) {
|
4073
|
+
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
4074
|
+
return;
|
4075
|
+
}
|
4076
|
+
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4077
|
+
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4078
|
+
}
|
4079
|
+
};
|
3990
4080
|
const index = {
|
3991
4081
|
register(app) {
|
3992
4082
|
const cm = new ContentManagerPlugin();
|
@@ -4006,7 +4096,7 @@ const index = {
|
|
4006
4096
|
app.router.addRoute({
|
4007
4097
|
path: "content-manager/*",
|
4008
4098
|
lazy: async () => {
|
4009
|
-
const { Layout } = await import("./layout-
|
4099
|
+
const { Layout } = await import("./layout-CrTxOnCy.mjs");
|
4010
4100
|
return {
|
4011
4101
|
Component: Layout
|
4012
4102
|
};
|
@@ -4019,11 +4109,14 @@ const index = {
|
|
4019
4109
|
if (typeof historyAdmin.bootstrap === "function") {
|
4020
4110
|
historyAdmin.bootstrap(app);
|
4021
4111
|
}
|
4112
|
+
if (typeof previewAdmin.bootstrap === "function") {
|
4113
|
+
previewAdmin.bootstrap(app);
|
4114
|
+
}
|
4022
4115
|
},
|
4023
4116
|
async registerTrads({ locales }) {
|
4024
4117
|
const importedTrads = await Promise.all(
|
4025
4118
|
locales.map((locale) => {
|
4026
|
-
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-
|
4119
|
+
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 }) => {
|
4027
4120
|
return {
|
4028
4121
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4029
4122
|
locale
|
@@ -4084,4 +4177,4 @@ export {
|
|
4084
4177
|
capitalise as y,
|
4085
4178
|
useUpdateContentTypeConfigurationMutation as z
|
4086
4179
|
};
|
4087
|
-
//# sourceMappingURL=index-
|
4180
|
+
//# sourceMappingURL=index-3_WeHXYp.mjs.map
|