@sap-ux/preview-middleware 0.21.0 → 0.21.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.
|
@@ -11,12 +11,19 @@ sap.ui.define(["../../utils/core", "../../adp/quick-actions/control-types"], fun
|
|
|
11
11
|
function getAddXMLAdditionalInfo(change) {
|
|
12
12
|
const selectorId = change.getSelector()?.id ?? '';
|
|
13
13
|
const targetAggregation = change.getContent()?.targetAggregation ?? '';
|
|
14
|
+
const controlType = getControlById(selectorId)?.getMetadata().getName() ?? '';
|
|
14
15
|
const templateName = getFragmentTemplateName(selectorId, targetAggregation);
|
|
15
16
|
if (templateName) {
|
|
16
17
|
return {
|
|
17
18
|
templateName
|
|
18
19
|
};
|
|
19
20
|
}
|
|
21
|
+
if (controlType && targetAggregation) {
|
|
22
|
+
return {
|
|
23
|
+
targetAggregation,
|
|
24
|
+
controlType
|
|
25
|
+
};
|
|
26
|
+
}
|
|
20
27
|
return undefined;
|
|
21
28
|
}
|
|
22
29
|
function getFragmentTemplateName(selectorId, targetAggregation) {
|
|
@@ -9,7 +9,9 @@ import {
|
|
|
9
9
|
import Element from 'sap/ui/core/Element';
|
|
10
10
|
|
|
11
11
|
export type AddXMLAdditionalInfo = {
|
|
12
|
-
templateName
|
|
12
|
+
templateName?: string;
|
|
13
|
+
targetAggregation?: string;
|
|
14
|
+
controlType?: string;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export type AddXMLChangeContent = {
|
|
@@ -19,10 +21,14 @@ export type AddXMLChangeContent = {
|
|
|
19
21
|
export function getAddXMLAdditionalInfo(change: FlexChange<AddXMLChangeContent>): AddXMLAdditionalInfo | undefined {
|
|
20
22
|
const selectorId = change.getSelector()?.id ?? '';
|
|
21
23
|
const targetAggregation = change.getContent()?.targetAggregation ?? '';
|
|
24
|
+
const controlType = getControlById(selectorId)?.getMetadata().getName() ?? '';
|
|
22
25
|
const templateName = getFragmentTemplateName(selectorId, targetAggregation);
|
|
23
26
|
if (templateName) {
|
|
24
27
|
return { templateName };
|
|
25
28
|
}
|
|
29
|
+
if (controlType && targetAggregation) {
|
|
30
|
+
return { targetAggregation, controlType };
|
|
31
|
+
}
|
|
26
32
|
return undefined;
|
|
27
33
|
}
|
|
28
34
|
|
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%3Apreview-middleware"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.21.
|
|
12
|
+
"version": "0.21.1",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"ejs": "3.1.10",
|
|
26
26
|
"mem-fs": "2.1.0",
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
|
-
"@sap-ux/adp-tooling": "0.15.
|
|
28
|
+
"@sap-ux/adp-tooling": "0.15.13",
|
|
29
29
|
"@sap-ux/btp-utils": "1.1.0",
|
|
30
30
|
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.7.0",
|
|
31
31
|
"@sap-ux/feature-toggle": "0.3.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"nock": "13.4.0",
|
|
51
51
|
"npm-run-all2": "6.2.0",
|
|
52
52
|
"supertest": "7.1.4",
|
|
53
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.15.
|
|
53
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.15.1",
|
|
54
54
|
"@sap-ux/axios-extension": "1.22.5",
|
|
55
55
|
"@sap-ux/store": "1.1.2",
|
|
56
56
|
"@sap-ux/ui5-info": "0.12.1"
|