@sap-ux/preview-middleware 0.19.4 → 0.19.6
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/base/flp.d.ts +3 -3
- package/dist/base/flp.js +4 -4
- package/dist/client/adp/controllers/AddFragment.controller.js +3 -2
- package/dist/client/adp/controllers/AddFragment.controller.ts +10 -2
- package/dist/client/adp/controllers/AddSubpage.controller.js +3 -2
- package/dist/client/adp/controllers/AddSubpage.controller.ts +12 -4
- package/dist/client/adp/controllers/AddTableColumnFragments.controller.js +3 -2
- package/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +11 -2
- package/dist/client/adp/controllers/BaseDialog.controller.js +171 -188
- package/dist/client/adp/controllers/BaseDialog.controller.ts +14 -0
- package/dist/client/adp/controllers/ControllerExtension.controller.js +3 -2
- package/dist/client/adp/controllers/ControllerExtension.controller.ts +4 -2
- package/dist/client/adp/controllers/ExtensionPoint.controller.js +2 -1
- package/dist/client/adp/controllers/ExtensionPoint.controller.ts +2 -1
- package/dist/client/adp/dialog-factory.js +5 -3
- package/dist/client/adp/dialog-factory.ts +11 -4
- package/dist/client/adp/quick-actions/common/add-controller-to-page.js +4 -1
- package/dist/client/adp/quick-actions/common/add-controller-to-page.ts +14 -2
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +3 -0
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +7 -1
- package/dist/client/adp/quick-actions/common/add-new-subpage.js +6 -2
- package/dist/client/adp/quick-actions/common/add-new-subpage.ts +16 -7
- package/dist/client/adp/quick-actions/common/create-page-action.js +3 -0
- package/dist/client/adp/quick-actions/common/create-page-action.ts +12 -5
- package/dist/client/adp/quick-actions/common/op-add-custom-section.js +3 -0
- package/dist/client/adp/quick-actions/common/op-add-custom-section.ts +11 -4
- package/dist/client/adp/quick-actions/common/op-add-header-field.js +6 -0
- package/dist/client/adp/quick-actions/common/op-add-header-field.ts +22 -8
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +3 -0
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +16 -6
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +3 -0
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +22 -6
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +3 -0
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.ts +16 -6
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +3 -0
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.ts +15 -5
- package/dist/client/adp/quick-actions/quick-action-base.js +12 -1
- package/dist/client/adp/quick-actions/quick-action-base.ts +16 -0
- package/dist/client/cpe/quick-actions/quick-action-definition.ts +16 -0
- package/dist/client/cpe/quick-actions/quick-action-service.js +12 -1
- package/dist/client/cpe/quick-actions/quick-action-service.ts +13 -2
- package/dist/client/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -5
|
@@ -60,7 +60,8 @@ export default class ExtensionPoint extends BaseDialog<ExtensionPointModel> {
|
|
|
60
60
|
*
|
|
61
61
|
* @param event Event
|
|
62
62
|
*/
|
|
63
|
-
onCreateBtnPress(event: Event)
|
|
63
|
+
async onCreateBtnPress(event: Event) {
|
|
64
|
+
await super.onCreateBtnPressHandler();
|
|
64
65
|
const source = event.getSource<Button>();
|
|
65
66
|
source.setEnabled(false);
|
|
66
67
|
|
|
@@ -42,9 +42,11 @@ sap.ui.define(["sap/ui/core/Fragment", "../i18n", "./controllers/AddFragment.con
|
|
|
42
42
|
* @param dialogName - Dialog name.
|
|
43
43
|
* @param extensionPointData - Control ID.
|
|
44
44
|
* @param options - Dialog options.
|
|
45
|
+
* @param telemetryData - Telemetry data.
|
|
45
46
|
*/
|
|
46
47
|
static async createDialog(overlay, rta, dialogName, extensionPointData) {
|
|
47
48
|
let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
49
|
+
let telemetryData = arguments.length > 5 ? arguments[5] : undefined;
|
|
48
50
|
if (this.isDialogOpen) {
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
@@ -60,7 +62,7 @@ sap.ui.define(["sap/ui/core/Fragment", "../i18n", "./controllers/AddFragment.con
|
|
|
60
62
|
defaultAggregationArrayIndex: options.defaultAggregationArrayIndex
|
|
61
63
|
}),
|
|
62
64
|
title: resources.getText(options.title ?? 'ADP_ADD_FRAGMENT_DIALOG_TITLE')
|
|
63
|
-
});
|
|
65
|
+
}, telemetryData);
|
|
64
66
|
break;
|
|
65
67
|
case DialogNames.ADD_TABLE_COLUMN_FRAGMENTS:
|
|
66
68
|
controller = new AddTableColumnFragments(`open.ux.preview.client.adp.controllers.${dialogName}`, overlay, rta, {
|
|
@@ -68,10 +70,10 @@ sap.ui.define(["sap/ui/core/Fragment", "../i18n", "./controllers/AddFragment.con
|
|
|
68
70
|
aggregation: options.aggregation
|
|
69
71
|
}),
|
|
70
72
|
title: resources.getText(options.title ?? 'ADP_ADD_FRAGMENT_DIALOG_TITLE')
|
|
71
|
-
});
|
|
73
|
+
}, telemetryData);
|
|
72
74
|
break;
|
|
73
75
|
case DialogNames.CONTROLLER_EXTENSION:
|
|
74
|
-
controller = new ControllerExtension(`open.ux.preview.client.adp.controllers.${dialogName}`, overlay, rta);
|
|
76
|
+
controller = new ControllerExtension(`open.ux.preview.client.adp.controllers.${dialogName}`, overlay, rta, telemetryData);
|
|
75
77
|
break;
|
|
76
78
|
case DialogNames.ADD_FRAGMENT_AT_EXTENSION_POINT:
|
|
77
79
|
controller = new ExtensionPoint(`open.ux.preview.client.adp.controllers.${dialogName}`, overlay, rta, extensionPointData);
|
|
@@ -13,6 +13,7 @@ import ExtensionPoint from './controllers/ExtensionPoint.controller';
|
|
|
13
13
|
import { ExtensionPointData } from './extension-point';
|
|
14
14
|
import FileExistsDialog, { FileExistsDialogOptions } from './controllers/FileExistsDialog.controller';
|
|
15
15
|
import AddSubpage, { AddSubpageOptions } from './controllers/AddSubpage.controller';
|
|
16
|
+
import { QuickActionTelemetryData } from '../cpe/quick-actions/quick-action-definition';
|
|
16
17
|
|
|
17
18
|
export const enum DialogNames {
|
|
18
19
|
ADD_FRAGMENT = 'AddFragment',
|
|
@@ -52,13 +53,15 @@ export class DialogFactory {
|
|
|
52
53
|
* @param dialogName - Dialog name.
|
|
53
54
|
* @param extensionPointData - Control ID.
|
|
54
55
|
* @param options - Dialog options.
|
|
56
|
+
* @param telemetryData - Telemetry data.
|
|
55
57
|
*/
|
|
56
58
|
public static async createDialog(
|
|
57
59
|
overlay: UI5Element,
|
|
58
60
|
rta: RuntimeAuthoring,
|
|
59
61
|
dialogName: DialogNames,
|
|
60
62
|
extensionPointData?: ExtensionPointData,
|
|
61
|
-
options: Partial<AddFragmentOptions> | Partial<FileExistsDialogOptions> | AddSubpageOptions = {}
|
|
63
|
+
options: Partial<AddFragmentOptions> | Partial<FileExistsDialogOptions> | AddSubpageOptions = {},
|
|
64
|
+
telemetryData?: QuickActionTelemetryData
|
|
62
65
|
): Promise<void> {
|
|
63
66
|
if (this.isDialogOpen) {
|
|
64
67
|
return;
|
|
@@ -74,7 +77,9 @@ export class DialogFactory {
|
|
|
74
77
|
defaultAggregationArrayIndex: options.defaultAggregationArrayIndex
|
|
75
78
|
}),
|
|
76
79
|
title: resources.getText(options.title ?? 'ADP_ADD_FRAGMENT_DIALOG_TITLE')
|
|
77
|
-
}
|
|
80
|
+
},
|
|
81
|
+
telemetryData
|
|
82
|
+
);
|
|
78
83
|
break;
|
|
79
84
|
case DialogNames.ADD_TABLE_COLUMN_FRAGMENTS:
|
|
80
85
|
controller = new AddTableColumnFragments(
|
|
@@ -84,14 +89,16 @@ export class DialogFactory {
|
|
|
84
89
|
{
|
|
85
90
|
...('aggregation' in options && { aggregation: options.aggregation }),
|
|
86
91
|
title: resources.getText(options.title ?? 'ADP_ADD_FRAGMENT_DIALOG_TITLE')
|
|
87
|
-
}
|
|
92
|
+
},
|
|
93
|
+
telemetryData
|
|
88
94
|
);
|
|
89
95
|
break;
|
|
90
96
|
case DialogNames.CONTROLLER_EXTENSION:
|
|
91
97
|
controller = new ControllerExtension(
|
|
92
98
|
`open.ux.preview.client.adp.controllers.${dialogName}`,
|
|
93
99
|
overlay,
|
|
94
|
-
rta
|
|
100
|
+
rta,
|
|
101
|
+
telemetryData
|
|
95
102
|
);
|
|
96
103
|
break;
|
|
97
104
|
case DialogNames.ADD_FRAGMENT_AT_EXTENSION_POINT:
|
|
@@ -42,7 +42,10 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/version", "../../uti
|
|
|
42
42
|
async execute() {
|
|
43
43
|
if (this.control) {
|
|
44
44
|
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
45
|
-
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.CONTROLLER_EXTENSION
|
|
45
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.CONTROLLER_EXTENSION, undefined, {}, {
|
|
46
|
+
actionName: this.type,
|
|
47
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
48
|
+
});
|
|
46
49
|
}
|
|
47
50
|
return [];
|
|
48
51
|
}
|
|
@@ -41,7 +41,12 @@ export class AddControllerToPageQuickAction
|
|
|
41
41
|
const controlInfo = getControllerInfoForControl(control);
|
|
42
42
|
const data = await getExistingController(controlInfo.controllerName);
|
|
43
43
|
this.controllerExists = data?.controllerExists;
|
|
44
|
-
const isActiveAction = isControllerExtensionEnabledForControl(
|
|
44
|
+
const isActiveAction = isControllerExtensionEnabledForControl(
|
|
45
|
+
control,
|
|
46
|
+
syncViewsIds,
|
|
47
|
+
version,
|
|
48
|
+
this.context.flexSettings.isCloud
|
|
49
|
+
);
|
|
45
50
|
this.control = isActiveAction ? control : undefined;
|
|
46
51
|
break;
|
|
47
52
|
}
|
|
@@ -54,7 +59,14 @@ export class AddControllerToPageQuickAction
|
|
|
54
59
|
async execute(): Promise<FlexCommand[]> {
|
|
55
60
|
if (this.control) {
|
|
56
61
|
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
57
|
-
await DialogFactory.createDialog(
|
|
62
|
+
await DialogFactory.createDialog(
|
|
63
|
+
overlay,
|
|
64
|
+
this.context.rta,
|
|
65
|
+
DialogNames.CONTROLLER_EXTENSION,
|
|
66
|
+
undefined,
|
|
67
|
+
{},
|
|
68
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
69
|
+
);
|
|
58
70
|
}
|
|
59
71
|
return [];
|
|
60
72
|
}
|
|
@@ -28,6 +28,9 @@ sap.ui.define([
|
|
|
28
28
|
const ADD_NEW_ANNOTATION_FILE_TITLE = 'QUICK_ACTION_ADD_NEW_ANNOTATION_FILE';
|
|
29
29
|
class AddNewAnnotationFile extends QuickActionDefinitionBase {
|
|
30
30
|
children = [];
|
|
31
|
+
get quickActionSteps() {
|
|
32
|
+
return 1;
|
|
33
|
+
}
|
|
31
34
|
kind = NESTED_QUICK_ACTION_KIND;
|
|
32
35
|
type = ADD_NEW_ANNOTATION_FILE;
|
|
33
36
|
forceRefreshAfterExecution = true;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
QuickActionContext,
|
|
5
|
+
NestedQuickActionDefinition
|
|
6
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
4
7
|
import type { AnnotationDataSourceResponse } from '../../api-handler';
|
|
5
8
|
import { getDataSourceAnnotationFileMap } from '../../api-handler';
|
|
6
9
|
import {
|
|
@@ -29,6 +32,9 @@ export class AddNewAnnotationFile
|
|
|
29
32
|
implements NestedQuickActionDefinition
|
|
30
33
|
{
|
|
31
34
|
public children: NestedQuickActionChild[] = [];
|
|
35
|
+
public get quickActionSteps(): number {
|
|
36
|
+
return 1;
|
|
37
|
+
}
|
|
32
38
|
readonly kind = NESTED_QUICK_ACTION_KIND;
|
|
33
39
|
readonly type = ADD_NEW_ANNOTATION_FILE;
|
|
34
40
|
readonly forceRefreshAfterExecution = true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../../cpe/quick-actions/utils", "../../../utils/core", "../../../utils/application", "../../dialog-factory", "../fe-v2/utils", "../../../utils/fe-v2", "../../../utils/fe-v4", "../../../i18n", "../simple-quick-action-base"], function (Component, OverlayRegistry, _____cpe_quick_actions_utils, _____utils_core, _____utils_application, ____dialog_factory, ___fe_v2_utils, _____utils_fe_v2, _____utils_fe_v4, _____i18n, ___simple_quick_action_base) {
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../../cpe/quick-actions/utils", "../../../utils/core", "../../../utils/application", "../../dialog-factory", "../fe-v2/utils", "../../../utils/fe-v2", "../../../utils/fe-v4", "../../../i18n", "../simple-quick-action-base", "../dialog-enablement-validator"], function (Component, OverlayRegistry, _____cpe_quick_actions_utils, _____utils_core, _____utils_application, ____dialog_factory, ___fe_v2_utils, _____utils_fe_v2, _____utils_fe_v4, _____i18n, ___simple_quick_action_base, ___dialog_enablement_validator) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
|
|
@@ -14,6 +14,7 @@ sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../../c
|
|
|
14
14
|
const getV4ApplicationPages = _____utils_fe_v4["getV4ApplicationPages"];
|
|
15
15
|
const getTextBundle = _____i18n["getTextBundle"];
|
|
16
16
|
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
17
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
17
18
|
const ADD_NEW_OBJECT_PAGE_ACTION = 'add-new-subpage';
|
|
18
19
|
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
19
20
|
|
|
@@ -38,7 +39,7 @@ sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../../c
|
|
|
38
39
|
}
|
|
39
40
|
return undefined;
|
|
40
41
|
}
|
|
41
|
-
}]);
|
|
42
|
+
}, DIALOG_ENABLEMENT_VALIDATOR]);
|
|
42
43
|
}
|
|
43
44
|
getApplicationPages() {
|
|
44
45
|
if (this.appType === 'fe-v2') {
|
|
@@ -122,6 +123,9 @@ sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../../c
|
|
|
122
123
|
appReference,
|
|
123
124
|
title: 'ADD_SUB_PAGE_DIALOG_TITLE',
|
|
124
125
|
pageDescriptor: this.currentPageDescriptor
|
|
126
|
+
}, {
|
|
127
|
+
actionName: this.type,
|
|
128
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
125
129
|
});
|
|
126
130
|
return [];
|
|
127
131
|
}
|
|
@@ -17,6 +17,7 @@ import { getV4ApplicationPages } from '../../../utils/fe-v4';
|
|
|
17
17
|
import { EnablementValidatorResult } from '../enablement-validator';
|
|
18
18
|
import { getTextBundle } from '../../../i18n';
|
|
19
19
|
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
20
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
20
21
|
|
|
21
22
|
export const ADD_NEW_OBJECT_PAGE_ACTION = 'add-new-subpage';
|
|
22
23
|
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
@@ -50,7 +51,8 @@ export class AddNewSubpage extends SimpleQuickActionDefinitionBase implements Si
|
|
|
50
51
|
}
|
|
51
52
|
return undefined;
|
|
52
53
|
}
|
|
53
|
-
}
|
|
54
|
+
},
|
|
55
|
+
DIALOG_ENABLEMENT_VALIDATOR
|
|
54
56
|
]);
|
|
55
57
|
}
|
|
56
58
|
|
|
@@ -148,12 +150,19 @@ export class AddNewSubpage extends SimpleQuickActionDefinitionBase implements Si
|
|
|
148
150
|
async execute(): Promise<FlexCommand[]> {
|
|
149
151
|
const overlay = OverlayRegistry.getOverlay(this.control!);
|
|
150
152
|
const appReference = this.context.flexSettings.projectId;
|
|
151
|
-
await DialogFactory.createDialog(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
await DialogFactory.createDialog(
|
|
154
|
+
overlay,
|
|
155
|
+
this.context.rta,
|
|
156
|
+
DialogNames.ADD_SUBPAGE,
|
|
157
|
+
undefined,
|
|
158
|
+
{
|
|
159
|
+
appType: this.appType,
|
|
160
|
+
appReference,
|
|
161
|
+
title: 'ADD_SUB_PAGE_DIALOG_TITLE',
|
|
162
|
+
pageDescriptor: this.currentPageDescriptor
|
|
163
|
+
},
|
|
164
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
165
|
+
);
|
|
157
166
|
return [];
|
|
158
167
|
}
|
|
159
168
|
}
|
|
@@ -38,6 +38,9 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../simple-q
|
|
|
38
38
|
aggregation: 'actions',
|
|
39
39
|
title: 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION',
|
|
40
40
|
defaultAggregationArrayIndex: 1
|
|
41
|
+
}, {
|
|
42
|
+
actionName: this.type,
|
|
43
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
46
|
return [];
|
|
@@ -34,11 +34,18 @@ export class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase im
|
|
|
34
34
|
async execute(): Promise<FlexCommand[]> {
|
|
35
35
|
if (this.control) {
|
|
36
36
|
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
37
|
-
await DialogFactory.createDialog(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
await DialogFactory.createDialog(
|
|
38
|
+
overlay,
|
|
39
|
+
this.context.rta,
|
|
40
|
+
DialogNames.ADD_FRAGMENT,
|
|
41
|
+
undefined,
|
|
42
|
+
{
|
|
43
|
+
aggregation: 'actions',
|
|
44
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION',
|
|
45
|
+
defaultAggregationArrayIndex: 1
|
|
46
|
+
},
|
|
47
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
48
|
+
);
|
|
42
49
|
}
|
|
43
50
|
return [];
|
|
44
51
|
}
|
|
@@ -24,6 +24,9 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../cp
|
|
|
24
24
|
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
25
25
|
aggregation: 'sections',
|
|
26
26
|
title: 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION'
|
|
27
|
+
}, {
|
|
28
|
+
actionName: this.type,
|
|
29
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
27
30
|
});
|
|
28
31
|
return [];
|
|
29
32
|
}
|
|
@@ -32,10 +32,17 @@ export class AddCustomSectionQuickAction
|
|
|
32
32
|
)[0] as ObjectPageLayout;
|
|
33
33
|
|
|
34
34
|
const overlay = OverlayRegistry.getOverlay(objectPageLayout) || [];
|
|
35
|
-
await DialogFactory.createDialog(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
await DialogFactory.createDialog(
|
|
36
|
+
overlay,
|
|
37
|
+
this.context.rta,
|
|
38
|
+
DialogNames.ADD_FRAGMENT,
|
|
39
|
+
undefined,
|
|
40
|
+
{
|
|
41
|
+
aggregation: 'sections',
|
|
42
|
+
title: 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION'
|
|
43
|
+
},
|
|
44
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
45
|
+
);
|
|
39
46
|
return [];
|
|
40
47
|
}
|
|
41
48
|
}
|
|
@@ -42,12 +42,18 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../ut
|
|
|
42
42
|
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
43
43
|
aggregation: 'items',
|
|
44
44
|
title: 'QUICK_ACTION_OP_ADD_HEADER_FIELD'
|
|
45
|
+
}, {
|
|
46
|
+
actionName: this.type,
|
|
47
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
45
48
|
});
|
|
46
49
|
} else if (this.control) {
|
|
47
50
|
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
48
51
|
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
49
52
|
aggregation: 'headerContent',
|
|
50
53
|
title: 'QUICK_ACTION_OP_ADD_HEADER_FIELD'
|
|
54
|
+
}, {
|
|
55
|
+
actionName: this.type,
|
|
56
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
51
57
|
});
|
|
52
58
|
}
|
|
53
59
|
return [];
|
|
@@ -48,16 +48,30 @@ export class AddHeaderFieldQuickAction
|
|
|
48
48
|
// check if only flex box exist in the headerContent.
|
|
49
49
|
if (headerContent.length === 1 && isA<FlexBox>('sap.m.FlexBox', headerContent[0])) {
|
|
50
50
|
const overlay = OverlayRegistry.getOverlay(headerContent[0]) || [];
|
|
51
|
-
await DialogFactory.createDialog(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
await DialogFactory.createDialog(
|
|
52
|
+
overlay,
|
|
53
|
+
this.context.rta,
|
|
54
|
+
DialogNames.ADD_FRAGMENT,
|
|
55
|
+
undefined,
|
|
56
|
+
{
|
|
57
|
+
aggregation: 'items',
|
|
58
|
+
title: 'QUICK_ACTION_OP_ADD_HEADER_FIELD'
|
|
59
|
+
},
|
|
60
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
61
|
+
);
|
|
55
62
|
} else if (this.control) {
|
|
56
63
|
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
57
|
-
await DialogFactory.createDialog(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
await DialogFactory.createDialog(
|
|
65
|
+
overlay,
|
|
66
|
+
this.context.rta,
|
|
67
|
+
DialogNames.ADD_FRAGMENT,
|
|
68
|
+
undefined,
|
|
69
|
+
{
|
|
70
|
+
aggregation: 'headerContent',
|
|
71
|
+
title: 'QUICK_ACTION_OP_ADD_HEADER_FIELD'
|
|
72
|
+
},
|
|
73
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
74
|
+
);
|
|
61
75
|
}
|
|
62
76
|
return [];
|
|
63
77
|
}
|
|
@@ -70,6 +70,9 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../dialog
|
|
|
70
70
|
aggregation: 'content',
|
|
71
71
|
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION',
|
|
72
72
|
defaultAggregationArrayIndex: 1
|
|
73
|
+
}, {
|
|
74
|
+
actionName: this.type,
|
|
75
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
return [];
|
|
@@ -5,7 +5,10 @@ import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
|
5
5
|
import ManagedObject from 'sap/ui/base/ManagedObject';
|
|
6
6
|
import UI5Element from 'sap/ui/core/Element';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
QuickActionContext,
|
|
10
|
+
NestedQuickActionDefinition
|
|
11
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
9
12
|
import { getControlById, isA } from '../../../utils/core';
|
|
10
13
|
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
11
14
|
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
@@ -71,11 +74,18 @@ export class AddTableActionQuickAction extends TableQuickActionDefinitionBase im
|
|
|
71
74
|
// open dialogBox to add, and content is selected ByDefault
|
|
72
75
|
if (headerToolbar) {
|
|
73
76
|
const overlay = OverlayRegistry.getOverlay(headerToolbar as UI5Element) || [];
|
|
74
|
-
await DialogFactory.createDialog(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
await DialogFactory.createDialog(
|
|
78
|
+
overlay,
|
|
79
|
+
this.context.rta,
|
|
80
|
+
DialogNames.ADD_FRAGMENT,
|
|
81
|
+
undefined,
|
|
82
|
+
{
|
|
83
|
+
aggregation: 'content',
|
|
84
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION',
|
|
85
|
+
defaultAggregationArrayIndex: 1
|
|
86
|
+
},
|
|
87
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
88
|
+
);
|
|
79
89
|
}
|
|
80
90
|
return [];
|
|
81
91
|
}
|
|
@@ -83,6 +83,9 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../dialog
|
|
|
83
83
|
await DialogFactory.createDialog(overlay, this.context.rta, dialog, undefined, {
|
|
84
84
|
aggregation: 'columns',
|
|
85
85
|
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN'
|
|
86
|
+
}, {
|
|
87
|
+
actionName: this.type,
|
|
88
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
86
89
|
});
|
|
87
90
|
return [];
|
|
88
91
|
}
|
|
@@ -12,10 +12,19 @@ import IconTabBar from 'sap/m/IconTabBar';
|
|
|
12
12
|
|
|
13
13
|
import type SmartTable from 'sap/ui/comp/smarttable/SmartTable';
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
QuickActionContext,
|
|
17
|
+
NestedQuickActionDefinition
|
|
18
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
16
19
|
import { getControlById, isA } from '../../../utils/core';
|
|
17
20
|
import { DialogNames, DialogFactory } from '../../dialog-factory';
|
|
18
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
ANALYTICAL_TABLE_TYPE,
|
|
23
|
+
GRID_TABLE_TYPE,
|
|
24
|
+
M_TABLE_TYPE,
|
|
25
|
+
SMART_TABLE_TYPE,
|
|
26
|
+
TREE_TABLE_TYPE
|
|
27
|
+
} from '../control-types';
|
|
19
28
|
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
20
29
|
import { notifyUser } from '../../utils';
|
|
21
30
|
import { getTextBundle } from '../../../i18n';
|
|
@@ -115,10 +124,17 @@ export class AddTableCustomColumnQuickAction
|
|
|
115
124
|
)
|
|
116
125
|
? DialogNames.ADD_FRAGMENT
|
|
117
126
|
: DialogNames.ADD_TABLE_COLUMN_FRAGMENTS;
|
|
118
|
-
await DialogFactory.createDialog(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
await DialogFactory.createDialog(
|
|
128
|
+
overlay,
|
|
129
|
+
this.context.rta,
|
|
130
|
+
dialog,
|
|
131
|
+
undefined,
|
|
132
|
+
{
|
|
133
|
+
aggregation: 'columns',
|
|
134
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN'
|
|
135
|
+
},
|
|
136
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
137
|
+
);
|
|
122
138
|
|
|
123
139
|
return [];
|
|
124
140
|
}
|
|
@@ -37,6 +37,9 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../utils/core", "../../dialog-fac
|
|
|
37
37
|
aggregation: 'actions',
|
|
38
38
|
defaultAggregationArrayIndex: 0,
|
|
39
39
|
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION'
|
|
40
|
+
}, {
|
|
41
|
+
actionName: this.type,
|
|
42
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
45
|
return [];
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import OverlayUtil from 'sap/ui/dt/OverlayUtil';
|
|
2
2
|
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
QuickActionContext,
|
|
6
|
+
NestedQuickActionDefinition
|
|
7
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
5
8
|
import { getControlById } from '../../../utils/core';
|
|
6
9
|
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
7
10
|
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
@@ -33,11 +36,18 @@ export class AddTableActionQuickAction extends TableQuickActionDefinitionBase im
|
|
|
33
36
|
if (controlOverlay) {
|
|
34
37
|
controlOverlay.setSelected(true);
|
|
35
38
|
|
|
36
|
-
await DialogFactory.createDialog(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
await DialogFactory.createDialog(
|
|
40
|
+
controlOverlay,
|
|
41
|
+
this.context.rta,
|
|
42
|
+
DialogNames.ADD_FRAGMENT,
|
|
43
|
+
undefined,
|
|
44
|
+
{
|
|
45
|
+
aggregation: 'actions',
|
|
46
|
+
defaultAggregationArrayIndex: 0,
|
|
47
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION'
|
|
48
|
+
},
|
|
49
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
50
|
+
);
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
return [];
|
|
@@ -33,6 +33,9 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../control-
|
|
|
33
33
|
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
34
34
|
aggregation: 'columns',
|
|
35
35
|
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN'
|
|
36
|
+
}, {
|
|
37
|
+
actionName: this.type,
|
|
38
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
36
39
|
});
|
|
37
40
|
return [];
|
|
38
41
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
2
|
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
QuickActionContext,
|
|
6
|
+
NestedQuickActionDefinition
|
|
7
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
5
8
|
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
6
9
|
import { SMART_TABLE_TYPE, GRID_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
7
10
|
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
@@ -33,10 +36,17 @@ export class AddTableCustomColumnQuickAction
|
|
|
33
36
|
this.selectOverlay(table);
|
|
34
37
|
|
|
35
38
|
const overlay = OverlayRegistry.getOverlay(table);
|
|
36
|
-
await DialogFactory.createDialog(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
await DialogFactory.createDialog(
|
|
40
|
+
overlay,
|
|
41
|
+
this.context.rta,
|
|
42
|
+
DialogNames.ADD_FRAGMENT,
|
|
43
|
+
undefined,
|
|
44
|
+
{
|
|
45
|
+
aggregation: 'columns',
|
|
46
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN'
|
|
47
|
+
},
|
|
48
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
49
|
+
);
|
|
40
50
|
return [];
|
|
41
51
|
}
|
|
42
52
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define([], function () {
|
|
3
|
+
sap.ui.define(["./dialog-enablement-validator"], function (___dialog_enablement_validator) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
6
7
|
/**
|
|
7
8
|
* Base class for all quick actions.
|
|
8
9
|
*/
|
|
@@ -10,6 +11,16 @@ sap.ui.define([], function () {
|
|
|
10
11
|
get id() {
|
|
11
12
|
return `${this.context.key}-${this.type}`;
|
|
12
13
|
}
|
|
14
|
+
getTelemetryIdentifier() {
|
|
15
|
+
let update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
16
|
+
if (update === true) {
|
|
17
|
+
this.telemetryIdentifier = new Date().toISOString();
|
|
18
|
+
}
|
|
19
|
+
return this.telemetryIdentifier;
|
|
20
|
+
}
|
|
21
|
+
get quickActionSteps() {
|
|
22
|
+
return this.enablementValidators.find(item => item === DIALOG_ENABLEMENT_VALIDATOR) ? 2 : 1;
|
|
23
|
+
}
|
|
13
24
|
|
|
14
25
|
/**
|
|
15
26
|
* Quick Actions tooltip.
|
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
import { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
|
|
2
2
|
|
|
3
3
|
import { EnablementValidator, EnablementValidatorError, EnablementValidatorResult } from './enablement-validator';
|
|
4
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from './dialog-enablement-validator';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Base class for all quick actions.
|
|
7
8
|
*/
|
|
8
9
|
export abstract class QuickActionDefinitionBase<T extends string> {
|
|
10
|
+
private telemetryIdentifier: string;
|
|
11
|
+
|
|
9
12
|
public get id(): string {
|
|
10
13
|
return `${this.context.key}-${this.type}`;
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
public getTelemetryIdentifier(update = false) {
|
|
17
|
+
if (update === true) {
|
|
18
|
+
this.telemetryIdentifier = new Date().toISOString();
|
|
19
|
+
}
|
|
20
|
+
return this.telemetryIdentifier;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public get quickActionSteps(): number {
|
|
24
|
+
return this.enablementValidators.find((item) => item === DIALOG_ENABLEMENT_VALIDATOR)
|
|
25
|
+
? 2
|
|
26
|
+
: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
13
29
|
/**
|
|
14
30
|
* Quick Actions tooltip.
|
|
15
31
|
*/
|