@sap-ux/preview-middleware 0.16.155 → 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.
Files changed (79) hide show
  1. package/dist/client/adp/api-handler.js +142 -142
  2. package/dist/client/adp/command-executor.js +75 -75
  3. package/dist/client/adp/control-utils.js +44 -44
  4. package/dist/client/adp/controllers/AddFragment.controller.js +5 -5
  5. package/dist/client/adp/controllers/AddFragment.controller.ts +1 -1
  6. package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
  7. package/dist/client/adp/controllers/ControllerExtension.controller.js +213 -213
  8. package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
  9. package/dist/client/adp/init-dialogs.js +157 -157
  10. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +54 -54
  11. package/dist/client/adp/quick-actions/common/create-page-action.js +49 -49
  12. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +35 -35
  13. package/dist/client/adp/quick-actions/common/op-add-header-field.js +47 -47
  14. package/dist/client/adp/quick-actions/common/utils.js +20 -0
  15. package/dist/client/adp/quick-actions/common/utils.ts +7 -0
  16. package/dist/client/adp/quick-actions/control-types.js +23 -0
  17. package/dist/client/adp/quick-actions/control-types.ts +6 -0
  18. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +100 -100
  19. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +69 -69
  20. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +95 -95
  21. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +2 -8
  22. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +56 -56
  23. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +67 -67
  24. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +1 -1
  25. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +57 -57
  26. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
  27. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +99 -0
  28. package/dist/client/adp/quick-actions/fe-v2/registry.js +72 -71
  29. package/dist/client/adp/quick-actions/fe-v2/registry.ts +3 -1
  30. package/dist/client/adp/quick-actions/fe-v2/utils.js +95 -86
  31. package/dist/client/adp/quick-actions/fe-v2/utils.ts +14 -4
  32. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +48 -47
  33. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +2 -1
  34. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +46 -45
  35. package/dist/client/adp/quick-actions/fe-v4/create-table-action.ts +2 -1
  36. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +45 -45
  37. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.ts +3 -7
  38. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +55 -55
  39. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
  40. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +4 -4
  41. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +52 -52
  42. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
  43. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +85 -0
  44. package/dist/client/adp/quick-actions/fe-v4/registry.js +56 -55
  45. package/dist/client/adp/quick-actions/fe-v4/registry.ts +3 -1
  46. package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.js +3 -3
  47. package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.ts +7 -4
  48. package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
  49. package/dist/client/adp/quick-actions/load.js +44 -44
  50. package/dist/client/adp/quick-actions/table-quick-action-base.js +18 -21
  51. package/dist/client/adp/quick-actions/table-quick-action-base.ts +29 -14
  52. package/dist/client/adp/utils.js +160 -160
  53. package/dist/client/cpe/changes/index.js +10 -10
  54. package/dist/client/cpe/changes/validator.js +34 -34
  55. package/dist/client/cpe/documentation.js +164 -164
  56. package/dist/client/cpe/feature-service.js +36 -36
  57. package/dist/client/cpe/logger.js +30 -30
  58. package/dist/client/cpe/outline/editable.js +37 -37
  59. package/dist/client/cpe/outline/nodes.js +217 -217
  60. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  61. package/dist/client/cpe/quick-actions/registry.js +143 -143
  62. package/dist/client/cpe/quick-actions/utils.js +92 -92
  63. package/dist/client/cpe/types.js +4 -4
  64. package/dist/client/cpe/ui5-utils.js +33 -33
  65. package/dist/client/cpe/utils.js +138 -138
  66. package/dist/client/flp/WorkspaceConnector.js +86 -86
  67. package/dist/client/flp/common.js +28 -28
  68. package/dist/client/flp/enableFakeConnector.js +83 -83
  69. package/dist/client/flp/initConnectors.js +30 -30
  70. package/dist/client/flp/initRta.js +178 -178
  71. package/dist/client/i18n.js +56 -56
  72. package/dist/client/messagebundle.properties +4 -3
  73. package/dist/client/utils/application.js +32 -32
  74. package/dist/client/utils/core.js +68 -68
  75. package/dist/client/utils/error.js +19 -19
  76. package/dist/client/utils/fe-v4.js +118 -114
  77. package/dist/client/utils/fe-v4.ts +19 -11
  78. package/dist/client/utils/version.js +102 -102
  79. package/package.json +3 -3
