@sap/ux-specification 1.120.17 → 1.120.19

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 (68) hide show
  1. package/CHANGELOG.md +50 -25
  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-ObjectPage.html +2 -2
  6. package/dist/documentation/v2/v2-OverviewPage.html +2 -2
  7. package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
  8. package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
  9. package/dist/documentation/v4/v4-FreestylePage.html +2 -2
  10. package/dist/documentation/v4/v4-ListReport.html +2 -2
  11. package/dist/documentation/v4/v4-ObjectPage.html +2 -2
  12. package/dist/index-min.js +100 -100
  13. package/dist/index-min.js.map +3 -3
  14. package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -3
  15. package/dist/schemas/v2/ApplicationV2.json +1 -5
  16. package/dist/schemas/v2/ListReportConfig.json +4 -4
  17. package/dist/schemas/v2/ObjectPageConfig.json +4 -4
  18. package/dist/schemas/v4/ApplicationV4.json +1 -5
  19. package/dist/specification/package.json +10 -10
  20. package/dist/specification/scripts/to-json-schema.js +4 -1
  21. package/dist/specification/scripts/to-json-schema.js.map +1 -1
  22. package/dist/specification/src/api.js +1 -1
  23. package/dist/specification/src/specification/schemaAccess.d.ts +1 -1
  24. package/dist/specification/src/specification/schemaAccess.d.ts.map +1 -1
  25. package/dist/specification/src/specification/schemaAccess.js +6 -5
  26. package/dist/specification/src/specification/schemaAccess.js.map +1 -1
  27. package/dist/specification/src/sync/common/appProvider.d.ts +2 -3
  28. package/dist/specification/src/sync/common/appProvider.d.ts.map +1 -1
  29. package/dist/specification/src/sync/common/appProvider.js +15 -9
  30. package/dist/specification/src/sync/common/appProvider.js.map +1 -1
  31. package/dist/specification/src/sync/common/decoration/control.d.ts.map +1 -1
  32. package/dist/specification/src/sync/common/decoration/control.js.map +1 -1
  33. package/dist/specification/src/sync/common/dist_tag.json +10 -5
  34. package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
  35. package/dist/specification/src/sync/common/importProject.js +14 -5
  36. package/dist/specification/src/sync/common/importProject.js.map +1 -1
  37. package/dist/specification/src/sync/common/utils.d.ts +21 -2
  38. package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
  39. package/dist/specification/src/sync/common/utils.js +149 -108
  40. package/dist/specification/src/sync/common/utils.js.map +1 -1
  41. package/dist/specification/src/sync/v2/import/app/appProvider.d.ts +1 -0
  42. package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
  43. package/dist/specification/src/sync/v2/import/app/appProvider.js +31 -34
  44. package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
  45. package/dist/specification/src/sync/v2/import/app/ovpProvider.d.ts.map +1 -1
  46. package/dist/specification/src/sync/v2/import/app/ovpProvider.js +1 -1
  47. package/dist/specification/src/sync/v2/import/app/ovpProvider.js.map +1 -1
  48. package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
  49. package/dist/specification/src/sync/v4/export/export.js +1 -2
  50. package/dist/specification/src/sync/v4/export/export.js.map +1 -1
  51. package/dist/specification/src/sync/v4/export/flexibleColumnLayout.d.ts.map +1 -1
  52. package/dist/specification/src/sync/v4/export/flexibleColumnLayout.js +3 -13
  53. package/dist/specification/src/sync/v4/export/flexibleColumnLayout.js.map +1 -1
  54. package/dist/specification/src/sync/v4/export/manifest.js +2 -2
  55. package/dist/specification/src/sync/v4/export/manifest.js.map +1 -1
  56. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  57. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  58. package/dist/specification/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
  59. package/dist/specification/src/sync/v4/import/app/appProvider.js +3 -3
  60. package/dist/specification/src/sync/v4/import/app/appProvider.js.map +1 -1
  61. package/dist/specification/src/sync/v4/utils/StableIdHelper.js +4 -4
  62. package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
  63. package/dist/types/src/apiTypes.d.ts +3 -1
  64. package/dist/types/src/apiTypes.d.ts.map +1 -1
  65. package/dist/types/src/apiTypes.js.map +1 -1
  66. package/dist/types/src/common/page.d.ts +2 -2
  67. package/dist/types/src/common/page.d.ts.map +1 -1
  68. package/package.json +10 -10
@@ -3,14 +3,23 @@ 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
- exports.replaceNamespaces = exports.removeNamespaces = exports.getJSONPropertyByPath = exports.updatePropertyIndices = exports.isFeatureSupported = exports.getErrorMessage = exports.getDefinitionsRef = exports.getDefinitionKey = exports.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.findMatchingKeysByAdditionalProperties = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV4Template = exports.determineV4PageTemplateType = exports.determineV2Template = exports.getVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getAnnotationPathUsingFullyQualifiedName = exports.getSchemaKeyOfLineItemRecord = exports.setManifestSectionByPathV4 = exports.getManifestSectionByPathV4 = exports.prepareValueForPath = exports.getSectionFacet = exports.getAnnotationFromMetaPath = exports.findAlias = exports.getPageTypeV4 = exports.getPageTypeV2 = exports.prepareRef = exports.getDataFieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.arrayIncludes = exports.DEFINITION_LINK_PREFIX = void 0;
6
+ exports.removeNamespaces = exports.getJSONPropertyByPath = exports.updatePropertyIndices = exports.isFeatureSupported = exports.getErrorMessage = exports.getDefinitionsRef = exports.getDefinitionKey = exports.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.findMatchingKeysByAdditionalProperties = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV4Template = exports.determineV4PageTemplateType = exports.determineV2Template = exports.getODataVersionFromManifest = exports.getMainService = exports.getFEVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getAnnotationPathUsingFullyQualifiedName = exports.getSchemaKeyOfLineItemRecord = exports.setManifestSectionByPathV4 = exports.getManifestSectionByPathV4 = exports.prepareValueForPath = exports.getSectionFacet = exports.getAnnotationFromMetaPath = exports.findAlias = exports.getPageTypeV4 = exports.getPageTypeV2 = exports.prepareRef = exports.getDataFieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.arrayIncludes = exports.V4_LIBS = exports.V4_TEMPLATES = exports.DEFINITION_LINK_PREFIX = void 0;
7
+ exports.replaceNamespaces = void 0;
7
8
  const ux_specification_types_1 = require("@sap/ux-specification-types");
