@strapi/content-manager 0.0.0-experimental.baa6cf22298e591b4d52d8e59c60406d7a9f137f → 0.0.0-experimental.d954d57341a6623992a0d211daaec8e245c3517d

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 (92) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js → ComponentConfigurationPage-WRPUXGd6.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js.map → ComponentConfigurationPage-WRPUXGd6.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs → ComponentConfigurationPage-gdUj_t-O.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs.map → ComponentConfigurationPage-gdUj_t-O.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs → EditConfigurationPage-BwuIPOJG.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs.map → EditConfigurationPage-BwuIPOJG.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js → EditConfigurationPage-C1vjMBgy.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js.map → EditConfigurationPage-C1vjMBgy.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-B8ETGsFo.mjs → EditViewPage-0MiFkXa8.mjs} +46 -46
  10. package/dist/_chunks/EditViewPage-0MiFkXa8.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-DZPDqo_G.js → EditViewPage-DbcGfyqK.js} +45 -45
  12. package/dist/_chunks/EditViewPage-DbcGfyqK.js.map +1 -0
  13. package/dist/_chunks/{Field-Dn4ThnFB.mjs → Field-BDMSCcy5.mjs} +104 -116
  14. package/dist/_chunks/Field-BDMSCcy5.mjs.map +1 -0
  15. package/dist/_chunks/{Field-DnJMS8cB.js → Field-BG1xu38N.js} +103 -115
  16. package/dist/_chunks/Field-BG1xu38N.js.map +1 -0
  17. package/dist/_chunks/{Form-DiTmWq2k.js → Form-9BnFyUjy.js} +21 -25
  18. package/dist/_chunks/Form-9BnFyUjy.js.map +1 -0
  19. package/dist/_chunks/{Form-DY721B6y.mjs → Form-CPVWavB8.mjs} +23 -27
  20. package/dist/_chunks/Form-CPVWavB8.mjs.map +1 -0
  21. package/dist/_chunks/{History-CwWN_uNp.mjs → History-BVpd8LP3.mjs} +101 -22
  22. package/dist/_chunks/History-BVpd8LP3.mjs.map +1 -0
  23. package/dist/_chunks/{History-DShoVAh0.js → History-BWWxLt2Z.js} +100 -21
  24. package/dist/_chunks/History-BWWxLt2Z.js.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-COIRGF5b.js → ListConfigurationPage-6swzjdAZ.js} +42 -43
  26. package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-D062TiTL.mjs → ListConfigurationPage-DozVMKcR.mjs} +43 -45
  28. package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs.map +1 -0
  29. package/dist/_chunks/{ListViewPage-CFuXPZ_r.js → ListViewPage-BlzfjS2Q.js} +60 -65
  30. package/dist/_chunks/ListViewPage-BlzfjS2Q.js.map +1 -0
  31. package/dist/_chunks/{ListViewPage-BeHTsIr5.mjs → ListViewPage-Ds0ulgfG.mjs} +62 -67
  32. package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs → NoContentTypePage-BH11kaKt.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs.map → NoContentTypePage-BH11kaKt.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js → NoContentTypePage-D2nCCWEl.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js.map → NoContentTypePage-D2nCCWEl.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs → NoPermissionsPage-BT2Tn0D_.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs.map → NoPermissionsPage-BT2Tn0D_.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js → NoPermissionsPage-DN_JlsU2.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js.map → NoPermissionsPage-DN_JlsU2.js.map} +1 -1
  41. package/dist/_chunks/{Relations-wHyjWWT5.js → Relations-CcgFTcWo.js} +3 -3
  42. package/dist/_chunks/{Relations-wHyjWWT5.js.map → Relations-CcgFTcWo.js.map} +1 -1
  43. package/dist/_chunks/{Relations-Bbz90ZWv.mjs → Relations-Dnag3fhV.mjs} +3 -3
  44. package/dist/_chunks/{Relations-Bbz90ZWv.mjs.map → Relations-Dnag3fhV.mjs.map} +1 -1
  45. package/dist/_chunks/{en-Dzv55oQw.mjs → en-Ux26r5pl.mjs} +4 -1
  46. package/dist/_chunks/{en-Dzv55oQw.mjs.map → en-Ux26r5pl.mjs.map} +1 -1
  47. package/dist/_chunks/{en-BN1bvFK7.js → en-fbKQxLGn.js} +4 -1
  48. package/dist/_chunks/{en-BN1bvFK7.js.map → en-fbKQxLGn.js.map} +1 -1
  49. package/dist/_chunks/{index-BRHpg0az.js → index-CWpLBSt0.js} +120 -283
  50. package/dist/_chunks/index-CWpLBSt0.js.map +1 -0
  51. package/dist/_chunks/{index-Dv4oDn11.mjs → index-JNNNKUHs.mjs} +136 -299
  52. package/dist/_chunks/index-JNNNKUHs.mjs.map +1 -0
  53. package/dist/_chunks/{layout-pZc2Q3bK.js → layout--iHdZzRk.js} +17 -12
  54. package/dist/_chunks/layout--iHdZzRk.js.map +1 -0
  55. package/dist/_chunks/{layout-hInnLBbA.mjs → layout-DC503LnF.mjs} +17 -12
  56. package/dist/_chunks/layout-DC503LnF.mjs.map +1 -0
  57. package/dist/_chunks/{relations-CVE30dYt.js → relations-BbHizA5K.js} +2 -2
  58. package/dist/_chunks/{relations-CVE30dYt.js.map → relations-BbHizA5K.js.map} +1 -1
  59. package/dist/_chunks/{relations-BcPI8XhI.mjs → relations-CTje5t-a.mjs} +2 -2
  60. package/dist/_chunks/{relations-BcPI8XhI.mjs.map → relations-CTje5t-a.mjs.map} +1 -1
  61. package/dist/admin/index.js +1 -1
  62. package/dist/admin/index.mjs +5 -5
  63. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  64. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +7 -3
  65. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +2 -10
  66. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  67. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  68. package/dist/server/index.js +18 -11
  69. package/dist/server/index.js.map +1 -1
  70. package/dist/server/index.mjs +18 -11
  71. package/dist/server/index.mjs.map +1 -1
  72. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  73. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  74. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  75. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  76. package/package.json +8 -8
  77. package/dist/_chunks/EditViewPage-B8ETGsFo.mjs.map +0 -1
  78. package/dist/_chunks/EditViewPage-DZPDqo_G.js.map +0 -1
  79. package/dist/_chunks/Field-Dn4ThnFB.mjs.map +0 -1
  80. package/dist/_chunks/Field-DnJMS8cB.js.map +0 -1
  81. package/dist/_chunks/Form-DY721B6y.mjs.map +0 -1
  82. package/dist/_chunks/Form-DiTmWq2k.js.map +0 -1
  83. package/dist/_chunks/History-CwWN_uNp.mjs.map +0 -1
  84. package/dist/_chunks/History-DShoVAh0.js.map +0 -1
  85. package/dist/_chunks/ListConfigurationPage-COIRGF5b.js.map +0 -1
  86. package/dist/_chunks/ListConfigurationPage-D062TiTL.mjs.map +0 -1
  87. package/dist/_chunks/ListViewPage-BeHTsIr5.mjs.map +0 -1
  88. package/dist/_chunks/ListViewPage-CFuXPZ_r.js.map +0 -1
  89. package/dist/_chunks/index-BRHpg0az.js.map +0 -1
  90. package/dist/_chunks/index-Dv4oDn11.mjs.map +0 -1
  91. package/dist/_chunks/layout-hInnLBbA.mjs.map +0 -1
  92. package/dist/_chunks/layout-pZc2Q3bK.js.map +0 -1
