@sap-ux/fe-fpm-writer 0.24.13 → 0.24.15
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/action/index.js +12 -9
- package/dist/common/validate.js +4 -3
- package/package.json +2 -2
package/dist/action/index.js
CHANGED
|
@@ -37,7 +37,6 @@ function enhanceConfig(data, manifestPath, manifest) {
|
|
|
37
37
|
*/
|
|
38
38
|
function enhanceManifestAndGetActionsElementReference(manifest, target) {
|
|
39
39
|
const page = manifest['sap.ui5'].routing.targets[target.page];
|
|
40
|
-
const SECTIONS = 'sections';
|
|
41
40
|
page.options = page.options || {};
|
|
42
41
|
page.options.settings = page.options.settings || {};
|
|
43
42
|
if (target.control === types_1.TargetControl.header || target.control === types_1.TargetControl.footer) {
|
|
@@ -48,16 +47,20 @@ function enhanceManifestAndGetActionsElementReference(manifest, target) {
|
|
|
48
47
|
return page.options.settings.content[target.control].actions;
|
|
49
48
|
}
|
|
50
49
|
else if (target.control === types_1.TargetControl.body && target.customSectionKey) {
|
|
51
|
-
// custom section actions
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
page.options.settings
|
|
55
|
-
|
|
56
|
-
page.options.settings[target.control][
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
// condition for custom section actions
|
|
51
|
+
// Custom actions for custom sections are defined similarly like for header/footer under content property
|
|
52
|
+
// In: 'options/settings/content/body/sections/<customSection>/actions'
|
|
53
|
+
page.options.settings.content = page.options.settings.content || {};
|
|
54
|
+
page.options.settings.content[target.control] = page.options.settings.content[target.control] || {};
|
|
55
|
+
page.options.settings.content[target.control].sections = page.options.settings.content[target.control].sections || {};
|
|
56
|
+
page.options.settings.content[target.control].sections[target.customSectionKey] =
|
|
57
|
+
page.options.settings.content[target.control].sections[target.customSectionKey] || {};
|
|
58
|
+
page.options.settings.content[target.control].sections[target.customSectionKey].actions =
|
|
59
|
+
page.options.settings.content[target.control].sections[target.customSectionKey].actions || {};
|
|
60
|
+
return page.options.settings.content[target.control].sections[target.customSectionKey].actions;
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
63
|
+
// Custom actions for other elements are defined in: 'options/settings/controlConfiguration/<element>/actions'
|
|
61
64
|
const controlPrefix = target.navProperty ? target.navProperty + '/' : '';
|
|
62
65
|
const controlSuffix = target.qualifier ? '#' + target.qualifier : '';
|
|
63
66
|
const controlId = `${controlPrefix}${target.control}${controlSuffix}`;
|
package/dist/common/validate.js
CHANGED
|
@@ -27,7 +27,7 @@ exports.validateVersion = validateVersion;
|
|
|
27
27
|
* @returns true if the path is valid, otherwise, throws and error
|
|
28
28
|
*/
|
|
29
29
|
function validateBasePath(basePath, fs) {
|
|
30
|
-
var _a, _b
|
|
30
|
+
var _a, _b;
|
|
31
31
|
if (!fs) {
|
|
32
32
|
fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
|
|
33
33
|
}
|
|
@@ -37,8 +37,9 @@ function validateBasePath(basePath, fs) {
|
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
const manifest = fs.readJSON(manifestPath);
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const ui5Dependencies = (_b = (_a = manifest['sap.ui5']) === null || _a === void 0 ? void 0 : _a.dependencies) === null || _b === void 0 ? void 0 : _b.libs;
|
|
41
|
+
if (!(ui5Dependencies && (ui5Dependencies['sap.fe.core'] || ui5Dependencies['sap.fe.templates']))) {
|
|
42
|
+
throw new Error('Dependencies sap.fe.core or sap.fe.templates are missing in the manifest.json. Fiori elements FPM requires the SAP FE libraries.');
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
return true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fe-fpm-writer",
|
|
3
3
|
"description": "SAP Fiori elements flexible programming model writer",
|
|
4
|
-
"version": "0.24.
|
|
4
|
+
"version": "0.24.15",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/mem-fs": "1.1.2",
|
|
34
34
|
"@types/mem-fs-editor": "7.0.1",
|
|
35
35
|
"@types/semver": "7.5.2",
|
|
36
|
-
"@sap-ux/project-access": "1.
|
|
36
|
+
"@sap-ux/project-access": "1.21.2"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=18.x"
|