@sap/ux-specification 1.120.50 → 1.120.52

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 (194) hide show
  1. package/CHANGELOG.md +72 -2
  2. package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
  3. package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
  4. package/dist/documentation/v2/v2-ListReport.html +2 -2
  5. package/dist/documentation/v2/v2-ListReportNew.html +2 -2
  6. package/dist/documentation/v2/v2-ObjectPage.html +2 -2
  7. package/dist/documentation/v2/v2-OverviewPage.html +2 -2
  8. package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
  9. package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
  10. package/dist/documentation/v4/v4-FreestylePage.html +2 -2
  11. package/dist/documentation/v4/v4-ListReport.html +2 -2
  12. package/dist/documentation/v4/v4-ObjectPage.html +2 -2
  13. package/dist/index-min.js +249 -250
  14. package/dist/index-min.js.map +4 -4
  15. package/dist/schemas/v2/ApplicationV2.json +28 -3
  16. package/dist/schemas/v2/ListReportNewConfig.json +45 -0
  17. package/dist/schemas/v2/ObjectPageConfig.json +11 -5
  18. package/dist/schemas/v4/ApplicationV4.json +12 -6
  19. package/dist/schemas/v4/BuildingBlocksConfig.json +92 -11
  20. package/dist/schemas/v4/ListReportConfig.json +34 -0
  21. package/dist/schemas/v4/ObjectPageConfig.json +18 -1
  22. package/dist/specification/package.json +17 -17
  23. package/dist/specification/scripts/macros/corrections.d.ts +1 -1
  24. package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
  25. package/dist/specification/scripts/macros/corrections.js +150 -2
  26. package/dist/specification/scripts/macros/corrections.js.map +1 -1
  27. package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
  28. package/dist/specification/scripts/macros/schema.js +10 -1
  29. package/dist/specification/scripts/macros/schema.js.map +1 -1
  30. package/dist/specification/scripts/macros/types.d.ts +1 -0
  31. package/dist/specification/scripts/macros/types.d.ts.map +1 -1
  32. package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
  33. package/dist/specification/scripts/schema/to-json-schema.js +23 -13
  34. package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
  35. package/dist/specification/src/api.js +1 -1
  36. package/dist/specification/src/sync/common/decoration/decorators.d.ts +65 -4
  37. package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
  38. package/dist/specification/src/sync/common/decoration/decorators.js +138 -8
  39. package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
  40. package/dist/specification/src/sync/common/distTagEvaluator.d.ts +10 -3
  41. package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
  42. package/dist/specification/src/sync/common/distTagEvaluator.js +14 -4
  43. package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
  44. package/dist/specification/src/sync/common/generate/objectPage.js +3 -1
  45. package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
  46. package/dist/specification/src/sync/common/generate/utils.d.ts +13 -4
  47. package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
  48. package/dist/specification/src/sync/common/generate/utils.js +35 -20
  49. package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
  50. package/dist/specification/src/sync/common/i18n.json +5 -3
  51. package/dist/specification/src/sync/common/utils.d.ts +52 -1
  52. package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
  53. package/dist/specification/src/sync/common/utils.js +176 -4
  54. package/dist/specification/src/sync/common/utils.js.map +1 -1
  55. package/dist/specification/src/sync/v2/application.d.ts +1 -0
  56. package/dist/specification/src/sync/v2/application.d.ts.map +1 -1
  57. package/dist/specification/src/sync/v2/application.js +18 -0
  58. package/dist/specification/src/sync/v2/application.js.map +1 -1
  59. package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
  60. package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
  61. package/dist/specification/src/sync/v2/export/exportPage.js +15 -4
  62. package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
  63. package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
  64. package/dist/specification/src/sync/v2/export/exportPageGeneric.js +8 -15
  65. package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
  66. package/dist/specification/src/sync/v2/export/factory.d.ts +26 -0
  67. package/dist/specification/src/sync/v2/export/factory.d.ts.map +1 -1
  68. package/dist/specification/src/sync/v2/export/factory.js +3 -3
  69. package/dist/specification/src/sync/v2/export/factory.js.map +1 -1
  70. package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
  71. package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
  72. package/dist/specification/src/sync/v2/export/pages/ObjectPage.js +11 -0
  73. package/dist/specification/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
  74. package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
  75. package/dist/specification/src/sync/v2/generate/analyticalListReport.js +46 -0
  76. package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  77. package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
  78. package/dist/specification/src/sync/v2/generate/listReport.js +46 -1
  79. package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
  80. package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
  81. package/dist/specification/src/sync/v2/generate/objectPage.js +63 -13
  82. package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
  83. package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
  84. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +28 -1
  85. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
  86. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts +22 -0
  87. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts.map +1 -0
  88. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js +124 -0
  89. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js.map +1 -0
  90. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +1 -0
  91. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
  92. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +4 -0
  93. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
  94. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
  95. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
  96. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
  97. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
  98. package/dist/specification/src/sync/v2/import/importPage.d.ts.map +1 -1
  99. package/dist/specification/src/sync/v2/import/importPage.js +5 -6
  100. package/dist/specification/src/sync/v2/import/importPage.js.map +1 -1
  101. package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
  102. package/dist/specification/src/sync/v2/import/pages/overviewPage.js +4 -0
  103. package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
  104. package/dist/specification/src/sync/v2/utils.d.ts +17 -1
  105. package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
  106. package/dist/specification/src/sync/v2/utils.js +57 -0
  107. package/dist/specification/src/sync/v2/utils.js.map +1 -1
  108. package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -2
  109. package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
  110. package/dist/specification/src/sync/v4/export/controls/Header.js +14 -2
  111. package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
  112. package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
  113. package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
  114. package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -2
  115. package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
  116. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +3 -0
  117. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
  118. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js +20 -0
  119. package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
  120. package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +5 -0
  121. package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
  122. package/dist/specification/src/sync/v4/export/controls/TableColumn.js +40 -0
  123. package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
  124. package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
  125. package/dist/specification/src/sync/v4/export/export.js +11 -3
  126. package/dist/specification/src/sync/v4/export/export.js.map +1 -1
  127. package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
  128. package/dist/specification/src/sync/v4/export/pages/ListReport.js +2 -1
  129. package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
  130. package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +107 -0
  131. package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
  132. package/dist/specification/src/sync/v4/generate/ListReportUtils.js +374 -0
  133. package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
  134. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +3 -3
  135. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
  136. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +10 -2
  137. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
  138. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
  139. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +9 -2
  140. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
  141. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +2 -2
  142. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
  143. package/dist/specification/src/sync/v4/generate/listReport.d.ts +100 -2
  144. package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
  145. package/dist/specification/src/sync/v4/generate/listReport.js +125 -105
  146. package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
  147. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  148. package/dist/specification/src/sync/v4/generate/objectPage.js +26 -27
  149. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  150. package/dist/specification/src/sync/v4/sync-rules/App.d.ts +141 -0
  151. package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -0
  152. package/dist/specification/src/sync/v4/sync-rules/App.js +208 -0
  153. package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -0
  154. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +193 -0
  155. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -0
  156. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +384 -0
  157. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -0
  158. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +172 -0
  159. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -0
  160. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +410 -0
  161. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -0
  162. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +70 -0
  163. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -0
  164. package/dist/specification/src/sync/v4/sync-rules/Page.js +73 -0
  165. package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -0
  166. package/dist/specification/src/sync/v4/sync-rules/utils.d.ts +9 -0
  167. package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -0
  168. package/dist/specification/src/sync/v4/sync-rules/utils.js +43 -0
  169. package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -0
  170. package/dist/specification/src/sync/v4/utils/utils.d.ts +6 -28
  171. package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
  172. package/dist/specification/src/sync/v4/utils/utils.js +8 -55
  173. package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
  174. package/dist/types/src/common/types.d.ts +122 -1
  175. package/dist/types/src/common/types.d.ts.map +1 -1
  176. package/dist/types/src/common/types.js +16 -1
  177. package/dist/types/src/common/types.js.map +1 -1
  178. package/dist/types/src/common/webapp/manifest/Manifest.d.ts +1 -1
  179. package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
  180. package/dist/types/src/v2/application.d.ts +18 -0
  181. package/dist/types/src/v2/application.d.ts.map +1 -1
  182. package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
  183. package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -4
  184. package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
  185. package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
  186. package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts +10 -1
  187. package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts.map +1 -1
  188. package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +1 -1
  189. package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
  190. package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
  191. package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +41 -0
  192. package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
  193. package/dist/types/src/v4/webapp/manifest/ManifestSettings.js.map +1 -1
  194. package/package.json +17 -17
