@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.
Files changed (71) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-DjQBdcKF.mjs → ComponentConfigurationPage-BPvzFjM7.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-DjQBdcKF.mjs.map → ComponentConfigurationPage-BPvzFjM7.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js → ComponentConfigurationPage-DjWJdz6Y.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js.map → ComponentConfigurationPage-DjWJdz6Y.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs → EditConfigurationPage-DacbqQ_f.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs.map → EditConfigurationPage-DacbqQ_f.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js → EditConfigurationPage-Dmv83RlS.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js.map → EditConfigurationPage-Dmv83RlS.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-aUnqL-63.mjs → EditViewPage-DDS6H9HO.mjs} +3 -3
  10. package/dist/_chunks/{EditViewPage-aUnqL-63.mjs.map → EditViewPage-DDS6H9HO.mjs.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-KRG56aCq.js → EditViewPage-DvNpQkam.js} +3 -3
  12. package/dist/_chunks/{EditViewPage-KRG56aCq.js.map → EditViewPage-DvNpQkam.js.map} +1 -1
  13. package/dist/_chunks/{Field-kVFO4ZKB.mjs → Field-6gvGdPBV.mjs} +3 -3
  14. package/dist/_chunks/{Field-kVFO4ZKB.mjs.map → Field-6gvGdPBV.mjs.map} +1 -1
  15. package/dist/_chunks/{Field-kq1c2TF1.js → Field-DmVKIAOo.js} +3 -3
  16. package/dist/_chunks/{Field-kq1c2TF1.js.map → Field-DmVKIAOo.js.map} +1 -1
  17. package/dist/_chunks/{Form-CQ67ZifP.js → Form-CPZC9vWa.js} +2 -2
  18. package/dist/_chunks/{Form-CQ67ZifP.js.map → Form-CPZC9vWa.js.map} +1 -1
  19. package/dist/_chunks/{Form-Jgh5hGTu.mjs → Form-DW6K1IH-.mjs} +2 -2
  20. package/dist/_chunks/{Form-Jgh5hGTu.mjs.map → Form-DW6K1IH-.mjs.map} +1 -1
  21. package/dist/_chunks/{History-BLEnudTX.js → History-DeAPlvtv.js} +10 -6
  22. package/dist/_chunks/History-DeAPlvtv.js.map +1 -0
  23. package/dist/_chunks/{History-DKhZAPcK.mjs → History-Dmr9fmUA.mjs} +10 -6
  24. package/dist/_chunks/History-Dmr9fmUA.mjs.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-Zso_LUjn.js → ListConfigurationPage-DPCwW5Vr.js} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-Zso_LUjn.js.map → ListConfigurationPage-DPCwW5Vr.js.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-nrXcxNYi.mjs → ListConfigurationPage-DhwvYcNv.mjs} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-nrXcxNYi.mjs.map → ListConfigurationPage-DhwvYcNv.mjs.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-DsaOakWQ.js → ListViewPage-5ySZ-VUs.js} +3 -3
  30. package/dist/_chunks/{ListViewPage-DsaOakWQ.js.map → ListViewPage-5ySZ-VUs.js.map} +1 -1
  31. package/dist/_chunks/{ListViewPage-ChhYmA-L.mjs → ListViewPage-BtAwuYLE.mjs} +3 -3
  32. package/dist/_chunks/{ListViewPage-ChhYmA-L.mjs.map → ListViewPage-BtAwuYLE.mjs.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-DPCuS9Y1.js → NoContentTypePage-DOC_yWOf.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-DPCuS9Y1.js.map → NoContentTypePage-DOC_yWOf.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-BrdFcN33.mjs → NoContentTypePage-DSPxnxxp.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-BrdFcN33.mjs.map → NoContentTypePage-DSPxnxxp.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js → NoPermissionsPage-Dwu8rRJu.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js.map → NoPermissionsPage-Dwu8rRJu.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs → NoPermissionsPage-UWDC-1Tw.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs.map → NoPermissionsPage-UWDC-1Tw.mjs.map} +1 -1
  41. package/dist/_chunks/{Relations-CY8Isqdu.js → Relations-CgWtgnPe.js} +3 -3
  42. package/dist/_chunks/{Relations-CY8Isqdu.js.map → Relations-CgWtgnPe.js.map} +1 -1
  43. package/dist/_chunks/{Relations-DjFiYd7-.mjs → Relations-J8cscLlR.mjs} +3 -3
  44. package/dist/_chunks/{Relations-DjFiYd7-.mjs.map → Relations-J8cscLlR.mjs.map} +1 -1
  45. package/dist/_chunks/{index-DNa1J4HE.js → index-C6AH2hEl.js} +10 -10
  46. package/dist/_chunks/{index-DNa1J4HE.js.map → index-C6AH2hEl.js.map} +1 -1
  47. package/dist/_chunks/{index-CAc9yTnx.mjs → index-CwRRo1V9.mjs} +10 -10
  48. package/dist/_chunks/{index-CAc9yTnx.mjs.map → index-CwRRo1V9.mjs.map} +1 -1
  49. package/dist/_chunks/{layout-BqtLA6Lb.js → layout-B_SXLhqf.js} +3 -3
  50. package/dist/_chunks/{layout-BqtLA6Lb.js.map → layout-B_SXLhqf.js.map} +1 -1
  51. package/dist/_chunks/{layout-CXsHbc3E.mjs → layout-jIDzX0Fp.mjs} +3 -3
  52. package/dist/_chunks/{layout-CXsHbc3E.mjs.map → layout-jIDzX0Fp.mjs.map} +1 -1
  53. package/dist/_chunks/{relations-mMFEcZRq.mjs → relations-CuvIgCqI.mjs} +2 -2
  54. package/dist/_chunks/{relations-mMFEcZRq.mjs.map → relations-CuvIgCqI.mjs.map} +1 -1
  55. package/dist/_chunks/{relations-BHY_KDJ_.js → relations-iBMa_OFG.js} +2 -2
  56. package/dist/_chunks/{relations-BHY_KDJ_.js.map → relations-iBMa_OFG.js.map} +1 -1
  57. package/dist/admin/index.js +1 -1
  58. package/dist/admin/index.mjs +1 -1
  59. package/dist/server/index.js +10 -6
  60. package/dist/server/index.js.map +1 -1
  61. package/dist/server/index.mjs +17 -13
  62. package/dist/server/index.mjs.map +1 -1
  63. package/dist/server/src/index.d.ts +6 -1
  64. package/dist/server/src/index.d.ts.map +1 -1
  65. package/dist/server/src/services/document-manager.d.ts +6 -2
  66. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  67. package/dist/server/src/services/index.d.ts +6 -1
  68. package/dist/server/src/services/index.d.ts.map +1 -1
  69. package/package.json +6 -6
  70. package/dist/_chunks/History-BLEnudTX.js.map +0 -1
  71. package/dist/_chunks/History-DKhZAPcK.mjs.map +0 -1
@@ -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, pagination, sanitize } from "@strapi/utils";
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: pagination2 } = await getService(strapi2, "history").findVersionsPage({
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: pagination2 }
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: pagination2 }, localeDictionary] = await Promise.all([
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: pagination2
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: pagination2 } = await documentManager2.findPage(
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: pagination2
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 params = pagination.withDefaultPagination(opts || {}, {
4065
- maxLimit: 1e3
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(params),
4069
- strapi2.documents(uid2).count(params)
4067
+ strapi2.documents(uid2).findMany(opts),
4068
+ strapi2.documents(uid2).count(opts)
4070
4069
  ]);
4071
4070
  return {
4072
4071
  results: documents,
4073
- pagination: pagination.transformPagedPaginationInfo(params, total)
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 = {}) {