@strapi/content-manager 0.0.0-experimental.d834c9e658d1fb037e6da1105150593521c667cc → 0.0.0-experimental.da85533897155e719d784f0271223c866d2f69ab

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 (78) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs → ComponentConfigurationPage-9lRmRdIr.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs.map → ComponentConfigurationPage-9lRmRdIr.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js → ComponentConfigurationPage-DyDkPajU.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js.map → ComponentConfigurationPage-DyDkPajU.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs → EditConfigurationPage-Bk893vVY.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs.map → EditConfigurationPage-Bk893vVY.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js → EditConfigurationPage-DValmA0m.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js.map → EditConfigurationPage-DValmA0m.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-De8GyU8P.mjs → EditViewPage-DiNFdFqP.mjs} +3 -3
  10. package/dist/_chunks/{EditViewPage-De8GyU8P.mjs.map → EditViewPage-DiNFdFqP.mjs.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-B-RJeiJD.js → EditViewPage-Dk7Eaft4.js} +3 -3
  12. package/dist/_chunks/{EditViewPage-B-RJeiJD.js.map → EditViewPage-Dk7Eaft4.js.map} +1 -1
  13. package/dist/_chunks/{Field-dq8Tg1M_.js → Field-DH2OaqUP.js} +17 -45
  14. package/dist/_chunks/Field-DH2OaqUP.js.map +1 -0
  15. package/dist/_chunks/{Field-pb2o8uBe.mjs → Field-Dv_HTFTa.mjs} +17 -45
  16. package/dist/_chunks/Field-Dv_HTFTa.mjs.map +1 -0
  17. package/dist/_chunks/{Form-DGIf4jQU.js → Form-B_dUDizM.js} +2 -2
  18. package/dist/_chunks/{Form-DGIf4jQU.js.map → Form-B_dUDizM.js.map} +1 -1
  19. package/dist/_chunks/{Form-DJn0Dxha.mjs → Form-Dy6P4HgH.mjs} +2 -2
  20. package/dist/_chunks/{Form-DJn0Dxha.mjs.map → Form-Dy6P4HgH.mjs.map} +1 -1
  21. package/dist/_chunks/{History-Dh2NEHnR.js → History-BT4w83Oa.js} +4 -4
  22. package/dist/_chunks/{History-Dh2NEHnR.js.map → History-BT4w83Oa.js.map} +1 -1
  23. package/dist/_chunks/{History-BowL3JKP.mjs → History-DrwsD1Vc.mjs} +4 -4
  24. package/dist/_chunks/{History-BowL3JKP.mjs.map → History-DrwsD1Vc.mjs.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs → ListConfigurationPage-BxIP0jRy.mjs} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs.map → ListConfigurationPage-BxIP0jRy.mjs.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js → ListConfigurationPage-CuYrMcW3.js} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js.map → ListConfigurationPage-CuYrMcW3.js.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-CXFUjZQC.mjs → ListViewPage-5a1vw-OK.mjs} +21 -29
  30. package/dist/_chunks/ListViewPage-5a1vw-OK.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-4XsciqHZ.js → ListViewPage-BvpwNur7.js} +20 -28
  32. package/dist/_chunks/ListViewPage-BvpwNur7.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs → NoContentTypePage-Bm6tRcd3.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs.map → NoContentTypePage-Bm6tRcd3.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js → NoContentTypePage-UqEiWKkM.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js.map → NoContentTypePage-UqEiWKkM.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs → NoPermissionsPage-BHPqn_tQ.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs.map → NoPermissionsPage-BHPqn_tQ.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js → NoPermissionsPage-C_vGRo8Q.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js.map → NoPermissionsPage-C_vGRo8Q.js.map} +1 -1
  41. package/dist/_chunks/{Relations-CVNLrn1Y.mjs → Relations-C7fPyh5P.mjs} +3 -3
  42. package/dist/_chunks/{Relations-CVNLrn1Y.mjs.map → Relations-C7fPyh5P.mjs.map} +1 -1
  43. package/dist/_chunks/{Relations-DPFCAa7b.js → Relations-CznVF6LS.js} +3 -3
  44. package/dist/_chunks/{Relations-DPFCAa7b.js.map → Relations-CznVF6LS.js.map} +1 -1
  45. package/dist/_chunks/{en-BrCTWlZv.mjs → en-CbaIuYoB.mjs} +2 -2
  46. package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-CbaIuYoB.mjs.map} +1 -1
  47. package/dist/_chunks/{en-uOUIxfcQ.js → en-otD_UBJi.js} +2 -2
  48. package/dist/_chunks/{en-uOUIxfcQ.js.map → en-otD_UBJi.js.map} +1 -1
  49. package/dist/_chunks/{index-DiMrfcfy.mjs → index-BJ6uTqLL.mjs} +21 -26
  50. package/dist/_chunks/index-BJ6uTqLL.mjs.map +1 -0
  51. package/dist/_chunks/{index-C3fJE-1-.js → index-D9UmmBcM.js} +20 -25
  52. package/dist/_chunks/index-D9UmmBcM.js.map +1 -0
  53. package/dist/_chunks/{layout-C788OmNr.js → layout-kfu5Wtix.js} +3 -3
  54. package/dist/_chunks/{layout-C788OmNr.js.map → layout-kfu5Wtix.js.map} +1 -1
  55. package/dist/_chunks/{layout-ls3gxfpH.mjs → layout-uomiIGbG.mjs} +3 -3
  56. package/dist/_chunks/{layout-ls3gxfpH.mjs.map → layout-uomiIGbG.mjs.map} +1 -1
  57. package/dist/_chunks/{relations-DYeotliT.js → relations-DKENrxko.js} +2 -2
  58. package/dist/_chunks/{relations-DYeotliT.js.map → relations-DKENrxko.js.map} +1 -1
  59. package/dist/_chunks/{relations-CLcOmGO0.mjs → relations-DiDufGSA.mjs} +2 -2
  60. package/dist/_chunks/{relations-CLcOmGO0.mjs.map → relations-DiDufGSA.mjs.map} +1 -1
  61. package/dist/admin/index.js +1 -1
  62. package/dist/admin/index.mjs +1 -1
  63. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +0 -32
  64. package/dist/server/index.js +14 -3
  65. package/dist/server/index.js.map +1 -1
  66. package/dist/server/index.mjs +14 -3
  67. package/dist/server/index.mjs.map +1 -1
  68. package/dist/server/src/history/services/history.d.ts.map +1 -1
  69. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  70. package/dist/server/src/history/services/utils.d.ts +1 -0
  71. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  72. package/package.json +8 -8
  73. package/dist/_chunks/Field-dq8Tg1M_.js.map +0 -1
  74. package/dist/_chunks/Field-pb2o8uBe.mjs.map +0 -1
  75. package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +0 -1
  76. package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +0 -1
  77. package/dist/_chunks/index-C3fJE-1-.js.map +0 -1
  78. package/dist/_chunks/index-DiMrfcfy.mjs.map +0 -1
