@sap/ux-specification 1.139.13 → 1.139.14

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +22 -7
  2. package/dist/documentation/{runDocu-min.js → runDocu-min.mjs} +6 -6
  3. package/dist/documentation/{runDocu-min.js.map → runDocu-min.mjs.map} +2 -2
  4. package/dist/documentation/v2/v2-AnalyticalListPage.html +4 -4
  5. package/dist/documentation/v2/v2-ApplicationV2.html +4 -4
  6. package/dist/documentation/v2/v2-ListReport.html +4 -4
  7. package/dist/documentation/v2/v2-ListReportNew.html +4 -4
  8. package/dist/documentation/v2/v2-ObjectPage.html +4 -4
  9. package/dist/documentation/v2/v2-OverviewPage.html +4 -4
  10. package/dist/documentation/v4/v4-ApplicationV4.html +4 -4
  11. package/dist/documentation/v4/v4-BuildingBlocks.html +4 -4
  12. package/dist/documentation/v4/v4-FreestylePage.html +4 -4
  13. package/dist/documentation/v4/v4-ListReport.html +4 -4
  14. package/dist/documentation/v4/v4-ObjectPage.html +4 -4
  15. package/dist/index-min.mjs +1308 -0
  16. package/dist/index-min.mjs.map +7 -0
  17. package/dist/specification/package.json +17 -11
  18. package/dist/specification/src/api.d.ts.map +1 -1
  19. package/dist/specification/src/api.js +6 -6
  20. package/dist/specification/src/api.js.map +1 -1
  21. package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
  22. package/dist/specification/src/ftfs/ftfs.js +25 -1
  23. package/dist/specification/src/ftfs/ftfs.js.map +1 -1
  24. package/dist/specification/src/i18n/i18n.js +35 -2
  25. package/dist/specification/src/i18n/i18n.js.map +1 -1
  26. package/dist/specification/src/index.d.ts +1 -0
  27. package/dist/specification/src/index.d.ts.map +1 -1
  28. package/dist/specification/src/index.js +4 -0
  29. package/dist/specification/src/index.js.map +1 -1
  30. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +37 -2
  31. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
  32. package/dist/specification/src/sync/common/decoration/decorator-paths.js +18 -1
  33. package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
  34. package/dist/specification/src/sync/common/decoration/decorators.d.ts +8 -5
  35. package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
  36. package/dist/specification/src/sync/common/decoration/decorators.js +4 -1
  37. package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
  38. package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts.map +1 -1
  39. package/dist/specification/src/sync/common/decoration/steps/Enums.js +47 -8
  40. package/dist/specification/src/sync/common/decoration/steps/Enums.js.map +1 -1
  41. package/dist/specification/src/sync/common/i18n.json +3 -1
  42. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
  43. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +25 -11
  44. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
  45. package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
  46. package/dist/specification/src/sync/v4/export/controls/Table.js +21 -9
  47. package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
  48. package/dist/specification/src/sync/v4/generate/generate.d.ts +4 -2
  49. package/dist/specification/src/sync/v4/generate/generate.d.ts.map +1 -1
  50. package/dist/specification/src/sync/v4/generate/generate.js +8 -4
  51. package/dist/specification/src/sync/v4/generate/generate.js.map +1 -1
  52. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts.map +1 -1
  53. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js +1 -0
  54. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -1
  55. package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts +1 -0
  56. package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -1
  57. package/dist/specification/src/sync/v4/generate/list-report/listReport.js +15 -5
  58. package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -1
  59. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  60. package/dist/specification/src/sync/v4/generate/objectPage.js +20 -4
  61. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  62. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +6 -0
  63. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
  64. package/dist/specification/src/sync/v4/sync-rules/Page.js +8 -0
  65. package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
  66. package/dist/specification/src/sync/v4/utils/utils.d.ts +125 -0
  67. package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
  68. package/dist/specification/src/sync/v4/utils/utils.js +252 -1
  69. package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
  70. package/dist/templates/action/manifest.action-menu.json +10 -0
  71. package/dist/templates/action/manifest.action.json +13 -0
  72. package/dist/templates/app/Component.js +13 -0
  73. package/dist/templates/app/Component.ts +11 -0
  74. package/dist/templates/building-block/action/View.xml +30 -0
  75. package/dist/templates/building-block/chart/View.xml +9 -0
  76. package/dist/templates/building-block/common/manifest.json +7 -0
  77. package/dist/templates/building-block/custom-column/View.xml +5 -0
  78. package/dist/templates/building-block/custom-filter-field/View.xml +12 -0
  79. package/dist/templates/building-block/custom-form-field/View.xml +12 -0
  80. package/dist/templates/building-block/field/View.xml +8 -0
  81. package/dist/templates/building-block/filter-bar/View.xml +10 -0
  82. package/dist/templates/building-block/form/View.xml +4 -0
  83. package/dist/templates/building-block/page/View.xml +5 -0
  84. package/dist/templates/building-block/rich-text-editor/View.xml +3 -0
  85. package/dist/templates/building-block/rich-text-editor-button-groups/View.xml +18 -0
  86. package/dist/templates/building-block/table/View.xml +19 -0
  87. package/dist/templates/column/1.84/manifest.json +28 -0
  88. package/dist/templates/column/1.85/manifest.json +31 -0
  89. package/dist/templates/column/1.86/manifest.json +43 -0
  90. package/dist/templates/common/EventHandler.js +25 -0
  91. package/dist/templates/common/EventHandler.ts +28 -0
  92. package/dist/templates/common/Fragment.xml +3 -0
  93. package/dist/templates/common/FragmentWithForm.xml +7 -0
  94. package/dist/templates/common/FragmentWithVBox.xml +5 -0
  95. package/dist/templates/common/sap.fe.d.ts +43 -0
  96. package/dist/templates/controller-extension/Controller.js +18 -0
  97. package/dist/templates/controller-extension/Controller.ts +20 -0
  98. package/dist/templates/controller-extension/ControllerExtension.d.ts +11 -0
  99. package/dist/templates/controller-extension/manifest.json +14 -0
  100. package/dist/templates/field/manifest.json +32 -0
  101. package/dist/templates/filter/Controller.js +21 -0
  102. package/dist/templates/filter/Controller.ts +24 -0
  103. package/dist/templates/filter/fragment.xml +15 -0
  104. package/dist/templates/filter/manifest.json +12 -0
  105. package/dist/templates/header-section/1.85/manifest.json +43 -0
  106. package/dist/templates/header-section/1.86/manifest.json +45 -0
  107. package/dist/templates/page/custom/1.84/ext/Controller.js +45 -0
  108. package/dist/templates/page/custom/1.84/ext/Controller.ts +42 -0
  109. package/dist/templates/page/custom/1.84/ext/View.xml +6 -0
  110. package/dist/templates/page/custom/1.84/i18n/i18n.properties +2 -0
  111. package/dist/templates/page/custom/1.84/manifest.json +32 -0
  112. package/dist/templates/page/custom/1.94/ext/Controller.js +45 -0
  113. package/dist/templates/page/custom/1.94/ext/Controller.ts +42 -0
  114. package/dist/templates/page/custom/1.94/ext/View.xml +6 -0
  115. package/dist/templates/page/custom/1.94/i18n/i18n.properties +2 -0
  116. package/dist/templates/page/custom/1.94/manifest.json +33 -0
  117. package/dist/templates/page/custom/i18n/i18n.properties +2 -0
  118. package/dist/templates/page/list/manifest.json +20 -0
  119. package/dist/templates/page/object/manifest.json +33 -0
  120. package/dist/templates/section/1.85/manifest.json +33 -0
  121. package/dist/templates/section/1.86/manifest.json +32 -0
  122. package/dist/templates/subsection/1.85/manifest.json +37 -0
  123. package/dist/templates/subsection/1.86/manifest.json +36 -0
  124. package/dist/templates/view/ext/CustomViewWithTable.xml +3 -0
  125. package/dist/templates/view/manifest.json +41 -0
  126. package/dist/types/src/apiTypes.d.ts +3 -0
  127. package/dist/types/src/apiTypes.d.ts.map +1 -1
  128. package/dist/types/src/apiTypes.js.map +1 -1
  129. package/dist/types/src/common/types.d.ts +2 -0
  130. package/dist/types/src/common/types.d.ts.map +1 -1
  131. package/dist/types/src/common/types.js +2 -0
  132. package/dist/types/src/common/types.js.map +1 -1
  133. package/package.json +17 -11
  134. package/dist/index-min.js +0 -655
  135. package/dist/index-min.js.map +0 -7
