@strapi/content-manager 0.0.0-experimental.f31889311d753b5f7d95198ae84d8fce1d156cd6 → 0.0.0-experimental.f6c00790e260ea5a9b6b86abac5fea02b05d569c
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-BWOQWCv2.mjs → ComponentConfigurationPage-CnL10QYC.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BWOQWCv2.mjs.map → ComponentConfigurationPage-CnL10QYC.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-BNxtMIfV.js → ComponentConfigurationPage-G4EIirP8.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BNxtMIfV.js.map → ComponentConfigurationPage-G4EIirP8.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-D340bYlT.js → EditConfigurationPage-B2AA1kVF.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-D340bYlT.js.map → EditConfigurationPage-B2AA1kVF.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-GTp-Ucnw.mjs → EditConfigurationPage-I2kKh9dx.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-GTp-Ucnw.mjs.map → EditConfigurationPage-I2kKh9dx.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-CXkmnAvI.js → EditViewPage-CHgoNwlc.js} +19 -8
- package/dist/_chunks/EditViewPage-CHgoNwlc.js.map +1 -0
- package/dist/_chunks/{EditViewPage-BVMS5hT-.mjs → EditViewPage-zFjJK0s8.mjs} +19 -8
- package/dist/_chunks/EditViewPage-zFjJK0s8.mjs.map +1 -0
- package/dist/_chunks/{Field-Ibi32diw.js → Field-9DePZh-0.js} +120 -92
- package/dist/_chunks/Field-9DePZh-0.js.map +1 -0
- package/dist/_chunks/{Field-nNgv5bpd.mjs → Field-DPAzUS1M.mjs} +118 -90
- package/dist/_chunks/Field-DPAzUS1M.mjs.map +1 -0
- package/dist/_chunks/{Form-DodJsI2A.mjs → Form-CEkENbkF.mjs} +35 -16
- package/dist/_chunks/Form-CEkENbkF.mjs.map +1 -0
- package/dist/_chunks/{Form-Dhnh34ym.js → Form-DPm-KZ1A.js} +35 -16
- package/dist/_chunks/Form-DPm-KZ1A.js.map +1 -0
- package/dist/_chunks/{History-C9auUkDi.js → History-DXSbTWez.js} +4 -4
- package/dist/_chunks/{History-C9auUkDi.js.map → History-DXSbTWez.js.map} +1 -1
- package/dist/_chunks/{History-CKCSQXz_.mjs → History-utls71em.mjs} +4 -4
- package/dist/_chunks/{History-CKCSQXz_.mjs.map → History-utls71em.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-CKEC4ttG.mjs → ListConfigurationPage-CuMXWWqb.mjs} +14 -4
- package/dist/_chunks/ListConfigurationPage-CuMXWWqb.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-Bg4rWUjX.js → ListConfigurationPage-D5C7ACZ_.js} +14 -4
- package/dist/_chunks/ListConfigurationPage-D5C7ACZ_.js.map +1 -0
- package/dist/_chunks/{ListViewPage-B7_WJUjG.mjs → ListViewPage-CdKd-PS_.mjs} +39 -35
- package/dist/_chunks/ListViewPage-CdKd-PS_.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-C2gIeYHG.js → ListViewPage-DfuwH1tt.js} +42 -38
- package/dist/_chunks/ListViewPage-DfuwH1tt.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-DqgdUfyn.js → NoContentTypePage-BIxlkWWi.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-DqgdUfyn.js.map → NoContentTypePage-BIxlkWWi.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-Ckem6Ll6.mjs → NoContentTypePage-DkToTT7u.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-Ckem6Ll6.mjs.map → NoContentTypePage-DkToTT7u.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CF29Q-sW.js → NoPermissionsPage-Bu4GWYb-.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CF29Q-sW.js.map → NoPermissionsPage-Bu4GWYb-.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BO-GEjA4.mjs → NoPermissionsPage-DlWi4BAH.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BO-GEjA4.mjs.map → NoPermissionsPage-DlWi4BAH.mjs.map} +1 -1
- package/dist/_chunks/{Relations-C0uC9J4f.js → Relations-CFjTESWQ.js} +4 -4
- package/dist/_chunks/{Relations-C0uC9J4f.js.map → Relations-CFjTESWQ.js.map} +1 -1
- package/dist/_chunks/{Relations-DItV5eow.mjs → Relations-QP5yn9_z.mjs} +4 -4
- package/dist/_chunks/{Relations-DItV5eow.mjs.map → Relations-QP5yn9_z.mjs.map} +1 -1
- package/dist/_chunks/{en-uOUIxfcQ.js → en-BVzUkPxZ.js} +6 -5
- package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BVzUkPxZ.js.map} +1 -1
- package/dist/_chunks/{en-BrCTWlZv.mjs → en-CPTj6CjC.mjs} +6 -5
- package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-CPTj6CjC.mjs.map} +1 -1
- package/dist/_chunks/{index-DrNe6ctw.mjs → index-BHfS6_D5.mjs} +219 -114
- package/dist/_chunks/index-BHfS6_D5.mjs.map +1 -0
- package/dist/_chunks/{index-Dd0nXyJF.js → index-DXiHxy70.js} +200 -95
- package/dist/_chunks/index-DXiHxy70.js.map +1 -0
- package/dist/_chunks/{layout-B3ez7kvr.mjs → layout-DX_52HSH.mjs} +8 -7
- package/dist/_chunks/layout-DX_52HSH.mjs.map +1 -0
- package/dist/_chunks/{layout-CLLtt_5O.js → layout-bE-WUnQ0.js} +8 -7
- package/dist/_chunks/layout-bE-WUnQ0.js.map +1 -0
- package/dist/_chunks/{relations-bRxcNv1q.js → relations-D706vblp.js} +2 -2
- package/dist/_chunks/{relations-bRxcNv1q.js.map → relations-D706vblp.js.map} +1 -1
- package/dist/_chunks/{relations-B0hlsUU_.mjs → relations-SCVAL_aJ.mjs} +2 -2
- package/dist/_chunks/{relations-B0hlsUU_.mjs.map → relations-SCVAL_aJ.mjs.map} +1 -1
- package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +4 -4
- package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
- package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
- 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 +19 -17
- 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/admin/src/utils/validation.d.ts +4 -1
- package/dist/server/index.js +47 -23
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +47 -23
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- 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 +1 -0
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
- package/dist/server/src/services/permission-checker.d.ts.map +1 -1
- package/dist/shared/contracts/collection-types.d.ts +3 -1
- package/dist/shared/contracts/collection-types.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/_chunks/EditViewPage-BVMS5hT-.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-CXkmnAvI.js.map +0 -1
- package/dist/_chunks/Field-Ibi32diw.js.map +0 -1
- package/dist/_chunks/Field-nNgv5bpd.mjs.map +0 -1
- package/dist/_chunks/Form-Dhnh34ym.js.map +0 -1
- package/dist/_chunks/Form-DodJsI2A.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-Bg4rWUjX.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-CKEC4ttG.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-B7_WJUjG.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-C2gIeYHG.js.map +0 -1
- package/dist/_chunks/index-Dd0nXyJF.js.map +0 -1
- package/dist/_chunks/index-DrNe6ctw.mjs.map +0 -1
- package/dist/_chunks/layout-B3ez7kvr.mjs.map +0 -1
- package/dist/_chunks/layout-CLLtt_5O.js.map +0 -1
- package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
- package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
- package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
@@ -6,10 +6,10 @@ const React = require("react");
|
|
6
6
|
const designSystem = require("@strapi/design-system");
|
7
7
|
const reactIntl = require("react-intl");
|
8
8
|
const reactRouterDom = require("react-router-dom");
|
9
|
-
const styledComponents = require("styled-components");
|
10
9
|
const yup = require("yup");
|
11
10
|
const pipe = require("lodash/fp/pipe");
|
12
11
|
const dateFns = require("date-fns");
|
12
|
+
const styledComponents = require("styled-components");
|
13
13
|
const qs = require("qs");
|
14
14
|
const toolkit = require("@reduxjs/toolkit");
|
15
15
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
@@ -179,7 +179,8 @@ const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
|
|
179
179
|
"Document",
|
180
180
|
"InitialData",
|
181
181
|
"HistoryVersion",
|
182
|
-
"Relations"
|
182
|
+
"Relations",
|
183
|
+
"UidAvailability"
|
183
184
|
]
|
184
185
|
});
|
185
186
|
const documentApi = contentManagerApi.injectEndpoints({
|
@@ -209,7 +210,10 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
209
210
|
params
|
210
211
|
}
|
211
212
|
}),
|
212
|
-
invalidatesTags: (_result, _error, { model }) => [
|
213
|
+
invalidatesTags: (_result, _error, { model }) => [
|
214
|
+
{ type: "Document", id: `${model}_LIST` },
|
215
|
+
{ type: "UidAvailability", id: model }
|
216
|
+
]
|
213
217
|
}),
|
214
218
|
/**
|
215
219
|
* Creates a new collection-type document. This should ONLY be used for collection-types.
|
@@ -226,7 +230,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
226
230
|
}),
|
227
231
|
invalidatesTags: (result, _error, { model }) => [
|
228
232
|
{ type: "Document", id: `${model}_LIST` },
|
229
|
-
"Relations"
|
233
|
+
"Relations",
|
234
|
+
{ type: "UidAvailability", id: model }
|
230
235
|
]
|
231
236
|
}),
|
232
237
|
deleteDocument: builder.mutation({
|
@@ -267,7 +272,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
267
272
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
268
273
|
},
|
269
274
|
{ type: "Document", id: `${model}_LIST` },
|
270
|
-
"Relations"
|
275
|
+
"Relations",
|
276
|
+
{ type: "UidAvailability", id: model }
|
271
277
|
];
|
272
278
|
}
|
273
279
|
}),
|
@@ -324,6 +330,11 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
324
330
|
{
|
325
331
|
type: "Document",
|
326
332
|
id: collectionType !== SINGLE_TYPES ? `${model}_${result && "documentId" in result ? result.documentId : documentId}` : model
|
333
|
+
},
|
334
|
+
// Make it easy to invalidate all individual documents queries for a model
|
335
|
+
{
|
336
|
+
type: "Document",
|
337
|
+
id: `${model}_ALL_ITEMS`
|
327
338
|
}
|
328
339
|
];
|
329
340
|
}
|
@@ -387,7 +398,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
387
398
|
type: "Document",
|
388
399
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
389
400
|
},
|
390
|
-
"Relations"
|
401
|
+
"Relations",
|
402
|
+
{ type: "UidAvailability", id: model }
|
391
403
|
];
|
392
404
|
},
|
393
405
|
async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
|
@@ -470,7 +482,7 @@ const buildValidParams = (query) => {
|
|
470
482
|
const isBaseQueryError = (error) => {
|
471
483
|
return error.name !== void 0;
|
472
484
|
};
|
473
|
-
const createYupSchema = (attributes = {}, components = {}) => {
|
485
|
+
const createYupSchema = (attributes = {}, components = {}, options = { status: null }) => {
|
474
486
|
const createModelSchema = (attributes2) => yup__namespace.object().shape(
|
475
487
|
Object.entries(attributes2).reduce((acc, [name, attribute]) => {
|
476
488
|
if (DOCUMENT_META_FIELDS.includes(name)) {
|
@@ -483,7 +495,7 @@ const createYupSchema = (attributes = {}, components = {}) => {
|
|
483
495
|
addMinValidation,
|
484
496
|
addMaxValidation,
|
485
497
|
addRegexValidation
|
486
|
-
].map((fn) => fn(attribute));
|
498
|
+
].map((fn) => fn(attribute, options));
|
487
499
|
const transformSchema = pipe__default.default(...validations);
|
488
500
|
switch (attribute.type) {
|
489
501
|
case "component": {
|
@@ -584,6 +596,14 @@ const createAttributeSchema = (attribute) => {
|
|
584
596
|
if (!value || typeof value === "string" && value.length === 0) {
|
585
597
|
return true;
|
586
598
|
}
|
599
|
+
if (typeof value === "object") {
|
600
|
+
try {
|
601
|
+
JSON.stringify(value);
|
602
|
+
return true;
|
603
|
+
} catch (err) {
|
604
|
+
return false;
|
605
|
+
}
|
606
|
+
}
|
587
607
|
try {
|
588
608
|
JSON.parse(value);
|
589
609
|
return true;
|
@@ -602,13 +622,7 @@ const createAttributeSchema = (attribute) => {
|
|
602
622
|
return yup__namespace.mixed();
|
603
623
|
}
|
604
624
|
};
|
605
|
-
const
|
606
|
-
if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
|
607
|
-
return schema.min(1, strapiAdmin.translatedErrors.required);
|
608
|
-
}
|
609
|
-
if (attribute.required && attribute.type !== "relation") {
|
610
|
-
return schema.required(strapiAdmin.translatedErrors.required);
|
611
|
-
}
|
625
|
+
const nullableSchema = (schema) => {
|
612
626
|
return schema?.nullable ? schema.nullable() : (
|
613
627
|
// In some cases '.nullable' will not be available on the schema.
|
614
628
|
// e.g. when the schema has been built using yup.lazy (e.g. for relations).
|
@@ -616,7 +630,22 @@ const addRequiredValidation = (attribute) => (schema) => {
|
|
616
630
|
schema
|
617
631
|
);
|
618
632
|
};
|
619
|
-
const
|
633
|
+
const addRequiredValidation = (attribute, options) => (schema) => {
|
634
|
+
if (options.status === "draft") {
|
635
|
+
return nullableSchema(schema);
|
636
|
+
}
|
637
|
+
if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
|
638
|
+
return schema.min(1, strapiAdmin.translatedErrors.required);
|
639
|
+
}
|
640
|
+
if (attribute.required && attribute.type !== "relation") {
|
641
|
+
return schema.required(strapiAdmin.translatedErrors.required);
|
642
|
+
}
|
643
|
+
return nullableSchema(schema);
|
644
|
+
};
|
645
|
+
const addMinLengthValidation = (attribute, options) => (schema) => {
|
646
|
+
if (options.status === "draft") {
|
647
|
+
return schema;
|
648
|
+
}
|
620
649
|
if ("minLength" in attribute && attribute.minLength && Number.isInteger(attribute.minLength) && "min" in schema) {
|
621
650
|
return schema.min(attribute.minLength, {
|
622
651
|
...strapiAdmin.translatedErrors.minLength,
|
@@ -638,11 +667,11 @@ const addMaxLengthValidation = (attribute) => (schema) => {
|
|
638
667
|
}
|
639
668
|
return schema;
|
640
669
|
};
|
641
|
-
const addMinValidation = (attribute) => (schema) => {
|
670
|
+
const addMinValidation = (attribute, options) => (schema) => {
|
642
671
|
if ("min" in attribute) {
|
643
672
|
const min = toInteger(attribute.min);
|
644
673
|
if (attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") {
|
645
|
-
if (!attribute.required && "test" in schema && min) {
|
674
|
+
if (options.status !== "draft" && !attribute.required && "test" in schema && min) {
|
646
675
|
return schema.test(
|
647
676
|
"custom-min",
|
648
677
|
{
|
@@ -878,6 +907,7 @@ const useDocumentActions = () => {
|
|
878
907
|
const { formatMessage } = reactIntl.useIntl();
|
879
908
|
const { trackUsage } = strapiAdmin.useTracking();
|
880
909
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
|
910
|
+
const navigate = reactRouterDom.useNavigate();
|
881
911
|
const [deleteDocument] = useDeleteDocumentMutation();
|
882
912
|
const _delete = React__namespace.useCallback(
|
883
913
|
async ({ collectionType, model, documentId, params }, trackerProperty) => {
|
@@ -1231,7 +1261,7 @@ const useDocumentActions = () => {
|
|
1231
1261
|
throw err;
|
1232
1262
|
}
|
1233
1263
|
},
|
1234
|
-
[autoCloneDocument,
|
1264
|
+
[autoCloneDocument, formatMessage, toggleNotification]
|
1235
1265
|
);
|
1236
1266
|
const [cloneDocument] = useCloneDocumentMutation();
|
1237
1267
|
const clone = React__namespace.useCallback(
|
@@ -1257,6 +1287,7 @@ const useDocumentActions = () => {
|
|
1257
1287
|
defaultMessage: "Cloned document"
|
1258
1288
|
})
|
1259
1289
|
});
|
1290
|
+
navigate(`../../${res.data.data.documentId}`, { relative: "path" });
|
1260
1291
|
return res.data;
|
1261
1292
|
} catch (err) {
|
1262
1293
|
toggleNotification({
|
@@ -1267,7 +1298,7 @@ const useDocumentActions = () => {
|
|
1267
1298
|
throw err;
|
1268
1299
|
}
|
1269
1300
|
},
|
1270
|
-
[cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError]
|
1301
|
+
[cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError, navigate]
|
1271
1302
|
);
|
1272
1303
|
const [getDoc] = useLazyGetDocumentQuery();
|
1273
1304
|
const getDocument = React__namespace.useCallback(
|
@@ -1293,7 +1324,7 @@ const useDocumentActions = () => {
|
|
1293
1324
|
};
|
1294
1325
|
};
|
1295
1326
|
const ProtectedHistoryPage = React.lazy(
|
1296
|
-
() => Promise.resolve().then(() => require("./History-
|
1327
|
+
() => Promise.resolve().then(() => require("./History-DXSbTWez.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1297
1328
|
);
|
1298
1329
|
const routes$1 = [
|
1299
1330
|
{
|
@@ -1306,31 +1337,31 @@ const routes$1 = [
|
|
1306
1337
|
}
|
1307
1338
|
];
|
1308
1339
|
const ProtectedEditViewPage = React.lazy(
|
1309
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1340
|
+
() => Promise.resolve().then(() => require("./EditViewPage-CHgoNwlc.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1310
1341
|
);
|
1311
1342
|
const ProtectedListViewPage = React.lazy(
|
1312
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1343
|
+
() => Promise.resolve().then(() => require("./ListViewPage-DfuwH1tt.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1313
1344
|
);
|
1314
1345
|
const ProtectedListConfiguration = React.lazy(
|
1315
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1346
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-D5C7ACZ_.js")).then((mod) => ({
|
1316
1347
|
default: mod.ProtectedListConfiguration
|
1317
1348
|
}))
|
1318
1349
|
);
|
1319
1350
|
const ProtectedEditConfigurationPage = React.lazy(
|
1320
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1351
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-B2AA1kVF.js")).then((mod) => ({
|
1321
1352
|
default: mod.ProtectedEditConfigurationPage
|
1322
1353
|
}))
|
1323
1354
|
);
|
1324
1355
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1325
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1356
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-G4EIirP8.js")).then((mod) => ({
|
1326
1357
|
default: mod.ProtectedComponentConfigurationPage
|
1327
1358
|
}))
|
1328
1359
|
);
|
1329
1360
|
const NoPermissions = React.lazy(
|
1330
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1361
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-Bu4GWYb-.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1331
1362
|
);
|
1332
1363
|
const NoContentType = React.lazy(
|
1333
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1364
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-BIxlkWWi.js")).then((mod) => ({ default: mod.NoContentType }))
|
1334
1365
|
);
|
1335
1366
|
const CollectionTypePages = () => {
|
1336
1367
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1444,12 +1475,14 @@ const DocumentActionButton = (action) => {
|
|
1444
1475
|
/* @__PURE__ */ jsxRuntime.jsx(
|
1445
1476
|
designSystem.Button,
|
1446
1477
|
{
|
1447
|
-
flex:
|
1478
|
+
flex: "auto",
|
1448
1479
|
startIcon: action.icon,
|
1449
1480
|
disabled: action.disabled,
|
1450
1481
|
onClick: handleClick(action),
|
1451
1482
|
justifyContent: "center",
|
1452
1483
|
variant: action.variant || "default",
|
1484
|
+
paddingTop: "7px",
|
1485
|
+
paddingBottom: "7px",
|
1453
1486
|
children: action.label
|
1454
1487
|
}
|
1455
1488
|
),
|
@@ -1527,7 +1560,7 @@ const DocumentActionsMenu = ({
|
|
1527
1560
|
]
|
1528
1561
|
}
|
1529
1562
|
),
|
1530
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, {
|
1563
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1531
1564
|
actions2.map((action) => {
|
1532
1565
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
1533
1566
|
designSystem.Menu.Item,
|
@@ -1543,7 +1576,14 @@ const DocumentActionsMenu = ({
|
|
1543
1576
|
gap: 2,
|
1544
1577
|
tag: "span",
|
1545
1578
|
children: [
|
1546
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
1579
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
1580
|
+
designSystem.Flex,
|
1581
|
+
{
|
1582
|
+
tag: "span",
|
1583
|
+
color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
|
1584
|
+
children: action.icon
|
1585
|
+
}
|
1586
|
+
),
|
1547
1587
|
action.label
|
1548
1588
|
]
|
1549
1589
|
}
|
@@ -1606,6 +1646,18 @@ const convertActionVariantToColor = (variant = "secondary") => {
|
|
1606
1646
|
return "primary600";
|
1607
1647
|
}
|
1608
1648
|
};
|
1649
|
+
const convertActionVariantToIconColor = (variant = "secondary") => {
|
1650
|
+
switch (variant) {
|
1651
|
+
case "danger":
|
1652
|
+
return "danger600";
|
1653
|
+
case "secondary":
|
1654
|
+
return "neutral500";
|
1655
|
+
case "success":
|
1656
|
+
return "success600";
|
1657
|
+
default:
|
1658
|
+
return "primary600";
|
1659
|
+
}
|
1660
|
+
};
|
1609
1661
|
const DocumentActionConfirmDialog = ({
|
1610
1662
|
onClose,
|
1611
1663
|
onCancel,
|
@@ -1632,11 +1684,11 @@ const DocumentActionConfirmDialog = ({
|
|
1632
1684
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title }),
|
1633
1685
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: content }),
|
1634
1686
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
|
1635
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({
|
1687
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", fullWidth: true, children: formatMessage({
|
1636
1688
|
id: "app.components.Button.cancel",
|
1637
1689
|
defaultMessage: "Cancel"
|
1638
1690
|
}) }) }),
|
1639
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, children: formatMessage({
|
1691
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, fullWidth: true, children: formatMessage({
|
1640
1692
|
id: "app.components.Button.confirm",
|
1641
1693
|
defaultMessage: "Confirm"
|
1642
1694
|
}) })
|
@@ -1675,12 +1727,10 @@ const PublishAction$1 = ({
|
|
1675
1727
|
const navigate = reactRouterDom.useNavigate();
|
1676
1728
|
const { toggleNotification } = strapiAdmin.useNotification();
|
1677
1729
|
const { _unstableFormatValidationErrors: formatValidationErrors } = strapiAdmin.useAPIErrorHandler();
|
1730
|
+
const isListView = reactRouterDom.useMatch(LIST_PATH) !== null;
|
1678
1731
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
1679
1732
|
const { formatMessage } = reactIntl.useIntl();
|
1680
|
-
const { canPublish
|
1681
|
-
"PublishAction",
|
1682
|
-
({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
|
1683
|
-
);
|
1733
|
+
const canPublish = useDocumentRBAC("PublishAction", ({ canPublish: canPublish2 }) => canPublish2);
|
1684
1734
|
const { publish } = useDocumentActions();
|
1685
1735
|
const [
|
1686
1736
|
countDraftRelations,
|
@@ -1732,24 +1782,25 @@ const PublishAction$1 = ({
|
|
1732
1782
|
}
|
1733
1783
|
}, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
|
1734
1784
|
React__namespace.useEffect(() => {
|
1735
|
-
if (documentId) {
|
1736
|
-
|
1737
|
-
const { data, error } = await countDraftRelations({
|
1738
|
-
collectionType,
|
1739
|
-
model,
|
1740
|
-
documentId,
|
1741
|
-
params
|
1742
|
-
});
|
1743
|
-
if (error) {
|
1744
|
-
throw error;
|
1745
|
-
}
|
1746
|
-
if (data) {
|
1747
|
-
setServerCountOfDraftRelations(data.data);
|
1748
|
-
}
|
1749
|
-
};
|
1750
|
-
fetchDraftRelationsCount();
|
1785
|
+
if (!document || !document.documentId || isListView) {
|
1786
|
+
return;
|
1751
1787
|
}
|
1752
|
-
|
1788
|
+
const fetchDraftRelationsCount = async () => {
|
1789
|
+
const { data, error } = await countDraftRelations({
|
1790
|
+
collectionType,
|
1791
|
+
model,
|
1792
|
+
documentId,
|
1793
|
+
params
|
1794
|
+
});
|
1795
|
+
if (error) {
|
1796
|
+
throw error;
|
1797
|
+
}
|
1798
|
+
if (data) {
|
1799
|
+
setServerCountOfDraftRelations(data.data);
|
1800
|
+
}
|
1801
|
+
};
|
1802
|
+
fetchDraftRelationsCount();
|
1803
|
+
}, [isListView, document, documentId, countDraftRelations, collectionType, model, params]);
|
1753
1804
|
const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
|
1754
1805
|
if (!schema?.options?.draftAndPublish) {
|
1755
1806
|
return null;
|
@@ -1790,7 +1841,8 @@ const PublishAction$1 = ({
|
|
1790
1841
|
}
|
1791
1842
|
};
|
1792
1843
|
const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
|
1793
|
-
const
|
1844
|
+
const enableDraftRelationsCount = false;
|
1845
|
+
const hasDraftRelations = enableDraftRelationsCount;
|
1794
1846
|
return {
|
1795
1847
|
/**
|
1796
1848
|
* Disabled when:
|
@@ -1807,9 +1859,6 @@ const PublishAction$1 = ({
|
|
1807
1859
|
defaultMessage: "Publish"
|
1808
1860
|
}),
|
1809
1861
|
onClick: async () => {
|
1810
|
-
if (hasDraftRelations) {
|
1811
|
-
return;
|
1812
|
-
}
|
1813
1862
|
await performPublish();
|
1814
1863
|
},
|
1815
1864
|
dialog: hasDraftRelations ? {
|
@@ -1848,10 +1897,6 @@ const UpdateAction = ({
|
|
1848
1897
|
const cloneMatch = reactRouterDom.useMatch(CLONE_PATH);
|
1849
1898
|
const isCloning = cloneMatch !== null;
|
1850
1899
|
const { formatMessage } = reactIntl.useIntl();
|
1851
|
-
useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
|
1852
|
-
canCreate: canCreate2,
|
1853
|
-
canUpdate: canUpdate2
|
1854
|
-
}));
|
1855
1900
|
const { create, update, clone } = useDocumentActions();
|
1856
1901
|
const [{ query, rawQuery }] = strapiAdmin.useQueryParams();
|
1857
1902
|
const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
|
@@ -1877,16 +1922,18 @@ const UpdateAction = ({
|
|
1877
1922
|
onClick: async () => {
|
1878
1923
|
setSubmitting(true);
|
1879
1924
|
try {
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1925
|
+
if (activeTab !== "draft") {
|
1926
|
+
const { errors } = await validate();
|
1927
|
+
if (errors) {
|
1928
|
+
toggleNotification({
|
1929
|
+
type: "danger",
|
1930
|
+
message: formatMessage({
|
1931
|
+
id: "content-manager.validation.error",
|
1932
|
+
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
1933
|
+
})
|
1934
|
+
});
|
1935
|
+
return;
|
1936
|
+
}
|
1890
1937
|
}
|
1891
1938
|
if (isCloning) {
|
1892
1939
|
const res = await clone(
|
@@ -1982,7 +2029,7 @@ const UnpublishAction$1 = ({
|
|
1982
2029
|
id: "app.utils.unpublish",
|
1983
2030
|
defaultMessage: "Unpublish"
|
1984
2031
|
}),
|
1985
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
2032
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cross, {}),
|
1986
2033
|
onClick: async () => {
|
1987
2034
|
if (!documentId && collectionType !== SINGLE_TYPES || isDocumentModified) {
|
1988
2035
|
if (!documentId) {
|
@@ -2094,7 +2141,7 @@ const DiscardAction = ({
|
|
2094
2141
|
id: "content-manager.actions.discard.label",
|
2095
2142
|
defaultMessage: "Discard changes"
|
2096
2143
|
}),
|
2097
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
2144
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cross, {}),
|
2098
2145
|
position: ["panel", "table-row"],
|
2099
2146
|
variant: "danger",
|
2100
2147
|
dialog: {
|
@@ -2122,11 +2169,6 @@ const DiscardAction = ({
|
|
2122
2169
|
};
|
2123
2170
|
};
|
2124
2171
|
DiscardAction.type = "discard";
|
2125
|
-
const StyledCrossCircle = styledComponents.styled(Icons.CrossCircle)`
|
2126
|
-
path {
|
2127
|
-
fill: currentColor;
|
2128
|
-
}
|
2129
|
-
`;
|
2130
2172
|
const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
|
2131
2173
|
const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
|
2132
2174
|
const RelativeTime = React__namespace.forwardRef(
|
@@ -2174,7 +2216,7 @@ const getDisplayName = ({
|
|
2174
2216
|
};
|
2175
2217
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2176
2218
|
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2177
|
-
const statusVariant = status === "draft" ? "
|
2219
|
+
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2178
2220
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: capitalise(status) }) });
|
2179
2221
|
};
|
2180
2222
|
const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
|
@@ -2357,8 +2399,22 @@ const Information = ({ activeTab }) => {
|
|
2357
2399
|
);
|
2358
2400
|
};
|
2359
2401
|
const HeaderActions = ({ actions: actions2 }) => {
|
2360
|
-
|
2361
|
-
|
2402
|
+
const [dialogId, setDialogId] = React__namespace.useState(null);
|
2403
|
+
const handleClick = (action) => async (e) => {
|
2404
|
+
if (!("options" in action)) {
|
2405
|
+
const { onClick = () => false, dialog, id } = action;
|
2406
|
+
const muteDialog = await onClick(e);
|
2407
|
+
if (dialog && !muteDialog) {
|
2408
|
+
e.preventDefault();
|
2409
|
+
setDialogId(id);
|
2410
|
+
}
|
2411
|
+
}
|
2412
|
+
};
|
2413
|
+
const handleClose = () => {
|
2414
|
+
setDialogId(null);
|
2415
|
+
};
|
2416
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 1, children: actions2.map((action) => {
|
2417
|
+
if (action.options) {
|
2362
2418
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
2363
2419
|
designSystem.SingleSelect,
|
2364
2420
|
{
|
@@ -2372,10 +2428,49 @@ const HeaderActions = ({ actions: actions2 }) => {
|
|
2372
2428
|
action.id
|
2373
2429
|
);
|
2374
2430
|
} else {
|
2375
|
-
|
2431
|
+
if (action.type === "icon") {
|
2432
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
2433
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
2434
|
+
designSystem.IconButton,
|
2435
|
+
{
|
2436
|
+
disabled: action.disabled,
|
2437
|
+
label: action.label,
|
2438
|
+
size: "S",
|
2439
|
+
onClick: handleClick(action),
|
2440
|
+
children: action.icon
|
2441
|
+
}
|
2442
|
+
),
|
2443
|
+
action.dialog ? /* @__PURE__ */ jsxRuntime.jsx(
|
2444
|
+
HeaderActionDialog,
|
2445
|
+
{
|
2446
|
+
...action.dialog,
|
2447
|
+
isOpen: dialogId === action.id,
|
2448
|
+
onClose: handleClose
|
2449
|
+
}
|
2450
|
+
) : null
|
2451
|
+
] }, action.id);
|
2452
|
+
}
|
2376
2453
|
}
|
2377
2454
|
}) });
|
2378
2455
|
};
|
2456
|
+
const HeaderActionDialog = ({
|
2457
|
+
onClose,
|
2458
|
+
onCancel,
|
2459
|
+
title,
|
2460
|
+
content: Content,
|
2461
|
+
isOpen
|
2462
|
+
}) => {
|
2463
|
+
const handleClose = async () => {
|
2464
|
+
if (onCancel) {
|
2465
|
+
await onCancel();
|
2466
|
+
}
|
2467
|
+
onClose();
|
2468
|
+
};
|
2469
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title }),
|
2471
|
+
typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : Content
|
2472
|
+
] }) });
|
2473
|
+
};
|
2379
2474
|
const ConfigureTheViewAction = ({ collectionType, model }) => {
|
2380
2475
|
const navigate = reactRouterDom.useNavigate();
|
2381
2476
|
const { formatMessage } = reactIntl.useIntl();
|
@@ -2511,7 +2606,7 @@ const ActionsPanel = () => {
|
|
2511
2606
|
return {
|
2512
2607
|
title: formatMessage({
|
2513
2608
|
id: "content-manager.containers.edit.panels.default.title",
|
2514
|
-
defaultMessage: "
|
2609
|
+
defaultMessage: "Entry"
|
2515
2610
|
}),
|
2516
2611
|
content: /* @__PURE__ */ jsxRuntime.jsx(ActionsPanelContent, {})
|
2517
2612
|
};
|
@@ -2755,7 +2850,8 @@ const formatEditLayout = (data, {
|
|
2755
2850
|
layout: convertEditLayoutToFieldLayouts(
|
2756
2851
|
configuration.layouts.edit,
|
2757
2852
|
components[uid].attributes,
|
2758
|
-
configuration.metadatas
|
2853
|
+
configuration.metadatas,
|
2854
|
+
{ configurations: data.components, schemas: components }
|
2759
2855
|
),
|
2760
2856
|
settings: {
|
2761
2857
|
...configuration.settings,
|
@@ -2912,6 +3008,7 @@ const ConfirmDialogPublishAll = ({
|
|
2912
3008
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler(getTranslation);
|
2913
3009
|
const { model, schema } = useDoc();
|
2914
3010
|
const [{ query }] = strapiAdmin.useQueryParams();
|
3011
|
+
const enableDraftRelationsCount = false;
|
2915
3012
|
const {
|
2916
3013
|
data: countDraftRelations = 0,
|
2917
3014
|
isLoading,
|
@@ -2923,7 +3020,7 @@ const ConfirmDialogPublishAll = ({
|
|
2923
3020
|
locale: query?.plugins?.i18n?.locale
|
2924
3021
|
},
|
2925
3022
|
{
|
2926
|
-
skip:
|
3023
|
+
skip: !enableDraftRelationsCount
|
2927
3024
|
}
|
2928
3025
|
);
|
2929
3026
|
React__namespace.useEffect(() => {
|
@@ -3108,7 +3205,7 @@ const SelectedEntriesTableContent = ({
|
|
3108
3205
|
status: row.status
|
3109
3206
|
}
|
3110
3207
|
) }),
|
3111
|
-
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
3208
|
+
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
3112
3209
|
designSystem.IconButton,
|
3113
3210
|
{
|
3114
3211
|
tag: reactRouterDom.Link,
|
@@ -3131,9 +3228,10 @@ const SelectedEntriesTableContent = ({
|
|
3131
3228
|
),
|
3132
3229
|
target: "_blank",
|
3133
3230
|
marginLeft: "auto",
|
3134
|
-
|
3231
|
+
variant: "ghost",
|
3232
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Pencil, { width: "1.6rem", height: "1.6rem" })
|
3135
3233
|
}
|
3136
|
-
) })
|
3234
|
+
) }) })
|
3137
3235
|
] }, row.id)) })
|
3138
3236
|
] });
|
3139
3237
|
};
|
@@ -3170,7 +3268,13 @@ const SelectedEntriesModalContent = ({
|
|
3170
3268
|
);
|
3171
3269
|
const { rows, validationErrors } = React__namespace.useMemo(() => {
|
3172
3270
|
if (data.length > 0 && schema) {
|
3173
|
-
const validate = createYupSchema(
|
3271
|
+
const validate = createYupSchema(
|
3272
|
+
schema.attributes,
|
3273
|
+
components,
|
3274
|
+
// Since this is the "Publish" action, the validation
|
3275
|
+
// schema must enforce the rules for published entities
|
3276
|
+
{ status: "published" }
|
3277
|
+
);
|
3174
3278
|
const validationErrors2 = {};
|
3175
3279
|
const rows2 = data.map((entry) => {
|
3176
3280
|
try {
|
@@ -3520,7 +3624,7 @@ const TableActions = ({ document }) => {
|
|
3520
3624
|
strapiAdmin.DescriptionComponentRenderer,
|
3521
3625
|
{
|
3522
3626
|
props,
|
3523
|
-
descriptions: plugins["content-manager"].apis.getDocumentActions(),
|
3627
|
+
descriptions: plugins["content-manager"].apis.getDocumentActions().filter((action) => action.name !== "PublishAction"),
|
3524
3628
|
children: (actions2) => {
|
3525
3629
|
const tableRowActions = actions2.filter((action) => {
|
3526
3630
|
const positions = Array.isArray(action.position) ? action.position : [action.position];
|
@@ -3631,7 +3735,7 @@ const CloneAction = ({ model, documentId }) => {
|
|
3631
3735
|
}),
|
3632
3736
|
content: /* @__PURE__ */ jsxRuntime.jsx(AutoCloneFailureModalBody, { prohibitedFields }),
|
3633
3737
|
footer: ({ onClose }) => {
|
3634
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.
|
3738
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Footer, { children: [
|
3635
3739
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onClose, variant: "tertiary", children: formatMessage({
|
3636
3740
|
id: "cancel",
|
3637
3741
|
defaultMessage: "Cancel"
|
@@ -3862,7 +3966,7 @@ const index = {
|
|
3862
3966
|
app.router.addRoute({
|
3863
3967
|
path: "content-manager/*",
|
3864
3968
|
lazy: async () => {
|
3865
|
-
const { Layout } = await Promise.resolve().then(() => require("./layout-
|
3969
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-bE-WUnQ0.js"));
|
3866
3970
|
return {
|
3867
3971
|
Component: Layout
|
3868
3972
|
};
|
@@ -3879,7 +3983,7 @@ const index = {
|
|
3879
3983
|
async registerTrads({ locales }) {
|
3880
3984
|
const importedTrads = await Promise.all(
|
3881
3985
|
locales.map((locale) => {
|
3882
|
-
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-
|
3986
|
+
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-BVzUkPxZ.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.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-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
|
3883
3987
|
return {
|
3884
3988
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
3885
3989
|
locale
|
@@ -3897,6 +4001,7 @@ const index = {
|
|
3897
4001
|
};
|
3898
4002
|
exports.ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD = ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD;
|
3899
4003
|
exports.BulkActionsRenderer = BulkActionsRenderer;
|
4004
|
+
exports.CLONE_PATH = CLONE_PATH;
|
3900
4005
|
exports.COLLECTION_TYPES = COLLECTION_TYPES;
|
3901
4006
|
exports.CREATOR_FIELDS = CREATOR_FIELDS;
|
3902
4007
|
exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
|
@@ -3936,4 +4041,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
|
3936
4041
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
3937
4042
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
3938
4043
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
3939
|
-
//# sourceMappingURL=index-
|
4044
|
+
//# sourceMappingURL=index-DXiHxy70.js.map
|