@sap-ux/preview-middleware 0.17.22 → 0.17.24

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/base/flp.d.ts +95 -1
  3. package/dist/base/flp.js +277 -159
  4. package/dist/client/adp/api-handler.js +153 -153
  5. package/dist/client/adp/command-executor.js +75 -75
  6. package/dist/client/adp/control-utils.js +44 -44
  7. package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
  8. package/dist/client/adp/controllers/ControllerExtension.controller.js +213 -213
  9. package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
  10. package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
  11. package/dist/client/adp/dialog-factory.js +122 -122
  12. package/dist/client/adp/init-dialogs.js +100 -100
  13. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +55 -55
  14. package/dist/client/adp/quick-actions/common/create-page-action.js +50 -50
  15. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +36 -36
  16. package/dist/client/adp/quick-actions/common/op-add-header-field.js +48 -48
  17. package/dist/client/adp/quick-actions/common/utils.js +18 -18
  18. package/dist/client/adp/quick-actions/control-types.js +21 -21
  19. package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
  20. package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
  21. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
  22. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +70 -70
  23. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +96 -96
  24. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +78 -78
  25. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
  26. package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +69 -69
  27. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +58 -58
  28. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
  29. package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +81 -81
  30. package/dist/client/adp/quick-actions/fe-v2/registry.js +75 -75
  31. package/dist/client/adp/quick-actions/fe-v2/utils.js +95 -95
  32. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +73 -73
  33. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +49 -49
  34. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +46 -46
  35. package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +81 -81
  36. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +55 -55
  37. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
  38. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +52 -52
  39. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
  40. package/dist/client/adp/quick-actions/fe-v4/registry.js +58 -58
  41. package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
  42. package/dist/client/adp/quick-actions/load.js +44 -44
  43. package/dist/client/adp/quick-actions/quick-action-base.js +53 -53
  44. package/dist/client/adp/utils.js +160 -160
  45. package/dist/client/cpe/changes/index.js +10 -10
  46. package/dist/client/cpe/changes/validator.js +39 -39
  47. package/dist/client/cpe/documentation.js +164 -164
  48. package/dist/client/cpe/feature-service.js +36 -36
  49. package/dist/client/cpe/logger.js +30 -30
  50. package/dist/client/cpe/outline/editable.js +37 -37
  51. package/dist/client/cpe/outline/nodes.js +222 -222
  52. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  53. package/dist/client/cpe/quick-actions/registry.js +143 -143
  54. package/dist/client/cpe/quick-actions/utils.js +92 -92
  55. package/dist/client/cpe/types.js +4 -4
  56. package/dist/client/cpe/ui5-utils.js +33 -33
  57. package/dist/client/cpe/utils.js +138 -138
  58. package/dist/client/flp/WorkspaceConnector.js +86 -86
  59. package/dist/client/flp/common.js +28 -28
  60. package/dist/client/flp/enableFakeConnector.js +83 -83
  61. package/dist/client/flp/initConnectors.js +30 -30
  62. package/dist/client/flp/initRta.js +178 -178
  63. package/dist/client/i18n.js +56 -56
  64. package/dist/client/utils/application.js +32 -32
  65. package/dist/client/utils/core.js +68 -68
  66. package/dist/client/utils/error.js +19 -19
  67. package/dist/client/utils/fe-v4.js +118 -118
  68. package/dist/client/utils/version.js +102 -102
  69. package/package.json +4 -4
@@ -1,95 +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;
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
94
  });
95
95
  //# sourceMappingURL=op-enable-empty-row-mode.js.map
