@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.
- package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js → ComponentConfigurationPage-WRPUXGd6.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js.map → ComponentConfigurationPage-WRPUXGd6.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs → ComponentConfigurationPage-gdUj_t-O.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs.map → ComponentConfigurationPage-gdUj_t-O.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs → EditConfigurationPage-BwuIPOJG.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs.map → EditConfigurationPage-BwuIPOJG.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js → EditConfigurationPage-C1vjMBgy.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js.map → EditConfigurationPage-C1vjMBgy.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-B8ETGsFo.mjs → EditViewPage-0MiFkXa8.mjs} +46 -46
- package/dist/_chunks/EditViewPage-0MiFkXa8.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-DZPDqo_G.js → EditViewPage-DbcGfyqK.js} +45 -45
- package/dist/_chunks/EditViewPage-DbcGfyqK.js.map +1 -0
- package/dist/_chunks/{Field-Dn4ThnFB.mjs → Field-BDMSCcy5.mjs} +104 -116
- package/dist/_chunks/Field-BDMSCcy5.mjs.map +1 -0
- package/dist/_chunks/{Field-DnJMS8cB.js → Field-BG1xu38N.js} +103 -115
- package/dist/_chunks/Field-BG1xu38N.js.map +1 -0
- package/dist/_chunks/{Form-DiTmWq2k.js → Form-9BnFyUjy.js} +21 -25
- package/dist/_chunks/Form-9BnFyUjy.js.map +1 -0
- package/dist/_chunks/{Form-DY721B6y.mjs → Form-CPVWavB8.mjs} +23 -27
- package/dist/_chunks/Form-CPVWavB8.mjs.map +1 -0
- package/dist/_chunks/{History-CwWN_uNp.mjs → History-BVpd8LP3.mjs} +101 -22
- package/dist/_chunks/History-BVpd8LP3.mjs.map +1 -0
- package/dist/_chunks/{History-DShoVAh0.js → History-BWWxLt2Z.js} +100 -21
- package/dist/_chunks/History-BWWxLt2Z.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-COIRGF5b.js → ListConfigurationPage-6swzjdAZ.js} +42 -43
- package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-D062TiTL.mjs → ListConfigurationPage-DozVMKcR.mjs} +43 -45
- package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-CFuXPZ_r.js → ListViewPage-BlzfjS2Q.js} +60 -65
- package/dist/_chunks/ListViewPage-BlzfjS2Q.js.map +1 -0
- package/dist/_chunks/{ListViewPage-BeHTsIr5.mjs → ListViewPage-Ds0ulgfG.mjs} +62 -67
- package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs → NoContentTypePage-BH11kaKt.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs.map → NoContentTypePage-BH11kaKt.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js → NoContentTypePage-D2nCCWEl.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js.map → NoContentTypePage-D2nCCWEl.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs → NoPermissionsPage-BT2Tn0D_.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs.map → NoPermissionsPage-BT2Tn0D_.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js → NoPermissionsPage-DN_JlsU2.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js.map → NoPermissionsPage-DN_JlsU2.js.map} +1 -1
- package/dist/_chunks/{Relations-wHyjWWT5.js → Relations-CcgFTcWo.js} +3 -3
- package/dist/_chunks/{Relations-wHyjWWT5.js.map → Relations-CcgFTcWo.js.map} +1 -1
- package/dist/_chunks/{Relations-Bbz90ZWv.mjs → Relations-Dnag3fhV.mjs} +3 -3
- package/dist/_chunks/{Relations-Bbz90ZWv.mjs.map → Relations-Dnag3fhV.mjs.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-CWpLBSt0.js} +120 -283
- package/dist/_chunks/index-CWpLBSt0.js.map +1 -0
- package/dist/_chunks/{index-Dv4oDn11.mjs → index-JNNNKUHs.mjs} +136 -299
- package/dist/_chunks/index-JNNNKUHs.mjs.map +1 -0
- package/dist/_chunks/{layout-pZc2Q3bK.js → layout--iHdZzRk.js} +17 -12
- package/dist/_chunks/layout--iHdZzRk.js.map +1 -0
- package/dist/_chunks/{layout-hInnLBbA.mjs → layout-DC503LnF.mjs} +17 -12
- package/dist/_chunks/layout-DC503LnF.mjs.map +1 -0
- package/dist/_chunks/{relations-CVE30dYt.js → relations-BbHizA5K.js} +2 -2
- package/dist/_chunks/{relations-CVE30dYt.js.map → relations-BbHizA5K.js.map} +1 -1
- package/dist/_chunks/{relations-BcPI8XhI.mjs → relations-CTje5t-a.mjs} +2 -2
- package/dist/_chunks/{relations-BcPI8XhI.mjs.map → relations-CTje5t-a.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/admin/src/pages/EditView/components/DocumentActions.d.ts +7 -3
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +2 -10
- package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
- package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
- 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 +8 -8
- package/dist/_chunks/EditViewPage-B8ETGsFo.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-DZPDqo_G.js.map +0 -1
- package/dist/_chunks/Field-Dn4ThnFB.mjs.map +0 -1
- package/dist/_chunks/Field-DnJMS8cB.js.map +0 -1
- package/dist/_chunks/Form-DY721B6y.mjs.map +0 -1
- package/dist/_chunks/Form-DiTmWq2k.js.map +0 -1
- package/dist/_chunks/History-CwWN_uNp.mjs.map +0 -1
- package/dist/_chunks/History-DShoVAh0.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-COIRGF5b.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-D062TiTL.mjs.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.js
CHANGED
@@ -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 =
|
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 =
|
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] = {
|
3763
|
+
populateAcc[attributeName] = {
|
3764
|
+
populate: populate2
|
3765
|
+
};
|
3759
3766
|
hasRelations = true;
|
3760
3767
|
}
|
3761
3768
|
break;
|
3762
3769
|
}
|
3763
3770
|
case "dynamiczone": {
|
3764
|
-
const
|
3765
|
-
const { populate:
|
3766
|
-
if (
|
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
|
3775
|
+
return { ...acc, [componentUID]: { populate: componentPopulate } };
|
3769
3776
|
}
|
3770
3777
|
return acc;
|
3771
3778
|
}, {});
|
3772
|
-
if (!fp.isEmpty(
|
3773
|
-
populateAcc[attributeName] = {
|
3779
|
+
if (!fp.isEmpty(dzPopulateFragment)) {
|
3780
|
+
populateAcc[attributeName] = { on: dzPopulateFragment };
|
3774
3781
|
}
|
3775
3782
|
break;
|
3776
3783
|
}
|