@@ -1,8 +1,10 @@
1
- import { Visualization } from '@sap/ux-specification-types';
2
- import type { ExtensionLogger, GenerateAppSchemaParameters } from '@sap/ux-specification-types';
1
+ import { TemplateType, Visualization } from '@sap/ux-specification-types';
2
+ import type { ExtensionLogger, v4, GenerateAppSchemaParameters } from '@sap/ux-specification-types';
3
3
  import type { AnnotationTerm, EntityType, ConvertedMetadata } from '@sap-ux/vocabularies-types';
4
4
  import type { SelectionFields } from '@sap-ux/vocabularies-types/vocabularies/UI';
5
+ import { type ManifestPathParams } from '../../common';
5
6
  import type { Definition } from 'typescript-json-schema';
7
+ import { Page } from '../sync-rules/Page';
6
8
  /**
7
9
  * Adds the selection fields to the app schema, as properties of the FilterBar.
8
10
  *
@@ -14,6 +16,32 @@ import type { Definition } from 'typescript-json-schema';
14
16
  * @returns {Definition} - the updated selection fields definition
15
17
  */
16
18
  export declare function addSelectionFields(entityType: EntityType, appSchema: Definition, selectionFieldsAnnotation: AnnotationTerm<SelectionFields>, selectionFieldsDefinition?: Definition, qualifier?: string): Definition;
