@sap/ux-specification 1.71.67 → 1.71.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/dist/documentation/runDocu-min.js +5 -5
- package/dist/documentation/runDocu-min.js.map +2 -2
- package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
- package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
- package/dist/documentation/v2/v2-ListReport.html +1 -1
- package/dist/documentation/v2/v2-ObjectPage.html +1 -1
- package/dist/documentation/v2/v2-OverviewPage.html +1 -1
- package/dist/index-min.js +42 -42
- package/dist/index-min.js.map +3 -3
- package/dist/scripts/extractDocu.js +18 -5
- package/dist/scripts/extractDocu.js.map +1 -1
- package/dist/scripts/spec.js +1 -2
- package/dist/scripts/spec.js.map +1 -1
- package/dist/scripts/to-json-schema.js +17 -3
- package/dist/scripts/to-json-schema.js.map +1 -1
- package/dist/src/api.js +2 -1
- package/dist/src/api.js.map +1 -1
- package/dist/src/extensionLogger.d.ts +1 -1
- package/dist/src/extensionLogger.d.ts.map +1 -1
- package/dist/src/extensionLogger.js +3 -1
- package/dist/src/extensionLogger.js.map +1 -1
- package/dist/src/i18n/i18n.js +1 -0
- package/dist/src/i18n/i18n.js.map +1 -1
- package/dist/src/index.js +17 -9
- package/dist/src/index.js.map +1 -1
- package/dist/src/project.d.ts.map +1 -1
- package/dist/src/project.js +14 -10
- package/dist/src/project.js.map +1 -1
- package/dist/src/specification/schemaAccess.d.ts +1 -1
- package/dist/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/src/specification/schemaAccess.js +5 -2
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/sync/common/appProvider.js +10 -3
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +2 -2
- package/dist/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/control.js +15 -7
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/decorators.js +13 -6
- package/dist/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/src/sync/common/decoration/factory.js +1 -0
- package/dist/src/sync/common/decoration/factory.js.map +1 -1
- package/dist/src/sync/common/decoration/flex.js +1 -0
- package/dist/src/sync/common/decoration/flex.js.map +1 -1
- package/dist/src/sync/common/decoration/index.js +13 -6
- package/dist/src/sync/common/decoration/index.js.map +1 -1
- package/dist/src/sync/common/flexUtils.js +15 -2
- package/dist/src/sync/common/flexUtils.js.map +1 -1
- package/dist/src/sync/common/generate/index.js +12 -5
- package/dist/src/sync/common/generate/index.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.js +10 -8
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/common/generate/utils.js +14 -13
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/import/utils.js +1 -0
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +15 -17
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/index.js +19 -11
- package/dist/src/sync/common/index.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +2 -1
- package/dist/src/sync/common/types.d.ts.map +1 -1
- package/dist/src/sync/common/types.js +2 -0
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +4 -4
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +165 -95
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/i18n.js +15 -2
- package/dist/src/sync/i18n.js.map +1 -1
- package/dist/src/sync/v2/application.d.ts.map +1 -1
- package/dist/src/sync/v2/application.js +29 -14
- package/dist/src/sync/v2/application.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.js +3 -1
- package/dist/src/sync/v2/export/controls/Action.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +3 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js +1 -0
- package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Card.js +1 -0
- package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Field.js +1 -0
- package/dist/src/sync/v2/export/controls/Field.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.js +1 -0
- package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.js +1 -0
- package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.js +8 -8
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageLayout.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageLayout.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +11 -5
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.js +9 -9
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.js +9 -2
- package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ToolBar.js +1 -0
- package/dist/src/sync/v2/export/controls/ToolBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/index.js +29 -22
- package/dist/src/sync/v2/export/controls/index.js.map +1 -1
- package/dist/src/sync/v2/export/export.js +13 -16
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +3 -3
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/factory.js +15 -2
- package/dist/src/sync/v2/export/factory.js.map +1 -1
- package/dist/src/sync/v2/export/manifest.d.ts +1 -1
- package/dist/src/sync/v2/export/manifest.d.ts.map +1 -1
- package/dist/src/sync/v2/export/manifest.js +9 -4
- package/dist/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +1 -0
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ListReport.js +1 -0
- package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ObjectPage.js +1 -0
- package/dist/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/OverviewPage.js +1 -0
- package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/index.js +14 -7
- package/dist/src/sync/v2/export/pages/index.js.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.js +17 -8
- package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +5 -5
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/generate.js +1 -0
- package/dist/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/src/sync/v2/generate/index.js +8 -7
- package/dist/src/sync/v2/generate/index.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/listReport.js +30 -33
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +9 -7
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/overviewPage.js +1 -0
- package/dist/src/sync/v2/generate/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.js +17 -8
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.js +7 -1
- package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js +1 -0
- package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.js +24 -17
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/controls/table.js +2 -1
- package/dist/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/src/sync/v2/import/index.js +15 -8
- package/dist/src/sync/v2/import/index.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +1 -0
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.js +1 -0
- package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +33 -36
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js +2 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.js +5 -7
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/src/sync/v2/types.js +1 -0
- package/dist/src/sync/v2/types.js.map +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.d.ts +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.js +13 -24
- package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/package.json +8 -8
|
@@ -3,6 +3,7 @@ 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.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV2Template = exports.getVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getSchemaKeyOfLineItemRecord = exports.getManifestSectionByPathV4 = exports.getSectionFacet = exports.findAlias = exports.getPageTypeV2 = exports.getDatafieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.prepareRef = exports.DEFINITION_LINK_PREFIX = exports.TemplateType = void 0;
|
|
6
7
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
7
8
|
const i18next_1 = __importDefault(require("i18next"));
|
|
8
9
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
@@ -29,13 +30,14 @@ exports.prepareRef = prepareRef;
|
|
|
29
30
|
* @param qualifier - Annotation qualifier.
|
|
30
31
|
* @returns Annotation path based on received params
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
const createAnnotationPath = (entityTypeName, term, qualifier) => {
|
|
33
34
|
let annotationPath = `/${entityTypeName}/@${term}`;
|
|
34
35
|
if (qualifier) {
|
|
35
36
|
annotationPath += `#${qualifier}`;
|
|
36
37
|
}
|
|
37
38
|
return annotationPath;
|
|
38
39
|
};
|
|
40
|
+
exports.createAnnotationPath = createAnnotationPath;
|
|
39
41
|
/**
|
|
40
42
|
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools
|
|
41
43
|
* @param annotationFiles - The list of all annotation files, in JSON format
|
|
@@ -53,14 +55,6 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
|
53
55
|
if (parseResult.length > 0) {
|
|
54
56
|
converterOutput = annotation_converter_1.convert(edmx_parser_1.merge(...parseResult));
|
|
55
57
|
}
|
|
56
|
-
if (logger && (converterOutput === null || converterOutput === void 0 ? void 0 : converterOutput.diagnostics)) {
|
|
57
|
-
for (const converterMessage of converterOutput.diagnostics) {
|
|
58
|
-
extensionLogger_1.log(logger, {
|
|
59
|
-
severity: "error" /* Error */,
|
|
60
|
-
message: converterMessage.message
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
58
|
}
|
|
65
59
|
catch (error) {
|
|
66
60
|
extensionLogger_1.log(logger, {
|
|
@@ -71,7 +65,8 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
|
71
65
|
return converterOutput;
|
|
72
66
|
}
|
|
73
67
|
exports.parseAndMergeAndConvert = parseAndMergeAndConvert;
|
|
74
|
-
|
|
68
|
+
const getAnnotationPropertyValue = (annotationProperty) => annotationProperty?.value || annotationProperty?.path;
|
|
69
|
+
exports.getAnnotationPropertyValue = getAnnotationPropertyValue;
|
|
75
70
|
/**
|
|
76
71
|
* Checks for Common.Label and overwrites the label from it if present
|
|
77
72
|
* @param {PropertyAnnotations} annotations - property annotations
|
|
@@ -79,8 +74,7 @@ exports.getAnnotationPropertyValue = (annotationProperty) => (annotationProperty
|
|
|
79
74
|
* @param {string} label - label, to be actualized
|
|
80
75
|
*/
|
|
81
76
|
function evaluateCommonLabel(annotations, entityType, label) {
|
|
82
|
-
|
|
83
|
-
if ((_a = annotations === null || annotations === void 0 ? void 0 : annotations.Common) === null || _a === void 0 ? void 0 : _a.Label) {
|
|
77
|
+
if (annotations?.Common?.Label) {
|
|
84
78
|
if (typeof annotations.Common.Label === 'string') {
|
|
85
79
|
label = annotations.Common.Label;
|
|
86
80
|
}
|
|
@@ -89,11 +83,11 @@ function evaluateCommonLabel(annotations, entityType, label) {
|
|
|
89
83
|
if (targetProperty.value) {
|
|
90
84
|
label = targetProperty.value;
|
|
91
85
|
}
|
|
92
|
-
else if (typeof
|
|
86
|
+
else if (typeof targetProperty.Common?.Label === 'string') {
|
|
93
87
|
label = targetProperty.annotations.Common.Label;
|
|
94
88
|
}
|
|
95
89
|
}
|
|
96
|
-
else if (typeof
|
|
90
|
+
else if (typeof annotations.Common?.Label?.toString() === 'string') {
|
|
97
91
|
label = annotations.Common.Label.toString();
|
|
98
92
|
}
|
|
99
93
|
}
|
|
@@ -121,7 +115,6 @@ exports.getLabelForPropertyPath = getLabelForPropertyPath;
|
|
|
121
115
|
* @returns label, derived from Common.Label or from property value
|
|
122
116
|
*/
|
|
123
117
|
function getLabelForDataField(field, entityType) {
|
|
124
|
-
var _a, _b;
|
|
125
118
|
let label, property;
|
|
126
119
|
if (field['Value']) {
|
|
127
120
|
if (typeof field['Value'] === 'string') {
|
|
@@ -137,7 +130,7 @@ function getLabelForDataField(field, entityType) {
|
|
|
137
130
|
else if (field['Target'] && field['Target'].$target && field['Target'].$target.Value) {
|
|
138
131
|
property = field['Target'].$target.Value.$target;
|
|
139
132
|
}
|
|
140
|
-
if (
|
|
133
|
+
if (property?.annotations?.Common?.Label) {
|
|
141
134
|
label = evaluateCommonLabel(property.annotations, entityType, label);
|
|
142
135
|
}
|
|
143
136
|
return label;
|
|
@@ -150,7 +143,6 @@ exports.getLabelForDataField = getLabelForDataField;
|
|
|
150
143
|
* @returns undefined or the right string value
|
|
151
144
|
*/
|
|
152
145
|
function getLabel(dataFieldLabel, entityType) {
|
|
153
|
-
var _a, _b;
|
|
154
146
|
if (typeof dataFieldLabel === 'string') {
|
|
155
147
|
return dataFieldLabel;
|
|
156
148
|
}
|
|
@@ -161,7 +153,7 @@ function getLabel(dataFieldLabel, entityType) {
|
|
|
161
153
|
}
|
|
162
154
|
else {
|
|
163
155
|
const singleProperty = property[0];
|
|
164
|
-
if (
|
|
156
|
+
if (singleProperty?.annotations?.Common?.Label) {
|
|
165
157
|
const label = dataFieldLabel;
|
|
166
158
|
return evaluateCommonLabel(singleProperty.annotations, entityType, label);
|
|
167
159
|
}
|
|
@@ -204,6 +196,7 @@ function getDatafieldDescription(dataFieldAbstract, entityType) {
|
|
|
204
196
|
title = dataFieldLabel || propertyCommonLabel || dataField.Target.$target.Title || dataField.Target.value;
|
|
205
197
|
break;
|
|
206
198
|
case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */:
|
|
199
|
+
case "com.sap.vocabularies.UI.v1.DataFieldWithAction" /* DataFieldWithAction */:
|
|
207
200
|
case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */:
|
|
208
201
|
dataField = dataFieldAbstract;
|
|
209
202
|
if (dataFieldLabel) {
|
|
@@ -250,7 +243,10 @@ function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = fals
|
|
|
250
243
|
* @returns alias for the given namespace
|
|
251
244
|
*/
|
|
252
245
|
function findAlias(namespace, oDataServiceAVT) {
|
|
253
|
-
|
|
246
|
+
if (!oDataServiceAVT) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
let aliasReference = oDataServiceAVT.references.find((reference) => {
|
|
254
250
|
return reference.namespace === namespace;
|
|
255
251
|
});
|
|
256
252
|
if (!aliasReference) {
|
|
@@ -264,7 +260,7 @@ function findAlias(namespace, oDataServiceAVT) {
|
|
|
264
260
|
namespace.split('SAP__')[namespace.split('SAP__').length - 1].toUpperCase());
|
|
265
261
|
});
|
|
266
262
|
}
|
|
267
|
-
return aliasReference
|
|
263
|
+
return aliasReference?.alias;
|
|
268
264
|
}
|
|
269
265
|
exports.findAlias = findAlias;
|
|
270
266
|
/**
|
|
@@ -275,11 +271,10 @@ exports.findAlias = findAlias;
|
|
|
275
271
|
* @returns the target annotation
|
|
276
272
|
*/
|
|
277
273
|
function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT) {
|
|
278
|
-
var _a;
|
|
279
274
|
const lastNavigationPart = navigationParts[navigationParts.length - 1];
|
|
280
275
|
const annotation = lastNavigationPart.substring(lastNavigationPart.lastIndexOf('.') + 1, lastNavigationPart.length);
|
|
281
276
|
const alias = findAlias(lastNavigationPart.substring(0, lastNavigationPart.lastIndexOf('.')).replace('@', ''), oDataServiceAVT);
|
|
282
|
-
return
|
|
277
|
+
return entityType?.annotations[alias]?.[annotation];
|
|
283
278
|
}
|
|
284
279
|
/**
|
|
285
280
|
* Adjust key by considering navigation
|
|
@@ -300,12 +295,11 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
|
300
295
|
return key;
|
|
301
296
|
}
|
|
302
297
|
function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
303
|
-
var _a;
|
|
304
298
|
let stopProcessing = false;
|
|
305
299
|
const navigationParts = propertyValue.split('/');
|
|
306
300
|
const navigation = navigationParts.length > 1;
|
|
307
301
|
if (navigation) {
|
|
308
|
-
entityType =
|
|
302
|
+
entityType = entityType.resolvePath(propertyValue.substring(0, propertyValue.lastIndexOf('/')))?.targetType;
|
|
309
303
|
}
|
|
310
304
|
key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
|
|
311
305
|
const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
|
|
@@ -358,7 +352,13 @@ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, log
|
|
|
358
352
|
}
|
|
359
353
|
key = key.replace(/\//gi, '::');
|
|
360
354
|
return key
|
|
361
|
-
?
|
|
355
|
+
? {
|
|
356
|
+
key,
|
|
357
|
+
...(facetDefinition.Label && { label: facetDefinition.Label.toString() }),
|
|
358
|
+
...(facetDefinition.ID && { ID: facetDefinition.ID.toString() }),
|
|
359
|
+
entityType
|
|
360
|
+
}
|
|
361
|
+
: undefined;
|
|
362
362
|
}
|
|
363
363
|
exports.getSectionFacet = getSectionFacet;
|
|
364
364
|
/**
|
|
@@ -372,7 +372,7 @@ exports.getSectionFacet = getSectionFacet;
|
|
|
372
372
|
* @param {boolean} importScenario - indicates if the function is called for the import, else it is the export
|
|
373
373
|
* @returns returns section of the manifest based on path, generates an empty object in case it does not exists
|
|
374
374
|
*/
|
|
375
|
-
|
|
375
|
+
const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
376
376
|
if (!path) {
|
|
377
377
|
return undefined;
|
|
378
378
|
}
|
|
@@ -399,6 +399,7 @@ exports.getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAn
|
|
|
399
399
|
}
|
|
400
400
|
return manifestSection;
|
|
401
401
|
};
|
|
402
|
+
exports.getManifestSectionByPathV4 = getManifestSectionByPathV4;
|
|
402
403
|
function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
403
404
|
let schemaKey, target, value;
|
|
404
405
|
switch (lineItemRecord.$Type) {
|
|
@@ -448,13 +449,63 @@ function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
|
448
449
|
}
|
|
449
450
|
exports.getSchemaKeyOfLineItemRecord = getSchemaKeyOfLineItemRecord;
|
|
450
451
|
/**
|
|
451
|
-
*
|
|
452
|
-
* @param {
|
|
453
|
-
* @param {
|
|
454
|
-
* @param {
|
|
455
|
-
* @
|
|
456
|
-
|
|
452
|
+
* Determines if type of given annotation term is of UIAnnotationTerm
|
|
453
|
+
* @param {string} path path in manifest
|
|
454
|
+
* @param {string} alias for a given namespace
|
|
455
|
+
* @param {EntityType} entityType - the entity type
|
|
456
|
+
* @returns UI annotation term type
|
|
457
|
+
*/
|
|
458
|
+
function getUIAnnotationTerm(path, alias, entityType) {
|
|
459
|
+
if (path.includes("com.sap.vocabularies.UI.v1.Chart" /* Chart */) || path.includes(alias + '.Chart')) {
|
|
460
|
+
return "com.sap.vocabularies.UI.v1.Chart" /* Chart */;
|
|
461
|
+
}
|
|
462
|
+
else if (path.includes("com.sap.vocabularies.UI.v1.Identification" /* Identification */) || path.includes(alias + '.Identification')) {
|
|
463
|
+
return "com.sap.vocabularies.UI.v1.Identification" /* Identification */;
|
|
464
|
+
}
|
|
465
|
+
else if ((entityType && path.includes("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */)) || path.includes(alias + '.LineItem')) {
|
|
466
|
+
return "com.sap.vocabularies.UI.v1.LineItem" /* LineItem */;
|
|
467
|
+
}
|
|
468
|
+
else if (path.includes("com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */) || path.includes(alias + '.FieldGroup')) {
|
|
469
|
+
return "com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */;
|
|
470
|
+
}
|
|
471
|
+
else if (path.includes("com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */) || path.includes(alias + '.DataPoint')) {
|
|
472
|
+
return "com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */;
|
|
473
|
+
}
|
|
474
|
+
else if (path.includes("com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */) || path.includes(alias + '.PresentationVariant')) {
|
|
475
|
+
return "com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */;
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
return undefined;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Determines if type of given annotation term is of CommunicationAnnotationTerm
|
|
483
|
+
* @param {string} path path in manifest
|
|
484
|
+
* @param {string} alias for a given namespace
|
|
485
|
+
* @param {EntityType} entityType - the entity type
|
|
486
|
+
* @returns Communication annotation term type
|
|
457
487
|
*/
|
|
488
|
+
function getCommunicationAnnotationTerm(path, alias) {
|
|
489
|
+
if (path.includes('com.sap.vocabularies.Communication.v1.Contact') || path.includes(alias + '.Contact')) {
|
|
490
|
+
return "com.sap.vocabularies.Communication.v1.Contact" /* Contact */;
|
|
491
|
+
}
|
|
492
|
+
else if (path.includes('com.sap.vocabularies.Communication.v1.Address') || path.includes(alias + '.Address')) {
|
|
493
|
+
return "com.sap.vocabularies.Communication.v1.Address" /* Address */;
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
return undefined;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Determines the type of given annotation term
|
|
501
|
+
* @param {string} path path in manifest
|
|
502
|
+
* @param {string} alias for a given namespace
|
|
503
|
+
* @param {EntityType} entityType - the entity type
|
|
504
|
+
* @returns annotation term type
|
|
505
|
+
*/
|
|
506
|
+
function getAnnotationTerm(path, alias, entityType) {
|
|
507
|
+
return getUIAnnotationTerm(path, alias, entityType) || getCommunicationAnnotationTerm(path, alias);
|
|
508
|
+
}
|
|
458
509
|
/**
|
|
459
510
|
* Evaluates the target annotation of a reference facet and actualizes the facets for the config
|
|
460
511
|
* @param {AnnotationTerm} annotationRecord - the actual annotation record
|
|
@@ -465,55 +516,70 @@ exports.getSchemaKeyOfLineItemRecord = getSchemaKeyOfLineItemRecord;
|
|
|
465
516
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
466
517
|
*/
|
|
467
518
|
function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
468
|
-
var _a, _b, _c, _d, _e, _f;
|
|
469
519
|
const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
|
|
470
520
|
let path = section ? section.key : '';
|
|
471
521
|
const targetEntityType = section.entityType;
|
|
522
|
+
const annotationTerm = getAnnotationTerm(path, alias, entityType);
|
|
472
523
|
let annotation, targetAnnotation;
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
path
|
|
524
|
+
switch (annotationTerm) {
|
|
525
|
+
case "com.sap.vocabularies.UI.v1.Chart" /* Chart */: {
|
|
526
|
+
facets[path] = { base: types_1.FacetBase.Chart };
|
|
527
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
528
|
+
facets[path].entityType = targetEntityType;
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
531
|
+
case "com.sap.vocabularies.UI.v1.Identification" /* Identification */: {
|
|
532
|
+
annotation = path.split('.')[path.split('.').length - 1];
|
|
533
|
+
facets[path] = { base: types_1.FacetBase.Identification };
|
|
534
|
+
facets[path].entityType = targetEntityType;
|
|
535
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
case "com.sap.vocabularies.UI.v1.LineItem" /* LineItem */: {
|
|
539
|
+
if (!path.includes("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) && path.includes('.LineItem')) {
|
|
540
|
+
const pathParts = path.split('::');
|
|
541
|
+
pathParts[pathParts.length - 1] = `@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`;
|
|
542
|
+
path = pathParts.join('::');
|
|
543
|
+
}
|
|
544
|
+
facets[path] = { base: types_1.FacetBase.LineItem };
|
|
545
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
546
|
+
facets[path].entityType = targetEntityType;
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
case "com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */: {
|
|
550
|
+
facets[path] = { base: types_1.FacetBase.Form };
|
|
551
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
552
|
+
facets[path].entityType = targetEntityType;
|
|
553
|
+
break;
|
|
554
|
+
}
|
|
555
|
+
case "com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */: {
|
|
556
|
+
facets[path] = { base: types_1.FacetBase.DataPoint };
|
|
557
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
558
|
+
facets[path].entityType = targetEntityType;
|
|
559
|
+
facets[path].Label = annotationRecord?.Target?.$target['Title'];
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
562
|
+
case "com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */: {
|
|
563
|
+
facets[path] = { base: types_1.FacetBase.PresentationVariant };
|
|
564
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
565
|
+
facets[path].entityType = targetEntityType;
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
case "com.sap.vocabularies.Communication.v1.Contact" /* Contact */: {
|
|
569
|
+
facets[path] = { base: types_1.FacetBase.Contact };
|
|
570
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
571
|
+
facets[path].entityType = targetEntityType;
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
case "com.sap.vocabularies.Communication.v1.Address" /* Address */: {
|
|
575
|
+
facets[path] = { base: types_1.FacetBase.Address };
|
|
576
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
577
|
+
facets[path].entityType = targetEntityType;
|
|
578
|
+
break;
|
|
579
|
+
}
|
|
580
|
+
default: {
|
|
581
|
+
facets[path] = { base: types_1.FacetBase.Unknown };
|
|
489
582
|
}
|
|
490
|
-
facets[path] = { base: types_1.FacetBase.LineItem };
|
|
491
|
-
facets[path].target = (_a = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _a === void 0 ? void 0 : _a.$target;
|
|
492
|
-
facets[path].entityType = targetEntityType;
|
|
493
|
-
}
|
|
494
|
-
else if (path.includes("com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */) || path.includes(alias + '.FieldGroup')) {
|
|
495
|
-
facets[path] = { base: types_1.FacetBase.Form };
|
|
496
|
-
facets[path].target = (_b = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _b === void 0 ? void 0 : _b.$target;
|
|
497
|
-
facets[path].entityType = targetEntityType;
|
|
498
|
-
}
|
|
499
|
-
else if (path.includes("com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */) || path.includes(alias + '.DataPoint')) {
|
|
500
|
-
facets[path] = { base: types_1.FacetBase.DataPoint };
|
|
501
|
-
facets[path].target = (_c = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _c === void 0 ? void 0 : _c.$target;
|
|
502
|
-
facets[path].entityType = targetEntityType;
|
|
503
|
-
facets[path].Label = (_d = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _d === void 0 ? void 0 : _d.$target['Title'];
|
|
504
|
-
}
|
|
505
|
-
else if (path.includes('com.sap.vocabularies.Communication.v1.Contact') || path.includes(alias + '.Contact')) {
|
|
506
|
-
facets[path] = { base: types_1.FacetBase.Contact };
|
|
507
|
-
facets[path].target = (_e = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _e === void 0 ? void 0 : _e.$target;
|
|
508
|
-
facets[path].entityType = targetEntityType;
|
|
509
|
-
}
|
|
510
|
-
else if (path.includes('com.sap.vocabularies.Communication.v1.Address') || path.includes(alias + '.Address')) {
|
|
511
|
-
facets[path] = { base: types_1.FacetBase.Address };
|
|
512
|
-
facets[path].target = (_f = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _f === void 0 ? void 0 : _f.$target;
|
|
513
|
-
facets[path].entityType = targetEntityType;
|
|
514
|
-
}
|
|
515
|
-
else {
|
|
516
|
-
facets[path] = { base: types_1.FacetBase.Unknown };
|
|
517
583
|
}
|
|
518
584
|
if (facets[path]) {
|
|
519
585
|
facets[path].annotationPath = `/${annotationRecord.fullyQualifiedName.replace('@com.sap.vocabularies', types_1.VOCWITHSLASH)}`;
|
|
@@ -546,7 +612,6 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
546
612
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
547
613
|
*/
|
|
548
614
|
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
549
|
-
var _a;
|
|
550
615
|
const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
|
|
551
616
|
if (section) {
|
|
552
617
|
switch (annotationRecord.$Type) {
|
|
@@ -563,7 +628,7 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
|
|
|
563
628
|
annotationPath: annotationPath,
|
|
564
629
|
Label: section.label
|
|
565
630
|
});
|
|
566
|
-
|
|
631
|
+
annotationRecord.Facets?.forEach((collectionItem) => {
|
|
567
632
|
addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityType, facet.facets, oDataVersion, logger);
|
|
568
633
|
});
|
|
569
634
|
break;
|
|
@@ -707,17 +772,17 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
|
|
|
707
772
|
* @param facetKey - key of the facet
|
|
708
773
|
*/
|
|
709
774
|
function addSectionTitleAndDescription(facet, section, facetKey) {
|
|
710
|
-
if (facet
|
|
775
|
+
if (facet?.ID) {
|
|
711
776
|
section.title = types_1.FacetTitlePrefix + facet.ID;
|
|
712
777
|
}
|
|
713
778
|
else {
|
|
714
779
|
section.title = facetKey.replace(/@com.sap/g, 'com.sap');
|
|
715
780
|
}
|
|
716
781
|
// Description
|
|
717
|
-
if (facet
|
|
782
|
+
if (facet?.Label) {
|
|
718
783
|
section.description = facet.Label;
|
|
719
784
|
}
|
|
720
|
-
else if (facet
|
|
785
|
+
else if (facet?.ID) {
|
|
721
786
|
section.description = facet.ID;
|
|
722
787
|
}
|
|
723
788
|
else {
|
|
@@ -732,15 +797,14 @@ exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
|
|
|
732
797
|
* @param facetKey - key of the facet
|
|
733
798
|
*/
|
|
734
799
|
function addTargetTitleAndSectionDescription(facet, section, facetKey) {
|
|
735
|
-
var _a;
|
|
736
800
|
addSectionTitleAndDescription(facet, section, facetKey);
|
|
737
|
-
if (facet
|
|
738
|
-
section.description = facet
|
|
801
|
+
if (facet?.Label) {
|
|
802
|
+
section.description = facet?.Label;
|
|
739
803
|
}
|
|
740
|
-
else if (facet
|
|
804
|
+
else if (facet?.['Title']) {
|
|
741
805
|
section.description = facet['Title'];
|
|
742
806
|
}
|
|
743
|
-
else if (
|
|
807
|
+
else if (facet?.target?.['Title']) {
|
|
744
808
|
section.description = facet.target['Title'];
|
|
745
809
|
}
|
|
746
810
|
}
|
|
@@ -809,7 +873,7 @@ exports.getObjectPageFacetSection = getObjectPageFacetSection;
|
|
|
809
873
|
* @param targetAnnotation - target annotation (optional, in case of sections, subsections)
|
|
810
874
|
* @param targetAnnotationEncoded - encoded version of the target annotation, as represented in the manifest
|
|
811
875
|
*/
|
|
812
|
-
|
|
876
|
+
const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
813
877
|
if (!path) {
|
|
814
878
|
return;
|
|
815
879
|
}
|
|
@@ -836,6 +900,7 @@ exports.deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotati
|
|
|
836
900
|
manifestSection = manifestSection && manifestSection[decodedElement];
|
|
837
901
|
});
|
|
838
902
|
};
|
|
903
|
+
exports.deleteEmptyStructure = deleteEmptyStructure;
|
|
839
904
|
/**
|
|
840
905
|
* Method which returns generic schema file name.
|
|
841
906
|
* @param {SchemaType | PageType} schemaType Schema type or Page type.
|
|
@@ -850,7 +915,7 @@ const getGenericSchemaFileName = (schemaType) => {
|
|
|
850
915
|
* @param {string} [entitySet] Entity set string.
|
|
851
916
|
* @return {SchemaFilePath} File path info.
|
|
852
917
|
*/
|
|
853
|
-
|
|
918
|
+
const getSchemaFilePath = (schemaType, entitySet) => {
|
|
854
919
|
const schemaFile = {
|
|
855
920
|
filename: '',
|
|
856
921
|
path: ''
|
|
@@ -885,6 +950,7 @@ exports.getSchemaFilePath = (schemaType, entitySet) => {
|
|
|
885
950
|
schemaFile.path += '.json';
|
|
886
951
|
return schemaFile;
|
|
887
952
|
};
|
|
953
|
+
exports.getSchemaFilePath = getSchemaFilePath;
|
|
888
954
|
/**
|
|
889
955
|
* Method which generates id of page according to passed parameters.
|
|
890
956
|
* @param appVersion - Fiori Elements version - V2 or V4.
|
|
@@ -957,7 +1023,6 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
|
|
|
957
1023
|
* @returns {NextDefinition} - Next target definition to process
|
|
958
1024
|
*/
|
|
959
1025
|
function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema, title, currentConfigObject, key, factory, pageType, propertyDefinition) {
|
|
960
|
-
var _a, _b, _c, _d;
|
|
961
1026
|
let nextDefinition = {
|
|
962
1027
|
configObject: undefined,
|
|
963
1028
|
targetDefinition: {},
|
|
@@ -966,7 +1031,7 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
966
1031
|
if (definitionArray.length) {
|
|
967
1032
|
const lastDefinition = definitionArray[definitionArray.length - 1];
|
|
968
1033
|
nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
|
|
969
|
-
if (
|
|
1034
|
+
if (nextDefinition?.targetDefinition?.['$ref'] || nextDefinition?.targetDefinition?.['type'] === 'array') {
|
|
970
1035
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
971
1036
|
nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
|
|
972
1037
|
return nextDefinition;
|
|
@@ -974,15 +1039,19 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
974
1039
|
if (definitionArray.length > 1) {
|
|
975
1040
|
definitionArray.forEach((element) => {
|
|
976
1041
|
if (element !== '') {
|
|
977
|
-
nextDefinition.targetDefinition['properties'] =
|
|
1042
|
+
nextDefinition.targetDefinition['properties'] = {
|
|
1043
|
+
...nextDefinition.targetDefinition['properties'],
|
|
1044
|
+
...appSchema['definitions'][element]['properties']
|
|
1045
|
+
};
|
|
978
1046
|
}
|
|
979
1047
|
});
|
|
980
1048
|
}
|
|
981
|
-
nextDefinition.title =
|
|
1049
|
+
nextDefinition.title = nextDefinition?.targetDefinition?.['title']
|
|
1050
|
+
? nextDefinition.targetDefinition['title']
|
|
982
1051
|
: title;
|
|
983
|
-
const factoryKey = lastDefinition
|
|
1052
|
+
const factoryKey = lastDefinition?.split('<')[0];
|
|
984
1053
|
const targetObject = currentConfigObject ? currentConfigObject : {};
|
|
985
|
-
nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject,
|
|
1054
|
+
nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject, nextDefinition?.targetDefinition?.['controlProperty']);
|
|
986
1055
|
}
|
|
987
1056
|
else {
|
|
988
1057
|
//e.g. sections ==> loop over all properties = subsections or other
|
|
@@ -1026,7 +1095,7 @@ exports.getNextTargetDefinition = getNextTargetDefinition;
|
|
|
1026
1095
|
* @param {*} options options object provided by deepmerge's merge function
|
|
1027
1096
|
* @returns
|
|
1028
1097
|
*/
|
|
1029
|
-
|
|
1098
|
+
const arrayCombineMerge = (target, source, options) => {
|
|
1030
1099
|
const destination = target.slice();
|
|
1031
1100
|
source.forEach((item, index) => {
|
|
1032
1101
|
if (typeof destination[index] === 'undefined') {
|
|
@@ -1041,6 +1110,7 @@ exports.arrayCombineMerge = (target, source, options) => {
|
|
|
1041
1110
|
});
|
|
1042
1111
|
return destination;
|
|
1043
1112
|
};
|
|
1113
|
+
exports.arrayCombineMerge = arrayCombineMerge;
|
|
1044
1114
|
/**
|
|
1045
1115
|
* Converts an enum into a CSV
|
|
1046
1116
|
* @param {object} manifestSection - manifestSection where the key exists
|