@sap/ux-specification 1.71.102 → 1.71.104
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 +45 -1
- package/README.md +16 -17
- package/dist/documentation/runDocu-min.js +5 -5
- package/dist/documentation/runDocu-min.js.map +4 -4
- package/dist/documentation/styleDocu.css +2 -1
- 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/index-min.js +39 -39
- package/dist/index-min.js.map +4 -4
- package/dist/package.json +4 -4
- package/dist/schemas/v2/ObjectPageConfig.json +113 -8
- package/dist/src/api.d.ts +20 -3
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +45 -4
- package/dist/src/api.js.map +1 -1
- package/dist/src/specification/schemaAccess.d.ts +1 -0
- package/dist/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/src/specification/schemaAccess.js +1 -0
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/sync/common/i18n.json +1 -0
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +16 -0
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +10 -6
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +23 -13
- package/dist/src/sync/common/utils.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 +11 -2
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.js +10 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderSection.d.ts +20 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderSection.d.ts.map +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderSection.js +127 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderSection.js.map +1 -0
- package/dist/src/sync/v2/export/controls/index.d.ts +1 -0
- package/dist/src/sync/v2/export/controls/index.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/index.js +1 -0
- package/dist/src/sync/v2/export/controls/index.js.map +1 -1
- package/dist/src/sync/v2/export/export.d.ts +3 -1
- package/dist/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/src/sync/v2/export/export.js +37 -14
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.d.ts +40 -4
- package/dist/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +106 -43
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +107 -14
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +3 -1
- package/dist/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/utils.js +33 -25
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +61 -8
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/types.d.ts +10 -1
- package/dist/src/sync/v2/types.d.ts.map +1 -1
- package/dist/src/sync/v2/types.js +7 -0
- package/dist/src/sync/v2/types.js.map +1 -1
- package/package.json +4 -4
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/ux-specification",
|
|
3
|
-
"version": "1.71.
|
|
3
|
+
"version": "1.71.104",
|
|
4
4
|
"displayName": "SAP Fiori tools - Specification",
|
|
5
5
|
"description": "SAP Fiori tools - Specification",
|
|
6
6
|
"files": [
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"publisher": "SAPSE",
|
|
48
48
|
"license": "SEE LICENSE IN LICENSE",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@sap-ux/vocabularies-types": "0.10.
|
|
50
|
+
"@sap-ux/vocabularies-types": "0.10.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@sap
|
|
54
|
-
"@sap/
|
|
53
|
+
"@sap/ux-specification-types": "1.71.104",
|
|
54
|
+
"@sap-ux/annotation-converter": "0.8.6",
|
|
55
55
|
"@sap-ux/edmx-parser": "0.7.0",
|
|
56
56
|
"@types/d3": "7.4.3",
|
|
57
57
|
"@types/jquery": "3.5.29",
|
|
@@ -139,6 +139,15 @@
|
|
|
139
139
|
"actions": {
|
|
140
140
|
"$ref": "#/definitions/GenericActions",
|
|
141
141
|
"description": "Set properties of actions on Object Page Header"
|
|
142
|
+
},
|
|
143
|
+
"showHeaderAsCarouselOnDesktop": {
|
|
144
|
+
"description": "Enable the carousel header on the desktop",
|
|
145
|
+
"descriptionSrcURL": "https://ui5.sap.com/#/topic/17dbd5b7a61e4cdcb079062e976cd63f",
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"artifactType": "Manifest"
|
|
148
|
+
},
|
|
149
|
+
"sections": {
|
|
150
|
+
"$ref": "#/definitions/HeaderSections"
|
|
142
151
|
}
|
|
143
152
|
},
|
|
144
153
|
"additionalProperties": false
|
|
@@ -258,6 +267,110 @@
|
|
|
258
267
|
},
|
|
259
268
|
"additionalProperties": false
|
|
260
269
|
},
|
|
270
|
+
"HeaderSections": {
|
|
271
|
+
"description": "Header Sections",
|
|
272
|
+
"isViewNode": true,
|
|
273
|
+
"type": "object",
|
|
274
|
+
"additionalProperties": {
|
|
275
|
+
"anyOf": [
|
|
276
|
+
{
|
|
277
|
+
"$ref": "#/definitions/CommonHeaderFacetSettings"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"$ref": "#/definitions/ObjectPageHeaderSection"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"$ref": "#/definitions/ObjectPageCustomHeaderSectionFragment"
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"CommonHeaderFacetSettings": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"properties": {
|
|
291
|
+
"visible": {
|
|
292
|
+
"pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#%? _|,<>'()[\\]\\/:=.]+}$",
|
|
293
|
+
"anyOf": [
|
|
294
|
+
{
|
|
295
|
+
"enum": [
|
|
296
|
+
false,
|
|
297
|
+
true,
|
|
298
|
+
"{ui>/editable}",
|
|
299
|
+
"{= !${ui>/editable}}"
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"type": "string"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"description": "Specifies whether the facet is visible or not",
|
|
307
|
+
"artifactType": "FlexChange",
|
|
308
|
+
"controlType": "sap.m.VBox"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"additionalProperties": false
|
|
312
|
+
},
|
|
313
|
+
"ObjectPageHeaderSection": {
|
|
314
|
+
"description": "Subsection",
|
|
315
|
+
"isViewNode": true,
|
|
316
|
+
"type": "object",
|
|
317
|
+
"properties": {
|
|
318
|
+
"subsections": {
|
|
319
|
+
"$ref": "#/definitions/HeaderSections"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"additionalProperties": false
|
|
323
|
+
},
|
|
324
|
+
"ObjectPageCustomHeaderSectionFragment": {
|
|
325
|
+
"description": "Custom Section fragment",
|
|
326
|
+
"isViewNode": true,
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"className": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"const": "sap.ui.core.Fragment"
|
|
332
|
+
},
|
|
333
|
+
"fragmentName": {
|
|
334
|
+
"type": "string"
|
|
335
|
+
},
|
|
336
|
+
"type": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"const": "XML"
|
|
339
|
+
},
|
|
340
|
+
"relatedFacet": {
|
|
341
|
+
"type": "string"
|
|
342
|
+
},
|
|
343
|
+
"relativePosition": {
|
|
344
|
+
"$ref": "#/definitions/SectionPosition"
|
|
345
|
+
},
|
|
346
|
+
"title": {
|
|
347
|
+
"description": "The label of the custom section, preferably as an i18n key",
|
|
348
|
+
"i18nClassification": "TIT: Custom section title",
|
|
349
|
+
"type": "string"
|
|
350
|
+
},
|
|
351
|
+
"visible": {
|
|
352
|
+
"description": "Specifies whether the facet is visible or not",
|
|
353
|
+
"type": "boolean"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"additionalProperties": false,
|
|
357
|
+
"required": [
|
|
358
|
+
"className",
|
|
359
|
+
"fragmentName",
|
|
360
|
+
"relatedFacet",
|
|
361
|
+
"relativePosition",
|
|
362
|
+
"title",
|
|
363
|
+
"type"
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
"SectionPosition": {
|
|
367
|
+
"enum": [
|
|
368
|
+
"AfterFacet",
|
|
369
|
+
"BeforeFacet",
|
|
370
|
+
"ReplaceFacet"
|
|
371
|
+
],
|
|
372
|
+
"type": "string"
|
|
373
|
+
},
|
|
261
374
|
"ObjectPageLayout": {
|
|
262
375
|
"description": "Page Layout",
|
|
263
376
|
"isViewNode": true,
|
|
@@ -1455,14 +1568,6 @@
|
|
|
1455
1568
|
],
|
|
1456
1569
|
"type": "string"
|
|
1457
1570
|
},
|
|
1458
|
-
"SectionPosition": {
|
|
1459
|
-
"enum": [
|
|
1460
|
-
"AfterFacet",
|
|
1461
|
-
"BeforeFacet",
|
|
1462
|
-
"ReplaceFacet"
|
|
1463
|
-
],
|
|
1464
|
-
"type": "string"
|
|
1465
|
-
},
|
|
1466
1571
|
"ObjectPageCustomSectionFragment": {
|
|
1467
1572
|
"description": "Fragment",
|
|
1468
1573
|
"isViewNode": true,
|
package/dist/src/api.d.ts
CHANGED
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import type { ExportResults, File, GenerateSchemaParameters, ExportConfigParameters, ImportConfigParameters, ImportProjectParameters, ApiVersion } from '@sap/ux-specification-types';
|
|
1
|
+
import type { ExportResults, File, GenerateSchemaParameters, ExportConfigParameters, ImportConfigParameters, ImportProjectParameters, ApiVersion, ExportConfigWithPath } from '@sap/ux-specification-types';
|
|
2
2
|
/**
|
|
3
3
|
* Return the generic (project independent) JSON schema
|
|
4
4
|
* @param specification - reference to spec
|
|
5
5
|
* @param version - Fiori elements version (v2)
|
|
6
6
|
* @param schemaType - type of the schema, e.g. ListReport, ObjectPage
|
|
7
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
7
8
|
*/
|
|
8
9
|
export { getGenericSchema } from './specification/schemaAccess';
|
|
9
10
|
/**
|
|
10
11
|
* Generate JSON schema for a given Fiori elements version and page type
|
|
11
12
|
* @param generateParameters: the input structure that contains the version, schema type, and parameters
|
|
13
|
+
* @returns the app-specific schema for the given schema type and page
|
|
12
14
|
*/
|
|
13
15
|
export declare function generateSchema(generateParameters: GenerateSchemaParameters): object;
|
|
14
16
|
/**
|
|
15
|
-
* Exports
|
|
17
|
+
* Exports the whole config (src/*.json, src/pages/*.json) to flex changes and/or manifest settings
|
|
16
18
|
* @param exportParameters - parameters to control the export
|
|
19
|
+
* @returns a bundle of all actual objects of any artifact type
|
|
17
20
|
*/
|
|
18
21
|
export declare function exportConfig(exportParameters: ExportConfigParameters): ExportResults;
|
|
22
|
+
/**
|
|
23
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
24
|
+
* @param exportParameters - parameters to control the export
|
|
25
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
26
|
+
*/
|
|
27
|
+
export declare function exportConfigEntityByPath(exportParameters: ExportConfigWithPath): ExportResults;
|
|
28
|
+
/**
|
|
29
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
30
|
+
* @param exportParameters - parameters to control the export
|
|
31
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare function deleteConfigEntityByPath(exportParameters: ExportConfigWithPath): ExportResults;
|
|
19
35
|
/**
|
|
20
36
|
* Imports manifest settings and flex changes to a config (src/*.json, src/pages/*.json)
|
|
21
37
|
* @param importParameters - parameters to control the import
|
|
38
|
+
* @returns the generated config json file
|
|
22
39
|
*/
|
|
23
40
|
export declare function importConfig(importParameters: ImportConfigParameters): object | undefined;
|
|
24
41
|
/**
|
|
@@ -35,7 +52,7 @@ export declare function importProject(importParameters: ImportProjectParameters)
|
|
|
35
52
|
export declare function importProjectSchema(importParameters: ImportProjectParameters): Promise<File[]>;
|
|
36
53
|
/**
|
|
37
54
|
* Returns specification API version.
|
|
38
|
-
* @
|
|
55
|
+
* @returns {ApiVersion} Object of API version.
|
|
39
56
|
*/
|
|
40
57
|
export declare function getApiVersion(): ApiVersion;
|
|
41
58
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/src/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EAEV,oBAAoB,EACvB,MAAM,6BAA6B,CAAC;AAgBrC;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,kBAAkB,EAAE,wBAAwB,GAAG,MAAM,CAgCnF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,aAAa,CAWpF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,aAAa,CAY9F;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,aAAa,CAY9F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAkBzF;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAE9F;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,gBAAgB,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAEpG;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAI1C"}
|
package/dist/src/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getApiVersion = exports.importProjectSchema = exports.importProject = exports.importConfig = exports.exportConfig = exports.generateSchema = exports.getGenericSchema = void 0;
|
|
3
|
+
exports.getApiVersion = exports.importProjectSchema = exports.importProject = exports.importConfig = exports.deleteConfigEntityByPath = exports.exportConfigEntityByPath = exports.exportConfig = exports.generateSchema = exports.getGenericSchema = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* This file implements the interface 'Specification' from ./types and serves as API to specification
|
|
6
6
|
*/
|
|
@@ -14,12 +14,14 @@ const common_1 = require("./sync/common");
|
|
|
14
14
|
* @param specification - reference to spec
|
|
15
15
|
* @param version - Fiori elements version (v2)
|
|
16
16
|
* @param schemaType - type of the schema, e.g. ListReport, ObjectPage
|
|
17
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
17
18
|
*/
|
|
18
19
|
var schemaAccess_1 = require("./specification/schemaAccess");
|
|
19
20
|
Object.defineProperty(exports, "getGenericSchema", { enumerable: true, get: function () { return schemaAccess_1.getGenericSchema; } });
|
|
20
21
|
/**
|
|
21
22
|
* Generate JSON schema for a given Fiori elements version and page type
|
|
22
23
|
* @param generateParameters: the input structure that contains the version, schema type, and parameters
|
|
24
|
+
* @returns the app-specific schema for the given schema type and page
|
|
23
25
|
*/
|
|
24
26
|
function generateSchema(generateParameters) {
|
|
25
27
|
let schema;
|
|
@@ -49,8 +51,9 @@ function generateSchema(generateParameters) {
|
|
|
49
51
|
}
|
|
50
52
|
exports.generateSchema = generateSchema;
|
|
51
53
|
/**
|
|
52
|
-
* Exports
|
|
54
|
+
* Exports the whole config (src/*.json, src/pages/*.json) to flex changes and/or manifest settings
|
|
53
55
|
* @param exportParameters - parameters to control the export
|
|
56
|
+
* @returns a bundle of all actual objects of any artifact type
|
|
54
57
|
*/
|
|
55
58
|
function exportConfig(exportParameters) {
|
|
56
59
|
let exportResults;
|
|
@@ -65,9 +68,47 @@ function exportConfig(exportParameters) {
|
|
|
65
68
|
return exportResults;
|
|
66
69
|
}
|
|
67
70
|
exports.exportConfig = exportConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
73
|
+
* @param exportParameters - parameters to control the export
|
|
74
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
75
|
+
*/
|
|
76
|
+
function exportConfigEntityByPath(exportParameters) {
|
|
77
|
+
let exportResults = ux_specification_types_1.defaultExportResult;
|
|
78
|
+
const ui5Config = { ui5Version: exportParameters.ui5Version, layer: exportParameters.layer };
|
|
79
|
+
if (exportParameters[ux_specification_types_1.FioriElementsVersion.v2]) {
|
|
80
|
+
/**
|
|
81
|
+
* Handle v2 export
|
|
82
|
+
*/
|
|
83
|
+
const v2Params = exportParameters[ux_specification_types_1.FioriElementsVersion.v2];
|
|
84
|
+
exportResults = (0, exportPage_1.exportConfigEntityByPathV2)(v2Params, ui5Config);
|
|
85
|
+
}
|
|
86
|
+
return exportResults;
|
|
87
|
+
}
|
|
88
|
+
exports.exportConfigEntityByPath = exportConfigEntityByPath;
|
|
89
|
+
/**
|
|
90
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
91
|
+
* @param exportParameters - parameters to control the export
|
|
92
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
function deleteConfigEntityByPath(exportParameters) {
|
|
96
|
+
let exportResults = ux_specification_types_1.defaultExportResult;
|
|
97
|
+
const ui5Config = { ui5Version: exportParameters.ui5Version, layer: exportParameters.layer };
|
|
98
|
+
if (exportParameters[ux_specification_types_1.FioriElementsVersion.v2]) {
|
|
99
|
+
/**
|
|
100
|
+
* Handle v2 export
|
|
101
|
+
*/
|
|
102
|
+
const v2Params = exportParameters[ux_specification_types_1.FioriElementsVersion.v2];
|
|
103
|
+
exportResults = (0, exportPage_1.exportConfigEntityByPathV2)(v2Params, ui5Config, true);
|
|
104
|
+
}
|
|
105
|
+
return exportResults;
|
|
106
|
+
}
|
|
107
|
+
exports.deleteConfigEntityByPath = deleteConfigEntityByPath;
|
|
68
108
|
/**
|
|
69
109
|
* Imports manifest settings and flex changes to a config (src/*.json, src/pages/*.json)
|
|
70
110
|
* @param importParameters - parameters to control the import
|
|
111
|
+
* @returns the generated config json file
|
|
71
112
|
*/
|
|
72
113
|
function importConfig(importParameters) {
|
|
73
114
|
let config;
|
|
@@ -112,11 +153,11 @@ async function importProjectSchema(importParameters) {
|
|
|
112
153
|
exports.importProjectSchema = importProjectSchema;
|
|
113
154
|
/**
|
|
114
155
|
* Returns specification API version.
|
|
115
|
-
* @
|
|
156
|
+
* @returns {ApiVersion} Object of API version.
|
|
116
157
|
*/
|
|
117
158
|
function getApiVersion() {
|
|
118
159
|
return {
|
|
119
|
-
version: '
|
|
160
|
+
version: '14'
|
|
120
161
|
};
|
|
121
162
|
}
|
|
122
163
|
exports.getApiVersion = getApiVersion;
|
package/dist/src/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wEAAoG;AAYpG,iDAK4B;AAC5B,4DAAuF;AACvF,6CAK0B;AAC1B,0CAA6G;AAE7G;;;;;;GAMG;AACH,6DAAgE;AAAvD,gHAAA,gBAAgB,OAAA;AAEzB;;;;GAIG;AACH,SAAgB,cAAc,CAAC,kBAA4C;IACvE,IAAI,MAAc,CAAC;IACnB,IAAI,kBAAkB,CAAC,6CAAoB,CAAC,EAAE,CAAC,EAAE;QAC7C;;WAEG;QACH,MAAM,QAAQ,GAAG,kBAAkB,CAAC,6CAAoB,CAAC,EAAE,CAAC,CAAC;QAC7D,IAAI,QAAQ,CAAC,mCAAU,CAAC,UAAU,CAAC,EAAE;YACjC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GACxE,QAAQ,CAAC,mCAAU,CAAC,UAAU,CAAC,CAAC;YACpC,MAAM,GAAG,IAAA,wCAA6B,EAAC,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;SAC9G;aAAM,IAAI,QAAQ,CAAC,mCAAU,CAAC,U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,GAAG,gBAAgB,CAAC,6CAAoB,CAAC,EAAE,CAAC,CAAC;QAC3D,IAAI,QAAQ,CAAC,mCAAU,CAAC,UAAU,CAAC,EAAE;YACjC,MAAM,GAAG,IAAA,+BAAwB,EAAC,QAAQ,CAAC,mCAAU,CAAC,UAAU,CAAC,CAAC,CAAC;SACtE;aAAM,IAAI,QAAQ,CAAC,mCAAU,CAAC,UAAU,CAAC,EAAE;YACxC,MAAM,GAAG,IAAA,iCAAwB,EAAC,QAAQ,CAAC,mCAAU,CAAC,UAAU,CAAC,CAAC,CAAC;SACtE;aAAM,IAAI,QAAQ,CAAC,mCAAU,CAAC,YAAY,CAAC,EAAE;YAC1C,MAAM,GAAG,IAAA,iCAA0B,EAAC,QAAQ,CAAC,mCAAU,CAAC,YAAY,CAAC,CAAC,CAAC;SAC1E;aAAM,IAAI,QAAQ,CAAC,mCAAU,CAAC,kBAAkB,CAAC,EAAE;YAChD,MAAM,GAAG,IAAA,uCAAgC,EAAC,QAAQ,CAAC,mCAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;SACtF;KACJ;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAlBD,oCAkBC;AAED;;;;GAIG;AACI,KAAK,UAAU,aAAa,CAAC,gBAAyC;IACzE,OAAO,IAAA,qCAA4B,EAAC,gBAAgB,CAAC,CAAC;AAC1D,CAAC;AAFD,sCAEC;AAED;;;;GAIG;AACI,KAAK,UAAU,mBAAmB,CAAC,gBAAyC;IAC/E,OAAO,IAAA,4BAAuB,EAAC,gBAAgB,CAAC,CAAC;AACrD,CAAC;AAFD,kDAEC;AAED;;;GAGG;AACH,SAAgB,aAAa;IACzB,OAAO;QACH,OAAO,EAAE,IAAI;KAChB,CAAC;AACN,CAAC;AAJD,sCAIC"}
|
|
@@ -10,6 +10,7 @@ export declare const getPathToGenericSchema: (version: FioriElementsVersion, sch
|
|
|
10
10
|
* Return the generic schema for a given version and type
|
|
11
11
|
* @param version - Fiori elements version, e.g. v2 or v4
|
|
12
12
|
* @param schemaType - Type of the schema, e.g Application, ListReport, ObjectPage, ...
|
|
13
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
13
14
|
*/
|
|
14
15
|
export declare const getGenericSchema: (version: FioriElementsVersion, schemaType: SchemaType) => Promise<JSON>;
|
|
15
16
|
//# sourceMappingURL=schemaAccess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaAccess.d.ts","sourceRoot":"","sources":["../../../src/specification/schemaAccess.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YACtB,oBAAoB,cACjB,UAAU,cACX,MAAM,KAClB,MAAM,GAAG,SAgBX,CAAC;AAkBF
|
|
1
|
+
{"version":3,"file":"schemaAccess.d.ts","sourceRoot":"","sources":["../../../src/specification/schemaAccess.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YACtB,oBAAoB,cACjB,UAAU,cACX,MAAM,KAClB,MAAM,GAAG,SAgBX,CAAC;AAkBF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAAmB,oBAAoB,cAAc,UAAU,KAAG,QAAQ,IAAI,CAO1G,CAAC"}
|
|
@@ -49,6 +49,7 @@ const readJsonSchema = async (path) => {
|
|
|
49
49
|
* Return the generic schema for a given version and type
|
|
50
50
|
* @param version - Fiori elements version, e.g. v2 or v4
|
|
51
51
|
* @param schemaType - Type of the schema, e.g Application, ListReport, ObjectPage, ...
|
|
52
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
52
53
|
*/
|
|
53
54
|
const getGenericSchema = async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C;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,KAAK,EAAE,OAA6B,EAAE,UAAsB,EAAiB,EAAE;IAC3G,IAAI;QACA,MAAM,IAAI,GAAG,IAAA,8BAAsB,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACpE,OAAO,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,iCAAiC,UAAU,cAAc,OAAO,eAAe,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;KACnH;AACL,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"WRONGMINUI5VERSION": "The minUI5Version {{- minUI5Version}} from manifest.json does not fit to the given version of @sap/ux-specification, update the specification version in package.json",
|
|
3
3
|
"UNKNOWNMINUI5VERSION": "The minUI5Version can not be determined from the pattern {{- minUI5Version}}",
|
|
4
|
+
"INVALIDSPECFORV4": "The given specification version cannot be used for apps of OData V4, upgrade to SAPUI5 version 1.84 or higher and update the version of @sap/ux-specification accordingly.",
|
|
4
5
|
"NOBASEPATH": "No base path was passed in the API call for creating a custom call, app id = '{{- appId}}'",
|
|
5
6
|
"NOPAGES": "No pages found in manifest for app with id '{{- appId}}'",
|
|
6
7
|
"NOFE": "The manifest passed is not correct for Fiori Elements V2: section sap.ui.generic.app is missing",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importProject.d.ts","sourceRoot":"","sources":["../../../../src/sync/common/importProject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EACR,IAAI,EACJ,uBAAuB,EAG1B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"importProject.d.ts","sourceRoot":"","sources":["../../../../src/sync/common/importProject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EACR,IAAI,EACJ,uBAAuB,EAG1B,MAAM,6BAA6B,CAAC;AA2GrC,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,GAAG,SAAS,CAEhH;AAuMD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,uBAAuB,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA0B3G;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAAC,uBAAuB,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAyCpH"}
|
|
@@ -163,6 +163,16 @@ async function generateAppSchemas(generateParameters, uiEntityTypes, templateTyp
|
|
|
163
163
|
const genericSchemas = await getGenericSchemas(templateType, generateParameters.fioriElementsVersion);
|
|
164
164
|
return generateAppSchemasV2(generateParameters, genericSchemas, uiEntityTypes, templateType);
|
|
165
165
|
}
|
|
166
|
+
else {
|
|
167
|
+
const message = i18next_1.default.t('INVALIDSPECFORV4');
|
|
168
|
+
(0, extensionLogger_1.log)(generateParameters.logger, {
|
|
169
|
+
severity: "info" /* LogSeverity.Info */,
|
|
170
|
+
message,
|
|
171
|
+
location: {
|
|
172
|
+
path: ux_specification_types_1.PACKAGEJSON
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
166
176
|
}
|
|
167
177
|
/**
|
|
168
178
|
* Imports manifest and flex changes into configuration files with aid of the relevant app provider
|
|
@@ -237,6 +247,9 @@ async function importProjectSchema(importProjectParameters) {
|
|
|
237
247
|
featureToggles
|
|
238
248
|
};
|
|
239
249
|
const appSchemas = await generateAppSchemas(generateParameters, uiEntityTypes, templateType);
|
|
250
|
+
if (!appSchemas) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
240
253
|
return getFileList(appSchemas);
|
|
241
254
|
}
|
|
242
255
|
exports.importProjectSchema = importProjectSchema;
|
|
@@ -266,6 +279,9 @@ async function importProjectSchemaAndConfig(importProjectParameters) {
|
|
|
266
279
|
};
|
|
267
280
|
const uiEntityTypes = getAnnotationsForUi(oDataServiceAVT);
|
|
268
281
|
const appSchemas = await generateAppSchemas(generateParameters, uiEntityTypes, templateType);
|
|
282
|
+
if (!appSchemas) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
269
285
|
//Import to configs
|
|
270
286
|
const importConfigsParameters = {
|
|
271
287
|
manifest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importProject.js","sourceRoot":"","sources":["../../../../src/sync/common/importProject.ts"],"names":[],"mappings":";;;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"importProject.js","sourceRoot":"","sources":["../../../../src/sync/common/importProject.ts"],"names":[],"mappings":";;;;;;AAOA,wEAWqC;AACrC,6CAKwB;AACxB,8DAAqF;AACrF,8DAA6D;AAE7D,mCAMiB;AACjB,sDAA8B;AAC9B,0CAA2C;AAC3C,mEAAoE;AACpE,yDAAsD;AACtD,2DAA4C;AAW5C;;;;;GAKG;AACH,KAAK,UAAU,iBAAiB,CAC5B,YAA0B,EAC1B,oBAA0C;IAE1C,MAAM,cAAc,GAAY,EAAE,CAAC;IACnC,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,WAAW,GAAG,CAAC,mCAAU,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,YAAY,EAAE;QAClB,KAAK,qCAAY,CAAC,sBAAsB;YACpC,WAAW,CAAC,IAAI,CAAC,mCAAU,CAAC,UAAU,EAAE,mCAAU,CAAC,UAAU,CAAC,CAAC;YAC/D,MAAM;QACV,KAAK,qCAAY,CAAC,oBAAoB;YAClC,WAAW,CAAC,IAAI,CAAC,mCAAU,CAAC,kBAAkB,EAAE,mCAAU,CAAC,UAAU,CAAC,CAAC;YACvE,M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Path, PropertyAnnotationValue } from '@sap-ux/vocabularies-types';
|
|
7
7
|
import type { PropertyAnnotations } from '@sap-ux/vocabularies-types/vocabularies/Edm_Types';
|
|
8
8
|
export declare const DEFINITION_LINK_PREFIX = "#/definitions/";
|
|
9
|
+
export declare const arrayIncludes: (arr: string[], target: string[]) => boolean;
|
|
9
10
|
/**
|
|
10
11
|
* Function returns annotation path for schema based on received params.
|
|
11
12
|
* @param entityTypeName - Entity type name.
|
|
@@ -157,12 +158,15 @@ export declare function createDefaultSection(appSchema: Definition, facet: Facet
|
|
|
157
158
|
export declare function getObjectPageFacetSection(entityType: EntityType, oDataServiceAVT: ConvertedMetadata, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, checkUnresolvableFacets?: boolean): FacetSection[];
|
|
158
159
|
/**
|
|
159
160
|
* Cleans empty sub-structures from the export result for manifest
|
|
160
|
-
* @param manifest - manifest.json part of the export result
|
|
161
|
-
* @param path - path in the manifest
|
|
162
|
-
* @param
|
|
163
|
-
* @param
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
* @param {object} manifest - manifest.json part of the export result
|
|
162
|
+
* @param {string} path - path in the manifest
|
|
163
|
+
* @param {boolean} deletionRequest - if set to true, any manifest setting specified by entityPath gets deleted even if it comprises any unknown property
|
|
164
|
+
* @param {string[]} entityPathArray (optional) - array of elements, describing a path to a subsection of the config.
|
|
165
|
+
* If specified, only elements from this subsection are getting deleted
|
|
166
|
+
* @param {string} targetAnnotation (optional) - target annotation (optional, in case of sections, subsections)
|
|
167
|
+
* @param {string} targetAnnotationEncoded (optional) - encoded version of the target annotation, as represented in the manifest
|
|
168
|
+
*/
|
|
169
|
+
export declare const deleteEmptyStructure: (manifest: object, path: string, deletionRequest: boolean, entityPathArray?: string[], targetAnnotation?: string, targetAnnotationEncoded?: string) => void;
|
|
166
170
|
/**
|
|
167
171
|
* Method which returns schema file name and path depending on passed schema or page type.
|
|
168
172
|
* @param {SchemaType | PageType} schemaType Schema type or Page type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/sync/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,cAAc,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAMH,YAAY,EAKZ,oBAAoB,EAEpB,UAAU,EAEV,UAAU,EAGb,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACR,SAAS,EACT,sBAAsB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/sync/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,cAAc,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAMH,YAAY,EAKZ,oBAAoB,EAEpB,UAAU,EAEV,UAAU,EAGb,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACR,SAAS,EACT,sBAAsB,EAGtB,UAAU,EAEb,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EACR,iBAAiB,EACjB,UAAU,EAEV,YAAY,EACZ,uBAAuB,EAC1B,MAAM,4BAA4B,CAAC;AASpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAE7F,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,eAAO,MAAM,aAAa,QAAS,MAAM,EAAE,UAAU,MAAM,EAAE,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,wBAAgB,gBAAgB,CAAC,eAAe,KAAA,EAAE,UAAU,KAAA,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAK/E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK/E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAM/E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIrD"}
|
|
@@ -3,7 +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.replaceNamespaces = exports.removeNamespaces = exports.updatePropertyIndices = 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.prepareRef = exports.getDatafieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.DEFINITION_LINK_PREFIX = void 0;
|
|
6
|
+
exports.replaceNamespaces = exports.removeNamespaces = exports.updatePropertyIndices = 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.prepareRef = exports.getDatafieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.arrayIncludes = exports.DEFINITION_LINK_PREFIX = void 0;
|
|
7
7
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
8
8
|
const i18next_1 = __importDefault(require("i18next"));
|
|
9
9
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
@@ -11,6 +11,8 @@ const annotation_converter_1 = require("@sap-ux/annotation-converter");
|
|
|
11
11
|
const edmx_parser_1 = require("@sap-ux/edmx-parser");
|
|
12
12
|
const extensionLogger_1 = require("../../extensionLogger");
|
|
13
13
|
exports.DEFINITION_LINK_PREFIX = '#/definitions/';
|
|
14
|
+
const arrayIncludes = (arr, target) => target.every((v) => arr.includes(v));
|
|
15
|
+
exports.arrayIncludes = arrayIncludes;
|
|
14
16
|
/**
|
|
15
17
|
* Function returns annotation path for schema based on received params.
|
|
16
18
|
* @param entityTypeName - Entity type name.
|
|
@@ -820,15 +822,18 @@ exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
|
|
|
820
822
|
*/
|
|
821
823
|
function addTargetTitleAndSectionDescription(facet, section, facetKey) {
|
|
822
824
|
addSectionTitleAndDescription(facet, section, facetKey);
|
|
823
|
-
if (facet?.Label) {
|
|
824
|
-
|
|
825
|
+
if (facet?.ID || facet?.Label) {
|
|
826
|
+
return;
|
|
825
827
|
}
|
|
826
|
-
|
|
827
|
-
section.description = facet
|
|
828
|
+
if (facet?.Title) {
|
|
829
|
+
section.description = facet.Title;
|
|
828
830
|
}
|
|
829
831
|
else if (facet?.target?.['Title']) {
|
|
830
832
|
section.description = facet.target['Title'];
|
|
831
833
|
}
|
|
834
|
+
else if (facet?.target?.['Label']) {
|
|
835
|
+
section.description = facet.target['Label'];
|
|
836
|
+
}
|
|
832
837
|
}
|
|
833
838
|
exports.addTargetTitleAndSectionDescription = addTargetTitleAndSectionDescription;
|
|
834
839
|
/**
|
|
@@ -854,7 +859,7 @@ function createDefaultSection(appSchema, facet, facetKey) {
|
|
|
854
859
|
section[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
855
860
|
}
|
|
856
861
|
section[ux_specification_types_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
857
|
-
|
|
862
|
+
addTargetTitleAndSectionDescription(facet, section, facetKey);
|
|
858
863
|
return section;
|
|
859
864
|
}
|
|
860
865
|
exports.createDefaultSection = createDefaultSection;
|
|
@@ -890,12 +895,15 @@ function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVer
|
|
|
890
895
|
exports.getObjectPageFacetSection = getObjectPageFacetSection;
|
|
891
896
|
/**
|
|
892
897
|
* Cleans empty sub-structures from the export result for manifest
|
|
893
|
-
* @param manifest - manifest.json part of the export result
|
|
894
|
-
* @param path - path in the manifest
|
|
895
|
-
* @param
|
|
896
|
-
* @param
|
|
898
|
+
* @param {object} manifest - manifest.json part of the export result
|
|
899
|
+
* @param {string} path - path in the manifest
|
|
900
|
+
* @param {boolean} deletionRequest - if set to true, any manifest setting specified by entityPath gets deleted even if it comprises any unknown property
|
|
901
|
+
* @param {string[]} entityPathArray (optional) - array of elements, describing a path to a subsection of the config.
|
|
902
|
+
* If specified, only elements from this subsection are getting deleted
|
|
903
|
+
* @param {string} targetAnnotation (optional) - target annotation (optional, in case of sections, subsections)
|
|
904
|
+
* @param {string} targetAnnotationEncoded (optional) - encoded version of the target annotation, as represented in the manifest
|
|
897
905
|
*/
|
|
898
|
-
const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
906
|
+
const deleteEmptyStructure = (manifest, path, deletionRequest, entityPathArray, targetAnnotation, targetAnnotationEncoded) => {
|
|
899
907
|
if (!path) {
|
|
900
908
|
return;
|
|
901
909
|
}
|
|
@@ -908,7 +916,9 @@ const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotation
|
|
|
908
916
|
if (!manifestSection[decodedElement]) {
|
|
909
917
|
return;
|
|
910
918
|
}
|
|
911
|
-
if (Object.keys(manifestSection[decodedElement]).length === 0
|
|
919
|
+
if (Object.keys(manifestSection[decodedElement]).length === 0 ||
|
|
920
|
+
//deletion explicitly requested by using entityPath
|
|
921
|
+
(entityPathArray && entityPathArray[entityPathArray.length - 1] === decodedElement && deletionRequest)) {
|
|
912
922
|
if (Array.isArray(manifestSection)) {
|
|
913
923
|
manifestSection.splice(Number(decodedElement), 1);
|
|
914
924
|
}
|
|
@@ -916,7 +926,7 @@ const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotation
|
|
|
916
926
|
delete manifestSection[decodedElement];
|
|
917
927
|
}
|
|
918
928
|
pathArray.pop();
|
|
919
|
-
(0, exports.deleteEmptyStructure)(manifest, pathArray.join('/'), targetAnnotation, targetAnnotationEncoded);
|
|
929
|
+
(0, exports.deleteEmptyStructure)(manifest, pathArray.join('/'), deletionRequest, entityPathArray, targetAnnotation, targetAnnotationEncoded);
|
|
920
930
|
return;
|
|
921
931
|
}
|
|
922
932
|
manifestSection = manifestSection && manifestSection[decodedElement];
|