@sap-ux/adp-tooling 0.18.3 → 0.18.5
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 +6 -0
- package/dist/ui5/format.d.ts +9 -17
- package/dist/ui5/format.js +15 -25
- package/dist/ui5/network.d.ts +6 -2
- package/dist/ui5/network.js +5 -2
- package/dist/ui5/validator.js +5 -1
- package/dist/ui5/version-info.js +12 -8
- package/package.json +2 -2
- 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
|
@@ -234,6 +234,7 @@ export interface CommonAdditionalChangeInfoProperties {
|
|
|
234
234
|
templateName?: string;
|
|
235
235
|
targetAggregation?: string;
|
|
236
236
|
controlType?: string;
|
|
237
|
+
viewName?: string;
|
|
237
238
|
}
|
|
238
239
|
export interface ManifestChangeProperties {
|
|
239
240
|
fileName: string;
|
|
@@ -388,6 +389,11 @@ export declare const enum HttpStatusCodes {
|
|
|
388
389
|
NOT_IMPLEMETED = 501,
|
|
389
390
|
SERVICE_UNAVAILABLE = 503
|
|
390
391
|
}
|
|
392
|
+
export type NetworkError = {
|
|
393
|
+
message?: string;
|
|
394
|
+
name?: string;
|
|
395
|
+
code?: string;
|
|
396
|
+
};
|
|
391
397
|
export type OperationType = 'read' | 'write' | 'delete';
|
|
392
398
|
/**
|
|
393
399
|
* Represents a constructor type that creates an instance of IWriter.
|
package/dist/ui5/format.d.ts
CHANGED
|
@@ -40,28 +40,20 @@ export declare function removeBracketsFromVersion(version: string): string;
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function removeMicroPart(version: string): string;
|
|
42
42
|
/**
|
|
43
|
-
* Removes the timestamp
|
|
44
|
-
* Converts a version string like '1.95.0.
|
|
43
|
+
* Removes the timestamp and '-snapshot' suffix from a version string.
|
|
44
|
+
* Converts a version string like '1.95.0.123456789' or '1.95.0-snapshot' to '1.95.0'.
|
|
45
45
|
*
|
|
46
|
-
* @param {string} version - The version string that may include a timestamp
|
|
47
|
-
* @returns {string} The version string without the timestamp
|
|
48
|
-
*/
|
|
49
|
-
export declare function removeTimestampFromVersion(version: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Removes the '-snapshot' suffix from a version string's patch number.
|
|
52
|
-
* Converts version strings like '1.96.0-snapshot' to '1.96.0' by cleaning
|
|
53
|
-
* the patch part of any snapshot designation.
|
|
54
|
-
*
|
|
55
|
-
* @param {string} version - The version string that may include '-snapshot' in the patch number.
|
|
56
|
-
* @returns {string} The version string with the snapshot suffix removed from the patch number.
|
|
46
|
+
* @param {string} version - The version string that may include a timestamp and '-snapshot' suffix.
|
|
47
|
+
* @returns {string} The cleaned version string without the timestamp and snapshot designation.
|
|
57
48
|
* @example
|
|
58
49
|
* ```typescript
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
50
|
+
* formatUi5Version('1.95.0.123456789'); // returns '1.95.0'
|
|
51
|
+
* formatUi5Version('1.95.0-snapshot'); // returns '1.95.0'
|
|
52
|
+
* formatUi5Version('1.95.0-SNAPSHOT'); // returns '1.95.0'
|
|
53
|
+
* formatUi5Version('1.95.0'); // returns '1.95.0'
|
|
62
54
|
* ```
|
|
63
55
|
*/
|
|
64
|
-
export declare function
|
|
56
|
+
export declare function formatUi5Version(version: string): string;
|
|
65
57
|
/**
|
|
66
58
|
* Conditionally appends a '-snapshot' suffix to a version string if certain criteria are met.
|
|
67
59
|
* The suffix is added only if the version string includes an unreleased snapshot version.
|
package/dist/ui5/format.js
CHANGED
|
@@ -5,8 +5,7 @@ exports.getFormattedVersion = getFormattedVersion;
|
|
|
5
5
|
exports.buildSystemVersionLabel = buildSystemVersionLabel;
|
|
6
6
|
exports.removeBracketsFromVersion = removeBracketsFromVersion;
|
|
7
7
|
exports.removeMicroPart = removeMicroPart;
|
|
8
|
-
exports.
|
|
9
|
-
exports.removeSnapshotFromVersion = removeSnapshotFromVersion;
|
|
8
|
+
exports.formatUi5Version = formatUi5Version;
|
|
10
9
|
exports.addSnapshot = addSnapshot;
|
|
11
10
|
exports.parseUI5Version = parseUI5Version;
|
|
12
11
|
exports.isFeatureSupportedVersion = isFeatureSupportedVersion;
|
|
@@ -73,34 +72,22 @@ function removeMicroPart(version) {
|
|
|
73
72
|
return `${versionParts[0]}.${versionParts[1]}`;
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
76
|
-
* Removes the timestamp
|
|
77
|
-
* Converts a version string like '1.95.0.
|
|
75
|
+
* Removes the timestamp and '-snapshot' suffix from a version string.
|
|
76
|
+
* Converts a version string like '1.95.0.123456789' or '1.95.0-snapshot' to '1.95.0'.
|
|
78
77
|
*
|
|
79
|
-
* @param {string} version - The version string that may include a timestamp
|
|
80
|
-
* @returns {string} The version string without the timestamp
|
|
81
|
-
*/
|
|
82
|
-
function removeTimestampFromVersion(version) {
|
|
83
|
-
const versionParts = version.split('.');
|
|
84
|
-
return `${versionParts[0]}.${versionParts[1]}.${versionParts[2]}`;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Removes the '-snapshot' suffix from a version string's patch number.
|
|
88
|
-
* Converts version strings like '1.96.0-snapshot' to '1.96.0' by cleaning
|
|
89
|
-
* the patch part of any snapshot designation.
|
|
90
|
-
*
|
|
91
|
-
* @param {string} version - The version string that may include '-snapshot' in the patch number.
|
|
92
|
-
* @returns {string} The version string with the snapshot suffix removed from the patch number.
|
|
78
|
+
* @param {string} version - The version string that may include a timestamp and '-snapshot' suffix.
|
|
79
|
+
* @returns {string} The cleaned version string without the timestamp and snapshot designation.
|
|
93
80
|
* @example
|
|
94
81
|
* ```typescript
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
82
|
+
* formatUi5Version('1.95.0.123456789'); // returns '1.95.0'
|
|
83
|
+
* formatUi5Version('1.95.0-snapshot'); // returns '1.95.0'
|
|
84
|
+
* formatUi5Version('1.95.0-SNAPSHOT'); // returns '1.95.0'
|
|
85
|
+
* formatUi5Version('1.95.0'); // returns '1.95.0'
|
|
98
86
|
* ```
|
|
99
87
|
*/
|
|
100
|
-
function
|
|
88
|
+
function formatUi5Version(version) {
|
|
101
89
|
const versionParts = version.split('.');
|
|
102
|
-
|
|
103
|
-
return `${versionParts[0]}.${versionParts[1]}.${patchNumber}`;
|
|
90
|
+
return `${versionParts[0]}.${versionParts[1]}.${versionParts[2].toLowerCase().replace('-snapshot', '')}`;
|
|
104
91
|
}
|
|
105
92
|
/**
|
|
106
93
|
* Conditionally appends a '-snapshot' suffix to a version string if certain criteria are met.
|
|
@@ -113,7 +100,10 @@ function removeSnapshotFromVersion(version) {
|
|
|
113
100
|
*/
|
|
114
101
|
function addSnapshot(version, latestVersion) {
|
|
115
102
|
const versionParts = version.split('.');
|
|
116
|
-
return versionParts[
|
|
103
|
+
return (versionParts[3] || version.toLowerCase().includes('-snapshot')) &&
|
|
104
|
+
formatUi5Version(version) !== latestVersion
|
|
105
|
+
? '-snapshot'
|
|
106
|
+
: '';
|
|
117
107
|
}
|
|
118
108
|
/**
|
|
119
109
|
* Function that parse the UI5 version. Returns NaN for snapshot or snapshot-untested. eturns x.xx for snapshot-x.xx.xx.
|
package/dist/ui5/network.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import type { NetworkError } from '../types';
|
|
1
2
|
/**
|
|
2
3
|
* Checks if the current environment is offline or has network connectivity issues.
|
|
3
4
|
* This function is designed for VS Code's Yeoman UI environment where network
|
|
4
5
|
* errors may differ from browser environments.
|
|
5
6
|
*
|
|
6
|
-
* @param {
|
|
7
|
+
* @param {object} error - The error object from a failed fetch request.
|
|
8
|
+
* @param {string} [error.message] - The error message string.
|
|
9
|
+
* @param {string} [error.name] - The error name string.
|
|
10
|
+
* @param {string} [error.code] - The error code string.
|
|
7
11
|
* @returns {boolean} True if the error indicates offline/network issues.
|
|
8
12
|
*/
|
|
9
|
-
export declare function isOfflineError(error:
|
|
13
|
+
export declare function isOfflineError(error: NetworkError): boolean;
|
|
10
14
|
//# sourceMappingURL=network.d.ts.map
|
package/dist/ui5/network.js
CHANGED
|
@@ -22,10 +22,13 @@ const networkErrorMessages = [
|
|
|
22
22
|
* This function is designed for VS Code's Yeoman UI environment where network
|
|
23
23
|
* errors may differ from browser environments.
|
|
24
24
|
*
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {object} error - The error object from a failed fetch request.
|
|
26
|
+
* @param {string} [error.message] - The error message string.
|
|
27
|
+
* @param {string} [error.name] - The error name string.
|
|
28
|
+
* @param {string} [error.code] - The error code string.
|
|
26
29
|
* @returns {boolean} True if the error indicates offline/network issues.
|
|
27
30
|
*/
|
|
28
31
|
function isOfflineError(error) {
|
|
29
|
-
return networkErrorMessages.some((msg) => error.message?.includes(msg) || error.name?.includes(msg));
|
|
32
|
+
return networkErrorMessages.some((msg) => error.message?.includes(msg) || error.name?.includes(msg) || error.code?.includes(msg));
|
|
30
33
|
}
|
|
31
34
|
//# sourceMappingURL=network.js.map
|
package/dist/ui5/validator.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateUI5VersionExists = validateUI5VersionExists;
|
|
4
7
|
const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
8
|
+
const axios_1 = __importDefault(require("axios"));
|
|
5
9
|
const i18n_1 = require("../i18n");
|
|
6
10
|
const format_1 = require("./format");
|
|
7
11
|
const network_1 = require("./network");
|
|
@@ -19,7 +23,7 @@ async function validateUI5VersionExists(version) {
|
|
|
19
23
|
const selectedVersionURL = (0, format_1.getOfficialBaseUI5VersionUrl)(version);
|
|
20
24
|
const resource = version.includes('snapshot') ? 'neo-app.json' : (0, format_1.getFormattedVersion)(version);
|
|
21
25
|
try {
|
|
22
|
-
await
|
|
26
|
+
await axios_1.default.get(`${selectedVersionURL}/${resource}`);
|
|
23
27
|
return true;
|
|
24
28
|
}
|
|
25
29
|
catch (e) {
|
package/dist/ui5/version-info.js
CHANGED
|
@@ -82,7 +82,7 @@ function getVersionLabels(version, publicVersions) {
|
|
|
82
82
|
let systemLatestLabel = '';
|
|
83
83
|
if (version) {
|
|
84
84
|
const latestVersion = getLatestVersion(publicVersions);
|
|
85
|
-
formattedVersion = (0, format_1.
|
|
85
|
+
formattedVersion = (0, format_1.formatUi5Version)(version);
|
|
86
86
|
systemSnapshotLabel = (0, format_1.addSnapshot)(version, latestVersion);
|
|
87
87
|
systemLatestLabel = formattedVersion === latestVersion ? constants_1.LATEST_VERSION : '';
|
|
88
88
|
}
|
|
@@ -99,9 +99,7 @@ function checkSystemVersionPattern(version) {
|
|
|
99
99
|
if (!version || !pattern.test(version)) {
|
|
100
100
|
return undefined;
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
normalizedVersion = (0, format_1.removeSnapshotFromVersion)(normalizedVersion);
|
|
104
|
-
return normalizedVersion;
|
|
102
|
+
return (0, format_1.formatUi5Version)(version);
|
|
105
103
|
}
|
|
106
104
|
/**
|
|
107
105
|
* Retrieves and filters internal UI5 versions.
|
|
@@ -151,21 +149,27 @@ async function getHigherVersions(version, publicVersions) {
|
|
|
151
149
|
* @returns {Promise<string[]>} A promise that resolves to an array of relevant version strings.
|
|
152
150
|
*/
|
|
153
151
|
async function getRelevantVersions(systemVersion, isCustomerBase, publicVersions) {
|
|
154
|
-
|
|
152
|
+
let formattedVersion = '', systemSnapshotLabel = '', systemLatestLabel = '';
|
|
155
153
|
const latestPublicVersion = publicVersions?.latest?.version;
|
|
156
154
|
let versions = [];
|
|
157
|
-
|
|
155
|
+
if (systemVersion) {
|
|
156
|
+
({ formattedVersion, systemSnapshotLabel, systemLatestLabel } = getVersionLabels(systemVersion, publicVersions));
|
|
157
|
+
}
|
|
158
158
|
if (!isCustomerBase) {
|
|
159
159
|
versions = await getInternalVersions(latestPublicVersion);
|
|
160
|
-
if (
|
|
160
|
+
if (formattedVersion) {
|
|
161
161
|
const regex = new RegExp(`${formattedVersion} `, 'g');
|
|
162
162
|
versions = versions.map((v) => v.replace(regex, `${formattedVersion}${systemSnapshotLabel} ${constants_1.CURRENT_SYSTEM_VERSION}`));
|
|
163
163
|
versions.unshift((0, format_1.buildSystemVersionLabel)(formattedVersion, systemSnapshotLabel, systemLatestLabel));
|
|
164
164
|
}
|
|
165
165
|
versions.unshift(constants_1.SNAPSHOT_VERSION, constants_1.SNAPSHOT_UNTESTED_VERSION);
|
|
166
166
|
}
|
|
167
|
-
else if (
|
|
167
|
+
else if (formattedVersion && systemSnapshotLabel === '') {
|
|
168
168
|
versions = await getHigherVersions(formattedVersion, publicVersions);
|
|
169
|
+
if (!versions.length && formattedVersion !== latestPublicVersion) {
|
|
170
|
+
versions = [`${formattedVersion} ${constants_1.CURRENT_SYSTEM_VERSION}`, `${latestPublicVersion} ${constants_1.LATEST_VERSION}`];
|
|
171
|
+
return [...new Set(versions)];
|
|
172
|
+
}
|
|
169
173
|
versions.unshift((0, format_1.buildSystemVersionLabel)(formattedVersion, systemSnapshotLabel, systemLatestLabel));
|
|
170
174
|
}
|
|
171
175
|
else {
|
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.5",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"ejs": "3.1.10",
|
|
31
31
|
"i18next": "25.3.0",
|
|
32
32
|
"inquirer": "8.2.7",
|
|
33
|
-
"js-yaml": "4.1.
|
|
33
|
+
"js-yaml": "4.1.1",
|
|
34
34
|
"mem-fs": "2.1.0",
|
|
35
35
|
"mem-fs-editor": "9.4.0",
|
|
36
36
|
"prompts": "2.4.2",
|
|
@@ -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%"
|