@sap-ux/fiori-elements-writer 2.4.18 → 2.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/defaults.js +18 -3
- package/package.json +5 -5
package/dist/data/defaults.js
CHANGED
|
@@ -15,9 +15,11 @@ const types_1 = require("../types");
|
|
|
15
15
|
const templateAttributes_1 = require("./templateAttributes");
|
|
16
16
|
const annotationCustomUi5Libs_1 = require("./annotationCustomUi5Libs");
|
|
17
17
|
const semver_1 = __importDefault(require("semver"));
|
|
18
|
+
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
18
19
|
const defaultModelName = 'mainModel'; // UI5 default model name is '' but some floorplans require a named default model
|
|
19
20
|
const defaultVirtualPreviewFile = 'test/flp.html'; // Default virtual preview file name
|
|
20
21
|
const defaultIntent = 'app-preview';
|
|
22
|
+
const defaultNavActionTile = 'tile';
|
|
21
23
|
/**
|
|
22
24
|
* Sets defaults for relevant parameters (`flpAppId`, `startFile`, `localStartFile`, ) when virtual endpoints are used.
|
|
23
25
|
*
|
|
@@ -95,6 +97,21 @@ function getManifestLibs(type, version, libs) {
|
|
|
95
97
|
const templateLibs = (0, templateAttributes_1.getTemplateManifestLibs)(type, version);
|
|
96
98
|
return [...templateLibs].concat(libs ?? []);
|
|
97
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Set defaults for missing parameters on the given Fiori/UI5 app instance.
|
|
102
|
+
*
|
|
103
|
+
* @param app - fiori app config
|
|
104
|
+
* @param templateType - template type
|
|
105
|
+
* @param serviceVersion - odata version for the service
|
|
106
|
+
*/
|
|
107
|
+
function setFioriAppDefaults(app, templateType, serviceVersion) {
|
|
108
|
+
// Generate base UI5 project
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
110
|
+
app.baseComponent = app.baseComponent || (0, templateAttributes_1.getBaseComponent)(templateType, serviceVersion);
|
|
111
|
+
app.flpAction = app.flpAction || defaultNavActionTile;
|
|
112
|
+
// create `flpAppId` if not already added
|
|
113
|
+
app.flpAppId = app.flpAppId || (0, fiori_generator_shared_1.getFlpId)(app.id, app.flpAction);
|
|
114
|
+
}
|
|
98
115
|
/**
|
|
99
116
|
* Sets defaults for the specified Fiori elements application.
|
|
100
117
|
*
|
|
@@ -111,9 +128,7 @@ function setAppDefaults(feApp) {
|
|
|
111
128
|
toolsId: feApp.app.sourceTemplate?.toolsId
|
|
112
129
|
};
|
|
113
130
|
}
|
|
114
|
-
|
|
115
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
116
|
-
feApp.app.baseComponent = feApp.app.baseComponent || (0, templateAttributes_1.getBaseComponent)(feApp.template.type, feApp.service.version);
|
|
131
|
+
setFioriAppDefaults(feApp.app, feApp.template.type, feApp.service.version);
|
|
117
132
|
const customUi5Libs = feApp.service.version === odata_service_writer_1.OdataVersion.v4 && feApp.service.metadata
|
|
118
133
|
? (0, annotationCustomUi5Libs_1.getAnnotationV4Libs)(feApp.service.metadata)
|
|
119
134
|
: [];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-elements-writer",
|
|
3
3
|
"description": "SAP Fiori elements application writer",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.19",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"read-pkg-up": "7.0.1",
|
|
29
29
|
"semver": "7.5.4",
|
|
30
30
|
"@sap-ux/odata-service-writer": "0.27.5",
|
|
31
|
-
"@sap-ux/ui5-application-writer": "1.5.
|
|
31
|
+
"@sap-ux/ui5-application-writer": "1.5.3",
|
|
32
32
|
"@sap-ux/fe-fpm-writer": "0.35.4",
|
|
33
33
|
"@sap-ux/ui5-config": "0.28.2",
|
|
34
|
-
"@sap-ux/ui5-test-writer": "0.7.
|
|
35
|
-
"@sap-ux/fiori-generator-shared": "0.12.
|
|
36
|
-
"@sap-ux/cap-config-writer": "0.10.
|
|
34
|
+
"@sap-ux/ui5-test-writer": "0.7.3",
|
|
35
|
+
"@sap-ux/fiori-generator-shared": "0.12.8",
|
|
36
|
+
"@sap-ux/cap-config-writer": "0.10.8",
|
|
37
37
|
"@sap-ux/annotation-generator": "0.3.39",
|
|
38
38
|
"@sap-ux/logger": "0.7.0"
|
|
39
39
|
},
|