@sap/ux-specification 1.120.5 → 1.120.6
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 +30 -0
- package/README.md +17 -18
- 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 +93 -93
- package/dist/index-min.js.map +3 -3
- package/dist/package.json +3 -4
- package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -3
- package/dist/schemas/v2/ListReportConfig.json +5 -5
- package/dist/schemas/v2/ObjectPageConfig.json +5 -5
- package/dist/src/api.d.ts +20 -3
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +60 -5
- 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/utils.d.ts +10 -6
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +15 -8
- 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/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 -44
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/types.d.ts +2 -0
- package/dist/src/sync/v2/types.d.ts.map +1 -1
- package/dist/src/sync/v2/types.js.map +1 -1
- package/dist/src/sync/v4/export/export.d.ts +12 -7
- package/dist/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/src/sync/v4/export/export.js +120 -112
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/src/sync/v4/export/fpmCustomPage.js +2 -1
- package/dist/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/src/sync/v4/export/types.d.ts +2 -0
- package/dist/src/sync/v4/export/types.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/listReport.js +0 -4
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/package.json +3 -4
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/ux-specification",
|
|
3
|
-
"version": "1.120.
|
|
3
|
+
"version": "1.120.6",
|
|
4
4
|
"displayName": "SAP Fiori tools - Specification",
|
|
5
5
|
"description": "SAP Fiori tools - Specification",
|
|
6
6
|
"files": [
|
|
@@ -51,18 +51,17 @@
|
|
|
51
51
|
"publisher": "SAPSE",
|
|
52
52
|
"license": "SEE LICENSE IN LICENSE",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@sap-ux/fe-fpm-writer": "0.24.
|
|
54
|
+
"@sap-ux/fe-fpm-writer": "0.24.9",
|
|
55
55
|
"@sap-ux/vocabularies-types": "0.10.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@sap-ux/annotation-converter": "0.8.6",
|
|
59
59
|
"@sap-ux/edmx-parser": "0.7.0",
|
|
60
|
-
"@sap/ux-specification-types": "1.120.
|
|
60
|
+
"@sap/ux-specification-types": "1.120.6",
|
|
61
61
|
"@sapui5/ts-types-esm": "1.120.6",
|
|
62
62
|
"@types/d3": "7.4.3",
|
|
63
63
|
"@types/jquery": "3.5.29",
|
|
64
64
|
"@types/mem-fs-editor": "7.0.7",
|
|
65
|
-
"@types/semver": "7.5.7",
|
|
66
65
|
"@ui5/flexibility-utils": "0.1.3",
|
|
67
66
|
"@xml-tools/ast": "5.0.5",
|
|
68
67
|
"@xml-tools/parser": "1.0.11",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
176
176
|
},
|
|
177
177
|
"copy": {
|
|
178
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
178
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
179
179
|
"type": "boolean",
|
|
180
180
|
"artifactType": "Manifest"
|
|
181
181
|
},
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
755
755
|
},
|
|
756
756
|
"copy": {
|
|
757
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
757
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
758
758
|
"type": "boolean",
|
|
759
759
|
"artifactType": "Manifest"
|
|
760
760
|
},
|
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
883
883
|
},
|
|
884
884
|
"copy": {
|
|
885
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
885
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
886
886
|
"type": "boolean",
|
|
887
887
|
"artifactType": "Manifest"
|
|
888
888
|
},
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
529
529
|
},
|
|
530
530
|
"copy": {
|
|
531
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
531
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
532
532
|
"type": "boolean",
|
|
533
533
|
"artifactType": "Manifest"
|
|
534
534
|
},
|
|
@@ -1096,7 +1096,7 @@
|
|
|
1096
1096
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
1097
1097
|
},
|
|
1098
1098
|
"copy": {
|
|
1099
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1099
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1100
1100
|
"type": "boolean",
|
|
1101
1101
|
"artifactType": "Manifest"
|
|
1102
1102
|
},
|
|
@@ -1193,7 +1193,7 @@
|
|
|
1193
1193
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
1194
1194
|
},
|
|
1195
1195
|
"copy": {
|
|
1196
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1196
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1197
1197
|
"type": "boolean",
|
|
1198
1198
|
"artifactType": "Manifest"
|
|
1199
1199
|
},
|
|
@@ -1326,7 +1326,7 @@
|
|
|
1326
1326
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
1327
1327
|
},
|
|
1328
1328
|
"copy": {
|
|
1329
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1329
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1330
1330
|
"type": "boolean",
|
|
1331
1331
|
"artifactType": "Manifest"
|
|
1332
1332
|
},
|
|
@@ -1492,7 +1492,7 @@
|
|
|
1492
1492
|
"controlType": "sap.ui.comp.smarttable.SmartTable"
|
|
1493
1493
|
},
|
|
1494
1494
|
"copy": {
|
|
1495
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1495
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1496
1496
|
"type": "boolean",
|
|
1497
1497
|
"artifactType": "Manifest"
|
|
1498
1498
|
},
|
|
@@ -769,7 +769,7 @@
|
|
|
769
769
|
"artifactType": "Manifest"
|
|
770
770
|
},
|
|
771
771
|
"copy": {
|
|
772
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
772
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
773
773
|
"type": "boolean",
|
|
774
774
|
"artifactType": "Manifest"
|
|
775
775
|
},
|
|
@@ -1222,7 +1222,7 @@
|
|
|
1222
1222
|
"artifactType": "Manifest"
|
|
1223
1223
|
},
|
|
1224
1224
|
"copy": {
|
|
1225
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1225
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1226
1226
|
"type": "boolean",
|
|
1227
1227
|
"artifactType": "Manifest"
|
|
1228
1228
|
},
|
|
@@ -1313,7 +1313,7 @@
|
|
|
1313
1313
|
"artifactType": "Manifest"
|
|
1314
1314
|
},
|
|
1315
1315
|
"copy": {
|
|
1316
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1316
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1317
1317
|
"type": "boolean",
|
|
1318
1318
|
"artifactType": "Manifest"
|
|
1319
1319
|
},
|
|
@@ -1404,7 +1404,7 @@
|
|
|
1404
1404
|
"artifactType": "Manifest"
|
|
1405
1405
|
},
|
|
1406
1406
|
"copy": {
|
|
1407
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1407
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1408
1408
|
"type": "boolean",
|
|
1409
1409
|
"artifactType": "Manifest"
|
|
1410
1410
|
},
|
|
@@ -1495,7 +1495,7 @@
|
|
|
1495
1495
|
"artifactType": "Manifest"
|
|
1496
1496
|
},
|
|
1497
1497
|
"copy": {
|
|
1498
|
-
"description": "If copy is set to true, the Copy button is shown in the table toolbar.",
|
|
1498
|
+
"description": "If copy is set to true, the Copy to Clipboard button is shown in the table toolbar.\nBy default, the Copy to Clipboard button is displayed in the table toolbar if the selection mode is configured for the corresponding table.",
|
|
1499
1499
|
"type": "boolean",
|
|
1500
1500
|
"artifactType": "Manifest"
|
|
1501
1501
|
},
|
package/dist/src/api.d.ts
CHANGED
|
@@ -1,25 +1,42 @@
|
|
|
1
|
-
import type { ExportResults, File, GenerateSchemaParameters, ExportConfigParameters, ImportConfigParameters, ImportProjectParameters, ApiVersion, GenerateCustomExtensionParams } from '@sap/ux-specification-types';
|
|
1
|
+
import type { ExportResults, File, GenerateSchemaParameters, ExportConfigParameters, ImportConfigParameters, ImportProjectParameters, ApiVersion, GenerateCustomExtensionParams, ExportConfigWithPath } from '@sap/ux-specification-types';
|
|
2
2
|
import type { Editor } from 'mem-fs-editor';
|
|
3
3
|
/**
|
|
4
4
|
* Return the generic (project independent) JSON schema
|
|
5
5
|
* @param specification - reference to spec
|
|
6
6
|
* @param version - Fiori elements version (v2 or v4)
|
|
7
7
|
* @param schemaType - type of the schema, e.g. ListReport, ObjectPage
|
|
8
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
8
9
|
*/
|
|
9
10
|
export { getGenericSchema } from './specification/schemaAccess';
|
|
10
11
|
/**
|
|
11
12
|
* Generate JSON schema for a given Fiori elements version and page type
|
|
12
13
|
* @param generateParameters: the input structure that contains the version, schema type, and parameters
|
|
14
|
+
* @returns the app-specific schema for the given schema type and page
|
|
13
15
|
*/
|
|
14
16
|
export declare function generateSchema(generateParameters: GenerateSchemaParameters): object;
|
|
15
17
|
/**
|
|
16
|
-
* Exports
|
|
18
|
+
* Exports the whole config (src/*.json, src/pages/*.json) to flex changes and/or manifest settings
|
|
17
19
|
* @param exportParameters - parameters to control the export
|
|
20
|
+
* @returns a bundle of all actual objects of any artifact type
|
|
18
21
|
*/
|
|
19
22
|
export declare function exportConfig(exportParameters: ExportConfigParameters): ExportResults;
|
|
23
|
+
/**
|
|
24
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
25
|
+
* @param exportParameters - parameters to control the export
|
|
26
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
27
|
+
*/
|
|
28
|
+
export declare function exportConfigEntityByPath(exportParameters: ExportConfigWithPath): ExportResults;
|
|
29
|
+
/**
|
|
30
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
31
|
+
* @param exportParameters - parameters to control the export
|
|
32
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export declare function deleteConfigEntityByPath(exportParameters: ExportConfigWithPath): ExportResults;
|
|
20
36
|
/**
|
|
21
37
|
* Imports manifest settings and flex changes to a config (src/*.json, src/pages/*.json)
|
|
22
38
|
* @param importParameters - parameters to control the import
|
|
39
|
+
* @returns the generated config json file
|
|
23
40
|
*/
|
|
24
41
|
export declare function importConfig(importParameters: ImportConfigParameters): object | undefined;
|
|
25
42
|
/**
|
|
@@ -36,7 +53,7 @@ export declare function importProject(importParameters: ImportProjectParameters)
|
|
|
36
53
|
export declare function importProjectSchema(importParameters: ImportProjectParameters): Promise<File[]>;
|
|
37
54
|
/**
|
|
38
55
|
* Returns specification API version.
|
|
39
|
-
* @
|
|
56
|
+
* @returns {ApiVersion} Object of API version.
|
|
40
57
|
*/
|
|
41
58
|
export declare function getApiVersion(): ApiVersion;
|
|
42
59
|
/**
|
package/dist/src/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAER,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EAEV,6BAA6B,EAC7B,oBAAoB,EACvB,MAAM,6BAA6B,CAAC;AA2BrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA8B5C;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,kBAAkB,EAAE,wBAAwB,GAAG,MAAM,CA2GnF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,aAAa,CAiBpF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,aAAa,CAkB9F;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,aAAa,CAkB9F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAgCzF;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,CAK1C;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,qBAAqB,EAAE,6BAA6B,GAAG,MAAM,GAAG,SAAS,CAYhH"}
|
package/dist/src/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateCustomExtension = exports.getApiVersion = exports.importProjectSchema = exports.importProject = exports.importConfig = exports.exportConfig = exports.generateSchema = exports.getGenericSchema = void 0;
|
|
3
|
+
exports.generateCustomExtension = 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
|
*/
|
|
@@ -30,12 +30,14 @@ const FPMWriterMap = new Map([
|
|
|
30
30
|
* @param specification - reference to spec
|
|
31
31
|
* @param version - Fiori elements version (v2 or v4)
|
|
32
32
|
* @param schemaType - type of the schema, e.g. ListReport, ObjectPage
|
|
33
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
33
34
|
*/
|
|
34
35
|
var schemaAccess_1 = require("./specification/schemaAccess");
|
|
35
36
|
Object.defineProperty(exports, "getGenericSchema", { enumerable: true, get: function () { return schemaAccess_1.getGenericSchema; } });
|
|
36
37
|
/**
|
|
37
38
|
* Generate JSON schema for a given Fiori elements version and page type
|
|
38
39
|
* @param generateParameters: the input structure that contains the version, schema type, and parameters
|
|
40
|
+
* @returns the app-specific schema for the given schema type and page
|
|
39
41
|
*/
|
|
40
42
|
function generateSchema(generateParameters) {
|
|
41
43
|
let schema;
|
|
@@ -92,8 +94,9 @@ function generateSchema(generateParameters) {
|
|
|
92
94
|
}
|
|
93
95
|
exports.generateSchema = generateSchema;
|
|
94
96
|
/**
|
|
95
|
-
* Exports
|
|
97
|
+
* Exports the whole config (src/*.json, src/pages/*.json) to flex changes and/or manifest settings
|
|
96
98
|
* @param exportParameters - parameters to control the export
|
|
99
|
+
* @returns a bundle of all actual objects of any artifact type
|
|
97
100
|
*/
|
|
98
101
|
function exportConfig(exportParameters) {
|
|
99
102
|
let exportResults;
|
|
@@ -115,9 +118,61 @@ function exportConfig(exportParameters) {
|
|
|
115
118
|
return exportResults;
|
|
116
119
|
}
|
|
117
120
|
exports.exportConfig = exportConfig;
|
|
121
|
+
/**
|
|
122
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
123
|
+
* @param exportParameters - parameters to control the export
|
|
124
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
125
|
+
*/
|
|
126
|
+
function exportConfigEntityByPath(exportParameters) {
|
|
127
|
+
let exportResults = ux_specification_types_1.defaultExportResult;
|
|
128
|
+
const ui5Config = { ui5Version: exportParameters.ui5Version, layer: exportParameters.layer };
|
|
129
|
+
if (exportParameters[ux_specification_types_1.FioriElementsVersion.v2]) {
|
|
130
|
+
/**
|
|
131
|
+
* Handle v2 export
|
|
132
|
+
*/
|
|
133
|
+
const v2Params = exportParameters[ux_specification_types_1.FioriElementsVersion.v2];
|
|
134
|
+
exportResults = (0, exportPage_1.exportConfigEntityByPathV2)(v2Params, ui5Config);
|
|
135
|
+
}
|
|
136
|
+
else if (exportParameters[ux_specification_types_1.FioriElementsVersion.v4]) {
|
|
137
|
+
/**
|
|
138
|
+
* Handle v4 export
|
|
139
|
+
*/
|
|
140
|
+
const v4Params = exportParameters[ux_specification_types_1.FioriElementsVersion.v4];
|
|
141
|
+
exportResults = (0, export_1.exportConfigEntityByPathV4)(v4Params, ui5Config);
|
|
142
|
+
}
|
|
143
|
+
return exportResults;
|
|
144
|
+
}
|
|
145
|
+
exports.exportConfigEntityByPath = exportConfigEntityByPath;
|
|
146
|
+
/**
|
|
147
|
+
* Exports a part of the config, specifified by a propertyPath, to flex changes and/or manifest settings
|
|
148
|
+
* @param exportParameters - parameters to control the export
|
|
149
|
+
* @returns a bundle of all changed objects of any artifact type
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
function deleteConfigEntityByPath(exportParameters) {
|
|
153
|
+
let exportResults = ux_specification_types_1.defaultExportResult;
|
|
154
|
+
const ui5Config = { ui5Version: exportParameters.ui5Version, layer: exportParameters.layer };
|
|
155
|
+
if (exportParameters[ux_specification_types_1.FioriElementsVersion.v2]) {
|
|
156
|
+
/**
|
|
157
|
+
* Handle v2 export
|
|
158
|
+
*/
|
|
159
|
+
const v2Params = exportParameters[ux_specification_types_1.FioriElementsVersion.v2];
|
|
160
|
+
exportResults = (0, exportPage_1.exportConfigEntityByPathV2)(v2Params, ui5Config, true);
|
|
161
|
+
}
|
|
162
|
+
else if (exportParameters[ux_specification_types_1.FioriElementsVersion.v4]) {
|
|
163
|
+
/**
|
|
164
|
+
* Handle v4 export
|
|
165
|
+
*/
|
|
166
|
+
const v4Params = exportParameters[ux_specification_types_1.FioriElementsVersion.v4];
|
|
167
|
+
exportResults = (0, export_1.exportConfigEntityByPathV4)(v4Params, ui5Config, true);
|
|
168
|
+
}
|
|
169
|
+
return exportResults;
|
|
170
|
+
}
|
|
171
|
+
exports.deleteConfigEntityByPath = deleteConfigEntityByPath;
|
|
118
172
|
/**
|
|
119
173
|
* Imports manifest settings and flex changes to a config (src/*.json, src/pages/*.json)
|
|
120
174
|
* @param importParameters - parameters to control the import
|
|
175
|
+
* @returns the generated config json file
|
|
121
176
|
*/
|
|
122
177
|
function importConfig(importParameters) {
|
|
123
178
|
let config;
|
|
@@ -180,12 +235,12 @@ async function importProjectSchema(importParameters) {
|
|
|
180
235
|
exports.importProjectSchema = importProjectSchema;
|
|
181
236
|
/**
|
|
182
237
|
* Returns specification API version.
|
|
183
|
-
* @
|
|
238
|
+
* @returns {ApiVersion} Object of API version.
|
|
184
239
|
*/
|
|
185
240
|
function getApiVersion() {
|
|
186
241
|
return {
|
|
187
|
-
version: '
|
|
188
|
-
fpmWriter: '
|
|
242
|
+
version: '14',
|
|
243
|
+
fpmWriter: '13'
|
|
189
244
|
};
|
|
190
245
|
}
|
|
191
246
|
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,wEAMqC;AAcrC,iDAK4B;AAC5B,iDAK4B;AAC5B,4DAAuF;AACvF,6CAK0B;AAC1B,oDAAmF;AACnF,6CAI0B;AAC1B,0CAA6G;AAE7G,yDAY+B;AAE/B,MAAM,YAAY,GAAG,IAAI,GAAG,CACxB;IACI,CAAC,4CAAmB,CAAC,UAAU,EAAE,kCAAkB,CAAC;IACpD,CAAC,4CAAmB,CAAC,YAAY,EAAE,oCAAoB,CAAC;IACxD,CAAC,4CAAmB,CAAC,aAAa,EAAE,qCAAqB,CAAC;IAC1D,CAAC,4CAAmB,CAAC,UAAU,EAAE,kCAAkB,CAAC;IACpD,CAAC,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,aAAa,CAAC,EAAE;YAC3C,MAAM,GAAG,IAAA,+BAAsB,EAAC,QAAQ,CAAC,mCAAU,CAAC,aAAa,CAAC,CAAC,CAAC;SACvE;KACJ;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAhCD,oCAgCC;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;QACb,SAAS,EAAE,IAAI;KAClB,CAAC;AACN,CAAC;AALD,sCAKC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,qBAAoD;IACxF,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;IAClF,IAAI,iBAAiB,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;QAC9D,IAAA,yBAAS,EAAC,qBAAqB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC9C,OAAO,iBAAiB,CACpB,qBAAqB,CAAC,QAAQ,EAC9B,qBAAqB,CAAC,IAAI,EAC1B,qBAAqB,CAAC,QAAQ,CACjC,CAAC;KACL;SAAM;QACH,OAAO;KACV;AACL,CAAC;AAZD,0DAYC"}
|
|
@@ -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,SA4BX,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,SA4BX,CAAC;AAkBF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAAmB,oBAAoB,cAAc,UAAU,KAAG,QAAQ,IAAI,CAO1G,CAAC"}
|
|
@@ -62,6 +62,7 @@ const readJsonSchema = async (path) => {
|
|
|
62
62
|
* Return the generic schema for a given version and type
|
|
63
63
|
* @param version - Fiori elements version, e.g. v2 or v4
|
|
64
64
|
* @param schemaType - Type of the schema, e.g Application, ListReport, ObjectPage, ...
|
|
65
|
+
* @returns the generic schema for the given Fiori Elements version and schema type
|
|
65
66
|
*/
|
|
66
67
|
const getGenericSchema = async (version, schemaType) => {
|
|
67
68
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaAccess.js","sourceRoot":"","sources":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G,KAAK,EAAE,IAAY,EAAiB,EAAE;IACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAQ,EAAE;QACzC,IAAA,aAAQ,EAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAQ,EAAE;YACrD,IAAI,GAAG,EAAE;gBACL,MAAM,CAAC,GAAG,CAAC,CAAC;aACf;iBAAM;gBACH,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;aAC7B;QACL,CAAC,CAAC,CAAC;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"}
|
|
@@ -6,6 +6,7 @@ import type { DataField, DataFieldAbstractTypes, FacetTypes } from '@sap-ux/voca
|
|
|
6
6
|
import type { ConvertedMetadata, EntityType, PropertyPath, 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.
|
|
@@ -204,12 +205,15 @@ export declare function createDefaultSection(appSchema: Definition, facet: Facet
|
|
|
204
205
|
export declare function getObjectPageFacetSection(entityType: EntityType, oDataServiceAVT: ConvertedMetadata, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, checkUnresolvableFacets?: boolean): FacetSection[];
|
|
205
206
|
/**
|
|
206
207
|
* Cleans empty sub-structures from the export result for manifest
|
|
207
|
-
* @param manifest - manifest.json part of the export result
|
|
208
|
-
* @param path - path in the manifest
|
|
209
|
-
* @param
|
|
210
|
-
* @param
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
* @param {object} manifest - manifest.json part of the export result
|
|
209
|
+
* @param {string} path - path in the manifest
|
|
210
|
+
* @param {boolean} deletionRequest - if set to true, any manifest setting specified by entityPath gets deleted even if it comprises any unknown property
|
|
211
|
+
* @param {string[]} entityPathArray (optional) - array of elements, describing a path to a subsection of the config.
|
|
212
|
+
* If specified, only elements from this subsection are getting deleted
|
|
213
|
+
* @param {string} targetAnnotation (optional) - target annotation (optional, in case of sections, subsections)
|
|
214
|
+
* @param {string} targetAnnotationEncoded (optional) - encoded version of the target annotation, as represented in the manifest
|
|
215
|
+
*/
|
|
216
|
+
export declare const deleteEmptyStructure: (manifest: object, path: string, deletionRequest: boolean, entityPathArray?: string[], targetAnnotation?: string, targetAnnotationEncoded?: string) => void;
|
|
213
217
|
/**
|
|
214
218
|
* Method which returns schema file name and path depending on passed schema or page type.
|
|
215
219
|
* @param {SchemaType | PageTypeV2} 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,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EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAErG;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAM/E;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAczF;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.getJSONPropertyByPath = exports.updatePropertyIndices = exports.isFeatureSupported = exports.getErrorMessage = exports.getDefinitionsRef = exports.getDefinitionKey = exports.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.findMatchingKeysByAdditionalProperties = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV4Template = exports.determineV4PageTemplateType = exports.determineV2Template = exports.getVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getAnnotationPathUsingFullyQualifiedName = exports.getSchemaKeyOfLineItemRecord = exports.setManifestSectionByPathV4 = exports.getManifestSectionByPathV4 = exports.prepareValueForPath = exports.getSectionFacet = exports.getAnnotationFromMetaPath = exports.findAlias = exports.getPageTypeV4 = exports.getPageTypeV2 = exports.prepareRef = exports.getDataFieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.DEFINITION_LINK_PREFIX = void 0;
|
|
6
|
+
exports.replaceNamespaces = exports.removeNamespaces = exports.getJSONPropertyByPath = exports.updatePropertyIndices = exports.isFeatureSupported = exports.getErrorMessage = exports.getDefinitionsRef = exports.getDefinitionKey = exports.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.findMatchingKeysByAdditionalProperties = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV4Template = exports.determineV4PageTemplateType = exports.determineV2Template = exports.getVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getAnnotationPathUsingFullyQualifiedName = exports.getSchemaKeyOfLineItemRecord = exports.setManifestSectionByPathV4 = exports.getManifestSectionByPathV4 = exports.prepareValueForPath = exports.getSectionFacet = exports.getAnnotationFromMetaPath = exports.findAlias = exports.getPageTypeV4 = exports.getPageTypeV2 = exports.prepareRef = exports.getDataFieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.arrayIncludes = exports.DEFINITION_LINK_PREFIX = void 0;
|
|
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.
|
|
@@ -1091,12 +1093,15 @@ function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVer
|
|
|
1091
1093
|
exports.getObjectPageFacetSection = getObjectPageFacetSection;
|
|
1092
1094
|
/**
|
|
1093
1095
|
* Cleans empty sub-structures from the export result for manifest
|
|
1094
|
-
* @param manifest - manifest.json part of the export result
|
|
1095
|
-
* @param path - path in the manifest
|
|
1096
|
-
* @param
|
|
1097
|
-
* @param
|
|
1096
|
+
* @param {object} manifest - manifest.json part of the export result
|
|
1097
|
+
* @param {string} path - path in the manifest
|
|
1098
|
+
* @param {boolean} deletionRequest - if set to true, any manifest setting specified by entityPath gets deleted even if it comprises any unknown property
|
|
1099
|
+
* @param {string[]} entityPathArray (optional) - array of elements, describing a path to a subsection of the config.
|
|
1100
|
+
* If specified, only elements from this subsection are getting deleted
|
|
1101
|
+
* @param {string} targetAnnotation (optional) - target annotation (optional, in case of sections, subsections)
|
|
1102
|
+
* @param {string} targetAnnotationEncoded (optional) - encoded version of the target annotation, as represented in the manifest
|
|
1098
1103
|
*/
|
|
1099
|
-
const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
1104
|
+
const deleteEmptyStructure = (manifest, path, deletionRequest, entityPathArray, targetAnnotation, targetAnnotationEncoded) => {
|
|
1100
1105
|
if (!path) {
|
|
1101
1106
|
return;
|
|
1102
1107
|
}
|
|
@@ -1109,7 +1114,9 @@ const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotation
|
|
|
1109
1114
|
if (!manifestSection[decodedElement]) {
|
|
1110
1115
|
return;
|
|
1111
1116
|
}
|
|
1112
|
-
if (Object.keys(manifestSection[decodedElement]).length === 0
|
|
1117
|
+
if (Object.keys(manifestSection[decodedElement]).length === 0 ||
|
|
1118
|
+
//deletion explicitly requested by using entityPath
|
|
1119
|
+
(entityPathArray && entityPathArray[entityPathArray.length - 1] === decodedElement && deletionRequest)) {
|
|
1113
1120
|
if (Array.isArray(manifestSection)) {
|
|
1114
1121
|
manifestSection.splice(Number(decodedElement), 1);
|
|
1115
1122
|
}
|
|
@@ -1117,7 +1124,7 @@ const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotation
|
|
|
1117
1124
|
delete manifestSection[decodedElement];
|
|
1118
1125
|
}
|
|
1119
1126
|
pathArray.pop();
|
|
1120
|
-
(0, exports.deleteEmptyStructure)(manifest, pathArray.join('/'), targetAnnotation, targetAnnotationEncoded);
|
|
1127
|
+
(0, exports.deleteEmptyStructure)(manifest, pathArray.join('/'), deletionRequest, entityPathArray, targetAnnotation, targetAnnotationEncoded);
|
|
1121
1128
|
return;
|
|
1122
1129
|
}
|
|
1123
1130
|
manifestSection = manifestSection && manifestSection[decodedElement];
|