@sap-ux/fe-fpm-writer 0.20.3 → 0.21.0
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
|
@@ -32,11 +32,11 @@ exports.getManifestRoot = getManifestRoot;
|
|
|
32
32
|
* Get additional dependencies for fragment.xml template based on passed ui5 version.
|
|
33
33
|
*
|
|
34
34
|
* @param ui5Version required UI5 version.
|
|
35
|
-
* @returns
|
|
35
|
+
* @returns String with additional dependencies to add for "FragmentDefinition" element in fragment.xml
|
|
36
36
|
*/
|
|
37
37
|
function getAdditionalDependencies(ui5Version) {
|
|
38
38
|
const minVersion = (0, semver_1.coerce)(ui5Version);
|
|
39
|
-
return !minVersion || (0, semver_1.gte)(minVersion, '1.90.0') ?
|
|
39
|
+
return !minVersion || (0, semver_1.gte)(minVersion, '1.90.0') ? 'xmlns:macros="sap.fe.macros"' : undefined;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Enhances the provided custom section configuration with additonal data.
|
|
@@ -89,7 +89,7 @@ function generate(basePath, customSection, manifestTemplateRoot, fs) {
|
|
|
89
89
|
// add fragment
|
|
90
90
|
const viewPath = (0, path_1.join)(completeSection.path, `${completeSection.name}.fragment.xml`);
|
|
91
91
|
if (!fs.exists(viewPath)) {
|
|
92
|
-
fs.copyTpl((0, templates_1.getTemplatePath)('common/
|
|
92
|
+
fs.copyTpl((0, templates_1.getTemplatePath)('common/FragmentWithVBox.xml'), viewPath, completeSection);
|
|
93
93
|
}
|
|
94
94
|
return fs;
|
|
95
95
|
}
|
package/dist/section/types.d.ts
CHANGED
|
@@ -17,12 +17,9 @@ export interface CustomSection extends CustomElement, EventHandler {
|
|
|
17
17
|
*/
|
|
18
18
|
control?: string;
|
|
19
19
|
}
|
|
20
|
-
export interface CustomSectionDependencies {
|
|
21
|
-
[key: string]: string;
|
|
22
|
-
}
|
|
23
20
|
export interface InternalCustomSection extends CustomSection, CustomSubSection, InternalCustomElement {
|
|
24
21
|
content: string;
|
|
25
|
-
dependencies?:
|
|
22
|
+
dependencies?: string;
|
|
26
23
|
}
|
|
27
24
|
export interface CustomSubSection extends CustomSection {
|
|
28
25
|
/**
|
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ?
|
|
1
|
+
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
|
|
2
2
|
<%- content %>
|
|
3
3
|
</core:FragmentDefinition>
|