9
+ const ux_specification_types_2 = require("@sap/ux-specification-types");
8
10
  const i18next_1 = __importDefault(require("i18next"));
9
11
  const deepmerge_1 = __importDefault(require("deepmerge"));
10
12
  const annotation_converter_1 = require("@sap-ux/annotation-converter");
11
13
  const edmx_parser_1 = require("@sap-ux/edmx-parser");
12
14
  const extensionLogger_1 = require("../../extensionLogger");
13
15
  exports.DEFINITION_LINK_PREFIX = '#/definitions/';
16
+ exports.V4_TEMPLATES = [
17
+ ux_specification_types_2.v4.FE_TEMPLATE_V4_LIST_REPORT,
18
+ ux_specification_types_2.v4.FE_TEMPLATE_V4_ALP,
19
+ ux_specification_types_2.v4.FE_TEMPLATE_V4_OBJECT_PAGE,
20
+ ux_specification_types_2.v4.FE_TEMPLATE_V4_CUSTOM_PAGE
21
+ ];
22
+ exports.V4_LIBS = ['sap.fe.core', 'sap.fe.templates'];
14
23
  const arrayIncludes = (arr, target) => target.every((v) => arr.includes(v));
15
24
  exports.arrayIncludes = arrayIncludes;
16
25
  /**
@@ -55,7 +64,8 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
55
64
  });
56
65
  }
57
66
  if (parseResult.length > 0) {
58
- converterOutput = (0, annotation_converter_1.convert)((0, edmx_parser_1.merge)(...parseResult));
67
+ const mergedParserResult = (0, edmx_parser_1.merge)(...parseResult);
68
+ converterOutput = (0, annotation_converter_1.convert)(mergedParserResult);
59
69
  }
60
70
  return converterOutput;
61
71
  }
@@ -245,7 +255,7 @@ exports.prepareRef = prepareRef;
245
255
  */
246
256
  function getPageTypeV2(name) {
247
257
  if (name) {
248
- const templatePart = `${ux_specification_types_1.v2.FE_TEMPLATE_V2}.`;
258
+ const templatePart = `${ux_specification_types_2.v2.FE_TEMPLATE_V2}.`;
249
259
  return name.split(templatePart)[1];
250
260
  }
251
261
  }
@@ -255,16 +265,16 @@ exports.getPageTypeV2 = getPageTypeV2;
255
265
  * @param name - page component name
256
266
  */
257
267
  function getPageTypeV4(v4App) {
258
- if (v4App.name && v4App.name !== ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
259
- const templatePart = `${ux_specification_types_1.v4.FE_TEMPLATE_V4}.`;
268
+ if (v4App.name && v4App.name !== ux_specification_types_2.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
269
+ const templatePart = `${ux_specification_types_2.v4.FE_TEMPLATE_V4}.`;
260
270
  return v4App.name.split(templatePart)[1];
261
271
  }
262
- else if (v4App?.name === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
263
- return ux_specification_types_1.PageTypeV4.FPMCustomPage;
272
+ else if (v4App?.name === ux_specification_types_2.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
273
+ return ux_specification_types_2.PageTypeV4.FPMCustomPage;
264
274
  }
265
275
  else if (v4App.viewId ||
266
276
  v4App.viewName) {
267
- return ux_specification_types_1.PageTypeV4.CustomPage;
277
+ return ux_specification_types_2.PageTypeV4.CustomPage;
268
278
  }
269
279
  }
270
280
  exports.getPageTypeV4 = getPageTypeV4;
@@ -335,11 +345,11 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
335
345
  key = pathParts.join('::');
336
346
  }
337
347
  else {
338
- key = uiClass.replace('@UI', `${!keyForRelatedFacetKeys ? '@' : ''}${ux_specification_types_1.UIVOCABULARY}`);
348
+ key = uiClass.replace('@UI', `${!keyForRelatedFacetKeys ? '@' : ''}${ux_specification_types_2.UIVOCABULARY}`);
339
349
  }
340
350
  return key;
341
351
  }
342
- function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
352
+ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
343
353
  let stopProcessing = false;
344
354
  let namespace;
345
355
  const navigationParts = propertyValue.split('/');
@@ -350,7 +360,7 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
350
360
  key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
351
361
  const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
352
362
  if (targetAnnotation) {
353
- const separator = oDataVersion === ux_specification_types_1.FioriElementsVersion.v2 ? '::' : '#';
363
+ const separator = oDataVersion === ux_specification_types_2.FioriElementsVersion.v2 ? '::' : '#';
354
364
  key = getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys).replace('#', separator);
355
365
  namespace = targetAnnotation.fullyQualifiedName?.split('@')[0];
356
366
  }