@@ -1,83 +1,83 @@
1
- "use strict";
2
-
3
- sap.ui.define(["../table-quick-action-base", "../control-types", "./utils", "./create-table-custom-column"], function (___table_quick_action_base, ___control_types, ___utils, ___create_table_custom_column) {
4
- "use strict";
5
-
6
- const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
7
- const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
8
- const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
9
- const prepareManifestChange = ___utils["prepareManifestChange"];
10
- const preprocessActionExecution = ___create_table_custom_column["preprocessActionExecution"];
11
- const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
12
- const CONTROL_TYPES = [SMART_TABLE_TYPE];
13
- const OBJECT_PAGE_COMPONENT_NAME = 'sap.suite.ui.generic.template.ObjectPage';
14
- class EnableObjectPageVariantManagementQuickAction extends TableQuickActionDefinitionBase {
15
- forceRefreshAfterExecution = true;
16
- constructor(context) {
17
- super(ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLES_AND_VARIANT_MANAGEMENT', context);
18
- }
19
- async initialize() {
20
- if (!(await areManifestChangesSupported(this.context.manifest))) {
21
- this.isApplicable = false;
22
- return;
23
- }
24
- await super.initialize();
25
- const processChild = (child, mapKey) => {
26
- const alreadyEnabledTooltip = this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_TABLE_CONTROLS_IS_ALREADY_ENABLED', [child.label]);
27
- const table = this.tableMap[mapKey]?.table;
28
- if (table) {
29
- const id = table.getId();
30
- if (typeof id !== 'string') {
31
- throw new Error('Could not retrieve configuration property because control id is not valid!');
32
- }
33
- let value = this.context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
34
- if (value === undefined) {
35
- value = !!table.getVariantManagement();
36
- }
37
- const hasItems = !!table.getTable().getBindingInfo('items');
38
- if (value || !hasItems) {
39
- child.enabled = false;
40
- child.tooltip = hasItems ? alreadyEnabledTooltip : undefined;
41
- }
42
- }
43
- child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
44
- };
45
- this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
46
- }
47
- async execute(path) {
48
- const {
49
- table,
50
- sectionInfo,
51
- iconTabBarFilterKey
52
- } = this.tableMap[path];
53
- if (!table) {
54
- throw Error('Internal error. Table element not found');
55
- }
56
- const entitySet = this.context.view.getParent()?.getProperty('entitySet');
57
- if (!entitySet) {
58
- throw Error('Internal error. Object Page entity set not found');
59
- }
60
- preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
61
- this.selectOverlay(table);
62
- const commands = await prepareManifestChange(this.context, `component/settings/sections/${this.getSectionID(table)}/tableSettings`, table, OBJECT_PAGE_COMPONENT_NAME, entitySet, {
63
- 'variantManagement': true
64
- });
65
- return commands ?? [];
66
- }
67
- getSectionID(table) {
68
- let lineItem = 'com.sap.vocabularies.UI.v1.LineItem';
69
- if (table.data().lineItemQualifier) {
70
- lineItem = `${lineItem}#${table.data().lineItemQualifier}`;
71
- }
72
- const navSegment = table.getTable().getBindingInfo('items').path ?? '';
73
- return `${navSegment ? navSegment + '::' : ''}${lineItem}`;
74
- }
75
- }
76
- var __exports = {
77
- __esModule: true
78
- };
79
- __exports.ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS;
80
- __exports.EnableObjectPageVariantManagementQuickAction = EnableObjectPageVariantManagementQuickAction;
81
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["../table-quick-action-base", "../control-types", "./utils", "./create-table-custom-column"], function (___table_quick_action_base, ___control_types, ___utils, ___create_table_custom_column) {
4
+ "use strict";
5
+
6
+ const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
7
+ const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
8
+ const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
9
+ const prepareManifestChange = ___utils["prepareManifestChange"];
10
+ const preprocessActionExecution = ___create_table_custom_column["preprocessActionExecution"];
11
+ const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
12
+ const CONTROL_TYPES = [SMART_TABLE_TYPE];
13
+ const OBJECT_PAGE_COMPONENT_NAME = 'sap.suite.ui.generic.template.ObjectPage';
14
+ class EnableObjectPageVariantManagementQuickAction extends TableQuickActionDefinitionBase {
15
+ forceRefreshAfterExecution = true;
16
+ constructor(context) {
17
+ super(ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLES_AND_VARIANT_MANAGEMENT', context);
18
+ }
19
+ async initialize() {
20
+ if (!(await areManifestChangesSupported(this.context.manifest))) {
21
+ this.isApplicable = false;
22
+ return;
23
+ }
24
+ await super.initialize();
25
+ const processChild = (child, mapKey) => {
26
+ const alreadyEnabledTooltip = this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_TABLE_CONTROLS_IS_ALREADY_ENABLED', [child.label]);
27
+ const table = this.tableMap[mapKey]?.table;
28
+ if (table) {
29
+ const id = table.getId();
30
+ if (typeof id !== 'string') {
31
+ throw new Error('Could not retrieve configuration property because control id is not valid!');
32
+ }
33
+ let value = this.context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
34
+ if (value === undefined) {
35
+ value = !!table.getVariantManagement();
36
+ }
37
+ const hasItems = !!table.getTable().getBindingInfo('items');
38
+ if (value || !hasItems) {
39
+ child.enabled = false;
40
+ child.tooltip = hasItems ? alreadyEnabledTooltip : undefined;
41
+ }
42
+ }
43
+ child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
44
+ };
45
+ this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
46
+ }
47
+ async execute(path) {
48
+ const {
49
+ table,
50
+ sectionInfo,
51
+ iconTabBarFilterKey
52
+ } = this.tableMap[path];
53
+ if (!table) {
54
+ throw Error('Internal error. Table element not found');
55
+ }
56
+ const entitySet = this.context.view.getParent()?.getProperty('entitySet');
57
+ if (!entitySet) {
58
+ throw Error('Internal error. Object Page entity set not found');
59
+ }
60
+ preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
61
+ this.selectOverlay(table);
62
+ const commands = await prepareManifestChange(this.context, `component/settings/sections/${this.getSectionID(table)}/tableSettings`, table, OBJECT_PAGE_COMPONENT_NAME, entitySet, {
63
+ 'variantManagement': true
64
+ });
65
+ return commands ?? [];
66
+ }
67
+ getSectionID(table) {
68
+ let lineItem = 'com.sap.vocabularies.UI.v1.LineItem';
69
+ if (table.data().lineItemQualifier) {
70
+ lineItem = `${lineItem}#${table.data().lineItemQualifier}`;
71
+ }
72
+ const navSegment = table.getTable().getBindingInfo('items').path ?? '';
73
+ return `${navSegment ? navSegment + '::' : ''}${lineItem}`;
74
+ }
75
+ }
76
+ var __exports = {
77
+ __esModule: true
78
+ };
79
+ __exports.ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS;
80
+ __exports.EnableObjectPageVariantManagementQuickAction = EnableObjectPageVariantManagementQuickAction;
81
+ return __exports;
82
82
  });
83
83
  //# sourceMappingURL=op-enable-variant-management.js.map
@@ -1,77 +1,77 @@
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", "../common/add-new-annotation-file", "./op-enable-variant-management", "./lr-enable-variant-management"], 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, ___common_add_new_annotation_file, ___op_enable_variant_management, ___lr_enable_variant_management) {
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 AddNewAnnotationFile = ___common_add_new_annotation_file["AddNewAnnotationFile"];
19
- const EnableObjectPageVariantManagementQuickAction = ___op_enable_variant_management["EnableObjectPageVariantManagementQuickAction"];
20
- const EnableListReportVariantManagementQuickAction = ___lr_enable_variant_management["EnableListReportVariantManagementQuickAction"];
21
- const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
22
- const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
23
- const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
24
- /**
25
- * Quick Action provider for SAP Fiori Elements V2 applications.
26
- */
27
- class FEV2QuickActionRegistry extends QuickActionDefinitionRegistry {
28
- PAGE_NAME_MAP = {
29
- [LIST_REPORT_TYPE]: 'listReport',
30
- [OBJECT_PAGE_TYPE]: 'objectPage',
31
- [ANALYTICAL_LIST_PAGE_TYPE]: 'analyticalListPage'
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, EnableListReportVariantManagementQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile],
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, EnableObjectPageVariantManagementQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction, AddNewAnnotationFile],
52
- view,
53
- key: name + index
54
- });
55
- } else if (name === 'analyticalListPage') {
56
- definitionGroups.push({
57
- title: 'ANALYTICAL LIST PAGE',
58
- definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, EnableListReportVariantManagementQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile],
59
- view,
60
- key: name + index
61
- });
62
- }
63
- }
64
- return definitionGroups;
65
- }
66
- getComponentContainerFromPage(page) {
67
- // in ui5 version 1.71 there is no XMLView wrapper around ComponentContainer
68
- const componentContainer = page instanceof XMLView ? page.getContent()[0] : page;
69
- if (componentContainer instanceof ComponentContainer) {
70
- return componentContainer;
71
- }
72
- return undefined;
73
- }
74
- }
75
- 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", "../common/add-new-annotation-file", "./op-enable-variant-management", "./lr-enable-variant-management"], 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, ___common_add_new_annotation_file, ___op_enable_variant_management, ___lr_enable_variant_management) {
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 AddNewAnnotationFile = ___common_add_new_annotation_file["AddNewAnnotationFile"];
19
+ const EnableObjectPageVariantManagementQuickAction = ___op_enable_variant_management["EnableObjectPageVariantManagementQuickAction"];
20
+ const EnableListReportVariantManagementQuickAction = ___lr_enable_variant_management["EnableListReportVariantManagementQuickAction"];
21
+ const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
22
+ const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
23
+ const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
24
+ /**
25
+ * Quick Action provider for SAP Fiori Elements V2 applications.
26
+ */
27
+ class FEV2QuickActionRegistry extends QuickActionDefinitionRegistry {
28
+ PAGE_NAME_MAP = {
29
+ [LIST_REPORT_TYPE]: 'listReport',
30
+ [OBJECT_PAGE_TYPE]: 'objectPage',
31
+ [ANALYTICAL_LIST_PAGE_TYPE]: 'analyticalListPage'
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, EnableListReportVariantManagementQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile],
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, EnableObjectPageVariantManagementQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction, AddNewAnnotationFile],
52
+ view,
53
+ key: name + index
54
+ });
55
+ } else if (name === 'analyticalListPage') {
56
+ definitionGroups.push({
57
+ title: 'ANALYTICAL LIST PAGE',
58
+ definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, EnableListReportVariantManagementQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile],
59
+ view,
60
+ key: name + index
61
+ });
62
+ }
63
+ }
64
+ return definitionGroups;
65
+ }
66
+ getComponentContainerFromPage(page) {
67
+ // in ui5 version 1.71 there is no XMLView wrapper around ComponentContainer
68
+ const componentContainer = page instanceof XMLView ? page.getContent()[0] : page;
69
+ if (componentContainer instanceof ComponentContainer) {
70
+ return componentContainer;
71
+ }
72
+ return undefined;
73
+ }
74
+ }
75
+ return FEV2QuickActionRegistry;
76
76
  });
77
77
  //# sourceMappingURL=registry.js.map