@strapi/content-manager 0.0.0-experimental.8c83c87960f2f5ddf95ae2f0acf849052f4a9ab4 → 0.0.0-experimental.8e4302929d7fe147203ed0266450d0a565c69660
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-BgCLcjXO.mjs → ComponentConfigurationPage-D4H-v0et.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BgCLcjXO.mjs.map → ComponentConfigurationPage-D4H-v0et.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-DywpTZeV.js → ComponentConfigurationPage-DdkVGfXC.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DywpTZeV.js.map → ComponentConfigurationPage-DdkVGfXC.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BNjOAHNS.mjs → EditConfigurationPage-D1nvB7Br.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BNjOAHNS.mjs.map → EditConfigurationPage-D1nvB7Br.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CxRlP5if.js → EditConfigurationPage-LYEvR4fW.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CxRlP5if.js.map → EditConfigurationPage-LYEvR4fW.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-CD_hqc1J.mjs → EditViewPage-Bcnff6Vd.mjs} +11 -74
- package/dist/_chunks/EditViewPage-Bcnff6Vd.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-BRewdTqE.js → EditViewPage-DqelJ9UK.js} +13 -76
- package/dist/_chunks/EditViewPage-DqelJ9UK.js.map +1 -0
- package/dist/_chunks/{Form-C_Gwv8P_.js → Form-CnHfBeiB.js} +2 -2
- package/dist/_chunks/{Form-C_Gwv8P_.js.map → Form-CnHfBeiB.js.map} +1 -1
- package/dist/_chunks/{Form-Czi0cf_2.mjs → Form-CzPCJi3B.mjs} +2 -2
- package/dist/_chunks/{Form-Czi0cf_2.mjs.map → Form-CzPCJi3B.mjs.map} +1 -1
- package/dist/_chunks/{History-CIQHyi4T.mjs → History-CcmSn3Mj.mjs} +32 -8
- package/dist/_chunks/History-CcmSn3Mj.mjs.map +1 -0
- package/dist/_chunks/{History-C1TKAig-.js → History-zArjENzj.js} +43 -19
- package/dist/_chunks/History-zArjENzj.js.map +1 -0
- package/dist/_chunks/{Field-DwvmENVf.js → Input-CDHKQd7o.js} +1300 -1276
- package/dist/_chunks/Input-CDHKQd7o.js.map +1 -0
- package/dist/_chunks/{Field-BPkQ-3Ku.mjs → Input-aV8SSoTa.mjs} +1218 -1195
- package/dist/_chunks/Input-aV8SSoTa.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DcZsfyEL.mjs → ListConfigurationPage-BPvzENJJ.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-DcZsfyEL.mjs.map → ListConfigurationPage-BPvzENJJ.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-D-NGRLYu.js → ListConfigurationPage-ByZAO_9H.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-D-NGRLYu.js.map → ListConfigurationPage-ByZAO_9H.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-xv5IQoZp.js → ListViewPage-BVKBeQAA.js} +13 -10
- package/dist/_chunks/{ListViewPage-xv5IQoZp.js.map → ListViewPage-BVKBeQAA.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-C10McTK1.mjs → ListViewPage-HljQVnFH.mjs} +8 -5
- package/dist/_chunks/{ListViewPage-C10McTK1.mjs.map → ListViewPage-HljQVnFH.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Dzw5Yj5u.js → NoContentTypePage-BV5zfDxr.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-Dzw5Yj5u.js.map → NoContentTypePage-BV5zfDxr.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CPc0Cd3S.mjs → NoContentTypePage-BfHaSM-K.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-CPc0Cd3S.mjs.map → NoContentTypePage-BfHaSM-K.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-wfPBh2_0.mjs → NoPermissionsPage-D6ze2nQL.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-wfPBh2_0.mjs.map → NoPermissionsPage-D6ze2nQL.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DAe5CDCC.js → NoPermissionsPage-vdNpc6jb.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DAe5CDCC.js.map → NoPermissionsPage-vdNpc6jb.js.map} +1 -1
- package/dist/_chunks/{Preview-B7LyGT_b.js → Preview-DEHdENT1.js} +29 -14
- package/dist/_chunks/Preview-DEHdENT1.js.map +1 -0
- package/dist/_chunks/{Preview-BVFFm7uB.mjs → Preview-vfWOtPG5.mjs} +30 -15
- package/dist/_chunks/Preview-vfWOtPG5.mjs.map +1 -0
- package/dist/_chunks/{Relations-JPhWxk-s.mjs → Relations-B7_hbF0w.mjs} +6 -5
- package/dist/_chunks/Relations-B7_hbF0w.mjs.map +1 -0
- package/dist/_chunks/{Relations-BmYR1AjY.js → Relations-DcoOBejP.js} +6 -5
- package/dist/_chunks/Relations-DcoOBejP.js.map +1 -0
- package/dist/_chunks/{en-BK8Xyl5I.js → en-BR48D_RH.js} +9 -2
- package/dist/_chunks/{en-BK8Xyl5I.js.map → en-BR48D_RH.js.map} +1 -1
- package/dist/_chunks/{en-Dtk_ot79.mjs → en-D65uIF6Y.mjs} +9 -2
- package/dist/_chunks/{en-Dtk_ot79.mjs.map → en-D65uIF6Y.mjs.map} +1 -1
- package/dist/_chunks/{fr-B2Kyv8Z9.js → fr-C43IbhA_.js} +4 -1
- package/dist/_chunks/{fr-B2Kyv8Z9.js.map → fr-C43IbhA_.js.map} +1 -1
- package/dist/_chunks/{fr--pg5jUbt.mjs → fr-DBseuRuB.mjs} +4 -1
- package/dist/_chunks/{fr--pg5jUbt.mjs.map → fr-DBseuRuB.mjs.map} +1 -1
- package/dist/_chunks/{index-C2Q_PLWj.js → index-CxLSGwnk.js} +433 -157
- package/dist/_chunks/index-CxLSGwnk.js.map +1 -0
- package/dist/_chunks/{index-DLIkNVnQ.mjs → index-EH8ZtHd5.mjs} +452 -176
- package/dist/_chunks/index-EH8ZtHd5.mjs.map +1 -0
- package/dist/_chunks/{layout-qE8qkNH_.mjs → layout-CxDMdJ13.mjs} +3 -3
- package/dist/_chunks/{layout-qE8qkNH_.mjs.map → layout-CxDMdJ13.mjs.map} +1 -1
- package/dist/_chunks/{layout-7AsWJzZJ.js → layout-DSeUTfMv.js} +3 -3
- package/dist/_chunks/{layout-7AsWJzZJ.js.map → layout-DSeUTfMv.js.map} +1 -1
- package/dist/_chunks/{relations-BjHH_1Am.mjs → relations-B8_Uu38Q.mjs} +17 -3
- package/dist/_chunks/relations-B8_Uu38Q.mjs.map +1 -0
- package/dist/_chunks/{relations-EifVzf_2.js → relations-S5nNKdN3.js} +16 -2
- package/dist/_chunks/relations-S5nNKdN3.js.map +1 -0
- package/dist/_chunks/{useDebounce-CtcjDB3L.js → usePrev-B9w_-eYc.js} +1 -14
- package/dist/_chunks/usePrev-B9w_-eYc.js.map +1 -0
- package/dist/_chunks/usePrev-DH6iah0A.mjs +16 -0
- package/dist/_chunks/usePrev-DH6iah0A.mjs.map +1 -0
- package/dist/admin/index.js +2 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +6 -5
- 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/hooks/useDocument.d.ts +19 -2
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +1 -1
- 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/pages/EditView/components/FormLayout.d.ts +27 -0
- package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
- package/dist/admin/src/preview/pages/Preview.d.ts +1 -1
- package/dist/admin/src/preview/services/preview.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 -16
- 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 +156 -142
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +157 -143
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/utils/metadata.d.ts +1 -0
- 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/utils.d.ts +6 -10
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +3 -2
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/preview/index.d.ts.map +1 -1
- package/dist/server/src/services/document-metadata.d.ts +4 -2
- package/dist/server/src/services/document-metadata.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +3 -2
- 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/services/utils/populate.d.ts +2 -2
- package/dist/server/src/services/utils/populate.d.ts.map +1 -1
- package/package.json +8 -7
- package/dist/_chunks/EditViewPage-BRewdTqE.js.map +0 -1
- package/dist/_chunks/EditViewPage-CD_hqc1J.mjs.map +0 -1
- package/dist/_chunks/Field-BPkQ-3Ku.mjs.map +0 -1
- package/dist/_chunks/Field-DwvmENVf.js.map +0 -1
- package/dist/_chunks/History-C1TKAig-.js.map +0 -1
- package/dist/_chunks/History-CIQHyi4T.mjs.map +0 -1
- package/dist/_chunks/Preview-B7LyGT_b.js.map +0 -1
- package/dist/_chunks/Preview-BVFFm7uB.mjs.map +0 -1
- package/dist/_chunks/Relations-BmYR1AjY.js.map +0 -1
- package/dist/_chunks/Relations-JPhWxk-s.mjs.map +0 -1
- package/dist/_chunks/index-C2Q_PLWj.js.map +0 -1
- package/dist/_chunks/index-DLIkNVnQ.mjs.map +0 -1
- package/dist/_chunks/relations-BjHH_1Am.mjs.map +0 -1
- package/dist/_chunks/relations-EifVzf_2.js.map +0 -1
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +0 -1
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs +0 -29
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +0 -1
- package/dist/admin/src/preview/constants.d.ts +0 -1
- package/dist/server/src/preview/constants.d.ts +0 -2
- package/dist/server/src/preview/constants.d.ts.map +0 -1
@@ -9,8 +9,9 @@ const reactIntl = require("react-intl");
|
|
9
9
|
const reactRouterDom = require("react-router-dom");
|
10
10
|
const styledComponents = require("styled-components");
|
11
11
|
const yup = require("yup");
|
12
|
-
const
|
12
|
+
const fractionalIndexing = require("fractional-indexing");
|
13
13
|
const pipe = require("lodash/fp/pipe");
|
14
|
+
const qs = require("qs");
|
14
15
|
const dateFns = require("date-fns");
|
15
16
|
const toolkit = require("@reduxjs/toolkit");
|
16
17
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
@@ -187,6 +188,113 @@ const extractAndDedupeFields = (permissions = []) => permissions.flatMap((permis
|
|
187
188
|
(field, index2, arr) => arr.indexOf(field) === index2 && typeof field === "string"
|
188
189
|
);
|
189
190
|
const removeNumericalStrings = (arr) => arr.filter((item) => isNaN(Number(item)));
|
191
|
+
const BLOCK_LIST_ATTRIBUTE_KEYS = ["__component", "__temp_key__"];
|
192
|
+
const traverseData = (predicate, transform) => (schema, components = {}) => (data = {}) => {
|
193
|
+
const traverse = (datum, attributes) => {
|
194
|
+
return Object.entries(datum).reduce((acc, [key, value]) => {
|
195
|
+
const attribute = attributes[key];
|
196
|
+
if (BLOCK_LIST_ATTRIBUTE_KEYS.includes(key) || value === null || value === void 0) {
|
197
|
+
acc[key] = value;
|
198
|
+
return acc;
|
199
|
+
}
|
200
|
+
if (attribute.type === "component") {
|
201
|
+
if (attribute.repeatable) {
|
202
|
+
const componentValue = predicate(attribute, value) ? transform(value, attribute) : value;
|
203
|
+
acc[key] = componentValue.map(
|
204
|
+
(componentData) => traverse(componentData, components[attribute.component]?.attributes ?? {})
|
205
|
+
);
|
206
|
+
} else {
|
207
|
+
const componentValue = predicate(attribute, value) ? transform(value, attribute) : value;
|
208
|
+
acc[key] = traverse(componentValue, components[attribute.component]?.attributes ?? {});
|
209
|
+
}
|
210
|
+
} else if (attribute.type === "dynamiczone") {
|
211
|
+
const dynamicZoneValue = predicate(attribute, value) ? transform(value, attribute) : value;
|
212
|
+
acc[key] = dynamicZoneValue.map(
|
213
|
+
(componentData) => traverse(componentData, components[componentData.__component]?.attributes ?? {})
|
214
|
+
);
|
215
|
+
} else if (predicate(attribute, value)) {
|
216
|
+
acc[key] = transform(value, attribute);
|
217
|
+
} else {
|
218
|
+
acc[key] = value;
|
219
|
+
}
|
220
|
+
return acc;
|
221
|
+
}, {});
|
222
|
+
};
|
223
|
+
return traverse(data, schema.attributes);
|
224
|
+
};
|
225
|
+
const removeProhibitedFields = (prohibitedFields) => traverseData(
|
226
|
+
(attribute) => prohibitedFields.includes(attribute.type),
|
227
|
+
() => ""
|
228
|
+
);
|
229
|
+
const prepareRelations = traverseData(
|
230
|
+
(attribute) => attribute.type === "relation",
|
231
|
+
() => ({
|
232
|
+
connect: [],
|
233
|
+
disconnect: []
|
234
|
+
})
|
235
|
+
);
|
236
|
+
const prepareTempKeys = traverseData(
|
237
|
+
(attribute) => attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone",
|
238
|
+
(data) => {
|
239
|
+
if (Array.isArray(data) && data.length > 0) {
|
240
|
+
const keys = fractionalIndexing.generateNKeysBetween(void 0, void 0, data.length);
|
241
|
+
return data.map((datum, index2) => ({
|
242
|
+
...datum,
|
243
|
+
__temp_key__: keys[index2]
|
244
|
+
}));
|
245
|
+
}
|
246
|
+
return data;
|
247
|
+
}
|
248
|
+
);
|
249
|
+
const removeFieldsThatDontExistOnSchema = (schema) => (data) => {
|
250
|
+
const schemaKeys = Object.keys(schema.attributes);
|
251
|
+
const dataKeys = Object.keys(data);
|
252
|
+
const keysToRemove = dataKeys.filter((key) => !schemaKeys.includes(key));
|
253
|
+
const revisedData = [...keysToRemove, ...DOCUMENT_META_FIELDS].reduce((acc, key) => {
|
254
|
+
delete acc[key];
|
255
|
+
return acc;
|
256
|
+
}, structuredClone(data));
|
257
|
+
return revisedData;
|
258
|
+
};
|
259
|
+
const removeNullValues = (data) => {
|
260
|
+
return Object.entries(data).reduce((acc, [key, value]) => {
|
261
|
+
if (value === null) {
|
262
|
+
return acc;
|
263
|
+
}
|
264
|
+
acc[key] = value;
|
265
|
+
return acc;
|
266
|
+
}, {});
|
267
|
+
};
|
268
|
+
const transformDocument = (schema, components = {}) => (document) => {
|
269
|
+
const transformations = pipe__default.default(
|
270
|
+
removeFieldsThatDontExistOnSchema(schema),
|
271
|
+
removeProhibitedFields(["password"])(schema, components),
|
272
|
+
removeNullValues,
|
273
|
+
prepareRelations(schema, components),
|
274
|
+
prepareTempKeys(schema, components)
|
275
|
+
);
|
276
|
+
return transformations(document);
|
277
|
+
};
|
278
|
+
const createDefaultForm = (contentType, components = {}) => {
|
279
|
+
const traverseSchema = (attributes) => {
|
280
|
+
return Object.entries(attributes).reduce((acc, [key, attribute]) => {
|
281
|
+
if ("default" in attribute) {
|
282
|
+
acc[key] = attribute.default;
|
283
|
+
} else if (attribute.type === "component" && attribute.required) {
|
284
|
+
const defaultComponentForm = traverseSchema(components[attribute.component].attributes);
|
285
|
+
if (attribute.repeatable) {
|
286
|
+
acc[key] = attribute.min ? [...Array(attribute.min).fill(defaultComponentForm)] : [];
|
287
|
+
} else {
|
288
|
+
acc[key] = defaultComponentForm;
|
289
|
+
}
|
290
|
+
} else if (attribute.type === "dynamiczone" && attribute.required) {
|
291
|
+
acc[key] = [];
|
292
|
+
}
|
293
|
+
return acc;
|
294
|
+
}, {});
|
295
|
+
};
|
296
|
+
return traverseSchema(contentType.attributes);
|
297
|
+
};
|
190
298
|
const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
|
191
299
|
addTagTypes: [
|
192
300
|
"ComponentConfiguration",
|
@@ -196,7 +304,8 @@ const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
|
|
196
304
|
"InitialData",
|
197
305
|
"HistoryVersion",
|
198
306
|
"Relations",
|
199
|
-
"UidAvailability"
|
307
|
+
"UidAvailability",
|
308
|
+
"RecentDocumentList"
|
200
309
|
]
|
201
310
|
});
|
202
311
|
const documentApi = contentManagerApi.injectEndpoints({
|
@@ -214,7 +323,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
214
323
|
if (error) {
|
215
324
|
return [];
|
216
325
|
}
|
217
|
-
return [{ type: "Document", id: `${model}_LIST` }];
|
326
|
+
return [{ type: "Document", id: `${model}_LIST` }, "RecentDocumentList"];
|
218
327
|
}
|
219
328
|
}),
|
220
329
|
cloneDocument: builder.mutation({
|
@@ -228,7 +337,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
228
337
|
}),
|
229
338
|
invalidatesTags: (_result, _error, { model }) => [
|
230
339
|
{ type: "Document", id: `${model}_LIST` },
|
231
|
-
{ type: "UidAvailability", id: model }
|
340
|
+
{ type: "UidAvailability", id: model },
|
341
|
+
"RecentDocumentList"
|
232
342
|
]
|
233
343
|
}),
|
234
344
|
/**
|
@@ -247,8 +357,21 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
247
357
|
invalidatesTags: (result, _error, { model }) => [
|
248
358
|
{ type: "Document", id: `${model}_LIST` },
|
249
359
|
"Relations",
|
250
|
-
{ type: "UidAvailability", id: model }
|
251
|
-
|
360
|
+
{ type: "UidAvailability", id: model },
|
361
|
+
"RecentDocumentList"
|
362
|
+
],
|
363
|
+
transformResponse: (response, meta, arg) => {
|
364
|
+
if (!("data" in response) && arg.model === "plugin::users-permissions.user") {
|
365
|
+
return {
|
366
|
+
data: response,
|
367
|
+
meta: {
|
368
|
+
availableStatus: [],
|
369
|
+
availableLocales: []
|
370
|
+
}
|
371
|
+
};
|
372
|
+
}
|
373
|
+
return response;
|
374
|
+
}
|
252
375
|
}),
|
253
376
|
deleteDocument: builder.mutation({
|
254
377
|
query: ({ collectionType, model, documentId, params }) => ({
|
@@ -259,7 +382,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
259
382
|
}
|
260
383
|
}),
|
261
384
|
invalidatesTags: (_result, _error, { collectionType, model }) => [
|
262
|
-
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model }
|
385
|
+
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model },
|
386
|
+
"RecentDocumentList"
|
263
387
|
]
|
264
388
|
}),
|
265
389
|
deleteManyDocuments: builder.mutation({
|
@@ -271,7 +395,10 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
271
395
|
params
|
272
396
|
}
|
273
397
|
}),
|
274
|
-
invalidatesTags: (_res, _error, { model }) => [
|
398
|
+
invalidatesTags: (_res, _error, { model }) => [
|
399
|
+
{ type: "Document", id: `${model}_LIST` },
|
400
|
+
"RecentDocumentList"
|
401
|
+
]
|
275
402
|
}),
|
276
403
|
discardDocument: builder.mutation({
|
277
404
|
query: ({ collectionType, model, documentId, params }) => ({
|
@@ -289,7 +416,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
289
416
|
},
|
290
417
|
{ type: "Document", id: `${model}_LIST` },
|
291
418
|
"Relations",
|
292
|
-
{ type: "UidAvailability", id: model }
|
419
|
+
{ type: "UidAvailability", id: model },
|
420
|
+
"RecentDocumentList"
|
293
421
|
];
|
294
422
|
}
|
295
423
|
}),
|
@@ -384,7 +512,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
384
512
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
385
513
|
},
|
386
514
|
{ type: "Document", id: `${model}_LIST` },
|
387
|
-
"Relations"
|
515
|
+
"Relations",
|
516
|
+
"RecentDocumentList"
|
388
517
|
];
|
389
518
|
}
|
390
519
|
}),
|
@@ -415,7 +544,9 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
415
544
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
416
545
|
},
|
417
546
|
"Relations",
|
418
|
-
{ type: "UidAvailability", id: model }
|
547
|
+
{ type: "UidAvailability", id: model },
|
548
|
+
"RecentDocumentList",
|
549
|
+
"RecentDocumentList"
|
419
550
|
];
|
420
551
|
},
|
421
552
|
async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
|
@@ -445,7 +576,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
445
576
|
{
|
446
577
|
type: "Document",
|
447
578
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
448
|
-
}
|
579
|
+
},
|
580
|
+
"RecentDocumentList"
|
449
581
|
];
|
450
582
|
}
|
451
583
|
}),
|
@@ -458,7 +590,10 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
458
590
|
params
|
459
591
|
}
|
460
592
|
}),
|
461
|
-
invalidatesTags: (_res, _error, { model, documentIds }) =>
|
593
|
+
invalidatesTags: (_res, _error, { model, documentIds }) => [
|
594
|
+
...documentIds.map((id) => ({ type: "Document", id: `${model}_${id}` })),
|
595
|
+
"RecentDocumentList"
|
596
|
+
]
|
462
597
|
})
|
463
598
|
})
|
464
599
|
});
|
@@ -1129,6 +1264,7 @@ const convertListLayoutToFieldLayouts = (columns, attributes = {}, metadatas, co
|
|
1129
1264
|
const useDocument = (args, opts) => {
|
1130
1265
|
const { toggleNotification } = strapiAdmin.useNotification();
|
1131
1266
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
|
1267
|
+
const { formatMessage } = reactIntl.useIntl();
|
1132
1268
|
const {
|
1133
1269
|
currentData: data,
|
1134
1270
|
isLoading: isLoadingDocument,
|
@@ -1138,12 +1274,27 @@ const useDocument = (args, opts) => {
|
|
1138
1274
|
...opts,
|
1139
1275
|
skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
|
1140
1276
|
});
|
1277
|
+
const document = data?.data;
|
1278
|
+
const meta = data?.meta;
|
1141
1279
|
const {
|
1142
1280
|
components,
|
1143
1281
|
schema,
|
1144
1282
|
schemas,
|
1145
1283
|
isLoading: isLoadingSchema
|
1146
1284
|
} = useContentTypeSchema(args.model);
|
1285
|
+
const isSingleType = schema?.kind === "singleType";
|
1286
|
+
const getTitle = (mainField) => {
|
1287
|
+
if (mainField !== "id" && document?.[mainField]) {
|
1288
|
+
return document[mainField];
|
1289
|
+
}
|
1290
|
+
if (isSingleType && schema?.info.displayName) {
|
1291
|
+
return schema.info.displayName;
|
1292
|
+
}
|
1293
|
+
return formatMessage({
|
1294
|
+
id: "content-manager.containers.untitled",
|
1295
|
+
defaultMessage: "Untitled"
|
1296
|
+
});
|
1297
|
+
};
|
1147
1298
|
React__namespace.useEffect(() => {
|
1148
1299
|
if (error) {
|
1149
1300
|
toggleNotification({
|
@@ -1159,14 +1310,14 @@ const useDocument = (args, opts) => {
|
|
1159
1310
|
return createYupSchema(schema.attributes, components);
|
1160
1311
|
}, [schema, components]);
|
1161
1312
|
const validate = React__namespace.useCallback(
|
1162
|
-
(
|
1313
|
+
(document2) => {
|
1163
1314
|
if (!validationSchema) {
|
1164
1315
|
throw new Error(
|
1165
1316
|
"There is no validation schema generated, this is likely due to the schema not being loaded yet."
|
1166
1317
|
);
|
1167
1318
|
}
|
1168
1319
|
try {
|
1169
|
-
validationSchema.validateSync(
|
1320
|
+
validationSchema.validateSync(document2, { abortEarly: false, strict: true });
|
1170
1321
|
return null;
|
1171
1322
|
} catch (error2) {
|
1172
1323
|
if (error2 instanceof yup.ValidationError) {
|
@@ -1177,17 +1328,29 @@ const useDocument = (args, opts) => {
|
|
1177
1328
|
},
|
1178
1329
|
[validationSchema]
|
1179
1330
|
);
|
1331
|
+
const getInitialFormValues = React__namespace.useCallback(
|
1332
|
+
(isCreatingDocument = false) => {
|
1333
|
+
if (!document && !isCreatingDocument && !isSingleType || !schema) {
|
1334
|
+
return void 0;
|
1335
|
+
}
|
1336
|
+
const form = document?.id ? document : createDefaultForm(schema, components);
|
1337
|
+
return transformDocument(schema, components)(form);
|
1338
|
+
},
|
1339
|
+
[document, isSingleType, schema, components]
|
1340
|
+
);
|
1180
1341
|
const isLoading = isLoadingDocument || isFetchingDocument || isLoadingSchema;
|
1181
1342
|
const hasError = !!error;
|
1182
1343
|
return {
|
1183
1344
|
components,
|
1184
|
-
document
|
1185
|
-
meta
|
1345
|
+
document,
|
1346
|
+
meta,
|
1186
1347
|
isLoading,
|
1187
1348
|
hasError,
|
1188
1349
|
schema,
|
1189
1350
|
schemas,
|
1190
|
-
validate
|
1351
|
+
validate,
|
1352
|
+
getTitle,
|
1353
|
+
getInitialFormValues
|
1191
1354
|
};
|
1192
1355
|
};
|
1193
1356
|
const useDoc = () => {
|
@@ -1688,7 +1851,7 @@ const useDocumentActions = () => {
|
|
1688
1851
|
};
|
1689
1852
|
};
|
1690
1853
|
const ProtectedHistoryPage = React__namespace.lazy(
|
1691
|
-
() => Promise.resolve().then(() => require("./History-
|
1854
|
+
() => Promise.resolve().then(() => require("./History-zArjENzj.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1692
1855
|
);
|
1693
1856
|
const routes$2 = [
|
1694
1857
|
{
|
@@ -1701,7 +1864,7 @@ const routes$2 = [
|
|
1701
1864
|
}
|
1702
1865
|
];
|
1703
1866
|
const ProtectedPreviewPage = React__namespace.lazy(
|
1704
|
-
() => Promise.resolve().then(() => require("./Preview-
|
1867
|
+
() => Promise.resolve().then(() => require("./Preview-DEHdENT1.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
|
1705
1868
|
);
|
1706
1869
|
const routes$1 = [
|
1707
1870
|
{
|
@@ -1714,31 +1877,31 @@ const routes$1 = [
|
|
1714
1877
|
}
|
1715
1878
|
];
|
1716
1879
|
const ProtectedEditViewPage = React.lazy(
|
1717
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1880
|
+
() => Promise.resolve().then(() => require("./EditViewPage-DqelJ9UK.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1718
1881
|
);
|
1719
1882
|
const ProtectedListViewPage = React.lazy(
|
1720
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1883
|
+
() => Promise.resolve().then(() => require("./ListViewPage-BVKBeQAA.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1721
1884
|
);
|
1722
1885
|
const ProtectedListConfiguration = React.lazy(
|
1723
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1886
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-ByZAO_9H.js")).then((mod) => ({
|
1724
1887
|
default: mod.ProtectedListConfiguration
|
1725
1888
|
}))
|
1726
1889
|
);
|
1727
1890
|
const ProtectedEditConfigurationPage = React.lazy(
|
1728
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1891
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-LYEvR4fW.js")).then((mod) => ({
|
1729
1892
|
default: mod.ProtectedEditConfigurationPage
|
1730
1893
|
}))
|
1731
1894
|
);
|
1732
1895
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1733
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1896
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-DdkVGfXC.js")).then((mod) => ({
|
1734
1897
|
default: mod.ProtectedComponentConfigurationPage
|
1735
1898
|
}))
|
1736
1899
|
);
|
1737
1900
|
const NoPermissions = React.lazy(
|
1738
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1901
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-vdNpc6jb.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1739
1902
|
);
|
1740
1903
|
const NoContentType = React.lazy(
|
1741
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1904
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-BV5zfDxr.js")).then((mod) => ({ default: mod.NoContentType }))
|
1742
1905
|
);
|
1743
1906
|
const CollectionTypePages = () => {
|
1744
1907
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -2269,6 +2432,7 @@ const PublishAction$1 = ({
|
|
2269
2432
|
};
|
2270
2433
|
};
|
2271
2434
|
PublishAction$1.type = "publish";
|
2435
|
+
PublishAction$1.position = "panel";
|
2272
2436
|
const UpdateAction = ({
|
2273
2437
|
activeTab,
|
2274
2438
|
documentId,
|
@@ -2291,6 +2455,117 @@ const UpdateAction = ({
|
|
2291
2455
|
const validate = strapiAdmin.useForm("UpdateAction", (state) => state.validate);
|
2292
2456
|
const setErrors = strapiAdmin.useForm("UpdateAction", (state) => state.setErrors);
|
2293
2457
|
const resetForm = strapiAdmin.useForm("PublishAction", ({ resetForm: resetForm2 }) => resetForm2);
|
2458
|
+
const handleUpdate = React__namespace.useCallback(async () => {
|
2459
|
+
setSubmitting(true);
|
2460
|
+
try {
|
2461
|
+
if (!modified) {
|
2462
|
+
return;
|
2463
|
+
}
|
2464
|
+
const { errors } = await validate(true, {
|
2465
|
+
status: "draft"
|
2466
|
+
});
|
2467
|
+
if (errors) {
|
2468
|
+
toggleNotification({
|
2469
|
+
type: "danger",
|
2470
|
+
message: formatMessage({
|
2471
|
+
id: "content-manager.validation.error",
|
2472
|
+
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
2473
|
+
})
|
2474
|
+
});
|
2475
|
+
return;
|
2476
|
+
}
|
2477
|
+
if (isCloning) {
|
2478
|
+
const res = await clone(
|
2479
|
+
{
|
2480
|
+
model,
|
2481
|
+
documentId: cloneMatch.params.origin,
|
2482
|
+
params
|
2483
|
+
},
|
2484
|
+
transformData(document)
|
2485
|
+
);
|
2486
|
+
if ("data" in res) {
|
2487
|
+
navigate(
|
2488
|
+
{
|
2489
|
+
pathname: `../${res.data.documentId}`,
|
2490
|
+
search: rawQuery
|
2491
|
+
},
|
2492
|
+
{ relative: "path" }
|
2493
|
+
);
|
2494
|
+
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2495
|
+
setErrors(formatValidationErrors(res.error));
|
2496
|
+
}
|
2497
|
+
} else if (documentId || collectionType === SINGLE_TYPES) {
|
2498
|
+
const res = await update(
|
2499
|
+
{
|
2500
|
+
collectionType,
|
2501
|
+
model,
|
2502
|
+
documentId,
|
2503
|
+
params
|
2504
|
+
},
|
2505
|
+
transformData(document)
|
2506
|
+
);
|
2507
|
+
if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2508
|
+
setErrors(formatValidationErrors(res.error));
|
2509
|
+
} else {
|
2510
|
+
resetForm();
|
2511
|
+
}
|
2512
|
+
} else {
|
2513
|
+
const res = await create(
|
2514
|
+
{
|
2515
|
+
model,
|
2516
|
+
params
|
2517
|
+
},
|
2518
|
+
transformData(document)
|
2519
|
+
);
|
2520
|
+
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2521
|
+
navigate(
|
2522
|
+
{
|
2523
|
+
pathname: `../${res.data.documentId}`,
|
2524
|
+
search: rawQuery
|
2525
|
+
},
|
2526
|
+
{ replace: true, relative: "path" }
|
2527
|
+
);
|
2528
|
+
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2529
|
+
setErrors(formatValidationErrors(res.error));
|
2530
|
+
}
|
2531
|
+
}
|
2532
|
+
} finally {
|
2533
|
+
setSubmitting(false);
|
2534
|
+
}
|
2535
|
+
}, [
|
2536
|
+
clone,
|
2537
|
+
cloneMatch?.params.origin,
|
2538
|
+
collectionType,
|
2539
|
+
create,
|
2540
|
+
document,
|
2541
|
+
documentId,
|
2542
|
+
formatMessage,
|
2543
|
+
formatValidationErrors,
|
2544
|
+
isCloning,
|
2545
|
+
model,
|
2546
|
+
modified,
|
2547
|
+
navigate,
|
2548
|
+
params,
|
2549
|
+
rawQuery,
|
2550
|
+
resetForm,
|
2551
|
+
setErrors,
|
2552
|
+
setSubmitting,
|
2553
|
+
toggleNotification,
|
2554
|
+
update,
|
2555
|
+
validate
|
2556
|
+
]);
|
2557
|
+
React__namespace.useEffect(() => {
|
2558
|
+
const handleKeyDown = (e) => {
|
2559
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
2560
|
+
e.preventDefault();
|
2561
|
+
handleUpdate();
|
2562
|
+
}
|
2563
|
+
};
|
2564
|
+
window.addEventListener("keydown", handleKeyDown);
|
2565
|
+
return () => {
|
2566
|
+
window.removeEventListener("keydown", handleKeyDown);
|
2567
|
+
};
|
2568
|
+
}, [handleUpdate]);
|
2294
2569
|
return {
|
2295
2570
|
/**
|
2296
2571
|
* Disabled when:
|
@@ -2303,84 +2578,11 @@ const UpdateAction = ({
|
|
2303
2578
|
id: "global.save",
|
2304
2579
|
defaultMessage: "Save"
|
2305
2580
|
}),
|
2306
|
-
onClick:
|
2307
|
-
setSubmitting(true);
|
2308
|
-
try {
|
2309
|
-
const { errors } = await validate(true, {
|
2310
|
-
status: "draft"
|
2311
|
-
});
|
2312
|
-
if (errors) {
|
2313
|
-
toggleNotification({
|
2314
|
-
type: "danger",
|
2315
|
-
message: formatMessage({
|
2316
|
-
id: "content-manager.validation.error",
|
2317
|
-
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
2318
|
-
})
|
2319
|
-
});
|
2320
|
-
return;
|
2321
|
-
}
|
2322
|
-
if (isCloning) {
|
2323
|
-
const res = await clone(
|
2324
|
-
{
|
2325
|
-
model,
|
2326
|
-
documentId: cloneMatch.params.origin,
|
2327
|
-
params
|
2328
|
-
},
|
2329
|
-
transformData(document)
|
2330
|
-
);
|
2331
|
-
if ("data" in res) {
|
2332
|
-
navigate(
|
2333
|
-
{
|
2334
|
-
pathname: `../${res.data.documentId}`,
|
2335
|
-
search: rawQuery
|
2336
|
-
},
|
2337
|
-
{ relative: "path" }
|
2338
|
-
);
|
2339
|
-
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2340
|
-
setErrors(formatValidationErrors(res.error));
|
2341
|
-
}
|
2342
|
-
} else if (documentId || collectionType === SINGLE_TYPES) {
|
2343
|
-
const res = await update(
|
2344
|
-
{
|
2345
|
-
collectionType,
|
2346
|
-
model,
|
2347
|
-
documentId,
|
2348
|
-
params
|
2349
|
-
},
|
2350
|
-
transformData(document)
|
2351
|
-
);
|
2352
|
-
if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2353
|
-
setErrors(formatValidationErrors(res.error));
|
2354
|
-
} else {
|
2355
|
-
resetForm();
|
2356
|
-
}
|
2357
|
-
} else {
|
2358
|
-
const res = await create(
|
2359
|
-
{
|
2360
|
-
model,
|
2361
|
-
params
|
2362
|
-
},
|
2363
|
-
transformData(document)
|
2364
|
-
);
|
2365
|
-
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
2366
|
-
navigate(
|
2367
|
-
{
|
2368
|
-
pathname: `../${res.data.documentId}`,
|
2369
|
-
search: rawQuery
|
2370
|
-
},
|
2371
|
-
{ replace: true, relative: "path" }
|
2372
|
-
);
|
2373
|
-
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
2374
|
-
setErrors(formatValidationErrors(res.error));
|
2375
|
-
}
|
2376
|
-
}
|
2377
|
-
} finally {
|
2378
|
-
setSubmitting(false);
|
2379
|
-
}
|
2380
|
-
}
|
2581
|
+
onClick: handleUpdate
|
2381
2582
|
};
|
2382
2583
|
};
|
2383
2584
|
UpdateAction.type = "update";
|
2585
|
+
UpdateAction.position = "panel";
|
2384
2586
|
const UNPUBLISH_DRAFT_OPTIONS = {
|
2385
2587
|
KEEP: "keep",
|
2386
2588
|
DISCARD: "discard"
|
@@ -2503,6 +2705,7 @@ const UnpublishAction$1 = ({
|
|
2503
2705
|
};
|
2504
2706
|
};
|
2505
2707
|
UnpublishAction$1.type = "unpublish";
|
2708
|
+
UnpublishAction$1.position = "panel";
|
2506
2709
|
const DiscardAction = ({
|
2507
2710
|
activeTab,
|
2508
2711
|
documentId,
|
@@ -2553,6 +2756,7 @@ const DiscardAction = ({
|
|
2553
2756
|
};
|
2554
2757
|
};
|
2555
2758
|
DiscardAction.type = "discard";
|
2759
|
+
DiscardAction.position = "panel";
|
2556
2760
|
const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
|
2557
2761
|
const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
|
2558
2762
|
const RelativeTime = React__namespace.forwardRef(
|
@@ -2672,7 +2876,7 @@ const HeaderToolbar = () => {
|
|
2672
2876
|
meta: isCloning ? void 0 : meta,
|
2673
2877
|
collectionType
|
2674
2878
|
},
|
2675
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions(),
|
2879
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions("header"),
|
2676
2880
|
children: (actions2) => {
|
2677
2881
|
const headerActions = actions2.filter((action) => {
|
2678
2882
|
const positions = Array.isArray(action.position) ? action.position : [action.position];
|
@@ -2880,6 +3084,7 @@ const ConfigureTheViewAction = ({ collectionType, model }) => {
|
|
2880
3084
|
};
|
2881
3085
|
};
|
2882
3086
|
ConfigureTheViewAction.type = "configure-the-view";
|
3087
|
+
ConfigureTheViewAction.position = "header";
|
2883
3088
|
const EditTheModelAction = ({ model }) => {
|
2884
3089
|
const navigate = reactRouterDom.useNavigate();
|
2885
3090
|
const { formatMessage } = reactIntl.useIntl();
|
@@ -2896,6 +3101,7 @@ const EditTheModelAction = ({ model }) => {
|
|
2896
3101
|
};
|
2897
3102
|
};
|
2898
3103
|
EditTheModelAction.type = "edit-the-model";
|
3104
|
+
EditTheModelAction.position = "header";
|
2899
3105
|
const DeleteAction$1 = ({ documentId, model, collectionType, document }) => {
|
2900
3106
|
const navigate = reactRouterDom.useNavigate();
|
2901
3107
|
const { formatMessage } = reactIntl.useIntl();
|
@@ -2969,6 +3175,7 @@ const DeleteAction$1 = ({ documentId, model, collectionType, document }) => {
|
|
2969
3175
|
};
|
2970
3176
|
};
|
2971
3177
|
DeleteAction$1.type = "delete";
|
3178
|
+
DeleteAction$1.position = ["header", "table-row"];
|
2972
3179
|
const DEFAULT_HEADER_ACTIONS = [EditTheModelAction, ConfigureTheViewAction, DeleteAction$1];
|
2973
3180
|
const Panels = () => {
|
2974
3181
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
@@ -3031,7 +3238,7 @@ const ActionsPanelContent = () => {
|
|
3031
3238
|
strapiAdmin.DescriptionComponentRenderer,
|
3032
3239
|
{
|
3033
3240
|
props,
|
3034
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions(),
|
3241
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions("panel"),
|
3035
3242
|
children: (actions2) => /* @__PURE__ */ jsxRuntime.jsx(DocumentActions, { actions: actions2 })
|
3036
3243
|
}
|
3037
3244
|
),
|
@@ -3089,7 +3296,7 @@ const ConfirmBulkActionDialog = ({
|
|
3089
3296
|
] })
|
3090
3297
|
] }) });
|
3091
3298
|
};
|
3092
|
-
const BoldChunk
|
3299
|
+
const BoldChunk = (chunks) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: chunks });
|
3093
3300
|
const ConfirmDialogPublishAll = ({
|
3094
3301
|
isOpen,
|
3095
3302
|
onToggleDialog,
|
@@ -3138,7 +3345,7 @@ const ConfirmDialogPublishAll = ({
|
|
3138
3345
|
defaultMessage: "<b>{count} {count, plural, one { relation } other { relations } } out of {entities} { entities, plural, one { entry } other { entries } } {count, plural, one { is } other { are } }</b> not published yet and might lead to unexpected behavior. "
|
3139
3346
|
},
|
3140
3347
|
{
|
3141
|
-
b: BoldChunk
|
3348
|
+
b: BoldChunk,
|
3142
3349
|
count: countDraftRelations,
|
3143
3350
|
entities: selectedEntries.length
|
3144
3351
|
}
|
@@ -3177,6 +3384,16 @@ const ConfirmDialogPublishAll = ({
|
|
3177
3384
|
const TypographyMaxWidth = styledComponents.styled(designSystem.Typography)`
|
3178
3385
|
max-width: 300px;
|
3179
3386
|
`;
|
3387
|
+
const TableComponent = styledComponents.styled(designSystem.RawTable)`
|
3388
|
+
width: 100%;
|
3389
|
+
table-layout: fixed;
|
3390
|
+
td:first-child {
|
3391
|
+
border-right: 1px solid ${({ theme }) => theme.colors.neutral150};
|
3392
|
+
}
|
3393
|
+
td:first-of-type {
|
3394
|
+
padding: ${({ theme }) => theme.spaces[4]};
|
3395
|
+
}
|
3396
|
+
`;
|
3180
3397
|
const formatErrorMessages = (errors, parentKey, formatMessage) => {
|
3181
3398
|
const messages = [];
|
3182
3399
|
Object.entries(errors).forEach(([key, value]) => {
|
@@ -3281,7 +3498,7 @@ const SelectedEntriesTableContent = ({
|
|
3281
3498
|
)
|
3282
3499
|
] }),
|
3283
3500
|
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Loading, {}),
|
3284
|
-
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Body, { children: rowsToDisplay.map((row
|
3501
|
+
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Body, { children: rowsToDisplay.map((row) => /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Row, { children: [
|
3285
3502
|
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.CheckboxCell, { id: row.id }),
|
3286
3503
|
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: row.id }) }),
|
3287
3504
|
shouldDisplayMainField && /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: row[mainField] }) }),
|
@@ -3321,7 +3538,73 @@ const SelectedEntriesTableContent = ({
|
|
3321
3538
|
] }, row.id)) })
|
3322
3539
|
] });
|
3323
3540
|
};
|
3324
|
-
const
|
3541
|
+
const PublicationStatusSummary = ({ count, icon, message }) => {
|
3542
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", flex: 1, gap: 3, children: [
|
3543
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
3544
|
+
icon,
|
3545
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: message })
|
3546
|
+
] }),
|
3547
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: count })
|
3548
|
+
] });
|
3549
|
+
};
|
3550
|
+
const PublicationStatusGrid = ({
|
3551
|
+
entriesReadyToPublishCount,
|
3552
|
+
entriesPublishedCount,
|
3553
|
+
entriesModifiedCount,
|
3554
|
+
entriesWithErrorsCount
|
3555
|
+
}) => {
|
3556
|
+
const { formatMessage } = reactIntl.useIntl();
|
3557
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { hasRadius: true, borderColor: "neutral150", children: /* @__PURE__ */ jsxRuntime.jsx(TableComponent, { colCount: 2, rowCount: 2, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tbody, { children: [
|
3558
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
|
3559
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
3560
|
+
PublicationStatusSummary,
|
3561
|
+
{
|
3562
|
+
count: entriesReadyToPublishCount,
|
3563
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.CheckCircle, { fill: "success600" }),
|
3564
|
+
message: formatMessage({
|
3565
|
+
id: "app.utils.ready-to-publish",
|
3566
|
+
defaultMessage: "Ready to publish"
|
3567
|
+
})
|
3568
|
+
}
|
3569
|
+
) }),
|
3570
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
3571
|
+
PublicationStatusSummary,
|
3572
|
+
{
|
3573
|
+
count: entriesPublishedCount,
|
3574
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.CheckCircle, { fill: "success600" }),
|
3575
|
+
message: formatMessage({
|
3576
|
+
id: "app.utils.already-published",
|
3577
|
+
defaultMessage: "Already published"
|
3578
|
+
})
|
3579
|
+
}
|
3580
|
+
) })
|
3581
|
+
] }),
|
3582
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
|
3583
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
3584
|
+
PublicationStatusSummary,
|
3585
|
+
{
|
3586
|
+
count: entriesModifiedCount,
|
3587
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowsCounterClockwise, { fill: "alternative600" }),
|
3588
|
+
message: formatMessage({
|
3589
|
+
id: "content-manager.bulk-publish.modified",
|
3590
|
+
defaultMessage: "Ready to publish changes"
|
3591
|
+
})
|
3592
|
+
}
|
3593
|
+
) }),
|
3594
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
3595
|
+
PublicationStatusSummary,
|
3596
|
+
{
|
3597
|
+
count: entriesWithErrorsCount,
|
3598
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.CrossCircle, { fill: "danger600" }),
|
3599
|
+
message: formatMessage({
|
3600
|
+
id: "content-manager.bulk-publish.waiting-for-action",
|
3601
|
+
defaultMessage: "Waiting for action"
|
3602
|
+
})
|
3603
|
+
}
|
3604
|
+
) })
|
3605
|
+
] })
|
3606
|
+
] }) }) });
|
3607
|
+
};
|
3325
3608
|
const SelectedEntriesModalContent = ({
|
3326
3609
|
listViewSelectedEntries,
|
3327
3610
|
toggleModal,
|
@@ -3380,7 +3663,6 @@ const SelectedEntriesModalContent = ({
|
|
3380
3663
|
validationErrors: {}
|
3381
3664
|
};
|
3382
3665
|
}, [components, data, schema]);
|
3383
|
-
const [publishedCount, setPublishedCount] = React__namespace.useState(0);
|
3384
3666
|
const [isDialogOpen, setIsDialogOpen] = React__namespace.useState(false);
|
3385
3667
|
const { publishMany: bulkPublishAction } = useDocumentActions();
|
3386
3668
|
const [, { isLoading: isSubmittingForm }] = usePublishManyDocumentsMutation();
|
@@ -3392,53 +3674,36 @@ const SelectedEntriesModalContent = ({
|
|
3392
3674
|
const selectedEntriesWithErrorsCount = selectedEntries.filter(
|
3393
3675
|
({ documentId }) => validationErrors[documentId]
|
3394
3676
|
).length;
|
3395
|
-
const
|
3677
|
+
const selectedEntriesPublishedCount = selectedEntries.filter(
|
3396
3678
|
({ status }) => status === "published"
|
3397
3679
|
).length;
|
3398
|
-
const
|
3680
|
+
const selectedEntriesModifiedCount = selectedEntries.filter(
|
3681
|
+
({ status, documentId }) => status === "modified" && !validationErrors[documentId]
|
3682
|
+
).length;
|
3683
|
+
const selectedEntriesWithNoErrorsCount = selectedEntries.length - selectedEntriesWithErrorsCount - selectedEntriesPublishedCount;
|
3399
3684
|
const toggleDialog = () => setIsDialogOpen((prev) => !prev);
|
3400
3685
|
const handleConfirmBulkPublish = async () => {
|
3401
3686
|
toggleDialog();
|
3402
3687
|
const res = await bulkPublishAction({ model, documentIds: entriesToPublish, params });
|
3403
3688
|
if (!("error" in res)) {
|
3404
|
-
setPublishedCount(res.count);
|
3405
3689
|
const unpublishedEntries = rows.filter((row) => {
|
3406
3690
|
return !entriesToPublish.includes(row.documentId);
|
3407
3691
|
});
|
3408
3692
|
setListViewSelectedDocuments(unpublishedEntries);
|
3409
3693
|
}
|
3410
3694
|
};
|
3411
|
-
const getFormattedCountMessage = () => {
|
3412
|
-
if (publishedCount) {
|
3413
|
-
return formatMessage(
|
3414
|
-
{
|
3415
|
-
id: getTranslation("containers.list.selectedEntriesModal.publishedCount"),
|
3416
|
-
defaultMessage: "<b>{publishedCount}</b> {publishedCount, plural, =0 {entries} one {entry} other {entries}} published. <b>{withErrorsCount}</b> {withErrorsCount, plural, =0 {entries} one {entry} other {entries}} waiting for action."
|
3417
|
-
},
|
3418
|
-
{
|
3419
|
-
publishedCount,
|
3420
|
-
withErrorsCount: selectedEntriesWithErrorsCount,
|
3421
|
-
b: BoldChunk
|
3422
|
-
}
|
3423
|
-
);
|
3424
|
-
}
|
3425
|
-
return formatMessage(
|
3426
|
-
{
|
3427
|
-
id: getTranslation("containers.list.selectedEntriesModal.selectedCount"),
|
3428
|
-
defaultMessage: "<b>{alreadyPublishedCount}</b> {alreadyPublishedCount, plural, =0 {entries} one {entry} other {entries}} already published. <b>{readyToPublishCount}</b> {readyToPublishCount, plural, =0 {entries} one {entry} other {entries}} ready to publish. <b>{withErrorsCount}</b> {withErrorsCount, plural, =0 {entries} one {entry} other {entries}} waiting for action."
|
3429
|
-
},
|
3430
|
-
{
|
3431
|
-
readyToPublishCount: selectedEntriesWithNoErrorsCount,
|
3432
|
-
withErrorsCount: selectedEntriesWithErrorsCount,
|
3433
|
-
alreadyPublishedCount: selectedEntriesPublished,
|
3434
|
-
b: BoldChunk
|
3435
|
-
}
|
3436
|
-
);
|
3437
|
-
};
|
3438
3695
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
3439
3696
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Body, { children: [
|
3440
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
3441
|
-
|
3697
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
3698
|
+
PublicationStatusGrid,
|
3699
|
+
{
|
3700
|
+
entriesReadyToPublishCount: selectedEntriesWithNoErrorsCount - selectedEntriesModifiedCount,
|
3701
|
+
entriesPublishedCount: selectedEntriesPublishedCount,
|
3702
|
+
entriesModifiedCount: selectedEntriesModifiedCount,
|
3703
|
+
entriesWithErrorsCount: selectedEntriesWithErrorsCount
|
3704
|
+
}
|
3705
|
+
),
|
3706
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 7, children: /* @__PURE__ */ jsxRuntime.jsx(
|
3442
3707
|
SelectedEntriesTableContent,
|
3443
3708
|
{
|
3444
3709
|
isPublishing: isSubmittingForm,
|
@@ -3459,7 +3724,7 @@ const SelectedEntriesModalContent = ({
|
|
3459
3724
|
designSystem.Button,
|
3460
3725
|
{
|
3461
3726
|
onClick: toggleDialog,
|
3462
|
-
disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount ||
|
3727
|
+
disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublishedCount === selectedEntries.length || isLoading,
|
3463
3728
|
loading: isSubmittingForm,
|
3464
3729
|
children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
|
3465
3730
|
}
|
@@ -3707,7 +3972,7 @@ const TableActions = ({ document }) => {
|
|
3707
3972
|
strapiAdmin.DescriptionComponentRenderer,
|
3708
3973
|
{
|
3709
3974
|
props,
|
3710
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions().filter((action) => action.name !== "PublishAction"),
|
3975
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions("table-row").filter((action) => action.name !== "PublishAction"),
|
3711
3976
|
children: (actions2) => {
|
3712
3977
|
const tableRowActions = actions2.filter((action) => {
|
3713
3978
|
const positions = Array.isArray(action.position) ? action.position : [action.position];
|
@@ -3766,6 +4031,7 @@ const EditAction = ({ documentId }) => {
|
|
3766
4031
|
};
|
3767
4032
|
};
|
3768
4033
|
EditAction.type = "edit";
|
4034
|
+
EditAction.position = "table-row";
|
3769
4035
|
const StyledPencil = styledComponents.styled(Icons.Pencil)`
|
3770
4036
|
path {
|
3771
4037
|
fill: currentColor;
|
@@ -3842,6 +4108,7 @@ const CloneAction = ({ model, documentId }) => {
|
|
3842
4108
|
};
|
3843
4109
|
};
|
3844
4110
|
CloneAction.type = "clone";
|
4111
|
+
CloneAction.position = "table-row";
|
3845
4112
|
const StyledDuplicate = styledComponents.styled(Icons.Duplicate)`
|
3846
4113
|
path {
|
3847
4114
|
fill: currentColor;
|
@@ -3928,7 +4195,14 @@ class ContentManagerPlugin {
|
|
3928
4195
|
addDocumentHeaderAction: this.addDocumentHeaderAction.bind(this),
|
3929
4196
|
addEditViewSidePanel: this.addEditViewSidePanel.bind(this),
|
3930
4197
|
getBulkActions: () => this.bulkActions,
|
3931
|
-
getDocumentActions: () =>
|
4198
|
+
getDocumentActions: (position) => {
|
4199
|
+
if (position) {
|
4200
|
+
return this.documentActions.filter(
|
4201
|
+
(action) => action.position == void 0 || [action.position].flat().includes(position)
|
4202
|
+
);
|
4203
|
+
}
|
4204
|
+
return this.documentActions;
|
4205
|
+
},
|
3932
4206
|
getEditViewSidePanels: () => this.editViewSidePanels,
|
3933
4207
|
getHeaderActions: () => this.headerActions
|
3934
4208
|
}
|
@@ -3992,6 +4266,7 @@ const HistoryAction = ({ model, document }) => {
|
|
3992
4266
|
};
|
3993
4267
|
};
|
3994
4268
|
HistoryAction.type = "history";
|
4269
|
+
HistoryAction.position = "header";
|
3995
4270
|
const historyAdmin = {
|
3996
4271
|
bootstrap(app) {
|
3997
4272
|
const { addDocumentAction } = app.getPlugin("content-manager").apis;
|
@@ -4085,7 +4360,7 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4085
4360
|
};
|
4086
4361
|
return {
|
4087
4362
|
title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
|
4088
|
-
content: /* @__PURE__ */ jsxRuntime.jsx(
|
4363
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(
|
4089
4364
|
ConditionalTooltip,
|
4090
4365
|
{
|
4091
4366
|
label: formatMessage({
|
@@ -4093,31 +4368,29 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
|
|
4093
4368
|
defaultMessage: "Please save to open the preview"
|
4094
4369
|
}),
|
4095
4370
|
isShown: isModified,
|
4096
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
4371
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { cursor: "not-allowed", width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
|
4097
4372
|
designSystem.Button,
|
4098
4373
|
{
|
4099
4374
|
variant: "tertiary",
|
4100
4375
|
tag: reactRouterDom.Link,
|
4101
4376
|
to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
|
4102
4377
|
onClick: trackNavigation,
|
4103
|
-
|
4378
|
+
width: "100%",
|
4104
4379
|
disabled: isModified,
|
4380
|
+
pointerEvents: isModified ? "none" : void 0,
|
4381
|
+
tabIndex: isModified ? -1 : void 0,
|
4105
4382
|
children: formatMessage({
|
4106
4383
|
id: "content-manager.preview.panel.button",
|
4107
4384
|
defaultMessage: "Open preview"
|
4108
4385
|
})
|
4109
4386
|
}
|
4110
|
-
)
|
4387
|
+
) })
|
4111
4388
|
}
|
4112
|
-
)
|
4389
|
+
)
|
4113
4390
|
};
|
4114
4391
|
};
|
4115
|
-
const FEATURE_ID = "preview";
|
4116
4392
|
const previewAdmin = {
|
4117
4393
|
bootstrap(app) {
|
4118
|
-
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
4119
|
-
return;
|
4120
|
-
}
|
4121
4394
|
const contentManagerPluginApis = app.getPlugin("content-manager").apis;
|
4122
4395
|
contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
|
4123
4396
|
}
|
@@ -4141,7 +4414,7 @@ const index = {
|
|
4141
4414
|
app.router.addRoute({
|
4142
4415
|
path: "content-manager/*",
|
4143
4416
|
lazy: async () => {
|
4144
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
4417
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-DSeUTfMv.js"));
|
4145
4418
|
return {
|
4146
4419
|
Component: Layout
|
4147
4420
|
};
|
@@ -4161,7 +4434,7 @@ const index = {
|
|
4161
4434
|
async registerTrads({ locales }) {
|
4162
4435
|
const importedTrads = await Promise.all(
|
4163
4436
|
locales.map((locale) => {
|
4164
|
-
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-
|
4437
|
+
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-BR48D_RH.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-C43IbhA_.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 }) => {
|
4165
4438
|
return {
|
4166
4439
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4167
4440
|
locale
|
@@ -4183,7 +4456,6 @@ exports.CLONE_PATH = CLONE_PATH;
|
|
4183
4456
|
exports.COLLECTION_TYPES = COLLECTION_TYPES;
|
4184
4457
|
exports.CREATOR_FIELDS = CREATOR_FIELDS;
|
4185
4458
|
exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
|
4186
|
-
exports.DOCUMENT_META_FIELDS = DOCUMENT_META_FIELDS;
|
4187
4459
|
exports.DocumentRBAC = DocumentRBAC;
|
4188
4460
|
exports.DocumentStatus = DocumentStatus;
|
4189
4461
|
exports.HOOKS = HOOKS;
|
@@ -4200,13 +4472,17 @@ exports.checkIfAttributeIsDisplayable = checkIfAttributeIsDisplayable;
|
|
4200
4472
|
exports.contentManagerApi = contentManagerApi;
|
4201
4473
|
exports.convertEditLayoutToFieldLayouts = convertEditLayoutToFieldLayouts;
|
4202
4474
|
exports.convertListLayoutToFieldLayouts = convertListLayoutToFieldLayouts;
|
4475
|
+
exports.createDefaultForm = createDefaultForm;
|
4203
4476
|
exports.createYupSchema = createYupSchema;
|
4204
4477
|
exports.extractContentTypeComponents = extractContentTypeComponents;
|
4205
4478
|
exports.getDisplayName = getDisplayName;
|
4206
4479
|
exports.getMainField = getMainField;
|
4207
4480
|
exports.getTranslation = getTranslation;
|
4208
4481
|
exports.index = index;
|
4482
|
+
exports.prepareTempKeys = prepareTempKeys;
|
4483
|
+
exports.removeFieldsThatDontExistOnSchema = removeFieldsThatDontExistOnSchema;
|
4209
4484
|
exports.setInitialData = setInitialData;
|
4485
|
+
exports.transformDocument = transformDocument;
|
4210
4486
|
exports.useContentManagerContext = useContentManagerContext;
|
4211
4487
|
exports.useContentTypeSchema = useContentTypeSchema;
|
4212
4488
|
exports.useDoc = useDoc;
|
@@ -4221,4 +4497,4 @@ exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuer
|
|
4221
4497
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
4222
4498
|
exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
|
4223
4499
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
4224
|
-
//# sourceMappingURL=index-
|
4500
|
+
//# sourceMappingURL=index-CxLSGwnk.js.map
|