@sap-ux/preview-middleware 0.16.154 → 0.16.156
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/controllers/AddFragment.controller.js +5 -5
- package/dist/client/adp/controllers/AddFragment.controller.ts +1 -1
- package/dist/client/adp/quick-actions/common/utils.js +20 -0
- package/dist/client/adp/quick-actions/common/utils.ts +7 -0
- package/dist/client/adp/quick-actions/control-types.js +23 -0
- package/dist/client/adp/quick-actions/control-types.ts +6 -0
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +6 -6
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +2 -8
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +5 -5
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +1 -1
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +99 -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 +12 -3
- package/dist/client/adp/quick-actions/fe-v2/utils.ts +14 -4
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +3 -2
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +2 -1
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +3 -2
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.ts +2 -1
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +5 -5
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.ts +3 -7
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +5 -5
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +4 -4
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +85 -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 +3 -3
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.ts +7 -4
- package/dist/client/adp/quick-actions/table-quick-action-base.js +18 -21
- package/dist/client/adp/quick-actions/table-quick-action-base.ts +29 -14
- package/dist/client/messagebundle.properties +4 -3
- package/dist/client/utils/fe-v4.js +13 -9
- package/dist/client/utils/fe-v4.ts +19 -11
- package/package.json +4 -4
|
@@ -10,8 +10,8 @@ sap.ui.define([
|
|
|
10
10
|
'../api-handler',
|
|
11
11
|
'./BaseDialog.controller',
|
|
12
12
|
'../utils',
|
|
13
|
-
'../quick-actions/
|
|
14
|
-
], function (JSONModel, OverlayRegistry, ___sap_ux_private_control_property_editor_common, ____i18n, ____cpe_communication_service, __ControlUtils, __CommandExecutor, ___api_handler, __BaseDialog, ___utils,
|
|
13
|
+
'../quick-actions/control-types'
|
|
14
|
+
], function (JSONModel, OverlayRegistry, ___sap_ux_private_control_property_editor_common, ____i18n, ____cpe_communication_service, __ControlUtils, __CommandExecutor, ___api_handler, __BaseDialog, ___utils, ___quick_actions_control_types) {
|
|
15
15
|
'use strict';
|
|
16
16
|
function _interopRequireDefault(obj) {
|
|
17
17
|
return obj && obj.__esModule && typeof obj.default !== 'undefined' ? obj.default : obj;
|
|
@@ -25,9 +25,9 @@ sap.ui.define([
|
|
|
25
25
|
const getFragments = ___api_handler['getFragments'];
|
|
26
26
|
const BaseDialog = _interopRequireDefault(__BaseDialog);
|
|
27
27
|
const notifyUser = ___utils['notifyUser'];
|
|
28
|
-
const ANALYTICAL_TABLE_TYPE =
|
|
29
|
-
const GRID_TABLE_TYPE =
|
|
30
|
-
const TREE_TABLE_TYPE =
|
|
28
|
+
const ANALYTICAL_TABLE_TYPE = ___quick_actions_control_types['ANALYTICAL_TABLE_TYPE'];
|
|
29
|
+
const GRID_TABLE_TYPE = ___quick_actions_control_types['GRID_TABLE_TYPE'];
|
|
30
|
+
const TREE_TABLE_TYPE = ___quick_actions_control_types['TREE_TABLE_TYPE'];
|
|
31
31
|
const radix = 10;
|
|
32
32
|
const AddFragment = BaseDialog.extend('open.ux.preview.client.adp.controllers.AddFragment', {
|
|
33
33
|
constructor: function _constructor(name, overlays, rta, options) {
|
|
@@ -31,7 +31,7 @@ import CommandExecutor from '../command-executor';
|
|
|
31
31
|
import { getFragments } from '../api-handler';
|
|
32
32
|
import BaseDialog from './BaseDialog.controller';
|
|
33
33
|
import { notifyUser } from '../utils';
|
|
34
|
-
import { ANALYTICAL_TABLE_TYPE, GRID_TABLE_TYPE, TREE_TABLE_TYPE } from '../quick-actions/
|
|
34
|
+
import { ANALYTICAL_TABLE_TYPE, GRID_TABLE_TYPE, TREE_TABLE_TYPE } from '../quick-actions/control-types';
|
|
35
35
|
|
|
36
36
|
interface CreateFragmentProps {
|
|
37
37
|
fragmentName: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define([], function () {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
function getTooltipsForTableEmptyRowModeAction(resourceBundle) {
|
|
7
|
+
const alreadyEnabledTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_ALREADY_ENABLED');
|
|
8
|
+
const unsupportedCreationRowsTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_NOT_SUPPORTED');
|
|
9
|
+
return {
|
|
10
|
+
alreadyEnabledTooltip,
|
|
11
|
+
unsupportedCreationRowsTooltip
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
var __exports = {
|
|
15
|
+
__esModule: true
|
|
16
|
+
};
|
|
17
|
+
__exports.getTooltipsForTableEmptyRowModeAction = getTooltipsForTableEmptyRowModeAction;
|
|
18
|
+
return __exports;
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextBundle } from '../../../i18n';
|
|
2
|
+
|
|
3
|
+
export function getTooltipsForTableEmptyRowModeAction(resourceBundle: TextBundle) {
|
|
4
|
+
const alreadyEnabledTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_ALREADY_ENABLED');
|
|
5
|
+
const unsupportedCreationRowsTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_NOT_SUPPORTED');
|
|
6
|
+
return { alreadyEnabledTooltip, unsupportedCreationRowsTooltip };
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define([], function () {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const SMART_TABLE_TYPE = 'sap.ui.comp.smarttable.SmartTable';
|
|
7
|
+
const M_TABLE_TYPE = 'sap.m.Table';
|
|
8
|
+
const MDC_TABLE_TYPE = 'sap.ui.mdc.Table';
|
|
9
|
+
const TREE_TABLE_TYPE = 'sap.ui.table.TreeTable';
|
|
10
|
+
const GRID_TABLE_TYPE = 'sap.ui.table.Table';
|
|
11
|
+
const ANALYTICAL_TABLE_TYPE = 'sap.ui.table.AnalyticalTable';
|
|
12
|
+
var __exports = {
|
|
13
|
+
__esModule: true
|
|
14
|
+
};
|
|
15
|
+
__exports.SMART_TABLE_TYPE = SMART_TABLE_TYPE;
|
|
16
|
+
__exports.M_TABLE_TYPE = M_TABLE_TYPE;
|
|
17
|
+
__exports.MDC_TABLE_TYPE = MDC_TABLE_TYPE;
|
|
18
|
+
__exports.TREE_TABLE_TYPE = TREE_TABLE_TYPE;
|
|
19
|
+
__exports.GRID_TABLE_TYPE = GRID_TABLE_TYPE;
|
|
20
|
+
__exports.ANALYTICAL_TABLE_TYPE = ANALYTICAL_TABLE_TYPE;
|
|
21
|
+
return __exports;
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=control-types.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const SMART_TABLE_TYPE = 'sap.ui.comp.smarttable.SmartTable';
|
|
2
|
+
export const M_TABLE_TYPE = 'sap.m.Table';
|
|
3
|
+
export const MDC_TABLE_TYPE = 'sap.ui.mdc.Table';
|
|
4
|
+
export const TREE_TABLE_TYPE = 'sap.ui.table.TreeTable';
|
|
5
|
+
export const GRID_TABLE_TYPE = 'sap.ui.table.Table';
|
|
6
|
+
export const ANALYTICAL_TABLE_TYPE = 'sap.ui.table.AnalyticalTable';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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) {
|
|
3
|
+
sap.ui.define(["../../../utils/core", "sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../control-types", "../table-quick-action-base", "../../utils", "../../../i18n"], function (_____utils_core, OverlayRegistry, ____init_dialogs, ___control_types, ___table_quick_action_base, ____utils, _____i18n) {
|
|
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 ANALYTICAL_TABLE_TYPE =
|
|
11
|
-
const GRID_TABLE_TYPE =
|
|
12
|
-
const M_TABLE_TYPE =
|
|
13
|
-
const SMART_TABLE_TYPE =
|
|
10
|
+
const ANALYTICAL_TABLE_TYPE = ___control_types["ANALYTICAL_TABLE_TYPE"];
|
|
11
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
12
|
+
const M_TABLE_TYPE = ___control_types["M_TABLE_TYPE"];
|
|
13
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
14
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
14
15
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
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
18
|
const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
@@ -5,14 +5,8 @@ import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/qu
|
|
|
5
5
|
import { getControlById, isA } from '../../../utils/core';
|
|
6
6
|
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
7
7
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
GRID_TABLE_TYPE,
|
|
11
|
-
M_TABLE_TYPE,
|
|
12
|
-
SMART_TABLE_TYPE,
|
|
13
|
-
TableQuickActionDefinitionBase,
|
|
14
|
-
TREE_TABLE_TYPE
|
|
15
|
-
} from '../table-quick-action-base';
|
|
8
|
+
import { ANALYTICAL_TABLE_TYPE, GRID_TABLE_TYPE, M_TABLE_TYPE, SMART_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
9
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
16
10
|
import ManagedObject from 'sap/ui/base/ManagedObject';
|
|
17
11
|
import UI5Element from 'sap/ui/core/Element';
|
|
18
12
|
import { notifyUser } from '../../utils';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["../../../cpe/quick-actions/utils", "../
|
|
3
|
+
sap.ui.define(["../../../cpe/quick-actions/utils", "../control-types", "./utils", "../simple-quick-action-base", "../../../utils/core"], function (_____cpe_quick_actions_utils, ___control_types, ___utils, ___simple_quick_action_base, _____utils_core) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
7
|
const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
|
|
8
|
-
const GRID_TABLE_TYPE =
|
|
9
|
-
const M_TABLE_TYPE =
|
|
10
|
-
const SMART_TABLE_TYPE =
|
|
11
|
-
const TREE_TABLE_TYPE =
|
|
8
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
9
|
+
const M_TABLE_TYPE = ___control_types["M_TABLE_TYPE"];
|
|
10
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
11
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
12
12
|
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
13
13
|
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
14
14
|
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
2
|
import { QuickActionContext, SimpleQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
3
3
|
import { getRelevantControlFromActivePage, pageHasControlId } from '../../../cpe/quick-actions/utils';
|
|
4
|
-
import { GRID_TABLE_TYPE, M_TABLE_TYPE, SMART_TABLE_TYPE, TREE_TABLE_TYPE } from '../
|
|
4
|
+
import { GRID_TABLE_TYPE, M_TABLE_TYPE, SMART_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
5
5
|
import { areManifestChangesSupported, prepareManifestChange } from './utils';
|
|
6
6
|
|
|
7
7
|
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../table-quick-action-base", "../control-types", "./utils", "../../../utils/version", "../../../utils/core", "../common/utils", "./create-table-custom-column"], function (___table_quick_action_base, ___control_types, ___utils, _____utils_version, _____utils_core, ___common_utils, ___create_table_custom_column) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
7
|
+
const ANALYTICAL_TABLE_TYPE = ___control_types["ANALYTICAL_TABLE_TYPE"];
|
|
8
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
9
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
10
|
+
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
11
|
+
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
12
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
13
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
14
|
+
const isA = _____utils_core["isA"];
|
|
15
|
+
const getTooltipsForTableEmptyRowModeAction = ___common_utils["getTooltipsForTableEmptyRowModeAction"];
|
|
16
|
+
const preprocessActionExecution = ___create_table_custom_column["preprocessActionExecution"];
|
|
17
|
+
const ENABLE_TABLE_EMPTY_ROW_MODE = 'enable-table-empty-row-mode';
|
|
18
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
19
|
+
const UNSUPPORTED_TABLES = [ANALYTICAL_TABLE_TYPE, TREE_TABLE_TYPE];
|
|
20
|
+
const CREATION_ROWS_MODE = 'creationRows';
|
|
21
|
+
const OBJECT_PAGE_COMPONENT_NAME = 'sap.suite.ui.generic.template.ObjectPage';
|
|
22
|
+
class EnableTableEmptyRowModeQuickAction extends TableQuickActionDefinitionBase {
|
|
23
|
+
forceRefreshAfterExecution = true;
|
|
24
|
+
constructor(context) {
|
|
25
|
+
super(ENABLE_TABLE_EMPTY_ROW_MODE, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLE_EMPTY_ROW_MODE', context);
|
|
26
|
+
}
|
|
27
|
+
async initialize() {
|
|
28
|
+
const version = await getUi5Version();
|
|
29
|
+
if (!(await areManifestChangesSupported(this.context.manifest))) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
33
|
+
major: 1,
|
|
34
|
+
minor: 120,
|
|
35
|
+
patch: 23
|
|
36
|
+
})) {
|
|
37
|
+
this.isApplicable = false;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const {
|
|
41
|
+
alreadyEnabledTooltip,
|
|
42
|
+
unsupportedCreationRowsTooltip
|
|
43
|
+
} = getTooltipsForTableEmptyRowModeAction(this.context.resourceBundle);
|
|
44
|
+
const processChild = (child, mapKey) => {
|
|
45
|
+
const table = this.tableMap[mapKey]?.table;
|
|
46
|
+
if (table) {
|
|
47
|
+
const innerTable = this.getInternalTable(table);
|
|
48
|
+
if (innerTable) {
|
|
49
|
+
if (UNSUPPORTED_TABLES.some(t => isA(t, innerTable))) {
|
|
50
|
+
child.enabled = false;
|
|
51
|
+
child.tooltip = unsupportedCreationRowsTooltip;
|
|
52
|
+
} else if (table.data('creationMode') === CREATION_ROWS_MODE) {
|
|
53
|
+
child.enabled = false;
|
|
54
|
+
child.tooltip = alreadyEnabledTooltip;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
59
|
+
};
|
|
60
|
+
await super.initialize();
|
|
61
|
+
|
|
62
|
+
// disable nested actions based on conditions
|
|
63
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
64
|
+
}
|
|
65
|
+
async execute(path) {
|
|
66
|
+
const {
|
|
67
|
+
table,
|
|
68
|
+
sectionInfo,
|
|
69
|
+
iconTabBarFilterKey
|
|
70
|
+
} = this.tableMap[path];
|
|
71
|
+
if (!table) {
|
|
72
|
+
throw Error('Internal error. Table element not found');
|
|
73
|
+
}
|
|
74
|
+
const sectionId = table.data('sectionId');
|
|
75
|
+
if (!sectionId) {
|
|
76
|
+
throw Error('Internal error. Table sectionId property not found');
|
|
77
|
+
}
|
|
78
|
+
const entitySet = this.context.view.getParent()?.getProperty('entitySet');
|
|
79
|
+
if (!entitySet) {
|
|
80
|
+
throw Error('Internal error. Object Page entity set not found');
|
|
81
|
+
}
|
|
82
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
83
|
+
this.selectOverlay(table);
|
|
84
|
+
const commands = await prepareManifestChange(this.context, `component/settings/sections/${sectionId}/createMode`, table, OBJECT_PAGE_COMPONENT_NAME, entitySet, CREATION_ROWS_MODE);
|
|
85
|
+
return commands ?? [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
var __exports = {
|
|
89
|
+
__esModule: true
|
|
90
|
+
};
|
|
91
|
+
__exports.ENABLE_TABLE_EMPTY_ROW_MODE = ENABLE_TABLE_EMPTY_ROW_MODE;
|
|
92
|
+
__exports.EnableTableEmptyRowModeQuickAction = EnableTableEmptyRowModeQuickAction;
|
|
93
|
+
return __exports;
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=op-enable-empty-row-mode.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
|
|
3
|
+
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
4
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
5
|
+
import { ANALYTICAL_TABLE_TYPE, SMART_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
6
|
+
|
|
7
|
+
import { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
|
|
8
|
+
import { areManifestChangesSupported, prepareManifestChange } from './utils';
|
|
9
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
10
|
+
import { isA } from '../../../utils/core';
|
|
11
|
+
import { getTooltipsForTableEmptyRowModeAction } from '../common/utils';
|
|
12
|
+
import { preprocessActionExecution } from './create-table-custom-column';
|
|
13
|
+
|
|
14
|
+
export const ENABLE_TABLE_EMPTY_ROW_MODE = 'enable-table-empty-row-mode';
|
|
15
|
+
|
|
16
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
17
|
+
const UNSUPPORTED_TABLES = [ANALYTICAL_TABLE_TYPE, TREE_TABLE_TYPE];
|
|
18
|
+
const CREATION_ROWS_MODE = 'creationRows';
|
|
19
|
+
const OBJECT_PAGE_COMPONENT_NAME = 'sap.suite.ui.generic.template.ObjectPage';
|
|
20
|
+
|
|
21
|
+
export class EnableTableEmptyRowModeQuickAction
|
|
22
|
+
extends TableQuickActionDefinitionBase
|
|
23
|
+
implements NestedQuickActionDefinition
|
|
24
|
+
{
|
|
25
|
+
readonly forceRefreshAfterExecution = true;
|
|
26
|
+
|
|
27
|
+
constructor(context: QuickActionContext) {
|
|
28
|
+
super(ENABLE_TABLE_EMPTY_ROW_MODE, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLE_EMPTY_ROW_MODE', context);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async initialize(): Promise<void> {
|
|
32
|
+
const version = await getUi5Version();
|
|
33
|
+
if (!(await areManifestChangesSupported(this.context.manifest))) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 120, patch: 23 })) {
|
|
38
|
+
this.isApplicable = false;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const { alreadyEnabledTooltip, unsupportedCreationRowsTooltip } = getTooltipsForTableEmptyRowModeAction(
|
|
43
|
+
this.context.resourceBundle
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const processChild = (child: NestedQuickActionChild, mapKey: string) => {
|
|
47
|
+
const table = this.tableMap[mapKey]?.table;
|
|
48
|
+
if (table) {
|
|
49
|
+
const innerTable = this.getInternalTable(table);
|
|
50
|
+
if (innerTable) {
|
|
51
|
+
if (UNSUPPORTED_TABLES.some((t) => isA(t, innerTable))) {
|
|
52
|
+
child.enabled = false;
|
|
53
|
+
child.tooltip = unsupportedCreationRowsTooltip;
|
|
54
|
+
} else if (table.data('creationMode') === CREATION_ROWS_MODE) {
|
|
55
|
+
child.enabled = false;
|
|
56
|
+
child.tooltip = alreadyEnabledTooltip;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
await super.initialize();
|
|
64
|
+
|
|
65
|
+
// disable nested actions based on conditions
|
|
66
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
70
|
+
const { table, sectionInfo, iconTabBarFilterKey } = this.tableMap[path];
|
|
71
|
+
if (!table) {
|
|
72
|
+
throw Error('Internal error. Table element not found');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const sectionId = table.data('sectionId') as string | undefined | null;
|
|
76
|
+
if (!sectionId) {
|
|
77
|
+
throw Error('Internal error. Table sectionId property not found');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const entitySet = this.context.view.getParent()?.getProperty('entitySet') as string | undefined;
|
|
81
|
+
if (!entitySet) {
|
|
82
|
+
throw Error('Internal error. Object Page entity set not found');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
86
|
+
this.selectOverlay(table);
|
|
87
|
+
|
|
88
|
+
const commands = await prepareManifestChange(
|
|
89
|
+
this.context,
|
|
90
|
+
`component/settings/sections/${sectionId}/createMode`,
|
|
91
|
+
table,
|
|
92
|
+
OBJECT_PAGE_COMPONENT_NAME,
|
|
93
|
+
entitySet,
|
|
94
|
+
CREATION_ROWS_MODE
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return commands ?? [];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../../../cpe/quick-actions/registry", "../common/add-controller-to-page", "./lr-toggle-clear-filter-bar", "./change-table-columns", "../common/op-add-header-field", "../common/op-add-custom-section", "../fe-v2/create-table-action", "./create-table-custom-column", "../common/create-page-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar"], function (XMLView, ComponentContainer, _____cpe_quick_actions_registry, ___common_add_controller_to_page, ___lr_toggle_clear_filter_bar, ___change_table_columns, ___common_op_add_header_field, ___common_op_add_custom_section, ___fe_v2_create_table_action, ___create_table_custom_column, ___common_create_page_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar) {
|
|
3
|
+
sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../../../cpe/quick-actions/registry", "../common/add-controller-to-page", "./lr-toggle-clear-filter-bar", "./change-table-columns", "../common/op-add-header-field", "../common/op-add-custom-section", "../fe-v2/create-table-action", "./create-table-custom-column", "../common/create-page-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar", "./op-enable-empty-row-mode"], function (XMLView, ComponentContainer, _____cpe_quick_actions_registry, ___common_add_controller_to_page, ___lr_toggle_clear_filter_bar, ___change_table_columns, ___common_op_add_header_field, ___common_op_add_custom_section, ___fe_v2_create_table_action, ___create_table_custom_column, ___common_create_page_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar, ___op_enable_empty_row_mode) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const QuickActionDefinitionRegistry = _____cpe_quick_actions_registry["QuickActionDefinitionRegistry"];
|
|
@@ -14,6 +14,7 @@ sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../
|
|
|
14
14
|
const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
|
|
15
15
|
const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
|
|
16
16
|
const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
|
|
17
|
+
const EnableTableEmptyRowModeQuickAction = ___op_enable_empty_row_mode["EnableTableEmptyRowModeQuickAction"];
|
|
17
18
|
const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
|
|
18
19
|
const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
|
|
19
20
|
const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
|
|
@@ -44,7 +45,7 @@ sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../
|
|
|
44
45
|
} else if (name === 'objectPage') {
|
|
45
46
|
definitionGroups.push({
|
|
46
47
|
title: 'OBJECT PAGE',
|
|
47
|
-
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction],
|
|
48
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction],
|
|
48
49
|
view,
|
|
49
50
|
key: name + index
|
|
50
51
|
});
|
|
@@ -19,6 +19,7 @@ import { AddTableCustomColumnQuickAction } from './create-table-custom-column';
|
|
|
19
19
|
import { AddPageActionQuickAction } from '../common/create-page-action';
|
|
20
20
|
import { EnableTableFilteringQuickAction } from './lr-enable-table-filtering';
|
|
21
21
|
import { ToggleSemanticDateRangeFilterBar } from './lr-enable-semantic-date-range-filter-bar';
|
|
22
|
+
import { EnableTableEmptyRowModeQuickAction } from './op-enable-empty-row-mode';
|
|
22
23
|
type PageName = 'listReport' | 'objectPage' | 'analyticalListPage';
|
|
23
24
|
|
|
24
25
|
const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
|
|
@@ -65,7 +66,8 @@ export default class FEV2QuickActionRegistry extends QuickActionDefinitionRegist
|
|
|
65
66
|
AddCustomSectionQuickAction,
|
|
66
67
|
ChangeTableColumnsQuickAction,
|
|
67
68
|
AddTableActionQuickAction,
|
|
68
|
-
AddTableCustomColumnQuickAction
|
|
69
|
+
AddTableCustomColumnQuickAction,
|
|
70
|
+
EnableTableEmptyRowModeQuickAction
|
|
69
71
|
],
|
|
70
72
|
view,
|
|
71
73
|
key: name + index
|
|
@@ -41,6 +41,15 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version"], f
|
|
|
41
41
|
return [command];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Checks whether the manifest has array structured page definitions
|
|
46
|
+
* @param manifest - manifest object
|
|
47
|
+
* @returns true if pages are defined as array, false if defined as object
|
|
48
|
+
*/
|
|
49
|
+
function isManifestArrayStructured(manifest) {
|
|
50
|
+
return Array.isArray(manifest['sap.ui.generic.app']?.pages);
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
/**
|
|
45
54
|
* Checks if the current UI5 version and manifest structure is supported in v2 applications.
|
|
46
55
|
*
|
|
@@ -54,8 +63,7 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version"], f
|
|
|
54
63
|
*
|
|
55
64
|
*/
|
|
56
65
|
async function areManifestChangesSupported(manifest) {
|
|
57
|
-
|
|
58
|
-
if (Array.isArray(pagesStructureInManifest)) {
|
|
66
|
+
if (isManifestArrayStructured(manifest)) {
|
|
59
67
|
return false;
|
|
60
68
|
}
|
|
61
69
|
const version = await getUi5Version();
|
|
@@ -66,7 +74,7 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version"], f
|
|
|
66
74
|
const isSupportedPatchVersion = isVersionEqualOrHasNewerPatch(version, {
|
|
67
75
|
major: 1,
|
|
68
76
|
minor: 96,
|
|
69
|
-
patch:
|
|
77
|
+
patch: 35
|
|
70
78
|
}) || isVersionEqualOrHasNewerPatch(version, {
|
|
71
79
|
major: 1,
|
|
72
80
|
minor: 108,
|
|
@@ -82,6 +90,7 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version"], f
|
|
|
82
90
|
__esModule: true
|
|
83
91
|
};
|
|
84
92
|
__exports.prepareManifestChange = prepareManifestChange;
|
|
93
|
+
__exports.isManifestArrayStructured = isManifestArrayStructured;
|
|
85
94
|
__exports.areManifestChangesSupported = areManifestChangesSupported;
|
|
86
95
|
return __exports;
|
|
87
96
|
});
|
|
@@ -24,7 +24,7 @@ export async function prepareManifestChange(
|
|
|
24
24
|
control: UI5Element,
|
|
25
25
|
component: string,
|
|
26
26
|
entitySet: string | undefined,
|
|
27
|
-
propertyValue: object
|
|
27
|
+
propertyValue: object | string
|
|
28
28
|
): Promise<FlexCommand[]> {
|
|
29
29
|
const { flexSettings } = context;
|
|
30
30
|
|
|
@@ -53,6 +53,16 @@ export async function prepareManifestChange(
|
|
|
53
53
|
return [command];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Checks whether the manifest has array structured page definitions
|
|
58
|
+
* @param manifest - manifest object
|
|
59
|
+
* @returns true if pages are defined as array, false if defined as object
|
|
60
|
+
*/
|
|
61
|
+
export function isManifestArrayStructured(manifest: Manifest): boolean {
|
|
62
|
+
return Array.isArray(manifest['sap.ui.generic.app']?.pages);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
56
66
|
/**
|
|
57
67
|
* Checks if the current UI5 version and manifest structure is supported in v2 applications.
|
|
58
68
|
*
|
|
@@ -66,17 +76,17 @@ export async function prepareManifestChange(
|
|
|
66
76
|
*
|
|
67
77
|
*/
|
|
68
78
|
export async function areManifestChangesSupported(manifest: Manifest): Promise<boolean> {
|
|
69
|
-
|
|
70
|
-
if (Array.isArray(pagesStructureInManifest)) {
|
|
79
|
+
if (isManifestArrayStructured(manifest)) {
|
|
71
80
|
return false;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
83
|
const version = await getUi5Version();
|
|
75
84
|
const isAboveOrEqualMinimalVersion = !isLowerThanMinimalUi5Version(version, { major: 1, minor: 128 });
|
|
76
85
|
const isSupportedPatchVersion =
|
|
77
|
-
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 96, patch:
|
|
86
|
+
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 96, patch: 35 }) ||
|
|
78
87
|
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 108, patch: 38 }) ||
|
|
79
88
|
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 120, patch: 23 });
|
|
80
89
|
|
|
81
90
|
return isAboveOrEqualMinimalVersion || isSupportedPatchVersion;
|
|
82
91
|
}
|
|
92
|
+
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI", "../../../cpe/quick-actions/utils", "../../../utils/core", "./table-quick-action-base"], function (OverlayUtil, FlexRuntimeInfoAPI, _____cpe_quick_actions_utils, _____utils_core, ___table_quick_action_base) {
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI", "../../../cpe/quick-actions/utils", "../../../utils/core", "./table-quick-action-base", "../control-types"], function (OverlayUtil, FlexRuntimeInfoAPI, _____cpe_quick_actions_utils, _____utils_core, ___table_quick_action_base, ___control_types) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
7
|
const getControlById = _____utils_core["getControlById"];
|
|
8
8
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
9
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
9
10
|
const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
10
11
|
const ACTION_ID = 'CTX_SETTINGS0';
|
|
11
12
|
const CONTROL_TYPE = 'sap.ui.mdc.Table';
|
|
@@ -15,7 +16,7 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI"
|
|
|
15
16
|
*/
|
|
16
17
|
class ChangeTableColumnsQuickAction extends TableQuickActionDefinitionBase {
|
|
17
18
|
constructor(context) {
|
|
18
|
-
super(CHANGE_TABLE_COLUMNS, 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
19
|
+
super(CHANGE_TABLE_COLUMNS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
19
20
|
}
|
|
20
21
|
async execute(path) {
|
|
21
22
|
const index = this.tableMap[path];
|
|
@@ -5,6 +5,7 @@ import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/qu
|
|
|
5
5
|
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
6
6
|
import { getControlById } from '../../../utils/core';
|
|
7
7
|
import { TableQuickActionDefinitionBase } from './table-quick-action-base';
|
|
8
|
+
import { MDC_TABLE_TYPE } from '../control-types';
|
|
8
9
|
|
|
9
10
|
export const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
10
11
|
const ACTION_ID = 'CTX_SETTINGS0';
|
|
@@ -18,7 +19,7 @@ export class ChangeTableColumnsQuickAction
|
|
|
18
19
|
implements NestedQuickActionDefinition
|
|
19
20
|
{
|
|
20
21
|
constructor(context: QuickActionContext) {
|
|
21
|
-
super(CHANGE_TABLE_COLUMNS, 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
22
|
+
super(CHANGE_TABLE_COLUMNS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../../../utils/core", "../../init-dialogs", "./table-quick-action-base"], function (OverlayUtil, _____cpe_quick_actions_utils, _____utils_core, ____init_dialogs, ___table_quick_action_base) {
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../../../utils/core", "../../init-dialogs", "./table-quick-action-base", "../control-types"], function (OverlayUtil, _____cpe_quick_actions_utils, _____utils_core, ____init_dialogs, ___table_quick_action_base, ___control_types) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
@@ -8,6 +8,7 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../
|
|
|
8
8
|
const DialogNames = ____init_dialogs["DialogNames"];
|
|
9
9
|
const handler = ____init_dialogs["handler"];
|
|
10
10
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
11
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
11
12
|
const CREATE_TABLE_ACTION = 'create_table_action';
|
|
12
13
|
const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
13
14
|
|
|
@@ -16,7 +17,7 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../
|
|
|
16
17
|
*/
|
|
17
18
|
class AddTableActionQuickAction extends TableQuickActionDefinitionBase {
|
|
18
19
|
constructor(context) {
|
|
19
|
-
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
20
|
+
super(CREATE_TABLE_ACTION, [MDC_TABLE_TYPE], 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
20
21
|
}
|
|
21
22
|
async execute(path) {
|
|
22
23
|
const index = this.tableMap[path];
|
|
@@ -6,6 +6,7 @@ import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/uti
|
|
|
6
6
|
import { getControlById } from '../../../utils/core';
|
|
7
7
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
8
8
|
import { TableQuickActionDefinitionBase } from './table-quick-action-base';
|
|
9
|
+
import { MDC_TABLE_TYPE } from '../control-types';
|
|
9
10
|
|
|
10
11
|
export const CREATE_TABLE_ACTION = 'create_table_action';
|
|
11
12
|
const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
@@ -15,7 +16,7 @@ const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
|
15
16
|
*/
|
|
16
17
|
export class AddTableActionQuickAction extends TableQuickActionDefinitionBase implements NestedQuickActionDefinition {
|
|
17
18
|
constructor(context: QuickActionContext) {
|
|
18
|
-
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
19
|
+
super(CREATE_TABLE_ACTION, [MDC_TABLE_TYPE], 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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) {
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../control-types", "../table-quick-action-base", "../fe-v2/create-table-custom-column"], function (OverlayRegistry, ____init_dialogs, ___control_types, ___table_quick_action_base, ___fe_v2_create_table_custom_column) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const DialogNames = ____init_dialogs["DialogNames"];
|
|
7
7
|
const handler = ____init_dialogs["handler"];
|
|
8
|
-
const SMART_TABLE_TYPE =
|
|
9
|
-
const GRID_TABLE_TYPE =
|
|
10
|
-
const MDC_TABLE_TYPE =
|
|
8
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
9
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
10
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
11
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
11
12
|
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
12
|
-
const TREE_TABLE_TYPE = ___table_quick_action_base["TREE_TABLE_TYPE"];
|
|
13
13
|
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
14
14
|
const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
15
15
|
const CONTROL_TYPES = [SMART_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
@@ -3,13 +3,9 @@ import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
|
3
3
|
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
4
4
|
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
5
5
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
MDC_TABLE_TYPE,
|
|
10
|
-
TableQuickActionDefinitionBase,
|
|
11
|
-
TREE_TABLE_TYPE
|
|
12
|
-
} from '../table-quick-action-base';
|
|
6
|
+
import { SMART_TABLE_TYPE, GRID_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
7
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
8
|
+
|
|
13
9
|
import { preprocessActionExecution } from '../fe-v2/create-table-custom-column';
|
|
14
10
|
|
|
15
11
|
export const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|