@strapi/content-manager 0.0.0-experimental.60f3ded53a22a24d208ebf6df9b84c118aa97abf → 0.0.0-experimental.745741d19e90275ca6f7c928ca19f9bb0fd9d933
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/LICENSE +18 -3
- package/dist/_chunks/{ComponentConfigurationPage-Cl7eB3s4.js → ComponentConfigurationPage-BvHtG7uH.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-Cl7eB3s4.js.map → ComponentConfigurationPage-BvHtG7uH.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-DErJQEVW.mjs → ComponentConfigurationPage-DHNM3YBz.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DErJQEVW.mjs.map → ComponentConfigurationPage-DHNM3YBz.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CBosWqQ7.mjs → EditConfigurationPage-Cp6HAEzN.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CBosWqQ7.mjs.map → EditConfigurationPage-Cp6HAEzN.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CyfFvH6-.js → EditConfigurationPage-DOmfCEMo.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CyfFvH6-.js.map → EditConfigurationPage-DOmfCEMo.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-DxyAOItK.js → EditViewPage-BqNpC6hO.js} +3 -3
- package/dist/_chunks/{EditViewPage-DxyAOItK.js.map → EditViewPage-BqNpC6hO.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-ClIueJnM.mjs → EditViewPage-BtkEx339.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-ClIueJnM.mjs.map → EditViewPage-BtkEx339.mjs.map} +1 -1
- package/dist/_chunks/{Field-BZBYmvaf.mjs → Field-R5NbffTB.mjs} +273 -6
- package/dist/_chunks/Field-R5NbffTB.mjs.map +1 -0
- package/dist/_chunks/{Field-C0Y_SR9e.js → Field-lsPFnAmH.js} +272 -5
- package/dist/_chunks/Field-lsPFnAmH.js.map +1 -0
- package/dist/_chunks/{Form-jwRSC2kV.mjs → Form-BHmXSfyy.mjs} +2 -2
- package/dist/_chunks/{Form-jwRSC2kV.mjs.map → Form-BHmXSfyy.mjs.map} +1 -1
- package/dist/_chunks/{Form-DwvGnISS.js → Form-CcGboku8.js} +2 -2
- package/dist/_chunks/{Form-DwvGnISS.js.map → Form-CcGboku8.js.map} +1 -1
- package/dist/_chunks/{History-Cda0Yjzz.js → History-Bsud8jwh.js} +20 -5
- package/dist/_chunks/{History-Cda0Yjzz.js.map → History-Bsud8jwh.js.map} +1 -1
- package/dist/_chunks/{History-BgzAIj0G.mjs → History-ByUPL3T3.mjs} +20 -5
- package/dist/_chunks/{History-BgzAIj0G.mjs.map → History-ByUPL3T3.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-GH55qfoT.mjs → ListConfigurationPage-Bm5HACXf.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-GH55qfoT.mjs.map → ListConfigurationPage-Bm5HACXf.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-C29EF97r.js → ListConfigurationPage-DiT463qx.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-C29EF97r.js.map → ListConfigurationPage-DiT463qx.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-CnRt0UT7.js → ListViewPage-CsrC9L_d.js} +15 -6
- package/dist/_chunks/ListViewPage-CsrC9L_d.js.map +1 -0
- package/dist/_chunks/{ListViewPage-QU03PFj1.mjs → ListViewPage-JSyNAAYu.mjs} +15 -6
- package/dist/_chunks/ListViewPage-JSyNAAYu.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-DFDjxByI.js → NoContentTypePage-Bsvng4II.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-DFDjxByI.js.map → NoContentTypePage-Bsvng4II.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CPs2CnzH.mjs → NoContentTypePage-CsrQUpBE.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-CPs2CnzH.mjs.map → NoContentTypePage-CsrQUpBE.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BVHI-jv5.js → NoPermissionsPage-CdHNJtEf.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BVHI-jv5.js.map → NoPermissionsPage-CdHNJtEf.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-ct58lcY0.mjs → NoPermissionsPage-DNmf_pj0.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-ct58lcY0.mjs.map → NoPermissionsPage-DNmf_pj0.mjs.map} +1 -1
- package/dist/_chunks/{Relations-BjpPPCKp.js → Relations-CghaPv2D.js} +3 -3
- package/dist/_chunks/{Relations-BjpPPCKp.js.map → Relations-CghaPv2D.js.map} +1 -1
- package/dist/_chunks/{Relations-KMf5qEN0.mjs → Relations-u8-37jK0.mjs} +3 -3
- package/dist/_chunks/{Relations-KMf5qEN0.mjs.map → Relations-u8-37jK0.mjs.map} +1 -1
- package/dist/_chunks/{index-D9ZwczCV.js → index-BOZx6IMg.js} +46 -37
- package/dist/_chunks/index-BOZx6IMg.js.map +1 -0
- package/dist/_chunks/{index-6kKXK7y8.mjs → index-CaE6NG4a.mjs} +58 -49
- package/dist/_chunks/index-CaE6NG4a.mjs.map +1 -0
- package/dist/_chunks/{layout-B1Z-9koY.mjs → layout-Bx7svTbY.mjs} +7 -7
- package/dist/_chunks/layout-Bx7svTbY.mjs.map +1 -0
- package/dist/_chunks/{layout-BJfBoBiF.js → layout-Ciz224q5.js} +6 -6
- package/dist/_chunks/layout-Ciz224q5.js.map +1 -0
- package/dist/_chunks/{relations-CMvjzyU3.js → relations-CP8sB2YZ.js} +2 -2
- package/dist/_chunks/{relations-CMvjzyU3.js.map → relations-CP8sB2YZ.js.map} +1 -1
- package/dist/_chunks/{relations-CgZg7Pyx.mjs → relations-Cxc1cEv3.mjs} +2 -2
- package/dist/_chunks/{relations-CgZg7Pyx.mjs.map → relations-Cxc1cEv3.mjs.map} +1 -1
- 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/BlocksInput/utils/constants.d.ts +4 -0
- 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 +4 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +4 -0
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/_chunks/Field-BZBYmvaf.mjs.map +0 -1
- package/dist/_chunks/Field-C0Y_SR9e.js.map +0 -1
- package/dist/_chunks/ListViewPage-CnRt0UT7.js.map +0 -1
- package/dist/_chunks/ListViewPage-QU03PFj1.mjs.map +0 -1
- package/dist/_chunks/index-6kKXK7y8.mjs.map +0 -1
- package/dist/_chunks/index-D9ZwczCV.js.map +0 -1
- package/dist/_chunks/layout-B1Z-9koY.mjs.map +0 -1
- package/dist/_chunks/layout-BJfBoBiF.js.map +0 -1
@@ -215,9 +215,7 @@ const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
|
|
215
215
|
"Document",
|
216
216
|
"InitialData",
|
217
217
|
"HistoryVersion",
|
218
|
-
"Relations"
|
219
|
-
"Release",
|
220
|
-
"ReleaseAction"
|
218
|
+
"Relations"
|
221
219
|
]
|
222
220
|
});
|
223
221
|
const documentApi = contentManagerApi.injectEndpoints({
|
@@ -271,9 +269,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
271
269
|
}
|
272
270
|
}),
|
273
271
|
invalidatesTags: (_result, _error, { collectionType, model }) => [
|
274
|
-
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model }
|
275
|
-
{ type: "Release", id: "LIST" },
|
276
|
-
{ type: "ReleaseAction", id: "LIST" }
|
272
|
+
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model }
|
277
273
|
]
|
278
274
|
}),
|
279
275
|
deleteManyDocuments: builder.mutation({
|
@@ -285,11 +281,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
285
281
|
params
|
286
282
|
}
|
287
283
|
}),
|
288
|
-
invalidatesTags: (_res, _error, { model }) => [
|
289
|
-
{ type: "Document", id: `${model}_LIST` },
|
290
|
-
{ type: "Release", id: "LIST" },
|
291
|
-
{ type: "ReleaseAction", id: "LIST" }
|
292
|
-
]
|
284
|
+
invalidatesTags: (_res, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
|
293
285
|
}),
|
294
286
|
discardDocument: builder.mutation({
|
295
287
|
query: ({ collectionType, model, documentId, params }) => ({
|
@@ -306,9 +298,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
306
298
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
307
299
|
},
|
308
300
|
{ type: "Document", id: `${model}_LIST` },
|
309
|
-
"Relations"
|
310
|
-
{ type: "Release", id: "LIST" },
|
311
|
-
{ type: "ReleaseAction", id: "LIST" }
|
301
|
+
"Relations"
|
312
302
|
];
|
313
303
|
}
|
314
304
|
}),
|
@@ -427,9 +417,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
427
417
|
type: "Document",
|
428
418
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
429
419
|
},
|
430
|
-
"Relations"
|
431
|
-
{ type: "Release", id: "LIST" },
|
432
|
-
{ type: "ReleaseAction", id: "LIST" }
|
420
|
+
"Relations"
|
433
421
|
];
|
434
422
|
}
|
435
423
|
}),
|
@@ -633,7 +621,7 @@ const createAttributeSchema = (attribute) => {
|
|
633
621
|
}
|
634
622
|
};
|
635
623
|
const addRequiredValidation = (attribute) => (schema) => {
|
636
|
-
if (attribute.required) {
|
624
|
+
if (attribute.required && attribute.type !== "relation") {
|
637
625
|
return schema.required({
|
638
626
|
id: strapiAdmin.translatedErrors.required.id,
|
639
627
|
defaultMessage: "This field is required."
|
@@ -797,7 +785,10 @@ const useDocument = (args, opts) => {
|
|
797
785
|
isLoading: isLoadingDocument,
|
798
786
|
isFetching: isFetchingDocument,
|
799
787
|
error
|
800
|
-
} = useGetDocumentQuery(args,
|
788
|
+
} = useGetDocumentQuery(args, {
|
789
|
+
...opts,
|
790
|
+
skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
|
791
|
+
});
|
801
792
|
const { components, schema, isLoading: isLoadingSchema } = useContentTypeSchema(args.model);
|
802
793
|
React__namespace.useEffect(() => {
|
803
794
|
if (error) {
|
@@ -1299,7 +1290,7 @@ const useDocumentActions = () => {
|
|
1299
1290
|
};
|
1300
1291
|
};
|
1301
1292
|
const ProtectedHistoryPage = React.lazy(
|
1302
|
-
() => Promise.resolve().then(() => require("./History-
|
1293
|
+
() => Promise.resolve().then(() => require("./History-Bsud8jwh.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1303
1294
|
);
|
1304
1295
|
const routes$1 = [
|
1305
1296
|
{
|
@@ -1312,31 +1303,31 @@ const routes$1 = [
|
|
1312
1303
|
}
|
1313
1304
|
];
|
1314
1305
|
const ProtectedEditViewPage = React.lazy(
|
1315
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1306
|
+
() => Promise.resolve().then(() => require("./EditViewPage-BqNpC6hO.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1316
1307
|
);
|
1317
1308
|
const ProtectedListViewPage = React.lazy(
|
1318
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1309
|
+
() => Promise.resolve().then(() => require("./ListViewPage-CsrC9L_d.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1319
1310
|
);
|
1320
1311
|
const ProtectedListConfiguration = React.lazy(
|
1321
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1312
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-DiT463qx.js")).then((mod) => ({
|
1322
1313
|
default: mod.ProtectedListConfiguration
|
1323
1314
|
}))
|
1324
1315
|
);
|
1325
1316
|
const ProtectedEditConfigurationPage = React.lazy(
|
1326
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1317
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-DOmfCEMo.js")).then((mod) => ({
|
1327
1318
|
default: mod.ProtectedEditConfigurationPage
|
1328
1319
|
}))
|
1329
1320
|
);
|
1330
1321
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1331
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1322
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-BvHtG7uH.js")).then((mod) => ({
|
1332
1323
|
default: mod.ProtectedComponentConfigurationPage
|
1333
1324
|
}))
|
1334
1325
|
);
|
1335
1326
|
const NoPermissions = React.lazy(
|
1336
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1327
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-CdHNJtEf.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1337
1328
|
);
|
1338
1329
|
const NoContentType = React.lazy(
|
1339
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1330
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-Bsvng4II.js")).then((mod) => ({ default: mod.NoContentType }))
|
1340
1331
|
);
|
1341
1332
|
const CollectionTypePages = () => {
|
1342
1333
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1669,8 +1660,8 @@ const DocumentActionModal = ({
|
|
1669
1660
|
};
|
1670
1661
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { children: [
|
1671
1662
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: title }) }),
|
1672
|
-
typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) :
|
1673
|
-
typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
|
1663
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : Content }),
|
1664
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Footer, { children: typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer })
|
1674
1665
|
] }) });
|
1675
1666
|
};
|
1676
1667
|
const PublishAction$1 = ({
|
@@ -1854,10 +1845,13 @@ const UpdateAction = ({
|
|
1854
1845
|
document
|
1855
1846
|
);
|
1856
1847
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
1857
|
-
navigate(
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1848
|
+
navigate(
|
1849
|
+
{
|
1850
|
+
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
1851
|
+
search: rawQuery
|
1852
|
+
},
|
1853
|
+
{ replace: true }
|
1854
|
+
);
|
1861
1855
|
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
1862
1856
|
setErrors(formatValidationErrors(res.error));
|
1863
1857
|
}
|
@@ -2931,7 +2925,14 @@ const formatErrorMessages = (errors, parentKey, formatMessage) => {
|
|
2931
2925
|
)
|
2932
2926
|
);
|
2933
2927
|
} else {
|
2934
|
-
messages.push(
|
2928
|
+
messages.push(
|
2929
|
+
...formatErrorMessages(
|
2930
|
+
// @ts-expect-error TODO: check why value is not compatible with FormErrors
|
2931
|
+
value,
|
2932
|
+
currentKey,
|
2933
|
+
formatMessage
|
2934
|
+
)
|
2935
|
+
);
|
2935
2936
|
}
|
2936
2937
|
} else {
|
2937
2938
|
messages.push(
|
@@ -3734,9 +3735,18 @@ const index = {
|
|
3734
3735
|
defaultMessage: "Content Manager"
|
3735
3736
|
},
|
3736
3737
|
permissions: [],
|
3737
|
-
Component: () => Promise.resolve().then(() => require("./layout-BJfBoBiF.js")).then((mod) => ({ default: mod.Layout })),
|
3738
3738
|
position: 1
|
3739
3739
|
});
|
3740
|
+
app.router.addRoute({
|
3741
|
+
path: "content-manager/*",
|
3742
|
+
lazy: async () => {
|
3743
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-Ciz224q5.js"));
|
3744
|
+
return {
|
3745
|
+
Component: Layout
|
3746
|
+
};
|
3747
|
+
},
|
3748
|
+
children: routes
|
3749
|
+
});
|
3740
3750
|
app.registerPlugin(cm.config);
|
3741
3751
|
},
|
3742
3752
|
async registerTrads({ locales }) {
|
@@ -3786,7 +3796,6 @@ exports.getDisplayName = getDisplayName;
|
|
3786
3796
|
exports.getMainField = getMainField;
|
3787
3797
|
exports.getTranslation = getTranslation;
|
3788
3798
|
exports.index = index;
|
3789
|
-
exports.routes = routes;
|
3790
3799
|
exports.setInitialData = setInitialData;
|
3791
3800
|
exports.useContentTypeSchema = useContentTypeSchema;
|
3792
3801
|
exports.useDoc = useDoc;
|
@@ -3800,4 +3809,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
|
3800
3809
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
3801
3810
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
3802
3811
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
3803
|
-
//# sourceMappingURL=index-
|
3812
|
+
//# sourceMappingURL=index-BOZx6IMg.js.map
|