@@ -199,7 +199,9 @@ const createServiceUtils = ({ strapi: strapi2 }) => {
199
199
  return strapi2.db.query("plugin::upload.file").findOne({ where: { id: versionRelationData.id } });
200
200
  };
201
201
  const localesService = strapi2.plugin("i18n")?.service("locales");
202
+ const i18nContentTypeService = strapi2.plugin("i18n")?.service("content-types");
202
203
  const getDefaultLocale = async () => localesService ? localesService.getDefaultLocale() : null;
204
+ const isLocalizedContentType = (model) => i18nContentTypeService ? i18nContentTypeService.isLocalizedContentType(model) : false;
203
205
  const getLocaleDictionary = async () => {
204
206
  if (!localesService)
205
207
  return {};
@@ -317,6 +319,7 @@ const createServiceUtils = ({ strapi: strapi2 }) => {
317
319
  getRelationRestoreValue,
318
320
  getMediaRestoreValue,
319
321
  getDefaultLocale,
322
+ isLocalizedContentType,
320
323
  getLocaleDictionary,
321
324
  getRetentionDays,
322
325
  getVersionStatus,
@@ -339,7 +342,13 @@ const createHistoryService = ({ strapi: strapi2 }) => {
339
342
  });
340
343
  },
341
344
  async findVersionsPage(params) {
342
- const locale = params.query.locale || await serviceUtils.getDefaultLocale();
345
+ const model = strapi2.getModel(params.query.contentType);
346
+ const isLocalizedContentType = serviceUtils.isLocalizedContentType(model);
347
+ const defaultLocale = await serviceUtils.getDefaultLocale();
348
+ let locale = null;
349
+ if (isLocalizedContentType) {
350
+ locale = params.query.locale || defaultLocale;
351
+ }
343
352
  const [{ results, pagination }, localeDictionary] = await Promise.all([
344
353
  query.findPage({
345
354
  ...params.query,
@@ -555,11 +564,13 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
555
564
  }
556
565
  const uid2 = context.contentType.uid;
557
566
  const schemas = getSchemas(uid2);
567
+ const model = strapi2.getModel(uid2);
568
+ const isLocalizedContentType = serviceUtils.isLocalizedContentType(model);
558
569
  const localeEntries = await strapi2.db.query(uid2).findMany({
559
570
  where: {
560
571
  documentId,
561
- locale: { $in: locales },
562
- publishedAt: null
572
+ ...isLocalizedContentType ? { locale: { $in: locales } } : {},
573
+ ...strapiUtils.contentTypes.hasDraftAndPublish(strapi2.contentTypes[uid2]) ? { publishedAt: null } : {}
563
574
  },
564
575
  populate: serviceUtils.getDeepPopulate(
565
576
  uid2,