@strapi/content-manager 0.0.0-experimental.17b4116f461a49b8ce5386f7c8d79c511d40fb3b → 0.0.0-experimental.e60ec1829240dae21c1e1d29076681c322288813
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-DjQBdcKF.mjs → ComponentConfigurationPage-BPvzFjM7.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DjQBdcKF.mjs.map → ComponentConfigurationPage-BPvzFjM7.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js → ComponentConfigurationPage-DjWJdz6Y.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js.map → ComponentConfigurationPage-DjWJdz6Y.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs → EditConfigurationPage-DacbqQ_f.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs.map → EditConfigurationPage-DacbqQ_f.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js → EditConfigurationPage-Dmv83RlS.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js.map → EditConfigurationPage-Dmv83RlS.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-aUnqL-63.mjs → EditViewPage-DDS6H9HO.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-aUnqL-63.mjs.map → EditViewPage-DDS6H9HO.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-KRG56aCq.js → EditViewPage-DvNpQkam.js} +3 -3
- package/dist/_chunks/{EditViewPage-KRG56aCq.js.map → EditViewPage-DvNpQkam.js.map} +1 -1
- package/dist/_chunks/{Field-kVFO4ZKB.mjs → Field-6gvGdPBV.mjs} +3 -3
- package/dist/_chunks/{Field-kVFO4ZKB.mjs.map → Field-6gvGdPBV.mjs.map} +1 -1
- package/dist/_chunks/{Field-kq1c2TF1.js → Field-DmVKIAOo.js} +3 -3
- package/dist/_chunks/{Field-kq1c2TF1.js.map → Field-DmVKIAOo.js.map} +1 -1
- package/dist/_chunks/{Form-CQ67ZifP.js → Form-CPZC9vWa.js} +2 -2
- package/dist/_chunks/{Form-CQ67ZifP.js.map → Form-CPZC9vWa.js.map} +1 -1
- package/dist/_chunks/{Form-Jgh5hGTu.mjs → Form-DW6K1IH-.mjs} +2 -2
- package/dist/_chunks/{Form-Jgh5hGTu.mjs.map → Form-DW6K1IH-.mjs.map} +1 -1
- package/dist/_chunks/{History-BLEnudTX.js → History-DeAPlvtv.js} +10 -6
- package/dist/_chunks/History-DeAPlvtv.js.map +1 -0
- package/dist/_chunks/{History-DKhZAPcK.mjs → History-Dmr9fmUA.mjs} +10 -6
- package/dist/_chunks/History-Dmr9fmUA.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-Zso_LUjn.js → ListConfigurationPage-DPCwW5Vr.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-Zso_LUjn.js.map → ListConfigurationPage-DPCwW5Vr.js.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-nrXcxNYi.mjs → ListConfigurationPage-DhwvYcNv.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-nrXcxNYi.mjs.map → ListConfigurationPage-DhwvYcNv.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-DsaOakWQ.js → ListViewPage-5ySZ-VUs.js} +3 -3
- package/dist/_chunks/{ListViewPage-DsaOakWQ.js.map → ListViewPage-5ySZ-VUs.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-ChhYmA-L.mjs → ListViewPage-BtAwuYLE.mjs} +3 -3
- package/dist/_chunks/{ListViewPage-ChhYmA-L.mjs.map → ListViewPage-BtAwuYLE.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-DPCuS9Y1.js → NoContentTypePage-DOC_yWOf.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-DPCuS9Y1.js.map → NoContentTypePage-DOC_yWOf.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-BrdFcN33.mjs → NoContentTypePage-DSPxnxxp.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-BrdFcN33.mjs.map → NoContentTypePage-DSPxnxxp.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js → NoPermissionsPage-Dwu8rRJu.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js.map → NoPermissionsPage-Dwu8rRJu.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs → NoPermissionsPage-UWDC-1Tw.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs.map → NoPermissionsPage-UWDC-1Tw.mjs.map} +1 -1
- package/dist/_chunks/{Relations-CY8Isqdu.js → Relations-CgWtgnPe.js} +3 -3
- package/dist/_chunks/{Relations-CY8Isqdu.js.map → Relations-CgWtgnPe.js.map} +1 -1
- package/dist/_chunks/{Relations-DjFiYd7-.mjs → Relations-J8cscLlR.mjs} +3 -3
- package/dist/_chunks/{Relations-DjFiYd7-.mjs.map → Relations-J8cscLlR.mjs.map} +1 -1
- package/dist/_chunks/{index-DNa1J4HE.js → index-C6AH2hEl.js} +10 -10
- package/dist/_chunks/{index-DNa1J4HE.js.map → index-C6AH2hEl.js.map} +1 -1
- package/dist/_chunks/{index-CAc9yTnx.mjs → index-CwRRo1V9.mjs} +10 -10
- package/dist/_chunks/{index-CAc9yTnx.mjs.map → index-CwRRo1V9.mjs.map} +1 -1
- package/dist/_chunks/{layout-BqtLA6Lb.js → layout-B_SXLhqf.js} +3 -3
- package/dist/_chunks/{layout-BqtLA6Lb.js.map → layout-B_SXLhqf.js.map} +1 -1
- package/dist/_chunks/{layout-CXsHbc3E.mjs → layout-jIDzX0Fp.mjs} +3 -3
- package/dist/_chunks/{layout-CXsHbc3E.mjs.map → layout-jIDzX0Fp.mjs.map} +1 -1
- package/dist/_chunks/{relations-mMFEcZRq.mjs → relations-CuvIgCqI.mjs} +2 -2
- package/dist/_chunks/{relations-mMFEcZRq.mjs.map → relations-CuvIgCqI.mjs.map} +1 -1
- package/dist/_chunks/{relations-BHY_KDJ_.js → relations-iBMa_OFG.js} +2 -2
- package/dist/_chunks/{relations-BHY_KDJ_.js.map → relations-iBMa_OFG.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +10 -6
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +17 -13
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/index.d.ts +6 -1
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/services/document-manager.d.ts +6 -2
- package/dist/server/src/services/document-manager.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +6 -1
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/_chunks/History-BLEnudTX.js.map +0 -1
- package/dist/_chunks/History-DKhZAPcK.mjs.map +0 -1
package/dist/server/index.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import strapiUtils, { validateYupSchema, errors, async, contentTypes as contentTypes$1, yup as yup$1, validateYupSchemaSync, policy, traverse, setCreatorFields, isOperatorOfType, relations as relations$1,
|
1
|
+
import strapiUtils, { validateYupSchema, errors, async, contentTypes as contentTypes$1, yup as yup$1, validateYupSchemaSync, policy, traverse, setCreatorFields, isOperatorOfType, relations as relations$1, sanitize } from "@strapi/utils";
|
2
2
|
import { pick, omit, difference, intersection, pipe, propOr, isEqual, isEmpty, set, isNil as isNil$1, has, prop, assoc, mapValues, flow, uniq, uniqBy, concat, getOr, propEq, merge, groupBy, castArray } from "lodash/fp";
|
3
3
|
import "@strapi/types";
|
4
4
|
import * as yup from "yup";
|
@@ -54,7 +54,7 @@ const createHistoryVersionController = ({ strapi: strapi2 }) => {
|
|
54
54
|
return ctx.forbidden();
|
55
55
|
}
|
56
56
|
const query = await permissionChecker2.sanitizeQuery(ctx.query);
|
57
|
-
const { results, pagination
|
57
|
+
const { results, pagination } = await getService(strapi2, "history").findVersionsPage({
|
58
58
|
query: {
|
59
59
|
...query,
|
60
60
|
...getValidPagination({ page: query.page, pageSize: query.pageSize })
|
@@ -73,7 +73,7 @@ const createHistoryVersionController = ({ strapi: strapi2 }) => {
|
|
73
73
|
);
|
74
74
|
return {
|
75
75
|
data: sanitizedResults,
|
76
|
-
meta: { pagination
|
76
|
+
meta: { pagination }
|
77
77
|
};
|
78
78
|
},
|
79
79
|
async restoreVersion(ctx) {
|
@@ -309,7 +309,7 @@ const createHistoryService = ({ strapi: strapi2 }) => {
|
|
309
309
|
},
|
310
310
|
async findVersionsPage(params) {
|
311
311
|
const locale = params.query.locale || await serviceUtils.getDefaultLocale();
|
312
|
-
const [{ results, pagination
|
312
|
+
const [{ results, pagination }, localeDictionary] = await Promise.all([
|
313
313
|
query.findPage({
|
314
314
|
...params.query,
|
315
315
|
where: {
|
@@ -408,7 +408,7 @@ const createHistoryService = ({ strapi: strapi2 }) => {
|
|
408
408
|
);
|
409
409
|
return {
|
410
410
|
results: formattedResults,
|
411
|
-
pagination
|
411
|
+
pagination
|
412
412
|
};
|
413
413
|
},
|
414
414
|
async restoreVersion(versionId) {
|
@@ -1632,7 +1632,7 @@ const collectionTypes = {
|
|
1632
1632
|
const permissionQuery = await permissionChecker2.sanitizedQuery.read(query);
|
1633
1633
|
const populate = await getService$1("populate-builder")(model).populateFromQuery(permissionQuery).populateDeep(1).countRelations({ toOne: false, toMany: true }).build();
|
1634
1634
|
const { locale, status } = getDocumentLocaleAndStatus(query);
|
1635
|
-
const { results: documents, pagination
|
1635
|
+
const { results: documents, pagination } = await documentManager2.findPage(
|
1636
1636
|
{ ...permissionQuery, populate, locale, status },
|
1637
1637
|
model
|
1638
1638
|
);
|
@@ -1653,7 +1653,7 @@ const collectionTypes = {
|
|
1653
1653
|
);
|
1654
1654
|
ctx.body = {
|
1655
1655
|
results,
|
1656
|
-
pagination
|
1656
|
+
pagination
|
1657
1657
|
};
|
1658
1658
|
},
|
1659
1659
|
async findOne(ctx) {
|
@@ -4061,16 +4061,20 @@ const documentManager = ({ strapi: strapi2 }) => {
|
|
4061
4061
|
return strapi2.documents(uid2).findMany(params);
|
4062
4062
|
},
|
4063
4063
|
async findPage(opts, uid2) {
|
4064
|
-
const
|
4065
|
-
|
4066
|
-
});
|
4064
|
+
const page = Number(opts?.page) || 1;
|
4065
|
+
const pageSize = Number(opts?.pageSize) || 10;
|
4067
4066
|
const [documents, total = 0] = await Promise.all([
|
4068
|
-
strapi2.documents(uid2).findMany(
|
4069
|
-
strapi2.documents(uid2).count(
|
4067
|
+
strapi2.documents(uid2).findMany(opts),
|
4068
|
+
strapi2.documents(uid2).count(opts)
|
4070
4069
|
]);
|
4071
4070
|
return {
|
4072
4071
|
results: documents,
|
4073
|
-
pagination:
|
4072
|
+
pagination: {
|
4073
|
+
page,
|
4074
|
+
pageSize,
|
4075
|
+
pageCount: Math.ceil(total / pageSize),
|
4076
|
+
total
|
4077
|
+
}
|
4074
4078
|
};
|
4075
4079
|
},
|
4076
4080
|
async create(uid2, opts = {}) {
|