@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
@@ -507,7 +507,10 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
507
507
  if (!strapi2.requestContext.get()?.request.url.startsWith("/content-manager")) {
508
508
  return next();
509
509
  }
510
- if (context.action !== "create" && context.action !== "update" && context.action !== "publish" && context.action !== "unpublish" && context.action !== "discardDraft") {
510
+ if (context.action !== "create" && context.action !== "update" && context.action !== "clone" && context.action !== "publish" && context.action !== "unpublish" && context.action !== "discardDraft") {
511
+ return next();
512
+ }
513
+ if (context.action === "update" && strapi2.requestContext.get()?.request.url.endsWith("/actions/publish")) {
511
514
  return next();
512
515
  }
513
516
  const contentTypeUid = context.contentType.uid;
@@ -515,7 +518,10 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
515
518
  return next();
516
519
  }
517
520
  const result = await next();
518
- const documentContext = context.action === "create" ? { documentId: result.documentId, locale: context.params?.locale } : { documentId: context.params.documentId, locale: context.params?.locale };
521
+ const documentContext = {
522
+ documentId: context.action === "create" || context.action === "clone" ? result.documentId : context.params.documentId,
523
+ locale: context.params?.locale
524
+ };
519
525
  const defaultLocale = await serviceUtils.getDefaultLocale();
520
526
  const locale = documentContext.locale || defaultLocale;
521
527
  if (Array.isArray(locale)) {
@@ -559,9 +565,8 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
559
565
  });
560
566
  return result;
561
567
  });
562
- const retentionDays = serviceUtils.getRetentionDays();
563
568
  state.deleteExpiredJob = nodeSchedule.scheduleJob("0 0 * * *", () => {
564
- const retentionDaysInMilliseconds = retentionDays * 24 * 60 * 60 * 1e3;
569
+ const retentionDaysInMilliseconds = serviceUtils.getRetentionDays() * 24 * 60 * 60 * 1e3;
565
570
  const expirationDate = new Date(Date.now() - retentionDaysInMilliseconds);
566
571
  query.deleteMany({
567
572
  where: {
@@ -3755,22 +3760,24 @@ const getDeepPopulateDraftCount = (uid2) => {
3755
3760
  attribute.component
3756
3761
  );
3757
3762
  if (childHasRelations) {
3758
- populateAcc[attributeName] = { populate: populate2 };
3763
+ populateAcc[attributeName] = {
3764
+ populate: populate2
3765
+ };
3759
3766
  hasRelations = true;
3760
3767
  }
3761
3768
  break;
3762
3769
  }
3763
3770
  case "dynamiczone": {
3764
- const dzPopulate = (attribute.components || []).reduce((acc, componentUID) => {
3765
- const { populate: populate2, hasRelations: childHasRelations } = getDeepPopulateDraftCount(componentUID);
3766
- if (childHasRelations) {
3771
+ const dzPopulateFragment = attribute.components?.reduce((acc, componentUID) => {
3772
+ const { populate: componentPopulate, hasRelations: componentHasRelations } = getDeepPopulateDraftCount(componentUID);
3773
+ if (componentHasRelations) {
3767
3774
  hasRelations = true;
3768
- return fp.merge(acc, populate2);
3775
+ return { ...acc, [componentUID]: { populate: componentPopulate } };
3769
3776
  }
3770
3777
  return acc;
3771
3778
  }, {});
3772
- if (!fp.isEmpty(dzPopulate)) {
3773
- populateAcc[attributeName] = { populate: dzPopulate };
3779
+ if (!fp.isEmpty(dzPopulateFragment)) {
3780
+ populateAcc[attributeName] = { on: dzPopulateFragment };
3774
3781
  }
3775
3782
  break;
3776
3783
  }