@@ -0,0 +1,30 @@
1
+ <%_ if (!config?.hasAggregation) { _%>
2
+ <<%- macrosNamespace %>:actions>
3
+ <%_ } _%>
4
+ <<%- config?.aggregationNamespace %>:Action
5
+ <%_ if (data.embeddedAction?.eventHandler?.fileName) { _%>
6
+ core:require="{ handler: '<%- data.embeddedAction.eventHandler.fileName %>' }"
7
+ <%_ } _%>
8
+ <%_ if (data.id) { _%>
9
+ id="<%- data.id %>"
10
+ <%_ } _%>
11
+ <%_ if (data.actionKey) { _%>
12
+ key="<%- data.actionKey %>"
13
+ <%_ } _%>
14
+ text="<%- data.text %>"
15
+ <%_ if (data.embeddedAction?.eventHandler?.fnName) { _%>
16
+ press="<%- data.embeddedAction.eventHandler.fnName %>"
17
+ <%_ } _%>
18
+ <%_ if (data.anchor) { _%>
19
+ anchor="<%- data.anchor %>"
20
+ <%_ } _%>
21
+ <%_ if (data.placement) { _%>
22
+ placement="<%- data.placement %>"
23
+ <%_ } _%>
24
+ <%_ if (data.requiresSelection !== undefined) { _%>
25
+ requiresSelection="<%- data.requiresSelection %>"
26
+ <%_ } _%>
27
+ />
28
+ <%_ if (!config?.hasAggregation) { _%>
29
+ </<%- macrosNamespace %>:actions>
30
+ <%_ } _%>
@@ -0,0 +1,9 @@
1
+ <<%- macrosNamespace %>:Chart
2
+ id="<%- data.id %>"<% if (data.metaPath) { %>
3
+ metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
4
+ contextPath="<%- data.contextPath %>"<% } %><% if (data.filterBar) { %>
5
+ filterBar="<%- data.filterBar %>"<% } %><% if (data.personalization) { %>
6
+ personalization="<%- data.personalization %>"<% } %><% if (data.selectionMode) { %>
7
+ selectionMode="<%- data.selectionMode %>"<% } %><% if (data.selectionChange) { %>
8
+ selectionChange="<%- data.selectionChange %>"<% } %>
9
+ />
@@ -0,0 +1,7 @@
1
+ {
2
+ "sap.ui5": {
3
+ "dependencies": {
4
+ "libs": <%- JSON.stringify(libraries) %>
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,5 @@
1
+ <% if (!config?.hasAggregation) { %><<%- macrosNamespace %>:columns>
2
+ <% } %><<%- config?.aggregationNamespace %>:Column <% if (ids.column) { %>id="<%- ids.column %>"<% } %> header="<%- data.title %>" importance="High" <% if (data.width) { %>width="<%- data.width %>"<% } %> <% if (data.position.anchor) { %>anchor="<%- data.position.anchor %>"<% } %> <% if (data.position.placement) { %>placement="<%- data.position.placement %>"<% } %> key="<%- data.columnKey || 'myColumnKey' %>">
3
+ <core:Fragment fragmentName="<%- data.embededFragment.ns %>.<%- data.embededFragment.name %>" type="XML" />
4
+ </<%- config?.aggregationNamespace %>:Column>
5
+ <% if (!config?.hasAggregation) { %></<%- macrosNamespace %>:columns><% } %>
@@ -0,0 +1,12 @@
1
+ <% if (!config?.hasAggregation) { %><<%- macrosNamespace %>:filterFields><% } %>
2
+ <<%- config?.aggregationNamespace %>:FilterField
3
+ key="<%- data.filterFieldKey || 'myFilterFieldKey'%>"
4
+ label="<%- data.label %>"
5
+ <% if (data.id) { %> id="<%- data.id %>"<% } %>
6
+ <% if (data.position.anchor) { %> anchor="<%- data.position.anchor %>"<% } %>
7
+ <% if (data.position.placement) { %> placement="<%- data.position.placement %>"<% } %>
8
+ <% if (data.required) { %> required="<%- data.required %>"<% } %>
9
+ <% if (data.property) { %> property="<%- data.property %>"<% } %>>
10
+ <core:Fragment fragmentName="<%- data.embededFragment.ns %>.<%- data.embededFragment.name %>" type="XML" />
11
+ </<%- config?.aggregationNamespace %>:FilterField>
12
+ <% if (!config?.hasAggregation) { %></<%- macrosNamespace %>:filterFields><% } %>
@@ -0,0 +1,12 @@
1
+ <<%- config?.aggregationNamespace %>:FormElement
2
+ <% if (data.formElementKey) { %> key="<%- data.formElementKey %>"<% } %>
3
+ label="<%- data.label %>"
4
+ <% if (data.id) { %> id="<%- data.id %>"<% } %>
5
+ <% if (data.metaPath) { %> metaPath="<%- data.metaPath %>"<% } %>
6
+ <% if (data.contextPath) { %> contextPath="<%- data.contextPath %>"<% } %>
7
+ <% if (data.position?.anchor) { %> anchor="<%- data.position.anchor %>"<% } %>
8
+ <% if (data.position?.placement) { %> placement="<%- data.position.placement %>"<% } %>>
9
+ <<%- config?.aggregationNamespace %>:fields>
10
+ <core:Fragment fragmentName="<%- data.embededFragment.ns %>.<%- data.embededFragment.name %>" type="XML" />
11
+ </<%- config?.aggregationNamespace %>:fields>
12
+ </<%- config?.aggregationNamespace %>:FormElement>
@@ -0,0 +1,8 @@
1
+ <<%- macrosNamespace %>:Field
2
+ id="<%- data.id %>"<% if (data.metaPath) { %>
3
+ metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
4
+ contextPath="<%- data.contextPath %>"<% } %><% if (data.formatOptions) { %>
5
+ formatOptions="<%- data.formatOptions %>"<% } %><% if (data.readOnly) { %>
6
+ readOnly="<%- data.readOnly %>"<% } %><% if (data.semanticObject) { %>
7
+ semanticObject="<%- data.semanticObject %>"<% } %>
8
+ />
@@ -0,0 +1,10 @@
1
+ <<%- macrosNamespace %>:FilterBar
2
+ id="<%- data.id %>"<% if (data.metaPath) { %>
3
+ metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
4
+ contextPath="<%- data.contextPath %>"<% } %><% if (data.search) { %>
5
+ search="<%- data.search %>"<% } %><% if (data.filterChanged) { %>
6
+ filterChanged="<%- data.filterChanged %>"<% } %><% if (data.liveMode !== undefined) { %>
7
+ liveMode="<%- data.liveMode %>"<% } %><% if (data.showClearButton !== undefined) { %>
8
+ showClearButton="<%- data.showClearButton %>"<% } %><% if (data.showMessages !== undefined) { %>
9
+ showMessages="<%- data.showMessages %>"<% } %>
10
+ />
@@ -0,0 +1,4 @@
1
+ <<%- macrosNamespace %>:Form
2
+ id="<%= data.id %>"
3
+ <% if (data.metaPath) { %>metaPath="<%- data.metaPath %>"<% } %>
4
+ title="<%= data.title %>"/>
@@ -0,0 +1,5 @@
1
+ <<%- macrosNamespace %>:Page
2
+ id="<%- data.id %>"<% if (data.title) { %>
3
+ title="<%- data.title %>"<% } %><% if (data.description) { %>
4
+ description="<%- data.description %>"<% } %>
5
+ />
@@ -0,0 +1,3 @@
1
+ <<%- macrosNamespace %>:RichTextEditorWithMetadata
2
+ metaPath="<%- data.metaPath %>"
3
+ id="<%- data.id %>"/>
@@ -0,0 +1,18 @@
1
+ <<%- config.aggregationNamespace %>:buttonGroups>
2
+ <% (data.buttonGroups || []).forEach(function(buttonGroup, idKey) { %>
3
+ <richtexteditor:ButtonGroup
4
+ id="<%- buttonGroup.id || ids[idKey] %>"
5
+ name="<%- buttonGroup.name %>"
6
+ visible="<%- buttonGroup.visible !== undefined ? buttonGroup.visible : true %>"
7
+ buttons="<%- buttonGroup.buttons %>"<%
8
+ if (buttonGroup.priority !== undefined) { %>
9
+ priority="<%- buttonGroup.priority %>"<%
10
+ } %><%
11
+ if (buttonGroup.customToolbarPriority !== undefined) { %>
12
+ customToolbarPriority="<%- buttonGroup.customToolbarPriority %>"<%
13
+ } %><%
14
+ if (buttonGroup.row !== undefined) { %>
15
+ row="<%- buttonGroup.row %>"<%
16
+ } %>/>
17
+ <% }); %>
18
+ </<%- config.aggregationNamespace %>:buttonGroups>
@@ -0,0 +1,19 @@
1
+ <<%- macrosNamespace %>:Table
2
+ id="<%- data.id %>"<% if (data.metaPath) { %>
3
+ metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
4
+ contextPath="<%- data.contextPath %>"<% } %><% if (data.busy) { %>
5
+ busy="<%- data.busy %>"<% } %><% if (data.enableAutoColumnWidth) { %>
6
+ enableAutoColumnWidth="<%- data.enableAutoColumnWidth %>"<% } %><% if (data.enableExport) { %>
7
+ enableExport="<%- data.enableExport %>"<% } %><% if (data.enableFullScreen) { %>
8
+ enableFullScreen="<%- data.enableFullScreen %>"<% } %><% if (data.enablePaste) { %>
9
+ enablePaste="<%- data.enablePaste %>"<% } %><% if (data.filterBar) { %>
10
+ filterBar="<%- data.filterBar %>"<% } %><% if (data.header) { %>
11
+ header="<%- data.header %>"<% } %><% if (data.headerVisible) { %>
12
+ headerVisible="<%- data.headerVisible %>"<% } %><% if (data.isSearchable) { %>
13
+ isSearchable="<%- data.isSearchable %>"<% } %><% if (data.personalization) { %>
14
+ personalization="<%- data.personalization %>"<% } %><% if (data.readOnly) { %>
15
+ readOnly="<%- data.readOnly %>"<% } %><% if (data.selectionMode) { %>
16
+ selectionMode="<%- data.selectionMode %>"<% } %><% if (data.type) { %>
17
+ type="<%- data.type %>"<% } %><% if (data.variantManagement) { %>
18
+ variantManagement="<%- data.variantManagement %>"<% } %>
19
+ />
@@ -0,0 +1,28 @@
1
+ {
2
+ "sap.ui5": {
3
+ "routing": {
4
+ "targets": {
5
+ "<%- target %>": {
6
+ "options": {
7
+ "settings": {
8
+ "controlConfiguration": {
9
+ "<%- targetEntity %>": {
10
+ "columns": {
11
+ "<%- name %>": {
12
+ "header": "<%- header %>",
13
+ <% if (locals.width) { %>
14
+ "width": "<%- width %>",
15
+ <% } %>
16
+ "position": <%- JSON.stringify(position) %>,
17
+ "template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>"
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "sap.ui5": {
3
+ "routing": {
4
+ "targets": {
5
+ "<%- target %>": {
6
+ "options": {
7
+ "settings": {
8
+ "controlConfiguration": {
9
+ "<%- targetEntity %>": {
10
+ "columns": {
11
+ "<%- name %>": {
12
+ "header": "<%- header %>",
13
+ <% if (locals.width) { %>
14
+ "width": "<%- width %>",
15
+ <% } %>
16
+ "position": <%- JSON.stringify(position) %>,
17
+ "template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>"
18
+ <% if (locals.availability) { %>
19
+ , "availability": "<%- availability %>"
20
+ <% } %>
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "sap.ui5": {
3
+ "routing": {
4
+ "targets": {
5
+ "<%- target %>": {
6
+ "options": {
7
+ "settings": {
8
+ "controlConfiguration": {
9
+ "<%- targetEntity %>": {
10
+ "columns": {
11
+ "<%- name %>": {
12
+ "header": "<%- header %>",
13
+ <% if (locals.width) { %> "width": "<%- width %>", <%
14
+ } %>
15
+ "position": <%- JSON.stringify(position) %>,
16
+ <% if (locals.horizontalAlign) { %> "horizontalAlign": "<%- horizontalAlign %>", <%
17
+ } %>
18
+ "template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>"
19
+ <% if (locals.availability) { %> , "availability": "<%- availability %>" <%
20
+ } %>
21
+ <% if (locals.properties) { %> , "properties": [
22
+ <% for (var i =0; i < properties.length; i++) { %>
23
+ "<%- properties[i] %>"
24
+ <% if (i < properties.length - 1) { %>
25
+ ,
26
+ <%
27
+ } %>
28
+ <%
29
+ } %>
30
+ ]
31
+ <%
32
+ } %>
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,25 @@
1
+ sap.ui.define([
2
+ "sap/m/MessageToast"
3
+ ], function(MessageToast) {
4
+ 'use strict';
5
+
6
+ return {
7
+ <% if (typeof parameters !== "undefined" && parameters.length) { -%>
8
+ /**
9
+ * Generated event handler.
10
+ *
11
+ <% parameters.forEach(function(param) { -%>
12
+ * @param <%- param.jsName %> <%- param.description %>
13
+ <% }) -%>
14
+ */
15
+ <% } -%>
16
+ <%- eventHandlerFnName %>: function(<%=
17
+ (typeof parameters !== "undefined" ? parameters : [])
18
+ .map(function(param) {
19
+ return param.jsName;
20
+ }).join(", ")
21
+ -%>) {
22
+ MessageToast.show("Custom handler invoked.");
23
+ }
24
+ };
25
+ });
@@ -0,0 +1,28 @@
1
+ import ExtensionAPI from 'sap/fe/core/ExtensionAPI';
2
+ <%
3
+ const importedTypes = new Set();
4
+ parameters.forEach(param => {
5
+ if (param.importType && !importedTypes.has(param.importType)) {
6
+ importedTypes.add(param.importType);
7
+ -%>
8
+ import <%- param.importType %> from '<%- param.importSource %>';
9
+ <%
10
+ }
11
+ }); -%>
12
+ import MessageToast from 'sap/m/MessageToast';
13
+
14
+ /**
15
+ * Generated event handler.
16
+ *
17
+ * @param this reference to the 'this' that the event handler is bound to.
18
+ <% parameters.forEach(function(param) { -%>
19
+ * @param <%- param.name %> <%- param.description %>
20
+ <% }) -%>
21
+ */
22
+ export function <%- eventHandlerFnName %>(this: ExtensionAPI, <%=
23
+ parameters.map(function(param) {
24
+ return param.name + ": " + (param.paramType ?? param.importType);
25
+ }).join(", ")
26
+ %>) {
27
+ MessageToast.show("Custom handler invoked.");
28
+ }
@@ -0,0 +1,3 @@
1
+ <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
2
+ <%- content %>
3
+ </core:FragmentDefinition>
@@ -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 id="<%- ids.formElement %>"<%- typeof requireAttribute !== 'undefined' ? ` ${requireAttribute}` : '' %>>
3
+ <f:fields>
4
+ <%- content %>
5
+ </f:fields>
6
+ </f:FormElement>
7
+ </core:FragmentDefinition>
@@ -0,0 +1,5 @@
1
+ <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
2
+ <VBox id="<%- ids.vbox %>"<%- typeof requireAttribute !== 'undefined' ? ` ${requireAttribute}` : '' %>>
3
+ <%- content %>
4
+ </VBox>
5
+ </core:FragmentDefinition>
@@ -0,0 +1,43 @@
1
+ import ExtensionAPI from 'sap/fe/core/ExtensionAPI';
2
+ import Routing from 'sap/fe/core/controllerextensions/Routing';
3
+ import EditFlow from 'sap/fe/core/controllerextensions/EditFlow';
4
+ import IntentBasedNavigation from 'sap/fe/core/controllerextensions/IntentBasedNavigation';
5
+
6
+ /**
7
+ * Missing public properties (https://ui5.sap.com/#/api/sap.fe.core.ExtensionAPI)
8
+ */
9
+ interface ExtensionAPIProperties {
10
+ routing: Routing;
11
+ editFlow: EditFlow;
12
+ intentBasedNavigation: IntentBasedNavigation;
13
+ }
14
+
15
+ /**
16
+ * Add missing public properties
17
+ */
18
+ declare module 'sap/fe/core/ExtensionAPI' {
19
+ export default interface ExtensionAPI extends ExtensionAPIProperties {}
20
+ }
21
+
22
+ /**
23
+ * Add missing public properties
24
+ */
25
+ declare module 'sap/fe/templates/ObjectPage/ExtensionAPI' {
26
+ export default interface ExtensionAPI extends ExtensionAPIProperties {}
27
+ }
28
+
29
+ /**
30
+ * Add missing public properties
31
+ */
32
+ declare module 'sap/fe/templates/ListReport/ExtensionAPI' {
33
+ export default interface ExtensionAPI extends ExtensionAPIProperties {}
34
+ }
35
+
36
+ /**
37
+ * Enhancing the PageController type to simplify the work with the extension API
38
+ */
39
+ declare module 'sap/fe/core/PageController' {
40
+ export default interface PageController {
41
+ getExtensionAPI() : ExtensionAPI;
42
+ }
43
+ }
@@ -0,0 +1,18 @@
1
+ sap.ui.define(['sap/ui/core/mvc/ControllerExtension'], function (ControllerExtension) {
2
+ 'use strict';
3
+
4
+ return ControllerExtension.extend('<%- ns %>.<%- name %>', {
5
+ // this section allows to extend lifecycle hooks or hooks provided by Fiori elements
6
+ override: {
7
+ /**
8
+ * Called when a controller is instantiated and its View controls (if available) are already created.
9
+ * Can be used to modify the View before it is displayed, to bind event handlers and do other one-time initialization.
10
+ * @memberOf <%- ns %>.<%- name %>
11
+ */
12
+ onInit: function () {
13
+ // you can access the Fiori elements extensionAPI via this.base.getExtensionAPI
14
+ var oModel = this.base.getExtensionAPI().getModel();
15
+ }
16
+ }
17
+ });
18
+ });
@@ -0,0 +1,20 @@
1
+ import ControllerExtension from 'sap/ui/core/mvc/ControllerExtension';
2
+ import ExtensionAPI from 'sap/fe/<%- typeof extension === "object" ? `templates/${extension.pageType}` : "core" -%>/ExtensionAPI';
3
+
4
+ /**
5
+ * @namespace <%- ns %>
6
+ * @controller
7
+ */
8
+ export default class <%- name %> extends ControllerExtension<ExtensionAPI> {
9
+ static overrides = {
10
+ /**
11
+ * Called when a controller is instantiated and its View controls (if available) are already created.
12
+ * Can be used to modify the View before it is displayed, to bind event handlers and do other one-time initialization.
13
+ * @memberOf <%- ns %>.<%- name %>
14
+ */
15
+ onInit(this: <%- name %>) {
16
+ // you can access the Fiori elements extensionAPI via this.base.getExtensionAPI
17
+ const model = this.base.getExtensionAPI().getModel();
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Helper to be able to define how to get the page specific extension API when writing a controller extension.
3
+ */
4
+ declare module 'sap/ui/core/mvc/ControllerExtension' {
5
+ export default class ControllerExtension<API> {
6
+ static overrides: unknown;
7
+ base: {
8
+ getExtensionAPI(): API;
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "sap.ui5": {
3
+ "extends": {
4
+ "extensions": {
5
+ "sap.ui.controllerExtensions": {
6
+ "<%- extensionId -%>": {<%if (typeof controllerNames !== 'undefined') {%>
7
+ "controllerNames": <%- JSON.stringify(controllerNames) %><% } else {%>
8
+ "controllerName": "<%- controllerName %>"<% } %>
9
+ }
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "sap.ui5": {
3
+ "routing": {
4
+ "targets": {
5
+ "<%- target %>": {
6
+ "options": {
7
+ "settings": {
8
+ "controlConfiguration": {
9
+ "<%- targetEntity %>": {
10
+ "fields": {
11
+ "<%- name %>": {
12
+ "template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>",
13
+ <%if (typeof position !== 'undefined') {%>"position": {
14
+ <% if (position.placement) { %>
15
+ "placement": "<%- position.placement %>"<% if (position.anchor) { %>,<% } %>
16
+ <% } %>
17
+ <% if (position.anchor) { %>
18
+ "anchor": "<%- position.anchor %>"
19
+ <% } %>
20
+ },<% } %>
21
+ "label": "<%- label %>"
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,21 @@
1
+ sap.ui.define(["sap/ui/model/Filter", "sap/ui/model/FilterOperator"], function(Filter, FilterOperator) {
2
+ "use strict";
3
+ return {
4
+ <%- eventHandlerFnName %>: function(sValue) {
5
+ switch (sValue) {
6
+ case "0":
7
+ return new Filter({ path: "<%- property %>", operator: FilterOperator.LT, value1: 100 });
8
+ case "1":
9
+ return new Filter({
10
+ filters: [
11
+ new Filter({ path: "<%- property %>", operator: FilterOperator.GT, value1: 100 }),
12
+ new Filter({ path: "<%- property %>", operator: FilterOperator.LT, value1: 500 })
13
+ ],
14
+ and: true
15
+ });
16
+ case "2":
17
+ return new Filter({ path: "<%- property %>", operator: FilterOperator.GT, value1: 500 });
18
+ }
19
+ }
20
+ };
21
+ });
@@ -0,0 +1,24 @@
1
+ import Filter from 'sap/ui/model/Filter';
2
+ import FilterOperator from 'sap/ui/model/FilterOperator';
3
+
4
+ /**
5
+ * Custom filter
6
+ * @param sValue selected filter item
7
+ * @returns new Filter
8
+ */
9
+ export function <%- eventHandlerFnName %>(value: string) {
10
+ switch (value) {
11
+ case "0":
12
+ return new Filter({ path: "<%- property %>", operator: FilterOperator.LT, value1: 100 });
13
+ case "1":
14
+ return new Filter({
15
+ filters: [
16
+ new Filter({ path: "<%- property %>", operator: FilterOperator.GT, value1: 100 }),
17
+ new Filter({ path: "<%- property %>", operator: FilterOperator.LT, value1: 500 })
18
+ ],
19
+ and: true
20
+ });
21
+ case "2":
22
+ return new Filter({ path: "<%- property %>", operator: FilterOperator.GT, value1: 500 });
23
+ }
24
+ }
@@ -0,0 +1,15 @@
1
+ <core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"><%if (typeof eventHandler !== 'undefined') {%>
2
+ <ComboBox
3
+ id="<% if (typeof controlID !== 'undefined' && controlID) { %><%- controlID %><% } else { %><%- ids.comboBox %><% } %>"
4
+ width="100%"
5
+ core:require="{handler: '<%- eventHandler.split('.').slice(0, -1).join('/') %>'}"
6
+ selectedKey="{path: 'filterValues>', type: 'sap.fe.macros.filter.type.Value', formatOptions: { operator: '<%- eventHandler %>' }}"
7
+ ><% } else { %>
8
+ <ComboBox id="<% if (typeof controlID !== 'undefined' && controlID) { %><%- controlID %><% } else { %><%- ids.comboBox %><% } %>" width="100%"><% } %>
9
+ <items>
10
+ <core:Item id="<%- ids.item1 %>" key="0" text="Item1"/>
11
+ <core:Item id="<%- ids.item2 %>" key="1" text="Item2"/>
12
+ <core:Item id="<%- ids.item3 %>" key="2" text="Item3"/>
13
+ </items>
14
+ </ComboBox>
15
+ </core:FragmentDefinition>
@@ -0,0 +1,12 @@
1
+ {
2
+ "<%- name %>": {
3
+ "label": "<%- label %>",
4
+ "property": "<%- property %>",
5
+ "template": "<%- `${ns}.${fragmentFile}` %>",
6
+ "required": <%- required -%><%if (typeof position !== 'undefined') {%>,
7
+ "position": {
8
+ "placement": "<%- position.placement %>"<%if (position.anchor !== undefined) {%>,
9
+ "anchor": "<%- position.anchor %>"<% } %>
10
+ }<% } %>
11
+ }
12
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "sap.ui5": {
3
+ "routing": {
4
+ "targets": {
5
+ "<%- target %>": {
6
+ "options": {
7
+ "settings": {
8
+ "content": {
9
+ "header": {
10
+ "facets": {
11
+ "<%- name %>": {
12
+ "name": "<%- ns %>.<%- name %>",
13
+ "type": "XMLFragment",
14
+ <%if (typeof position !== 'undefined') {%>"position": {
15
+ <% if (position.placement) { %>
16
+ "placement": "<%- position.placement %>"<% if (position.anchor) { %>,<% } %>
17
+ <% } %>
18
+ <% if (position.anchor) { %>
19
+ "anchor": "<%- position.anchor %>"
20
+ <% } %>
21
+ },<% } %>
22
+ "title": "<%- title %>",
23
+ <% if (subTitle) { %>
24
+ "subTitle": "<%- subTitle %>",
25
+ <% } %>
26
+ <% if (typeof stashed !== 'undefined') { %>
27
+ "stashed": <%- stashed %>,
28
+ <% } %>
29
+ "requestGroupId": "<%- requestGroupId %>",
30
+ "flexSettings": {
31
+ "designtime": "<%- flexSettings.designtime %>"
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }