@sap-ux/preview-middleware 0.16.112 → 0.16.113
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/common/create-page-action.js +2 -3
- package/dist/client/adp/quick-actions/common/create-page-action.ts +1 -5
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +1 -8
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +1 -10
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +1 -8
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +0 -8
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +1 -12
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +0 -11
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +5 -1
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +5 -1
- package/dist/client/adp/quick-actions/fe-v2/registry.js +2 -2
- package/dist/client/adp/quick-actions/fe-v2/registry.ts +6 -5
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +1 -12
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.ts +0 -11
- package/dist/client/adp/quick-actions/fe-v4/registry.js +2 -2
- package/dist/client/adp/quick-actions/fe-v4/registry.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v4/utils.js +4 -44
- package/dist/client/adp/quick-actions/fe-v4/utils.ts +2 -47
- package/dist/client/cpe/changes/flex-change.js +60 -51
- package/dist/client/cpe/changes/flex-change.ts +59 -26
- package/dist/client/cpe/changes/service.js +150 -34
- package/dist/client/cpe/changes/service.ts +239 -54
- package/dist/client/cpe/control-data.js +104 -28
- package/dist/client/cpe/control-data.ts +134 -43
- package/dist/client/cpe/init.js +3 -3
- package/dist/client/cpe/init.ts +5 -8
- package/dist/client/cpe/outline/editable.js +3 -3
- package/dist/client/cpe/outline/editable.ts +3 -2
- package/dist/client/cpe/outline/nodes.js +39 -9
- package/dist/client/cpe/outline/nodes.ts +61 -10
- package/dist/client/cpe/outline/service.js +3 -2
- package/dist/client/cpe/outline/service.ts +11 -3
- package/dist/client/cpe/selection.js +29 -16
- package/dist/client/cpe/selection.ts +38 -20
- package/dist/client/cpe/utils.js +42 -1
- package/dist/client/cpe/utils.ts +74 -0
- package/dist/client/thirdparty/@sap-ux-private/control-property-editor-common.js +7 -1
- package/dist/client/tsconfig.tsbuildinfo +1 -1
- package/dist/client/utils/fe-v4.js +87 -0
- package/dist/client/utils/fe-v4.ts +81 -0
- package/package.json +5 -5
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../simple-quick-action-base", "../../../utils/application", "../../../utils/version"], function (OverlayRegistry, ____init_dialogs, ___simple_quick_action_base, _____utils_application, _____utils_version) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
const FeatureService = _____cpe_feature_service["FeatureService"];
|
|
7
6
|
const DialogNames = ____init_dialogs["DialogNames"];
|
|
8
7
|
const handler = ____init_dialogs["handler"];
|
|
9
8
|
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
@@ -23,7 +22,7 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../cpe/feature-service", "../
|
|
|
23
22
|
async initialize() {
|
|
24
23
|
const appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
25
24
|
const version = await getUi5Version();
|
|
26
|
-
if (
|
|
25
|
+
if (appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, {
|
|
27
26
|
major: 1,
|
|
28
27
|
minor: 130
|
|
29
28
|
})) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
2
2
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
3
|
|
|
4
|
-
import { FeatureService } from '../../../cpe/feature-service';
|
|
5
4
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
6
5
|
import { QuickActionContext, SimpleQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
7
6
|
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
@@ -22,10 +21,7 @@ export class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase im
|
|
|
22
21
|
async initialize(): Promise<void> {
|
|
23
22
|
const appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
24
23
|
const version = await getUi5Version();
|
|
25
|
-
if (
|
|
26
|
-
FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false ||
|
|
27
|
-
(appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, { major: 1, minor: 130 }))
|
|
28
|
-
) {
|
|
24
|
+
if (appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, { major: 1, minor: 130 })) {
|
|
29
25
|
return;
|
|
30
26
|
}
|
|
31
27
|
return super.initialize();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["../../../
|
|
3
|
+
sap.ui.define(["../../../utils/core", "../table-quick-action-base"], function (_____utils_core, ___table_quick_action_base) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
const FeatureService = _____cpe_feature_service["FeatureService"];
|
|
7
6
|
const getControlById = _____utils_core["getControlById"];
|
|
8
7
|
const isA = _____utils_core["isA"];
|
|
9
8
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
@@ -16,12 +15,6 @@ sap.ui.define(["../../../cpe/feature-service", "../../../utils/core", "../table-
|
|
|
16
15
|
constructor(context) {
|
|
17
16
|
super(CHANGE_TABLE_COLUMNS, CONTROL_TYPES, 'V2_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context, true);
|
|
18
17
|
}
|
|
19
|
-
initialize() {
|
|
20
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
21
|
-
return Promise.resolve();
|
|
22
|
-
}
|
|
23
|
-
return super.initialize();
|
|
24
|
-
}
|
|
25
18
|
async execute(path) {
|
|
26
19
|
const {
|
|
27
20
|
table,
|
|
@@ -3,7 +3,6 @@ import type Table from 'sap/m/Table';
|
|
|
3
3
|
import type SmartTable from 'sap/ui/comp/smarttable/SmartTable';
|
|
4
4
|
import ManagedObject from 'sap/ui/base/ManagedObject';
|
|
5
5
|
|
|
6
|
-
import { FeatureService } from '../../../cpe/feature-service';
|
|
7
6
|
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
8
7
|
import { getControlById, isA } from '../../../utils/core';
|
|
9
8
|
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
@@ -21,14 +20,6 @@ export class ChangeTableColumnsQuickAction
|
|
|
21
20
|
constructor(context: QuickActionContext) {
|
|
22
21
|
super(CHANGE_TABLE_COLUMNS, CONTROL_TYPES, 'V2_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context, true);
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
initialize(): Promise<void> {
|
|
26
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
27
|
-
return Promise.resolve();
|
|
28
|
-
}
|
|
29
|
-
return super.initialize();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
23
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
33
24
|
const { table, iconTabBarFilterKey, changeColumnActionId, sectionInfo } = this.tableMap[path];
|
|
34
25
|
if (!table) {
|
|
@@ -99,4 +90,4 @@ export class ChangeTableColumnsQuickAction
|
|
|
99
90
|
return !!bindingContext;
|
|
100
91
|
}
|
|
101
92
|
}
|
|
102
|
-
}
|
|
93
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../init-dialogs", "
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../init-dialogs", "../table-quick-action-base"], function (OverlayRegistry, _____utils_core, ____init_dialogs, ___table_quick_action_base) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const getControlById = _____utils_core["getControlById"];
|
|
7
7
|
const isA = _____utils_core["isA"];
|
|
8
8
|
const DialogNames = ____init_dialogs["DialogNames"];
|
|
9
9
|
const handler = ____init_dialogs["handler"];
|
|
10
|
-
const FeatureService = _____cpe_feature_service["FeatureService"];
|
|
11
10
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
12
11
|
const CREATE_TABLE_ACTION = 'create-table-action';
|
|
13
12
|
const SMART_TABLE_TYPE = 'sap.ui.comp.smarttable.SmartTable';
|
|
@@ -19,12 +18,6 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../init-d
|
|
|
19
18
|
constructor(context) {
|
|
20
19
|
super(CREATE_TABLE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context);
|
|
21
20
|
}
|
|
22
|
-
initialize() {
|
|
23
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
24
|
-
return Promise.resolve();
|
|
25
|
-
}
|
|
26
|
-
return super.initialize();
|
|
27
|
-
}
|
|
28
21
|
async execute(path) {
|
|
29
22
|
const {
|
|
30
23
|
table,
|
|
@@ -8,7 +8,6 @@ import UI5Element from 'sap/ui/core/Element';
|
|
|
8
8
|
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
9
9
|
import { getControlById, isA } from '../../../utils/core';
|
|
10
10
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
11
|
-
import { FeatureService } from '../../../cpe/feature-service';
|
|
12
11
|
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
13
12
|
|
|
14
13
|
export const CREATE_TABLE_ACTION = 'create-table-action';
|
|
@@ -23,13 +22,6 @@ export class AddTableActionQuickAction extends TableQuickActionDefinitionBase im
|
|
|
23
22
|
super(CREATE_TABLE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
initialize(): Promise<void> {
|
|
27
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
28
|
-
return Promise.resolve();
|
|
29
|
-
}
|
|
30
|
-
return super.initialize();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
25
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
34
26
|
const { table, iconTabBarFilterKey, sectionInfo } = this.tableMap[path];
|
|
35
27
|
if (!table) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["../../../utils/core", "sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quick-action-base", "../../utils", "../../../i18n"
|
|
3
|
+
sap.ui.define(["../../../utils/core", "sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quick-action-base", "../../utils", "../../../i18n"], function (_____utils_core, OverlayRegistry, ____init_dialogs, ___table_quick_action_base, ____utils, _____i18n) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const getControlById = _____utils_core["getControlById"];
|
|
@@ -15,7 +15,6 @@ sap.ui.define(["../../../utils/core", "sap/ui/dt/OverlayRegistry", "../../init-d
|
|
|
15
15
|
const TREE_TABLE_TYPE = ___table_quick_action_base["TREE_TABLE_TYPE"];
|
|
16
16
|
const notifyUser = ____utils["notifyUser"];
|
|
17
17
|
const getTextBundle = _____i18n["getTextBundle"];
|
|
18
|
-
const FeatureService = _____cpe_feature_service["FeatureService"];
|
|
19
18
|
const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
20
19
|
const CONTROL_TYPES = [SMART_TABLE_TYPE, M_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
21
20
|
|
|
@@ -47,16 +46,6 @@ sap.ui.define(["../../../utils/core", "sap/ui/dt/OverlayRegistry", "../../init-d
|
|
|
47
46
|
constructor(context) {
|
|
48
47
|
super(CREATE_TABLE_CUSTOM_COLUMN, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN', context);
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Initializes action object instance
|
|
53
|
-
*/
|
|
54
|
-
async initialize() {
|
|
55
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
await super.initialize();
|
|
59
|
-
}
|
|
60
49
|
async execute(path) {
|
|
61
50
|
const {
|
|
62
51
|
table,
|
|
@@ -17,7 +17,6 @@ import ManagedObject from 'sap/ui/base/ManagedObject';
|
|
|
17
17
|
import UI5Element from 'sap/ui/core/Element';
|
|
18
18
|
import { notifyUser } from '../../utils';
|
|
19
19
|
import { getTextBundle } from '../../../i18n';
|
|
20
|
-
import { FeatureService } from '../../../cpe/feature-service';
|
|
21
20
|
import ObjectPageSection from 'sap/uxap/ObjectPageSection';
|
|
22
21
|
import ObjectPageSubSection from 'sap/uxap/ObjectPageSubSection';
|
|
23
22
|
import ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
|
|
@@ -68,16 +67,6 @@ export class AddTableCustomColumnQuickAction
|
|
|
68
67
|
super(CREATE_TABLE_CUSTOM_COLUMN, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN', context);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
/**
|
|
72
|
-
* Initializes action object instance
|
|
73
|
-
*/
|
|
74
|
-
async initialize(): Promise<void> {
|
|
75
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
await super.initialize();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
70
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
82
71
|
const { table, iconTabBarFilterKey, sectionInfo } = this.tableMap[path];
|
|
83
72
|
if (!table) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../cpe/quick-actions/utils", "../../../utils/core", "../simple-quick-action-base"], function (CommandFactory, _____cpe_quick_actions_utils, _____utils_core, ___simple_quick_action_base) {
|
|
3
|
+
sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../cpe/feature-service", "../../../cpe/quick-actions/utils", "../../../utils/core", "../simple-quick-action-base"], function (CommandFactory, _____cpe_feature_service, _____cpe_quick_actions_utils, _____utils_core, ___simple_quick_action_base) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
+
const FeatureService = _____cpe_feature_service["FeatureService"];
|
|
6
7
|
const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
|
|
7
8
|
const getControlById = _____utils_core["getControlById"];
|
|
8
9
|
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
@@ -19,6 +20,9 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../cpe/quick-actions/
|
|
|
19
20
|
forceRefreshAfterExecution = true;
|
|
20
21
|
isUseDateRangeTypeEnabled = false;
|
|
21
22
|
initialize() {
|
|
23
|
+
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
22
26
|
const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
|
|
23
27
|
for (const control of controls) {
|
|
24
28
|
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
2
|
import CommandFactory from 'sap/ui/rta/command/CommandFactory';
|
|
3
3
|
import type FilterBar from 'sap/ui/comp/filterbar/FilterBar';
|
|
4
|
+
import SmartFilterBar from 'sap/ui/comp/smartfilterbar/SmartFilterBar';
|
|
4
5
|
|
|
6
|
+
import { FeatureService } from '../../../cpe/feature-service';
|
|
5
7
|
import { QuickActionContext, SimpleQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
6
8
|
import { pageHasControlId } from '../../../cpe/quick-actions/utils';
|
|
7
9
|
import { getControlById } from '../../../utils/core';
|
|
8
10
|
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
9
|
-
import SmartFilterBar from 'sap/ui/comp/smartfilterbar/SmartFilterBar';
|
|
10
11
|
|
|
11
12
|
export const ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR = 'enable-semantic-daterange-filterbar';
|
|
12
13
|
const CONTROL_TYPE = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
@@ -25,6 +26,9 @@ export class ToggleSemanticDateRangeFilterBar
|
|
|
25
26
|
private isUseDateRangeTypeEnabled = false;
|
|
26
27
|
|
|
27
28
|
initialize(): void {
|
|
29
|
+
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
28
32
|
const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
|
|
29
33
|
for (const control of controls) {
|
|
30
34
|
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
@@ -36,14 +36,14 @@ sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../
|
|
|
36
36
|
if (name === 'listReport') {
|
|
37
37
|
definitionGroups.push({
|
|
38
38
|
title: 'LIST REPORT',
|
|
39
|
-
definitions: [ToggleClearFilterBarQuickAction,
|
|
39
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction],
|
|
40
40
|
view,
|
|
41
41
|
key: name + index
|
|
42
42
|
});
|
|
43
43
|
} else if (name === 'objectPage') {
|
|
44
44
|
definitionGroups.push({
|
|
45
45
|
title: 'OBJECT PAGE',
|
|
46
|
-
definitions: [AddControllerToPageQuickAction,
|
|
46
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction],
|
|
47
47
|
view,
|
|
48
48
|
key: name + index
|
|
49
49
|
});
|
|
@@ -42,13 +42,13 @@ export default class FEV2QuickActionRegistry extends QuickActionDefinitionRegist
|
|
|
42
42
|
definitionGroups.push({
|
|
43
43
|
title: 'LIST REPORT',
|
|
44
44
|
definitions: [
|
|
45
|
-
ToggleClearFilterBarQuickAction,
|
|
46
45
|
AddControllerToPageQuickAction,
|
|
46
|
+
AddPageActionQuickAction,
|
|
47
|
+
ToggleClearFilterBarQuickAction,
|
|
48
|
+
ToggleSemanticDateRangeFilterBar,
|
|
47
49
|
ChangeTableColumnsQuickAction,
|
|
48
50
|
AddTableActionQuickAction,
|
|
49
|
-
AddTableCustomColumnQuickAction
|
|
50
|
-
AddPageActionQuickAction,
|
|
51
|
-
ToggleSemanticDateRangeFilterBar
|
|
51
|
+
AddTableCustomColumnQuickAction
|
|
52
52
|
],
|
|
53
53
|
view,
|
|
54
54
|
key: name + index
|
|
@@ -58,9 +58,10 @@ export default class FEV2QuickActionRegistry extends QuickActionDefinitionRegist
|
|
|
58
58
|
title: 'OBJECT PAGE',
|
|
59
59
|
definitions: [
|
|
60
60
|
AddControllerToPageQuickAction,
|
|
61
|
-
|
|
61
|
+
AddPageActionQuickAction,
|
|
62
62
|
AddHeaderFieldQuickAction,
|
|
63
63
|
AddCustomSectionQuickAction,
|
|
64
|
+
ChangeTableColumnsQuickAction,
|
|
64
65
|
AddTableActionQuickAction,
|
|
65
66
|
AddTableCustomColumnQuickAction
|
|
66
67
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quick-action-base", "
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quick-action-base", "../fe-v2/create-table-custom-column"], function (OverlayRegistry, ____init_dialogs, ___table_quick_action_base, ___fe_v2_create_table_custom_column) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const DialogNames = ____init_dialogs["DialogNames"];
|
|
@@ -10,7 +10,6 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quic
|
|
|
10
10
|
const MDC_TABLE_TYPE = ___table_quick_action_base["MDC_TABLE_TYPE"];
|
|
11
11
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
12
12
|
const TREE_TABLE_TYPE = ___table_quick_action_base["TREE_TABLE_TYPE"];
|
|
13
|
-
const FeatureService = _____cpe_feature_service["FeatureService"];
|
|
14
13
|
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
15
14
|
const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
16
15
|
const CONTROL_TYPES = [SMART_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
@@ -18,16 +17,6 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quic
|
|
|
18
17
|
constructor(context) {
|
|
19
18
|
super(CREATE_TABLE_CUSTOM_COLUMN, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN', context);
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Initializes action object instance
|
|
24
|
-
*/
|
|
25
|
-
async initialize() {
|
|
26
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
await super.initialize();
|
|
30
|
-
}
|
|
31
20
|
async execute(path) {
|
|
32
21
|
const {
|
|
33
22
|
table,
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
TableQuickActionDefinitionBase,
|
|
11
11
|
TREE_TABLE_TYPE
|
|
12
12
|
} from '../table-quick-action-base';
|
|
13
|
-
import { FeatureService } from '../../../cpe/feature-service';
|
|
14
13
|
import { preprocessActionExecution } from '../fe-v2/create-table-custom-column';
|
|
15
14
|
|
|
16
15
|
export const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
@@ -25,16 +24,6 @@ export class AddTableCustomColumnQuickAction
|
|
|
25
24
|
super(CREATE_TABLE_CUSTOM_COLUMN, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN', context);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
/**
|
|
29
|
-
* Initializes action object instance
|
|
30
|
-
*/
|
|
31
|
-
async initialize(): Promise<void> {
|
|
32
|
-
if (FeatureService.isFeatureEnabled('cpe.beta.quick-actions') === false) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
await super.initialize();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
27
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
39
28
|
const { table, iconTabBarFilterKey, sectionInfo } = this.tableMap[path];
|
|
40
29
|
if (!table) {
|
|
@@ -35,14 +35,14 @@ sap.ui.define(["../../../cpe/quick-actions/registry", "../common/add-controller-
|
|
|
35
35
|
if (name === 'listReport') {
|
|
36
36
|
definitionGroups.push({
|
|
37
37
|
title: 'LIST REPORT',
|
|
38
|
-
definitions: [ToggleClearFilterBarQuickAction,
|
|
38
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction],
|
|
39
39
|
view,
|
|
40
40
|
key: name + index
|
|
41
41
|
});
|
|
42
42
|
} else if (name === 'objectPage') {
|
|
43
43
|
definitionGroups.push({
|
|
44
44
|
title: 'OBJECT PAGE',
|
|
45
|
-
definitions: [AddControllerToPageQuickAction,
|
|
45
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction],
|
|
46
46
|
view,
|
|
47
47
|
key: name + index
|
|
48
48
|
});
|
|
@@ -37,13 +37,13 @@ export default class FEV4QuickActionRegistry extends QuickActionDefinitionRegist
|
|
|
37
37
|
definitionGroups.push({
|
|
38
38
|
title: 'LIST REPORT',
|
|
39
39
|
definitions: [
|
|
40
|
-
ToggleClearFilterBarQuickAction,
|
|
41
40
|
AddControllerToPageQuickAction,
|
|
42
|
-
ChangeTableColumnsQuickAction,
|
|
43
41
|
AddPageActionQuickAction,
|
|
42
|
+
ToggleClearFilterBarQuickAction,
|
|
43
|
+
ToggleSemanticDateRangeFilterBar,
|
|
44
|
+
ChangeTableColumnsQuickAction,
|
|
44
45
|
AddTableActionQuickAction,
|
|
45
|
-
AddTableCustomColumnQuickAction
|
|
46
|
-
ToggleSemanticDateRangeFilterBar
|
|
46
|
+
AddTableCustomColumnQuickAction
|
|
47
47
|
],
|
|
48
48
|
view,
|
|
49
49
|
key: name + index
|
|
@@ -53,10 +53,10 @@ export default class FEV4QuickActionRegistry extends QuickActionDefinitionRegist
|
|
|
53
53
|
title: 'OBJECT PAGE',
|
|
54
54
|
definitions: [
|
|
55
55
|
AddControllerToPageQuickAction,
|
|
56
|
-
|
|
56
|
+
AddPageActionQuickAction,
|
|
57
57
|
AddHeaderFieldQuickAction,
|
|
58
58
|
AddCustomSectionQuickAction,
|
|
59
|
-
|
|
59
|
+
ChangeTableColumnsQuickAction,
|
|
60
60
|
AddTableActionQuickAction,
|
|
61
61
|
AddTableCustomColumnQuickAction
|
|
62
62
|
],
|
|
@@ -1,49 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["
|
|
3
|
+
sap.ui.define(["../../../utils/core", "sap/ui/rta/command/CommandFactory", "../../../utils/fe-v4"], function (_____utils_core, CommandFactory, _____utils_fe_v4) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const getControlById = _____utils_core["getControlById"];
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* @param control - UI5 control instance.
|
|
12
|
-
* @returns App component to which the control belongs.
|
|
13
|
-
*/
|
|
14
|
-
function getAppComponent(control) {
|
|
15
|
-
const ownerComponent = Component.getOwnerComponentFor(control);
|
|
16
|
-
if (isA('sap.fe.core.TemplateComponent', ownerComponent)) {
|
|
17
|
-
return ownerComponent.getAppComponent();
|
|
18
|
-
}
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get the containing page name of a control.
|
|
23
|
-
*
|
|
24
|
-
* @param control - UI5 control instance.
|
|
25
|
-
* @returns Page name to which the control belongs.
|
|
26
|
-
*/
|
|
27
|
-
function getPageName(control) {
|
|
28
|
-
const component = Component.getOwnerComponentFor(control);
|
|
29
|
-
if (!isA('sap.fe.core.TemplateComponent', component)) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
const view = component.getRootControl();
|
|
33
|
-
return view.getId().split('::').pop();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Gets a reference id for a control.
|
|
38
|
-
*
|
|
39
|
-
* @param control - UI5 control instance.
|
|
40
|
-
* @returns Reference id.
|
|
41
|
-
*/
|
|
42
|
-
function getReference(control) {
|
|
43
|
-
// probably same as flex setting id or base id TODO: CONFIRM
|
|
44
|
-
const manifest = getAppComponent(control)?.getManifest();
|
|
45
|
-
return manifest?.['sap.app']?.id ?? '';
|
|
46
|
-
}
|
|
7
|
+
const getAppComponent = _____utils_fe_v4["getAppComponent"];
|
|
8
|
+
const getPageName = _____utils_fe_v4["getPageName"];
|
|
9
|
+
const getReference = _____utils_fe_v4["getReference"];
|
|
47
10
|
async function executeToggleAction(context, isButtonEnabled, controlType, propertyPath) {
|
|
48
11
|
const controls = context.controlIndex[controlType] ?? [];
|
|
49
12
|
const control = controls[0];
|
|
@@ -80,9 +43,6 @@ sap.ui.define(["sap/ui/core/Component", "../../../utils/core", "sap/ui/rta/comma
|
|
|
80
43
|
var __exports = {
|
|
81
44
|
__esModule: true
|
|
82
45
|
};
|
|
83
|
-
__exports.getAppComponent = getAppComponent;
|
|
84
|
-
__exports.getPageName = getPageName;
|
|
85
|
-
__exports.getReference = getReference;
|
|
86
46
|
__exports.executeToggleAction = executeToggleAction;
|
|
87
47
|
return __exports;
|
|
88
48
|
});
|
|
@@ -1,53 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { Manifest } from 'sap/ui/rta/RuntimeAuthoring';
|
|
3
|
-
import Component from 'sap/ui/core/Component';
|
|
4
|
-
import type TemplateComponent from 'sap/fe/core/TemplateComponent';
|
|
5
|
-
import type AppComponent from 'sap/fe/core/AppComponent';
|
|
6
|
-
|
|
7
|
-
import { getControlById, isA } from '../../../utils/core';
|
|
1
|
+
import { getControlById } from '../../../utils/core';
|
|
8
2
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
9
3
|
import { QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
|
|
10
4
|
import CommandFactory from 'sap/ui/rta/command/CommandFactory';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Get the containing app component of a control.
|
|
14
|
-
*
|
|
15
|
-
* @param control - UI5 control instance.
|
|
16
|
-
* @returns App component to which the control belongs.
|
|
17
|
-
*/
|
|
18
|
-
export function getAppComponent(control: ManagedObject): AppComponent | undefined {
|
|
19
|
-
const ownerComponent = Component.getOwnerComponentFor(control);
|
|
20
|
-
if (isA<TemplateComponent>('sap.fe.core.TemplateComponent', ownerComponent)) {
|
|
21
|
-
return ownerComponent.getAppComponent();
|
|
22
|
-
}
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Get the containing page name of a control.
|
|
27
|
-
*
|
|
28
|
-
* @param control - UI5 control instance.
|
|
29
|
-
* @returns Page name to which the control belongs.
|
|
30
|
-
*/
|
|
31
|
-
export function getPageName(control: ManagedObject): string | undefined {
|
|
32
|
-
const component = Component.getOwnerComponentFor(control);
|
|
33
|
-
if (!isA<TemplateComponent>('sap.fe.core.TemplateComponent', component)) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
const view = component.getRootControl();
|
|
37
|
-
return view.getId().split('::').pop();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Gets a reference id for a control.
|
|
42
|
-
*
|
|
43
|
-
* @param control - UI5 control instance.
|
|
44
|
-
* @returns Reference id.
|
|
45
|
-
*/
|
|
46
|
-
export function getReference(control: ManagedObject): string {
|
|
47
|
-
// probably same as flex setting id or base id TODO: CONFIRM
|
|
48
|
-
const manifest = getAppComponent(control)?.getManifest() as Manifest;
|
|
49
|
-
return manifest?.['sap.app']?.id ?? '';
|
|
50
|
-
}
|
|
5
|
+
import { getAppComponent, getPageName, getReference } from '../../../utils/fe-v4';
|
|
51
6
|
|
|
52
7
|
export async function executeToggleAction(
|
|
53
8
|
context: QuickActionContext,
|