@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.
- package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs → ComponentConfigurationPage-9lRmRdIr.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs.map → ComponentConfigurationPage-9lRmRdIr.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js → ComponentConfigurationPage-DyDkPajU.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js.map → ComponentConfigurationPage-DyDkPajU.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs → EditConfigurationPage-Bk893vVY.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs.map → EditConfigurationPage-Bk893vVY.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js → EditConfigurationPage-DValmA0m.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js.map → EditConfigurationPage-DValmA0m.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-De8GyU8P.mjs → EditViewPage-DiNFdFqP.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-De8GyU8P.mjs.map → EditViewPage-DiNFdFqP.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-B-RJeiJD.js → EditViewPage-Dk7Eaft4.js} +3 -3
- package/dist/_chunks/{EditViewPage-B-RJeiJD.js.map → EditViewPage-Dk7Eaft4.js.map} +1 -1
- package/dist/_chunks/{Field-dq8Tg1M_.js → Field-DH2OaqUP.js} +17 -45
- package/dist/_chunks/Field-DH2OaqUP.js.map +1 -0
- package/dist/_chunks/{Field-pb2o8uBe.mjs → Field-Dv_HTFTa.mjs} +17 -45
- package/dist/_chunks/Field-Dv_HTFTa.mjs.map +1 -0
- package/dist/_chunks/{Form-DGIf4jQU.js → Form-B_dUDizM.js} +2 -2
- package/dist/_chunks/{Form-DGIf4jQU.js.map → Form-B_dUDizM.js.map} +1 -1
- package/dist/_chunks/{Form-DJn0Dxha.mjs → Form-Dy6P4HgH.mjs} +2 -2
- package/dist/_chunks/{Form-DJn0Dxha.mjs.map → Form-Dy6P4HgH.mjs.map} +1 -1
- package/dist/_chunks/{History-Dh2NEHnR.js → History-BT4w83Oa.js} +4 -4
- package/dist/_chunks/{History-Dh2NEHnR.js.map → History-BT4w83Oa.js.map} +1 -1
- package/dist/_chunks/{History-BowL3JKP.mjs → History-DrwsD1Vc.mjs} +4 -4
- package/dist/_chunks/{History-BowL3JKP.mjs.map → History-DrwsD1Vc.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs → ListConfigurationPage-BxIP0jRy.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs.map → ListConfigurationPage-BxIP0jRy.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js → ListConfigurationPage-CuYrMcW3.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js.map → ListConfigurationPage-CuYrMcW3.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-CXFUjZQC.mjs → ListViewPage-5a1vw-OK.mjs} +21 -29
- package/dist/_chunks/ListViewPage-5a1vw-OK.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-4XsciqHZ.js → ListViewPage-BvpwNur7.js} +20 -28
- package/dist/_chunks/ListViewPage-BvpwNur7.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs → NoContentTypePage-Bm6tRcd3.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs.map → NoContentTypePage-Bm6tRcd3.mjs.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js → NoContentTypePage-UqEiWKkM.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js.map → NoContentTypePage-UqEiWKkM.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs → NoPermissionsPage-BHPqn_tQ.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs.map → NoPermissionsPage-BHPqn_tQ.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js → NoPermissionsPage-C_vGRo8Q.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js.map → NoPermissionsPage-C_vGRo8Q.js.map} +1 -1
- package/dist/_chunks/{Relations-CVNLrn1Y.mjs → Relations-C7fPyh5P.mjs} +3 -3
- package/dist/_chunks/{Relations-CVNLrn1Y.mjs.map → Relations-C7fPyh5P.mjs.map} +1 -1
- package/dist/_chunks/{Relations-DPFCAa7b.js → Relations-CznVF6LS.js} +3 -3
- package/dist/_chunks/{Relations-DPFCAa7b.js.map → Relations-CznVF6LS.js.map} +1 -1
- package/dist/_chunks/{en-BrCTWlZv.mjs → en-CbaIuYoB.mjs} +2 -2
- package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-CbaIuYoB.mjs.map} +1 -1
- package/dist/_chunks/{en-uOUIxfcQ.js → en-otD_UBJi.js} +2 -2
- package/dist/_chunks/{en-uOUIxfcQ.js.map → en-otD_UBJi.js.map} +1 -1
- package/dist/_chunks/{index-DiMrfcfy.mjs → index-BJ6uTqLL.mjs} +21 -26
- package/dist/_chunks/index-BJ6uTqLL.mjs.map +1 -0
- package/dist/_chunks/{index-C3fJE-1-.js → index-D9UmmBcM.js} +20 -25
- package/dist/_chunks/index-D9UmmBcM.js.map +1 -0
- package/dist/_chunks/{layout-C788OmNr.js → layout-kfu5Wtix.js} +3 -3
- package/dist/_chunks/{layout-C788OmNr.js.map → layout-kfu5Wtix.js.map} +1 -1
- package/dist/_chunks/{layout-ls3gxfpH.mjs → layout-uomiIGbG.mjs} +3 -3
- package/dist/_chunks/{layout-ls3gxfpH.mjs.map → layout-uomiIGbG.mjs.map} +1 -1
- package/dist/_chunks/{relations-DYeotliT.js → relations-DKENrxko.js} +2 -2
- package/dist/_chunks/{relations-DYeotliT.js.map → relations-DKENrxko.js.map} +1 -1
- package/dist/_chunks/{relations-CLcOmGO0.mjs → relations-DiDufGSA.mjs} +2 -2
- package/dist/_chunks/{relations-CLcOmGO0.mjs.map → relations-DiDufGSA.mjs.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +0 -32
- package/dist/server/index.js +14 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +14 -3
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/history/services/history.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/history/services/utils.d.ts +1 -0
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/_chunks/Field-dq8Tg1M_.js.map +0 -1
- package/dist/_chunks/Field-pb2o8uBe.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +0 -1
- package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +0 -1
- package/dist/_chunks/index-C3fJE-1-.js.map +0 -1
- package/dist/_chunks/index-DiMrfcfy.mjs.map +0 -1
package/dist/server/index.mjs
CHANGED
@@ -173,7 +173,9 @@ const createServiceUtils = ({ strapi: strapi2 }) => {
|
|
173
173
|
return strapi2.db.query("plugin::upload.file").findOne({ where: { id: versionRelationData.id } });
|
174
174
|
};
|
175
175
|
const localesService = strapi2.plugin("i18n")?.service("locales");
|
176
|
+
const i18nContentTypeService = strapi2.plugin("i18n")?.service("content-types");
|
176
177
|
const getDefaultLocale = async () => localesService ? localesService.getDefaultLocale() : null;
|
178
|
+
const isLocalizedContentType = (model) => i18nContentTypeService ? i18nContentTypeService.isLocalizedContentType(model) : false;
|
177
179
|
const getLocaleDictionary = async () => {
|
178
180
|
if (!localesService)
|
179
181
|
return {};
|
@@ -291,6 +293,7 @@ const createServiceUtils = ({ strapi: strapi2 }) => {
|
|
291
293
|
getRelationRestoreValue,
|
292
294
|
getMediaRestoreValue,
|
293
295
|
getDefaultLocale,
|
296
|
+
isLocalizedContentType,
|
294
297
|
getLocaleDictionary,
|
295
298
|
getRetentionDays,
|
296
299
|
getVersionStatus,
|
@@ -313,7 +316,13 @@ const createHistoryService = ({ strapi: strapi2 }) => {
|
|
313
316
|
});
|
314
317
|
},
|
315
318
|
async findVersionsPage(params) {
|
316
|
-
const
|
319
|
+
const model = strapi2.getModel(params.query.contentType);
|
320
|
+
const isLocalizedContentType = serviceUtils.isLocalizedContentType(model);
|
321
|
+
const defaultLocale = await serviceUtils.getDefaultLocale();
|
322
|
+
let locale = null;
|
323
|
+
if (isLocalizedContentType) {
|
324
|
+
locale = params.query.locale || defaultLocale;
|
325
|
+
}
|
317
326
|
const [{ results, pagination: pagination2 }, localeDictionary] = await Promise.all([
|
318
327
|
query.findPage({
|
319
328
|
...params.query,
|
@@ -529,11 +538,13 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
|
|
529
538
|
}
|
530
539
|
const uid2 = context.contentType.uid;
|
531
540
|
const schemas = getSchemas(uid2);
|
541
|
+
const model = strapi2.getModel(uid2);
|
542
|
+
const isLocalizedContentType = serviceUtils.isLocalizedContentType(model);
|
532
543
|
const localeEntries = await strapi2.db.query(uid2).findMany({
|
533
544
|
where: {
|
534
545
|
documentId,
|
535
|
-
locale: { $in: locales },
|
536
|
-
publishedAt: null
|
546
|
+
...isLocalizedContentType ? { locale: { $in: locales } } : {},
|
547
|
+
...contentTypes$1.hasDraftAndPublish(strapi2.contentTypes[uid2]) ? { publishedAt: null } : {}
|
537
548
|
},
|
538
549
|
populate: serviceUtils.getDeepPopulate(
|
539
550
|
uid2,
|