@sap-ux/fe-fpm-writer 0.20.2 → 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.
@@ -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 Additional dependencies for fragment.xml
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') ? { 'xmlns:macros': 'sap.fe.macros' } : undefined;
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/Fragment.xml'), viewPath, completeSection);
92
+ fs.copyTpl((0, templates_1.getTemplatePath)('common/FragmentWithVBox.xml'), viewPath, completeSection);
93
93
  }
94
94
  return fs;
95
95
  }
@@ -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?: CustomSectionDependencies;
22
+ dependencies?: string;
26
23
  }
27
24
  export interface CustomSubSection extends CustomSection {
28
25
  /**
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.20.2",
4
+ "version": "0.21.0",
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.3.9",
36
- "@sap-ux/project-access": "1.7.0"
36
+ "@sap-ux/project-access": "1.8.1"
37
37
  },
38
38
  "engines": {
39
39
  "pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0",
@@ -1,3 +1,3 @@
1
- <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? Object.entries(dependencies).map((dependency) => ` ${dependency[0]}="${dependency[1]}"`).join('') : '' %>>
1
+ <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
2
2
  <%- content %>
3
3
  </core:FragmentDefinition>
@@ -0,0 +1,5 @@
1
+ <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
2
+ <VBox>
3
+ <%- content %>
4
+ </VBox>
5
+ </core:FragmentDefinition>