@sap/ux-specification 1.96.69 → 1.96.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -25
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +99 -99
- package/dist/index-min.js.map +3 -3
- package/dist/schemas/v2/ApplicationV2.json +1 -5
- package/dist/schemas/v4/ApplicationV4.json +1 -5
- package/dist/specification/package.json +9 -9
- package/dist/specification/scripts/to-json-schema.js +4 -1
- package/dist/specification/scripts/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.js +1 -1
- package/dist/specification/src/specification/schemaAccess.d.ts +1 -1
- package/dist/specification/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/specification/src/specification/schemaAccess.js +6 -5
- package/dist/specification/src/specification/schemaAccess.js.map +1 -1
- package/dist/specification/src/sync/common/appProvider.d.ts +2 -3
- package/dist/specification/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/common/appProvider.js +15 -9
- package/dist/specification/src/sync/common/appProvider.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +10 -5
- package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/specification/src/sync/common/importProject.js +14 -5
- package/dist/specification/src/sync/common/importProject.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +21 -2
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +148 -107
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts +1 -0
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.js +31 -34
- package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v2/import/app/ovpProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/ovpProvider.js +1 -1
- package/dist/specification/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +1 -2
- package/dist/specification/src/sync/v4/export/export.js.map +1 -1
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.js +3 -13
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.js.map +1 -1
- package/dist/specification/src/sync/v4/export/manifest.js +2 -2
- package/dist/specification/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.js +3 -3
- package/dist/specification/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +4 -4
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/types/src/apiTypes.d.ts +3 -1
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/page.d.ts +2 -2
- package/dist/types/src/common/page.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -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.
|
|
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
|
-
|
|
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 = `${
|
|
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 !==
|
|
259
|
-
const templatePart = `${
|
|
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 ===
|
|
263
|
-
return
|
|
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
|
|
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 ? '@' : ''}${
|
|
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 =
|
|
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 ===
|
|
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 ===
|
|
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 =
|
|
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;
|
|
@@ -518,7 +528,7 @@ function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
|
518
528
|
schemaKey =
|
|
519
529
|
'DataFieldForAnnotation:::sTarget::' +
|
|
520
530
|
target
|
|
521
|
-
.replace('@UI', `@${
|
|
531
|
+
.replace('@UI', `@${ux_specification_types_2.UIVOCABULARY}`)
|
|
522
532
|
.replace('@Communication', '@com.sap.vocabularies.Communication.v1')
|
|
523
533
|
.replace('@Contact', '@com.sap.vocabularies.Contact.v1');
|
|
524
534
|
}
|
|
@@ -614,20 +624,20 @@ function getAnnotationTerm(path, alias, entityType) {
|
|
|
614
624
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
615
625
|
*/
|
|
616
626
|
function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT) {
|
|
617
|
-
const alias = findAlias(
|
|
627
|
+
const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
|
|
618
628
|
let path = section ? section.key : '';
|
|
619
629
|
const targetEntityType = section.entityType;
|
|
620
630
|
const annotationTerm = getAnnotationTerm(path, alias, entityType);
|
|
621
631
|
switch (annotationTerm) {
|
|
622
632
|
case "com.sap.vocabularies.UI.v1.Chart" /* UIAnnotationTerms.Chart */: {
|
|
623
|
-
facets[path] = { base:
|
|
633
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.Chart };
|
|
624
634
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
625
635
|
facets[path].entityType = targetEntityType;
|
|
626
636
|
facets[path].namespace = section.namespace;
|
|
627
637
|
break;
|
|
628
638
|
}
|
|
629
639
|
case "com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */: {
|
|
630
|
-
facets[path] = { base:
|
|
640
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.Identification };
|
|
631
641
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
632
642
|
facets[path].entityType = targetEntityType;
|
|
633
643
|
facets[path].namespace = section.namespace;
|
|
@@ -639,21 +649,21 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
639
649
|
pathParts[pathParts.length - 1] = `@${"com.sap.vocabularies.UI.v1.LineItem" /* UIAnnotationTerms.LineItem */}`;
|
|
640
650
|
path = pathParts.join('::');
|
|
641
651
|
}
|
|
642
|
-
facets[path] = { base:
|
|
652
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.LineItem };
|
|
643
653
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
644
654
|
facets[path].entityType = targetEntityType;
|
|
645
655
|
facets[path].namespace = section.namespace;
|
|
646
656
|
break;
|
|
647
657
|
}
|
|
648
658
|
case "com.sap.vocabularies.UI.v1.FieldGroup" /* UIAnnotationTerms.FieldGroup */: {
|
|
649
|
-
facets[path] = { base:
|
|
659
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.Form };
|
|
650
660
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
651
661
|
facets[path].entityType = targetEntityType;
|
|
652
662
|
facets[path].namespace = section.namespace;
|
|
653
663
|
break;
|
|
654
664
|
}
|
|
655
665
|
case "com.sap.vocabularies.UI.v1.DataPoint" /* UIAnnotationTerms.DataPoint */: {
|
|
656
|
-
facets[path] = { base:
|
|
666
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.DataPoint };
|
|
657
667
|
facets[path].Label = annotationRecord?.Target?.$target['Title'];
|
|
658
668
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
659
669
|
facets[path].entityType = targetEntityType;
|
|
@@ -661,32 +671,32 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
661
671
|
break;
|
|
662
672
|
}
|
|
663
673
|
case "com.sap.vocabularies.UI.v1.PresentationVariant" /* UIAnnotationTerms.PresentationVariant */: {
|
|
664
|
-
facets[path] = { base:
|
|
674
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.PresentationVariant };
|
|
665
675
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
666
676
|
facets[path].entityType = targetEntityType;
|
|
667
677
|
facets[path].namespace = section.namespace;
|
|
668
678
|
break;
|
|
669
679
|
}
|
|
670
680
|
case "com.sap.vocabularies.Communication.v1.Contact" /* CommunicationAnnotationTerms.Contact */: {
|
|
671
|
-
facets[path] = { base:
|
|
681
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.Contact };
|
|
672
682
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
673
683
|
facets[path].entityType = targetEntityType;
|
|
674
684
|
facets[path].namespace = section.namespace;
|
|
675
685
|
break;
|
|
676
686
|
}
|
|
677
687
|
case "com.sap.vocabularies.Communication.v1.Address" /* CommunicationAnnotationTerms.Address */: {
|
|
678
|
-
facets[path] = { base:
|
|
688
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.Address };
|
|
679
689
|
facets[path].target = annotationRecord?.Target?.$target;
|
|
680
690
|
facets[path].entityType = targetEntityType;
|
|
681
691
|
facets[path].namespace = section.namespace;
|
|
682
692
|
break;
|
|
683
693
|
}
|
|
684
694
|
default: {
|
|
685
|
-
facets[path] = { base:
|
|
695
|
+
facets[path] = { base: ux_specification_types_2.FacetBase.Unknown };
|
|
686
696
|
}
|
|
687
697
|
}
|
|
688
698
|
if (facets[path]) {
|
|
689
|
-
facets[path].annotationPath = `/${annotationRecord.fullyQualifiedName.replace('@com.sap.vocabularies',
|
|
699
|
+
facets[path].annotationPath = `/${annotationRecord.fullyQualifiedName.replace('@com.sap.vocabularies', ux_specification_types_2.VOCWITHSLASH)}`;
|
|
690
700
|
if (annotationRecord.Label) {
|
|
691
701
|
facets[path].Label = annotationRecord.Label;
|
|
692
702
|
}
|
|
@@ -719,7 +729,7 @@ exports.getAnnotationPathUsingFullyQualifiedName = getAnnotationPathUsingFullyQu
|
|
|
719
729
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
720
730
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
721
731
|
*/
|
|
722
|
-
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion =
|
|
732
|
+
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, logger) {
|
|
723
733
|
const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
|
|
724
734
|
if (section) {
|
|
725
735
|
switch (annotationRecord.$Type) {
|
|
@@ -730,14 +740,14 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
|
|
|
730
740
|
case "com.sap.vocabularies.UI.v1.CollectionFacet" /* UIAnnotationTypes.CollectionFacet */: {
|
|
731
741
|
const annotationPath = getAnnotationPathUsingFullyQualifiedName(entityType, annotationRecord.fullyQualifiedName);
|
|
732
742
|
const facet = (facets[section.key] = {
|
|
733
|
-
base:
|
|
743
|
+
base: ux_specification_types_2.FacetBase.CollectionFacet,
|
|
734
744
|
facets: {},
|
|
735
745
|
ID: section.ID,
|
|
736
746
|
annotationPath: annotationPath,
|
|
737
747
|
Label: section.label,
|
|
738
748
|
namespace: section.namespace
|
|
739
749
|
});
|
|
740
|
-
if (!facet.ID && oDataVersion ===
|
|
750
|
+
if (!facet.ID && oDataVersion === ux_specification_types_2.FioriElementsVersion.v4) {
|
|
741
751
|
(0, extensionLogger_1.log)(logger, {
|
|
742
752
|
severity: "error" /* LogSeverity.Error */,
|
|
743
753
|
message: i18next_1.default.t('NOID4SECTION', { facet: annotationRecord.fullyQualifiedName })
|
|
@@ -758,12 +768,12 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
|
|
|
758
768
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
759
769
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
760
770
|
*/
|
|
761
|
-
function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion =
|
|
771
|
+
function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, logger) {
|
|
762
772
|
const facets = {};
|
|
763
773
|
if (!entityType || !entityType.annotations) {
|
|
764
774
|
return;
|
|
765
775
|
}
|
|
766
|
-
const alias = findAlias(
|
|
776
|
+
const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
|
|
767
777
|
const facetAnnotation = alias && entityType?.annotations?.[alias]?.HeaderFacets;
|
|
768
778
|
if (facetAnnotation) {
|
|
769
779
|
const lastDot = entityType && entityType.fullyQualifiedName.lastIndexOf('.');
|
|
@@ -783,12 +793,12 @@ exports.getObjectPageHeaderFacets = getObjectPageHeaderFacets;
|
|
|
783
793
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
784
794
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
785
795
|
*/
|
|
786
|
-
function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion =
|
|
796
|
+
function getObjectPageFacets(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(
|
|
801
|
+
const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
|
|
792
802
|
const facetAnnotation = alias && entityType?.annotations[alias]?.Facets;
|
|
793
803
|
if (facetAnnotation) {
|
|
794
804
|
const lastDot = entityType && entityType.fullyQualifiedName.lastIndexOf('.');
|
|
@@ -804,16 +814,58 @@ exports.getObjectPageFacets = getObjectPageFacets;
|
|
|
804
814
|
/**
|
|
805
815
|
* Returns the version of Fiori elements (v2/v4) from a given manifest
|
|
806
816
|
* @param manifest - the manifest.json file
|
|
817
|
+
* @returns FioriElementsVersion
|
|
807
818
|
*/
|
|
808
|
-
function
|
|
809
|
-
if (manifest[
|
|
810
|
-
|
|
819
|
+
function getFEVersionFromManifest(manifest) {
|
|
820
|
+
if ((manifest[ux_specification_types_2.ManifestSection.generic] && Object.keys(manifest[ux_specification_types_2.ManifestSection.generic]).length > 0) ||
|
|
821
|
+
(manifest[ux_specification_types_2.ManifestSection.ovp] && Object.keys(manifest[ux_specification_types_2.ManifestSection.ovp]).length > 0)) {
|
|
822
|
+
return ux_specification_types_2.FioriElementsVersion.v2;
|
|
811
823
|
}
|
|
812
824
|
else {
|
|
813
|
-
|
|
825
|
+
const targets = manifest[ux_specification_types_2.ManifestSection.ui5]?.routing?.targets;
|
|
826
|
+
const libs = manifest[ux_specification_types_2.ManifestSection.ui5]?.dependencies?.libs;
|
|
827
|
+
if ((targets &&
|
|
828
|
+
Object.keys(targets).find((targetKey) => exports.V4_TEMPLATES.indexOf(targets[targetKey].name) > -1)) ||
|
|
829
|
+
(libs && Object.keys(libs).find((lib) => exports.V4_LIBS.indexOf(lib) > -1))) {
|
|
830
|
+
return ux_specification_types_2.FioriElementsVersion.v4;
|
|
831
|
+
}
|
|
832
|
+
else {
|
|
833
|
+
return undefined;
|
|
834
|
+
}
|
|
814
835
|
}
|
|
815
836
|
}
|
|
816
|
-
exports.
|
|
837
|
+
exports.getFEVersionFromManifest = getFEVersionFromManifest;
|
|
838
|
+
/**
|
|
839
|
+
* Get the main service name from the manifest.
|
|
840
|
+
* LROP: by definition the service name can be read from the UI5 model with "" as name.
|
|
841
|
+
* OVP: the main model needs to be read from the sap.ovp config and then the service can be derived.
|
|
842
|
+
*
|
|
843
|
+
* @param manifest - application manifest
|
|
844
|
+
* @returns - main service name
|
|
845
|
+
*/
|
|
846
|
+
function getMainService(manifest) {
|
|
847
|
+
const model = typeof manifest?.[ux_specification_types_2.ManifestSection.ovp]?.globalFilterModel === 'string'
|
|
848
|
+
? manifest[ux_specification_types_2.ManifestSection.ovp].globalFilterModel
|
|
849
|
+
: '';
|
|
850
|
+
return typeof manifest?.[ux_specification_types_2.ManifestSection.ui5]?.models?.[model]?.dataSource === 'string'
|
|
851
|
+
? manifest[ux_specification_types_2.ManifestSection.ui5].models[model].dataSource
|
|
852
|
+
: undefined;
|
|
853
|
+
}
|
|
854
|
+
exports.getMainService = getMainService;
|
|
855
|
+
/**
|
|
856
|
+
* Returns the oData version of the service (if any) from a given manifest
|
|
857
|
+
* @param manifest - the manifest.json file
|
|
858
|
+
* @returns the OData version
|
|
859
|
+
*/
|
|
860
|
+
function getODataVersionFromManifest(manifest) {
|
|
861
|
+
const mainService = getMainService(manifest);
|
|
862
|
+
if (!mainService) {
|
|
863
|
+
return ux_specification_types_1.OdataVersion.v2;
|
|
864
|
+
}
|
|
865
|
+
const dataSource = manifest[ux_specification_types_2.ManifestSection.app].dataSources?.[mainService];
|
|
866
|
+
return dataSource?.settings?.odataVersion === '4.0' ? ux_specification_types_1.OdataVersion.v4 : ux_specification_types_1.OdataVersion.v2;
|
|
867
|
+
}
|
|
868
|
+
exports.getODataVersionFromManifest = getODataVersionFromManifest;
|
|
817
869
|
/**
|
|
818
870
|
* Determines the template type of a V2 app
|
|
819
871
|
* @param manifest - the manifest.json file
|
|
@@ -822,27 +874,27 @@ exports.getVersionFromManifest = getVersionFromManifest;
|
|
|
822
874
|
*/
|
|
823
875
|
function determineV2Template(manifest, logger) {
|
|
824
876
|
let templateType;
|
|
825
|
-
if (manifest[
|
|
826
|
-
const v2Pages = manifest[
|
|
877
|
+
if (manifest[ux_specification_types_2.ManifestSection.generic]) {
|
|
878
|
+
const v2Pages = manifest[ux_specification_types_2.ManifestSection.generic].pages;
|
|
827
879
|
if (!v2Pages) {
|
|
828
880
|
(0, extensionLogger_1.log)(logger, {
|
|
829
881
|
severity: "error" /* LogSeverity.Error */,
|
|
830
882
|
message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
|
|
831
883
|
location: {
|
|
832
|
-
path:
|
|
833
|
-
range: [
|
|
884
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
885
|
+
range: [ux_specification_types_2.ManifestSection.generic]
|
|
834
886
|
}
|
|
835
887
|
});
|
|
836
888
|
return;
|
|
837
889
|
}
|
|
838
890
|
for (const pageKey in v2Pages) {
|
|
839
891
|
const v2Page = v2Pages[pageKey];
|
|
840
|
-
if (getPageTypeV2(v2Page.component?.name) ===
|
|
841
|
-
templateType =
|
|
892
|
+
if (getPageTypeV2(v2Page.component?.name) === ux_specification_types_2.PageTypeV2.AnalyticalListPage) {
|
|
893
|
+
templateType = ux_specification_types_2.TemplateType.AnalyticalListPageV2;
|
|
842
894
|
break;
|
|
843
895
|
}
|
|
844
|
-
else if (getPageTypeV2(v2Page.component?.name) ===
|
|
845
|
-
templateType =
|
|
896
|
+
else if (getPageTypeV2(v2Page.component?.name) === ux_specification_types_2.PageTypeV2.ListReport) {
|
|
897
|
+
templateType = ux_specification_types_2.TemplateType.ListReportObjectPageV2;
|
|
846
898
|
break;
|
|
847
899
|
}
|
|
848
900
|
}
|
|
@@ -851,10 +903,10 @@ function determineV2Template(manifest, logger) {
|
|
|
851
903
|
if (!templateType) {
|
|
852
904
|
(0, extensionLogger_1.log)(logger, {
|
|
853
905
|
severity: "error" /* LogSeverity.Error */,
|
|
854
|
-
message: i18next_1.default.t('NOTEMPLATE', { section:
|
|
906
|
+
message: i18next_1.default.t('NOTEMPLATE', { section: ux_specification_types_2.ManifestSection.generic }),
|
|
855
907
|
location: {
|
|
856
|
-
path:
|
|
857
|
-
range: [
|
|
908
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
909
|
+
range: [ux_specification_types_2.ManifestSection.generic]
|
|
858
910
|
}
|
|
859
911
|
});
|
|
860
912
|
}
|
|
@@ -870,24 +922,24 @@ exports.determineV2Template = determineV2Template;
|
|
|
870
922
|
function determineV4PageTemplateType(v4Page) {
|
|
871
923
|
let templateType;
|
|
872
924
|
const pageType = getPageTypeV4(v4Page);
|
|
873
|
-
if (pageType ===
|
|
874
|
-
templateType =
|
|
925
|
+
if (pageType === ux_specification_types_2.PageTypeV4.AnalyticalListPage) {
|
|
926
|
+
templateType = ux_specification_types_2.TemplateType.AnalyticalListPageV4;
|
|
875
927
|
}
|
|
876
|
-
else if (pageType ===
|
|
928
|
+
else if (pageType === ux_specification_types_2.PageTypeV4.ListReport) {
|
|
877
929
|
const viewPath = v4Page.options?.settings?.views?.paths?.[0];
|
|
878
|
-
if (viewPath && (viewPath[
|
|
879
|
-
templateType =
|
|
930
|
+
if (viewPath && (viewPath[ux_specification_types_2.ALPViewType.Primary] || viewPath[ux_specification_types_2.ALPViewType.Secondary])) {
|
|
931
|
+
templateType = ux_specification_types_2.TemplateType.AnalyticalListPageV4;
|
|
880
932
|
}
|
|
881
933
|
else {
|
|
882
|
-
templateType =
|
|
934
|
+
templateType = ux_specification_types_2.TemplateType.ListReportObjectPageV4;
|
|
883
935
|
}
|
|
884
936
|
}
|
|
885
|
-
else if (pageType ===
|
|
886
|
-
templateType =
|
|
937
|
+
else if (pageType === ux_specification_types_2.PageTypeV4.ObjectPage) {
|
|
938
|
+
templateType = ux_specification_types_2.TemplateType.ListReportObjectPageV4;
|
|
887
939
|
//fixed now for FEOP scenario, bit continue to check if LR/ALP exists
|
|
888
940
|
}
|
|
889
|
-
else if ([
|
|
890
|
-
templateType =
|
|
941
|
+
else if ([ux_specification_types_2.PageTypeV4.CustomPage, ux_specification_types_2.PageTypeV4.FPMCustomPage].includes(pageType)) {
|
|
942
|
+
templateType = ux_specification_types_2.TemplateType.FreestylePageV4;
|
|
891
943
|
}
|
|
892
944
|
return templateType;
|
|
893
945
|
}
|
|
@@ -915,29 +967,29 @@ function determineV4TemplateFromPages(v4Pages) {
|
|
|
915
967
|
* @returns {TemplateType} the template type
|
|
916
968
|
*/
|
|
917
969
|
function determineV4Template(manifest, logger) {
|
|
918
|
-
const v4Pages = manifest[
|
|
919
|
-
manifest[
|
|
970
|
+
const v4Pages = manifest[ux_specification_types_2.ManifestSection.ui5].routing &&
|
|
971
|
+
manifest[ux_specification_types_2.ManifestSection.ui5].routing.targets;
|
|
920
972
|
// if there are no pages in routing targets, we use LROPV4 as default template type
|
|
921
973
|
if (!v4Pages || Object.keys(v4Pages).length === 0) {
|
|
922
974
|
(0, extensionLogger_1.log)(logger, {
|
|
923
975
|
severity: "info" /* LogSeverity.Info */,
|
|
924
976
|
message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
|
|
925
977
|
location: {
|
|
926
|
-
path:
|
|
927
|
-
range: [
|
|
978
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
979
|
+
range: [ux_specification_types_2.ManifestSection.ui5, 'routing']
|
|
928
980
|
}
|
|
929
981
|
});
|
|
930
|
-
return
|
|
982
|
+
return ux_specification_types_2.TemplateType.ListReportObjectPageV4;
|
|
931
983
|
}
|
|
932
984
|
// else try to determine template type from routing targets
|
|
933
985
|
const templateType = determineV4TemplateFromPages(v4Pages);
|
|
934
986
|
if (!templateType) {
|
|
935
987
|
(0, extensionLogger_1.log)(logger, {
|
|
936
988
|
severity: "error" /* LogSeverity.Error */,
|
|
937
|
-
message: i18next_1.default.t('NOTEMPLATE', { section:
|
|
989
|
+
message: i18next_1.default.t('NOTEMPLATE', { section: ux_specification_types_2.ManifestSection.ui5 }),
|
|
938
990
|
location: {
|
|
939
|
-
path:
|
|
940
|
-
range: [
|
|
991
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
992
|
+
range: [ux_specification_types_2.ManifestSection.ui5, 'routing', 'targets']
|
|
941
993
|
}
|
|
942
994
|
});
|
|
943
995
|
}
|
|
@@ -953,26 +1005,15 @@ exports.determineV4Template = determineV4Template;
|
|
|
953
1005
|
*/
|
|
954
1006
|
function getTemplateTypeFromManifest(manifest, fioriElementsVersion, logger) {
|
|
955
1007
|
let templateType;
|
|
956
|
-
if (manifest[
|
|
957
|
-
templateType =
|
|
1008
|
+
if (manifest[ux_specification_types_2.ManifestSection.ovp]) {
|
|
1009
|
+
templateType = ux_specification_types_2.TemplateType.OverviewPageV2;
|
|
958
1010
|
}
|
|
959
|
-
else if (fioriElementsVersion ===
|
|
1011
|
+
else if (fioriElementsVersion === ux_specification_types_2.FioriElementsVersion.v2) {
|
|
960
1012
|
templateType = determineV2Template(manifest, logger);
|
|
961
1013
|
}
|
|
962
|
-
else if (fioriElementsVersion ===
|
|
1014
|
+
else if (fioriElementsVersion === ux_specification_types_2.FioriElementsVersion.v4) {
|
|
963
1015
|
templateType = determineV4Template(manifest, logger);
|
|
964
1016
|
}
|
|
965
|
-
else {
|
|
966
|
-
if (!templateType) {
|
|
967
|
-
(0, extensionLogger_1.log)(logger, {
|
|
968
|
-
severity: "error" /* LogSeverity.Error */,
|
|
969
|
-
message: i18next_1.default.t('NOFE'),
|
|
970
|
-
location: {
|
|
971
|
-
path: ux_specification_types_1.MANIFESTPATH
|
|
972
|
-
}
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
1017
|
return templateType;
|
|
977
1018
|
}
|
|
978
1019
|
exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
|
|
@@ -984,12 +1025,12 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
|
|
|
984
1025
|
*/
|
|
985
1026
|
function addSectionTitleAndDescription(facet, section, facetKey) {
|
|
986
1027
|
if (facet?.ID) {
|
|
987
|
-
section.title =
|
|
988
|
-
section[
|
|
1028
|
+
section.title = ux_specification_types_2.FacetTitlePrefix + facet.ID;
|
|
1029
|
+
section[ux_specification_types_2.SchemaTag.keys] = [{ name: ux_specification_types_2.SchemaKeyName.id, value: facet.ID }];
|
|
989
1030
|
}
|
|
990
1031
|
else {
|
|
991
1032
|
section.title = facetKey.replace(/@com.sap/g, 'com.sap');
|
|
992
|
-
section[
|
|
1033
|
+
section[ux_specification_types_2.SchemaTag.keys] = [{ name: ux_specification_types_2.SchemaKeyName.id, value: facetKey.replace(ux_specification_types_2.UIVOCABULARYALPHADOT, '') }];
|
|
993
1034
|
}
|
|
994
1035
|
// Description
|
|
995
1036
|
if (facet?.Label) {
|
|
@@ -1036,8 +1077,8 @@ function createDefaultSection(appSchema, facet, facetKey) {
|
|
|
1036
1077
|
properties: {},
|
|
1037
1078
|
additionalProperties: false
|
|
1038
1079
|
};
|
|
1039
|
-
section[
|
|
1040
|
-
section[
|
|
1080
|
+
section[ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
1081
|
+
section[ux_specification_types_2.SchemaTag.annotationPath] = facet.annotationPath;
|
|
1041
1082
|
addTargetTitleAndSectionDescription(facet, section, facetKey);
|
|
1042
1083
|
return section;
|
|
1043
1084
|
}
|
|
@@ -1051,8 +1092,8 @@ exports.createDefaultSection = createDefaultSection;
|
|
|
1051
1092
|
* @param {boolean} [checkUnresolvableFacets=false] - Check and avoid facets and sections without ID and Target.
|
|
1052
1093
|
* @returns {FacetSection[]} - Array of facets or sections
|
|
1053
1094
|
*/
|
|
1054
|
-
function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion =
|
|
1055
|
-
const alias = findAlias(
|
|
1095
|
+
function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_2.FioriElementsVersion.v2, checkUnresolvableFacets = false) {
|
|
1096
|
+
const alias = findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
|
|
1056
1097
|
let sections = [];
|
|
1057
1098
|
if (entityType) {
|
|
1058
1099
|
const facetAnnotation = alias && entityType?.annotations?.[alias]?.Facets;
|
|
@@ -1118,12 +1159,12 @@ exports.deleteEmptyStructure = deleteEmptyStructure;
|
|
|
1118
1159
|
* @return {string} File name of generic schema.
|
|
1119
1160
|
*/
|
|
1120
1161
|
const getGenericSchemaFileName = (schemaType) => {
|
|
1121
|
-
if (schemaType ===
|
|
1122
|
-
return
|
|
1162
|
+
if (schemaType === ux_specification_types_2.SchemaType.FreestylePage) {
|
|
1163
|
+
return ux_specification_types_2.PageTypeV2.CustomPage;
|
|
1123
1164
|
}
|
|
1124
|
-
if (schemaType ===
|
|
1165
|
+
if (schemaType === ux_specification_types_2.SchemaType.FPMCustomPage) {
|
|
1125
1166
|
// FPM custom pages uses generic schema generated for building blocks
|
|
1126
|
-
return
|
|
1167
|
+
return ux_specification_types_2.SchemaType.BuildingBlocks;
|
|
1127
1168
|
}
|
|
1128
1169
|
return `${schemaType}`;
|
|
1129
1170
|
};
|
|
@@ -1140,30 +1181,30 @@ const getSchemaFilePath = (schemaType, pageId, viewId) => {
|
|
|
1140
1181
|
};
|
|
1141
1182
|
switch (schemaType) {
|
|
1142
1183
|
// Application schema
|
|
1143
|
-
case
|
|
1184
|
+
case ux_specification_types_2.SchemaType.Application: {
|
|
1144
1185
|
// File name
|
|
1145
1186
|
schemaFile.filename = `App`;
|
|
1146
1187
|
// Full path
|
|
1147
|
-
schemaFile.path = `./${
|
|
1188
|
+
schemaFile.path = `./${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
|
|
1148
1189
|
break;
|
|
1149
1190
|
}
|
|
1150
1191
|
// List report and object page
|
|
1151
|
-
case
|
|
1152
|
-
case
|
|
1192
|
+
case ux_specification_types_2.SchemaType.ListReport:
|
|
1193
|
+
case ux_specification_types_2.SchemaType.ObjectPage: {
|
|
1153
1194
|
// File name
|
|
1154
1195
|
schemaFile.filename = pageId ? `${schemaType}_${pageId}` : getGenericSchemaFileName(schemaType);
|
|
1155
1196
|
// Full path
|
|
1156
|
-
schemaFile.path = `../${
|
|
1197
|
+
schemaFile.path = `../${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
|
|
1157
1198
|
break;
|
|
1158
1199
|
}
|
|
1159
|
-
case
|
|
1160
|
-
case
|
|
1200
|
+
case ux_specification_types_2.PageTypeV4.FPMCustomPage:
|
|
1201
|
+
case ux_specification_types_2.SchemaType.FPMCustomPage: {
|
|
1161
1202
|
// File name
|
|
1162
1203
|
schemaFile.filename = viewId
|
|
1163
|
-
? `${
|
|
1164
|
-
: getGenericSchemaFileName(
|
|
1204
|
+
? `${ux_specification_types_2.SchemaType.FPMCustomPage}_${viewId}`
|
|
1205
|
+
: getGenericSchemaFileName(ux_specification_types_2.SchemaType.FPMCustomPage);
|
|
1165
1206
|
// Full path
|
|
1166
|
-
schemaFile.path = `../${
|
|
1207
|
+
schemaFile.path = `../${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
|
|
1167
1208
|
break;
|
|
1168
1209
|
}
|
|
1169
1210
|
// Other page configs
|
|
@@ -1171,7 +1212,7 @@ const getSchemaFilePath = (schemaType, pageId, viewId) => {
|
|
|
1171
1212
|
// File name
|
|
1172
1213
|
schemaFile.filename = getGenericSchemaFileName(schemaType);
|
|
1173
1214
|
// Full path
|
|
1174
|
-
schemaFile.path = `../${
|
|
1215
|
+
schemaFile.path = `../${ux_specification_types_2.DirName.Schemas}/${schemaFile.filename}`;
|
|
1175
1216
|
break;
|
|
1176
1217
|
}
|
|
1177
1218
|
}
|
|
@@ -1189,7 +1230,7 @@ exports.getSchemaFilePath = getSchemaFilePath;
|
|
|
1189
1230
|
* @returns {string} Generated page id
|
|
1190
1231
|
*/
|
|
1191
1232
|
function generatePageId(pageType, entitySet, viewId, pageName) {
|
|
1192
|
-
if (pageType ===
|
|
1233
|
+
if (pageType === ux_specification_types_2.PageTypeV2.CustomPage) {
|
|
1193
1234
|
const names = viewId && viewId.split('.');
|
|
1194
1235
|
return names && names[names.length - 1] + 'Page';
|
|
1195
1236
|
}
|
|
@@ -1409,7 +1450,7 @@ exports.convertEnumToCSV = convertEnumToCSV;
|
|
|
1409
1450
|
*/
|
|
1410
1451
|
function convertActionKeyToStableId(actionId) {
|
|
1411
1452
|
if (!actionId) {
|
|
1412
|
-
return;
|
|
1453
|
+
return '';
|
|
1413
1454
|
}
|
|
1414
1455
|
return (actionId.indexOf('??') > -1 ? actionId.split('??')[1] : actionId).replace(/@/g, '::');
|
|
1415
1456
|
}
|
|
@@ -1497,7 +1538,7 @@ exports.getJSONPropertyByPath = getJSONPropertyByPath;
|
|
|
1497
1538
|
* @returns {string} modified string without namespace
|
|
1498
1539
|
*/
|
|
1499
1540
|
function removeNamespaces(sId) {
|
|
1500
|
-
sId = sId.replace(
|
|
1541
|
+
sId = sId.replace(ux_specification_types_2.UIVOCABULARYDOT, '');
|
|
1501
1542
|
sId = sId.replace('com.sap.vocabularies.Communication.v1.', '');
|
|
1502
1543
|
return sId;
|
|
1503
1544
|
}
|
|
@@ -1508,7 +1549,7 @@ exports.removeNamespaces = removeNamespaces;
|
|
|
1508
1549
|
* @returns {string} modified string with replaced namespaces
|
|
1509
1550
|
*/
|
|
1510
1551
|
function replaceNamespaces(sId) {
|
|
1511
|
-
sId = sId.replace(
|
|
1552
|
+
sId = sId.replace(ux_specification_types_2.UIVOCABULARY, 'UI');
|
|
1512
1553
|
sId = sId.replace('com.sap.vocabularies.Communication.v1', 'Communication');
|
|
1513
1554
|
return sId;
|
|
1514
1555
|
}
|