@strapi/content-manager 0.0.0-experimental.65b9961ce81496e349024ceb95be1d5946f2c429 → 0.0.0-experimental.6665eb3c1eed3f48d650cca09220447cd02aa7c2
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/CardDragPreview-C0QyJgRA.js.map +1 -1
- package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CO977CPh.js → ComponentConfigurationPage-BLWQy8ru.js} +4 -5
- package/dist/_chunks/{ComponentConfigurationPage-CO977CPh.js.map → ComponentConfigurationPage-BLWQy8ru.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CQroR9Qk.mjs → ComponentConfigurationPage-CtIa3aa2.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CQroR9Qk.mjs.map → ComponentConfigurationPage-CtIa3aa2.mjs.map} +1 -1
- package/dist/_chunks/{ComponentIcon-BXdiCGQp.js → ComponentIcon-CRbtQEUV.js} +2 -3
- package/dist/_chunks/{ComponentIcon-BXdiCGQp.js.map → ComponentIcon-CRbtQEUV.js.map} +1 -1
- package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -1
- package/dist/_chunks/{EditConfigurationPage-tVCJ5vWC.mjs → EditConfigurationPage-DsPR2DVk.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-tVCJ5vWC.mjs.map → EditConfigurationPage-DsPR2DVk.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BPgoE-kf.js → EditConfigurationPage-RQkymxCy.js} +4 -5
- package/dist/_chunks/{EditConfigurationPage-BPgoE-kf.js.map → EditConfigurationPage-RQkymxCy.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-BMVgUNOX.js → EditViewPage-B-kExt8C.js} +38 -9
- package/dist/_chunks/EditViewPage-B-kExt8C.js.map +1 -0
- package/dist/_chunks/{EditViewPage-8mOu02ji.mjs → EditViewPage-BPyVuPfM.mjs} +38 -8
- package/dist/_chunks/EditViewPage-BPyVuPfM.mjs.map +1 -0
- package/dist/_chunks/{Field-CdSLKFQk.js → Field-DPIsQRre.js} +177 -122
- package/dist/_chunks/Field-DPIsQRre.js.map +1 -0
- package/dist/_chunks/{Field-CJPYzwD7.mjs → Field-Dltnt1km.mjs} +175 -120
- package/dist/_chunks/Field-Dltnt1km.mjs.map +1 -0
- package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
- package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
- package/dist/_chunks/{Form-eP5bZwap.js → Form-BFi4MXMT.js} +5 -6
- package/dist/_chunks/{Form-eP5bZwap.js.map → Form-BFi4MXMT.js.map} +1 -1
- package/dist/_chunks/{Form-DJOJ-GF1.mjs → Form-C1IcWm1u.mjs} +3 -3
- package/dist/_chunks/{Form-DJOJ-GF1.mjs.map → Form-C1IcWm1u.mjs.map} +1 -1
- package/dist/_chunks/{History-MnQLtk1g.mjs → History-04ChQ4pl.mjs} +51 -97
- package/dist/_chunks/History-04ChQ4pl.mjs.map +1 -0
- package/dist/_chunks/{History-B-Mrquzu.js → History-wjcK4L0C.js} +51 -98
- package/dist/_chunks/History-wjcK4L0C.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-BcycI8Lw.mjs → ListConfigurationPage-BYqPYLSU.mjs} +6 -5
- package/dist/_chunks/ListConfigurationPage-BYqPYLSU.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-C0n4rUzH.js → ListConfigurationPage-CRbxIC3J.js} +6 -6
- package/dist/_chunks/ListConfigurationPage-CRbxIC3J.js.map +1 -0
- package/dist/_chunks/{ListViewPage-q0SHVPUS.js → ListViewPage-D5NY9183.js} +63 -41
- package/dist/_chunks/ListViewPage-D5NY9183.js.map +1 -0
- package/dist/_chunks/{ListViewPage-CRXONXwZ.mjs → ListViewPage-FU2LBuhl.mjs} +62 -39
- package/dist/_chunks/ListViewPage-FU2LBuhl.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-Bh3komDV.js → NoContentTypePage-BgQVE_Qb.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-Bh3komDV.js.map → NoContentTypePage-BgQVE_Qb.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-ukzFRF3z.mjs → NoContentTypePage-DCKUkwb8.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-ukzFRF3z.mjs.map → NoContentTypePage-DCKUkwb8.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BGBpj_Y1.js → NoPermissionsPage-C5jwn70o.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BGBpj_Y1.js.map → NoPermissionsPage-C5jwn70o.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-B4sD7Ble.mjs → NoPermissionsPage-jqve7C8l.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-B4sD7Ble.mjs.map → NoPermissionsPage-jqve7C8l.mjs.map} +1 -1
- package/dist/_chunks/Preview-BMYN548c.mjs +294 -0
- package/dist/_chunks/Preview-BMYN548c.mjs.map +1 -0
- package/dist/_chunks/Preview-DaOihysv.js +312 -0
- package/dist/_chunks/Preview-DaOihysv.js.map +1 -0
- package/dist/_chunks/{Relations-B53wYe8g.js → Relations-CTGM7Hv5.js} +47 -23
- package/dist/_chunks/Relations-CTGM7Hv5.js.map +1 -0
- package/dist/_chunks/{Relations-CIexb8gr.mjs → Relations-gscPkxjF.mjs} +47 -22
- package/dist/_chunks/Relations-gscPkxjF.mjs.map +1 -0
- package/dist/_chunks/{en-Bm0D0IWz.js → en-BzQmavmK.js} +21 -4
- package/dist/_chunks/{en-Bm0D0IWz.js.map → en-BzQmavmK.js.map} +1 -1
- package/dist/_chunks/{en-DKV44jRb.mjs → en-CSxLmrh1.mjs} +21 -4
- package/dist/_chunks/{en-DKV44jRb.mjs.map → en-CSxLmrh1.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/hooks-BAaaKPS_.js.map +1 -1
- package/dist/_chunks/{index-DbT2sx-Q.js → index-Ca7YWlAA.js} +388 -191
- package/dist/_chunks/index-Ca7YWlAA.js.map +1 -0
- package/dist/_chunks/{index-CJ2vYwuT.mjs → index-DqasUQ6Q.mjs} +390 -193
- package/dist/_chunks/index-DqasUQ6Q.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-CeBSIkmP.js → layout-BW80JSCd.js} +5 -6
- package/dist/_chunks/{layout-CeBSIkmP.js.map → layout-BW80JSCd.js.map} +1 -1
- package/dist/_chunks/{layout-vzKSrr7p.mjs → layout-W3clJSCy.mjs} +4 -4
- package/dist/_chunks/{layout-vzKSrr7p.mjs.map → layout-W3clJSCy.mjs.map} +1 -1
- package/dist/_chunks/objects-BcXOv6_9.js.map +1 -1
- package/dist/_chunks/objects-D6yBsdmx.mjs.map +1 -1
- package/dist/_chunks/{relations-DI0lguF0.mjs → relations-BlDkoeWh.mjs} +6 -7
- package/dist/_chunks/relations-BlDkoeWh.mjs.map +1 -0
- package/dist/_chunks/{relations-Cl-6t9iz.js → relations-C9Usz9k5.js} +6 -7
- package/dist/_chunks/relations-C9Usz9k5.js.map +1 -0
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -1
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -1
- package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
- package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
- package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
- package/dist/admin/index.js +2 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +5 -4
- package/dist/admin/src/content-manager.d.ts +3 -2
- package/dist/admin/src/exports.d.ts +1 -0
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +7 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +1 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
- package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
- package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
- package/dist/admin/src/preview/index.d.ts +4 -0
- package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
- package/dist/admin/src/preview/routes.d.ts +3 -0
- package/dist/admin/src/preview/services/preview.d.ts +3 -0
- package/dist/admin/src/router.d.ts +1 -1
- package/dist/admin/src/services/api.d.ts +1 -1
- package/dist/admin/src/services/components.d.ts +2 -2
- package/dist/admin/src/services/contentTypes.d.ts +3 -3
- package/dist/admin/src/services/documents.d.ts +16 -19
- package/dist/admin/src/services/init.d.ts +1 -1
- package/dist/admin/src/services/relations.d.ts +2 -2
- package/dist/admin/src/services/uid.d.ts +3 -3
- package/dist/server/index.js +560 -317
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +561 -317
- 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 +16 -1
- package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
- package/dist/server/src/history/controllers/history-version.d.ts +1 -1
- package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
- package/dist/server/src/history/services/history.d.ts +3 -3
- package/dist/server/src/history/services/history.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 +6 -11
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +7 -6
- package/dist/server/src/index.d.ts.map +1 -1
- 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 +16 -0
- package/dist/server/src/preview/services/index.d.ts.map +1 -0
- package/dist/server/src/preview/services/preview-config.d.ts +32 -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 +19 -0
- package/dist/server/src/preview/utils.d.ts.map +1 -0
- package/dist/server/src/register.d.ts.map +1 -1
- package/dist/server/src/routes/index.d.ts.map +1 -1
- package/dist/server/src/services/document-manager.d.ts.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts +12 -10
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +7 -6
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/utils/populate.d.ts +2 -2
- package/dist/server/src/services/utils/populate.d.ts.map +1 -1
- 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 +13 -11
- 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/ListConfigurationPage-BcycI8Lw.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-C0n4rUzH.js.map +0 -1
- package/dist/_chunks/ListViewPage-CRXONXwZ.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
@@ -4,18 +4,18 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const strapiAdmin = require("@strapi/admin/strapi-admin");
|
5
5
|
const React = require("react");
|
6
6
|
const designSystem = require("@strapi/design-system");
|
7
|
+
const mapValues = require("lodash/fp/mapValues");
|
7
8
|
const reactIntl = require("react-intl");
|
8
9
|
const reactRouterDom = require("react-router-dom");
|
10
|
+
const styledComponents = require("styled-components");
|
9
11
|
const yup = require("yup");
|
12
|
+
const qs = require("qs");
|
10
13
|
const pipe = require("lodash/fp/pipe");
|
11
14
|
const dateFns = require("date-fns");
|
12
|
-
const styledComponents = require("styled-components");
|
13
|
-
const qs = require("qs");
|
14
15
|
const toolkit = require("@reduxjs/toolkit");
|
15
16
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
16
17
|
function _interopNamespace(e) {
|
17
|
-
if (e && e.__esModule)
|
18
|
-
return e;
|
18
|
+
if (e && e.__esModule) return e;
|
19
19
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
20
20
|
if (e) {
|
21
21
|
for (const k in e) {
|
@@ -32,15 +32,23 @@ function _interopNamespace(e) {
|
|
32
32
|
return Object.freeze(n);
|
33
33
|
}
|
34
34
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
35
|
+
const mapValues__default = /* @__PURE__ */ _interopDefault(mapValues);
|
35
36
|
const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
|
36
37
|
const pipe__default = /* @__PURE__ */ _interopDefault(pipe);
|
37
|
-
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
38
|
+
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
38
39
|
const v = glob[path];
|
39
40
|
if (v) {
|
40
41
|
return typeof v === "function" ? v() : Promise.resolve(v);
|
41
42
|
}
|
42
43
|
return new Promise((_, reject) => {
|
43
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
44
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
45
|
+
reject.bind(
|
46
|
+
null,
|
47
|
+
new Error(
|
48
|
+
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
49
|
+
)
|
50
|
+
)
|
51
|
+
);
|
44
52
|
});
|
45
53
|
};
|
46
54
|
const PLUGIN_ID = "content-manager";
|
@@ -188,7 +196,8 @@ const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
|
|
188
196
|
"InitialData",
|
189
197
|
"HistoryVersion",
|
190
198
|
"Relations",
|
191
|
-
"UidAvailability"
|
199
|
+
"UidAvailability",
|
200
|
+
"RecentDocumentList"
|
192
201
|
]
|
193
202
|
});
|
194
203
|
const documentApi = contentManagerApi.injectEndpoints({
|
@@ -206,7 +215,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
206
215
|
if (error) {
|
207
216
|
return [];
|
208
217
|
}
|
209
|
-
return [{ type: "Document", id: `${model}_LIST` }];
|
218
|
+
return [{ type: "Document", id: `${model}_LIST` }, "RecentDocumentList"];
|
210
219
|
}
|
211
220
|
}),
|
212
221
|
cloneDocument: builder.mutation({
|
@@ -220,7 +229,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
220
229
|
}),
|
221
230
|
invalidatesTags: (_result, _error, { model }) => [
|
222
231
|
{ type: "Document", id: `${model}_LIST` },
|
223
|
-
{ type: "UidAvailability", id: model }
|
232
|
+
{ type: "UidAvailability", id: model },
|
233
|
+
"RecentDocumentList"
|
224
234
|
]
|
225
235
|
}),
|
226
236
|
/**
|
@@ -239,8 +249,21 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
239
249
|
invalidatesTags: (result, _error, { model }) => [
|
240
250
|
{ type: "Document", id: `${model}_LIST` },
|
241
251
|
"Relations",
|
242
|
-
{ type: "UidAvailability", id: model }
|
243
|
-
|
252
|
+
{ type: "UidAvailability", id: model },
|
253
|
+
"RecentDocumentList"
|
254
|
+
],
|
255
|
+
transformResponse: (response, meta, arg) => {
|
256
|
+
if (!("data" in response) && arg.model === "plugin::users-permissions.user") {
|
257
|
+
return {
|
258
|
+
data: response,
|
259
|
+
meta: {
|
260
|
+
availableStatus: [],
|
261
|
+
availableLocales: []
|
262
|
+
}
|
263
|
+
};
|
264
|
+
}
|
265
|
+
return response;
|
266
|
+
}
|
244
267
|
}),
|
245
268
|
deleteDocument: builder.mutation({
|
246
269
|
query: ({ collectionType, model, documentId, params }) => ({
|
@@ -251,7 +274,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
251
274
|
}
|
252
275
|
}),
|
253
276
|
invalidatesTags: (_result, _error, { collectionType, model }) => [
|
254
|
-
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model }
|
277
|
+
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model },
|
278
|
+
"RecentDocumentList"
|
255
279
|
]
|
256
280
|
}),
|
257
281
|
deleteManyDocuments: builder.mutation({
|
@@ -263,7 +287,10 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
263
287
|
params
|
264
288
|
}
|
265
289
|
}),
|
266
|
-
invalidatesTags: (_res, _error, { model }) => [
|
290
|
+
invalidatesTags: (_res, _error, { model }) => [
|
291
|
+
{ type: "Document", id: `${model}_LIST` },
|
292
|
+
"RecentDocumentList"
|
293
|
+
]
|
267
294
|
}),
|
268
295
|
discardDocument: builder.mutation({
|
269
296
|
query: ({ collectionType, model, documentId, params }) => ({
|
@@ -281,7 +308,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
281
308
|
},
|
282
309
|
{ type: "Document", id: `${model}_LIST` },
|
283
310
|
"Relations",
|
284
|
-
{ type: "UidAvailability", id: model }
|
311
|
+
{ type: "UidAvailability", id: model },
|
312
|
+
"RecentDocumentList"
|
285
313
|
];
|
286
314
|
}
|
287
315
|
}),
|
@@ -294,7 +322,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
294
322
|
url: `/content-manager/collection-types/${model}`,
|
295
323
|
method: "GET",
|
296
324
|
config: {
|
297
|
-
params
|
325
|
+
params: qs.stringify(params, { encode: true })
|
298
326
|
}
|
299
327
|
}),
|
300
328
|
providesTags: (result, _error, arg) => {
|
@@ -376,7 +404,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
376
404
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
377
405
|
},
|
378
406
|
{ type: "Document", id: `${model}_LIST` },
|
379
|
-
"Relations"
|
407
|
+
"Relations",
|
408
|
+
"RecentDocumentList"
|
380
409
|
];
|
381
410
|
}
|
382
411
|
}),
|
@@ -407,7 +436,9 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
407
436
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
408
437
|
},
|
409
438
|
"Relations",
|
410
|
-
{ type: "UidAvailability", id: model }
|
439
|
+
{ type: "UidAvailability", id: model },
|
440
|
+
"RecentDocumentList",
|
441
|
+
"RecentDocumentList"
|
411
442
|
];
|
412
443
|
},
|
413
444
|
async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
|
@@ -437,7 +468,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
437
468
|
{
|
438
469
|
type: "Document",
|
439
470
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
440
|
-
}
|
471
|
+
},
|
472
|
+
"RecentDocumentList"
|
441
473
|
];
|
442
474
|
}
|
443
475
|
}),
|
@@ -450,7 +482,10 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
450
482
|
params
|
451
483
|
}
|
452
484
|
}),
|
453
|
-
invalidatesTags: (_res, _error, { model, documentIds }) =>
|
485
|
+
invalidatesTags: (_res, _error, { model, documentIds }) => [
|
486
|
+
...documentIds.map((id) => ({ type: "Document", id: `${model}_${id}` })),
|
487
|
+
"RecentDocumentList"
|
488
|
+
]
|
454
489
|
})
|
455
490
|
})
|
456
491
|
});
|
@@ -473,8 +508,7 @@ const {
|
|
473
508
|
useUnpublishManyDocumentsMutation
|
474
509
|
} = documentApi;
|
475
510
|
const buildValidParams = (query) => {
|
476
|
-
if (!query)
|
477
|
-
return query;
|
511
|
+
if (!query) return query;
|
478
512
|
const { plugins: _, ...validQueryParams } = {
|
479
513
|
...query,
|
480
514
|
...Object.values(query?.plugins ?? {}).reduce(
|
@@ -482,9 +516,6 @@ const buildValidParams = (query) => {
|
|
482
516
|
{}
|
483
517
|
)
|
484
518
|
};
|
485
|
-
if ("_q" in validQueryParams) {
|
486
|
-
validQueryParams._q = encodeURIComponent(validQueryParams._q);
|
487
|
-
}
|
488
519
|
return validQueryParams;
|
489
520
|
};
|
490
521
|
const isBaseQueryError = (error) => {
|
@@ -989,9 +1020,10 @@ const formatEditLayout = (data, {
|
|
989
1020
|
currentPanelIndex += 2;
|
990
1021
|
} else {
|
991
1022
|
if (!panels[currentPanelIndex]) {
|
992
|
-
panels.push([]);
|
1023
|
+
panels.push([row]);
|
1024
|
+
} else {
|
1025
|
+
panels[currentPanelIndex].push(row);
|
993
1026
|
}
|
994
|
-
panels[currentPanelIndex].push(row);
|
995
1027
|
}
|
996
1028
|
return panels;
|
997
1029
|
}, []);
|
@@ -1682,10 +1714,10 @@ const useDocumentActions = () => {
|
|
1682
1714
|
update
|
1683
1715
|
};
|
1684
1716
|
};
|
1685
|
-
const ProtectedHistoryPage =
|
1686
|
-
() => Promise.resolve().then(() => require("./History-
|
1717
|
+
const ProtectedHistoryPage = React__namespace.lazy(
|
1718
|
+
() => Promise.resolve().then(() => require("./History-wjcK4L0C.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1687
1719
|
);
|
1688
|
-
const routes$
|
1720
|
+
const routes$2 = [
|
1689
1721
|
{
|
1690
1722
|
path: ":collectionType/:slug/:id/history",
|
1691
1723
|
Component: ProtectedHistoryPage
|
@@ -1695,32 +1727,45 @@ const routes$1 = [
|
|
1695
1727
|
Component: ProtectedHistoryPage
|
1696
1728
|
}
|
1697
1729
|
];
|
1730
|
+
const ProtectedPreviewPage = React__namespace.lazy(
|
1731
|
+
() => Promise.resolve().then(() => require("./Preview-DaOihysv.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
|
1732
|
+
);
|
1733
|
+
const routes$1 = [
|
1734
|
+
{
|
1735
|
+
path: ":collectionType/:slug/:id/preview",
|
1736
|
+
Component: ProtectedPreviewPage
|
1737
|
+
},
|
1738
|
+
{
|
1739
|
+
path: ":collectionType/:slug/preview",
|
1740
|
+
Component: ProtectedPreviewPage
|
1741
|
+
}
|
1742
|
+
];
|
1698
1743
|
const ProtectedEditViewPage = React.lazy(
|
1699
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1744
|
+
() => Promise.resolve().then(() => require("./EditViewPage-B-kExt8C.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1700
1745
|
);
|
1701
1746
|
const ProtectedListViewPage = React.lazy(
|
1702
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1747
|
+
() => Promise.resolve().then(() => require("./ListViewPage-D5NY9183.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1703
1748
|
);
|
1704
1749
|
const ProtectedListConfiguration = React.lazy(
|
1705
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1750
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-CRbxIC3J.js")).then((mod) => ({
|
1706
1751
|
default: mod.ProtectedListConfiguration
|
1707
1752
|
}))
|
1708
1753
|
);
|
1709
1754
|
const ProtectedEditConfigurationPage = React.lazy(
|
1710
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1755
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-RQkymxCy.js")).then((mod) => ({
|
1711
1756
|
default: mod.ProtectedEditConfigurationPage
|
1712
1757
|
}))
|
1713
1758
|
);
|
1714
1759
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1715
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1760
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-BLWQy8ru.js")).then((mod) => ({
|
1716
1761
|
default: mod.ProtectedComponentConfigurationPage
|
1717
1762
|
}))
|
1718
1763
|
);
|
1719
1764
|
const NoPermissions = React.lazy(
|
1720
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1765
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-C5jwn70o.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1721
1766
|
);
|
1722
1767
|
const NoContentType = React.lazy(
|
1723
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1768
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-BgQVE_Qb.js")).then((mod) => ({ default: mod.NoContentType }))
|
1724
1769
|
);
|
1725
1770
|
const CollectionTypePages = () => {
|
1726
1771
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1732,7 +1777,7 @@ const CollectionTypePages = () => {
|
|
1732
1777
|
const CLONE_RELATIVE_PATH = ":collectionType/:slug/clone/:origin";
|
1733
1778
|
const CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;
|
1734
1779
|
const LIST_RELATIVE_PATH = ":collectionType/:slug";
|
1735
|
-
const LIST_PATH = `/content-manager
|
1780
|
+
const LIST_PATH = `/content-manager/collection-types/:slug`;
|
1736
1781
|
const routes = [
|
1737
1782
|
{
|
1738
1783
|
path: LIST_RELATIVE_PATH,
|
@@ -1766,6 +1811,7 @@ const routes = [
|
|
1766
1811
|
path: "no-content-types",
|
1767
1812
|
Component: NoContentType
|
1768
1813
|
},
|
1814
|
+
...routes$2,
|
1769
1815
|
...routes$1
|
1770
1816
|
];
|
1771
1817
|
const DocumentActions = ({ actions: actions2 }) => {
|
@@ -1864,6 +1910,11 @@ const DocumentActionButton = (action) => {
|
|
1864
1910
|
) : null
|
1865
1911
|
] });
|
1866
1912
|
};
|
1913
|
+
const MenuItem = styledComponents.styled(designSystem.Menu.Item)`
|
1914
|
+
&:hover {
|
1915
|
+
background: ${({ theme, isVariantDanger, isDisabled }) => isVariantDanger && !isDisabled ? theme.colors.danger100 : "neutral"};
|
1916
|
+
}
|
1917
|
+
`;
|
1867
1918
|
const DocumentActionsMenu = ({
|
1868
1919
|
actions: actions2,
|
1869
1920
|
children,
|
@@ -1922,48 +1973,32 @@ const DocumentActionsMenu = ({
|
|
1922
1973
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1923
1974
|
actions2.map((action) => {
|
1924
1975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
1925
|
-
|
1976
|
+
MenuItem,
|
1926
1977
|
{
|
1927
1978
|
disabled: action.disabled,
|
1928
1979
|
onSelect: handleClick(action),
|
1929
1980
|
display: "block",
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
designSystem.Flex,
|
1952
|
-
{
|
1953
|
-
alignItems: "center",
|
1954
|
-
background: "alternative100",
|
1955
|
-
borderStyle: "solid",
|
1956
|
-
borderColor: "alternative200",
|
1957
|
-
borderWidth: "1px",
|
1958
|
-
height: 5,
|
1959
|
-
paddingLeft: 2,
|
1960
|
-
paddingRight: 2,
|
1961
|
-
hasRadius: true,
|
1962
|
-
color: "alternative600",
|
1963
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", lineHeight: 1, children: formatMessage({ id: "global.new", defaultMessage: "New" }) })
|
1964
|
-
}
|
1965
|
-
)
|
1966
|
-
] })
|
1981
|
+
isVariantDanger: action.variant === "danger",
|
1982
|
+
isDisabled: action.disabled,
|
1983
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
1984
|
+
designSystem.Flex,
|
1985
|
+
{
|
1986
|
+
color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
|
1987
|
+
gap: 2,
|
1988
|
+
tag: "span",
|
1989
|
+
children: [
|
1990
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
1991
|
+
designSystem.Flex,
|
1992
|
+
{
|
1993
|
+
tag: "span",
|
1994
|
+
color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
|
1995
|
+
children: action.icon
|
1996
|
+
}
|
1997
|
+
),
|
1998
|
+
action.label
|
1999
|
+
]
|
2000
|
+
}
|
2001
|
+
) })
|
1967
2002
|
},
|
1968
2003
|
action.id
|
1969
2004
|
);
|
@@ -2074,6 +2109,18 @@ const DocumentActionModal = ({
|
|
2074
2109
|
typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
|
2075
2110
|
] }) });
|
2076
2111
|
};
|
2112
|
+
const transformData = (data) => {
|
2113
|
+
if (Array.isArray(data)) {
|
2114
|
+
return data.map(transformData);
|
2115
|
+
}
|
2116
|
+
if (typeof data === "object" && data !== null) {
|
2117
|
+
if ("apiData" in data) {
|
2118
|
+
return data.apiData;
|
2119
|
+
}
|
2120
|
+
return mapValues__default.default(transformData)(data);
|
2121
|
+
}
|
2122
|
+
return data;
|
2123
|
+
};
|
2077
2124
|
const PublishAction$1 = ({
|
2078
2125
|
activeTab,
|
2079
2126
|
documentId,
|
@@ -2088,6 +2135,7 @@ const PublishAction$1 = ({
|
|
2088
2135
|
const { _unstableFormatValidationErrors: formatValidationErrors } = strapiAdmin.useAPIErrorHandler();
|
2089
2136
|
const isListView = reactRouterDom.useMatch(LIST_PATH) !== null;
|
2090
2137
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
2138
|
+
const { id } = reactRouterDom.useParams();
|
2091
2139
|
const { formatMessage } = reactIntl.useIntl();
|
2092
2140
|
const canPublish = useDocumentRBAC("PublishAction", ({ canPublish: canPublish2 }) => canPublish2);
|
2093
2141
|
const { publish } = useDocumentActions();
|
@@ -2187,13 +2235,15 @@ const PublishAction$1 = ({
|
|
2187
2235
|
documentId,
|
2188
2236
|
params
|
2189
2237
|
},
|
2190
|
-
formValues
|
2238
|
+
transformData(formValues)
|
2191
2239
|
);
|
2192
2240
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2193
|
-
|
2194
|
-
|
2195
|
-
|
2196
|
-
|
2241
|
+
if (id === "create") {
|
2242
|
+
navigate({
|
2243
|
+
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
2244
|
+
search: rawQuery
|
2245
|
+
});
|
2246
|
+
}
|
2197
2247
|
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2198
2248
|
setErrors(formatValidationErrors(res.error));
|
2199
2249
|
}
|
@@ -2246,6 +2296,7 @@ const PublishAction$1 = ({
|
|
2246
2296
|
};
|
2247
2297
|
};
|
2248
2298
|
PublishAction$1.type = "publish";
|
2299
|
+
PublishAction$1.position = "panel";
|
2249
2300
|
const UpdateAction = ({
|
2250
2301
|
activeTab,
|
2251
2302
|
documentId,
|
@@ -2268,96 +2319,134 @@ const UpdateAction = ({
|
|
2268
2319
|
const validate = strapiAdmin.useForm("UpdateAction", (state) => state.validate);
|
2269
2320
|
const setErrors = strapiAdmin.useForm("UpdateAction", (state) => state.setErrors);
|
2270
2321
|
const resetForm = strapiAdmin.useForm("PublishAction", ({ resetForm: resetForm2 }) => resetForm2);
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
status: "draft"
|
2322
|
+
const handleUpdate = React__namespace.useCallback(async () => {
|
2323
|
+
setSubmitting(true);
|
2324
|
+
try {
|
2325
|
+
if (!modified) {
|
2326
|
+
return;
|
2327
|
+
}
|
2328
|
+
const { errors } = await validate(true, {
|
2329
|
+
status: "draft"
|
2330
|
+
});
|
2331
|
+
if (errors) {
|
2332
|
+
toggleNotification({
|
2333
|
+
type: "danger",
|
2334
|
+
message: formatMessage({
|
2335
|
+
id: "content-manager.validation.error",
|
2336
|
+
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
2337
|
+
})
|
2288
2338
|
});
|
2289
|
-
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
model,
|
2303
|
-
documentId: cloneMatch.params.origin,
|
2304
|
-
params
|
2305
|
-
},
|
2306
|
-
document
|
2307
|
-
);
|
2308
|
-
if ("data" in res) {
|
2309
|
-
navigate(
|
2310
|
-
{
|
2311
|
-
pathname: `../${res.data.documentId}`,
|
2312
|
-
search: rawQuery
|
2313
|
-
},
|
2314
|
-
{ relative: "path" }
|
2315
|
-
);
|
2316
|
-
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2317
|
-
setErrors(formatValidationErrors(res.error));
|
2318
|
-
}
|
2319
|
-
} else if (documentId || collectionType === SINGLE_TYPES) {
|
2320
|
-
const res = await update(
|
2339
|
+
return;
|
2340
|
+
}
|
2341
|
+
if (isCloning) {
|
2342
|
+
const res = await clone(
|
2343
|
+
{
|
2344
|
+
model,
|
2345
|
+
documentId: cloneMatch.params.origin,
|
2346
|
+
params
|
2347
|
+
},
|
2348
|
+
transformData(document)
|
2349
|
+
);
|
2350
|
+
if ("data" in res) {
|
2351
|
+
navigate(
|
2321
2352
|
{
|
2322
|
-
|
2323
|
-
|
2324
|
-
documentId,
|
2325
|
-
params
|
2353
|
+
pathname: `../${res.data.documentId}`,
|
2354
|
+
search: rawQuery
|
2326
2355
|
},
|
2327
|
-
|
2356
|
+
{ relative: "path" }
|
2328
2357
|
);
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2358
|
+
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2359
|
+
setErrors(formatValidationErrors(res.error));
|
2360
|
+
}
|
2361
|
+
} else if (documentId || collectionType === SINGLE_TYPES) {
|
2362
|
+
const res = await update(
|
2363
|
+
{
|
2364
|
+
collectionType,
|
2365
|
+
model,
|
2366
|
+
documentId,
|
2367
|
+
params
|
2368
|
+
},
|
2369
|
+
transformData(document)
|
2370
|
+
);
|
2371
|
+
if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2372
|
+
setErrors(formatValidationErrors(res.error));
|
2334
2373
|
} else {
|
2335
|
-
|
2374
|
+
resetForm();
|
2375
|
+
}
|
2376
|
+
} else {
|
2377
|
+
const res = await create(
|
2378
|
+
{
|
2379
|
+
model,
|
2380
|
+
params
|
2381
|
+
},
|
2382
|
+
transformData(document)
|
2383
|
+
);
|
2384
|
+
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2385
|
+
navigate(
|
2336
2386
|
{
|
2337
|
-
|
2338
|
-
|
2387
|
+
pathname: `../${res.data.documentId}`,
|
2388
|
+
search: rawQuery
|
2339
2389
|
},
|
2340
|
-
|
2390
|
+
{ replace: true, relative: "path" }
|
2341
2391
|
);
|
2342
|
-
|
2343
|
-
|
2344
|
-
{
|
2345
|
-
pathname: `../${res.data.documentId}`,
|
2346
|
-
search: rawQuery
|
2347
|
-
},
|
2348
|
-
{ replace: true, relative: "path" }
|
2349
|
-
);
|
2350
|
-
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2351
|
-
setErrors(formatValidationErrors(res.error));
|
2352
|
-
}
|
2392
|
+
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2393
|
+
setErrors(formatValidationErrors(res.error));
|
2353
2394
|
}
|
2354
|
-
} finally {
|
2355
|
-
setSubmitting(false);
|
2356
2395
|
}
|
2396
|
+
} finally {
|
2397
|
+
setSubmitting(false);
|
2357
2398
|
}
|
2399
|
+
}, [
|
2400
|
+
clone,
|
2401
|
+
cloneMatch?.params.origin,
|
2402
|
+
collectionType,
|
2403
|
+
create,
|
2404
|
+
document,
|
2405
|
+
documentId,
|
2406
|
+
formatMessage,
|
2407
|
+
formatValidationErrors,
|
2408
|
+
isCloning,
|
2409
|
+
model,
|
2410
|
+
modified,
|
2411
|
+
navigate,
|
2412
|
+
params,
|
2413
|
+
rawQuery,
|
2414
|
+
resetForm,
|
2415
|
+
setErrors,
|
2416
|
+
setSubmitting,
|
2417
|
+
toggleNotification,
|
2418
|
+
update,
|
2419
|
+
validate
|
2420
|
+
]);
|
2421
|
+
React__namespace.useEffect(() => {
|
2422
|
+
const handleKeyDown = (e) => {
|
2423
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
2424
|
+
e.preventDefault();
|
2425
|
+
handleUpdate();
|
2426
|
+
}
|
2427
|
+
};
|
2428
|
+
window.addEventListener("keydown", handleKeyDown);
|
2429
|
+
return () => {
|
2430
|
+
window.removeEventListener("keydown", handleKeyDown);
|
2431
|
+
};
|
2432
|
+
}, [handleUpdate]);
|
2433
|
+
return {
|
2434
|
+
/**
|
2435
|
+
* Disabled when:
|
2436
|
+
* - the form is submitting
|
2437
|
+
* - the document is not modified & we're not cloning (you can save a clone entity straight away)
|
2438
|
+
* - the active tab is the published tab
|
2439
|
+
*/
|
2440
|
+
disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
|
2441
|
+
label: formatMessage({
|
2442
|
+
id: "global.save",
|
2443
|
+
defaultMessage: "Save"
|
2444
|
+
}),
|
2445
|
+
onClick: handleUpdate
|
2358
2446
|
};
|
2359
2447
|
};
|
2360
2448
|
UpdateAction.type = "update";
|
2449
|
+
UpdateAction.position = "panel";
|
2361
2450
|
const UNPUBLISH_DRAFT_OPTIONS = {
|
2362
2451
|
KEEP: "keep",
|
2363
2452
|
DISCARD: "discard"
|
@@ -2480,6 +2569,7 @@ const UnpublishAction$1 = ({
|
|
2480
2569
|
};
|
2481
2570
|
};
|
2482
2571
|
UnpublishAction$1.type = "unpublish";
|
2572
|
+
UnpublishAction$1.position = "panel";
|
2483
2573
|
const DiscardAction = ({
|
2484
2574
|
activeTab,
|
2485
2575
|
documentId,
|
@@ -2530,6 +2620,7 @@ const DiscardAction = ({
|
|
2530
2620
|
};
|
2531
2621
|
};
|
2532
2622
|
DiscardAction.type = "discard";
|
2623
|
+
DiscardAction.position = "panel";
|
2533
2624
|
const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
|
2534
2625
|
const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
|
2535
2626
|
const RelativeTime = React__namespace.forwardRef(
|
@@ -2542,7 +2633,7 @@ const RelativeTime = React__namespace.forwardRef(
|
|
2542
2633
|
});
|
2543
2634
|
const unit = intervals.find((intervalUnit) => {
|
2544
2635
|
return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);
|
2545
|
-
});
|
2636
|
+
}) ?? "seconds";
|
2546
2637
|
const relativeTime = dateFns.isPast(timestamp) ? -interval[unit] : interval[unit];
|
2547
2638
|
const customInterval = customIntervals.find(
|
2548
2639
|
(custom) => interval[custom.unit] < custom.threshold
|
@@ -2576,19 +2667,29 @@ const getDisplayName = ({
|
|
2576
2667
|
return email ?? "";
|
2577
2668
|
};
|
2578
2669
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2579
|
-
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2670
|
+
const DocumentStatus = ({ status = "draft", size = "S", ...restProps }) => {
|
2580
2671
|
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2581
|
-
|
2672
|
+
const { formatMessage } = reactIntl.useIntl();
|
2673
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, size, variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
|
2674
|
+
id: `content-manager.containers.List.${status}`,
|
2675
|
+
defaultMessage: capitalise(status)
|
2676
|
+
}) }) });
|
2582
2677
|
};
|
2583
2678
|
const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
|
2584
2679
|
const { formatMessage } = reactIntl.useIntl();
|
2585
2680
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
2681
|
+
const params = reactRouterDom.useParams();
|
2586
2682
|
const title = isCreating ? formatMessage({
|
2587
2683
|
id: "content-manager.containers.edit.title.new",
|
2588
2684
|
defaultMessage: "Create an entry"
|
2589
2685
|
}) : documentTitle;
|
2590
2686
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
|
2591
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
2687
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
2688
|
+
strapiAdmin.BackButton,
|
2689
|
+
{
|
2690
|
+
fallback: params.collectionType === SINGLE_TYPES ? void 0 : `../${COLLECTION_TYPES}/${params.slug}`
|
2691
|
+
}
|
2692
|
+
),
|
2592
2693
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
|
2593
2694
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
|
2594
2695
|
/* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
|
@@ -2639,7 +2740,7 @@ const HeaderToolbar = () => {
|
|
2639
2740
|
meta: isCloning ? void 0 : meta,
|
2640
2741
|
collectionType
|
2641
2742
|
},
|
2642
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions(),
|
2743
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions("header"),
|
2643
2744
|
children: (actions2) => {
|
2644
2745
|
const headerActions = actions2.filter((action) => {
|
2645
2746
|
const positions = Array.isArray(action.position) ? action.position : [action.position];
|
@@ -2847,6 +2948,7 @@ const ConfigureTheViewAction = ({ collectionType, model }) => {
|
|
2847
2948
|
};
|
2848
2949
|
};
|
2849
2950
|
ConfigureTheViewAction.type = "configure-the-view";
|
2951
|
+
ConfigureTheViewAction.position = "header";
|
2850
2952
|
const EditTheModelAction = ({ model }) => {
|
2851
2953
|
const navigate = reactRouterDom.useNavigate();
|
2852
2954
|
const { formatMessage } = reactIntl.useIntl();
|
@@ -2863,6 +2965,7 @@ const EditTheModelAction = ({ model }) => {
|
|
2863
2965
|
};
|
2864
2966
|
};
|
2865
2967
|
EditTheModelAction.type = "edit-the-model";
|
2968
|
+
EditTheModelAction.position = "header";
|
2866
2969
|
const DeleteAction$1 = ({ documentId, model, collectionType, document }) => {
|
2867
2970
|
const navigate = reactRouterDom.useNavigate();
|
2868
2971
|
const { formatMessage } = reactIntl.useIntl();
|
@@ -2936,6 +3039,7 @@ const DeleteAction$1 = ({ documentId, model, collectionType, document }) => {
|
|
2936
3039
|
};
|
2937
3040
|
};
|
2938
3041
|
DeleteAction$1.type = "delete";
|
3042
|
+
DeleteAction$1.position = ["header", "table-row"];
|
2939
3043
|
const DEFAULT_HEADER_ACTIONS = [EditTheModelAction, ConfigureTheViewAction, DeleteAction$1];
|
2940
3044
|
const Panels = () => {
|
2941
3045
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
@@ -2998,7 +3102,7 @@ const ActionsPanelContent = () => {
|
|
2998
3102
|
strapiAdmin.DescriptionComponentRenderer,
|
2999
3103
|
{
|
3000
3104
|
props,
|
3001
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions(),
|
3105
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions("panel"),
|
3002
3106
|
children: (actions2) => /* @__PURE__ */ jsxRuntime.jsx(DocumentActions, { actions: actions2 })
|
3003
3107
|
}
|
3004
3108
|
),
|
@@ -3025,7 +3129,7 @@ const Panel = React__namespace.forwardRef(({ children, title }, ref) => {
|
|
3025
3129
|
justifyContent: "stretch",
|
3026
3130
|
alignItems: "flex-start",
|
3027
3131
|
children: [
|
3028
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", children: title }),
|
3132
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", textColor: "neutral600", children: title }),
|
3029
3133
|
children
|
3030
3134
|
]
|
3031
3135
|
}
|
@@ -3275,18 +3379,10 @@ const SelectedEntriesTableContent = ({
|
|
3275
3379
|
search: row.locale && `?plugins[i18n][locale]=${row.locale}`
|
3276
3380
|
},
|
3277
3381
|
state: { from: pathname },
|
3278
|
-
label: formatMessage(
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3282
|
-
{
|
3283
|
-
id: "content-manager.components.ListViewHelperPluginTable.row-line",
|
3284
|
-
defaultMessage: "item line {number}"
|
3285
|
-
},
|
3286
|
-
{ number: index2 + 1 }
|
3287
|
-
)
|
3288
|
-
}
|
3289
|
-
),
|
3382
|
+
label: formatMessage({
|
3383
|
+
id: "content-manager.bulk-publish.edit",
|
3384
|
+
defaultMessage: "Edit"
|
3385
|
+
}),
|
3290
3386
|
target: "_blank",
|
3291
3387
|
marginLeft: "auto",
|
3292
3388
|
variant: "ghost",
|
@@ -3460,8 +3556,7 @@ const PublishAction = ({ documents, model }) => {
|
|
3460
3556
|
const refetchList = () => {
|
3461
3557
|
contentManagerApi.util.invalidateTags([{ type: "Document", id: `${model}_LIST` }]);
|
3462
3558
|
};
|
3463
|
-
if (!showPublishButton)
|
3464
|
-
return null;
|
3559
|
+
if (!showPublishButton) return null;
|
3465
3560
|
return {
|
3466
3561
|
actionType: "publish",
|
3467
3562
|
variant: "tertiary",
|
@@ -3529,8 +3624,7 @@ const DeleteAction = ({ documents, model }) => {
|
|
3529
3624
|
selectRow([]);
|
3530
3625
|
}
|
3531
3626
|
};
|
3532
|
-
if (!hasDeletePermission)
|
3533
|
-
return null;
|
3627
|
+
if (!hasDeletePermission) return null;
|
3534
3628
|
return {
|
3535
3629
|
variant: "danger-light",
|
3536
3630
|
label: formatMessage({ id: "global.delete", defaultMessage: "Delete" }),
|
@@ -3579,8 +3673,7 @@ const UnpublishAction = ({ documents, model }) => {
|
|
3579
3673
|
}
|
3580
3674
|
};
|
3581
3675
|
const showUnpublishButton = hasDraftAndPublishEnabled && hasPublishPermission && documents.some((entry) => entry.status === "published" || entry.status === "modified");
|
3582
|
-
if (!showUnpublishButton)
|
3583
|
-
return null;
|
3676
|
+
if (!showUnpublishButton) return null;
|
3584
3677
|
return {
|
3585
3678
|
variant: "tertiary",
|
3586
3679
|
label: formatMessage({ id: "app.utils.unpublish", defaultMessage: "Unpublish" }),
|
@@ -3685,7 +3778,7 @@ const TableActions = ({ document }) => {
|
|
3685
3778
|
strapiAdmin.DescriptionComponentRenderer,
|
3686
3779
|
{
|
3687
3780
|
props,
|
3688
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions().filter((action) => action.name !== "PublishAction"),
|
3781
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions("table-row").filter((action) => action.name !== "PublishAction"),
|
3689
3782
|
children: (actions2) => {
|
3690
3783
|
const tableRowActions = actions2.filter((action) => {
|
3691
3784
|
const positions = Array.isArray(action.position) ? action.position : [action.position];
|
@@ -3744,6 +3837,7 @@ const EditAction = ({ documentId }) => {
|
|
3744
3837
|
};
|
3745
3838
|
};
|
3746
3839
|
EditAction.type = "edit";
|
3840
|
+
EditAction.position = "table-row";
|
3747
3841
|
const StyledPencil = styledComponents.styled(Icons.Pencil)`
|
3748
3842
|
path {
|
3749
3843
|
fill: currentColor;
|
@@ -3820,6 +3914,7 @@ const CloneAction = ({ model, documentId }) => {
|
|
3820
3914
|
};
|
3821
3915
|
};
|
3822
3916
|
CloneAction.type = "clone";
|
3917
|
+
CloneAction.position = "table-row";
|
3823
3918
|
const StyledDuplicate = styledComponents.styled(Icons.Duplicate)`
|
3824
3919
|
path {
|
3825
3920
|
fill: currentColor;
|
@@ -3906,7 +4001,14 @@ class ContentManagerPlugin {
|
|
3906
4001
|
addDocumentHeaderAction: this.addDocumentHeaderAction.bind(this),
|
3907
4002
|
addEditViewSidePanel: this.addEditViewSidePanel.bind(this),
|
3908
4003
|
getBulkActions: () => this.bulkActions,
|
3909
|
-
getDocumentActions: () =>
|
4004
|
+
getDocumentActions: (position) => {
|
4005
|
+
if (position) {
|
4006
|
+
return this.documentActions.filter(
|
4007
|
+
(action) => action.position == void 0 || [action.position].flat().includes(position)
|
4008
|
+
);
|
4009
|
+
}
|
4010
|
+
return this.documentActions;
|
4011
|
+
},
|
3910
4012
|
getEditViewSidePanels: () => this.editViewSidePanels,
|
3911
4013
|
getHeaderActions: () => this.headerActions
|
3912
4014
|
}
|
@@ -3916,10 +4018,8 @@ class ContentManagerPlugin {
|
|
3916
4018
|
const getPrintableType = (value) => {
|
3917
4019
|
const nativeType = typeof value;
|
3918
4020
|
if (nativeType === "object") {
|
3919
|
-
if (value === null)
|
3920
|
-
|
3921
|
-
if (Array.isArray(value))
|
3922
|
-
return "array";
|
4021
|
+
if (value === null) return "null";
|
4022
|
+
if (Array.isArray(value)) return "array";
|
3923
4023
|
if (value instanceof Object && value.constructor.name !== "Object") {
|
3924
4024
|
return value.constructor.name;
|
3925
4025
|
}
|
@@ -3930,17 +4030,27 @@ const HistoryAction = ({ model, document }) => {
|
|
3930
4030
|
const { formatMessage } = reactIntl.useIntl();
|
3931
4031
|
const [{ query }] = strapiAdmin.useQueryParams();
|
3932
4032
|
const navigate = reactRouterDom.useNavigate();
|
4033
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
4034
|
+
const { pathname } = reactRouterDom.useLocation();
|
3933
4035
|
const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
|
3934
4036
|
if (!window.strapi.features.isEnabled("cms-content-history")) {
|
3935
4037
|
return null;
|
3936
4038
|
}
|
4039
|
+
const handleOnClick = () => {
|
4040
|
+
const destination = { pathname: "history", search: pluginsQueryParams };
|
4041
|
+
trackUsage("willNavigate", {
|
4042
|
+
from: pathname,
|
4043
|
+
to: `${pathname}/${destination.pathname}`
|
4044
|
+
});
|
4045
|
+
navigate(destination);
|
4046
|
+
};
|
3937
4047
|
return {
|
3938
4048
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
|
3939
4049
|
label: formatMessage({
|
3940
4050
|
id: "content-manager.history.document-action",
|
3941
4051
|
defaultMessage: "Content History"
|
3942
4052
|
}),
|
3943
|
-
onClick:
|
4053
|
+
onClick: handleOnClick,
|
3944
4054
|
disabled: (
|
3945
4055
|
/**
|
3946
4056
|
* The user is creating a new document.
|
@@ -3962,6 +4072,7 @@ const HistoryAction = ({ model, document }) => {
|
|
3962
4072
|
};
|
3963
4073
|
};
|
3964
4074
|
HistoryAction.type = "history";
|
4075
|
+
HistoryAction.position = "header";
|
3965
4076
|
const historyAdmin = {
|
3966
4077
|
bootstrap(app) {
|
3967
4078
|
const { addDocumentAction } = app.getPlugin("content-manager").apis;
|
@@ -4008,6 +4119,88 @@ const { setInitialData } = actions;
|
|
4008
4119
|
const reducer = toolkit.combineReducers({
|
4009
4120
|
app: reducer$1
|
4010
4121
|
});
|
4122
|
+
const previewApi = contentManagerApi.injectEndpoints({
|
4123
|
+
endpoints: (builder) => ({
|
4124
|
+
getPreviewUrl: builder.query({
|
4125
|
+
query({ query, params }) {
|
4126
|
+
return {
|
4127
|
+
url: `/content-manager/preview/url/${params.contentType}`,
|
4128
|
+
method: "GET",
|
4129
|
+
config: {
|
4130
|
+
params: query
|
4131
|
+
}
|
4132
|
+
};
|
4133
|
+
}
|
4134
|
+
})
|
4135
|
+
})
|
4136
|
+
});
|
4137
|
+
const { useGetPreviewUrlQuery } = previewApi;
|
4138
|
+
const ConditionalTooltip = ({ isShown, label, children }) => {
|
4139
|
+
if (isShown) {
|
4140
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label, children });
|
4141
|
+
}
|
4142
|
+
return children;
|
4143
|
+
};
|
4144
|
+
const PreviewSidePanel = ({ model, documentId, document }) => {
|
4145
|
+
const { formatMessage } = reactIntl.useIntl();
|
4146
|
+
const { trackUsage } = strapiAdmin.useTracking();
|
4147
|
+
const { pathname } = reactRouterDom.useLocation();
|
4148
|
+
const [{ query }] = strapiAdmin.useQueryParams();
|
4149
|
+
const isModified = strapiAdmin.useForm("PreviewSidePanel", (state) => state.modified);
|
4150
|
+
const { data, error } = useGetPreviewUrlQuery({
|
4151
|
+
params: {
|
4152
|
+
contentType: model
|
4153
|
+
},
|
4154
|
+
query: {
|
4155
|
+
documentId,
|
4156
|
+
locale: document?.locale,
|
4157
|
+
status: document?.status
|
4158
|
+
}
|
4159
|
+
});
|
4160
|
+
if (!data?.data?.url || error) {
|
4161
|
+
return null;
|
4162
|
+
}
|
4163
|
+
const trackNavigation = () => {
|
4164
|
+
const destinationPathname = pathname.replace(/\/$/, "") + "/preview";
|
4165
|
+
trackUsage("willNavigate", { from: pathname, to: destinationPathname });
|
4166
|
+
};
|
4167
|
+
return {
|
4168
|
+
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4169
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(
|
4170
|
+
ConditionalTooltip,
|
4171
|
+
{
|
4172
|
+
label: formatMessage({
|
4173
|
+
id: "content-manager.preview.panel.button-disabled-tooltip",
|
4174
|
+
defaultMessage: "Please save to open the preview"
|
4175
|
+
}),
|
4176
|
+
isShown: isModified,
|
4177
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { cursor: "not-allowed", width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
|
4178
|
+
designSystem.Button,
|
4179
|
+
{
|
4180
|
+
variant: "tertiary",
|
4181
|
+
tag: reactRouterDom.Link,
|
4182
|
+
to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
|
4183
|
+
onClick: trackNavigation,
|
4184
|
+
width: "100%",
|
4185
|
+
disabled: isModified,
|
4186
|
+
pointerEvents: isModified ? "none" : void 0,
|
4187
|
+
tabIndex: isModified ? -1 : void 0,
|
4188
|
+
children: formatMessage({
|
4189
|
+
id: "content-manager.preview.panel.button",
|
4190
|
+
defaultMessage: "Open preview"
|
4191
|
+
})
|
4192
|
+
}
|
4193
|
+
) })
|
4194
|
+
}
|
4195
|
+
)
|
4196
|
+
};
|
4197
|
+
};
|
4198
|
+
const previewAdmin = {
|
4199
|
+
bootstrap(app) {
|
4200
|
+
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4201
|
+
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4202
|
+
}
|
4203
|
+
};
|
4011
4204
|
const index = {
|
4012
4205
|
register(app) {
|
4013
4206
|
const cm = new ContentManagerPlugin();
|
@@ -4027,7 +4220,7 @@ const index = {
|
|
4027
4220
|
app.router.addRoute({
|
4028
4221
|
path: "content-manager/*",
|
4029
4222
|
lazy: async () => {
|
4030
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4223
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-BW80JSCd.js"));
|
4031
4224
|
return {
|
4032
4225
|
Component: Layout
|
4033
4226
|
};
|
@@ -4040,11 +4233,14 @@ const index = {
|
|
4040
4233
|
if (typeof historyAdmin.bootstrap === "function") {
|
4041
4234
|
historyAdmin.bootstrap(app);
|
4042
4235
|
}
|
4236
|
+
if (typeof previewAdmin.bootstrap === "function") {
|
4237
|
+
previewAdmin.bootstrap(app);
|
4238
|
+
}
|
4043
4239
|
},
|
4044
4240
|
async registerTrads({ locales }) {
|
4045
4241
|
const importedTrads = await Promise.all(
|
4046
4242
|
locales.map((locale) => {
|
4047
|
-
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-
|
4243
|
+
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-BzQmavmK.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`, 3).then(({ default: data }) => {
|
4048
4244
|
return {
|
4049
4245
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4050
4246
|
locale
|
@@ -4102,5 +4298,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
|
|
4102
4298
|
exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
4103
4299
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
4104
4300
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4301
|
+
exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
|
4105
4302
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4106
|
-
//# sourceMappingURL=index-
|
4303
|
+
//# sourceMappingURL=index-Ca7YWlAA.js.map
|