@@ -1,59 +1,59 @@
1
- "use strict";
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) {
4
- "use strict";
5
-
6
- const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
7
- const getControlById = _____utils_core["getControlById"];
8
- const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
9
- const ENABLE_CLEAR_FILTER_BAR_TYPE = 'enable-clear-filter-bar';
10
- const PROPERTY_NAME = 'showClearOnFB';
11
- const CONTROL_TYPE = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
12
-
13
- /**
14
- * Quick Action for toggling the visibility of "clear filter bar" button in List Report page.
15
- */
16
- class ToggleClearFilterBarQuickAction extends SimpleQuickActionDefinitionBase {
17
- constructor(context) {
18
- super(ENABLE_CLEAR_FILTER_BAR_TYPE, [], '', context);
19
- }
20
- isClearButtonEnabled = false;
21
- initialize() {
22
- const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
23
- for (const control of controls) {
24
- const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
25
- const modifiedControl = getControlById(control.controlId);
26
- if (isActionApplicable && modifiedControl) {
27
- this.isClearButtonEnabled = modifiedControl.getShowClearOnFB();
28
- this.control = modifiedControl;
29
- }
30
- }
31
- }
32
- get textKey() {
33
- return this.isClearButtonEnabled ? 'V2_QUICK_ACTION_LR_DISABLE_CLEAR_FILTER_BAR' : 'V2_QUICK_ACTION_LR_ENABLE_CLEAR_FILTER_BAR';
34
- }
35
- async execute() {
36
- if (this.control) {
37
- const {
38
- flexSettings
39
- } = this.context;
40
- const modifiedValue = {
41
- generator: flexSettings.generator,
42
- propertyName: PROPERTY_NAME,
43
- newValue: !this.isClearButtonEnabled
44
- };
45
- const command = await CommandFactory.getCommandFor(this.control, 'Property', modifiedValue, null, flexSettings);
46
- this.isClearButtonEnabled = !this.isClearButtonEnabled;
47
- return [command];
48
- }
49
- return [];
50
- }
51
- }
52
- var __exports = {
53
- __esModule: true
54
- };
55
- __exports.ENABLE_CLEAR_FILTER_BAR_TYPE = ENABLE_CLEAR_FILTER_BAR_TYPE;
56
- __exports.ToggleClearFilterBarQuickAction = ToggleClearFilterBarQuickAction;
57
- return __exports;
1
+ "use strict";
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) {
4
+ "use strict";
5
+
6
+ const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
7
+ const getControlById = _____utils_core["getControlById"];
8
+ const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
9
+ const ENABLE_CLEAR_FILTER_BAR_TYPE = 'enable-clear-filter-bar';
10
+ const PROPERTY_NAME = 'showClearOnFB';
11
+ const CONTROL_TYPE = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
12
+
13
+ /**
14
+ * Quick Action for toggling the visibility of "clear filter bar" button in List Report page.
15
+ */
16
+ class ToggleClearFilterBarQuickAction extends SimpleQuickActionDefinitionBase {
17
+ constructor(context) {
18
+ super(ENABLE_CLEAR_FILTER_BAR_TYPE, [], '', context);
19
+ }
20
+ isClearButtonEnabled = false;
21
+ initialize() {
22
+ const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
23
+ for (const control of controls) {
24
+ const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
25
+ const modifiedControl = getControlById(control.controlId);
26
+ if (isActionApplicable && modifiedControl) {
27
+ this.isClearButtonEnabled = modifiedControl.getShowClearOnFB();
28
+ this.control = modifiedControl;
29
+ }
30
+ }
31
+ }
32
+ get textKey() {
33
+ return this.isClearButtonEnabled ? 'V2_QUICK_ACTION_LR_DISABLE_CLEAR_FILTER_BAR' : 'V2_QUICK_ACTION_LR_ENABLE_CLEAR_FILTER_BAR';
34
+ }
35
+ async execute() {
36
+ if (this.control) {
37
+ const {
38
+ flexSettings
39
+ } = this.context;
40
+ const modifiedValue = {
41
+ generator: flexSettings.generator,
42
+ propertyName: PROPERTY_NAME,
43
+ newValue: !this.isClearButtonEnabled
44
+ };
45
+ const command = await CommandFactory.getCommandFor(this.control, 'Property', modifiedValue, null, flexSettings);
46
+ this.isClearButtonEnabled = !this.isClearButtonEnabled;
47
+ return [command];
48
+ }
49
+ return [];
50
+ }
51
+ }
52
+ var __exports = {
53
+ __esModule: true
54
+ };
55
+ __exports.ENABLE_CLEAR_FILTER_BAR_TYPE = ENABLE_CLEAR_FILTER_BAR_TYPE;
56
+ __exports.ToggleClearFilterBarQuickAction = ToggleClearFilterBarQuickAction;
57
+ return __exports;
58
58
  });
59
59
  //# sourceMappingURL=lr-toggle-clear-filter-bar.js.map
