@sap-ux/preview-middleware 0.19.43 → 0.20.0
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/add-fragment.js +46 -46
- package/dist/client/adp/api-handler.js +159 -159
- package/dist/client/adp/command-executor.js +75 -75
- package/dist/client/adp/control-utils.js +44 -44
- package/dist/client/adp/controllers/ControllerExtension.controller.js +210 -210
- package/dist/client/adp/controllers/ExtensionPoint.controller.js +139 -139
- package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
- package/dist/client/adp/dialog-factory.js +135 -135
- package/dist/client/adp/init-dialogs.js +163 -163
- package/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +96 -96
- package/dist/client/adp/quick-actions/common/add-controller-to-page.js +60 -60
- package/dist/client/adp/quick-actions/common/create-page-action.js +54 -54
- package/dist/client/adp/quick-actions/common/op-add-custom-section.js +39 -39
- package/dist/client/adp/quick-actions/common/op-add-header-field.js +67 -67
- package/dist/client/adp/quick-actions/common/utils.js +18 -18
- package/dist/client/adp/quick-actions/control-types.js +23 -23
- package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
- package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
- package/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +81 -81
- package/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +67 -67
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +107 -107
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +99 -99
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +78 -78
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +69 -69
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +59 -59
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
- package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +84 -84
- package/dist/client/adp/quick-actions/fe-v2/registry.js +77 -77
- package/dist/client/adp/quick-actions/fe-v2/utils.js +116 -116
- package/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +138 -138
- package/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +79 -79
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +75 -75
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +53 -53
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +49 -49
- package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +81 -81
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +56 -56
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +84 -84
- package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +53 -53
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
- package/dist/client/adp/quick-actions/fe-v4/registry.js +60 -60
- package/dist/client/adp/quick-actions/fe-v4/utils.js +72 -72
- package/dist/client/adp/quick-actions/load.js +44 -44
- package/dist/client/adp/quick-actions/quick-action-base.js +64 -64
- package/dist/client/adp/utils.js +218 -218
- package/dist/client/cpe/additional-change-info/add-xml-additional-info.js +75 -75
- package/dist/client/cpe/changes/generic-change.js +326 -326
- package/dist/client/cpe/changes/index.js +10 -10
- package/dist/client/cpe/changes/validator.js +39 -39
- package/dist/client/cpe/documentation.js +164 -164
- package/dist/client/cpe/feature-service.js +36 -36
- package/dist/client/cpe/logger.js +30 -30
- package/dist/client/cpe/outline/editable.js +37 -37
- package/dist/client/cpe/outline/nodes.js +203 -203
- package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
- package/dist/client/cpe/quick-actions/registry.js +143 -143
- package/dist/client/cpe/quick-actions/utils.js +92 -92
- package/dist/client/cpe/types.js +4 -4
- package/dist/client/cpe/ui5-utils.js +33 -33
- package/dist/client/cpe/utils.js +111 -111
- package/dist/client/flp/WorkspaceConnector.js +92 -92
- package/dist/client/flp/common.js +28 -28
- package/dist/client/flp/enableFakeConnector.js +89 -89
- package/dist/client/flp/homepage/Component.js +14 -14
- package/dist/client/flp/initCdm.js +117 -117
- package/dist/client/flp/initConnectors.js +28 -28
- package/dist/client/flp/initRta.js +178 -178
- package/dist/client/i18n.js +56 -56
- package/dist/client/utils/additional-change-info.js +54 -54
- package/dist/client/utils/application.js +32 -32
- package/dist/client/utils/core.js +84 -84
- package/dist/client/utils/error.js +19 -19
- package/dist/client/utils/fe-v2.js +56 -56
- package/dist/client/utils/fe-v4.js +140 -140
- package/dist/client/utils/version.js +104 -104
- package/package.json +14 -14
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["../../../utils/fe-v4", "../../../utils/version", "../control-types", "../table-quick-action-base", "../../../utils/core", "../common/utils", "../fe-v2/create-table-custom-column"], function (_____utils_fe_v4, _____utils_version, ___control_types, ___table_quick_action_base, _____utils_core, ___common_utils, ___fe_v2_create_table_custom_column) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const createManifestPropertyChange = _____utils_fe_v4["createManifestPropertyChange"];
|
|
7
|
-
const getUi5Version = _____utils_version["getUi5Version"];
|
|
8
|
-
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
9
|
-
const ANALYTICAL_TABLE_TYPE = ___control_types["ANALYTICAL_TABLE_TYPE"];
|
|
10
|
-
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
11
|
-
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
12
|
-
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
13
|
-
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
14
|
-
const isA = _____utils_core["isA"];
|
|
15
|
-
const getTooltipsForTableEmptyRowModeAction = ___common_utils["getTooltipsForTableEmptyRowModeAction"];
|
|
16
|
-
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
17
|
-
const ENABLE_TABLE_EMPTY_ROW_MODE = 'enable-table-empty-row-mode';
|
|
18
|
-
const CONTROL_TYPES = [MDC_TABLE_TYPE, GRID_TABLE_TYPE, ANALYTICAL_TABLE_TYPE, TREE_TABLE_TYPE];
|
|
19
|
-
const UNSUPPORTED_TABLES = [ANALYTICAL_TABLE_TYPE, TREE_TABLE_TYPE];
|
|
20
|
-
const INLINE_CREATION_ROWS_MODE = 'InlineCreationRows';
|
|
21
|
-
/**
|
|
22
|
-
* Quick Action for enabling table filtering using table personalization settings.
|
|
23
|
-
*/
|
|
24
|
-
class EnableTableEmptyRowModeQuickAction extends TableQuickActionDefinitionBase {
|
|
25
|
-
constructor(context) {
|
|
26
|
-
super(ENABLE_TABLE_EMPTY_ROW_MODE, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLE_EMPTY_ROW_MODE', context);
|
|
27
|
-
}
|
|
28
|
-
forceRefreshAfterExecution = true;
|
|
29
|
-
async initialize() {
|
|
30
|
-
const version = await getUi5Version();
|
|
31
|
-
if (isLowerThanMinimalUi5Version(version, {
|
|
32
|
-
major: 1,
|
|
33
|
-
minor: 131
|
|
34
|
-
})) {
|
|
35
|
-
this.isApplicable = false;
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const {
|
|
39
|
-
alreadyEnabledTooltip,
|
|
40
|
-
unsupportedCreationRowsTooltip
|
|
41
|
-
} = getTooltipsForTableEmptyRowModeAction(this.context.resourceBundle);
|
|
42
|
-
const processChild = (child, mapKey) => {
|
|
43
|
-
const table = this.tableMap[mapKey]?.table;
|
|
44
|
-
if (table) {
|
|
45
|
-
if (UNSUPPORTED_TABLES.some(t => isA(t, table))) {
|
|
46
|
-
child.enabled = false;
|
|
47
|
-
child.tooltip = unsupportedCreationRowsTooltip;
|
|
48
|
-
} else if (table.data('creationMode') === INLINE_CREATION_ROWS_MODE) {
|
|
49
|
-
child.enabled = false;
|
|
50
|
-
child.tooltip = alreadyEnabledTooltip;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
54
|
-
};
|
|
55
|
-
await super.initialize();
|
|
56
|
-
|
|
57
|
-
// disable nested actions based on conditions
|
|
58
|
-
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
59
|
-
}
|
|
60
|
-
async execute(path) {
|
|
61
|
-
const {
|
|
62
|
-
flexSettings
|
|
63
|
-
} = this.context;
|
|
64
|
-
const {
|
|
65
|
-
table,
|
|
66
|
-
sectionInfo,
|
|
67
|
-
iconTabBarFilterKey
|
|
68
|
-
} = this.tableMap[path];
|
|
69
|
-
if (!table) {
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
73
|
-
this.selectOverlay(table);
|
|
74
|
-
const command = await createManifestPropertyChange(table, flexSettings, {
|
|
75
|
-
name: INLINE_CREATION_ROWS_MODE
|
|
76
|
-
}, ['creationMode']);
|
|
77
|
-
if (command) {
|
|
78
|
-
return [command];
|
|
79
|
-
} else {
|
|
80
|
-
return [];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
var __exports = {
|
|
85
|
-
__esModule: true
|
|
86
|
-
};
|
|
87
|
-
__exports.ENABLE_TABLE_EMPTY_ROW_MODE = ENABLE_TABLE_EMPTY_ROW_MODE;
|
|
88
|
-
__exports.EnableTableEmptyRowModeQuickAction = EnableTableEmptyRowModeQuickAction;
|
|
89
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../utils/fe-v4", "../../../utils/version", "../control-types", "../table-quick-action-base", "../../../utils/core", "../common/utils", "../fe-v2/create-table-custom-column"], function (_____utils_fe_v4, _____utils_version, ___control_types, ___table_quick_action_base, _____utils_core, ___common_utils, ___fe_v2_create_table_custom_column) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const createManifestPropertyChange = _____utils_fe_v4["createManifestPropertyChange"];
|
|
7
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
8
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
9
|
+
const ANALYTICAL_TABLE_TYPE = ___control_types["ANALYTICAL_TABLE_TYPE"];
|
|
10
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
11
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
12
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
13
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
14
|
+
const isA = _____utils_core["isA"];
|
|
15
|
+
const getTooltipsForTableEmptyRowModeAction = ___common_utils["getTooltipsForTableEmptyRowModeAction"];
|
|
16
|
+
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
17
|
+
const ENABLE_TABLE_EMPTY_ROW_MODE = 'enable-table-empty-row-mode';
|
|
18
|
+
const CONTROL_TYPES = [MDC_TABLE_TYPE, GRID_TABLE_TYPE, ANALYTICAL_TABLE_TYPE, TREE_TABLE_TYPE];
|
|
19
|
+
const UNSUPPORTED_TABLES = [ANALYTICAL_TABLE_TYPE, TREE_TABLE_TYPE];
|
|
20
|
+
const INLINE_CREATION_ROWS_MODE = 'InlineCreationRows';
|
|
21
|
+
/**
|
|
22
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
23
|
+
*/
|
|
24
|
+
class EnableTableEmptyRowModeQuickAction extends TableQuickActionDefinitionBase {
|
|
25
|
+
constructor(context) {
|
|
26
|
+
super(ENABLE_TABLE_EMPTY_ROW_MODE, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLE_EMPTY_ROW_MODE', context);
|
|
27
|
+
}
|
|
28
|
+
forceRefreshAfterExecution = true;
|
|
29
|
+
async initialize() {
|
|
30
|
+
const version = await getUi5Version();
|
|
31
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
32
|
+
major: 1,
|
|
33
|
+
minor: 131
|
|
34
|
+
})) {
|
|
35
|
+
this.isApplicable = false;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const {
|
|
39
|
+
alreadyEnabledTooltip,
|
|
40
|
+
unsupportedCreationRowsTooltip
|
|
41
|
+
} = getTooltipsForTableEmptyRowModeAction(this.context.resourceBundle);
|
|
42
|
+
const processChild = (child, mapKey) => {
|
|
43
|
+
const table = this.tableMap[mapKey]?.table;
|
|
44
|
+
if (table) {
|
|
45
|
+
if (UNSUPPORTED_TABLES.some(t => isA(t, table))) {
|
|
46
|
+
child.enabled = false;
|
|
47
|
+
child.tooltip = unsupportedCreationRowsTooltip;
|
|
48
|
+
} else if (table.data('creationMode') === INLINE_CREATION_ROWS_MODE) {
|
|
49
|
+
child.enabled = false;
|
|
50
|
+
child.tooltip = alreadyEnabledTooltip;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
54
|
+
};
|
|
55
|
+
await super.initialize();
|
|
56
|
+
|
|
57
|
+
// disable nested actions based on conditions
|
|
58
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
59
|
+
}
|
|
60
|
+
async execute(path) {
|
|
61
|
+
const {
|
|
62
|
+
flexSettings
|
|
63
|
+
} = this.context;
|
|
64
|
+
const {
|
|
65
|
+
table,
|
|
66
|
+
sectionInfo,
|
|
67
|
+
iconTabBarFilterKey
|
|
68
|
+
} = this.tableMap[path];
|
|
69
|
+
if (!table) {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
73
|
+
this.selectOverlay(table);
|
|
74
|
+
const command = await createManifestPropertyChange(table, flexSettings, {
|
|
75
|
+
name: INLINE_CREATION_ROWS_MODE
|
|
76
|
+
}, ['creationMode']);
|
|
77
|
+
if (command) {
|
|
78
|
+
return [command];
|
|
79
|
+
} else {
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var __exports = {
|
|
85
|
+
__esModule: true
|
|
86
|
+
};
|
|
87
|
+
__exports.ENABLE_TABLE_EMPTY_ROW_MODE = ENABLE_TABLE_EMPTY_ROW_MODE;
|
|
88
|
+
__exports.EnableTableEmptyRowModeQuickAction = EnableTableEmptyRowModeQuickAction;
|
|
89
|
+
return __exports;
|
|
90
90
|
});
|
|
91
91
|
//# sourceMappingURL=op-enable-empty-row-mode.js.map
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["../../../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", "./create-table-custom-column", "../common/create-page-action", "./create-table-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar", "./op-enable-empty-row-mode", "../common/add-new-annotation-file", "./enable-variant-management", "../fe-v4/add-new-subpage", "../fe-v4/change-table-actions"], function (_____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, ___create_table_custom_column, ___common_create_page_action, ___create_table_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar, ___op_enable_empty_row_mode, ___common_add_new_annotation_file, ___enable_variant_management, ___fe_v4_add_new_subpage, ___fe_v4_change_table_actions) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const QuickActionDefinitionRegistry = _____cpe_quick_actions_registry["QuickActionDefinitionRegistry"];
|
|
7
|
-
const AddControllerToPageQuickAction = ___common_add_controller_to_page["AddControllerToPageQuickAction"];
|
|
8
|
-
const ToggleClearFilterBarQuickAction = ___lr_toggle_clear_filter_bar["ToggleClearFilterBarQuickAction"];
|
|
9
|
-
const ChangeTableColumnsQuickAction = ___change_table_columns["ChangeTableColumnsQuickAction"];
|
|
10
|
-
const AddHeaderFieldQuickAction = ___common_op_add_header_field["AddHeaderFieldQuickAction"];
|
|
11
|
-
const AddCustomSectionQuickAction = ___common_op_add_custom_section["AddCustomSectionQuickAction"];
|
|
12
|
-
const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
|
|
13
|
-
const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
|
|
14
|
-
const AddTableActionQuickAction = ___create_table_action["AddTableActionQuickAction"];
|
|
15
|
-
const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
|
|
16
|
-
const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
|
|
17
|
-
const EnableTableEmptyRowModeQuickAction = ___op_enable_empty_row_mode["EnableTableEmptyRowModeQuickAction"];
|
|
18
|
-
const AddNewAnnotationFile = ___common_add_new_annotation_file["AddNewAnnotationFile"];
|
|
19
|
-
const EnableVariantManagementQuickAction = ___enable_variant_management["EnableVariantManagementQuickAction"];
|
|
20
|
-
const AddNewSubpage = ___fe_v4_add_new_subpage["AddNewSubpage"];
|
|
21
|
-
const ChangeTableActionsQuickAction = ___fe_v4_change_table_actions["ChangeTableActionsQuickAction"];
|
|
22
|
-
const LIST_REPORT_TYPE = 'sap.fe.templates.ListReport.ListReport';
|
|
23
|
-
const OBJECT_PAGE_TYPE = 'sap.fe.templates.ObjectPage.ObjectPage';
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Quick Action provider for SAP Fiori Elements V4 applications.
|
|
27
|
-
*/
|
|
28
|
-
class FEV4QuickActionRegistry extends QuickActionDefinitionRegistry {
|
|
29
|
-
PAGE_NAME_MAP = {
|
|
30
|
-
[LIST_REPORT_TYPE]: 'listReport',
|
|
31
|
-
[OBJECT_PAGE_TYPE]: 'objectPage'
|
|
32
|
-
};
|
|
33
|
-
getDefinitions(context) {
|
|
34
|
-
const activePages = this.getActivePageContent(context.controlIndex);
|
|
35
|
-
const definitionGroups = [];
|
|
36
|
-
for (let index = 0; index < activePages.length; index++) {
|
|
37
|
-
const {
|
|
38
|
-
name,
|
|
39
|
-
view
|
|
40
|
-
} = activePages[index];
|
|
41
|
-
if (name === 'listReport') {
|
|
42
|
-
definitionGroups.push({
|
|
43
|
-
title: 'LIST REPORT',
|
|
44
|
-
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, EnableVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
45
|
-
view,
|
|
46
|
-
key: name + index
|
|
47
|
-
});
|
|
48
|
-
} else if (name === 'objectPage') {
|
|
49
|
-
definitionGroups.push({
|
|
50
|
-
title: 'OBJECT PAGE',
|
|
51
|
-
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, EnableVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
52
|
-
view,
|
|
53
|
-
key: name + index
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return definitionGroups;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return FEV4QuickActionRegistry;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../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", "./create-table-custom-column", "../common/create-page-action", "./create-table-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar", "./op-enable-empty-row-mode", "../common/add-new-annotation-file", "./enable-variant-management", "../fe-v4/add-new-subpage", "../fe-v4/change-table-actions"], function (_____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, ___create_table_custom_column, ___common_create_page_action, ___create_table_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar, ___op_enable_empty_row_mode, ___common_add_new_annotation_file, ___enable_variant_management, ___fe_v4_add_new_subpage, ___fe_v4_change_table_actions) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const QuickActionDefinitionRegistry = _____cpe_quick_actions_registry["QuickActionDefinitionRegistry"];
|
|
7
|
+
const AddControllerToPageQuickAction = ___common_add_controller_to_page["AddControllerToPageQuickAction"];
|
|
8
|
+
const ToggleClearFilterBarQuickAction = ___lr_toggle_clear_filter_bar["ToggleClearFilterBarQuickAction"];
|
|
9
|
+
const ChangeTableColumnsQuickAction = ___change_table_columns["ChangeTableColumnsQuickAction"];
|
|
10
|
+
const AddHeaderFieldQuickAction = ___common_op_add_header_field["AddHeaderFieldQuickAction"];
|
|
11
|
+
const AddCustomSectionQuickAction = ___common_op_add_custom_section["AddCustomSectionQuickAction"];
|
|
12
|
+
const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
|
|
13
|
+
const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
|
|
14
|
+
const AddTableActionQuickAction = ___create_table_action["AddTableActionQuickAction"];
|
|
15
|
+
const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
|
|
16
|
+
const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
|
|
17
|
+
const EnableTableEmptyRowModeQuickAction = ___op_enable_empty_row_mode["EnableTableEmptyRowModeQuickAction"];
|
|
18
|
+
const AddNewAnnotationFile = ___common_add_new_annotation_file["AddNewAnnotationFile"];
|
|
19
|
+
const EnableVariantManagementQuickAction = ___enable_variant_management["EnableVariantManagementQuickAction"];
|
|
20
|
+
const AddNewSubpage = ___fe_v4_add_new_subpage["AddNewSubpage"];
|
|
21
|
+
const ChangeTableActionsQuickAction = ___fe_v4_change_table_actions["ChangeTableActionsQuickAction"];
|
|
22
|
+
const LIST_REPORT_TYPE = 'sap.fe.templates.ListReport.ListReport';
|
|
23
|
+
const OBJECT_PAGE_TYPE = 'sap.fe.templates.ObjectPage.ObjectPage';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Quick Action provider for SAP Fiori Elements V4 applications.
|
|
27
|
+
*/
|
|
28
|
+
class FEV4QuickActionRegistry extends QuickActionDefinitionRegistry {
|
|
29
|
+
PAGE_NAME_MAP = {
|
|
30
|
+
[LIST_REPORT_TYPE]: 'listReport',
|
|
31
|
+
[OBJECT_PAGE_TYPE]: 'objectPage'
|
|
32
|
+
};
|
|
33
|
+
getDefinitions(context) {
|
|
34
|
+
const activePages = this.getActivePageContent(context.controlIndex);
|
|
35
|
+
const definitionGroups = [];
|
|
36
|
+
for (let index = 0; index < activePages.length; index++) {
|
|
37
|
+
const {
|
|
38
|
+
name,
|
|
39
|
+
view
|
|
40
|
+
} = activePages[index];
|
|
41
|
+
if (name === 'listReport') {
|
|
42
|
+
definitionGroups.push({
|
|
43
|
+
title: 'LIST REPORT',
|
|
44
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, EnableVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
45
|
+
view,
|
|
46
|
+
key: name + index
|
|
47
|
+
});
|
|
48
|
+
} else if (name === 'objectPage') {
|
|
49
|
+
definitionGroups.push({
|
|
50
|
+
title: 'OBJECT PAGE',
|
|
51
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, EnableVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
52
|
+
view,
|
|
53
|
+
key: name + index
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return definitionGroups;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return FEV4QuickActionRegistry;
|
|
61
61
|
});
|
|
62
62
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["../../../utils/core", "sap/ui/rta/command/CommandFactory", "../../../utils/fe-v4"], function (_____utils_core, CommandFactory, _____utils_fe_v4) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const getControlById = _____utils_core["getControlById"];
|
|
7
|
-
const getV4AppComponent = _____utils_fe_v4["getV4AppComponent"];
|
|
8
|
-
const getPageName = _____utils_fe_v4["getPageName"];
|
|
9
|
-
const getReference = _____utils_fe_v4["getReference"];
|
|
10
|
-
async function executeToggleAction(context, isButtonEnabled, controlType, propertyPath) {
|
|
11
|
-
const controls = context.controlIndex[controlType] ?? [];
|
|
12
|
-
const control = controls[0];
|
|
13
|
-
if (control) {
|
|
14
|
-
const modifiedControl = getControlById(control.controlId);
|
|
15
|
-
if (!modifiedControl) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
const {
|
|
19
|
-
flexSettings
|
|
20
|
-
} = context;
|
|
21
|
-
const parent = modifiedControl.getParent();
|
|
22
|
-
if (!parent) {
|
|
23
|
-
return [];
|
|
24
|
-
}
|
|
25
|
-
const modifiedValue = {
|
|
26
|
-
reference: getReference(modifiedControl),
|
|
27
|
-
appComponent: getV4AppComponent(modifiedControl),
|
|
28
|
-
changeType: 'appdescr_fe_changePageConfiguration',
|
|
29
|
-
parameters: {
|
|
30
|
-
page: getPageName(parent),
|
|
31
|
-
entityPropertyChange: {
|
|
32
|
-
propertyPath: propertyPath,
|
|
33
|
-
propertyValue: !isButtonEnabled,
|
|
34
|
-
operation: 'UPSERT'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const command = await CommandFactory.getCommandFor(modifiedControl, 'appDescriptor', modifiedValue, null, flexSettings);
|
|
39
|
-
return [command];
|
|
40
|
-
}
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
const PATTERN_SUFFIX = ':?query:';
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Generates the pattern for a new route based on the input.
|
|
47
|
-
*
|
|
48
|
-
* @param sourceRoutePattern source page route pattern
|
|
49
|
-
* @param navProperty navigation property name (used to build nav pattern for nested OP )
|
|
50
|
-
* @param targetEntitySet navigation target entity set
|
|
51
|
-
* @returns the generated pattern as string
|
|
52
|
-
*/
|
|
53
|
-
function generateRoutePattern(sourceRoutePattern, navProperty, targetEntitySet) {
|
|
54
|
-
const parts = [];
|
|
55
|
-
const basePattern = sourceRoutePattern.replace(PATTERN_SUFFIX, '');
|
|
56
|
-
if (basePattern) {
|
|
57
|
-
parts.push(basePattern);
|
|
58
|
-
parts.push('/');
|
|
59
|
-
parts.push(navProperty);
|
|
60
|
-
} else {
|
|
61
|
-
parts.push(targetEntitySet);
|
|
62
|
-
}
|
|
63
|
-
parts.push(`({${targetEntitySet}Key})`);
|
|
64
|
-
parts.push(PATTERN_SUFFIX);
|
|
65
|
-
return parts.join('');
|
|
66
|
-
}
|
|
67
|
-
var __exports = {
|
|
68
|
-
__esModule: true
|
|
69
|
-
};
|
|
70
|
-
__exports.executeToggleAction = executeToggleAction;
|
|
71
|
-
__exports.generateRoutePattern = generateRoutePattern;
|
|
72
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../utils/core", "sap/ui/rta/command/CommandFactory", "../../../utils/fe-v4"], function (_____utils_core, CommandFactory, _____utils_fe_v4) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getControlById = _____utils_core["getControlById"];
|
|
7
|
+
const getV4AppComponent = _____utils_fe_v4["getV4AppComponent"];
|
|
8
|
+
const getPageName = _____utils_fe_v4["getPageName"];
|
|
9
|
+
const getReference = _____utils_fe_v4["getReference"];
|
|
10
|
+
async function executeToggleAction(context, isButtonEnabled, controlType, propertyPath) {
|
|
11
|
+
const controls = context.controlIndex[controlType] ?? [];
|
|
12
|
+
const control = controls[0];
|
|
13
|
+
if (control) {
|
|
14
|
+
const modifiedControl = getControlById(control.controlId);
|
|
15
|
+
if (!modifiedControl) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
const {
|
|
19
|
+
flexSettings
|
|
20
|
+
} = context;
|
|
21
|
+
const parent = modifiedControl.getParent();
|
|
22
|
+
if (!parent) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
const modifiedValue = {
|
|
26
|
+
reference: getReference(modifiedControl),
|
|
27
|
+
appComponent: getV4AppComponent(modifiedControl),
|
|
28
|
+
changeType: 'appdescr_fe_changePageConfiguration',
|
|
29
|
+
parameters: {
|
|
30
|
+
page: getPageName(parent),
|
|
31
|
+
entityPropertyChange: {
|
|
32
|
+
propertyPath: propertyPath,
|
|
33
|
+
propertyValue: !isButtonEnabled,
|
|
34
|
+
operation: 'UPSERT'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const command = await CommandFactory.getCommandFor(modifiedControl, 'appDescriptor', modifiedValue, null, flexSettings);
|
|
39
|
+
return [command];
|
|
40
|
+
}
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
const PATTERN_SUFFIX = ':?query:';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Generates the pattern for a new route based on the input.
|
|
47
|
+
*
|
|
48
|
+
* @param sourceRoutePattern source page route pattern
|
|
49
|
+
* @param navProperty navigation property name (used to build nav pattern for nested OP )
|
|
50
|
+
* @param targetEntitySet navigation target entity set
|
|
51
|
+
* @returns the generated pattern as string
|
|
52
|
+
*/
|
|
53
|
+
function generateRoutePattern(sourceRoutePattern, navProperty, targetEntitySet) {
|
|
54
|
+
const parts = [];
|
|
55
|
+
const basePattern = sourceRoutePattern.replace(PATTERN_SUFFIX, '');
|
|
56
|
+
if (basePattern) {
|
|
57
|
+
parts.push(basePattern);
|
|
58
|
+
parts.push('/');
|
|
59
|
+
parts.push(navProperty);
|
|
60
|
+
} else {
|
|
61
|
+
parts.push(targetEntitySet);
|
|
62
|
+
}
|
|
63
|
+
parts.push(`({${targetEntitySet}Key})`);
|
|
64
|
+
parts.push(PATTERN_SUFFIX);
|
|
65
|
+
return parts.join('');
|
|
66
|
+
}
|
|
67
|
+
var __exports = {
|
|
68
|
+
__esModule: true
|
|
69
|
+
};
|
|
70
|
+
__exports.executeToggleAction = executeToggleAction;
|
|
71
|
+
__exports.generateRoutePattern = generateRoutePattern;
|
|
72
|
+
return __exports;
|
|
73
73
|
});
|
|
74
74
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define([], function () {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
function __ui5_require_async(path) {
|
|
7
|
-
return new Promise(function (resolve, reject) {
|
|
8
|
-
sap.ui.require([path], function (module) {
|
|
9
|
-
if (!(module && module.__esModule)) {
|
|
10
|
-
module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
|
|
11
|
-
default: module
|
|
12
|
-
} : module;
|
|
13
|
-
Object.defineProperty(module, "__esModule", {
|
|
14
|
-
value: true
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
resolve(module);
|
|
18
|
-
}, function (err) {
|
|
19
|
-
reject(err);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Loads the appropriate Quick Action registries for the given application type.
|
|
25
|
-
*
|
|
26
|
-
* @param appType - Application type.
|
|
27
|
-
* @returns Quick Action registries.
|
|
28
|
-
*/
|
|
29
|
-
async function loadDefinitions(appType) {
|
|
30
|
-
if (appType === 'fe-v2') {
|
|
31
|
-
const FEV2QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v2/registry')).default;
|
|
32
|
-
return [new FEV2QuickActionRegistry()];
|
|
33
|
-
}
|
|
34
|
-
if (appType === 'fe-v4') {
|
|
35
|
-
const FEV4QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v4/registry')).default;
|
|
36
|
-
return [new FEV4QuickActionRegistry()];
|
|
37
|
-
}
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
var __exports = {
|
|
41
|
-
__esModule: true
|
|
42
|
-
};
|
|
43
|
-
__exports.loadDefinitions = loadDefinitions;
|
|
44
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define([], function () {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
function __ui5_require_async(path) {
|
|
7
|
+
return new Promise(function (resolve, reject) {
|
|
8
|
+
sap.ui.require([path], function (module) {
|
|
9
|
+
if (!(module && module.__esModule)) {
|
|
10
|
+
module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
|
|
11
|
+
default: module
|
|
12
|
+
} : module;
|
|
13
|
+
Object.defineProperty(module, "__esModule", {
|
|
14
|
+
value: true
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
resolve(module);
|
|
18
|
+
}, function (err) {
|
|
19
|
+
reject(err);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Loads the appropriate Quick Action registries for the given application type.
|
|
25
|
+
*
|
|
26
|
+
* @param appType - Application type.
|
|
27
|
+
* @returns Quick Action registries.
|
|
28
|
+
*/
|
|
29
|
+
async function loadDefinitions(appType) {
|
|
30
|
+
if (appType === 'fe-v2') {
|
|
31
|
+
const FEV2QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v2/registry')).default;
|
|
32
|
+
return [new FEV2QuickActionRegistry()];
|
|
33
|
+
}
|
|
34
|
+
if (appType === 'fe-v4') {
|
|
35
|
+
const FEV4QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v4/registry')).default;
|
|
36
|
+
return [new FEV4QuickActionRegistry()];
|
|
37
|
+
}
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
var __exports = {
|
|
41
|
+
__esModule: true
|
|
42
|
+
};
|
|
43
|
+
__exports.loadDefinitions = loadDefinitions;
|
|
44
|
+
return __exports;
|
|
45
45
|
});
|
|
46
46
|
//# sourceMappingURL=load.js.map
|