@@ -359,7 +369,7 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
359
369
  return { key, entityType, stopProcessing, namespace };
360
370
  }
361
371
  if (navigation) {
362
- const navSeparator = oDataVersion === ux_specification_types_1.FioriElementsVersion.v2 ? '::' : '/';
372
+ const navSeparator = oDataVersion === ux_specification_types_2.FioriElementsVersion.v2 ? '::' : '/';
363
373
  navigationParts.pop();
364
374
  const navigationIDs = [...navigationParts].join(navSeparator);
365
375
  key = `${navigationIDs}${navSeparator}${key}`;
@@ -375,7 +385,7 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
375
385
  * @param {ExtensionLogger} logger - Logger class for logging messages
376
386
  * @returns {FacetSection} - object comprising the relevant facet information
377
387
  */
378
- function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
388
+ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
379
389
  //Take facet ID as fallback
380
390
  const facetName = facetDefinition.fullyQualifiedName?.substring(facetDefinition.fullyQualifiedName?.lastIndexOf('@'));
381
391
  let key = facetDefinition.ID ? facetDefinition.ID.toString() : facetName;
@@ -532,7 +542,7 @@ function getSchemaKeyOfLineItemRecord(lineItemRecord) {
532
542
  schemaKey =
533
543
  'DataFieldForAnnotation:::sTarget::' +
534
544
  target
535
- .replace('@UI', `@${ux_specification_types_1.UIVOCABULARY}`)
545
+ .replace('@UI', `@${ux_specification_types_2.UIVOCABULARY}`)
536
546
  .replace('@Communication', '@com.sap.vocabularies.Communication.v1')
537
547
  .replace('@Contact', '@com.sap.vocabularies.Contact.v1');
538
548
  }
@@ -632,20 +642,20 @@ function getAnnotationTerm(path, alias, entityType) {
632
642
  * @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
633
643
  */
634
644
  function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT) {
635
- const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
645
+ const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
636
646
  let path = section ? section.key : '';
637
647
  const targetEntityType = section.entityType;
638
648
  const annotationTerm = getAnnotationTerm(path, alias, entityType);
639
649
  switch (annotationTerm) {
640
650
  case "com.sap.vocabularies.UI.v1.Chart" /* UIAnnotationTerms.Chart */: {
641
- facets[path] = { base: ux_specification_types_1.FacetBase.Chart };
651
+ facets[path] = { base: ux_specification_types_2.FacetBase.Chart };
642
652
  facets[path].target = annotationRecord?.Target?.$target;
643
653
  facets[path].entityType = targetEntityType;
644
654
  facets[path].namespace = section.namespace;
645
655
  break;
646
656
  }
647
657
  case "com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */: {
648
- facets[path] = { base: ux_specification_types_1.FacetBase.Identification };
658
+ facets[path] = { base: ux_specification_types_2.FacetBase.Identification };
649
659
  facets[path].target = annotationRecord?.Target?.$target;
650
660
  facets[path].entityType = targetEntityType;
651
661
  facets[path].namespace = section.namespace;
@@ -657,21 +667,21 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
657
667
  pathParts[pathParts.length - 1] = `@${"com.sap.vocabularies.UI.v1.LineItem" /* UIAnnotationTerms.LineItem */}`;
658
668
  path = pathParts.join('::');
659
669
  }
660
- facets[path] = { base: ux_specification_types_1.FacetBase.LineItem };
670
+ facets[path] = { base: ux_specification_types_2.FacetBase.LineItem };
661
671
  facets[path].target = annotationRecord?.Target?.$target;
662
672
  facets[path].entityType = targetEntityType;
663
673
  facets[path].namespace = section.namespace;
664
674
  break;
665
675
  }
666
676
  case "com.sap.vocabularies.UI.v1.FieldGroup" /* UIAnnotationTerms.FieldGroup */: {
667
- facets[path] = { base: ux_specification_types_1.FacetBase.Form };
677
+ facets[path] = { base: ux_specification_types_2.FacetBase.Form };
668
678
  facets[path].target = annotationRecord?.Target?.$target;
669
679
  facets[path].entityType = targetEntityType;
670
680
  facets[path].namespace = section.namespace;
671
681
  break;
672
682
  }
673
683
  case "com.sap.vocabularies.UI.v1.DataPoint" /* UIAnnotationTerms.DataPoint */: {
674
- facets[path] = { base: ux_specification_types_1.FacetBase.DataPoint };
684
+ facets[path] = { base: ux_specification_types_2.FacetBase.DataPoint };
675
685
  facets[path].Label = annotationRecord?.Target?.$target['Title'];
676
686
  facets[path].target = annotationRecord?.Target?.$target;
677
687
  facets[path].entityType = targetEntityType;
@@ -679,39 +689,39 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
679
689
  break;
680
690
  }
681
691
  case "com.sap.vocabularies.UI.v1.PresentationVariant" /* UIAnnotationTerms.PresentationVariant */: {
682
- facets[path] = { base: ux_specification_types_1.FacetBase.PresentationVariant };
692
+ facets[path] = { base: ux_specification_types_2.FacetBase.PresentationVariant };
683
693
  facets[path].target = annotationRecord?.Target?.$target;
684
694
  facets[path].entityType = targetEntityType;
685
695
  facets[path].namespace = section.namespace;
686
696
  break;
687
697
  }
688
698
  case "com.sap.vocabularies.UI.v1.SelectionPresentationVariant" /* UIAnnotationTerms.SelectionPresentationVariant */: {
689
- facets[path] = { base: ux_specification_types_1.FacetBase.SelectionPresentationVariant };
699
+ facets[path] = { base: ux_specification_types_2.FacetBase.SelectionPresentationVariant };
690
700
  facets[path].target = annotationRecord?.Target?.$target;
691
701
  facets[path].entityType = targetEntityType;
692
702
  facets[path].namespace = section.namespace;
693
703
  break;
694
704
  }
695
705
  case "com.sap.vocabularies.Communication.v1.Contact" /* CommunicationAnnotationTerms.Contact */: {
696
- facets[path] = { base: ux_specification_types_1.FacetBase.Contact };
706
+ facets[path] = { base: ux_specification_types_2.FacetBase.Contact };
697
707
  facets[path].target = annotationRecord?.Target?.$target;
698
708
  facets[path].entityType = targetEntityType;
699
709
  facets[path].namespace = section.namespace;
700
710
  break;
701
711
  }
702
712
  case "com.sap.vocabularies.Communication.v1.Address" /* CommunicationAnnotationTerms.Address */: {
703
- facets[path] = { base: ux_specification_types_1.FacetBase.Address };
713
+ facets[path] = { base: ux_specification_types_2.FacetBase.Address };
704
714
  facets[path].target = annotationRecord?.Target?.$target;
705
715
  facets[path].entityType = targetEntityType;
706
716
  facets[path].namespace = section.namespace;
707
717
  break;
708
718
  }
709
719
  default: {
710
- facets[path] = { base: ux_specification_types_1.FacetBase.Unknown };
720
+ facets[path] = { base: ux_specification_types_2.FacetBase.Unknown };
711
721
  }
712
722
  }
