@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
@@ -194,9 +194,7 @@ const contentManagerApi = adminApi.enhanceEndpoints({
|
|
194
194
|
"Document",
|
195
195
|
"InitialData",
|
196
196
|
"HistoryVersion",
|
197
|
-
"Relations"
|
198
|
-
"Release",
|
199
|
-
"ReleaseAction"
|
197
|
+
"Relations"
|
200
198
|
]
|
201
199
|
});
|
202
200
|
const documentApi = contentManagerApi.injectEndpoints({
|
@@ -250,9 +248,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
250
248
|
}
|
251
249
|
}),
|
252
250
|
invalidatesTags: (_result, _error, { collectionType, model }) => [
|
253
|
-
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model }
|
254
|
-
{ type: "Release", id: "LIST" },
|
255
|
-
{ type: "ReleaseAction", id: "LIST" }
|
251
|
+
{ type: "Document", id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model }
|
256
252
|
]
|
257
253
|
}),
|
258
254
|
deleteManyDocuments: builder.mutation({
|
@@ -264,11 +260,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
264
260
|
params
|
265
261
|
}
|
266
262
|
}),
|
267
|
-
invalidatesTags: (_res, _error, { model }) => [
|
268
|
-
{ type: "Document", id: `${model}_LIST` },
|
269
|
-
{ type: "Release", id: "LIST" },
|
270
|
-
{ type: "ReleaseAction", id: "LIST" }
|
271
|
-
]
|
263
|
+
invalidatesTags: (_res, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
|
272
264
|
}),
|
273
265
|
discardDocument: builder.mutation({
|
274
266
|
query: ({ collectionType, model, documentId, params }) => ({
|
@@ -285,9 +277,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
285
277
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
286
278
|
},
|
287
279
|
{ type: "Document", id: `${model}_LIST` },
|
288
|
-
"Relations"
|
289
|
-
{ type: "Release", id: "LIST" },
|
290
|
-
{ type: "ReleaseAction", id: "LIST" }
|
280
|
+
"Relations"
|
291
281
|
];
|
292
282
|
}
|
293
283
|
}),
|
@@ -406,9 +396,7 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
406
396
|
type: "Document",
|
407
397
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
408
398
|
},
|
409
|
-
"Relations"
|
410
|
-
{ type: "Release", id: "LIST" },
|
411
|
-
{ type: "ReleaseAction", id: "LIST" }
|
399
|
+
"Relations"
|
412
400
|
];
|
413
401
|
}
|
414
402
|
}),
|
@@ -612,7 +600,7 @@ const createAttributeSchema = (attribute) => {
|
|
612
600
|
}
|
613
601
|
};
|
614
602
|
const addRequiredValidation = (attribute) => (schema) => {
|
615
|
-
if (attribute.required) {
|
603
|
+
if (attribute.required && attribute.type !== "relation") {
|
616
604
|
return schema.required({
|
617
605
|
id: translatedErrors.required.id,
|
618
606
|
defaultMessage: "This field is required."
|
@@ -776,7 +764,10 @@ const useDocument = (args, opts) => {
|
|
776
764
|
isLoading: isLoadingDocument,
|
777
765
|
isFetching: isFetchingDocument,
|
778
766
|
error
|
779
|
-
} = useGetDocumentQuery(args,
|
767
|
+
} = useGetDocumentQuery(args, {
|
768
|
+
...opts,
|
769
|
+
skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
|
770
|
+
});
|
780
771
|
const { components, schema, isLoading: isLoadingSchema } = useContentTypeSchema(args.model);
|
781
772
|
React.useEffect(() => {
|
782
773
|
if (error) {
|
@@ -1278,7 +1269,7 @@ const useDocumentActions = () => {
|
|
1278
1269
|
};
|
1279
1270
|
};
|
1280
1271
|
const ProtectedHistoryPage = lazy(
|
1281
|
-
() => import("./History-
|
1272
|
+
() => import("./History-ByUPL3T3.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1282
1273
|
);
|
1283
1274
|
const routes$1 = [
|
1284
1275
|
{
|
@@ -1291,31 +1282,31 @@ const routes$1 = [
|
|
1291
1282
|
}
|
1292
1283
|
];
|
1293
1284
|
const ProtectedEditViewPage = lazy(
|
1294
|
-
() => import("./EditViewPage-
|
1285
|
+
() => import("./EditViewPage-BtkEx339.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1295
1286
|
);
|
1296
1287
|
const ProtectedListViewPage = lazy(
|
1297
|
-
() => import("./ListViewPage-
|
1288
|
+
() => import("./ListViewPage-JSyNAAYu.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1298
1289
|
);
|
1299
1290
|
const ProtectedListConfiguration = lazy(
|
1300
|
-
() => import("./ListConfigurationPage-
|
1291
|
+
() => import("./ListConfigurationPage-Bm5HACXf.mjs").then((mod) => ({
|
1301
1292
|
default: mod.ProtectedListConfiguration
|
1302
1293
|
}))
|
1303
1294
|
);
|
1304
1295
|
const ProtectedEditConfigurationPage = lazy(
|
1305
|
-
() => import("./EditConfigurationPage-
|
1296
|
+
() => import("./EditConfigurationPage-Cp6HAEzN.mjs").then((mod) => ({
|
1306
1297
|
default: mod.ProtectedEditConfigurationPage
|
1307
1298
|
}))
|
1308
1299
|
);
|
1309
1300
|
const ProtectedComponentConfigurationPage = lazy(
|
1310
|
-
() => import("./ComponentConfigurationPage-
|
1301
|
+
() => import("./ComponentConfigurationPage-DHNM3YBz.mjs").then((mod) => ({
|
1311
1302
|
default: mod.ProtectedComponentConfigurationPage
|
1312
1303
|
}))
|
1313
1304
|
);
|
1314
1305
|
const NoPermissions = lazy(
|
1315
|
-
() => import("./NoPermissionsPage-
|
1306
|
+
() => import("./NoPermissionsPage-DNmf_pj0.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1316
1307
|
);
|
1317
1308
|
const NoContentType = lazy(
|
1318
|
-
() => import("./NoContentTypePage-
|
1309
|
+
() => import("./NoContentTypePage-CsrQUpBE.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1319
1310
|
);
|
1320
1311
|
const CollectionTypePages = () => {
|
1321
1312
|
const { collectionType } = useParams();
|
@@ -1648,8 +1639,8 @@ const DocumentActionModal = ({
|
|
1648
1639
|
};
|
1649
1640
|
return /* @__PURE__ */ jsx(Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
|
1650
1641
|
/* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: title }) }),
|
1651
|
-
typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) :
|
1652
|
-
typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer
|
1642
|
+
/* @__PURE__ */ jsx(Modal.Body, { children: typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : Content }),
|
1643
|
+
/* @__PURE__ */ jsx(Modal.Footer, { children: typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer })
|
1653
1644
|
] }) });
|
1654
1645
|
};
|
1655
1646
|
const PublishAction$1 = ({
|
@@ -1833,10 +1824,13 @@ const UpdateAction = ({
|
|
1833
1824
|
document
|
1834
1825
|
);
|
1835
1826
|
if ("data" in res && collectionType !== SINGLE_TYPES) {
|
1836
|
-
navigate(
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1827
|
+
navigate(
|
1828
|
+
{
|
1829
|
+
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
1830
|
+
search: rawQuery
|
1831
|
+
},
|
1832
|
+
{ replace: true }
|
1833
|
+
);
|
1840
1834
|
} else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
1841
1835
|
setErrors(formatValidationErrors(res.error));
|
1842
1836
|
}
|
@@ -2910,7 +2904,14 @@ const formatErrorMessages = (errors, parentKey, formatMessage) => {
|
|
2910
2904
|
)
|
2911
2905
|
);
|
2912
2906
|
} else {
|
2913
|
-
messages.push(
|
2907
|
+
messages.push(
|
2908
|
+
...formatErrorMessages(
|
2909
|
+
// @ts-expect-error TODO: check why value is not compatible with FormErrors
|
2910
|
+
value,
|
2911
|
+
currentKey,
|
2912
|
+
formatMessage
|
2913
|
+
)
|
2914
|
+
);
|
2914
2915
|
}
|
2915
2916
|
} else {
|
2916
2917
|
messages.push(
|
@@ -3713,9 +3714,18 @@ const index = {
|
|
3713
3714
|
defaultMessage: "Content Manager"
|
3714
3715
|
},
|
3715
3716
|
permissions: [],
|
3716
|
-
Component: () => import("./layout-B1Z-9koY.mjs").then((mod) => ({ default: mod.Layout })),
|
3717
3717
|
position: 1
|
3718
3718
|
});
|
3719
|
+
app.router.addRoute({
|
3720
|
+
path: "content-manager/*",
|
3721
|
+
lazy: async () => {
|
3722
|
+
const { Layout } = await import("./layout-Bx7svTbY.mjs");
|
3723
|
+
return {
|
3724
|
+
Component: Layout
|
3725
|
+
};
|
3726
|
+
},
|
3727
|
+
children: routes
|
3728
|
+
});
|
3719
3729
|
app.registerPlugin(cm.config);
|
3720
3730
|
},
|
3721
3731
|
async registerTrads({ locales }) {
|
@@ -3742,14 +3752,13 @@ export {
|
|
3742
3752
|
BulkActionsRenderer as B,
|
3743
3753
|
COLLECTION_TYPES as C,
|
3744
3754
|
DocumentStatus as D,
|
3745
|
-
|
3746
|
-
|
3747
|
-
|
3755
|
+
DEFAULT_SETTINGS as E,
|
3756
|
+
convertEditLayoutToFieldLayouts as F,
|
3757
|
+
useDocument as G,
|
3748
3758
|
HOOKS as H,
|
3749
3759
|
InjectionZone as I,
|
3750
|
-
|
3751
|
-
|
3752
|
-
useDocumentActions as L,
|
3760
|
+
index as J,
|
3761
|
+
useDocumentActions as K,
|
3753
3762
|
Panels as P,
|
3754
3763
|
RelativeTime as R,
|
3755
3764
|
SINGLE_TYPES as S,
|
@@ -3771,14 +3780,14 @@ export {
|
|
3771
3780
|
useGetContentTypeConfigurationQuery as o,
|
3772
3781
|
CREATOR_FIELDS as p,
|
3773
3782
|
getMainField as q,
|
3774
|
-
|
3783
|
+
getDisplayName as r,
|
3775
3784
|
setInitialData as s,
|
3776
|
-
|
3785
|
+
checkIfAttributeIsDisplayable as t,
|
3777
3786
|
useContentTypeSchema as u,
|
3778
|
-
|
3779
|
-
|
3780
|
-
|
3781
|
-
|
3782
|
-
|
3787
|
+
useGetAllDocumentsQuery as v,
|
3788
|
+
convertListLayoutToFieldLayouts as w,
|
3789
|
+
capitalise as x,
|
3790
|
+
useUpdateContentTypeConfigurationMutation as y,
|
3791
|
+
extractContentTypeComponents as z
|
3783
3792
|
};
|
3784
|
-
//# sourceMappingURL=index-
|
3793
|
+
//# sourceMappingURL=index-CaE6NG4a.mjs.map
|