@strapi/content-manager 5.40.0 → 5.41.0

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 (61) hide show
  1. package/dist/admin/pages/EditView/components/Header.js +56 -9
  2. package/dist/admin/pages/EditView/components/Header.js.map +1 -1
  3. package/dist/admin/pages/EditView/components/Header.mjs +60 -13
  4. package/dist/admin/pages/EditView/components/Header.mjs.map +1 -1
  5. package/dist/admin/pages/ListView/ListViewPage.js +47 -0
  6. package/dist/admin/pages/ListView/ListViewPage.js.map +1 -1
  7. package/dist/admin/pages/ListView/ListViewPage.mjs +50 -3
  8. package/dist/admin/pages/ListView/ListViewPage.mjs.map +1 -1
  9. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js +4 -4
  10. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js.map +1 -1
  11. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs +4 -4
  12. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs.map +1 -1
  13. package/dist/admin/translations/en.json.js +3 -0
  14. package/dist/admin/translations/en.json.js.map +1 -1
  15. package/dist/admin/translations/en.json.mjs +3 -0
  16. package/dist/admin/translations/en.json.mjs.map +1 -1
  17. package/dist/server/controllers/collection-types.js +25 -28
  18. package/dist/server/controllers/collection-types.js.map +1 -1
  19. package/dist/server/controllers/collection-types.mjs +20 -23
  20. package/dist/server/controllers/collection-types.mjs.map +1 -1
  21. package/dist/server/controllers/single-types.js +2 -1
  22. package/dist/server/controllers/single-types.js.map +1 -1
  23. package/dist/server/controllers/single-types.mjs +2 -1
  24. package/dist/server/controllers/single-types.mjs.map +1 -1
  25. package/dist/server/services/document-manager.js +10 -9
  26. package/dist/server/services/document-manager.js.map +1 -1
  27. package/dist/server/services/document-manager.mjs +10 -9
  28. package/dist/server/services/document-manager.mjs.map +1 -1
  29. package/dist/server/services/document-metadata.js +84 -41
  30. package/dist/server/services/document-metadata.js.map +1 -1
  31. package/dist/server/services/document-metadata.mjs +85 -42
  32. package/dist/server/services/document-metadata.mjs.map +1 -1
  33. package/dist/server/services/populate-builder.js +11 -0
  34. package/dist/server/services/populate-builder.js.map +1 -1
  35. package/dist/server/services/populate-builder.mjs +12 -1
  36. package/dist/server/services/populate-builder.mjs.map +1 -1
  37. package/dist/server/services/utils/configuration/attributes.js +2 -1
  38. package/dist/server/services/utils/configuration/attributes.js.map +1 -1
  39. package/dist/server/services/utils/configuration/attributes.mjs +2 -1
  40. package/dist/server/services/utils/configuration/attributes.mjs.map +1 -1
  41. package/dist/server/services/utils/populate.js +57 -7
  42. package/dist/server/services/utils/populate.js.map +1 -1
  43. package/dist/server/services/utils/populate.mjs +57 -8
  44. package/dist/server/services/utils/populate.mjs.map +1 -1
  45. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  46. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  47. package/dist/server/src/controllers/utils/metadata.d.ts +2 -2
  48. package/dist/server/src/index.d.ts +18 -3
  49. package/dist/server/src/index.d.ts.map +1 -1
  50. package/dist/server/src/services/document-manager.d.ts +9 -3
  51. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  52. package/dist/server/src/services/document-metadata.d.ts +8 -0
  53. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  54. package/dist/server/src/services/index.d.ts +18 -3
  55. package/dist/server/src/services/index.d.ts.map +1 -1
  56. package/dist/server/src/services/populate-builder.d.ts +7 -0
  57. package/dist/server/src/services/populate-builder.d.ts.map +1 -1
  58. package/dist/server/src/services/utils/configuration/attributes.d.ts.map +1 -1
  59. package/dist/server/src/services/utils/populate.d.ts +21 -17
  60. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  61. package/package.json +5 -5
@@ -33,13 +33,19 @@ declare const documentManager: ({ strapi }: {
33
33
  }): Promise<{
34
34
  count: number;
35
35
  }>;
36
- publish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'publish'>, 'documentId'>): Promise<Modules.Documents.AnyDocument[]>;
36
+ publish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'publish'>, 'documentId'> & {
37
+ populate?: object;
38
+ }): Promise<Modules.Documents.AnyDocument[]>;
37
39
  publishMany(uid: UID.ContentType, documentIds: string[], locale?: string | string[]): Promise<number>;
