@openui5/sap.ui.mdc 1.94.0 → 1.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +1 -6
- package/THIRDPARTY.txt +3 -9
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/Chart.js +12 -5
- package/src/sap/ui/mdc/ChartNew.js +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +44 -29
- package/src/sap/ui/mdc/ValueHelp.js +1459 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +41 -0
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +233 -224
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +61 -29
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +13 -2
- package/src/sap/ui/mdc/field/FieldBase.js +81 -35
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +17 -9
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +576 -4
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ar.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_bg.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ca.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_cy.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_de.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_et.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fr.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_hr.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_id.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +32 -25
- package/src/sap/ui/mdc/messagebundle_iw.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ja.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_lt.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ms.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_no.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_pl.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_pt.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_ru.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sl.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_th.properties +15 -8
- package/src/sap/ui/mdc/messagebundle_tr.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_vi.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +9 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +2 -2
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ListView.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/table/Column.js +20 -4
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +176 -4
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +51 -21
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +19 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +475 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +346 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +440 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +442 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +96 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +537 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +105 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +232 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +250 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +504 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +619 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +881 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -2
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +239 -77
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
'sap/ui/mdc/BaseDelegate'
|
|
9
|
+
], function(
|
|
10
|
+
BaseDelegate
|
|
11
|
+
) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
var ValueHelpDelegate = Object.assign({}, BaseDelegate);
|
|
15
|
+
|
|
16
|
+
ValueHelpDelegate.retrieveContent = function (oContainer) {
|
|
17
|
+
return Promise.resolve();
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
ValueHelpDelegate.isSearchSupported = function(oPayload, oListBinding) {
|
|
21
|
+
return false;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
ValueHelpDelegate.executeSearch = function(oPayload, oListBinding, sSearch) {
|
|
25
|
+
return Promise.resolve();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
ValueHelpDelegate.executeFilter = function(oPayload, oListBinding, oFilter, iRequestedItems) {
|
|
29
|
+
return Promise.resolve(oListBinding);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
ValueHelpDelegate.checkBindingsPending = function(oPayload, aBindings) {
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
ValueHelpDelegate.checkListBindingPending = function(oPayload, oListBinding, oListBindingInfo) {
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return ValueHelpDelegate;
|
|
41
|
+
});
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/core/Element",
|
|
8
9
|
"sap/ui/mdc/library",
|
|
9
10
|
"../ActionToolbar",
|
|
10
11
|
"sap/m/Title",
|
|
@@ -16,6 +17,7 @@ sap.ui.define([
|
|
|
16
17
|
"sap/ui/Device",
|
|
17
18
|
"sap/ui/core/ShortcutHintsMixin"
|
|
18
19
|
], function(
|
|
20
|
+
Element,
|
|
19
21
|
MDCLib,
|
|
20
22
|
ActionToolbar,
|
|
21
23
|
Title,
|
|
@@ -29,288 +31,295 @@ sap.ui.define([
|
|
|
29
31
|
) {
|
|
30
32
|
"use strict";
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
/**
|
|
35
|
+
/**
|
|
36
|
+
* Constructor for a new ToolbarHandler.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
39
|
+
* @param {object} [mSettings] initial settings for the new control
|
|
40
|
+
* @class The ToolbarHandler control creates a sap.m.OverflowToolbar based on metadata and the configuration specified.
|
|
41
|
+
* @extends sap.m.OverflowToolbar
|
|
42
|
+
* @author SAP SE
|
|
43
|
+
* @version 1.95.0
|
|
44
|
+
* @constructor
|
|
45
|
+
* @experimental As of version ...
|
|
46
|
+
* @private
|
|
47
|
+
* @since 1.88
|
|
48
|
+
* @alias sap.ui.mdc.chart.ToolbarHandler
|
|
49
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
50
|
+
*/
|
|
51
|
+
var ToolbarHandler = Element.extend("sap.ui.mdc.ToolbarHandler", {});
|
|
52
|
+
|
|
33
53
|
|
|
54
|
+
var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
55
|
+
var HasPopup = CoreLibrary.aria.HasPopup;
|
|
34
56
|
/**
|
|
35
|
-
* Toolbar helper class for sap.ui.mdc.Chart.
|
|
36
57
|
*
|
|
37
|
-
*
|
|
38
|
-
* @private
|
|
39
|
-
* @experimental
|
|
40
|
-
* @since 1.60
|
|
41
|
-
* @alias sap.ui.mdc.chart.ToolbarHandler
|
|
58
|
+
* Creates a new toolbar for the mdc.Chart based on actions
|
|
42
59
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
design: "Transparent",
|
|
56
|
-
begin: [
|
|
57
|
-
new Title(oChart.getId() + "-title", {
|
|
58
|
-
text: oChart.getHeader()
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
});
|
|
60
|
+
ToolbarHandler.prototype.createToolbar = function(oChart, aUserActions, bInitNotBound) {
|
|
61
|
+
aUserActions = aUserActions || [];
|
|
62
|
+
|
|
63
|
+
if (!oChart.getAggregation("_toolbar")) {
|
|
64
|
+
var oToolbar = new ActionToolbar(oChart.getId() + "--toolbar", {
|
|
65
|
+
design: "Transparent",
|
|
66
|
+
begin: [
|
|
67
|
+
new Title(oChart.getId() + "-title", {
|
|
68
|
+
text: oChart.getHeader()
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
});
|
|
62
72
|
|
|
63
|
-
|
|
73
|
+
oChart.setAggregation("_toolbar", oToolbar);
|
|
64
74
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
75
|
+
this.initializeToolbarNotBound(oChart);
|
|
76
|
+
this.addActions(oToolbar, aUserActions); //Add actions after chart content for correct sorting
|
|
77
|
+
if (!bInitNotBound){
|
|
78
|
+
this.updateToolbar(oChart);
|
|
70
79
|
}
|
|
71
|
-
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
ToolbarHandler.prototype.addActions = function(oToolbar, aActions) {
|
|
84
|
+
aActions.forEach(function(action) {
|
|
85
|
+
oToolbar.addAction(action);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
72
88
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
89
|
+
ToolbarHandler.prototype.initializeToolbarNotBound = function(oChart) {
|
|
90
|
+
var oToolbar = oChart.getAggregation("_toolbar");
|
|
91
|
+
|
|
92
|
+
if (!oToolbar) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
97
|
+
|
|
98
|
+
this._oZoomInButton = new OverflowButton({
|
|
99
|
+
tooltip: MDCRb.getText("chart.TOOLBAR_ZOOM_IN"),
|
|
100
|
+
icon: "sap-icon://zoom-in",
|
|
101
|
+
enabled: "{= ${$mdcChart>/_chart/getZoomInfo/enabled} && ${$mdcChart>/_chart/getZoomInfo/currentZoomLevel} < 1}"
|
|
76
102
|
});
|
|
77
|
-
},
|
|
78
103
|
|
|
79
|
-
|
|
80
|
-
|
|
104
|
+
this._oZoomOutButton = new OverflowButton({
|
|
105
|
+
tooltip: MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"),
|
|
106
|
+
icon: "sap-icon://zoom-out",
|
|
107
|
+
enabled: "{= ${$mdcChart>/_chart/getZoomInfo/enabled} && ${$mdcChart>/_chart/getZoomInfo/currentZoomLevel} > 0}"
|
|
108
|
+
});
|
|
81
109
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
110
|
+
oToolbar.addEnd(this._oZoomInButton);
|
|
111
|
+
oToolbar.addEnd(this._oZoomOutButton);
|
|
112
|
+
}
|
|
85
113
|
|
|
86
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
87
114
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0) {
|
|
116
|
+
oChart._oDrillDownBtn = new OverflowButton(oChart.getId() + "-drillDown", {
|
|
117
|
+
icon: "sap-icon://drill-down",
|
|
118
|
+
enabled: false,
|
|
119
|
+
tooltip: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
120
|
+
text: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
121
|
+
press: [
|
|
122
|
+
oChart._showDrillDown, oChart
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
oToolbar.addEnd(oChart._oDrillDownBtn);
|
|
126
|
+
}
|
|
93
127
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
128
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.Legend) < 0) {
|
|
129
|
+
this._legendBtn = new OverflowToggleButton(oChart.getId() + "-chart_legend", {
|
|
130
|
+
type: "Transparent",
|
|
131
|
+
text: MDCRb.getText("chart.LEGENDBTN_TEXT"),
|
|
132
|
+
tooltip: MDCRb.getText('chart.LEGENDBTN_TOOLTIP'),
|
|
133
|
+
icon: "sap-icon://legend",
|
|
134
|
+
enabled: false,
|
|
135
|
+
pressed: false
|
|
136
|
+
});
|
|
99
137
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
138
|
+
oToolbar.addEnd(this._legendBtn);
|
|
139
|
+
}
|
|
103
140
|
|
|
141
|
+
//Check p13n mode property on the chart and enable only desired buttons
|
|
142
|
+
var aP13nMode = oChart.getP13nMode() || [];
|
|
104
143
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
});
|
|
115
|
-
oToolbar.addEnd(oChart._oDrillDownBtn);
|
|
116
|
-
}
|
|
144
|
+
if (aP13nMode.indexOf("Item") > -1) {
|
|
145
|
+
this._chartSettingsBtn = new OverflowButton(oChart.getId() + "-chart_settings", {
|
|
146
|
+
tooltip: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
147
|
+
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
148
|
+
icon: "sap-icon://action-settings",//TODO the right icon for P13n chart dialog
|
|
149
|
+
ariaHasPopup: HasPopup.ListBox,
|
|
150
|
+
enabled: false
|
|
151
|
+
});
|
|
152
|
+
oToolbar.addEnd(this._chartSettingsBtn);
|
|
117
153
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
enabled: false,
|
|
125
|
-
pressed: false
|
|
126
|
-
});
|
|
154
|
+
ShortcutHintsMixin.addConfig(this._chartSettingsBtn, {
|
|
155
|
+
addAccessibilityLabel: true,
|
|
156
|
+
messageBundleKey: Device.os.macintosh ? "mdc.PERSONALIZATION_SHORTCUT_MAC" : "mdc.PERSONALIZATION_SHORTCUT" // Cmd+, or Ctrl+,
|
|
157
|
+
},
|
|
158
|
+
oChart // we need the chart instance, otherwise the messageBundleKey does not find the resource bundle
|
|
159
|
+
);
|
|
127
160
|
|
|
128
|
-
|
|
129
|
-
}
|
|
161
|
+
}
|
|
130
162
|
|
|
131
|
-
|
|
132
|
-
|
|
163
|
+
if (aP13nMode.indexOf("Sort") > -1) {
|
|
164
|
+
this._sortBtn = new OverflowButton(oChart.getId() + "-sort_settings", {
|
|
165
|
+
ariaHasPopup: HasPopup.ListBox,
|
|
166
|
+
icon: "sap-icon://sort",
|
|
167
|
+
tooltip: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
168
|
+
text: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
169
|
+
enabled: false
|
|
170
|
+
});
|
|
171
|
+
oToolbar.addEnd(this._sortBtn);
|
|
172
|
+
}
|
|
133
173
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
icon: "sap-icon://action-settings",//TODO the right icon for P13n chart dialog
|
|
139
|
-
ariaHasPopup: HasPopup.ListBox,
|
|
140
|
-
enabled: false
|
|
141
|
-
});
|
|
142
|
-
oToolbar.addEnd(this._chartSettingsBtn);
|
|
174
|
+
if (aP13nMode.indexOf("Type") > -1) {
|
|
175
|
+
this._chartTypeBtn = new ChartTypeButton(oChart);
|
|
176
|
+
oToolbar.addEnd(this._chartTypeBtn);
|
|
177
|
+
}
|
|
143
178
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
messageBundleKey: Device.os.macintosh ? "mdc.PERSONALIZATION_SHORTCUT_MAC" : "mdc.PERSONALIZATION_SHORTCUT" // Cmd+, or Ctrl+,
|
|
147
|
-
},
|
|
148
|
-
oChart // we need the chart instance, otherwise the messageBundleKey does not find the resource bundle
|
|
149
|
-
);
|
|
179
|
+
oToolbar.setEnabled(false);
|
|
180
|
+
};
|
|
150
181
|
|
|
151
|
-
|
|
182
|
+
/**
|
|
183
|
+
*
|
|
184
|
+
* Updates the mdc.Chart toolbar content
|
|
185
|
+
*/
|
|
186
|
+
ToolbarHandler.prototype.updateToolbar = function(oChart) {
|
|
187
|
+
var oToolbar = oChart.getAggregation("_toolbar");
|
|
152
188
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
icon: "sap-icon://sort",
|
|
157
|
-
tooltip: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
158
|
-
text: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
159
|
-
enabled: false
|
|
160
|
-
});
|
|
161
|
-
oToolbar.addEnd(this._sortBtn);
|
|
162
|
-
}
|
|
189
|
+
if (!oToolbar) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
163
192
|
|
|
164
|
-
|
|
165
|
-
this._chartTypeBtn = new ChartTypeButton(oChart);
|
|
166
|
-
oToolbar.addEnd(this._chartTypeBtn);
|
|
167
|
-
}
|
|
193
|
+
//oToolbar.destroyEnd(true);
|
|
168
194
|
|
|
169
|
-
|
|
170
|
-
|
|
195
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
196
|
+
var oInnerChart = oChart.getAggregation("_chart");
|
|
171
197
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
var oToolbar = oChart.getAggregation("_toolbar");
|
|
198
|
+
this._oZoomInButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
199
|
+
this._oZoomInButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
200
|
+
this._oZoomInButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
201
|
+
this.handleZoomIn(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
202
|
+
}.bind(this));
|
|
178
203
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
204
|
+
this._oZoomOutButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
205
|
+
this._oZoomOutButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
206
|
+
this._oZoomOutButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
207
|
+
this.handleZoomOut(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
208
|
+
}.bind(this));
|
|
182
209
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this._oZoomInButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
189
|
-
this._oZoomInButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
190
|
-
this._oZoomInButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
191
|
-
this.handleZoomIn(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
192
|
-
}.bind(this));
|
|
193
|
-
|
|
194
|
-
this._oZoomOutButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
195
|
-
this._oZoomOutButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
196
|
-
this._oZoomOutButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
197
|
-
this.handleZoomOut(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
198
|
-
}.bind(this));
|
|
199
|
-
|
|
200
|
-
if (oInnerChart) {
|
|
201
|
-
oInnerChart.attachRenderComplete(function onInnerChartRenderCompleted(oControlEvent) {
|
|
202
|
-
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
203
|
-
this.handleInnerChartRenderCompleted(oZoomInfo, this._oZoomInButton, this._oZoomOutButton);
|
|
204
|
-
}, this);
|
|
205
|
-
}
|
|
210
|
+
if (oInnerChart) {
|
|
211
|
+
oInnerChart.attachRenderComplete(function onInnerChartRenderCompleted(oControlEvent) {
|
|
212
|
+
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
213
|
+
this.handleInnerChartRenderCompleted(oZoomInfo, this._oZoomInButton, this._oZoomOutButton);
|
|
214
|
+
}, this);
|
|
206
215
|
}
|
|
216
|
+
}
|
|
207
217
|
|
|
208
218
|
|
|
209
|
-
|
|
219
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0) {
|
|
210
220
|
|
|
211
|
-
|
|
212
|
-
|
|
221
|
+
oChart._oDrillDownBtn.setEnabled(true);
|
|
222
|
+
}
|
|
213
223
|
|
|
214
|
-
|
|
215
|
-
|
|
224
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.Legend) < 0) {
|
|
225
|
+
this._legendBtn.setEnabled(true);
|
|
226
|
+
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
227
|
+
this._legendBtn.attachPress(function(){
|
|
228
|
+
oChart.setLegendVisible(!oChart.getLegendVisible());
|
|
216
229
|
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
220
|
-
}.bind(this));
|
|
221
|
-
}
|
|
230
|
+
}.bind(this));
|
|
231
|
+
}
|
|
222
232
|
|
|
223
|
-
|
|
224
|
-
|
|
233
|
+
//Check p13n mode property on the chart and enable only desired buttons
|
|
234
|
+
var aP13nMode = oChart.getP13nMode() || [];
|
|
225
235
|
|
|
226
|
-
|
|
236
|
+
if (aP13nMode.indexOf("Item") > -1) {
|
|
227
237
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
});
|
|
238
|
+
this._chartSettingsBtn.setEnabled(true);
|
|
239
|
+
this._chartSettingsBtn.attachPress(function(oEvent) {
|
|
240
|
+
var oSource = oEvent.getSource();
|
|
241
|
+
oChart._getPropertyData().then(function(aProperties) {
|
|
242
|
+
ChartSettings.showPanel(oChart, "Chart", oSource, aProperties);
|
|
234
243
|
});
|
|
235
|
-
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
236
246
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
});
|
|
247
|
+
if (aP13nMode.indexOf("Sort") > -1) {
|
|
248
|
+
this._sortBtn.setEnabled(true);
|
|
249
|
+
this._sortBtn.attachPress(function(oEvent) {
|
|
250
|
+
var oSource = oEvent.getSource();
|
|
251
|
+
oChart._getPropertyData().then(function(aProperties) {
|
|
252
|
+
ChartSettings.showPanel(oChart, "Sort", oSource, aProperties);
|
|
244
253
|
});
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (aP13nMode.indexOf("Type") > -1) {
|
|
248
|
-
this._chartTypeBtn.bindToInnerChart(oChart);
|
|
249
|
-
//oToolbar.addEnd(new ChartTypeButton(oChart));
|
|
250
|
-
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
251
256
|
|
|
257
|
+
if (aP13nMode.indexOf("Type") > -1) {
|
|
258
|
+
this._chartTypeBtn.bindToInnerChart(oChart);
|
|
259
|
+
//oToolbar.addEnd(new ChartTypeButton(oChart));
|
|
260
|
+
}
|
|
252
261
|
|
|
253
|
-
oToolbar.setEnabled(true);
|
|
254
|
-
},
|
|
255
262
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
},
|
|
263
|
+
oToolbar.setEnabled(true);
|
|
264
|
+
};
|
|
259
265
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
264
|
-
},
|
|
266
|
+
ToolbarHandler.prototype.handleInnerChartRenderCompleted = function(oZoomInfo, oZoomInButton, oZoomOutButton) {
|
|
267
|
+
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
268
|
+
};
|
|
265
269
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
270
|
+
ToolbarHandler.prototype.handleZoomIn = function(oInnerChart, oZoomInButton, oZoomOutButton) {
|
|
271
|
+
oInnerChart.zoom({ direction: "in" });
|
|
272
|
+
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
273
|
+
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
274
|
+
};
|
|
271
275
|
|
|
272
|
-
|
|
273
|
-
|
|
276
|
+
ToolbarHandler.prototype.handleZoomOut = function(oInnerChart, oZoomInButton, oZoomOutButton) {
|
|
277
|
+
oInnerChart.zoom({ direction: "out" });
|
|
278
|
+
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
279
|
+
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
280
|
+
};
|
|
274
281
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
oZoomInButton.setEnabled(false);
|
|
278
|
-
oZoomOutButton.setEnabled(false);
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
282
|
+
ToolbarHandler.prototype.toggleZoomButtonsEnabledState = function(oZoomInfo, oZoomInButton, oZoomOutButton) {
|
|
283
|
+
var vZoomLevel = oZoomInfo.currentZoomLevel;
|
|
281
284
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
// zooming isn't applicable, perhaps all data points are plotted
|
|
286
|
+
if (vZoomLevel == null) { // zoom level is null or undefined
|
|
287
|
+
oZoomInButton.setEnabled(false);
|
|
288
|
+
oZoomOutButton.setEnabled(false);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
286
291
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
+
// zoomed out all the way
|
|
293
|
+
if (vZoomLevel === 0) {
|
|
294
|
+
oZoomInButton.setEnabled(true);
|
|
295
|
+
oZoomOutButton.setEnabled(false);
|
|
292
296
|
|
|
293
|
-
|
|
297
|
+
// if the zoom out button is disabled and it currently has focus,
|
|
298
|
+
// set the focus to the zoom in button
|
|
299
|
+
if (oZoomOutButton.getFocusDomRef() === document.activeElement) {
|
|
300
|
+
oZoomInButton.focus();
|
|
294
301
|
}
|
|
295
302
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
oZoomOutButton.setEnabled(true);
|
|
299
|
-
oZoomInButton.setEnabled(false);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
300
305
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
+
// zoomed in all the way
|
|
307
|
+
if (vZoomLevel === 1) {
|
|
308
|
+
oZoomOutButton.setEnabled(true);
|
|
309
|
+
oZoomInButton.setEnabled(false);
|
|
306
310
|
|
|
307
|
-
|
|
311
|
+
// if the zoom in button is disabled and it currently has focus,
|
|
312
|
+
// set the focus to the zoom out button
|
|
313
|
+
if (oZoomInButton.getFocusDomRef() === document.activeElement) {
|
|
314
|
+
oZoomOutButton.focus();
|
|
308
315
|
}
|
|
309
316
|
|
|
310
|
-
|
|
311
|
-
oZoomInButton.setEnabled(true);
|
|
312
|
-
oZoomOutButton.setEnabled(true);
|
|
317
|
+
return;
|
|
313
318
|
}
|
|
319
|
+
|
|
320
|
+
// the zoom level is between 0 and 1
|
|
321
|
+
oZoomInButton.setEnabled(true);
|
|
322
|
+
oZoomOutButton.setEnabled(true);
|
|
314
323
|
};
|
|
315
324
|
|
|
316
325
|
return ToolbarHandler;
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @class The ChartSelectionDetailsNew control creates a sap.m.SelectionDetails popover based on metadata and the configuration specified.
|
|
34
34
|
* @extends sap.m.SelectionDetails
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.95.0
|
|
37
37
|
* @constructor
|
|
38
38
|
* @experimental As of version ...
|
|
39
39
|
* @private
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @class The ChartToolbarNew control creates a sap.m.OverflowToolbar based on metadata and the configuration specified.
|
|
42
42
|
* @extends sap.m.OverflowToolbar
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.95.0
|
|
45
45
|
* @constructor
|
|
46
46
|
* @experimental As of version ...
|
|
47
47
|
* @private
|