@sap-ux/fe-fpm-writer 0.17.3 → 0.17.5
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/section/index.js
CHANGED
|
@@ -26,6 +26,16 @@ function getManifestRoot(ui5Version) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
exports.getManifestRoot = getManifestRoot;
|
|
29
|
+
/**
|
|
30
|
+
* Get additional dependencies for fragment.xml template based on passed ui5 version.
|
|
31
|
+
*
|
|
32
|
+
* @param ui5Version required UI5 version.
|
|
33
|
+
* @returns Additional dependencies for fragment.xml
|
|
34
|
+
*/
|
|
35
|
+
function getAdditionalDependencies(ui5Version) {
|
|
36
|
+
const minVersion = semver_1.coerce(ui5Version);
|
|
37
|
+
return !minVersion || minVersion.minor >= 90 ? { 'xmlns:macros': 'sap.fe.macros' } : undefined;
|
|
38
|
+
}
|
|
29
39
|
/**
|
|
30
40
|
* Enhances the provided custom section configuration with additonal data.
|
|
31
41
|
*
|
|
@@ -44,6 +54,8 @@ function enhanceConfig(fs, data, manifestPath, manifest) {
|
|
|
44
54
|
}
|
|
45
55
|
// generate section content
|
|
46
56
|
config.content = config.control || defaults_1.getDefaultFragmentContent(config.name, config.eventHandler);
|
|
57
|
+
// Additional dependencies to include into 'Fragment.xml'
|
|
58
|
+
config.dependencies = getAdditionalDependencies(config.minUI5Version);
|
|
47
59
|
return config;
|
|
48
60
|
}
|
|
49
61
|
/**
|
package/dist/section/types.d.ts
CHANGED
|
@@ -17,7 +17,11 @@ export interface CustomSection extends CustomElement, EventHandler {
|
|
|
17
17
|
*/
|
|
18
18
|
control?: string;
|
|
19
19
|
}
|
|
20
|
+
export interface CustomSectionDependencies {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
}
|
|
20
23
|
export interface InternalCustomSection extends CustomSection, InternalCustomElement {
|
|
21
24
|
content: string;
|
|
25
|
+
dependencies?: CustomSectionDependencies;
|
|
22
26
|
}
|
|
23
27
|
//# sourceMappingURL=types.d.ts.map
|
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.17.
|
|
4
|
+
"version": "0.17.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"@types/semver": "7.3.9",
|
|
34
34
|
"@types/mem-fs-editor": "7.0.1",
|
|
35
35
|
"@types/mem-fs": "1.1.2",
|
|
36
|
-
"@sap-ux/ui5-config": "0.15.
|
|
36
|
+
"@sap-ux/ui5-config": "0.15.2"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0",
|
|
40
40
|
"node": ">= 14.16.0 < 15.0.0 || >=16.1.0 < 17.0.0 || >=18.0.0 < 19.0.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
|
-
"build": "pnpm clean && tsc",
|
|
44
|
-
"clean": "rimraf dist",
|
|
43
|
+
"build": "pnpm clean && tsc -p tsconfig-build.json",
|
|
44
|
+
"clean": "rimraf dist test/test-output",
|
|
45
45
|
"format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
|
|
46
46
|
"lint": "eslint . --ext .ts",
|
|
47
47
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"
|
|
1
|
+
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? Object.entries(dependencies).map((dependency) => ` ${dependency[0]}="${dependency[1]}"`).join('') : '' %>>
|
|
2
2
|
<%- content %>
|
|
3
3
|
</core:FragmentDefinition>
|