19
+ /**
20
+ * Returns visual filters (if defined) from manifest page.
21
+ *
22
+ * @param v4Page - actual page in the manifest
23
+ * @returns - The visual filters object if defined, otherwise undefined.
24
+ */
25
+ export declare function getVisualFilters(v4Page: v4.SapUiAppPageV4): {} | undefined;
26
+ /**
27
+ * Adds visual filters to the app schema, as properties of the FilterBar.
28
+ *
29
+ * @param {EntityType} entityType - the entity type as part of the AVT ConvertedMetadata
30
+ * @param {Definition} appSchema - the app specific schema that shall get enhanced
31
+ * @param visualFiltersManifest - the UI.SelectionFields under controlConfiguration
32
+ * @param selectionFields - The selection fields annotation to be processed
33
+ */
34
+ export declare function addVisualFilters(entityType: EntityType, appSchema: Definition, visualFiltersManifest: any, selectionFields: AnnotationTerm<SelectionFields>): void;
35
+ /**
36
+ * Method updates schema for custom filter fields:
37
+ * 1. Enables creation of custom filter fields.
38
+ * 2. Populates custom filter fields from manifest to schema.
39
+ *
40
+ * @param appSchema - the app specific schema that shall get enhanced
41
+ * @param selectionFieldsDefinition - schema of selection fields which should contain custom filter fields
42
+ * @param v4Page - actual page in the manifest
43
+ */
44
+ export declare function applyCustomFilterFields(appSchema: Definition, selectionFieldsDefinition: Definition, v4Page: v4.SapUiAppPageV4): void;
17
45
  /**
18
46
  * An annotationPath must be analyzed, to find the right target annotation and visualization.
19
47
  *
@@ -34,6 +62,76 @@ export declare function analyzeViewAnnotation(annotationPath: string, uIAnnotati
34
62
  namespace: string;
35
63
  title: string;
36
64
  };
65
+ /**
66
+ * Adds the ALP views to the app-specific schema.
67
+ *
68
+ * @param appSchema - app-specific JSON schema
69
+ * @param viewsPaths - views' paths' section in the manifest
70
+ * @param generateParameters - list of API input parameters
71
+ * @param templateAnnotation - defaultTemplateAnnotationPath as registered in manifest
72
+ * @param v4Page - actual page in the manifest
73
+ * @param tableDefinitionName - The name of the table definition in the schema
74
+ */
75
+ export declare function addALPViews(appSchema: Definition, viewsPaths: Array<object>, generateParameters: GenerateAppSchemaParameters, templateAnnotation: string, v4Page: v4.SapUiAppPageV4, tableDefinitionName: string): void;
76
+ export type ViewsParameters = {
77
+ viewKey: string;
78
+ appSchema: Definition;
79
+ targetAnnotation: string;
80
+ navPropName: string;
81
+ targetEntityType: EntityType;
82
+ title: string;
83
+ entitySet?: string;
84
+ };
85
+ /**
86
+ * Adds the schema tags to a given view.
87
+ *
88
+ * @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
89
+ * @param viewKey - key property of the view
90
+ * @param namespace - target namespace for annotations
91
+ * @param view - the given view
92
+ */
93
+ export declare function addTagsToView(viewsDefinition: Definition, viewKey: string, namespace: string, view: object): void;
94
+ /**
95
+ * Adds definition parts to a LR View (LineItem/Chart).
96
+ *
97
+ * @param visualization - visualization of the annotation
98
+ * @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
99
+ * @param commonInputParameters - list of input parameters as collected by the calling instance
100
+ * @param generateParameters - list of API input parameters
101
+ * @param generateParameters.serviceAVT - OData service AVT information
102
+ * @param generateParameters.entityType - entity type of the current page
103
+ * @param generateParameters.logger - extension logger
104
+ * @param page - the current page object
105
+ * @param uiAnnotations - UI annotations of the given entityType
106
+ * @param view - the given view
107
+ */
108
+ export declare function addLRViewParts(visualization: string, viewsDefinition: Definition, commonInputParameters: ViewsParameters, { serviceAVT, entityType, logger }: Partial<GenerateAppSchemaParameters>, page: Page, uiAnnotations: object, view: object): void;
109
+ /**
110
+ * Checks for the default annotation path to use for LR table.
111
+ *
112
+ * @param v4Page - actual page in the manifest
113
+ * @param entityType - actual entity type (AVT information)
114
+ * @param templateType - The type of template being used (e.g., ListReportObjectPageV4 or AnalyticalListPageV4)
115
+ * @returns annotation term
116
+ */
117
+ export declare function getDefaultAnnotationPath(v4Page: v4.SapUiAppPageV4, entityType: EntityType, templateType: TemplateType): string | undefined;
118
+ /**
119
+ * Adds header actions to schema (LR or ALP).
120
+ *
121
+ * @param appSchema - app-specific JSON schema
122
+ * @param v4Page - actual page in the manifest
123
+ * @param logger - Logger class for logging messages
124
+ */
125
+ export declare function addHeaderActions(appSchema: Definition, v4Page: v4.SapUiAppPageV4, logger: ExtensionLogger): void;
126
+ /**
127
+ * Adds 'manifestPath' to each property in a definition based on metadata sync rules.
128
+ *
129
+ * @param appSchema - Full schema.
130
+ * @param definitionName - The name of the definition/class whose properties are being processed.
131
+ * @param definition - The definition object containing property schemas.
132
+ * @param pathParams - Additional context required to compute manifest paths.
133
+ */
134
+ export declare function addManifestPathsToPropertiesLR(appSchema: Definition, definitionName: string | undefined, definition: Definition, pathParams: ManifestPathParams): void;
37
135
  /**
38
136
  * Generates an app specific schema for the FE V4 ListReport from the generic schema.
39
137
  * Generic types are replaced by information from the app specific annotations.
@@ -1 +1 @@
1
- {"version":3,"file":"listReport.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/generate/listReport.ts"],"names":[],"mappings":"AAaA,OAAO,EAKH,aAAa,EAWhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAM,2BAA2B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E,CAAC,cAAc,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CA0BhH;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC1C,SAAS,EAAE,UAAU,EACrB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,kBAAkB,GAC/B,IAAI,CAiBN;AAsFD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACtC,kBAAkB,EAAE,2BAA2B,EAC/C,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GACpB,MAAM,CAQR"}
@@ -4,7 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.addSelectionFields = addSelectionFields;
7
+ exports.getVisualFilters = getVisualFilters;
8
+ exports.addVisualFilters = addVisualFilters;
9
+ exports.applyCustomFilterFields = applyCustomFilterFields;
7
10
  exports.analyzeViewAnnotation = analyzeViewAnnotation;
11
+ exports.addALPViews = addALPViews;
12
+ exports.addTagsToView = addTagsToView;
13
+ exports.addLRViewParts = addLRViewParts;
14
+ exports.getDefaultAnnotationPath = getDefaultAnnotationPath;
15
+ exports.addHeaderActions = addHeaderActions;
16
+ exports.addManifestPathsToPropertiesLR = addManifestPathsToPropertiesLR;
8
17
  exports.generateListReportSchemaV4 = generateListReportSchemaV4;
9
18
  const utils_1 = require("../utils/utils");
10
19
  const utils_2 = require("../utils/utils");
@@ -12,6 +21,10 @@ const ux_specification_types_1 = require("@sap/ux-specification-types");
12
21
  const i18next_1 = __importDefault(require("i18next"));
13
22
  const extensionLogger_1 = require("../../../extensionLogger");
14
23
  const common_1 = require("../../common");
24
+ const Page_1 = require("../sync-rules/Page");
25
+ const App_1 = require("../sync-rules/App");
26
+ const AppSchema_1 = require("../sync-rules/AppSchema");
27
+ const ListReportUtils_1 = require("./ListReportUtils");
15
28
  const ROOT_PROPERTIES_ORDER = ['header', 'filterBar', 'chart', 'table'];
16
29
  const UILINEITEM = '@UI.LineItem';
17
30
  /**
@@ -404,7 +417,7 @@ function addALPChartView(appSchema, chartAnnotationPath, targetAnnotation, annot
404
417
  }
405
418
  else {
406
419
  // Add message about unexisting annotation path
407
- (0, common_1.addMessageToSchema)(chartView, i18next_1.default.t('UNEXISTING_ANNOTATION_PATH'));
420
+ (0, common_1.addMessageToSchema)(chartView, { text: i18next_1.default.t('UNEXISTING_ANNOTATION_PATH') });
408
421
  }
409
422
  }
410
423
  chartView[ux_specification_types_1.SchemaTag.artifactType] = ux_specification_types_1.ArtifactType.Manifest;
@@ -495,7 +508,7 @@ function addALPViews(appSchema, viewsPaths, generateParameters, templateAnnotati
495
508
  addManifestPathsToPropertiesLR(appSchema, ux_specification_types_1.DefinitionName.ALPTable, tableDefinition, {
496
509
  pageName: v4Page.id,
497
510
  manifest: generateParameters.manifest,
498
- targetAnnotation
511
+ targetAnnotation: target
499
512
  });
500
513
  }
501
514
  /**
@@ -534,30 +547,43 @@ function addViewChartDefinitions(inputParameters, annotations) {
534
547
  * @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
535
548
  * @param viewKey - view key
536
549
  * @param title - view title
550
+ * @param page - Represents the page in the application's structure where the view line items are to be added.
537
551
  */
