@strapi/content-manager 0.0.0-experimental.baa6cf22298e591b4d52d8e59c60406d7a9f137f → 0.0.0-experimental.dd3311938ac827f1fa8560c8840a9a394f5896c0
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-CYqQv0ne.mjs → ComponentConfigurationPage-BMajAl1u.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs.map → ComponentConfigurationPage-BMajAl1u.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js → ComponentConfigurationPage-y_7iLdmB.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js.map → ComponentConfigurationPage-y_7iLdmB.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js → EditConfigurationPage-CPVB8Uqc.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js.map → EditConfigurationPage-CPVB8Uqc.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs → EditConfigurationPage-CcOoD26O.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs.map → EditConfigurationPage-CcOoD26O.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-DZPDqo_G.js → EditViewPage-CTTDHKkQ.js} +3 -3
- package/dist/_chunks/{EditViewPage-DZPDqo_G.js.map → EditViewPage-CTTDHKkQ.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-B8ETGsFo.mjs → EditViewPage-DWb0DE7R.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-B8ETGsFo.mjs.map → EditViewPage-DWb0DE7R.mjs.map} +1 -1
- package/dist/_chunks/{Field-DnJMS8cB.js → Field-C5Z1Ivdv.js} +3 -3
- package/dist/_chunks/{Field-DnJMS8cB.js.map → Field-C5Z1Ivdv.js.map} +1 -1
- package/dist/_chunks/{Field-Dn4ThnFB.mjs → Field-DnStdvQw.mjs} +3 -3
- package/dist/_chunks/{Field-Dn4ThnFB.mjs.map → Field-DnStdvQw.mjs.map} +1 -1
- package/dist/_chunks/{Form-DiTmWq2k.js → Form-B81OtW-k.js} +2 -2
- package/dist/_chunks/{Form-DiTmWq2k.js.map → Form-B81OtW-k.js.map} +1 -1
- package/dist/_chunks/{Form-DY721B6y.mjs → Form-DqGgE55Q.mjs} +2 -2
- package/dist/_chunks/{Form-DY721B6y.mjs.map → Form-DqGgE55Q.mjs.map} +1 -1
- package/dist/_chunks/{History-DShoVAh0.js → History-4NbOq2dX.js} +93 -12
- package/dist/_chunks/History-4NbOq2dX.js.map +1 -0
- package/dist/_chunks/{History-CwWN_uNp.mjs → History-DS6-HCYX.mjs} +93 -12
- package/dist/_chunks/History-DS6-HCYX.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-COIRGF5b.js → ListConfigurationPage-CpfstlYY.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-COIRGF5b.js.map → ListConfigurationPage-CpfstlYY.js.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-D062TiTL.mjs → ListConfigurationPage-DQJJltko.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-D062TiTL.mjs.map → ListConfigurationPage-DQJJltko.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-CFuXPZ_r.js → ListViewPage-CA3I75m5.js} +16 -4
- package/dist/_chunks/ListViewPage-CA3I75m5.js.map +1 -0
- package/dist/_chunks/{ListViewPage-BeHTsIr5.mjs → ListViewPage-nQrOQuVo.mjs} +17 -5
- package/dist/_chunks/ListViewPage-nQrOQuVo.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs → NoContentTypePage-DbnHE22g.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs.map → NoContentTypePage-DbnHE22g.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js → NoContentTypePage-Dldu-_Mx.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js.map → NoContentTypePage-Dldu-_Mx.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js → NoPermissionsPage-CO2MK200.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js.map → NoPermissionsPage-CO2MK200.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs → NoPermissionsPage-fOIkQM0v.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs.map → NoPermissionsPage-fOIkQM0v.mjs.map} +1 -1
- package/dist/_chunks/{Relations-Bbz90ZWv.mjs → Relations-BDRl99Ux.mjs} +3 -3
- package/dist/_chunks/{Relations-Bbz90ZWv.mjs.map → Relations-BDRl99Ux.mjs.map} +1 -1
- package/dist/_chunks/{Relations-wHyjWWT5.js → Relations-DG2jnOcr.js} +3 -3
- package/dist/_chunks/{Relations-wHyjWWT5.js.map → Relations-DG2jnOcr.js.map} +1 -1
- package/dist/_chunks/{en-Dzv55oQw.mjs → en-Ux26r5pl.mjs} +4 -1
- package/dist/_chunks/{en-Dzv55oQw.mjs.map → en-Ux26r5pl.mjs.map} +1 -1
- package/dist/_chunks/{en-BN1bvFK7.js → en-fbKQxLGn.js} +4 -1
- package/dist/_chunks/{en-BN1bvFK7.js.map → en-fbKQxLGn.js.map} +1 -1
- package/dist/_chunks/{index-BRHpg0az.js → index-BZoNZMXL.js} +45 -30
- package/dist/_chunks/index-BZoNZMXL.js.map +1 -0
- package/dist/_chunks/{index-Dv4oDn11.mjs → index-Drt2DN7v.mjs} +60 -45
- package/dist/_chunks/index-Drt2DN7v.mjs.map +1 -0
- package/dist/_chunks/{layout-hInnLBbA.mjs → layout-BzAbmoO6.mjs} +17 -12
- package/dist/_chunks/layout-BzAbmoO6.mjs.map +1 -0
- package/dist/_chunks/{layout-pZc2Q3bK.js → layout-DEYBqgF1.js} +17 -12
- package/dist/_chunks/layout-DEYBqgF1.js.map +1 -0
- package/dist/_chunks/{relations-CVE30dYt.js → relations-D0eZ4VWw.js} +2 -2
- package/dist/_chunks/{relations-CVE30dYt.js.map → relations-D0eZ4VWw.js.map} +1 -1
- package/dist/_chunks/{relations-BcPI8XhI.mjs → relations-D26zVRdi.mjs} +2 -2
- package/dist/_chunks/{relations-BcPI8XhI.mjs.map → relations-D26zVRdi.mjs.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +5 -5
- package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
- package/dist/server/index.js +18 -11
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +18 -11
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/single-types.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/services/utils/populate.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/_chunks/History-CwWN_uNp.mjs.map +0 -1
- package/dist/_chunks/History-DShoVAh0.js.map +0 -1
- package/dist/_chunks/ListViewPage-BeHTsIr5.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-CFuXPZ_r.js.map +0 -1
- package/dist/_chunks/index-BRHpg0az.js.map +0 -1
- package/dist/_chunks/index-Dv4oDn11.mjs.map +0 -1
- package/dist/_chunks/layout-hInnLBbA.mjs.map +0 -1
- package/dist/_chunks/layout-pZc2Q3bK.js.map +0 -1
package/dist/server/index.mjs
CHANGED
@@ -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 =
|
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 =
|
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] = {
|
3737
|
+
populateAcc[attributeName] = {
|
3738
|
+
populate: populate2
|
3739
|
+
};
|
3733
3740
|
hasRelations = true;
|
3734
3741
|
}
|
3735
3742
|
break;
|
3736
3743
|
}
|
3737
3744
|
case "dynamiczone": {
|
3738
|
-
const
|
3739
|
-
const { populate:
|
3740
|
-
if (
|
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
|
3749
|
+
return { ...acc, [componentUID]: { populate: componentPopulate } };
|
3743
3750
|
}
|
3744
3751
|
return acc;
|
3745
3752
|
}, {});
|
3746
|
-
if (!isEmpty(
|
3747
|
-
populateAcc[attributeName] = {
|
3753
|
+
if (!isEmpty(dzPopulateFragment)) {
|
3754
|
+
populateAcc[attributeName] = { on: dzPopulateFragment };
|
3748
3755
|
}
|
3749
3756
|
break;
|
3750
3757
|
}
|