38
40
  unpublishMany(documentIds: Modules.Documents.ID[], uid: UID.CollectionType, opts?: Omit<DocServiceParams<'unpublish'>, 'documentId'>): Promise<{
39
41
  count: number;
40
42
  }>;
41
- unpublish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'unpublish'>, 'documentId'>): Promise<Modules.Documents.AnyDocument | undefined>;
42
- discardDraft(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'discardDraft'>, 'documentId'>): Promise<Modules.Documents.AnyDocument | undefined>;
43
+ unpublish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'unpublish'>, 'documentId'> & {
44
+ populate?: object;
45
+ }): Promise<Modules.Documents.AnyDocument | undefined>;
46
+ discardDraft(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'discardDraft'>, 'documentId'> & {
47
+ populate?: object;
48
+ }): Promise<Modules.Documents.AnyDocument | undefined>;
43
49
  countDraftRelations(id: string, uid: UID.ContentType, locale: string): Promise<number>;
44
50
  countManyEntriesDraftRelations(documentIds: Modules.Documents.ID[], uid: UID.CollectionType, locale: string | string[]): Promise<number>;
45
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"document-manager.d.ts","sourceRoot":"","sources":["../../../../server/src/services/document-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,UAAU,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKxD,KAAK,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,eAAe,CAAC;AACpD,K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nB,IAAI,cAAc,SACjB,KAAK,iBAAiB,SAAS,CAAC,EAAE,YAAY,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;qBAWxD,IAAI,WAAW,eAAe,MAAM,EAAE,WAAW,MAAM,GAAG,MAAM,EAAE;+BAY1E,QAAQ,SAAS,CAAC,EAAE,EAAE,OAC9B,IAAI,cAAc,SACjB,KAAK,iBAAiB,WAAW,CAAC,EAAE,YAAY,CAAC;;;kBAoBnD,QAAQ,SAAS,CAAC,EAAE,OACnB,IAAI,cAAc,SACjB,KAAK,iBAAiB,WAAW,CAAC,EAAE,YAAY,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;qBAY3E,QAAQ,SAAS,CAAC,EAAE,OACnB,IAAI,cAAc,SACjB,KAAK,iBAAiB,cAAc,CAAC,EAAE,YAAY,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;4BAWtD,MAAM,OAAO,IAAI,WAAW,UAAU,MAAM;gDAkB3D,QAAQ,SAAS,CAAC,EAAE,EAAE,OAC9B,IAAI,cAAc,UACf,MAAM,GAAG,MAAM,EAAE;CA6B9B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,eAAe,CAAC;AAE5D,eAAe,eAAe,CAAC"}
@@ -41,8 +41,13 @@ declare const _default: ({ strapi }: {
41
41
  getManyAvailableStatus(uid: UID.ContentType, documents: DocumentVersion[]): Promise<any[]>;
42
42
  getStatus(version: DocumentVersion, otherDocumentStatuses?: DocumentMetadata['availableStatus']): string;
43
43
  getMetadata(uid: UID.ContentType, version: DocumentVersion, { availableLocales, availableStatus }?: GetMetadataOptions): Promise<{
44
+ availableLocales: never[];
45
+ availableStatus: Pick<any, string>[];
46
+ versions: DocumentVersion[];
47
+ } | {
44
48
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
45
49
  availableStatus: Partial<DocumentVersion>[];
50
+ versions: any[];
46
51
  }>;
47
52
  /**
48
53
  * Returns associated metadata of a document:
@@ -60,6 +65,9 @@ declare const _default: ({ strapi }: {
60
65
  publishedAt?: string | Date | null | undefined;
61
66
  };
62
67
  meta: {
68
+ availableLocales: never[];
69
+ availableStatus: Pick<any, string>[];
70
+ } | {
63
71
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
64
72
  availableStatus: Partial<DocumentVersion>[];
65
73
  };
@@ -1 +1 @@
1
- {"version":3,"file":"document-metadata.d.ts","sourceRoot":"","sources":["../../../../server/src/services/document-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAKnF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACpC;AA6BD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;qCAoB2B;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;IACjD;;OAEG;6BAEI,IAAI,WAAW,WACX,eAAe,eACX,eAAe,EAAE;IA2ChC;;OAEG;gCACyB,eAAe,eAAe,eAAe,EAAE;IAoB3E;;;;;OAKG;gCAC+B,IAAI,WAAW,aAAa,eAAe,EAAE;uBAuB5D,eAAe,0BAA0B,gBAAgB,CAAC,iBAAiB,CAAC;qBAgCxF,IAAI,WAAW,WACX,eAAe,0CAC6B,kBAAkB;;;;IAoFzE;;;;OAIG;oCAEI,IAAI,WAAW,YACV,eAAe,SACnB,kBAAkB;;;;;;;;;;;;;;;;AApO5B,wBAmRG"}
1
+ {"version":3,"file":"document-metadata.d.ts","sourceRoot":"","sources":["../../../../server/src/services/document-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAInF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACpC;AA0CD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;qCAoB2B;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;IACjD;;OAEG;6BAEI,IAAI,WAAW,WACX,eAAe,eACX,eAAe,EAAE;IA2ChC;;OAEG;gCACyB,eAAe,eAAe,eAAe,EAAE;IAoB3E;;;;;OAKG;gCAC+B,IAAI,WAAW,aAAa,eAAe,EAAE;uBAuB5D,eAAe,0BAA0B,gBAAgB,CAAC,iBAAiB,CAAC;qBAgCxF,IAAI,WAAW,WACX,eAAe,0CAC6B,kBAAkB;;;;;;;;;IA8GzE;;;;OAIG;oCAEI,IAAI,WAAW,YACV,eAAe,SACnB,kBAAkB;;;;;;;;;;;;;;;;;;;AA9P5B,wBAgTG"}
@@ -79,8 +79,13 @@ declare const _default: {
79
79
  getManyAvailableStatus(uid: import("@strapi/types/dist/uid").ContentType, documents: import("./document-metadata").DocumentVersion[]): Promise<any[]>;
80
80
  getStatus(version: import("./document-metadata").DocumentVersion, otherDocumentStatuses?: import("../../../shared/contracts/collection-types").AvailableStatusDocument[] | undefined): string;
81
81
  getMetadata(uid: import("@strapi/types/dist/uid").ContentType, version: import("./document-metadata").DocumentVersion, { availableLocales, availableStatus }?: import("./document-metadata").GetMetadataOptions): Promise<{
82
+ availableLocales: never[];
83
+ availableStatus: Pick<any, string>[];
84
+ versions: import("./document-metadata").DocumentVersion[];
85
+ } | {
82
86
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
83
87
  availableStatus: Partial<import("./document-metadata").DocumentVersion>[];
88
+ versions: any[];
84
89
  }>;
85
90
  formatDocumentWithMetadata(uid: import("@strapi/types/dist/uid").ContentType, document: import("./document-metadata").DocumentVersion, opts?: import("./document-metadata").GetMetadataOptions): Promise<{
86
91
  data: {
@@ -93,6 +98,9 @@ declare const _default: {
93
98
  publishedAt?: string | Date | null | undefined;
94
99
  };
95
100
  meta: {
101
+ availableLocales: never[];
102
+ availableStatus: Pick<any, string>[];
103
+ } | {
96
104
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
97
105
  availableStatus: Partial<import("./document-metadata").DocumentVersion>[];
98
106
  };
@@ -124,13 +132,19 @@ declare const _default: {
124
132
  }): Promise<{
125
133
  count: number;
126
134
  }>;
127
- publish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Publish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument[]>;
135
+ publish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Publish<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
136
+ populate?: object | undefined;
137
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument[]>;
128
138
  publishMany(uid: import("@strapi/types/dist/uid").ContentType, documentIds: string[], locale?: string | string[] | undefined): Promise<number>;
129
139
  unpublishMany(documentIds: string[], uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<{
130
140
  count: number;
131
141
  }>;
132
- unpublish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
133
- discardDraft(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").DiscardDraft<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
142
+ unpublish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
143
+ populate?: object | undefined;
144
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
145
+ discardDraft(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").DiscardDraft<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
146
+ populate?: object | undefined;
147
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
134
148
  countDraftRelations(id: string, uid: import("@strapi/types/dist/uid").ContentType, locale: string): Promise<number>;
135
149
  countManyEntriesDraftRelations(documentIds: string[], uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, locale: string | string[]): Promise<number>;
136
150
  };
@@ -232,6 +246,7 @@ declare const _default: {
232
246
  toOne: boolean;
233
247
  }): any;
234
248
  populateDeep(level?: number): any;
249
+ withPopulateOverride(overrides: Record<string, any>): any;
235
250
  build(): Promise<{} | undefined>;
236
251
  };
237
252
  uid: ({ strapi }: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBAeE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBAeE"}
@@ -20,6 +20,13 @@ declare const _default: () => (uid: UID.Schema) => {
20
20
  * @param [level=Infinity] - Max level of nested populate.
21
21
  */
22
22
  populateDeep(level?: number): any;
23
+ /**
24
+ * Override the populate for specific attributes, taking precedence over
25
+ * query-derived or deep populate defaults.
26
+ *
27
+ * @param overrides - Populate overrides to merge (e.g. { localizations: { fields: ['locale'] } })
28
+ */
29
+ withPopulateOverride(overrides: Record<string, any>): any;
23
30
  /**
24
31
  * Construct the populate object based on the builder options.
25
32
  * @returns Populate object
@@ -1 +1 @@
1
- {"version":3,"file":"populate-builder.d.ts","sourceRoot":"","sources":["../../../../server/src/services/populate-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;;IAwBrC;;;OAGG;;IAMH;;;;;OAKG;;;;;IAWH;;;OAGG;;IAMH;;;OAGG;;;AAeP,wBAAqC"}
1
+ {"version":3,"file":"populate-builder.d.ts","sourceRoot":"","sources":["../../../../server/src/services/populate-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;;IAwBrC;;;OAGG;;IAMH;;;;;OAKG;;;;;IAWH;;;OAGG;;IAMH;;;;;OAKG;;IAQH;;;OAGG;;;AAeP,wBAAqC"}
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/utils/configuration/attributes.ts"],"names":[],"mappings":"AA4BA,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAmBzC,CAAC;AAEF,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAiBzC,CAAC;AAEF,QAAA,MAAM,YAAY,WAAY,GAAG,QAAQ,GAAG,YAE3C,CAAC;AAEF,QAAA,MAAM,SAAS,WAAY,GAAG,QAAQ,GAAG,YAsBxC,CAAC;AAkCF,QAAA,MAAM,UAAU,cAAe,GAAG,YAAkC,CAAC;AAErE,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AAEF,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AASF,QAAA,MAAM,mBAAmB,WAAY,GAAG,WAA6C,CAAC;AAEtF;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,WAAY,GAAG,aAgBzC,CAAC;AAEF,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,CAAC"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/utils/configuration/attributes.ts"],"names":[],"mappings":"AA4BA,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAmBzC,CAAC;AAEF,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAiBzC,CAAC;AAEF,QAAA,MAAM,YAAY,WAAY,GAAG,QAAQ,GAAG,YAE3C,CAAC;AAEF,QAAA,MAAM,SAAS,WAAY,GAAG,QAAQ,GAAG,YAsBxC,CAAC;AAkCF,QAAA,MAAM,UAAU,cAAe,GAAG,YAAkC,CAAC;AAErE,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AAEF,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AASF,QAAA,MAAM,mBAAmB,WAAY,GAAG,WAA6C,CAAC;AAEtF;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,WAAY,GAAG,aAiBzC,CAAC;AAEF,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,CAAC"}
@@ -13,22 +13,7 @@ type PopulateOptions = {
13
13
  * @param level - Current level of nested call
14
14
  */
15
15
  declare const getDeepPopulate: (uid: UID.Schema, { initialPopulate, countMany, countOne, maxLevel, }?: PopulateOptions, level?: number) => {};
16
- /**
17
- * Deeply populate a model based on UID. Only populating fields that require validation.
18
- * @param uid - Unique identifier of the model
19
- * @param options - Options to apply while populating
20
- * @param level - Current level of nested call
21
- */
22
16
  declare const getPopulateForValidation: (uid: UID.Schema) => Record<string, any>;
23
- /**
24
- * getDeepPopulateDraftCount works recursively on the attributes of a model
25
- * creating a populated object to count all the unpublished relations within the model
26
- * These relations can be direct to this content type or contained within components/dynamic zones
27
- * @param uid of the model
28
- * @returns result
29
- * @returns result.populate
30
- * @returns result.hasRelations
31
- */
32
17
  declare const getDeepPopulateDraftCount: (uid: UID.Schema) => {
33
18
  populate: any;
34
19
  hasRelations: boolean;
@@ -37,6 +22,25 @@ declare const getDeepPopulateDraftCount: (uid: UID.Schema) => {
37
22
  * Create a Strapi populate object which populates all attribute fields of a Strapi query.
38
23
  */
39
24
  declare const getQueryPopulate: (uid: UID.Schema, query: object) => Promise<Populate>;
40
- declare const buildDeepPopulate: (uid: UID.CollectionType) => any;
41
- export { getDeepPopulate, getDeepPopulateDraftCount, getPopulateForValidation, getQueryPopulate, buildDeepPopulate, };
25
+ declare const buildDeepPopulate: (uid: UID.CollectionType) => Promise<any>;
26
+ /**
27
+ * Restrict localizations populate to only metadata fields for localized content types.
28
+ * Returns an empty object for non-localized content types.
29
+ *
30
+ * By default, localizations are deeply populated which includes all relations and
31
+ * components for every locale — this is expensive and unnecessary for CM responses.
32
+ * The CM only needs these fields from localizations:
33
+ * - locale: to identify which locales exist
34
+ * - documentId: to link to the localized document
35
+ * - publishedAt: to determine published/draft status
36
+ * - updatedAt: to support the modified state indicator in the UI
37
+ */
38
+ declare const getPopulateForLocalizations: (model: UID.Schema) => {
39
+ localizations: {
40
+ fields: string[];
41
+ };
42
+ } | {
43
+ localizations?: undefined;
44
+ };
45
+ export { getDeepPopulate, getDeepPopulateDraftCount, getPopulateForValidation, getQueryPopulate, buildDeepPopulate, getPopulateForLocalizations, };
42
46
  //# sourceMappingURL=populate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/utils/populate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAU,OAAO,EAAE,MAAM,eAAe,CAAC;AAqB1D,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAE7E,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAqHF;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QACd,IAAI,MAAM,wDAMZ,eAAe,uBAgCnB,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,wBAAwB,QAAS,IAAI,MAAM,KAAG,OAAO,MAAM,EAAE,GAAG,CAsErE,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,yBAAyB,QAAS,IAAI,MAAM;;;CA4EjD,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gBAAgB,QAAe,IAAI,MAAM,SAAS,MAAM,KAAG,QAAQ,QAAQ,CA8BhF,CAAC;AAEF,QAAA,MAAM,iBAAiB,QAAS,IAAI,cAAc,QAEjD,CAAC;AAEF,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,GAClB,CAAC"}
1
+ {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/utils/populate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAU,OAAO,EAAE,MAAM,eAAe,CAAC;AAqB1D,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAE7E,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAsHF;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QACd,IAAI,MAAM,wDAMZ,eAAe,uBAgCnB,CAAC;AAUF,QAAA,MAAM,wBAAwB,QAAS,IAAI,MAAM,KAAG,OAAO,MAAM,EAAE,GAAG,CAiFrE,CAAC;AAaF,QAAA,MAAM,yBAAyB,QAAS,IAAI,MAAM;cAFU,GAAG;kBAAgB,OAAO;CAqFrF,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gBAAgB,QAAe,IAAI,MAAM,SAAS,MAAM,KAAG,QAAQ,QAAQ,CA8BhF,CAAC;AAIF,QAAA,MAAM,iBAAiB,QAAe,IAAI,cAAc,iBAcvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,2BAA2B,UAAW,IAAI,MAAM;;;;;;CAUrD,CAAC;AAEF,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,GAC5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/content-manager",
3
- "version": "5.40.0",
3
+ "version": "5.41.0",
4
4
  "description": "A powerful UI to easily manage your data.",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -74,8 +74,8 @@
74
74
  "@sindresorhus/slugify": "1.1.0",
75
75
  "@strapi/design-system": "2.2.0",
76
76
  "@strapi/icons": "2.2.0",
77
- "@strapi/types": "5.40.0",
78
- "@strapi/utils": "5.40.0",
77
+ "@strapi/types": "5.41.0",
78
+ "@strapi/utils": "5.41.0",
79
79
  "codemirror5": "npm:codemirror@^5.65.11",
80
80
  "date-fns": "2.30.0",
81
81
  "fractional-indexing": "3.2.0",
@@ -109,8 +109,8 @@
109
109
  "yup": "0.32.9"
110
110
  },
111
111
  "devDependencies": {
112
- "@strapi/admin": "5.40.0",
113
- "@strapi/database": "5.40.0",
112
+ "@strapi/admin": "5.41.0",
113
+ "@strapi/database": "5.41.0",
114
114
  "@testing-library/react": "16.3.0",
115
115
  "@types/jest": "29.5.2",
116
116
  "@types/lodash": "^4.14.191",