@sap-ux/fe-fpm-writer 0.23.0 → 0.23.1

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.
@@ -39,14 +39,14 @@ function getDefaultFragmentContent(text, eventHandler, isController = false, pre
39
39
  const handler = `${parts.join('/')}${isController ? '.controller' : ''}`;
40
40
  const requireAttr = `core:require="{ handler: '${handler}'}"`;
41
41
  if (prefferInput) {
42
- content = `<Input ${requireAttr} label="${text}" change="handler.${method}" />`;
42
+ content = `<Input ${requireAttr} value="${text}" change="handler.${method}" />`;
43
43
  }
44
44
  else {
45
45
  content = `<Button ${requireAttr} text="${text}" press="handler.${method}" />`;
46
46
  }
47
47
  }
48
48
  else if (prefferInput) {
49
- content = `<Input label="${text}" />`;
49
+ content = `<Input value="${text}" />`;
50
50
  }
51
51
  else {
52
52
  content = `<Text text="${text}" />`;
@@ -138,7 +138,7 @@ function generateCustomHeaderSection(basePath, customHeaderSection, fs) {
138
138
  if (editSection.path) {
139
139
  const viewPath = (0, path_1.join)(editSection.path, `${editSection.name}.fragment.xml`);
140
140
  if (!editor.exists(viewPath)) {
141
- editor.copyTpl((0, templates_1.getTemplatePath)('common/FragmentWithVBox.xml'), viewPath, editSection);
141
+ editor.copyTpl((0, templates_1.getTemplatePath)('common/FragmentWithForm.xml'), viewPath, editSection);
142
142
  }
143
143
  }
144
144
  }
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.23.0",
4
+ "version": "0.23.1",
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.12.1"
36
+ "@sap-ux/project-access": "1.13.2"
37
37
  },
38
38
  "engines": {
39
39
  "pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0",
@@ -0,0 +1,7 @@
1
+ <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:f="sap.ui.layout.form"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
2
+ <f:FormElement>
3
+ <f:fields>
4
+ <%- content %>
5
+ </f:fields>
6
+ </f:FormElement>
7
+ </core:FragmentDefinition>