@sap-ux/adp-tooling 0.18.3 → 0.18.4
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/preview/change-handler.js +8 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/templates/rta/common/analytical-custom-column.xml +4 -1
- package/templates/rta/common/custom-action.xml +5 -2
- package/templates/rta/common/grid-tree-custom-column.xml +4 -1
- package/templates/rta/common/header-field.xml +6 -3
- package/templates/rta/common/op-custom-section.xml +5 -2
- package/templates/rta/common/v4-table-action.xml +5 -2
- package/templates/rta/fragment.xml +3 -3
- package/templates/rta/v2/m-table-custom-column-cell.xml +5 -2
- package/templates/rta/v2/m-table-custom-column.xml +5 -2
- package/templates/rta/v4/custom-section.xml +5 -2
- package/templates/rta/v4/mdc-custom-column.xml +4 -1
|
@@ -231,7 +231,13 @@ function addXmlFragment(basePath, change, fs, logger, additionalChangeInfo) {
|
|
|
231
231
|
if (templateConfig) {
|
|
232
232
|
const fragmentTemplatePath = (0, node_path_1.join)(__dirname, '../../templates/rta', templateConfig.path);
|
|
233
233
|
const text = fs.read(fragmentTemplatePath);
|
|
234
|
-
const
|
|
234
|
+
const changeTemplate = {
|
|
235
|
+
...templateConfig.getData(change),
|
|
236
|
+
viewName: additionalChangeInfo?.viewName,
|
|
237
|
+
targetAggregation: additionalChangeInfo?.targetAggregation,
|
|
238
|
+
controlType: additionalChangeInfo?.controlType
|
|
239
|
+
};
|
|
240
|
+
const template = (0, ejs_1.render)(text, changeTemplate);
|
|
235
241
|
fs.write(fullPath, template);
|
|
236
242
|
}
|
|
237
243
|
else {
|
|
@@ -240,6 +246,7 @@ function addXmlFragment(basePath, change, fs, logger, additionalChangeInfo) {
|
|
|
240
246
|
const fragmentTemplatePath = (0, node_path_1.join)(__dirname, '../../templates/rta', templateName);
|
|
241
247
|
const text = fs.read(fragmentTemplatePath);
|
|
242
248
|
const template = (0, ejs_1.render)(text, {
|
|
249
|
+
viewName: additionalChangeInfo?.viewName,
|
|
243
250
|
targetAggregation: additionalChangeInfo?.targetAggregation,
|
|
244
251
|
controlType: additionalChangeInfo?.controlType
|
|
245
252
|
});
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.18.
|
|
12
|
+
"version": "0.18.4",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<!-- Use stable and unique id's!-->
|
|
2
|
-
<core:FragmentDefinition xmlns="sap.m" xmlns:table="sap.ui.table" xmlns:smartfield="sap.ui.comp.smartfield" xmlns:core="sap.ui.core"
|
|
2
|
+
<core:FragmentDefinition xmlns="sap.m" xmlns:table="sap.ui.table" xmlns:smartfield="sap.ui.comp.smartfield" xmlns:core="sap.ui.core"><% if (targetAggregation && controlType && viewName) { %>
|
|
3
|
+
<!-- viewName: <%= viewName %> -->
|
|
4
|
+
<!-- controlType: <%= controlType %> -->
|
|
5
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
3
6
|
<table:AnalyticalColumn
|
|
4
7
|
grouped="false"
|
|
5
8
|
autoResizable="true"
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<!-- Use stable and unique IDs!-->
|
|
2
|
-
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'
|
|
3
|
-
<!--
|
|
2
|
+
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'><% if (targetAggregation && controlType && viewName) { %>
|
|
3
|
+
<!-- viewName: <%= viewName %> -->
|
|
4
|
+
<!-- controlType: <%= controlType %> -->
|
|
5
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
6
|
+
<!-- add your xml here -->
|
|
4
7
|
<Button text="New Button" id="<%- ids.toolbarActionButton %>"></Button>
|
|
5
8
|
</core:FragmentDefinition>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<!-- Use stable and unique id's!-->
|
|
2
|
-
<core:FragmentDefinition xmlns="sap.m" xmlns:table="sap.ui.table" xmlns:smartfield="sap.ui.comp.smartfield" xmlns:core="sap.ui.core"
|
|
2
|
+
<core:FragmentDefinition xmlns="sap.m" xmlns:table="sap.ui.table" xmlns:smartfield="sap.ui.comp.smartfield" xmlns:core="sap.ui.core"><% if (targetAggregation && controlType && viewName) { %>
|
|
3
|
+
<!-- viewName: <%= viewName %> -->
|
|
4
|
+
<!-- controlType: <%= controlType %> -->
|
|
5
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
3
6
|
<table:Column
|
|
4
7
|
autoResizable="true"
|
|
5
8
|
width="150px"
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
xmlns:uxap="sap.uxap"
|
|
4
4
|
xmlns:core='sap.ui.core'
|
|
5
5
|
xmlns='sap.m'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
><% if (targetAggregation && controlType && viewName) { %>
|
|
7
|
+
<!-- viewName: <%= viewName %> -->
|
|
8
|
+
<!-- controlType: <%= controlType %> -->
|
|
9
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
10
|
+
<VBox id="<%- ids.vBoxContainer %>">
|
|
11
|
+
<Label id="<%- ids.label %>" text="New Field"></Label>
|
|
9
12
|
</VBox>
|
|
10
13
|
</core:FragmentDefinition>
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
xmlns:uxap="sap.uxap"
|
|
4
4
|
xmlns:core='sap.ui.core'
|
|
5
5
|
xmlns='sap.m'
|
|
6
|
-
|
|
6
|
+
><% if (targetAggregation && controlType && viewName) { %>
|
|
7
|
+
<!-- viewName: <%= viewName %> -->
|
|
8
|
+
<!-- controlType: <%= controlType %> -->
|
|
9
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
7
10
|
<uxap:ObjectPageSection
|
|
8
11
|
id="<%- ids.objectPageSection %>"
|
|
9
12
|
title="New Custom Section"
|
|
10
13
|
>
|
|
11
14
|
<uxap:ObjectPageSubSection id="<%- ids.objectPageSubSection %>">
|
|
12
15
|
<HBox id="<%- ids.hBox %>">
|
|
13
|
-
<!--
|
|
16
|
+
<!-- add your xml here -->
|
|
14
17
|
</HBox>
|
|
15
18
|
</uxap:ObjectPageSubSection>
|
|
16
19
|
</uxap:ObjectPageSection>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'
|
|
2
|
-
|
|
1
|
+
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'><% if (targetAggregation && controlType && viewName) { %>
|
|
2
|
+
<!-- viewName: <%= viewName %> -->
|
|
3
|
+
<!-- controlType: <%= controlType %> -->
|
|
4
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
5
|
+
<actiontoolbar:ActionToolbarAction xmlns:actiontoolbar="sap.ui.mdc.actiontoolbar" id="<%- ids.customToolbarAction%>" >
|
|
3
6
|
<Button xmlns:m="sap.m" id="<%- ids.customActionButton %>" visible="true" text="New Action" />
|
|
4
7
|
</actiontoolbar:ActionToolbarAction>
|
|
5
8
|
</core:FragmentDefinition>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Use stable and unique IDs!-->
|
|
2
|
-
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'><% if (targetAggregation && controlType) { %>
|
|
2
|
+
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'><% if (targetAggregation && controlType && viewName) { %>
|
|
3
|
+
<!-- viewName: <%= viewName %> -->
|
|
3
4
|
<!-- controlType: <%= controlType %> -->
|
|
4
5
|
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
5
|
-
<!--
|
|
6
|
-
|
|
6
|
+
<!-- add your xml here -->
|
|
7
7
|
</core:FragmentDefinition>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'
|
|
2
|
-
<!--
|
|
1
|
+
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'><% if (targetAggregation && controlType && viewName) { %>
|
|
2
|
+
<!-- viewName: <%= viewName %> -->
|
|
3
|
+
<!-- controlType: <%= controlType %> -->
|
|
4
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
5
|
+
<!-- add your xml here -->
|
|
3
6
|
<Text id="<%- ids.text %>" text="Sample data" />
|
|
4
7
|
</core:FragmentDefinition>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<!-- Use stable and unique IDs!-->
|
|
2
|
-
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'
|
|
3
|
-
<!--
|
|
2
|
+
<core:FragmentDefinition xmlns:core='sap.ui.core' xmlns='sap.m'><% if (targetAggregation && controlType && viewName) { %>
|
|
3
|
+
<!-- viewName: <%= viewName %> -->
|
|
4
|
+
<!-- controlType: <%= controlType %> -->
|
|
5
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
6
|
+
<!-- add your xml here -->
|
|
4
7
|
<Column id="<%- ids.column %>"
|
|
5
8
|
width="12em"
|
|
6
9
|
hAlign="Left"
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
xmlns:core='sap.ui.core'
|
|
4
4
|
xmlns='sap.m'
|
|
5
5
|
>
|
|
6
|
-
<HBox id="<%- ids.hBox %>"
|
|
7
|
-
<!--
|
|
6
|
+
<HBox id="<%- ids.hBox %>"><% if (targetAggregation && controlType && viewName) { %>
|
|
7
|
+
<!-- viewName: <%= viewName %> -->
|
|
8
|
+
<!-- controlType: <%= controlType %> -->
|
|
9
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
10
|
+
<!-- add your xml here -->
|
|
8
11
|
</HBox>
|
|
9
12
|
</core:FragmentDefinition>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:table="sap.ui.mdc.table"
|
|
1
|
+
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:table="sap.ui.mdc.table"><% if (targetAggregation && controlType && viewName) { %>
|
|
2
|
+
<!-- viewName: <%= viewName %> -->
|
|
3
|
+
<!-- controlType: <%= controlType %> -->
|
|
4
|
+
<!-- targetAggregation: <%= targetAggregation %> --> <% } %>
|
|
2
5
|
<table:Column
|
|
3
6
|
id="<%- ids.column %>"
|
|
4
7
|
width="10%"
|