@sap/ux-specification 1.71.57 → 1.71.60

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 (72) hide show
  1. package/CHANGELOG.md +32 -3
  2. package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
  3. package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
  4. package/dist/documentation/v2/v2-ListReport.html +1 -1
  5. package/dist/documentation/v2/v2-ObjectPage.html +1 -1
  6. package/dist/documentation/v2/v2-OverviewPage.html +1 -1
  7. package/dist/index-min.js +1 -1
  8. package/dist/schemas/v2/ObjectPageConfig.json +200 -1
  9. package/dist/specification/v2/index-min.js +1 -1
  10. package/dist/src/apiTypes.d.ts +2 -2
  11. package/dist/src/project.d.ts +1 -0
  12. package/dist/src/project.js +2 -2
  13. package/dist/src/project.js.map +1 -1
  14. package/dist/src/specification/schemaAccess.js +2 -2
  15. package/dist/src/specification/schemaAccess.js.map +1 -1
  16. package/dist/src/specification/v2/controls/Facets.d.ts +2 -1
  17. package/dist/src/specification/v2/controls/ObjectPageSection.d.ts +44 -9
  18. package/dist/src/specification/v2/controls/ObjectPageSection.js.map +1 -1
  19. package/dist/src/sync/common/appProvider.d.ts +1 -1
  20. package/dist/src/sync/common/appProvider.js +1 -1
  21. package/dist/src/sync/common/decoration/control.d.ts +1 -1
  22. package/dist/src/sync/common/decoration/control.js +3 -3
  23. package/dist/src/sync/common/decoration/control.js.map +1 -1
  24. package/dist/src/sync/common/decoration/decorators.d.ts +2 -2
  25. package/dist/src/sync/common/decoration/decorators.js +8 -6
  26. package/dist/src/sync/common/decoration/decorators.js.map +1 -1
  27. package/dist/src/sync/common/flexUtils.js +1 -2
  28. package/dist/src/sync/common/flexUtils.js.map +1 -1
  29. package/dist/src/sync/common/generate/objectPage.d.ts +8 -9
  30. package/dist/src/sync/common/generate/objectPage.js +6 -6
  31. package/dist/src/sync/common/generate/objectPage.js.map +1 -1
  32. package/dist/src/sync/common/generate/utils.d.ts +49 -9
  33. package/dist/src/sync/common/generate/utils.js +87 -4
  34. package/dist/src/sync/common/generate/utils.js.map +1 -1
  35. package/dist/src/sync/common/import/utils.d.ts +3 -2
  36. package/dist/src/sync/common/import/utils.js +11 -6
  37. package/dist/src/sync/common/import/utils.js.map +1 -1
  38. package/dist/src/sync/common/importProject.d.ts +2 -3
  39. package/dist/src/sync/common/importProject.js +1 -1
  40. package/dist/src/sync/common/importProject.js.map +1 -1
  41. package/dist/src/sync/common/types.d.ts +27 -2
  42. package/dist/src/sync/common/types.js +24 -1
  43. package/dist/src/sync/common/types.js.map +1 -1
  44. package/dist/src/sync/common/utils.d.ts +27 -17
  45. package/dist/src/sync/common/utils.js +66 -43
  46. package/dist/src/sync/common/utils.js.map +1 -1
  47. package/dist/src/sync/v2/application.d.ts +2 -2
  48. package/dist/src/sync/v2/application.js +3 -3
  49. package/dist/src/sync/v2/application.js.map +1 -1
  50. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js +6 -6
  51. package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js.map +1 -1
  52. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +3 -3
  53. package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +1 -1
  54. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +30 -11
  55. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +87 -4
  56. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
  57. package/dist/src/sync/v2/export/exportPage.js +32 -32
  58. package/dist/src/sync/v2/export/exportPage.js.map +1 -1
  59. package/dist/src/sync/v2/generate/listReport.d.ts +3 -4
  60. package/dist/src/sync/v2/generate/listReport.js +1 -1
  61. package/dist/src/sync/v2/generate/listReport.js.map +1 -1
  62. package/dist/src/sync/v2/generate/objectPage.js +82 -69
  63. package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
  64. package/dist/src/sync/v2/generate/utils.d.ts +8 -7
  65. package/dist/src/sync/v2/generate/utils.js +5 -5
  66. package/dist/src/sync/v2/generate/utils.js.map +1 -1
  67. package/dist/src/sync/v2/import/pages/objectPage.js +67 -70
  68. package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
  69. package/dist/src/sync/v2/types.d.ts +8 -3
  70. package/dist/src/sync/v2/types.js +6 -2
  71. package/dist/src/sync/v2/types.js.map +1 -1
  72. package/package.json +6 -6
@@ -1,5 +1,6 @@
1
1
  import type { Manifest } from '../../specification/common/webapp/manifest';
2
- import type { AnnotationTerm, CollectionFacet, EntityType, ReferenceFacet, ReferenceURLFacet } from '@sap-ux/vocabularies-types';
2
+ import type { AnnotationTerm, EntityType } from '@sap-ux/vocabularies-types';
3
+ import type { CollectionFacet, ReferenceFacet, ReferenceURLFacet } from '@sap-ux/vocabularies-types/vocabularies/UI';
3
4
  import type { ManifestSettingsType } from '../../specification/common/types';
4
5
  export declare type anyFacetType = AnnotationTerm<CollectionFacet> | AnnotationTerm<ReferenceFacet> | AnnotationTerm<ReferenceURLFacet>;
5
6
  export declare enum ExportArtifacts {
@@ -36,6 +37,7 @@ export interface ExportResults {
36
37
  }
37
38
  export declare enum SectionType {
38
39
  Section = "Section",
40
+ SubSection = "SubSection",
39
41
  HeaderSection = "HeaderSection"
40
42
  }
41
43
  export declare enum ArtifactType {
@@ -180,6 +182,7 @@ export interface FacetConfig {
180
182
  entityType?: EntityType;
181
183
  annotationPath?: string;
182
184
  target?: object;
185
+ facets?: FacetConfigs;
183
186
  }
184
187
  export interface SubSectionConfig {
185
188
  base: FacetBase;
@@ -236,28 +239,46 @@ export declare enum DefinitionName {
236
239
  CustomColumn = "TableCustomColumn",
237
240
  CustomColumnOP = "TableCustomColumnOP",
238
241
  CustomColumns = "TableCustomColumns",
242
+ CustomSections = "CustomSections",
243
+ FieldPath = "FieldPath",
244
+ Field = "Field",
239
245
  Fields = "Fields",
246
+ Fields4Dialog = "Fields4Dialog",
247
+ Footer = "Footer",
240
248
  FooterActions = "FooterActions",
241
249
  Form = "Form",
242
250
  FormAction = "FormAction",
243
251
  GenericActions = "GenericActions",
244
252
  GenericColumnsOP = "GenericColumnsOP",
253
+ GenericFooter = "GenericFooter",
245
254
  GenericSections = "GenericSections",
246
255
  HeaderActions = "HeaderActions",
256
+ HeaderSections = "HeaderSections",
247
257
  LineItems = "LineItems",
248
258
  LineItemsOfView = "LineItemsOfView",
249
259
  ListReportFilterBar = "ListReportFilterBar",
250
260
  LRTableView = "LRTableView",
251
261
  LRChartView = "LRChartView",
252
262
  MultiTableModeV4 = "MultiTableModeV4",
263
+ ObjectPageChart = "ObjectPageChart",
264
+ ObjectPageCustomSectionFragment = "ObjectPageCustomSectionFragment",
253
265
  ObjectPageFooter = "ObjectPageFooter",
254
266
  ObjectPageFooterAction = "ObjectPageFooterAction",
255
267
  ObjectPageFooterActions = "ObjectPageFooterActions",
256
268
  ObjectPageHeader = "ObjectPageHeader",
269
+ ObjectPageHeaderSectionForm = "ObjectPageHeaderSectionForm",
270
+ ObjectPageHeaderSectionChart = "ObjectPageHeaderSectionChart",
271
+ ObjectPageHeaderSectionDataPoint = "ObjectPageHeaderSectionDataPoint",
272
+ ObjectPageHeaderSectionContact = "ObjectPageHeaderSectionContact",
273
+ ObjectPageHeaderSectionAddress = "ObjectPageHeaderSectionAddress",
274
+ ObjectPageLayout = "ObjectPageLayout",
275
+ ObjectPagePresentationVariant = "ObjectPagePresentationVariant",
257
276
  ObjectPageSectionAddress = "ObjectPageSectionAddress",
277
+ ObjectPageSectionChart = "ObjectPageSectionChart",
258
278
  ObjectPageSectionContact = "ObjectPageSectionContact",
259
279
  ObjectPageSectionDataPoint = "ObjectPageSectionDataPoint",
260
280
  ObjectPageSectionForm = "ObjectPageSectionForm",
281
+ ObjectPageSectionPresentationVariant = "ObjectPageSectionPresentationVariant",
261
282
  ObjectPageSectionTableV4 = "ObjectPageSectionTableV4",
262
283
  ObjectPageSubSections = "ObjectPageSubSections",
263
284
  ObjectPageTable = "ObjectPageTable",
@@ -267,7 +288,10 @@ export declare enum DefinitionName {
267
288
  ObjectPageToolBarActions = "ObjectPageToolBarActions",
268
289
  Position = "Position",
269
290
  PositionOP = "PositionOP",
291
+ QuickVariant = "QuickVariant",
292
+ QuickVariantSelectionOP = "QuickVariantSelectionOP",
270
293
  QuickVariantSelectionV4OP = "QuickVariantSelectionV4OP",
294
+ RelatedFacetKeys = "RelatedFacetKeys",
271
295
  Sections = "Sections",
272
296
  Table = "Table",
273
297
  TableSPV = "TableSPV",
@@ -295,9 +319,10 @@ export declare enum SchemaTag {
295
319
  isViewNode = "isViewNode",
296
320
  annotationPath = "annotationPath",
297
321
  annotationType = "annotationType",
322
+ artifactType = "artifactType",
323
+ controlType = "controlType",
298
324
  dataType = "dataType",
299
325
  propertyIndex = "propertyIndex",
300
- artifactType = "artifactType",
301
326
  key = "key"
302
327
  }
303
328
  export declare const METADATAPATH = "webapp/localService/metadata.xml";
@@ -34,6 +34,7 @@ exports.ActionTitlePrefix = 'Action ID: ';
34
34
  var SectionType;
35
35
  (function (SectionType) {
36
36
  SectionType["Section"] = "Section";
37
+ SectionType["SubSection"] = "SubSection";
37
38
  SectionType["HeaderSection"] = "HeaderSection";
38
39
  })(SectionType = exports.SectionType || (exports.SectionType = {}));
39
40
  var ArtifactType;
@@ -105,28 +106,46 @@ var DefinitionName;
105
106
  DefinitionName["CustomColumn"] = "TableCustomColumn";
106
107
  DefinitionName["CustomColumnOP"] = "TableCustomColumnOP";
107
108
  DefinitionName["CustomColumns"] = "TableCustomColumns";
109
+ DefinitionName["CustomSections"] = "CustomSections";
110
+ DefinitionName["FieldPath"] = "FieldPath";
111
+ DefinitionName["Field"] = "Field";
108
112
  DefinitionName["Fields"] = "Fields";
113
+ DefinitionName["Fields4Dialog"] = "Fields4Dialog";
114
+ DefinitionName["Footer"] = "Footer";
109
115
  DefinitionName["FooterActions"] = "FooterActions";
110
116
  DefinitionName["Form"] = "Form";
111
117
  DefinitionName["FormAction"] = "FormAction";
112
118
  DefinitionName["GenericActions"] = "GenericActions";
113
119
  DefinitionName["GenericColumnsOP"] = "GenericColumnsOP";
120
+ DefinitionName["GenericFooter"] = "GenericFooter";
114
121
  DefinitionName["GenericSections"] = "GenericSections";
115
122
  DefinitionName["HeaderActions"] = "HeaderActions";
123
+ DefinitionName["HeaderSections"] = "HeaderSections";
116
124
  DefinitionName["LineItems"] = "LineItems";
117
125
  DefinitionName["LineItemsOfView"] = "LineItemsOfView";
118
126
  DefinitionName["ListReportFilterBar"] = "ListReportFilterBar";
119
127
  DefinitionName["LRTableView"] = "LRTableView";
120
128
  DefinitionName["LRChartView"] = "LRChartView";
121
129
  DefinitionName["MultiTableModeV4"] = "MultiTableModeV4";
130
+ DefinitionName["ObjectPageChart"] = "ObjectPageChart";
131
+ DefinitionName["ObjectPageCustomSectionFragment"] = "ObjectPageCustomSectionFragment";
122
132
  DefinitionName["ObjectPageFooter"] = "ObjectPageFooter";
123
133
  DefinitionName["ObjectPageFooterAction"] = "ObjectPageFooterAction";
124
134
  DefinitionName["ObjectPageFooterActions"] = "ObjectPageFooterActions";
125
135
  DefinitionName["ObjectPageHeader"] = "ObjectPageHeader";
136
+ DefinitionName["ObjectPageHeaderSectionForm"] = "ObjectPageHeaderSectionForm";
137
+ DefinitionName["ObjectPageHeaderSectionChart"] = "ObjectPageHeaderSectionChart";
138
+ DefinitionName["ObjectPageHeaderSectionDataPoint"] = "ObjectPageHeaderSectionDataPoint";
139
+ DefinitionName["ObjectPageHeaderSectionContact"] = "ObjectPageHeaderSectionContact";
140
+ DefinitionName["ObjectPageHeaderSectionAddress"] = "ObjectPageHeaderSectionAddress";
141
+ DefinitionName["ObjectPageLayout"] = "ObjectPageLayout";
142
+ DefinitionName["ObjectPagePresentationVariant"] = "ObjectPagePresentationVariant";
126
143
  DefinitionName["ObjectPageSectionAddress"] = "ObjectPageSectionAddress";
144
+ DefinitionName["ObjectPageSectionChart"] = "ObjectPageSectionChart";
127
145
  DefinitionName["ObjectPageSectionContact"] = "ObjectPageSectionContact";
128
146
  DefinitionName["ObjectPageSectionDataPoint"] = "ObjectPageSectionDataPoint";
129
147
  DefinitionName["ObjectPageSectionForm"] = "ObjectPageSectionForm";
148
+ DefinitionName["ObjectPageSectionPresentationVariant"] = "ObjectPageSectionPresentationVariant";
130
149
  DefinitionName["ObjectPageSectionTableV4"] = "ObjectPageSectionTableV4";
131
150
  DefinitionName["ObjectPageSubSections"] = "ObjectPageSubSections";
132
151
  DefinitionName["ObjectPageTable"] = "ObjectPageTable";
@@ -136,7 +155,10 @@ var DefinitionName;
136
155
  DefinitionName["ObjectPageToolBarActions"] = "ObjectPageToolBarActions";
137
156
  DefinitionName["Position"] = "Position";
138
157
  DefinitionName["PositionOP"] = "PositionOP";
158
+ DefinitionName["QuickVariant"] = "QuickVariant";
159
+ DefinitionName["QuickVariantSelectionOP"] = "QuickVariantSelectionOP";
139
160
  DefinitionName["QuickVariantSelectionV4OP"] = "QuickVariantSelectionV4OP";
161
+ DefinitionName["RelatedFacetKeys"] = "RelatedFacetKeys";
140
162
  DefinitionName["Sections"] = "Sections";
141
163
  DefinitionName["Table"] = "Table";
142
164
  DefinitionName["TableSPV"] = "TableSPV";
@@ -166,9 +188,10 @@ var SchemaTag;
166
188
  SchemaTag["isViewNode"] = "isViewNode";
167
189
  SchemaTag["annotationPath"] = "annotationPath";
168
190
  SchemaTag["annotationType"] = "annotationType";
191
+ SchemaTag["artifactType"] = "artifactType";
192
+ SchemaTag["controlType"] = "controlType";
169
193
  SchemaTag["dataType"] = "dataType";
170
194
  SchemaTag["propertyIndex"] = "propertyIndex";
171
- SchemaTag["artifactType"] = "artifactType";
172
195
  SchemaTag["key"] = "key";
173
196
  })(SchemaTag = exports.SchemaTag || (exports.SchemaTag = {}));
174
197
  exports.METADATAPATH = 'webapp/localService/metadata.xml';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sync/common/types.ts"],"names":[],"mappings":";;AAeA,IAAY,eAGX;AAHD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AAS;IACjB,8BAAiB,CAAA;IACjB,sCAAyB,CAAA;IACzB,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,0CAA6B,CAAA;IAC7B,wCAA2B,CAAA;IAC3B,kCAAqB,CAAA;IACrB,4CAA+B,CAAA;IAC/B,wBAAW,CAAA;AACf,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB;AAEY,QAAA,YAAY,GAAG,kCAAkC,CAAC;AAClD,QAAA,YAAY,GAAG,sBAAsB,CAAC;AACtC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,YAAY,GAAG,4BAA4B,CAAC;AAC5C,QAAA,eAAe,GAAG,6BAA6B,CAAC;AAChD,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,gBAAgB,GAAG,8BAA8B,CAAC;AAClD,QAAA,gBAAgB,GAAG,YAAY,CAAC"}
@@ -1,10 +1,13 @@
1
1
  import type { FacetConfigs, FileData, FacetConfig, FacetSection, SchemaFilePath, anyFacetType } from './types';
2
- import type { ConverterOutput, DataFieldAbstractTypes, EntityType, PropertyAnnotations, PropertyPath } from '@sap-ux/vocabularies-types';
3
2
  import type { Manifest } from '../../specification/common';
4
3
  import { FioriElementsVersion, PageType } from '../../specification/common';
5
- import { SchemaType } from '../../specification/schemaAccess';
6
- import type { ExtensionLogger } from '../../apiTypes';
7
4
  import type { MetadataInstanceInterface } from './decoration/factory';
5
+ import type { DataFieldAbstractTypes } from '@sap-ux/vocabularies-types/vocabularies/UI';
6
+ import type { ConvertedMetadata, EntityType, PropertyPath } from '@sap-ux/vocabularies-types';
7
+ import type { ExtensionLogger } from '../../apiTypes';
8
+ import { SchemaType } from '../../specification/schemaAccess';
9
+ import type { PropertyAnnotations } from '@sap-ux/vocabularies-types/vocabularies/Edm_Types';
10
+ import type { Definition } from 'typescript-json-schema';
8
11
  export declare enum TemplateType {
9
12
  ListReportObjectPageV2 = "ListReportObjectPageV2",
10
13
  ListReportObjectPageV4 = "ListReportObjectPageV4",
@@ -25,7 +28,7 @@ export declare const createAnnotationPath: (entityTypeName: string, term: string
25
28
  * @param annotationFiles - The list of all annotation files, in JSON format
26
29
  * @returns the complete service information
27
30
  */
28
- export declare function parseAndMergeAndConvert(annotationFiles: FileData[], logger: ExtensionLogger): ConverterOutput;
31
+ export declare function parseAndMergeAndConvert(annotationFiles: FileData[], logger: ExtensionLogger): ConvertedMetadata;
29
32
  export declare const getAnnotationPropertyValue: (annotationProperty: any) => string;
30
33
  /**
31
34
  * Checks for Common.Label and overwrites the label from it if present
@@ -51,7 +54,7 @@ export declare function getLabelForDataField(field: DataFieldAbstractTypes, enti
51
54
  /**
52
55
  * Determines the description of a data field, e.g. for the column header
53
56
  * @param dataFieldAbstract - the given record of the line item annotation
54
- * @param entityType - the entity type as part of the AVT ConverterOutput
57
+ * @param entityType - the entity type as part of the AVT ConvertedMetadata
55
58
  */
56
59
  export declare function getDatafieldDescription(dataFieldAbstract: DataFieldAbstractTypes, entityType: EntityType): string;
57
60
  /**
@@ -62,20 +65,20 @@ export declare function getPageTypeV2(name: string): PageType | undefined;
62
65
  /**
63
66
  * Finds the alias for a given namespace in the references' section of the converted service metadata
64
67
  * @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1'
65
- * @param {ConverterOutput} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
68
+ * @param {ConvertedMetadata} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
66
69
  * @returns alias for the given namespace
67
70
  */
68
- export declare function findAlias(namespace: string, oDataServiceAVT: ConverterOutput): string;
71
+ export declare function findAlias(namespace: string, oDataServiceAVT: ConvertedMetadata): string;
69
72
  /**
70
73
  * Resolve page section(get key and label->description).
71
74
  * @param facetDefinition - the actual annotation record
72
75
  * @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
73
76
  * @param {FioriElementsVersion} oDataVersion - OData version
74
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
77
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
75
78
  * @param {ExtensionLogger} logger - Logger class for logging messages
76
79
  * @returns {FacetSection} - object comprising the relevant facet information
77
80
  */
78
- export declare function getSectionFacet(facetDefinition: anyFacetType, sourceEntityType: EntityType, oDataServiceAVT: ConverterOutput, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, keyForRelatedFacetKeys?: boolean): FacetSection | undefined;
81
+ export declare function getSectionFacet(facetDefinition: anyFacetType, sourceEntityType: EntityType, oDataServiceAVT: ConvertedMetadata, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, keyForRelatedFacetKeys?: boolean): FacetSection | undefined;
79
82
  /**
80
83
  * Finds the alias for a given namespace in the references' section of the converted service metadata.
81
84
  * An empty object is created if the path element does not exist yet.
@@ -92,19 +95,19 @@ export declare function getSchemaKeyOfLineItemRecord(lineItemRecord: DataFieldAb
92
95
  /**
93
96
  * Retrieve header facet configurations that can be used to generate ObjectPage schemas
94
97
  * @param {QualifiedName} entityTypeName - the name of the actual entity type
95
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
98
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
96
99
  * @param {FioriElementsVersion} oDataVersion - OData version
97
100
  * @param {ExtensionLogger} logger - Logger class for logging messages
98
101
  */
99
- export declare function getObjectPageHeaderFacets(entityType: EntityType, oDataServiceAVT: ConverterOutput, oDataVersion?: FioriElementsVersion, logger?: ExtensionLogger): FacetConfigs | undefined;
102
+ export declare function getObjectPageHeaderFacets(entityType: EntityType, oDataServiceAVT: ConvertedMetadata, oDataVersion?: FioriElementsVersion, logger?: ExtensionLogger): FacetConfigs | undefined;
100
103
  /**
101
104
  * Retrieve facet configurations that can be used to generate ObjectPage schemas
102
105
  * @param {QualifiedName} entityTypeName - the name of the actual entity type
103
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
106
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
104
107
  * @param {FioriElementsVersion} oDataVersion - OData version
105
108
  * @param {ExtensionLogger} logger - Logger class for logging messages
106
109
  */
107
- export declare function getObjectPageFacets(entityType: EntityType, oDataServiceAVT: ConverterOutput, oDataVersion?: FioriElementsVersion, logger?: ExtensionLogger): FacetConfigs | undefined;
110
+ export declare function getObjectPageFacets(entityType: EntityType, oDataServiceAVT: ConvertedMetadata, oDataVersion?: FioriElementsVersion, logger?: ExtensionLogger): FacetConfigs | undefined;
108
111
  /**
109
112
  * Returns the version of Fiori elements (v2/v4) from a given manifest
110
113
  * @param manifest - the manifest.json file
@@ -131,23 +134,30 @@ export declare function getTemplateTypeFromManifest(manifest: Manifest, fioriEle
131
134
  * @param section - section in the app schema
132
135
  * @param facetKey - key of the facet
133
136
  */
134
- export declare function addSectionTitleAndDescription(facet: FacetConfig, section: object, facetKey: string): void;
137
+ export declare function addSectionTitleAndDescription(facet: FacetConfig, section: Definition, facetKey: string): void;
138
+ /**
139
+ * Adds target title or description to a section or header section in an app schema
140
+ * @param facet - intermediate facet structure comprising annotation information
141
+ * @param section - section in the app schema
142
+ * @param facetKey - key of the facet
143
+ */
144
+ export declare function addTargetTitleAndSectionDescription(facet: FacetConfig, section: Definition, facetKey: string): void;
135
145
  /**
136
146
  * Creates a default object for a new section or subsection, and adds the ID as title if present.
137
147
  * @param facet Facet configuration, to be analyzed
138
148
  * @returns the new section object
139
149
  */
140
- export declare function createSectionWithoutProperties(facet: FacetConfig, facetKey: string): object;
150
+ export declare function createDefaultSection(appSchema: Definition, facet: FacetConfig, facetKey: string): Definition;
141
151
  /**
142
152
  * Retrieve page section data(so far id/key and label/description).
143
153
  * @param {EntityType} entityType The actual entityType
144
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
154
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
145
155
  * @param {ExtensionLogger} logger - Logger class for logging messages
146
156
  * @param {FioriElementsVersion} oDataVersion - OData version
147
157
  * @param {boolean} [checkUnresolvableFacets=false] - Check and avoid facets and sections without ID and Target.
148
158
  * @returns {FacetSection[]} - Array of facets or sections
149
159
  */
150
- export declare function getObjectPageFacetSection(entityType: EntityType, oDataServiceAVT: ConverterOutput, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, checkUnresolvableFacets?: boolean): FacetSection[];
160
+ export declare function getObjectPageFacetSection(entityType: EntityType, oDataServiceAVT: ConvertedMetadata, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, checkUnresolvableFacets?: boolean): FacetSection[];
151
161
  /**
152
162
  * Cleans empty sub-structures from the export result for manifest
153
163
  * @param manifest - manifest.json part of the export result
@@ -3,13 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const common_1 = require("../../specification/common");
7
+ const i18next_1 = __importDefault(require("i18next"));
8
+ const v2_1 = require("../../specification/v2");
6
9
  const types_1 = require("./types");
7
10
  const annotation_converter_1 = require("@sap-ux/annotation-converter");
8
11
  const edmx_parser_1 = require("@sap-ux/edmx-parser");
9
- const common_1 = require("../../specification/common");
10
12
  const schemaAccess_1 = require("../../specification/schemaAccess");
11
- const i18next_1 = __importDefault(require("i18next"));
12
- const v2_1 = require("../../specification/v2");
13
13
  const extensionLogger_1 = require("../../extensionLogger");
14
14
  const deepmerge_1 = __importDefault(require("deepmerge"));
15
15
  var TemplateType;
@@ -45,11 +45,11 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
45
45
  try {
46
46
  if (annotationFiles) {
47
47
  annotationFiles.forEach(function (annotationData) {
48
- parseResult.push(edmx_parser_1.parseEDMX(annotationData.fileContent, annotationData.dataSourceUri));
48
+ parseResult.push(edmx_parser_1.parse(annotationData.fileContent, annotationData.dataSourceUri));
49
49
  });
50
50
  }
51
51
  if (parseResult.length > 0) {
52
- converterOutput = annotation_converter_1.convertTypes(edmx_parser_1.merge(parseResult));
52
+ converterOutput = annotation_converter_1.convert(edmx_parser_1.merge(...parseResult));
53
53
  }
54
54
  if (logger && (converterOutput === null || converterOutput === void 0 ? void 0 : converterOutput.diagnostics)) {
55
55
  for (const converterMessage of converterOutput.diagnostics) {
@@ -59,7 +59,6 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
59
59
  });
60
60
  }
61
61
  }
62
- return converterOutput;
63
62
  }
64
63
  catch (error) {
65
64
  extensionLogger_1.log(logger, {
@@ -67,6 +66,7 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
67
66
  message: i18next_1.default.t('ANNOERR')
68
67
  }, ...error);
69
68
  }
69
+ return converterOutput;
70
70
  }
71
71
  exports.parseAndMergeAndConvert = parseAndMergeAndConvert;
72
72
  exports.getAnnotationPropertyValue = (annotationProperty) => (annotationProperty === null || annotationProperty === void 0 ? void 0 : annotationProperty.value) || (annotationProperty === null || annotationProperty === void 0 ? void 0 : annotationProperty.path);
@@ -144,7 +144,7 @@ exports.getLabelForDataField = getLabelForDataField;
144
144
  /**
145
145
  * Function to resolve the dataField label
146
146
  * @param dataFieldLabel - Given dataField label; might be of type string, or an object in case of a path reference
147
- * @param entityType - the entity type as part of the AVT ConverterOutput
147
+ * @param entityType - the entity type as part of the AVT ConvertedMetadata
148
148
  * @returns undefined or the right string value
149
149
  */
150
150
  function getLabel(dataFieldLabel, entityType) {
@@ -178,7 +178,7 @@ function getTitleForDataField(dataField, entityType, dataFieldLabel) {
178
178
  /**
179
179
  * Determines the description of a data field, e.g. for the column header
180
180
  * @param dataFieldAbstract - the given record of the line item annotation
181
- * @param entityType - the entity type as part of the AVT ConverterOutput
181
+ * @param entityType - the entity type as part of the AVT ConvertedMetadata
182
182
  */
183
183
  function getDatafieldDescription(dataFieldAbstract, entityType) {
184
184
  let title = '', propertyCommonLabel, dataField;
@@ -238,12 +238,13 @@ function getPageTypeV2(name) {
238
238
  }
239
239
  exports.getPageTypeV2 = getPageTypeV2;
240
240
  function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = false) {
241
- return `${!keyForRelatedFacetKeys ? '@' : ''}${targetAnnotation.qualifier ? targetAnnotation.term + '#' + targetAnnotation.qualifier : targetAnnotation.term}`;
241
+ const termWithQualifier = `${targetAnnotation.term}#${targetAnnotation.qualifier}`;
242
+ return `${!keyForRelatedFacetKeys ? '@' : ''}${targetAnnotation.qualifier ? termWithQualifier : targetAnnotation.term}`;
242
243
  }
243
244
  /**
244
245
  * Finds the alias for a given namespace in the references' section of the converted service metadata
245
246
  * @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1'
246
- * @param {ConverterOutput} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
247
+ * @param {ConvertedMetadata} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
247
248
  * @returns alias for the given namespace
248
249
  */
249
250
  function findAlias(namespace, oDataServiceAVT) {
@@ -268,7 +269,7 @@ exports.findAlias = findAlias;
268
269
  * Determines the target annotation
269
270
  * @param navigationParts - parts of the target annotation path
270
271
  * @param entityType - entity type
271
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
272
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
272
273
  * @returns the target annotation
273
274
  */
274
275
  function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT) {
@@ -285,8 +286,7 @@ function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT)
285
286
  * @param navigationParts - parts of the target annotation path
286
287
  */
287
288
  function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
288
- const uiParts = (navigationParts[1] || navigationParts[0]).split('#');
289
- const uiClass = uiParts[0];
289
+ const uiClass = navigationParts[navigationParts.length - 1].split('#')[0];
290
290
  if (uiClass.includes('.LineItem')) {
291
291
  const pathParts = key.split('::');
292
292
  pathParts[pathParts.length - 1] = `${!keyForRelatedFacetKeys ? '@' : ''}${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`;
@@ -301,9 +301,9 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
301
301
  var _a;
302
302
  let stopProcessing = false;
303
303
  const navigationParts = propertyValue.split('/');
304
- const navigation = navigationParts.length > 1 ? navigationParts[0] : '';
304
+ const navigation = navigationParts.length > 1;
305
305
  if (navigation) {
306
- entityType = (_a = entityType.resolvePath(navigation)) === null || _a === void 0 ? void 0 : _a.targetType;
306
+ entityType = (_a = entityType.resolvePath(propertyValue.substring(0, propertyValue.lastIndexOf('/')))) === null || _a === void 0 ? void 0 : _a.targetType;
307
307
  }
308
308
  key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
309
309
  const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
@@ -317,7 +317,9 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
317
317
  }
318
318
  if (navigation) {
319
319
  const navSeparator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '/';
320
- key = `${navigation}${navSeparator}${key}`;
320
+ navigationParts.pop();
321
+ const navigationIDs = [...navigationParts].join(navSeparator);
322
+ key = `${navigationIDs}${navSeparator}${key}`;
321
323
  }
322
324
  return { key, entityType, stopProcessing };
323
325
  }
@@ -326,7 +328,7 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
326
328
  * @param facetDefinition - the actual annotation record
327
329
  * @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
328
330
  * @param {FioriElementsVersion} oDataVersion - OData version
329
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
331
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
330
332
  * @param {ExtensionLogger} logger - Logger class for logging messages
331
333
  * @returns {FacetSection} - object comprising the relevant facet information
332
334
  */
@@ -429,13 +431,7 @@ function getSchemaKeyOfLineItemRecord(lineItemRecord) {
429
431
  break;
430
432
  case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* DataFieldWithIntentBasedNavigation */:
431
433
  value = exports.getAnnotationPropertyValue(lineItemRecord.Value);
432
- schemaKey =
433
- 'DataFieldWithIntentBasedNavigation:::sProperty::' +
434
- value +
435
- ':::sSemanticObject::' +
436
- lineItemRecord.SemanticObject +
437
- ':::sAction::' +
438
- lineItemRecord.Action;
434
+ schemaKey = `DataFieldWithIntentBasedNavigation:::sProperty::${value}:::sSemanticObject::${lineItemRecord.SemanticObject}:::sAction::${lineItemRecord.Action}`;
439
435
  break;
440
436
  case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */:
441
437
  if (lineItemRecord.Inline) {
@@ -466,7 +462,7 @@ exports.getSchemaKeyOfLineItemRecord = getSchemaKeyOfLineItemRecord;
466
462
  * @param {AnnotationTerm} annotationRecord - the actual annotation record
467
463
  * @param {FacetConfigs} facets - list of facets in config format, to be updated
468
464
  * @param {EntityType} entityType - the entity type
469
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
465
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
470
466
  * @param {FioriElementsVersion} oDataVersion - OData version
471
467
  * @param {ExtensionLogger} logger - Logger class for logging messages
472
468
  */
@@ -544,7 +540,7 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
544
540
  /**
545
541
  * Adds the information from facets to the config
546
542
  * @param {AnnotationTerm} annotationRecord - the actual annotation record
547
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
543
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
548
544
  * @param {string} serviceName - name of the service of the app
549
545
  * @param {string} entityName - the entity (type) name
550
546
  * @param {FacetConfigs} facets - list of facets in config format, to be updated
@@ -580,7 +576,7 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
580
576
  /**
581
577
  * Retrieve header facet configurations that can be used to generate ObjectPage schemas
582
578
  * @param {QualifiedName} entityTypeName - the name of the actual entity type
583
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
579
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
584
580
  * @param {FioriElementsVersion} oDataVersion - OData version
585
581
  * @param {ExtensionLogger} logger - Logger class for logging messages
586
582
  */
@@ -605,7 +601,7 @@ exports.getObjectPageHeaderFacets = getObjectPageHeaderFacets;
605
601
  /**
606
602
  * Retrieve facet configurations that can be used to generate ObjectPage schemas
607
603
  * @param {QualifiedName} entityTypeName - the name of the actual entity type
608
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
604
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
609
605
  * @param {FioriElementsVersion} oDataVersion - OData version
610
606
  * @param {ExtensionLogger} logger - Logger class for logging messages
611
607
  */
@@ -714,47 +710,74 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
714
710
  */
715
711
  function addSectionTitleAndDescription(facet, section, facetKey) {
716
712
  if (facet === null || facet === void 0 ? void 0 : facet.ID) {
717
- section['title'] = types_1.FacetTitlePrefix + facet.ID;
713
+ section.title = types_1.FacetTitlePrefix + facet.ID;
718
714
  }
719
715
  else {
720
- section['title'] = facetKey.replace(/@com.sap/g, 'com.sap');
716
+ section.title = facetKey.replace(/@com.sap/g, 'com.sap');
721
717
  }
722
718
  // Description
723
719
  if (facet === null || facet === void 0 ? void 0 : facet.Label) {
724
- section['description'] = facet.Label;
720
+ section.description = facet.Label;
725
721
  }
726
722
  else if (facet === null || facet === void 0 ? void 0 : facet.ID) {
727
- section['description'] = facet.ID;
723
+ section.description = facet.ID;
728
724
  }
729
725
  else {
730
- section['description'] = facetKey.substr(facetKey.lastIndexOf('.') + 1);
726
+ section.description = facetKey.substr(facetKey.lastIndexOf('.') + 1);
731
727
  }
732
728
  }
733
729
  exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
730
+ /**
731
+ * Adds target title or description to a section or header section in an app schema
732
+ * @param facet - intermediate facet structure comprising annotation information
733
+ * @param section - section in the app schema
734
+ * @param facetKey - key of the facet
735
+ */
736
+ function addTargetTitleAndSectionDescription(facet, section, facetKey) {
737
+ var _a;
738
+ addSectionTitleAndDescription(facet, section, facetKey);
739
+ if (facet === null || facet === void 0 ? void 0 : facet.Label) {
740
+ section.description = facet === null || facet === void 0 ? void 0 : facet.Label;
741
+ }
742
+ else if (facet === null || facet === void 0 ? void 0 : facet['Title']) {
743
+ section.description = facet['Title'];
744
+ }
745
+ else if ((_a = facet === null || facet === void 0 ? void 0 : facet.target) === null || _a === void 0 ? void 0 : _a['Title']) {
746
+ section.description = facet.target['Title'];
747
+ }
748
+ }
749
+ exports.addTargetTitleAndSectionDescription = addTargetTitleAndSectionDescription;
734
750
  /**
735
751
  * Creates a default object for a new section or subsection, and adds the ID as title if present.
736
752
  * @param facet Facet configuration, to be analyzed
737
753
  * @returns the new section object
738
754
  */
739
- function createSectionWithoutProperties(facet, facetKey) {
755
+ function createDefaultSection(appSchema, facet, facetKey) {
740
756
  if (!facet) {
741
757
  return undefined;
742
758
  }
743
- const section = {
744
- type: 'object',
745
- properties: {},
746
- additionalProperties: false,
747
- annotationPath: facet.annotationPath,
748
- isViewNode: true
749
- };
759
+ let section;
760
+ if (appSchema.definitions.ObjectPageSection) {
761
+ //base type in V2, with properties
762
+ section = JSON.parse(JSON.stringify(appSchema.definitions.ObjectPageSection));
763
+ }
764
+ else {
765
+ section = {
766
+ type: 'object',
767
+ properties: {},
768
+ additionalProperties: false
769
+ };
770
+ section[types_1.SchemaTag.isViewNode] = true;
771
+ }
772
+ section[types_1.SchemaTag.annotationPath] = facet.annotationPath;
750
773
  addSectionTitleAndDescription(facet, section, facetKey);
751
774
  return section;
752
775
  }
753
- exports.createSectionWithoutProperties = createSectionWithoutProperties;
776
+ exports.createDefaultSection = createDefaultSection;
754
777
  /**
755
778
  * Retrieve page section data(so far id/key and label/description).
756
779
  * @param {EntityType} entityType The actual entityType
757
- * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
780
+ * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
758
781
  * @param {ExtensionLogger} logger - Logger class for logging messages
759
782
  * @param {FioriElementsVersion} oDataVersion - OData version
760
783
  * @param {boolean} [checkUnresolvableFacets=false] - Check and avoid facets and sections without ID and Target.