@@ -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,73 +1,74 @@
1
- "use strict";
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) {
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 AddTableActionQuickAction = ___fe_v2_create_table_action["AddTableActionQuickAction"];
13
- const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
14
- const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
15
- const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
16
- const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
17
- const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
18
- const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
19
- const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
20
- /**
21
- * Quick Action provider for SAP Fiori Elements V2 applications.
22
- */
23
- class FEV2QuickActionRegistry extends QuickActionDefinitionRegistry {
24
- PAGE_NAME_MAP = {
25
- [LIST_REPORT_TYPE]: 'listReport',
26
- [OBJECT_PAGE_TYPE]: 'objectPage',
27
- [ANALYTICAL_LIST_PAGE_TYPE]: 'analyticalListPage'
28
- };
29
- getDefinitions(context) {
30
- const activePages = this.getActivePageContent(context.controlIndex);
31
- const definitionGroups = [];
32
- for (let index = 0; index < activePages.length; index++) {
33
- const {
34
- name,
35
- view
36
- } = activePages[index];
37
- if (name === 'listReport') {
38
- definitionGroups.push({
39
- title: 'LIST REPORT',
40
- definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction],
41
- view,
42
- key: name + index
43
- });
44
- } else if (name === 'objectPage') {
45
- definitionGroups.push({
46
- title: 'OBJECT PAGE',
47
- definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction],
48
- view,
49
- key: name + index
50
- });
51
- } else if (name === 'analyticalListPage') {
52
- definitionGroups.push({
53
- title: 'ANALYTICAL LIST PAGE',
54
- definitions: [AddControllerToPageQuickAction, ChangeTableColumnsQuickAction, AddTableCustomColumnQuickAction],
55
- view,
56
- key: name + index
57
- });
58
- }
59
- }
60
- return definitionGroups;
61
- }
62
- getComponentContainerFromPage(page) {
63
- // in ui5 version 1.71 there is no XMLView wrapper around ComponentContainer
64
- const componentContainer = page instanceof XMLView ? page.getContent()[0] : page;
65
- if (componentContainer instanceof ComponentContainer) {
66
- return componentContainer;
67
- }
68
- return undefined;
69
- }
70
- }
71
- return FEV2QuickActionRegistry;
1
+ "use strict";
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", "./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
+ "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 AddTableActionQuickAction = ___fe_v2_create_table_action["AddTableActionQuickAction"];
13
+ const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
14
+ const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
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 OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
19
+ const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
20
+ const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
21
+ /**
22
+ * Quick Action provider for SAP Fiori Elements V2 applications.
23
+ */
24
+ class FEV2QuickActionRegistry extends QuickActionDefinitionRegistry {
25
+ PAGE_NAME_MAP = {
26
+ [LIST_REPORT_TYPE]: 'listReport',
27
+ [OBJECT_PAGE_TYPE]: 'objectPage',
28
+ [ANALYTICAL_LIST_PAGE_TYPE]: 'analyticalListPage'
29
+ };
30
+ getDefinitions(context) {
31
+ const activePages = this.getActivePageContent(context.controlIndex);
32
+ const definitionGroups = [];
33
+ for (let index = 0; index < activePages.length; index++) {
34
+ const {
35
+ name,
36
+ view
37
+ } = activePages[index];
38
+ if (name === 'listReport') {
39
+ definitionGroups.push({
40
+ title: 'LIST REPORT',
41
+ definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction],
42
+ view,
43
+ key: name + index
44
+ });
45
+ } else if (name === 'objectPage') {
46
+ definitionGroups.push({
47
+ title: 'OBJECT PAGE',
48
+ definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction],
49
+ view,
50
+ key: name + index
51
+ });
52
+ } else if (name === 'analyticalListPage') {
53
+ definitionGroups.push({
54
+ title: 'ANALYTICAL LIST PAGE',
55
+ definitions: [AddControllerToPageQuickAction, ChangeTableColumnsQuickAction, AddTableCustomColumnQuickAction],
56
+ view,
57
+ key: name + index
58
+ });
59
+ }
60
+ }
61
+ return definitionGroups;
62
+ }
63
+ getComponentContainerFromPage(page) {
64
+ // in ui5 version 1.71 there is no XMLView wrapper around ComponentContainer
65
+ const componentContainer = page instanceof XMLView ? page.getContent()[0] : page;
66
+ if (componentContainer instanceof ComponentContainer) {
67
+ return componentContainer;
68
+ }
69
+ return undefined;
70
+ }
71
+ }
72
+ return FEV2QuickActionRegistry;
72
73
  });
73
74
  //# sourceMappingURL=registry.js.map
@@ -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