538
- function addViewChart(inputParameters, UIAnnotations, appSchema, viewsDefinition, viewKey, title) {
552
+ function addViewChart(inputParameters, UIAnnotations, appSchema, viewsDefinition, viewKey, title, page) {
539
553
  const idForChart = addViewChartDefinitions(inputParameters, UIAnnotations);
540
- appSchema.definitions[idForChart].properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
541
- appSchema.definitions[idForChart].properties.index[ux_specification_types_1.SchemaTag.hidden] = true;
542
- appSchema.definitions[idForChart].properties.entitySet[ux_specification_types_1.SchemaTag.hidden] = true;
554
+ const chartViewDefinition = appSchema.definitions[idForChart];
555
+ chartViewDefinition.properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
556
+ chartViewDefinition.properties.index[ux_specification_types_1.SchemaTag.hidden] = true;
557
+ chartViewDefinition.properties.entitySet[ux_specification_types_1.SchemaTag.hidden] = true;
543
558
  const titleOnHover = `Chart View (key: ${viewKey})`;
544
559
  viewsDefinition.properties[viewKey] = {
545
560
  $ref: `${common_1.DEFINITION_LINK_PREFIX}${idForChart}`,
546
561
  description: title ? title : titleOnHover,
547
562
  title: titleOnHover
548
563
  };
564
+ // Add "manifestPath" for table properties
565
+ addManifestPathsToPropertiesLR(inputParameters.appSchema, ux_specification_types_1.DefinitionName.LRChartView, chartViewDefinition, {
566
+ pageName: page.getPage().id,
567
+ manifest: page.getApp().manifest,
568
+ targetAnnotation: inputParameters.targetAnnotation,
569
+ viewConfig: {
570
+ key: viewKey,
571
+ entitySet: inputParameters.entitySet
572
+ }
573
+ });
549
574
  }
550
575
  /**
551
576
  * Modifies the app schema, adds the right line item settings as derived from the visualization.
552
577
  *
553
- * @param inputParameters - list of input parameters as collected by the calling instance
554
- * @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
555
- * @param visualization - visualization from the given (S)PV
556
- * @param templateAnnotation - defaultTemplateAnnotationPath as registered in manifest
557
- * @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
558
- * @param {v4.SapUiAppPageV4} v4Page - The V4 application page configuration where adjustments and schema changes will apply.
578
+ * @param {ViewsParameters} inputParameters - The parameters required for generating and defining the line items in the view schema.
579
+ * @param {Definition} viewsDefinition - The existing schema definition for views that will be updated with new view line items.
580
+ * @param {string} visualization - The visualization format or mode for the line items, used to determine the associated annotations.
581
+ * @param {string} templateAnnotation - The template annotation to infer metadata for the line items.
582
+ * @param {GenerateAppSchemaParameters} generateParameters - Parameters essential for schema generation, including OData service metadata.
583
+ * @param {Page} page - The page object representing the context in which the view is being generated.
584
+ * @returns {void} No return value.
559
585
  */
560
- function addViewLineItems(inputParameters, viewsDefinition, visualization, templateAnnotation, generateParameters, v4Page) {
586
+ function addViewLineItems(inputParameters, viewsDefinition, visualization, templateAnnotation, { serviceAVT, entityType }, page) {
561
587
  const tableId = `${ux_specification_types_1.DefinitionName.LRTableView}<${inputParameters.viewKey}>`;
562
588
  const viewId = `${ux_specification_types_1.DefinitionName.LineItemsOfView}::${inputParameters.viewKey}`;
563
589
  const lrTableView = (0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.LRTableView, inputParameters.viewKey, inputParameters.appSchema);
@@ -587,15 +613,19 @@ function addViewLineItems(inputParameters, viewsDefinition, visualization, templ
587
613
  appSchema: inputParameters.appSchema,
588
614
  lineItemAnnotation: inputParameters.targetEntityType?.annotations.UI[annotationTerm],
589
615
  entityType: inputParameters.targetEntityType,
590
- oDataServiceAVT: generateParameters.serviceAVT,
616
+ oDataServiceAVT: serviceAVT,
591
617
  lineItemId: viewId
592
618
  };
593
619
  (0, utils_2.addLineItemsTypeToSchema)(dataForLineItem, ux_specification_types_1.DefinitionName.ViewTableColumn, ux_specification_types_1.DefinitionName.ViewCustomColumn, ux_specification_types_1.DefinitionName.ViewCustomAction);
594
620
  // Add "manifestPath" for table properties
595
621
  addManifestPathsToPropertiesLR(inputParameters.appSchema, ux_specification_types_1.DefinitionName.LRTableView, lrTableView, {
596
- pageName: v4Page.id,
597
- manifest: generateParameters.manifest,
598
- targetAnnotation: inputParameters.targetAnnotation
622
+ pageName: page.getPage().id,
623
+ manifest: page.getApp().manifest,
624
+ targetAnnotation: inputParameters.targetAnnotation,
625
+ viewConfig: {
626
+ key: inputParameters.viewKey,
627
+ entitySet: inputParameters.entitySet
628
+ }
599
629
  });
600
630
  }
601
631
  /**
@@ -638,18 +668,18 @@ function getTargetEntityType(entitySet, view, generateParameters) {
638
668
  * Adds view custom extensions - custom column and custom action definitions.
639
669
  *
640
670
  * @param commonInputParameters - list of input parameters as collected by the calling instance
641
- * @param generateParameters - list of API input parameters
642
671
  * @param visualization - visualization of the annotation
643
672
  * @param v4Page - the given page in manifest
673
+ * @param logger - extension logger
644
674
  */
645
- function addViewCustomExtensions(commonInputParameters, generateParameters, visualization, v4Page) {
675
+ function addViewCustomExtensions(commonInputParameters, visualization, v4Page, logger) {
646
676
  const sectionId = `${ux_specification_types_1.DefinitionName.LineItemsOfView}::${commonInputParameters.viewKey}`;
647
677
  const sectionIdPrefix = commonInputParameters.entitySet ? `/${commonInputParameters.entitySet}/` : '';
648
678
  const sectionIdInManifest = `${sectionIdPrefix}@${"com.sap.vocabularies.UI.v1.LineItem" /* UIAnnotationTerms.LineItem */}${visualization.split(ux_specification_types_1.Visualization.LineItem)[1]}`;
649
679
  const viewColumnDefinition = (0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.ViewCustomColumn, sectionId, commonInputParameters.appSchema);
650
680
  (0, common_1.addDefinitionRef)(viewColumnDefinition.properties.position, ux_specification_types_1.DefinitionName.ViewPosition, sectionId);
651
681
  (0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.ViewPosition, sectionId, commonInputParameters.appSchema);
652
- (0, utils_2.addCustomColumnDefinition)(commonInputParameters.appSchema, v4Page, generateParameters.logger, `${ux_specification_types_1.DefinitionName.ViewCustomColumn}<${sectionId}>`, sectionId, sectionIdInManifest);
682
+ (0, utils_2.addCustomColumnDefinition)(commonInputParameters.appSchema, v4Page, logger, `${ux_specification_types_1.DefinitionName.ViewCustomColumn}<${sectionId}>`, sectionId, sectionIdInManifest);
653
683
  (0, utils_2.addFragmentEnumForAnchor)(commonInputParameters.appSchema, sectionId, v4Page, `${ux_specification_types_1.DefinitionName.ViewPosition}<${sectionId}>`, sectionIdInManifest);
654
684
  // Remove generic position
655
685
  if (commonInputParameters.appSchema.definitions.Position) {
@@ -658,7 +688,7 @@ function addViewCustomExtensions(commonInputParameters, generateParameters, visu
658
688
  // Table toolbar actions with custom actions
659
689
  const schemaIdForToolbarActions = `${ux_specification_types_1.DefinitionName.Actions}<${sectionId}>`;
660
690
  const customActionDefinitionKey = `${ux_specification_types_1.DefinitionName.ViewCustomAction}<${sectionId}>`;
661
- (0, utils_2.addCustomActionDefinition)(commonInputParameters.appSchema, v4Page, generateParameters.logger, customActionDefinitionKey, schemaIdForToolbarActions, sectionIdInManifest);
691
+ (0, utils_2.addCustomActionDefinition)(commonInputParameters.appSchema, v4Page, logger, customActionDefinitionKey, schemaIdForToolbarActions, sectionIdInManifest);
662
692
  // Anchor selection
663
693
  (0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.ViewCustomActionPosition, sectionId, commonInputParameters.appSchema);
664
694
  const customActionPositionDefinitionKey = `${ux_specification_types_1.DefinitionName.ViewCustomActionPosition}<${sectionId}>`;
@@ -674,19 +704,22 @@ function addViewCustomExtensions(commonInputParameters, generateParameters, visu
674
704
  * @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
675
705
  * @param commonInputParameters - list of input parameters as collected by the calling instance
676
706
  * @param generateParameters - list of API input parameters
677
- * @param v4Page - the given page in manifest
707
+ * @param generateParameters.serviceAVT - OData service AVT information
708
+ * @param generateParameters.entityType - entity type of the current page
709
+ * @param generateParameters.logger - extension logger
710
+ * @param page - the current page object
678
711
  * @param uiAnnotations - UI annotations of the given entityType
679
712
  * @param view - the given view
680
713
  */
681
- function addLRViewParts(visualization, viewsDefinition, commonInputParameters, generateParameters, v4Page, uiAnnotations, view) {
714
+ function addLRViewParts(visualization, viewsDefinition, commonInputParameters, { serviceAVT, entityType, logger }, page, uiAnnotations, view) {
682
715
  if (visualization?.indexOf(ux_specification_types_1.Visualization.LineItem) > -1) {
683
716
  //Add Line item view
684
- addViewLineItems(commonInputParameters, viewsDefinition, visualization, commonInputParameters.targetAnnotation, generateParameters, v4Page);
685
- addViewCustomExtensions(commonInputParameters, generateParameters, visualization, v4Page);
717
+ addViewLineItems(commonInputParameters, viewsDefinition, visualization, commonInputParameters.targetAnnotation, { serviceAVT, entityType }, page);
718
+ addViewCustomExtensions(commonInputParameters, visualization, page.getPage(), logger);
686
719
  }
687
720
  else if (visualization?.indexOf('Chart') > -1) {
688
721
  //Add Chart view
689
- addViewChart(commonInputParameters, uiAnnotations, commonInputParameters.appSchema, viewsDefinition, commonInputParameters.viewKey, commonInputParameters.title);
722
+ addViewChart(commonInputParameters, uiAnnotations, commonInputParameters.appSchema, viewsDefinition, commonInputParameters.viewKey, commonInputParameters.title, page);
690
723
  }
691
724
  else if (view['template']) {
692
725
  const titleOnHover = view['label'] || `Custom View (key: ${commonInputParameters.viewKey})`;
@@ -713,10 +746,10 @@ function addLRViewParts(visualization, viewsDefinition, commonInputParameters, g
713
746
  * @param appSchema - app-specific JSON schema
714
747
  * @param viewsPaths - views' paths' section in the manifest
715
748
  * @param generateParameters - list of API input parameters
716
- * @param v4Page - the given page in manifest
749
+ * @param page - the current page object
717
750
  * @param tableDefinitionName - The name of the table definition in the schema
718
751
  */
719
- function addLRViews(appSchema, viewsPaths, generateParameters, v4Page, tableDefinitionName) {
752
+ function addLRViews(appSchema, viewsPaths, generateParameters, page, tableDefinitionName) {
720
753
  const tableDefinition = appSchema.definitions[tableDefinitionName];
721
754
  tableDefinition.properties = {
722
755
  annotationPath: tableDefinition.properties.annotationPath,
@@ -747,7 +780,7 @@ function addLRViews(appSchema, viewsPaths, generateParameters, v4Page, tableDefi
747
780
  title,
748
781
  entitySet: view['entitySet']
749
782
  };
750
- addLRViewParts(visualization, viewsDefinition, commonInputParameters, generateParameters, v4Page, uiAnnotations, view);
783
+ addLRViewParts(visualization, viewsDefinition, commonInputParameters, generateParameters, page, uiAnnotations, view);
751
784
  addTagsToView(viewsDefinition, viewKey, namespace, view);
752
785
  }
753
786
  }
@@ -864,39 +897,6 @@ function getDefaultAnnotationPath(v4Page, entityType, templateType) {
864
897
  entityType?.annotations.UI?.PresentationVariant?.term);
865
898
  }
866
899
  }
867
- /**
868
- * Add views to schema (LR or ALP).
869
- *
870
- * @param appSchema - app-specific JSON schema
871
- * @param v4Page - actual page in the manifest
872
- * @param generateParameters - list of API input parameters
873
- * @param alias - The alias of the OData annotations
874
- */
875
- function addTableAndViews(appSchema, v4Page, generateParameters, alias) {
876
- const viewsPaths = v4Page.options?.settings?.views?.paths;
877
- const entityType = generateParameters.entityType;
878
- const defaultAnnotation = getDefaultAnnotationPath(v4Page, generateParameters.entityType, generateParameters.templateType);
879
- const tableDefinitionName = (0, utils_2.alignSchemaWithTemplateType)(appSchema, generateParameters);
880
- // Add filter bar
881
- addFilterBar(entityType, appSchema, v4Page, alias);
882
- if (generateParameters.templateType === ux_specification_types_1.TemplateType.ListReportObjectPageV4) {
883
- adaptTableDefinition(appSchema, generateParameters, defaultAnnotation, v4Page, alias, tableDefinitionName);
884
- if (viewsPaths) {
885
- delete appSchema.definitions['LineItems'];
886
- delete appSchema.definitions['ToolBar<LineItems>'];
887
- delete appSchema.definitions['Actions<LineItems>'];
888
- addLRViews(appSchema, viewsPaths, generateParameters, v4Page, tableDefinitionName);
889
- }
890
- else if (!v4Page.options?.settings?.views) {
891
- appSchema.definitions.MultiTableModeV4.properties = {};
892
- }
893
- appSchema.properties[ux_specification_types_1.PropertyName.chart][ux_specification_types_1.SchemaTag.hidden] = true;
894
- }
895
- else if (generateParameters.templateType === ux_specification_types_1.TemplateType.AnalyticalListPageV4) {
896
- addALPViews(appSchema, viewsPaths, generateParameters, defaultAnnotation, v4Page, tableDefinitionName);
897
- (0, utils_2.addFragmentEnumForAnchor)(appSchema, ux_specification_types_1.DefinitionName.LineItems, v4Page);
898
- }
899
- }
900
900
  /**
901
901
  * Adds header actions to schema (LR or ALP).
902
902
  *
@@ -926,10 +926,10 @@ function addHeaderActions(appSchema, v4Page, logger) {
926
926
  /**
927
927
  * Adds 'manifestPath' to each property in a definition based on metadata sync rules.
928
928
  *
929
- * @param {string} appSchema - Full schema.
930
- * @param {string} definitionName - The name of the definition/class whose properties are being processed.
931
- * @param {Definition} definition - The definition object containing property schemas.
932
- * @param {ListReportManifestPathParams} pathParams - Additional context required to compute manifest paths.
929
+ * @param appSchema - Full schema.
930
+ * @param definitionName - The name of the definition/class whose properties are being processed.
931
+ * @param definition - The definition object containing property schemas.
932
+ * @param pathParams - Additional context required to compute manifest paths.
933
933
  */
934
934
  function addManifestPathsToPropertiesLR(appSchema, definitionName, definition, pathParams) {
935
935
  let targetAnnotation = undefined;
@@ -941,16 +941,20 @@ function addManifestPathsToPropertiesLR(appSchema, definitionName, definition, p
941
941
  // Default annotation path
942
942
  targetAnnotation = `@${"com.sap.vocabularies.UI.v1.LineItem" /* UIAnnotationTerms.LineItem */}`;
943
943
  }
944
+ const entitySet = pathParams.viewConfig?.entitySet;
945
+ if (entitySet) {
946
+ targetAnnotation = entitySet ? `/${entitySet}/${targetAnnotation}` : targetAnnotation;
947
+ }
944
948
  (0, utils_1.addManifestPathsToProperties)(appSchema, definitionName, definition, {
945
949
  ...pathParams,
946
- pathsParts: [targetAnnotation, '', targetAnnotation]
950
+ pathsParts: [targetAnnotation, '', targetAnnotation, pathParams.viewConfig]
947
951
  });
948
952
  }
949
953
  /**
950
954
  * Adds 'manifestPath' to static nodes in schema.
951
955
  *
952
- * @param {string} appSchema - Full schema.
953
- * @param {ListReportManifestPathParams} pathParams - Additional context required to compute manifest paths.
956
+ * @param appSchema - Full schema.
957
+ * @param pathParams - Additional context required to compute manifest paths.
954
958
  */
955
959
  function addManifestPathsToStaticNodes(appSchema, pathParams) {
956
960
  // Root level - rules stored on page class level
@@ -964,6 +968,53 @@ function addManifestPathsToStaticNodes(appSchema, pathParams) {
964
968
  }
965
969
  }
966
970
  }
971
+ /**
972
+ * Class to generate the List Report page schema.
973
+ */
974
+ class ListReportPage {
975
+ /**
976
+ * Constructor for ListReportPage.
977
+ *
978
+ * @param generateParameters - parameters for generating the app schema
979
+ * @param schema - generic JSON schema of the List Report page
980
+ * @param templateName - name of the template
981
+ * @param contextPath - context path of the page
982
+ */
983
+ constructor(generateParameters, schema, templateName, contextPath) {
984
+ this.schema = new AppSchema_1.AppSchema(schema);
985
+ this.app = (0, App_1.createApp)(generateParameters.manifest, generateParameters.serviceAVT, generateParameters.logger);
986
+ this.page = new Page_1.Page(this.app, { name: templateName, type: generateParameters.templateType }, generateParameters.entitySet, contextPath);
987
+ }
988
+ /**
989
+ * Cleans up the schema by hiding specific properties and removing unnecessary definitions.
990
+ */
991
+ cleanup() {
992
+ this.schema.hide(this.schema.getRootProperty([ux_specification_types_1.PropertyName.defaultTemplateAnnotationPath]));
993
+ this.schema.cleanup(['GenericColumns', 'Action']);
994
+ (0, common_1.updatePropertyIndices)(this.schema.getSchema(), ROOT_PROPERTIES_ORDER);
995
+ }
996
+ /**
997
+ * Generates the finalized schema for the List Report page.
998
+ *
999
+ * @returns The finalized schema for List Report page
1000
+ */
1001
+ generate() {
1002
+ new ListReportUtils_1.GeneralListReportSettings(this.schema, this.page, this.app.getLogger()).instantiate();
1003
+ if (!this.page.getPage()) {
1004
+ return this.schema.finalize();
1005
+ }
1006
+ new ListReportUtils_1.Header(this.schema, this.page, this.app.getLogger()).instantiate();
1007
+ new ListReportUtils_1.FilterBar(this.schema, this.page, this.app.getLogger()).instantiate();
1008
+ new ListReportUtils_1.TableAndViews(this.schema, this.page, this.app.getLogger()).instantiate();
1009
+ // Add "manifestPath" for properties in static nodes
1010
+ addManifestPathsToStaticNodes(this.schema.getSchema(), {
1011
+ pageName: this.page.getPage().id,
1012
+ manifest: this.app.getManifest()
1013
+ });
1014
+ this.cleanup();
1015
+ return this.schema.finalize();
1016
+ }
1017
+ }
967
1018
  /**
968
1019
  * Generates an app specific schema for the FE V4 ListReport from the generic schema.
969
1020
  * Generic types are replaced by information from the app specific annotations.
@@ -975,42 +1026,11 @@ function addManifestPathsToStaticNodes(appSchema, pathParams) {
975
1026
  * @returns {object} application-specific schema of the list report
976
1027
  */
977
1028
  function generateListReportSchemaV4(generateParameters, genericSchema, templateName, contextPath) {
978
- const appSchema = JSON.parse(JSON.stringify(genericSchema));
979
- const entityType = generateParameters.entityType;
980
- const alias = generateParameters.serviceAVT && (0, common_1.findAlias)(ux_specification_types_1.UIVOCABULARY, generateParameters.serviceAVT);
981
- appSchema.properties[ux_specification_types_1.PropertyName.defaultTemplateAnnotationPath][ux_specification_types_1.SchemaTag.hidden] = true;
982
- //enum for annotation path as part of QuickVariantSelection
983
- (0, common_1.addEnumForSingleTabVariant)(entityType, appSchema, ux_specification_types_1.DefinitionName.AnnotationPathAsObject);
984
- if (generateParameters.manifest) {
985
- //Find page in targets
986
- const pages = generateParameters.manifest[ux_specification_types_1.ManifestSection.ui5].routing
987
- .targets;
988
- if (!pages) {
989
- (0, extensionLogger_1.log)(generateParameters.logger, {
990
- severity: "error" /* LogSeverity.Error */,
991
- message: i18next_1.default.t('NOPAGES', { appId: generateParameters.manifest['sap.app']['id'] }),
992
- location: {
993
- path: ux_specification_types_1.MANIFESTPATH,
994
- range: [ux_specification_types_1.ManifestSection.generic]
995
- }
996
- });
997
- return appSchema;
998
- }
999
- const v4Page = (0, utils_2.findPageV4)(pages, templateName, generateParameters.entitySet, contextPath);
1000
- if (!v4Page) {
1001
- return appSchema;
1002
- }
1003
- addHeaderActions(appSchema, v4Page, generateParameters.logger);
1004
- addTableAndViews(appSchema, v4Page, generateParameters, alias);
1005
- // Add "manifestPath" for properties in static nodes
1006
- addManifestPathsToStaticNodes(appSchema, {
1007
- pageName: v4Page.id,
1008
- manifest: generateParameters.manifest
1009
- });
1029
+ const listReport = new ListReportPage(generateParameters, genericSchema, templateName, contextPath);
1030
+ if (!listReport.app.getManifest()) {
1031
+ listReport.cleanup();
1032
+ return listReport.schema.finalize();
1010
1033
  }
1011
- delete appSchema.definitions.GenericColumns;
1012
- delete appSchema.definitions.Action;
1013
- (0, common_1.updatePropertyIndices)(appSchema, ROOT_PROPERTIES_ORDER);
1014
- return appSchema;
1034
+ return listReport.generate();
1015
1035
  }
1016
1036
  //# sourceMappingURL=listReport.js.map