@sap-ux/preview-middleware 0.16.171 → 0.16.173
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/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +9 -5
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +15 -5
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +3 -2
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +6 -2
- package/dist/client/adp/quick-actions/fe-v2/registry.js +1 -1
- package/dist/client/adp/quick-actions/fe-v2/registry.ts +7 -1
- package/package.json +3 -3
|
@@ -10,8 +10,11 @@ sap.ui.define(["../../../cpe/quick-actions/utils", "../../../utils/core", "../si
|
|
|
10
10
|
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
11
11
|
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
12
12
|
const ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR = 'enable-semantic-daterange-filterbar';
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const CONTROL_TYPE_LR = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
14
|
+
const CONTROL_TYPE_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt';
|
|
15
|
+
const COMPONENT_LR = 'sap.suite.ui.generic.template.ListReport';
|
|
16
|
+
const COMPONENT_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage';
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Quick Action for toggling the visibility of "semantic date range" for filterbar fields.
|
|
17
20
|
*/
|
|
@@ -26,7 +29,7 @@ sap.ui.define(["../../../cpe/quick-actions/utils", "../../../utils/core", "../si
|
|
|
26
29
|
if (!manifestChangesSupported) {
|
|
27
30
|
return;
|
|
28
31
|
}
|
|
29
|
-
const controls = this.context.controlIndex[
|
|
32
|
+
const controls = [...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []), ...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])];
|
|
30
33
|
for (const control of controls) {
|
|
31
34
|
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
32
35
|
const modifiedControl = getControlById(control.controlId);
|
|
@@ -45,8 +48,9 @@ sap.ui.define(["../../../cpe/quick-actions/utils", "../../../utils/core", "../si
|
|
|
45
48
|
return this.isUseDateRangeTypeEnabled ? 'QUICK_ACTION_LR_DISABLE_SEMANTIC_DATE_RANGE_FILTER_BAR' : 'QUICK_ACTION_LR_ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR';
|
|
46
49
|
}
|
|
47
50
|
async execute() {
|
|
48
|
-
const entitySet = isA(
|
|
49
|
-
const
|
|
51
|
+
const entitySet = isA(CONTROL_TYPE_LR, this.control) || isA(CONTROL_TYPE_ALP, this.control) ? this.control.getEntitySet() : undefined;
|
|
52
|
+
const viewName = this.context.view.getViewName();
|
|
53
|
+
const command = await prepareManifestChange(this.context, 'component/settings/filterSettings/dateSettings', this.control, viewName.includes('AnalyticalListPage') ? COMPONENT_ALP : COMPONENT_LR, entitySet, {
|
|
50
54
|
useDateRange: !this.isUseDateRangeTypeEnabled
|
|
51
55
|
});
|
|
52
56
|
return command;
|
|
@@ -7,8 +7,11 @@ import { areManifestChangesSupported, prepareManifestChange } from './utils';
|
|
|
7
7
|
import SmartFilterBar from 'sap/ui/comp/smartfilterbar/SmartFilterBar';
|
|
8
8
|
|
|
9
9
|
export const ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR = 'enable-semantic-daterange-filterbar';
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const CONTROL_TYPE_LR = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
11
|
+
const CONTROL_TYPE_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt';
|
|
12
|
+
const COMPONENT_LR = 'sap.suite.ui.generic.template.ListReport';
|
|
13
|
+
const COMPONENT_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage';
|
|
14
|
+
|
|
12
15
|
/**
|
|
13
16
|
* Quick Action for toggling the visibility of "semantic date range" for filterbar fields.
|
|
14
17
|
*/
|
|
@@ -27,7 +30,10 @@ export class ToggleSemanticDateRangeFilterBar
|
|
|
27
30
|
if (!manifestChangesSupported) {
|
|
28
31
|
return;
|
|
29
32
|
}
|
|
30
|
-
const controls =
|
|
33
|
+
const controls = [
|
|
34
|
+
...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []),
|
|
35
|
+
...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])
|
|
36
|
+
];
|
|
31
37
|
for (const control of controls) {
|
|
32
38
|
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
33
39
|
const modifiedControl = getControlById<SmartFilterBar>(control.controlId);
|
|
@@ -52,12 +58,16 @@ export class ToggleSemanticDateRangeFilterBar
|
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
async execute(): Promise<FlexCommand[]> {
|
|
55
|
-
const entitySet =
|
|
61
|
+
const entitySet =
|
|
62
|
+
isA<SmartFilterBar>(CONTROL_TYPE_LR, this.control) || isA<SmartFilterBar>(CONTROL_TYPE_ALP, this.control)
|
|
63
|
+
? this.control.getEntitySet()
|
|
64
|
+
: undefined;
|
|
65
|
+
const viewName = this.context.view.getViewName();
|
|
56
66
|
const command = await prepareManifestChange(
|
|
57
67
|
this.context,
|
|
58
68
|
'component/settings/filterSettings/dateSettings',
|
|
59
69
|
this.control!,
|
|
60
|
-
|
|
70
|
+
viewName.includes('AnalyticalListPage') ? COMPONENT_ALP : COMPONENT_LR,
|
|
61
71
|
entitySet,
|
|
62
72
|
{
|
|
63
73
|
useDateRange: !this.isUseDateRangeTypeEnabled
|
|
@@ -8,7 +8,8 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../cpe/quick-actions/
|
|
|
8
8
|
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
9
9
|
const ENABLE_CLEAR_FILTER_BAR_TYPE = 'enable-clear-filter-bar';
|
|
10
10
|
const PROPERTY_NAME = 'showClearOnFB';
|
|
11
|
-
const
|
|
11
|
+
const CONTROL_TYPE_LR = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
12
|
+
const CONTROL_TYPE_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Quick Action for toggling the visibility of "clear filter bar" button in List Report page.
|
|
@@ -19,7 +20,7 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../cpe/quick-actions/
|
|
|
19
20
|
}
|
|
20
21
|
isClearButtonEnabled = false;
|
|
21
22
|
initialize() {
|
|
22
|
-
const controls = this.context.controlIndex[
|
|
23
|
+
const controls = [...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []), ...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])];
|
|
23
24
|
for (const control of controls) {
|
|
24
25
|
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
25
26
|
const modifiedControl = getControlById(control.controlId);
|
|
@@ -9,7 +9,8 @@ import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
|
9
9
|
|
|
10
10
|
export const ENABLE_CLEAR_FILTER_BAR_TYPE = 'enable-clear-filter-bar';
|
|
11
11
|
const PROPERTY_NAME = 'showClearOnFB';
|
|
12
|
-
const
|
|
12
|
+
const CONTROL_TYPE_LR = 'sap.ui.comp.smartfilterbar.SmartFilterBar';
|
|
13
|
+
const CONTROL_TYPE_ALP = 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Quick Action for toggling the visibility of "clear filter bar" button in List Report page.
|
|
@@ -25,7 +26,10 @@ export class ToggleClearFilterBarQuickAction
|
|
|
25
26
|
private isClearButtonEnabled = false;
|
|
26
27
|
|
|
27
28
|
initialize(): void {
|
|
28
|
-
const controls =
|
|
29
|
+
const controls = [
|
|
30
|
+
...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []),
|
|
31
|
+
...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])
|
|
32
|
+
];
|
|
29
33
|
for (const control of controls) {
|
|
30
34
|
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
31
35
|
const modifiedControl = getControlById<FilterBar>(control.controlId);
|
|
@@ -53,7 +53,7 @@ sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../
|
|
|
53
53
|
} else if (name === 'analyticalListPage') {
|
|
54
54
|
definitionGroups.push({
|
|
55
55
|
title: 'ANALYTICAL LIST PAGE',
|
|
56
|
-
definitions: [AddControllerToPageQuickAction, ChangeTableColumnsQuickAction, AddTableCustomColumnQuickAction],
|
|
56
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile],
|
|
57
57
|
view,
|
|
58
58
|
key: name + index
|
|
59
59
|
});
|
|
@@ -80,8 +80,14 @@ export default class FEV2QuickActionRegistry extends QuickActionDefinitionRegist
|
|
|
80
80
|
title: 'ANALYTICAL LIST PAGE',
|
|
81
81
|
definitions: [
|
|
82
82
|
AddControllerToPageQuickAction,
|
|
83
|
+
AddPageActionQuickAction,
|
|
84
|
+
ToggleClearFilterBarQuickAction,
|
|
85
|
+
ToggleSemanticDateRangeFilterBar,
|
|
83
86
|
ChangeTableColumnsQuickAction,
|
|
84
|
-
|
|
87
|
+
AddTableActionQuickAction,
|
|
88
|
+
AddTableCustomColumnQuickAction,
|
|
89
|
+
EnableTableFilteringQuickAction,
|
|
90
|
+
AddNewAnnotationFile
|
|
85
91
|
],
|
|
86
92
|
view,
|
|
87
93
|
key: name + index
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.16.
|
|
12
|
+
"version": "0.16.173",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@sap-ux/logger": "0.6.0",
|
|
29
29
|
"@sap-ux/feature-toggle": "0.2.3",
|
|
30
30
|
"@sap-ux/btp-utils": "0.17.2",
|
|
31
|
-
"@sap-ux/adp-tooling": "0.12.
|
|
31
|
+
"@sap-ux/adp-tooling": "0.12.112",
|
|
32
32
|
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.32",
|
|
33
33
|
"@sap-ux/project-access": "1.29.0"
|
|
34
34
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"supertest": "6.3.3",
|
|
47
47
|
"@sap-ux-private/playwright": "0.1.0",
|
|
48
48
|
"dotenv": "16.3.1",
|
|
49
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.
|
|
49
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.50",
|
|
50
50
|
"@sap-ux/axios-extension": "1.18.1",
|
|
51
51
|
"@sap-ux/store": "1.0.0",
|
|
52
52
|
"@sap-ux/ui5-info": "0.8.3",
|