@@ -481,7 +481,10 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
481
481
  if (!strapi2.requestContext.get()?.request.url.startsWith("/content-manager")) {
482
482
  return next();
483
483
  }
484
- if (context.action !== "create" && context.action !== "update" && context.action !== "publish" && context.action !== "unpublish" && context.action !== "discardDraft") {
484
+ if (context.action !== "create" && context.action !== "update" && context.action !== "clone" && context.action !== "publish" && context.action !== "unpublish" && context.action !== "discardDraft") {
485
+ return next();
486
+ }
487
+ if (context.action === "update" && strapi2.requestContext.get()?.request.url.endsWith("/actions/publish")) {
485
488
  return next();
486
489
  }
487
490
  const contentTypeUid = context.contentType.uid;
@@ -489,7 +492,10 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
489
492
  return next();
490
493
  }
491
494
  const result = await next();
492
- const documentContext = context.action === "create" ? { documentId: result.documentId, locale: context.params?.locale } : { documentId: context.params.documentId, locale: context.params?.locale };
495
+ const documentContext = {
496
+ documentId: context.action === "create" || context.action === "clone" ? result.documentId : context.params.documentId,
497
+ locale: context.params?.locale
498
+ };
493
499
  const defaultLocale = await serviceUtils.getDefaultLocale();
494
500
  const locale = documentContext.locale || defaultLocale;
495
501
  if (Array.isArray(locale)) {
@@ -533,9 +539,8 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
533
539
  });
534
540
  return result;
535
541
  });
536
- const retentionDays = serviceUtils.getRetentionDays();
537
542
  state.deleteExpiredJob = scheduleJob("0 0 * * *", () => {
538
- const retentionDaysInMilliseconds = retentionDays * 24 * 60 * 60 * 1e3;
543
+ const retentionDaysInMilliseconds = serviceUtils.getRetentionDays() * 24 * 60 * 60 * 1e3;
539
544
  const expirationDate = new Date(Date.now() - retentionDaysInMilliseconds);
540
545
  query.deleteMany({
541
546
  where: {
@@ -3729,22 +3734,24 @@ const getDeepPopulateDraftCount = (uid2) => {
3729
3734
  attribute.component
3730
3735
  );
3731
3736
  if (childHasRelations) {
3732
- populateAcc[attributeName] = { populate: populate2 };
3737
+ populateAcc[attributeName] = {
3738
+ populate: populate2
3739
+ };
3733
3740
  hasRelations = true;
3734
3741
  }
3735
3742
  break;
3736
3743
  }
3737
3744
  case "dynamiczone": {
3738
- const dzPopulate = (attribute.components || []).reduce((acc, componentUID) => {
3739
- const { populate: populate2, hasRelations: childHasRelations } = getDeepPopulateDraftCount(componentUID);
3740
- if (childHasRelations) {
3745
+ const dzPopulateFragment = attribute.components?.reduce((acc, componentUID) => {
3746
+ const { populate: componentPopulate, hasRelations: componentHasRelations } = getDeepPopulateDraftCount(componentUID);
3747
+ if (componentHasRelations) {
3741
3748
  hasRelations = true;
3742
- return merge(acc, populate2);
3749
+ return { ...acc, [componentUID]: { populate: componentPopulate } };
3743
3750
  }
3744
3751
  return acc;
3745
3752
  }, {});
3746
- if (!isEmpty(dzPopulate)) {
3747
- populateAcc[attributeName] = { populate: dzPopulate };
3753
+ if (!isEmpty(dzPopulateFragment)) {
3754
+ populateAcc[attributeName] = { on: dzPopulateFragment };
3748
3755
  }
3749
3756
  break;
3750
3757
  }