@sap-ux/preview-middleware 0.18.20 → 0.18.23
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/api-handler.js +153 -153
- package/dist/client/adp/api-handler.ts +2 -2
- package/dist/client/adp/command-executor.js +75 -75
- package/dist/client/adp/control-utils.js +44 -44
- package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
- package/dist/client/adp/controllers/ControllerExtension.controller.js +209 -209
- package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
- package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
- package/dist/client/adp/dialog-factory.js +133 -133
- package/dist/client/adp/init-dialogs.js +107 -107
- package/dist/client/adp/quick-actions/common/add-controller-to-page.js +55 -55
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +24 -7
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +25 -7
- package/dist/client/adp/quick-actions/common/add-new-subpage.js +134 -138
- package/dist/client/adp/quick-actions/common/add-new-subpage.ts +0 -5
- package/dist/client/adp/quick-actions/common/create-page-action.js +51 -51
- package/dist/client/adp/quick-actions/common/op-add-custom-section.js +36 -36
- package/dist/client/adp/quick-actions/common/op-add-header-field.js +61 -61
- package/dist/client/adp/quick-actions/common/utils.js +18 -18
- package/dist/client/adp/quick-actions/control-types.js +21 -21
- 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/change-table-columns.js +101 -101
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +104 -104
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +96 -96
- 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 +76 -76
- package/dist/client/adp/quick-actions/fe-v2/utils.js +116 -116
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +73 -73
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +50 -50
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +46 -46
- 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 +82 -82
- 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 +58 -58
- package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
- package/dist/client/adp/quick-actions/load.js +44 -44
- package/dist/client/adp/quick-actions/quick-action-base.js +53 -53
- package/dist/client/adp/utils.js +160 -160
- 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 +222 -222
- 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 +138 -138
- package/dist/client/flp/WorkspaceConnector.js +86 -86
- package/dist/client/flp/common.js +28 -28
- package/dist/client/flp/enableFakeConnector.js +83 -83
- 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/application.js +32 -32
- package/dist/client/utils/core.js +68 -68
- package/dist/client/utils/error.js +19 -19
- package/dist/client/utils/fe-v2.js +56 -56
- package/dist/client/utils/fe-v4.js +141 -141
- package/dist/client/utils/version.js +104 -104
- package/package.json +6 -6
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["../../../cpe/quick-actions/utils", "../control-types", "./utils", "../simple-quick-action-base", "../../../utils/core"], function (_____cpe_quick_actions_utils, ___control_types, ___utils, ___simple_quick_action_base, _____utils_core) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
|
-
const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
|
|
8
|
-
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
9
|
-
const M_TABLE_TYPE = ___control_types["M_TABLE_TYPE"];
|
|
10
|
-
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
11
|
-
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
12
|
-
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
13
|
-
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
14
|
-
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
15
|
-
const isA = _____utils_core["isA"];
|
|
16
|
-
const COMPONENT = 'sap.suite.ui.generic.template.ListReport';
|
|
17
|
-
const ENABLE_TABLE_FILTERING = 'enable-table-filtering';
|
|
18
|
-
const CONTROL_TYPES = [SMART_TABLE_TYPE, M_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Quick Action for enabling table filtering using table personalization settings.
|
|
22
|
-
*/
|
|
23
|
-
class EnableTableFilteringQuickAction extends SimpleQuickActionDefinitionBase {
|
|
24
|
-
constructor(context) {
|
|
25
|
-
super(ENABLE_TABLE_FILTERING, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLE_FILTERING', context, [{
|
|
26
|
-
run: () => {
|
|
27
|
-
if (this.control) {
|
|
28
|
-
const id = this.control.getProperty('persistencyKey') ?? this.control.getId();
|
|
29
|
-
if (typeof id !== 'string') {
|
|
30
|
-
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
31
|
-
}
|
|
32
|
-
const value = this.context.changeService.getConfigurationPropertyValue(id, 'enableTableFilterInPageVariant');
|
|
33
|
-
const isFilterEnabled = value === undefined ? this.control.data('p13nDialogSettings')?.filter?.visible : value;
|
|
34
|
-
if (isFilterEnabled) {
|
|
35
|
-
return {
|
|
36
|
-
type: 'error',
|
|
37
|
-
message: this.context.resourceBundle.getText('TABLE_FILTERING_CHANGE_HAS_ALREADY_BEEN_MADE')
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
}]);
|
|
44
|
-
}
|
|
45
|
-
forceRefreshAfterExecution = true;
|
|
46
|
-
async initialize() {
|
|
47
|
-
const manifestChangesSupported = await areManifestChangesSupported(this.context.manifest);
|
|
48
|
-
if (!manifestChangesSupported) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
for (const table of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)) {
|
|
52
|
-
if (table) {
|
|
53
|
-
const isActionApplicable = pageHasControlId(this.context.view, table.getId());
|
|
54
|
-
if (isActionApplicable) {
|
|
55
|
-
this.control = table;
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async execute() {
|
|
62
|
-
if (!this.control) {
|
|
63
|
-
return [];
|
|
64
|
-
}
|
|
65
|
-
const entitySet = isA(SMART_TABLE_TYPE, this.control) ? this.control.getEntitySet() : undefined;
|
|
66
|
-
const command = await prepareManifestChange(this.context, 'component/settings', this.control, COMPONENT, entitySet, {
|
|
67
|
-
enableTableFilterInPageVariant: !this.isDisabled
|
|
68
|
-
});
|
|
69
|
-
return command;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
var __exports = {
|
|
73
|
-
__esModule: true
|
|
74
|
-
};
|
|
75
|
-
__exports.ENABLE_TABLE_FILTERING = ENABLE_TABLE_FILTERING;
|
|
76
|
-
__exports.EnableTableFilteringQuickAction = EnableTableFilteringQuickAction;
|
|
77
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../cpe/quick-actions/utils", "../control-types", "./utils", "../simple-quick-action-base", "../../../utils/core"], function (_____cpe_quick_actions_utils, ___control_types, ___utils, ___simple_quick_action_base, _____utils_core) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
|
+
const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
|
|
8
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
9
|
+
const M_TABLE_TYPE = ___control_types["M_TABLE_TYPE"];
|
|
10
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
11
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
12
|
+
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
13
|
+
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
14
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
15
|
+
const isA = _____utils_core["isA"];
|
|
16
|
+
const COMPONENT = 'sap.suite.ui.generic.template.ListReport';
|
|
17
|
+
const ENABLE_TABLE_FILTERING = 'enable-table-filtering';
|
|
18
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE, M_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
22
|
+
*/
|
|
23
|
+
class EnableTableFilteringQuickAction extends SimpleQuickActionDefinitionBase {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
super(ENABLE_TABLE_FILTERING, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLE_FILTERING', context, [{
|
|
26
|
+
run: () => {
|
|
27
|
+
if (this.control) {
|
|
28
|
+
const id = this.control.getProperty('persistencyKey') ?? this.control.getId();
|
|
29
|
+
if (typeof id !== 'string') {
|
|
30
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
31
|
+
}
|
|
32
|
+
const value = this.context.changeService.getConfigurationPropertyValue(id, 'enableTableFilterInPageVariant');
|
|
33
|
+
const isFilterEnabled = value === undefined ? this.control.data('p13nDialogSettings')?.filter?.visible : value;
|
|
34
|
+
if (isFilterEnabled) {
|
|
35
|
+
return {
|
|
36
|
+
type: 'error',
|
|
37
|
+
message: this.context.resourceBundle.getText('TABLE_FILTERING_CHANGE_HAS_ALREADY_BEEN_MADE')
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
}]);
|
|
44
|
+
}
|
|
45
|
+
forceRefreshAfterExecution = true;
|
|
46
|
+
async initialize() {
|
|
47
|
+
const manifestChangesSupported = await areManifestChangesSupported(this.context.manifest);
|
|
48
|
+
if (!manifestChangesSupported) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
for (const table of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)) {
|
|
52
|
+
if (table) {
|
|
53
|
+
const isActionApplicable = pageHasControlId(this.context.view, table.getId());
|
|
54
|
+
if (isActionApplicable) {
|
|
55
|
+
this.control = table;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async execute() {
|
|
62
|
+
if (!this.control) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const entitySet = isA(SMART_TABLE_TYPE, this.control) ? this.control.getEntitySet() : undefined;
|
|
66
|
+
const command = await prepareManifestChange(this.context, 'component/settings', this.control, COMPONENT, entitySet, {
|
|
67
|
+
enableTableFilterInPageVariant: !this.isDisabled
|
|
68
|
+
});
|
|
69
|
+
return command;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
var __exports = {
|
|
73
|
+
__esModule: true
|
|
74
|
+
};
|
|
75
|
+
__exports.ENABLE_TABLE_FILTERING = ENABLE_TABLE_FILTERING;
|
|
76
|
+
__exports.EnableTableFilteringQuickAction = EnableTableFilteringQuickAction;
|
|
77
|
+
return __exports;
|
|
78
78
|
});
|
|
79
79
|
//# sourceMappingURL=lr-enable-table-filtering.js.map
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["./utils", "../simple-quick-action-base", "sap/ui/core/Component"], function (___utils, ___simple_quick_action_base, Component) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
7
|
-
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
8
|
-
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
9
|
-
const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
|
|
10
|
-
const CONTROL_TYPES = ['sap.f.DynamicPage'];
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Quick Action for enabling table filtering using table personalization settings.
|
|
14
|
-
*/
|
|
15
|
-
class EnableListReportVariantManagementQuickAction extends SimpleQuickActionDefinitionBase {
|
|
16
|
-
isPageSmartVariantManagementEnabled = false;
|
|
17
|
-
forceRefreshAfterExecution = true;
|
|
18
|
-
constructor(context) {
|
|
19
|
-
super(ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLES_AND_CHARTS_VARIANT_MANAGEMENT', context, [{
|
|
20
|
-
run: () => {
|
|
21
|
-
if (this.ownerComponent) {
|
|
22
|
-
if (!this.isPageSmartVariantManagementEnabled) {
|
|
23
|
-
return {
|
|
24
|
-
type: 'error',
|
|
25
|
-
message: this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_PAGE_CONTROLS_IS_ALREADY_ENABLED')
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
}]);
|
|
32
|
-
}
|
|
33
|
-
async initialize() {
|
|
34
|
-
const manifestChangesSupported = await areManifestChangesSupported(this.context.manifest);
|
|
35
|
-
if (!manifestChangesSupported) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
await super.initialize();
|
|
39
|
-
if (this.control) {
|
|
40
|
-
this.ownerComponent = Component.getOwnerComponentFor(this.control);
|
|
41
|
-
if (!this.ownerComponent?.isA('sap.suite.ui.generic.template.ListReport.Component') && !this.ownerComponent?.isA('sap.suite.ui.generic.template.AnalyticalListPage.Component')) {
|
|
42
|
-
this.control = undefined;
|
|
43
|
-
} else {
|
|
44
|
-
const id = this.control.getId();
|
|
45
|
-
if (typeof id !== 'string') {
|
|
46
|
-
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
47
|
-
}
|
|
48
|
-
const value = this.context.changeService.getConfigurationPropertyValue(id, 'smartVariantManagement');
|
|
49
|
-
this.isPageSmartVariantManagementEnabled = value === undefined ? this.ownerComponent.getSmartVariantManagement() : value;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async execute() {
|
|
54
|
-
if (!this.control) {
|
|
55
|
-
return [];
|
|
56
|
-
}
|
|
57
|
-
const entitySet = this.ownerComponent.getEntitySet();
|
|
58
|
-
const command = await prepareManifestChange(this.context, 'component/settings', this.control, this.ownerComponent.getMetadata().getComponentName(), entitySet, {
|
|
59
|
-
smartVariantManagement: !this.isPageSmartVariantManagementEnabled
|
|
60
|
-
});
|
|
61
|
-
return command;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
var __exports = {
|
|
65
|
-
__esModule: true
|
|
66
|
-
};
|
|
67
|
-
__exports.ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS;
|
|
68
|
-
__exports.EnableListReportVariantManagementQuickAction = EnableListReportVariantManagementQuickAction;
|
|
69
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["./utils", "../simple-quick-action-base", "sap/ui/core/Component"], function (___utils, ___simple_quick_action_base, Component) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
7
|
+
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
8
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
9
|
+
const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
|
|
10
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage'];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
14
|
+
*/
|
|
15
|
+
class EnableListReportVariantManagementQuickAction extends SimpleQuickActionDefinitionBase {
|
|
16
|
+
isPageSmartVariantManagementEnabled = false;
|
|
17
|
+
forceRefreshAfterExecution = true;
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLES_AND_CHARTS_VARIANT_MANAGEMENT', context, [{
|
|
20
|
+
run: () => {
|
|
21
|
+
if (this.ownerComponent) {
|
|
22
|
+
if (!this.isPageSmartVariantManagementEnabled) {
|
|
23
|
+
return {
|
|
24
|
+
type: 'error',
|
|
25
|
+
message: this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_PAGE_CONTROLS_IS_ALREADY_ENABLED')
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}]);
|
|
32
|
+
}
|
|
33
|
+
async initialize() {
|
|
34
|
+
const manifestChangesSupported = await areManifestChangesSupported(this.context.manifest);
|
|
35
|
+
if (!manifestChangesSupported) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
await super.initialize();
|
|
39
|
+
if (this.control) {
|
|
40
|
+
this.ownerComponent = Component.getOwnerComponentFor(this.control);
|
|
41
|
+
if (!this.ownerComponent?.isA('sap.suite.ui.generic.template.ListReport.Component') && !this.ownerComponent?.isA('sap.suite.ui.generic.template.AnalyticalListPage.Component')) {
|
|
42
|
+
this.control = undefined;
|
|
43
|
+
} else {
|
|
44
|
+
const id = this.control.getId();
|
|
45
|
+
if (typeof id !== 'string') {
|
|
46
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
47
|
+
}
|
|
48
|
+
const value = this.context.changeService.getConfigurationPropertyValue(id, 'smartVariantManagement');
|
|
49
|
+
this.isPageSmartVariantManagementEnabled = value === undefined ? this.ownerComponent.getSmartVariantManagement() : value;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async execute() {
|
|
54
|
+
if (!this.control) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
const entitySet = this.ownerComponent.getEntitySet();
|
|
58
|
+
const command = await prepareManifestChange(this.context, 'component/settings', this.control, this.ownerComponent.getMetadata().getComponentName(), entitySet, {
|
|
59
|
+
smartVariantManagement: !this.isPageSmartVariantManagementEnabled
|
|
60
|
+
});
|
|
61
|
+
return command;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var __exports = {
|
|
65
|
+
__esModule: true
|
|
66
|
+
};
|
|
67
|
+
__exports.ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS;
|
|
68
|
+
__exports.EnableListReportVariantManagementQuickAction = EnableListReportVariantManagementQuickAction;
|
|
69
|
+
return __exports;
|
|
70
70
|
});
|
|
71
71
|
//# sourceMappingURL=lr-enable-variant-management.js.map
|
|
@@ -1,61 +1,61 @@
|
|
|
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_LR = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
12
|
-
const CONTROL_TYPE_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Quick Action for toggling the visibility of "clear filter bar" button in List Report page.
|
|
16
|
-
*/
|
|
17
|
-
class ToggleClearFilterBarQuickAction extends SimpleQuickActionDefinitionBase {
|
|
18
|
-
constructor(context) {
|
|
19
|
-
super(ENABLE_CLEAR_FILTER_BAR_TYPE, [], '', context);
|
|
20
|
-
}
|
|
21
|
-
isClearButtonEnabled = false;
|
|
22
|
-
initialize() {
|
|
23
|
-
const controls = [...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []), ...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])];
|
|
24
|
-
for (const control of controls) {
|
|
25
|
-
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
26
|
-
const modifiedControl = getControlById(control.controlId);
|
|
27
|
-
if (isActionApplicable && modifiedControl) {
|
|
28
|
-
this.isClearButtonEnabled = modifiedControl.getShowClearOnFB();
|
|
29
|
-
this.control = modifiedControl;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return Promise.resolve();
|
|
33
|
-
}
|
|
34
|
-
get textKey() {
|
|
35
|
-
return this.isClearButtonEnabled ? 'V2_QUICK_ACTION_LR_DISABLE_CLEAR_FILTER_BAR' : 'V2_QUICK_ACTION_LR_ENABLE_CLEAR_FILTER_BAR';
|
|
36
|
-
}
|
|
37
|
-
async execute() {
|
|
38
|
-
if (this.control) {
|
|
39
|
-
const {
|
|
40
|
-
flexSettings
|
|
41
|
-
} = this.context;
|
|
42
|
-
const modifiedValue = {
|
|
43
|
-
generator: flexSettings.generator,
|
|
44
|
-
propertyName: PROPERTY_NAME,
|
|
45
|
-
newValue: !this.isClearButtonEnabled
|
|
46
|
-
};
|
|
47
|
-
const command = await CommandFactory.getCommandFor(this.control, 'Property', modifiedValue, null, flexSettings);
|
|
48
|
-
this.isClearButtonEnabled = !this.isClearButtonEnabled;
|
|
49
|
-
return [command];
|
|
50
|
-
}
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
var __exports = {
|
|
55
|
-
__esModule: true
|
|
56
|
-
};
|
|
57
|
-
__exports.ENABLE_CLEAR_FILTER_BAR_TYPE = ENABLE_CLEAR_FILTER_BAR_TYPE;
|
|
58
|
-
__exports.ToggleClearFilterBarQuickAction = ToggleClearFilterBarQuickAction;
|
|
59
|
-
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_LR = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
12
|
+
const CONTROL_TYPE_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Quick Action for toggling the visibility of "clear filter bar" button in List Report page.
|
|
16
|
+
*/
|
|
17
|
+
class ToggleClearFilterBarQuickAction extends SimpleQuickActionDefinitionBase {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(ENABLE_CLEAR_FILTER_BAR_TYPE, [], '', context);
|
|
20
|
+
}
|
|
21
|
+
isClearButtonEnabled = false;
|
|
22
|
+
initialize() {
|
|
23
|
+
const controls = [...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []), ...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])];
|
|
24
|
+
for (const control of controls) {
|
|
25
|
+
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
26
|
+
const modifiedControl = getControlById(control.controlId);
|
|
27
|
+
if (isActionApplicable && modifiedControl) {
|
|
28
|
+
this.isClearButtonEnabled = modifiedControl.getShowClearOnFB();
|
|
29
|
+
this.control = modifiedControl;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return Promise.resolve();
|
|
33
|
+
}
|
|
34
|
+
get textKey() {
|
|
35
|
+
return this.isClearButtonEnabled ? 'V2_QUICK_ACTION_LR_DISABLE_CLEAR_FILTER_BAR' : 'V2_QUICK_ACTION_LR_ENABLE_CLEAR_FILTER_BAR';
|
|
36
|
+
}
|
|
37
|
+
async execute() {
|
|
38
|
+
if (this.control) {
|
|
39
|
+
const {
|
|
40
|
+
flexSettings
|
|
41
|
+
} = this.context;
|
|
42
|
+
const modifiedValue = {
|
|
43
|
+
generator: flexSettings.generator,
|
|
44
|
+
propertyName: PROPERTY_NAME,
|
|
45
|
+
newValue: !this.isClearButtonEnabled
|
|
46
|
+
};
|
|
47
|
+
const command = await CommandFactory.getCommandFor(this.control, 'Property', modifiedValue, null, flexSettings);
|
|
48
|
+
this.isClearButtonEnabled = !this.isClearButtonEnabled;
|
|
49
|
+
return [command];
|
|
50
|
+
}
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
var __exports = {
|
|
55
|
+
__esModule: true
|
|
56
|
+
};
|
|
57
|
+
__exports.ENABLE_CLEAR_FILTER_BAR_TYPE = ENABLE_CLEAR_FILTER_BAR_TYPE;
|
|
58
|
+
__exports.ToggleClearFilterBarQuickAction = ToggleClearFilterBarQuickAction;
|
|
59
|
+
return __exports;
|
|
60
60
|
});
|
|
61
61
|
//# sourceMappingURL=lr-toggle-clear-filter-bar.js.map
|
|
@@ -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
|