713
723
  if (facets[path]) {
714
- facets[path].annotationPath = `/${annotationRecord.fullyQualifiedName.replace('@com.sap.vocabularies', ux_specification_types_1.VOCWITHSLASH)}`;
724
+ facets[path].annotationPath = `/${annotationRecord.fullyQualifiedName.replace('@com.sap.vocabularies', ux_specification_types_2.VOCWITHSLASH)}`;
715
725
  if (annotationRecord.Label) {
716
726
  facets[path].Label = annotationRecord.Label;
717
727
  }
@@ -744,7 +754,7 @@ exports.getAnnotationPathUsingFullyQualifiedName = getAnnotationPathUsingFullyQu
744
754
  * @param {FioriElementsVersion} oDataVersion - OData version
745
755
  * @param {ExtensionLogger} logger - Logger class for logging messages
746
756
  */
747
- function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
757
+ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, logger) {
748
758
  const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
749
759
  if (section) {
750
760
  switch (annotationRecord.$Type) {
@@ -755,14 +765,14 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
755
765
  case "com.sap.vocabularies.UI.v1.CollectionFacet" /* UIAnnotationTypes.CollectionFacet */: {
756
766
  const annotationPath = getAnnotationPathUsingFullyQualifiedName(entityType, annotationRecord.fullyQualifiedName);
757
767
  const facet = (facets[section.key] = {
758
- base: ux_specification_types_1.FacetBase.CollectionFacet,
768
+ base: ux_specification_types_2.FacetBase.CollectionFacet,
759
769
  facets: {},
760
770
  ID: section.ID,
761
771
  annotationPath: annotationPath,
762
772
  Label: section.label,
763
773
  namespace: section.namespace
764
774
  });
765
- if (!facet.ID && oDataVersion === ux_specification_types_1.FioriElementsVersion.v4) {
775
+ if (!facet.ID && oDataVersion === ux_specification_types_2.FioriElementsVersion.v4) {
766
776
  (0, extensionLogger_1.log)(logger, {
767
777
  severity: "error" /* LogSeverity.Error */,
768
778
  message: i18next_1.default.t('NOID4SECTION', { facet: annotationRecord.fullyQualifiedName })
@@ -783,12 +793,12 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
783
793
  * @param {FioriElementsVersion} oDataVersion - OData version
784
794
  * @param {ExtensionLogger} logger - Logger class for logging messages
785
795
  */
786
- function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
796
+ function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, logger) {
787
797
  const facets = {};
788
798
  if (!entityType || !entityType.annotations) {
789
799
  return;
790
800
  }
791
- const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
801
+ const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
792
802
  const facetAnnotation = alias && entityType?.annotations?.[alias]?.HeaderFacets;
793
803
  if (facetAnnotation) {
794
804
  const lastDot = entityType && entityType.fullyQualifiedName.lastIndexOf('.');
@@ -808,12 +818,12 @@ exports.getObjectPageHeaderFacets = getObjectPageHeaderFacets;
808
818
  * @param {FioriElementsVersion} oDataVersion - OData version
809
819
  * @param {ExtensionLogger} logger - Logger class for logging messages
810
820
  */
811
- function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
821
+ function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, logger) {
812
822
  const facets = {};
813
823
  if (!entityType || !entityType.annotations) {
814
824
  return;
815
825
  }
816
- const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
826
+ const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
817
827
  const facetAnnotation = alias && entityType?.annotations[alias]?.Facets;
818
828
  if (facetAnnotation) {
819
829
  const lastDot = entityType && entityType.fullyQualifiedName.lastIndexOf('.');
@@ -829,16 +839,58 @@ exports.getObjectPageFacets = getObjectPageFacets;
829
839
  /**
830
840
  * Returns the version of Fiori elements (v2/v4) from a given manifest
831
841
  * @param manifest - the manifest.json file
842
+ * @returns FioriElementsVersion
832
843
  */
833
- function getVersionFromManifest(manifest) {
834
- if (manifest[ux_specification_types_1.ManifestSection.generic] || manifest[ux_specification_types_1.ManifestSection.ovp]) {
835
- return ux_specification_types_1.FioriElementsVersion.v2;
844
+ function getFEVersionFromManifest(manifest) {
845
+ if ((manifest[ux_specification_types_2.ManifestSection.generic] && Object.keys(manifest[ux_specification_types_2.ManifestSection.generic]).length > 0) ||
846
+ (manifest[ux_specification_types_2.ManifestSection.ovp] && Object.keys(manifest[ux_specification_types_2.ManifestSection.ovp]).length > 0)) {
847
+ return ux_specification_types_2.FioriElementsVersion.v2;
836
848
  }
837
849
  else {
838
- return ux_specification_types_1.FioriElementsVersion.v4;
850
+ const targets = manifest[ux_specification_types_2.ManifestSection.ui5]?.routing?.targets;
851
+ const libs = manifest[ux_specification_types_2.ManifestSection.ui5]?.dependencies?.libs;
852
+ if ((targets &&
853
+ Object.keys(targets).find((targetKey) => exports.V4_TEMPLATES.indexOf(targets[targetKey].name) > -1)) ||
854
+ (libs && Object.keys(libs).find((lib) => exports.V4_LIBS.indexOf(lib) > -1))) {
855
+ return ux_specification_types_2.FioriElementsVersion.v4;
856
+ }
857
+ else {
858
+ return undefined;
859
+ }
839
860
  }
840
861
  }
841
- exports.getVersionFromManifest = getVersionFromManifest;
862
+ exports.getFEVersionFromManifest = getFEVersionFromManifest;
863
+ /**
864
+ * Get the main service name from the manifest.
865
+ * LROP: by definition the service name can be read from the UI5 model with "" as name.
866
+ * OVP: the main model needs to be read from the sap.ovp config and then the service can be derived.
867
+ *
868
+ * @param manifest - application manifest
869
+ * @returns - main service name
870
+ */
871
+ function getMainService(manifest) {
872
+ const model = typeof manifest?.[ux_specification_types_2.ManifestSection.ovp]?.globalFilterModel === 'string'
873
+ ? manifest[ux_specification_types_2.ManifestSection.ovp].globalFilterModel
874
+ : '';
875
+ return typeof manifest?.[ux_specification_types_2.ManifestSection.ui5]?.models?.[model]?.dataSource === 'string'
876
+ ? manifest[ux_specification_types_2.ManifestSection.ui5].models[model].dataSource
877
+ : undefined;
878
+ }
879
+ exports.getMainService = getMainService;
880
+ /**
881
+ * Returns the oData version of the service (if any) from a given manifest
882
+ * @param manifest - the manifest.json file
883
+ * @returns the OData version
884
+ */
885
+ function getODataVersionFromManifest(manifest) {
886
+ const mainService = getMainService(manifest);
887
+ if (!mainService) {
888
+ return ux_specification_types_1.OdataVersion.v2;
889
+ }
890
+ const dataSource = manifest[ux_specification_types_2.ManifestSection.app].dataSources?.[mainService];
891
+ return dataSource?.settings?.odataVersion === '4.0' ? ux_specification_types_1.OdataVersion.v4 : ux_specification_types_1.OdataVersion.v2;
892
+ }
893
+ exports.getODataVersionFromManifest = getODataVersionFromManifest;
842
894
  /**
843
895
  * Determines the template type of a V2 app
844
896
  * @param manifest - the manifest.json file
@@ -847,27 +899,27 @@ exports.getVersionFromManifest = getVersionFromManifest;
847
899
  */
848
900
  function determineV2Template(manifest, logger) {
849
901
  let templateType;
850
- if (manifest[ux_specification_types_1.ManifestSection.generic]) {
851
- const v2Pages = manifest[ux_specification_types_1.ManifestSection.generic].pages;
902
+ if (manifest[ux_specification_types_2.ManifestSection.generic]) {
903
+ const v2Pages = manifest[ux_specification_types_2.ManifestSection.generic].pages;
852
904
  if (!v2Pages) {
853
905
  (0, extensionLogger_1.log)(logger, {
854
906
  severity: "error" /* LogSeverity.Error */,
855
907
  message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
856
908
  location: {
857
- path: ux_specification_types_1.MANIFESTPATH,
858
- range: [ux_specification_types_1.ManifestSection.generic]
909
+ path: ux_specification_types_2.MANIFESTPATH,
910
+ range: [ux_specification_types_2.ManifestSection.generic]
859
911
  }
860
912
  });
861
913
  return;
862
914
  }
863
915
  for (const pageKey in v2Pages) {
864
916
  const v2Page = v2Pages[pageKey];
865
- if (getPageTypeV2(v2Page.component?.name) === ux_specification_types_1.PageTypeV2.AnalyticalListPage) {
866
- templateType = ux_specification_types_1.TemplateType.AnalyticalListPageV2;
917
+ if (getPageTypeV2(v2Page.component?.name) === ux_specification_types_2.PageTypeV2.AnalyticalListPage) {
918
+ templateType = ux_specification_types_2.TemplateType.AnalyticalListPageV2;
867
919
  break;
868
920
  }
869
- else if (getPageTypeV2(v2Page.component?.name) === ux_specification_types_1.PageTypeV2.ListReport) {
870
- templateType = ux_specification_types_1.TemplateType.ListReportObjectPageV2;
921
+ else if (getPageTypeV2(v2Page.component?.name) === ux_specification_types_2.PageTypeV2.ListReport) {
922
+ templateType = ux_specification_types_2.TemplateType.ListReportObjectPageV2;
871
923
  break;
872
924
  }
873
925
  }
@@ -876,10 +928,10 @@ function determineV2Template(manifest, logger) {
876
928
  if (!templateType) {
877
929
  (0, extensionLogger_1.log)(logger, {
878
930
  severity: "error" /* LogSeverity.Error */,
879
- message: i18next_1.default.t('NOTEMPLATE', { section: ux_specification_types_1.ManifestSection.generic }),
931
+ message: i18next_1.default.t('NOTEMPLATE', { section: ux_specification_types_2.ManifestSection.generic }),
880
932
  location: {
881
- path: ux_specification_types_1.MANIFESTPATH,
882
- range: [ux_specification_types_1.ManifestSection.generic]
933
+ path: ux_specification_types_2.MANIFESTPATH,
934
+ range: [ux_specification_types_2.ManifestSection.generic]
883
935
  }
884
936
  });
885
937
  }
@@ -895,24 +947,24 @@ exports.determineV2Template = determineV2Template;
895
947
  function determineV4PageTemplateType(v4Page) {
896
948
  let templateType;
897
949
  const pageType = getPageTypeV4(v4Page);
898
- if (pageType === ux_specification_types_1.PageTypeV4.AnalyticalListPage) {
899
- templateType = ux_specification_types_1.TemplateType.AnalyticalListPageV4;
950
+ if (pageType === ux_specification_types_2.PageTypeV4.AnalyticalListPage) {
951
+ templateType = ux_specification_types_2.TemplateType.AnalyticalListPageV4;
900
952
  }
901
- else if (pageType === ux_specification_types_1.PageTypeV4.ListReport) {
953
+ else if (pageType === ux_specification_types_2.PageTypeV4.ListReport) {
902
954
  const viewPath = v4Page.options?.settings?.views?.paths?.[0];
903
- if (viewPath && (viewPath[ux_specification_types_1.ALPViewType.Primary] || viewPath[ux_specification_types_1.ALPViewType.Secondary])) {
904
- templateType = ux_specification_types_1.TemplateType.AnalyticalListPageV4;
955
+ if (viewPath && (viewPath[ux_specification_types_2.ALPViewType.Primary] || viewPath[ux_specification_types_2.ALPViewType.Secondary])) {
956
+ templateType = ux_specification_types_2.TemplateType.AnalyticalListPageV4;
905
957
  }
906
958
  else {
907
- templateType = ux_specification_types_1.TemplateType.ListReportObjectPageV4;
959
+ templateType = ux_specification_types_2.TemplateType.ListReportObjectPageV4;
908
960
  }
909
961
  }
910
- else if (pageType === ux_specification_types_1.PageTypeV4.ObjectPage) {
911
- templateType = ux_specification_types_1.TemplateType.ListReportObjectPageV4;
962
+ else if (pageType === ux_specification_types_2.PageTypeV4.ObjectPage) {
963
+ templateType = ux_specification_types_2.TemplateType.ListReportObjectPageV4;
912
964
  //fixed now for FEOP scenario, bit continue to check if LR/ALP exists
913
965
  }
914
- else if ([ux_specification_types_1.PageTypeV4.CustomPage, ux_specification_types_1.PageTypeV4.FPMCustomPage].includes(pageType)) {
915
- templateType = ux_specification_types_1.TemplateType.FreestylePageV4;
966
+ else if ([ux_specification_types_2.PageTypeV4.CustomPage, ux_specification_types_2.PageTypeV4.FPMCustomPage].includes(pageType)) {
967
+ templateType = ux_specification_types_2.TemplateType.FreestylePageV4;
916
968
  }
917
969
  return templateType;
918
970
  }
@@ -940,29 +992,29 @@ function determineV4TemplateFromPages(v4Pages) {
940
992
  * @returns {TemplateType} the template type
941
993
  */
942
994
  function determineV4Template(manifest, logger) {
943
- const v4Pages = manifest[ux_specification_types_1.ManifestSection.ui5].routing &&
944
- manifest[ux_specification_types_1.ManifestSection.ui5].routing.targets;
995
+ const v4Pages = manifest[ux_specification_types_2.ManifestSection.ui5].routing &&
996
+ manifest[ux_specification_types_2.ManifestSection.ui5].routing.targets;
945
997
  // if there are no pages in routing targets, we use LROPV4 as default template type
946
998
  if (!v4Pages || Object.keys(v4Pages).length === 0) {
947
999
  (0, extensionLogger_1.log)(logger, {
948
1000
  severity: "info" /* LogSeverity.Info */,
949
1001
  message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
950
1002
  location: {
951
- path: ux_specification_types_1.MANIFESTPATH,
952
- range: [ux_specification_types_1.ManifestSection.ui5, 'routing']
1003
+ path: ux_specification_types_2.MANIFESTPATH,
1004
+ range: [ux_specification_types_2.ManifestSection.ui5, 'routing']
953
1005
  }
954
1006
  });
955
- return ux_specification_types_1.TemplateType.ListReportObjectPageV4;
1007
+ return ux_specification_types_2.TemplateType.ListReportObjectPageV4;
956
1008
  }
957
1009
  // else try to determine template type from routing targets
958
1010
  const templateType = determineV4TemplateFromPages(v4Pages);
959
1011
  if (!templateType) {
960
1012
  (0, extensionLogger_1.log)(logger, {
961
1013
  severity: "error" /* LogSeverity.Error */,
962
- message: i18next_1.default.t('NOTEMPLATE', { section: ux_specification_types_1.ManifestSection.ui5 }),
1014
+ message: i18next_1.default.t('NOTEMPLATE', { section: ux_specification_types_2.ManifestSection.ui5 }),
963
1015
  location: {
964
- path: ux_specification_types_1.MANIFESTPATH,
965
- range: [ux_specification_types_1.ManifestSection.ui5, 'routing', 'targets']
1016
+ path: ux_specification_types_2.MANIFESTPATH,
1017
+ range: [ux_specification_types_2.ManifestSection.ui5, 'routing', 'targets']
966
1018
  }
967
1019
  });
968
1020
  }
@@ -978,26 +1030,15 @@ exports.determineV4Template = determineV4Template;
978
1030
  */
979
1031
  function getTemplateTypeFromManifest(manifest, fioriElementsVersion, logger) {
980
1032
  let templateType;
981
- if (manifest[ux_specification_types_1.ManifestSection.ovp]) {
982
- templateType = ux_specification_types_1.TemplateType.OverviewPageV2;
1033
+ if (manifest[ux_specification_types_2.ManifestSection.ovp]) {
1034
+ templateType = ux_specification_types_2.TemplateType.OverviewPageV2;
983
1035
  }
984
- else if (fioriElementsVersion === ux_specification_types_1.FioriElementsVersion.v2) {
1036
+ else if (fioriElementsVersion === ux_specification_types_2.FioriElementsVersion.v2) {
985
1037
  templateType = determineV2Template(manifest, logger);
986
1038
  }
987
- else if (fioriElementsVersion === ux_specification_types_1.FioriElementsVersion.v4) {
1039
+ else if (fioriElementsVersion === ux_specification_types_2.FioriElementsVersion.v4) {
988
1040
  templateType = determineV4Template(manifest, logger);
989
1041
  }
990
- else {
991
- if (!templateType) {
992
- (0, extensionLogger_1.log)(logger, {
993
- severity: "error" /* LogSeverity.Error */,
994
- message: i18next_1.default.t('NOFE'),
995
- location: {
996
- path: ux_specification_types_1.MANIFESTPATH
997
- }
998
- });
999
- }
1000
- }
1001
1042
  return templateType;
1002
1043
  }
1003
1044
  exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
@@ -1009,12 +1050,12 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
1009
1050
  */
1010
1051
  function addSectionTitleAndDescription(facet, section, facetKey) {
1011
1052
  if (facet?.ID) {
1012
- section.title = ux_specification_types_1.FacetTitlePrefix + facet.ID;
1013
- section[ux_specification_types_1.SchemaTag.keys] = [{ name: ux_specification_types_1.SchemaKeyName.id, value: facet.ID }];
1053
+ section.title = ux_specification_types_2.FacetTitlePrefix + facet.ID;
1054
+ section[ux_specification_types_2.SchemaTag.keys] = [{ name: ux_specification_types_2.SchemaKeyName.id, value: facet.ID }];
1014
1055
  }
1015
1056
  else {
1016
1057
  section.title = facetKey.replace(/@com.sap/g, 'com.sap');
1017
- section[ux_specification_types_1.SchemaTag.keys] = [{ name: ux_specification_types_1.SchemaKeyName.id, value: facetKey.replace(ux_specification_types_1.UIVOCABULARYALPHADOT, '') }];
1058
+ section[ux_specification_types_2.SchemaTag.keys] = [{ name: ux_specification_types_2.SchemaKeyName.id, value: facetKey.replace(ux_specification_types_2.UIVOCABULARYALPHADOT, '') }];
1018
1059
  }
1019
1060
  // Description
1020
1061
  if (facet?.Label) {
@@ -1061,8 +1102,8 @@ function createDefaultSection(appSchema, facet, facetKey) {
1061
1102
  properties: {},
1062
1103
  additionalProperties: false
1063
1104
  };
1064
- section[ux_specification_types_1.SchemaTag.isViewNode] = true;
1065
- section[ux_specification_types_1.SchemaTag.annotationPath] = facet.annotationPath;
1105
+ section[ux_specification_types_2.SchemaTag.isViewNode] = true;
1106
+ section[ux_specification_types_2.SchemaTag.annotationPath] = facet.annotationPath;
1066
1107
  addTargetTitleAndSectionDescription(facet, section, facetKey);
1067
1108
  return section;
1068
1109
  }
@@ -1076,8 +1117,8 @@ exports.createDefaultSection = createDefaultSection;
1076
1117
  * @param {boolean} [checkUnresolvableFacets=false] - Check and avoid facets and sections without ID and Target.
1077
1118
  * @returns {FacetSection[]} - Array of facets or sections
1078
1119
  */
1079
- function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, checkUnresolvableFacets = false) {
1080
- const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
1120
+ function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, checkUnresolvableFacets = false) {
1121
+ const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
1081
1122
  let sections = [];
1082
1123
  if (entityType) {
1083
1124
  const facetAnnotation = alias && entityType?.annotations?.[alias]?.Facets;
@@ -1143,12 +1184,12 @@ exports.deleteEmptyStructure = deleteEmptyStructure;
1143
1184
  * @return {string} File name of generic schema.
1144
1185
  */
1145
1186
  const getGenericSchemaFileName = (schemaType) => {
1146
- if (schemaType === ux_specification_types_1.SchemaType.FreestylePage) {
1147
- return ux_specification_types_1.PageTypeV2.CustomPage;
1187
+ if (schemaType === ux_specification_types_2.SchemaType.FreestylePage) {
1188
+ return ux_specification_types_2.PageTypeV2.CustomPage;
1148
1189
  }
1149
- if (schemaType === ux_specification_types_1.SchemaType.FPMCustomPage) {
1190
+ if (schemaType === ux_specification_types_2.SchemaType.FPMCustomPage) {
1150
1191
  // FPM custom pages uses generic schema generated for building blocks
1151
- return ux_specification_types_1.SchemaType.BuildingBlocks;
1192
+ return ux_specification_types_2.SchemaType.BuildingBlocks;
1152
1193
  }
1153
1194
  return `${schemaType}`;
1154
1195
  };
@@ -1165,30 +1206,30 @@ const getSchemaFilePath = (schemaType, pageId, viewId) => {
1165
1206
  };
1166
1207
  switch (schemaType) {
1167
1208
  // Application schema
1168
- case ux_specification_types_1.SchemaType.Application: {
1209
+ case ux_specification_types_2.SchemaType.Application: {
1169
1210
  // File name
1170
1211
  schemaFile.filename = `App`;
1171
1212
  // Full path
1172
- schemaFile.path = `./${ux_specification_types_1.DirName.Schemas}/${schemaFile.filename}`;
1213
+ schemaFile.path = `./${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
1173
1214
  break;
1174
1215
  }
1175
1216
  // List report and object page
1176
- case ux_specification_types_1.SchemaType.ListReport:
1177
- case ux_specification_types_1.SchemaType.ObjectPage: {
1217
+ case ux_specification_types_2.SchemaType.ListReport:
1218
+ case ux_specification_types_2.SchemaType.ObjectPage: {
1178
1219
  // File name
1179
1220
  schemaFile.filename = pageId ? `${schemaType}_${pageId}` : getGenericSchemaFileName(schemaType);
1180
1221
  // Full path
1181
- schemaFile.path = `../${ux_specification_types_1.DirName.Schemas}/${schemaFile.filename}`;
1222
+ schemaFile.path = `../${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
1182
1223
  break;
1183
1224
  }
1184
- case ux_specification_types_1.PageTypeV4.FPMCustomPage:
1185
- case ux_specification_types_1.SchemaType.FPMCustomPage: {
1225
+ case ux_specification_types_2.PageTypeV4.FPMCustomPage:
1226
+ case ux_specification_types_2.SchemaType.FPMCustomPage: {
1186
1227
  // File name
1187
1228
  schemaFile.filename = viewId
1188
- ? `${ux_specification_types_1.SchemaType.FPMCustomPage}_${viewId}`
1189
- : getGenericSchemaFileName(ux_specification_types_1.SchemaType.FPMCustomPage);
1229
+ ? `${ux_specification_types_2.SchemaType.FPMCustomPage}_${viewId}`
1230
+ : getGenericSchemaFileName(ux_specification_types_2.SchemaType.FPMCustomPage);
1190
1231
  // Full path
1191
- schemaFile.path = `../${ux_specification_types_1.DirName.Schemas}/${schemaFile.filename}`;
1232
+ schemaFile.path = `../${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
1192
1233
  break;
1193
1234
  }
1194
1235
  // Other page configs
@@ -1196,7 +1237,7 @@ const getSchemaFilePath = (schemaType, pageId, viewId) => {
1196
1237
  // File name
1197
1238
  schemaFile.filename = getGenericSchemaFileName(schemaType);
1198
1239
  // Full path
1199
- schemaFile.path = `../${ux_specification_types_1.DirName.Schemas}/${schemaFile.filename}`;
1240
+ schemaFile.path = `../${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
1200
1241
  break;
1201
1242
  }
1202
1243
  }
@@ -1214,7 +1255,7 @@ exports.getSchemaFilePath = getSchemaFilePath;
1214
1255
  * @returns {string} Generated page id
1215
1256
  */
1216
1257
  function generatePageId(pageType, entitySet, viewId, pageName) {
1217
- if (pageType === ux_specification_types_1.PageTypeV2.CustomPage) {
1258
+ if (pageType === ux_specification_types_2.PageTypeV2.CustomPage) {
1218
1259
  const names = viewId && viewId.split('.');
1219
1260
  return names && names[names.length - 1] + 'Page';
1220
1261
  }
@@ -1434,7 +1475,7 @@ exports.convertEnumToCSV = convertEnumToCSV;
1434
1475
  */
1435
1476
  function convertActionKeyToStableId(actionId) {
1436
1477
  if (!actionId) {
1437
- return;
1478
+ return '';
1438
1479
  }
1439
1480
  return (actionId.indexOf('??') > -1 ? actionId.split('??')[1] : actionId).replace(/@/g, '::');
1440
1481
  }
@@ -1522,7 +1563,7 @@ exports.getJSONPropertyByPath = getJSONPropertyByPath;
1522
1563
  * @returns {string} modified string without namespace
1523
1564
  */
1524
1565
  function removeNamespaces(sId) {
1525
- sId = sId.replace(ux_specification_types_1.UIVOCABULARYDOT, '');
1566
+ sId = sId.replace(ux_specification_types_2.UIVOCABULARYDOT, '');
1526
1567
  sId = sId.replace('com.sap.vocabularies.Communication.v1.', '');
1527
1568
  return sId;
1528
1569
  }
@@ -1533,7 +1574,7 @@ exports.removeNamespaces = removeNamespaces;
1533
1574
  * @returns {string} modified string with replaced namespaces
1534
1575
  */
1535
1576
  function replaceNamespaces(sId) {
1536
- sId = sId.replace(ux_specification_types_1.UIVOCABULARY, 'UI');
1577
+ sId = sId.replace(ux_specification_types_2.UIVOCABULARY, 'UI');
1537
1578
  sId = sId.replace('com.sap.vocabularies.Communication.v1', 'Communication');
1538
1579
  return sId;
1539
1580
  }