@sap-ux/preview-middleware 0.16.131 → 0.16.132
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/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +11 -48
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +16 -44
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +69 -0
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +79 -0
- package/dist/client/adp/quick-actions/fe-v2/registry.js +3 -2
- package/dist/client/adp/quick-actions/fe-v2/registry.ts +3 -1
- package/dist/client/adp/quick-actions/fe-v2/utils.js +77 -0
- package/dist/client/adp/quick-actions/fe-v2/utils.ts +72 -0
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +1 -5
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +0 -4
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +84 -0
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +96 -0
- package/dist/client/adp/quick-actions/fe-v4/registry.js +3 -2
- package/dist/client/adp/quick-actions/fe-v4/registry.ts +3 -1
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.js +9 -3
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.ts +10 -3
- package/dist/client/adp/quick-actions/simple-quick-action-base.js +6 -2
- package/dist/client/adp/quick-actions/simple-quick-action-base.ts +9 -2
- package/dist/client/adp/quick-actions/table-quick-action-base.js +13 -4
- package/dist/client/adp/quick-actions/table-quick-action-base.ts +17 -5
- package/dist/client/cpe/changes/flex-change.js +7 -19
- package/dist/client/cpe/changes/flex-change.ts +5 -29
- package/dist/client/cpe/quick-actions/quick-action-definition.ts +1 -6
- package/dist/client/cpe/quick-actions/quick-action-service.js +1 -1
- package/dist/client/cpe/quick-actions/quick-action-service.ts +1 -1
- package/dist/client/messagebundle.properties +2 -1
- package/dist/client/utils/fe-v4.js +30 -1
- package/dist/client/utils/fe-v4.ts +45 -1
- package/package.json +3 -3
|
@@ -3,8 +3,12 @@ import TemplateComponent from 'sap/fe/core/TemplateComponent';
|
|
|
3
3
|
import Component from 'sap/ui/core/Component';
|
|
4
4
|
import AppComponent from 'sap/fe/core/AppComponent';
|
|
5
5
|
import XMLView from 'sap/ui/core/mvc/XMLView';
|
|
6
|
-
import type { Manifest } from 'sap/ui/rta/RuntimeAuthoring';
|
|
6
|
+
import type { FlexSettings, Manifest } from 'sap/ui/rta/RuntimeAuthoring';
|
|
7
7
|
import { isA } from './core';
|
|
8
|
+
import CommandFactory from 'sap/ui/rta/command/CommandFactory';
|
|
9
|
+
import { getOverlay } from '../cpe/utils';
|
|
10
|
+
import UI5Element from 'sap/ui/core/Element';
|
|
11
|
+
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
/**
|
|
@@ -79,3 +83,43 @@ export function getConfigMapControlIdMap(page: string | undefined, propertyPathS
|
|
|
79
83
|
}
|
|
80
84
|
return propertyPathSegments.join('/');
|
|
81
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Get the modified value for a control.
|
|
89
|
+
* @param modifiedControl - The modified control.
|
|
90
|
+
* @param flexSettings - Flex Settings of the control.
|
|
91
|
+
* @param propertyChanges - The change object
|
|
92
|
+
*
|
|
93
|
+
* @returns A Promise resolving to an array of FlexCommand objects.
|
|
94
|
+
*/
|
|
95
|
+
export async function createManifestPropertyChange(modifiedControl: UI5Element, flexSettings: FlexSettings, propertyChanges: Record<string, string | string[] | boolean | number | object | undefined>): Promise<FlexCommand | undefined> {
|
|
96
|
+
const overlay = getOverlay(modifiedControl);
|
|
97
|
+
if (!overlay) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const overlayData = overlay?.getDesignTimeMetadata().getData();
|
|
101
|
+
const manifestPropertyPath = overlayData.manifestPropertyPath(modifiedControl);
|
|
102
|
+
const [manifestPropertyChange] = overlayData.manifestPropertyChange(
|
|
103
|
+
propertyChanges,
|
|
104
|
+
manifestPropertyPath,
|
|
105
|
+
modifiedControl
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const modifiedValue = {
|
|
109
|
+
reference: getReference(modifiedControl),
|
|
110
|
+
appComponent: manifestPropertyChange.appComponent,
|
|
111
|
+
changeType: manifestPropertyChange.changeSpecificData.appDescriptorChangeType,
|
|
112
|
+
parameters: manifestPropertyChange.changeSpecificData.content.parameters,
|
|
113
|
+
selector: manifestPropertyChange.selector
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const command = await CommandFactory.getCommandFor(
|
|
117
|
+
modifiedControl,
|
|
118
|
+
'appDescriptor',
|
|
119
|
+
modifiedValue,
|
|
120
|
+
null,
|
|
121
|
+
flexSettings
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
return command;
|
|
125
|
+
}
|
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.16.
|
|
12
|
+
"version": "0.16.132",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@sap-ux/feature-toggle": "0.2.2",
|
|
30
30
|
"@sap-ux/btp-utils": "0.17.0",
|
|
31
31
|
"@sap-ux/adp-tooling": "0.12.85",
|
|
32
|
-
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.
|
|
32
|
+
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.28",
|
|
33
33
|
"@sap-ux/project-access": "1.28.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"supertest": "6.3.3",
|
|
47
47
|
"@sap-ux-private/playwright": "0.1.0",
|
|
48
48
|
"dotenv": "16.3.1",
|
|
49
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.
|
|
49
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.37",
|
|
50
50
|
"@sap-ux/axios-extension": "1.17.4",
|
|
51
51
|
"@sap-ux/store": "0.9.3",
|
|
52
52
|
"@sap-ux/ui5-info": "0.8.3",
|