@sap-ux/preview-middleware 0.20.2 → 0.20.3
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-v4/create-table-action.js +1 -1
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.ts +1 -1
- package/dist/client/cpe/context-menu-service.js +6 -3
- package/dist/client/cpe/context-menu-service.ts +3 -1
- package/dist/client/cpe/quick-actions/quick-action-service.js +10 -3
- package/dist/client/cpe/quick-actions/quick-action-service.ts +7 -1
- package/package.json +4 -4
|
@@ -10,7 +10,7 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../utils/core", "../../dialog-fac
|
|
|
10
10
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
11
11
|
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
12
12
|
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
13
|
-
const CREATE_TABLE_ACTION = '
|
|
13
|
+
const CREATE_TABLE_ACTION = 'create-table-action';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Quick Action for creating table action.
|
|
@@ -12,7 +12,7 @@ import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
|
12
12
|
import { MDC_TABLE_TYPE } from '../control-types';
|
|
13
13
|
import { preprocessActionExecution } from '../fe-v2/create-table-custom-column';
|
|
14
14
|
|
|
15
|
-
export const CREATE_TABLE_ACTION = '
|
|
15
|
+
export const CREATE_TABLE_ACTION = 'create-table-action';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Quick Action for creating table action.
|
|
@@ -5,8 +5,9 @@ sap.ui.define([
|
|
|
5
5
|
'../i18n',
|
|
6
6
|
'sap/base/Log',
|
|
7
7
|
'../utils/core',
|
|
8
|
-
'../utils/version'
|
|
9
|
-
|
|
8
|
+
'../utils/version',
|
|
9
|
+
'../utils/application'
|
|
10
|
+
], function (___sap_ux_private_control_property_editor_common, ___adp_dialog_factory, ___i18n, Log, ___utils_core, ___utils_version, ___utils_application) {
|
|
10
11
|
'use strict';
|
|
11
12
|
const executeContextMenuAction = ___sap_ux_private_control_property_editor_common['executeContextMenuAction'];
|
|
12
13
|
const reportTelemetry = ___sap_ux_private_control_property_editor_common['reportTelemetry'];
|
|
@@ -15,6 +16,7 @@ sap.ui.define([
|
|
|
15
16
|
const getTextBundle = ___i18n['getTextBundle'];
|
|
16
17
|
const getControlById = ___utils_core['getControlById'];
|
|
17
18
|
const getUi5Version = ___utils_version['getUi5Version'];
|
|
19
|
+
const getApplicationType = ___utils_application['getApplicationType'];
|
|
18
20
|
class ContextMenuService {
|
|
19
21
|
sendAction = () => {
|
|
20
22
|
};
|
|
@@ -36,7 +38,8 @@ sap.ui.define([
|
|
|
36
38
|
category: 'OutlineContextMenu',
|
|
37
39
|
actionName,
|
|
38
40
|
controlName,
|
|
39
|
-
ui5Version: `${ versionInfo.major }.${ versionInfo.minor }.${ versionInfo.patch }
|
|
41
|
+
ui5Version: `${ versionInfo.major }.${ versionInfo.minor }.${ versionInfo.patch }`,
|
|
42
|
+
appType: getApplicationType(this.rta.getRootControlInstance().getManifest())
|
|
40
43
|
});
|
|
41
44
|
} catch (err) {
|
|
42
45
|
Log.error('Error in reporting Telemetry:', err);
|
|
@@ -12,6 +12,7 @@ import { getTextBundle } from '../i18n';
|
|
|
12
12
|
import Log from 'sap/base/Log';
|
|
13
13
|
import { getControlById } from '../utils/core';
|
|
14
14
|
import { getUi5Version } from '../utils/version';
|
|
15
|
+
import { getApplicationType } from '../utils/application';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* A Class of ContextMenuService
|
|
@@ -46,7 +47,8 @@ export class ContextMenuService {
|
|
|
46
47
|
category: 'OutlineContextMenu',
|
|
47
48
|
actionName,
|
|
48
49
|
controlName,
|
|
49
|
-
ui5Version: `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}
|
|
50
|
+
ui5Version: `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}`,
|
|
51
|
+
appType: getApplicationType(this.rta.getRootControlInstance().getManifest())
|
|
50
52
|
});
|
|
51
53
|
} catch (err) {
|
|
52
54
|
Log.error('Error in reporting Telemetry:', err);
|
|
@@ -3,8 +3,10 @@ sap.ui.define([
|
|
|
3
3
|
'sap/base/Log',
|
|
4
4
|
'open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common',
|
|
5
5
|
'../../i18n',
|
|
6
|
-
'../../adp/dialog-factory'
|
|
7
|
-
|
|
6
|
+
'../../adp/dialog-factory',
|
|
7
|
+
'../../utils/application',
|
|
8
|
+
'../../utils/version'
|
|
9
|
+
], function (Log, ___sap_ux_private_control_property_editor_common, ____i18n, ____adp_dialog_factory, ____utils_application, ____utils_version) {
|
|
8
10
|
'use strict';
|
|
9
11
|
const executeQuickAction = ___sap_ux_private_control_property_editor_common['executeQuickAction'];
|
|
10
12
|
const quickActionListChanged = ___sap_ux_private_control_property_editor_common['quickActionListChanged'];
|
|
@@ -15,6 +17,8 @@ sap.ui.define([
|
|
|
15
17
|
const reportTelemetry = ___sap_ux_private_control_property_editor_common['reportTelemetry'];
|
|
16
18
|
const getTextBundle = ____i18n['getTextBundle'];
|
|
17
19
|
const DialogFactory = ____adp_dialog_factory['DialogFactory'];
|
|
20
|
+
const getApplicationType = ____utils_application['getApplicationType'];
|
|
21
|
+
const getUi5Version = ____utils_version['getUi5Version'];
|
|
18
22
|
class QuickActionService {
|
|
19
23
|
sendAction = () => {
|
|
20
24
|
};
|
|
@@ -104,11 +108,14 @@ sap.ui.define([
|
|
|
104
108
|
}
|
|
105
109
|
async executeAction(actionInstance, payload) {
|
|
106
110
|
try {
|
|
111
|
+
const versionInfo = await getUi5Version();
|
|
107
112
|
await reportTelemetry({
|
|
108
113
|
category: 'QuickAction',
|
|
109
114
|
actionName: actionInstance.type,
|
|
110
115
|
telemetryEventIdentifier: actionInstance.getTelemetryIdentifier(true),
|
|
111
|
-
quickActionSteps: actionInstance.quickActionSteps
|
|
116
|
+
quickActionSteps: actionInstance.quickActionSteps,
|
|
117
|
+
appType: getApplicationType(this.rta.getRootControlInstance().getManifest()),
|
|
118
|
+
ui5Version: `${ versionInfo.major }.${ versionInfo.minor }.${ versionInfo.patch }`
|
|
112
119
|
});
|
|
113
120
|
} catch (error) {
|
|
114
121
|
Log.error('Error in reporting Telemetry:', error);
|
|
@@ -23,6 +23,9 @@ import { OutlineService } from '../outline/service';
|
|
|
23
23
|
import { getTextBundle, TextBundle } from '../../i18n';
|
|
24
24
|
import { ChangeService } from '../changes';
|
|
25
25
|
import { DialogFactory } from '../../adp/dialog-factory';
|
|
26
|
+
import { getApplicationType } from '../../utils/application';
|
|
27
|
+
import { getUi5Version } from '../../utils/version';
|
|
28
|
+
|
|
26
29
|
|
|
27
30
|
/**
|
|
28
31
|
* Service providing Quick Actions.
|
|
@@ -152,11 +155,14 @@ export class QuickActionService implements Service {
|
|
|
152
155
|
|
|
153
156
|
private async executeAction(actionInstance: QuickActionDefinition, payload: QuickActionExecutionPayload) {
|
|
154
157
|
try {
|
|
158
|
+
const versionInfo = await getUi5Version();
|
|
155
159
|
await reportTelemetry({
|
|
156
160
|
category: 'QuickAction',
|
|
157
161
|
actionName: actionInstance.type,
|
|
158
162
|
telemetryEventIdentifier: actionInstance.getTelemetryIdentifier(true),
|
|
159
|
-
quickActionSteps: actionInstance.quickActionSteps
|
|
163
|
+
quickActionSteps: actionInstance.quickActionSteps,
|
|
164
|
+
appType: getApplicationType(this.rta.getRootControlInstance().getManifest()),
|
|
165
|
+
ui5Version: `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}`
|
|
160
166
|
});
|
|
161
167
|
} catch (error) {
|
|
162
168
|
Log.error('Error in reporting Telemetry:', error);
|
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.20.
|
|
12
|
+
"version": "0.20.3",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -25,11 +25,11 @@
|
|
|
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.14.2",
|
|
29
28
|
"@sap-ux/btp-utils": "1.1.0",
|
|
30
29
|
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.5",
|
|
31
|
-
"@sap-ux/
|
|
30
|
+
"@sap-ux/adp-tooling": "0.14.2",
|
|
32
31
|
"@sap-ux/logger": "0.7.0",
|
|
32
|
+
"@sap-ux/feature-toggle": "0.3.0",
|
|
33
33
|
"@sap-ux/project-access": "1.30.1",
|
|
34
34
|
"@sap-ux/system-access": "0.6.0"
|
|
35
35
|
},
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"nock": "13.4.0",
|
|
50
50
|
"npm-run-all2": "6.2.0",
|
|
51
51
|
"supertest": "6.3.3",
|
|
52
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.14.1",
|
|
53
52
|
"@sap-ux/axios-extension": "1.21.0",
|
|
54
53
|
"@sap-ux/i18n": "0.3.0",
|
|
54
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.14.2",
|
|
55
55
|
"@sap-ux/store": "1.1.0",
|
|
56
56
|
"@sap-ux/ui5-info": "0.11.0"
|
|
57
57
|
},
|