@openui5/sap.ui.mdc 1.98.0 → 1.101.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/THIRDPARTY.txt +6 -6
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +6 -3
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +186 -102
- package/src/sap/ui/mdc/ChartDelegate.js +85 -30
- package/src/sap/ui/mdc/ChartRenderer.js +1 -1
- package/src/sap/ui/mdc/Control.js +11 -6
- package/src/sap/ui/mdc/Element.js +10 -6
- package/src/sap/ui/mdc/Field.js +19 -4
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +41 -3
- package/src/sap/ui/mdc/Link.js +22 -4
- package/src/sap/ui/mdc/LinkDelegate.js +9 -7
- package/src/sap/ui/mdc/MultiValueField.js +30 -6
- package/src/sap/ui/mdc/Table.js +332 -316
- package/src/sap/ui/mdc/TableDelegate.js +146 -31
- package/src/sap/ui/mdc/ValueHelp.js +136 -624
- package/src/sap/ui/mdc/ValueHelpDelegate.js +154 -7
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +56 -11
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +24 -10
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -7
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +14 -9
- package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +393 -68
- package/src/sap/ui/mdc/condition/Operator.js +14 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
- package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
- package/src/sap/ui/mdc/designtime/Util.js +63 -0
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +6 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +36 -9
- package/src/sap/ui/mdc/enum/PropagationReason.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 +44 -13
- package/src/sap/ui/mdc/field/ConditionsType.js +3 -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 +31 -9
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
- package/src/sap/ui/mdc/field/FieldBase.js +69 -14
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
- package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
- 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 +9 -4
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
- 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/TokenDisplay.js +70 -0
- package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
- package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +137 -216
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +144 -64
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +73 -23
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +7 -42
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
- 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 +0 -1
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +5 -5
- package/src/sap/ui/mdc/library.js +41 -30
- package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
- 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/ContactDetailsRenderer.js +26 -0
- 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/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +205 -29
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
- 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 +59 -6
- package/src/sap/ui/mdc/messagebundle_ar.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_bg.properties +58 -24
- package/src/sap/ui/mdc/messagebundle_ca.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_cs.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_cy.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_da.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_de.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_el.properties +39 -5
- package/src/sap/ui/mdc/messagebundle_en.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +68 -9
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_es.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_et.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_fi.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_fr.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_hi.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_hr.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_hu.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_id.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_it.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_iw.properties +39 -5
- package/src/sap/ui/mdc/messagebundle_ja.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_kk.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_ko.properties +39 -5
- package/src/sap/ui/mdc/messagebundle_lt.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_lv.properties +44 -10
- package/src/sap/ui/mdc/messagebundle_ms.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_nl.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_no.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_pl.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_pt.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_ro.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_sh.properties +43 -9
- package/src/sap/ui/mdc/messagebundle_sk.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_sl.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_sv.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_th.properties +43 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +41 -7
- package/src/sap/ui/mdc/messagebundle_uk.properties +43 -9
- package/src/sap/ui/mdc/messagebundle_vi.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +40 -6
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +40 -6
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +24 -15
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +354 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +32 -69
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +412 -326
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +169 -66
- package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -6
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
- package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +2 -2
- package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +76 -16
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
- package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
- package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +40 -12
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
- package/src/sap/ui/mdc/table/Column.js +271 -132
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +75 -27
- package/src/sap/ui/mdc/table/PropertyHelper.js +71 -95
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +121 -40
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +42 -1
- package/src/sap/ui/mdc/table/TableSettings.js +10 -22
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/table/menu/Item.js +78 -0
- package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
- package/src/sap/ui/mdc/themes/base/Chart.less +6 -0
- package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +4 -3
- package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/util/DateUtil.js +32 -7
- package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
- package/src/sap/ui/mdc/util/FormatUtil.js +2 -2
- package/src/sap/ui/mdc/util/IdentifierUtil.js +7 -7
- package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
- package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
- package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +234 -44
- package/src/sap/ui/mdc/valuehelp/Popover.js +7 -4
- package/src/sap/ui/mdc/valuehelp/base/Container.js +63 -48
- package/src/sap/ui/mdc/valuehelp/base/Content.js +35 -16
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +161 -284
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
- package/src/sap/ui/mdc/valuehelp/content/ListCollection.js +205 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +67 -66
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +94 -185
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +8 -8
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +43 -27
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
- package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
- package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
- package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
- package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
|
@@ -22,7 +22,12 @@ sap.ui.define([
|
|
|
22
22
|
"sap/ui/base/ManagedObjectObserver",
|
|
23
23
|
"sap/ui/core/ResizeHandler",
|
|
24
24
|
"sap/ui/mdc/p13n/panels/ChartItemPanel",
|
|
25
|
-
"sap/m/MessageStrip"
|
|
25
|
+
"sap/m/MessageStrip",
|
|
26
|
+
"../TypeUtil",
|
|
27
|
+
"../FilterBarDelegate",
|
|
28
|
+
"sap/ui/model/Filter",
|
|
29
|
+
"sap/ui/mdc/odata/v4/ChartPropertyHelper",
|
|
30
|
+
"sap/ui/thirdparty/jquery"
|
|
26
31
|
], function (
|
|
27
32
|
V4ChartDelegate,
|
|
28
33
|
loadModules,
|
|
@@ -41,7 +46,12 @@ sap.ui.define([
|
|
|
41
46
|
ManagedObjectObserver,
|
|
42
47
|
ResizeHandler,
|
|
43
48
|
ChartItemPanel,
|
|
44
|
-
MessageStrip
|
|
49
|
+
MessageStrip,
|
|
50
|
+
V4TypeUtil,
|
|
51
|
+
V4FilterBarDelegate,
|
|
52
|
+
Filter,
|
|
53
|
+
PropertyHelper,
|
|
54
|
+
jQuery
|
|
45
55
|
) {
|
|
46
56
|
"use strict";
|
|
47
57
|
/**
|
|
@@ -82,6 +92,44 @@ sap.ui.define([
|
|
|
82
92
|
mStateMap.set(oMDCChart, oState);
|
|
83
93
|
};
|
|
84
94
|
|
|
95
|
+
ChartDelegate.getTypeUtil = function() {
|
|
96
|
+
return V4TypeUtil;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
ChartDelegate.getFilterDelegate = function() {
|
|
100
|
+
return V4FilterBarDelegate;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* This methods is called during the appliance of the add condition change.
|
|
105
|
+
* This intention is to update the propertyInfo property.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} sPropertyName The name of a property.
|
|
108
|
+
* @param {sap.ui.mdc.Control} oControl - the instance of the mdc control
|
|
109
|
+
* @param {Object} mPropertyBag Instance of property bag from Flex change API
|
|
110
|
+
* @returns {Promise} Promise that resolves once the properyInfo property was updated
|
|
111
|
+
*/
|
|
112
|
+
ChartDelegate.addCondition = function(sPropertyName, oControl, mPropertyBag) {
|
|
113
|
+
//return this.getFilterDelegate().addCondition(sPropertyName, oControl, mPropertyBag);
|
|
114
|
+
// will be activated, once mdc.Chart has the property propertyInfo.
|
|
115
|
+
return Promise.resolve();
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* This methods is called during the appliance of the remove condition change.
|
|
120
|
+
* This intention is to update the propertyInfo property.
|
|
121
|
+
*
|
|
122
|
+
* @param {string} sPropertyName The name of a property.
|
|
123
|
+
* @param {sap.ui.mdc.Control} oControl - the instance of the mdc control
|
|
124
|
+
* @param {Object} mPropertyBag Instance of property bag from Flex change API
|
|
125
|
+
* @returns {Promise} Promise that resolves once the properyInfo property was updated
|
|
126
|
+
*/
|
|
127
|
+
ChartDelegate.removeCondition = function(sPropertyName, oControl, mPropertyBag) {
|
|
128
|
+
//return this.getFilterDelegate().removeCondition(sPropertyName, oControl, mPropertyBag);
|
|
129
|
+
// will be activated, once mdc.Chart has the property propertyInfo.
|
|
130
|
+
return Promise.resolve();
|
|
131
|
+
};
|
|
132
|
+
|
|
85
133
|
ChartDelegate._deleteState = function(oMDCChart) {
|
|
86
134
|
|
|
87
135
|
if (this._getState(oMDCChart).vizTooltip) {
|
|
@@ -176,36 +224,6 @@ sap.ui.define([
|
|
|
176
224
|
* ...
|
|
177
225
|
*/
|
|
178
226
|
|
|
179
|
-
/**
|
|
180
|
-
* Provides the table's filter delegate that provides basic filter functionality such as adding filter fields.
|
|
181
|
-
* <b>Note:</b> The functionality provided in this delegate should act as a subset of a FilterBarDelegate
|
|
182
|
-
* to enable the table for inbuilt filtering.
|
|
183
|
-
*
|
|
184
|
-
* @example <caption>Example usage of <code>getFilterDelegate</code></caption>
|
|
185
|
-
* oFilterDelegate = {
|
|
186
|
-
* addItem: function() {
|
|
187
|
-
* var oFilterFieldPromise = new Promise(...);
|
|
188
|
-
* return oFilterFieldPromise;
|
|
189
|
-
* }
|
|
190
|
-
* }
|
|
191
|
-
* @returns {Object} Object for the chart filter personalization
|
|
192
|
-
* @public
|
|
193
|
-
*/
|
|
194
|
-
ChartDelegate.getFilterDelegate = function () {
|
|
195
|
-
return {
|
|
196
|
-
/**
|
|
197
|
-
*
|
|
198
|
-
* @param {String} sPropertyName The property name
|
|
199
|
-
* @param {Object} oMDCChart Instance of the chart TODO: Which one? MDC or inner?
|
|
200
|
-
*
|
|
201
|
-
* @returns {Promise} Promise that resolves with an instance of a <code>sap.ui.mdc.FilterField</code>.
|
|
202
|
-
* For more information, see {@link sap.ui.mdc.AggregationBaseDelegate#addItem AggregationBaseDelegate}.
|
|
203
|
-
*/
|
|
204
|
-
addItem: function (sPropertyName, oMDCChart) {
|
|
205
|
-
return Promise.resolve(null);
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
227
|
|
|
210
228
|
ChartDelegate.exit = function(oMDCChart) {
|
|
211
229
|
if (this._getInnerStructure(oMDCChart)){
|
|
@@ -229,7 +247,7 @@ sap.ui.define([
|
|
|
229
247
|
|
|
230
248
|
/**
|
|
231
249
|
* Gets the current zooming information for the inner chart
|
|
232
|
-
* @returns {
|
|
250
|
+
* @returns {int} Current zoom level on the inner chart
|
|
233
251
|
*/
|
|
234
252
|
ChartDelegate.getZoomState = function (oMDCChart) {
|
|
235
253
|
|
|
@@ -312,6 +330,10 @@ sap.ui.define([
|
|
|
312
330
|
|
|
313
331
|
ChartDelegate.getAdaptionUI = function(oMDCChart) {
|
|
314
332
|
|
|
333
|
+
return Promise.resolve(this._setupAdaptionUI(oMDCChart));
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
ChartDelegate._setupAdaptionUI = function(oMDCChart) {
|
|
315
337
|
var oLayoutConfig = this.getChartTypeLayoutConfig().find(function(it){return it.key === oMDCChart.getChartType();});
|
|
316
338
|
|
|
317
339
|
//Default case -> everything allowed
|
|
@@ -338,13 +360,14 @@ sap.ui.define([
|
|
|
338
360
|
oPanel.setMessageStrip(new MessageStrip({text: MDCRb.getText("chart.PERSONALIZATION_DIALOG_MEASURE_WARNING"), type:"Warning"}));
|
|
339
361
|
}
|
|
340
362
|
|
|
341
|
-
return
|
|
363
|
+
return oPanel;
|
|
342
364
|
};
|
|
343
365
|
|
|
344
366
|
/**
|
|
345
367
|
* Sets the visibility of the legend
|
|
346
368
|
* This is called by the MDC Chart, do not call it directly!
|
|
347
|
-
* @param {
|
|
369
|
+
* @param {sap.ui.mdc.Chart} oMDCChart Chart to the set the legend visibility on
|
|
370
|
+
* @param {boolean} bVisible true to show legend, false to hide
|
|
348
371
|
*
|
|
349
372
|
* @experimental
|
|
350
373
|
* @private
|
|
@@ -386,7 +409,8 @@ sap.ui.define([
|
|
|
386
409
|
/**
|
|
387
410
|
* Inserts an MDC Chart Item (in case of sap.chart.Chart a Measure/Dimension) on the inner chart
|
|
388
411
|
* This function is called by MDC Chart on a change of the <code>Items</code> aggregation
|
|
389
|
-
* @param {sap.ui.mdc.
|
|
412
|
+
* @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to insert the item into
|
|
413
|
+
* @param {sap.ui.mdc.chart.Item} oMDCChartItem the MDC Chart Item to insert into the inner chart
|
|
390
414
|
* @param {int} iIndex the index to insert into
|
|
391
415
|
*/
|
|
392
416
|
ChartDelegate.insertItemToInnerChart = function (oMDCChart, oMDCChartItem, iIndex) {
|
|
@@ -420,14 +444,14 @@ sap.ui.define([
|
|
|
420
444
|
this._updateColoring(oMDCChart, this._getChart(oMDCChart).getVisibleDimensions(), this._getChart(oMDCChart).getVisibleMeasures());
|
|
421
445
|
}.bind(this));
|
|
422
446
|
|
|
423
|
-
this.
|
|
424
|
-
|
|
425
|
-
}.bind(this));
|
|
447
|
+
this._updateSemanticalPattern(oMDCChart);
|
|
448
|
+
|
|
426
449
|
};
|
|
427
450
|
|
|
428
451
|
/**
|
|
429
452
|
* Removes an Item (in case of sap.chart.Chart a Measure/Dimension) from the inner chart
|
|
430
453
|
* This function is called by MDC Chart on a change of the <code>Items</code> aggregation
|
|
454
|
+
* @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to remove the item from
|
|
431
455
|
* @param {sap.ui.mdc.chart.Item} oMDCChartItem The Item to remove from the inner chart
|
|
432
456
|
*/
|
|
433
457
|
ChartDelegate.removeItemFromInnerChart = function (oMDCChart, oMDCChartItem) {
|
|
@@ -457,9 +481,8 @@ sap.ui.define([
|
|
|
457
481
|
|
|
458
482
|
//Update coloring and semantical patterns on Item change
|
|
459
483
|
this._updateColoring(oMDCChart, this._getChart(oMDCChart).getVisibleDimensions(), this._getChart(oMDCChart).getVisibleMeasures());
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}.bind(this));
|
|
484
|
+
|
|
485
|
+
this._updateSemanticalPattern(oMDCChart);
|
|
463
486
|
};
|
|
464
487
|
|
|
465
488
|
/**
|
|
@@ -474,29 +497,64 @@ sap.ui.define([
|
|
|
474
497
|
if (oMDCChart.getModel) {
|
|
475
498
|
return Promise.resolve(this._createMDCChartItem(sPropertyName, oMDCChart, sRole));
|
|
476
499
|
}
|
|
477
|
-
return Promise.resolve(null);
|
|
478
500
|
};
|
|
479
501
|
|
|
480
502
|
ChartDelegate.removeItem = function (oProperty, oMDCChart) {
|
|
481
503
|
return Promise.resolve(true);
|
|
482
504
|
};
|
|
483
505
|
|
|
484
|
-
|
|
485
|
-
|
|
506
|
+
/**
|
|
507
|
+
* This will iterate over all items of the MDC Chart to make sure all necessary information is available on them
|
|
508
|
+
* If something is missing, this method will update the item accordingly
|
|
509
|
+
* @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to check the items on
|
|
510
|
+
* @returns {Promise} resolves once check is complete
|
|
511
|
+
*/
|
|
512
|
+
ChartDelegate.checkAndUpdateMDCItems = function(oMDCChart) {
|
|
513
|
+
return new Promise(function(resolve, reject){
|
|
514
|
+
var aPropPromises = [];
|
|
515
|
+
|
|
516
|
+
oMDCChart.getItems().forEach(function(oMDCItem){
|
|
517
|
+
var bIsComplete = oMDCItem.getName() && oMDCItem.getLabel() && oMDCItem.getType() && oMDCItem.getRole();
|
|
518
|
+
|
|
519
|
+
if (!bIsComplete) {
|
|
520
|
+
aPropPromises.push(this._getPropertyInfosByName(oMDCItem.getName(), oMDCChart).then(function(oPropertyInfo){
|
|
521
|
+
oMDCItem.setLabel(oPropertyInfo.label);
|
|
522
|
+
|
|
523
|
+
if (oPropertyInfo.groupable) {
|
|
524
|
+
oMDCItem.setType("groupable");
|
|
525
|
+
oMDCItem.setRole(oMDCItem.getRole() ? oMDCItem.getRole() : "category");
|
|
526
|
+
} else if (oPropertyInfo.aggregatable) {
|
|
527
|
+
oMDCItem.setType("aggregatable");
|
|
528
|
+
oMDCItem.setRole(oMDCItem.getRole() ? oMDCItem.getRole() : "axis1");
|
|
529
|
+
}
|
|
530
|
+
}));
|
|
531
|
+
}
|
|
532
|
+
}.bind(this));
|
|
486
533
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
return oCurrentPropertyInfo.name === sPropertyName;
|
|
534
|
+
Promise.all(aPropPromises).then(function(){
|
|
535
|
+
resolve();
|
|
490
536
|
});
|
|
537
|
+
}.bind(this));
|
|
491
538
|
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
ChartDelegate._createMDCChartItem = function (sPropertyName, oMDCChart, sRole) {
|
|
542
|
+
|
|
543
|
+
return this._getPropertyInfosByName(sPropertyName, oMDCChart).then(function(oPropertyInfo){
|
|
492
544
|
if (!oPropertyInfo) {
|
|
493
545
|
return null;
|
|
494
546
|
}
|
|
495
547
|
|
|
548
|
+
return this._createMDCItemFromProperty(oPropertyInfo, oMDCChart.getId(), sRole);
|
|
549
|
+
|
|
550
|
+
}.bind(this));
|
|
551
|
+
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
ChartDelegate._createMDCItemFromProperty = function(oPropertyInfo, idPrefix, sRole) {
|
|
496
555
|
|
|
497
|
-
//TODO: Check for case: both aggegatable and groupable
|
|
498
556
|
if (oPropertyInfo.groupable) {
|
|
499
|
-
return new MDCChartItem(
|
|
557
|
+
return new MDCChartItem(idPrefix + "--GroupableItem--" + oPropertyInfo.name, {
|
|
500
558
|
name: oPropertyInfo.name,
|
|
501
559
|
label: oPropertyInfo.label,
|
|
502
560
|
type: "groupable",
|
|
@@ -506,14 +564,15 @@ sap.ui.define([
|
|
|
506
564
|
|
|
507
565
|
if (oPropertyInfo.aggregatable) {
|
|
508
566
|
|
|
509
|
-
return new MDCChartItem(
|
|
567
|
+
return new MDCChartItem(idPrefix + "--AggregatableItem--" + oPropertyInfo.name, {
|
|
510
568
|
name: oPropertyInfo.name,
|
|
511
569
|
label: oPropertyInfo.label,
|
|
512
570
|
type: "aggregatable",
|
|
513
571
|
role: sRole ? sRole : "axis1"
|
|
514
572
|
});
|
|
515
573
|
}
|
|
516
|
-
|
|
574
|
+
|
|
575
|
+
return null;
|
|
517
576
|
};
|
|
518
577
|
|
|
519
578
|
/**
|
|
@@ -558,114 +617,121 @@ sap.ui.define([
|
|
|
558
617
|
};
|
|
559
618
|
|
|
560
619
|
ChartDelegate._createContentFromItems = function (oMDCChart) {
|
|
561
|
-
|
|
562
|
-
|
|
620
|
+
return new Promise(function(resolve, reject){
|
|
621
|
+
//This is done so the user doesn't have to specify property path & aggregation method in the XML
|
|
563
622
|
var aColorPromises = [];
|
|
623
|
+
var aPropPromises = [];
|
|
564
624
|
|
|
565
625
|
var aVisibleDimensions = [];
|
|
566
626
|
var aVisibleMeasures = [];
|
|
567
627
|
oMDCChart.getItems().forEach(function (oItem, iIndex) {
|
|
568
628
|
|
|
569
629
|
//Uses excact mdc chart item id
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
630
|
+
aPropPromises.push(this._getPropertyInfosByName( oItem.getName(), oMDCChart).then(function(oPropertyInfo){
|
|
631
|
+
//Skip a Item if there is no property representing the Item inside the backend
|
|
632
|
+
if (!oPropertyInfo){
|
|
633
|
+
Log.error("sap.ui.mdc.Chart: Item " + oItem.getName() + " has no property info representing it in the metadata. Make sure the name is correct and the metadata is defined correctly. Skipping the item!");
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
573
636
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
637
|
+
switch (oItem.getType()) {
|
|
638
|
+
case "groupable":
|
|
639
|
+
aVisibleDimensions.push(this.getInternalChartNameFromPropertyNameAndKind(oItem.getName(), "groupable", oMDCChart));
|
|
579
640
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
641
|
+
this._addInnerDimension(oMDCChart, oItem, oPropertyInfo);
|
|
642
|
+
break;
|
|
643
|
+
case "aggregatable":
|
|
583
644
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
case "aggregatable":
|
|
645
|
+
//TODO: Alias might be changing after backend request
|
|
646
|
+
aVisibleMeasures.push(this._getAggregatedMeasureNameForMDCItem(oItem));
|
|
587
647
|
|
|
588
|
-
|
|
589
|
-
|
|
648
|
+
this._addInnerMeasure(oMDCChart, oItem, oPropertyInfo);
|
|
649
|
+
break;
|
|
590
650
|
|
|
591
|
-
|
|
592
|
-
|
|
651
|
+
default:
|
|
652
|
+
Log.error("MDC Chart Item " + oItem.getId() + " with label " + oItem.getLabel() + " has no known type. Supported typed are: \"groupable\" & \"aggregatable\"");
|
|
653
|
+
}
|
|
593
654
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
655
|
+
aColorPromises.push(this._prepareColoringForItem(oItem));
|
|
656
|
+
}.bind(this)));
|
|
597
657
|
|
|
598
|
-
aColorPromises.push(this._prepareColoringForItem(oItem));
|
|
599
658
|
}.bind(this));
|
|
600
659
|
|
|
601
|
-
|
|
660
|
+
Promise.all(aPropPromises).then(function(){
|
|
661
|
+
this._getState(oMDCChart).aColMeasures.forEach(function(sKey) {
|
|
602
662
|
|
|
603
|
-
|
|
663
|
+
if (this._getState(oMDCChart).aInSettings.indexOf(sKey) == -1) {
|
|
604
664
|
|
|
605
|
-
|
|
665
|
+
aColorPromises.push(new Promise(function(resolve, reject){
|
|
666
|
+
oMDCChart._getPropertyByNameAsync(sKey).then(function(oPropertyInfo){
|
|
667
|
+
var aggregationMethod = oPropertyInfo.aggregationMethod;
|
|
668
|
+
var propertyPath = oPropertyInfo.propertyPath;
|
|
669
|
+
var sName = this.getInternalChartNameFromPropertyNameAndKind(sKey, "aggregatable", oMDCChart);
|
|
606
670
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
671
|
+
var oMeasureSettings = {
|
|
672
|
+
name: sName,
|
|
673
|
+
label: oPropertyInfo.label,
|
|
674
|
+
role: "axis1"
|
|
675
|
+
};
|
|
610
676
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
677
|
+
if (aggregationMethod && propertyPath) {
|
|
678
|
+
oMeasureSettings.analyticalInfo = {
|
|
679
|
+
propertyPath: propertyPath,
|
|
680
|
+
"with": aggregationMethod
|
|
681
|
+
};
|
|
682
|
+
}
|
|
616
683
|
|
|
617
|
-
|
|
618
|
-
oMeasureSettings.analyticalInfo = {
|
|
619
|
-
propertyPath: propertyPath,
|
|
620
|
-
"with": aggregationMethod
|
|
621
|
-
};
|
|
622
|
-
}
|
|
684
|
+
var oMeasure = new Measure(oMeasureSettings);
|
|
623
685
|
|
|
624
|
-
|
|
686
|
+
aVisibleMeasures.push(oMeasure);
|
|
687
|
+
this._getChart(oMDCChart).addMeasure(oMeasure);
|
|
688
|
+
resolve();
|
|
689
|
+
}); //this.getPropertyFromNameAndKind not used as the key is the name of the MDC Chart Item
|
|
625
690
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}
|
|
691
|
+
}));
|
|
692
|
+
}
|
|
629
693
|
|
|
630
|
-
|
|
694
|
+
}.bind(this));
|
|
631
695
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
696
|
+
Promise.all(aColorPromises).then(function(){
|
|
697
|
+
this._getChart(oMDCChart).setVisibleDimensions(aVisibleDimensions);
|
|
698
|
+
this._getChart(oMDCChart).setVisibleMeasures(aVisibleMeasures);
|
|
635
699
|
|
|
636
|
-
|
|
637
|
-
|
|
700
|
+
var aInResultDimensions = oMDCChart.getDelegate().inResultDimensions; //TODO: Does this use internal name? If so, change _getPropertyInfosByName below; Most likely not the case
|
|
701
|
+
if (aInResultDimensions && aInResultDimensions instanceof Array && aInResultDimensions.length != 0) {
|
|
638
702
|
|
|
639
|
-
|
|
703
|
+
var aInResultPromises = [];
|
|
640
704
|
|
|
641
|
-
|
|
705
|
+
aInResultDimensions.forEach(function(sInResultDim){
|
|
642
706
|
|
|
643
|
-
|
|
644
|
-
|
|
707
|
+
aInResultPromises.push(this._getPropertyInfosByName(sInResultDim, oMDCChart).then(function(oPropertyInfos){
|
|
708
|
+
var sName = this.getInternalChartNameFromPropertyNameAndKind(oPropertyInfos.name, "groupable", oMDCChart);
|
|
645
709
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
710
|
+
var oDim = new Dimension({
|
|
711
|
+
name: sName,
|
|
712
|
+
label: oPropertyInfos.label
|
|
713
|
+
});
|
|
650
714
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
715
|
+
this._getState(oMDCChart).inResultDimensions.push(sName);
|
|
716
|
+
this._getChart(oMDCChart).addDimension(oDim);
|
|
717
|
+
}.bind(this)));
|
|
654
718
|
|
|
655
|
-
|
|
719
|
+
}.bind(this));
|
|
656
720
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
721
|
+
Promise.all(aInResultPromises).then(function(){
|
|
722
|
+
this._getChart(oMDCChart).setInResultDimensions(this._getState(oMDCChart).inResultDimensions);
|
|
723
|
+
}.bind(this));
|
|
660
724
|
|
|
661
|
-
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
this._updateColoring(oMDCChart, aVisibleDimensions, aVisibleMeasures);
|
|
728
|
+
this._updateSemanticalPattern(oMDCChart);
|
|
662
729
|
|
|
663
|
-
|
|
664
|
-
|
|
730
|
+
resolve();
|
|
731
|
+
}.bind(this));
|
|
665
732
|
}.bind(this));
|
|
666
733
|
|
|
667
734
|
}.bind(this));
|
|
668
|
-
|
|
669
735
|
};
|
|
670
736
|
|
|
671
737
|
ChartDelegate.getInnerChart = function (oMDCChart) {
|
|
@@ -768,7 +834,7 @@ sap.ui.define([
|
|
|
768
834
|
|
|
769
835
|
/**
|
|
770
836
|
* Updates the coloring on the inner chart
|
|
771
|
-
* @param {sap.chart.Chart}
|
|
837
|
+
* @param {sap.chart.Chart} oMDCChart inner chart
|
|
772
838
|
* @param {array} aVisibleDimensions visible dimensions for inner chart
|
|
773
839
|
* @param {array} aVisibleMeasures visible measures for inner chart
|
|
774
840
|
*
|
|
@@ -826,15 +892,14 @@ sap.ui.define([
|
|
|
826
892
|
/**
|
|
827
893
|
* Updates the semantical pattern for given measures
|
|
828
894
|
*
|
|
829
|
-
* @param {sap.chart.Chart}
|
|
830
|
-
* @param {
|
|
831
|
-
* @param {*} mDataPoints data points of the inner chart
|
|
895
|
+
* @param {sap.chart.Chart} oMDCChart the inner chart
|
|
896
|
+
* @param {*} aProperties // TODO what is this parameter used for?
|
|
832
897
|
*
|
|
833
898
|
* @experimental
|
|
834
899
|
* @private
|
|
835
900
|
* @ui5-restricted Fiori Elements, sap.ui.mdc
|
|
836
901
|
*/
|
|
837
|
-
ChartDelegate._updateSemanticalPattern = function (oMDCChart
|
|
902
|
+
ChartDelegate._updateSemanticalPattern = function (oMDCChart) {
|
|
838
903
|
|
|
839
904
|
var aVisibleMeasures = this._getChart(oMDCChart).getVisibleMeasures();
|
|
840
905
|
|
|
@@ -985,23 +1050,31 @@ sap.ui.define([
|
|
|
985
1050
|
*/
|
|
986
1051
|
ChartDelegate.getSortedDimensions = function (oMDCChart) {
|
|
987
1052
|
return new Promise(function (resolve, reject) {
|
|
988
|
-
this.fetchProperties(oMDCChart).then(function (aProperties) {
|
|
989
1053
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1054
|
+
if (oMDCChart.isPropertyHelperFinal()){
|
|
1055
|
+
resolve(this._sortPropertyDimensions(oMDCChart.getPropertyHelper().getProperties()));
|
|
1056
|
+
} else {
|
|
1057
|
+
oMDCChart.finalizePropertyHelper().then(function(){
|
|
1058
|
+
resolve(this._sortPropertyDimensions(oMDCChart.getPropertyHelper().getProperties()));
|
|
1059
|
+
}.bind(this));
|
|
1060
|
+
}
|
|
1061
|
+
}.bind(this));
|
|
1062
|
+
};
|
|
993
1063
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1064
|
+
ChartDelegate._sortPropertyDimensions = function(aProperties) {
|
|
1065
|
+
var aDimensions = aProperties.filter(function (oItem) {
|
|
1066
|
+
return oItem.groupable; //Groupable means "Dimension" for sap.chart.Chart
|
|
1067
|
+
});
|
|
1001
1068
|
|
|
1002
|
-
|
|
1069
|
+
if (aDimensions) {
|
|
1070
|
+
aDimensions.sort(function (a, b) {
|
|
1071
|
+
if (a.label && b.label) {
|
|
1072
|
+
return a.label.localeCompare(b.label);
|
|
1073
|
+
}
|
|
1003
1074
|
});
|
|
1004
|
-
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
return aDimensions;
|
|
1005
1078
|
};
|
|
1006
1079
|
|
|
1007
1080
|
/**
|
|
@@ -1022,6 +1095,7 @@ sap.ui.define([
|
|
|
1022
1095
|
/**
|
|
1023
1096
|
* Sets the chart type of the inner chart
|
|
1024
1097
|
* Is called by MDC Chart when <code>chartType</code> property is updated
|
|
1098
|
+
* @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to set the chart type for
|
|
1025
1099
|
* @param {string} sChartType the new chart type
|
|
1026
1100
|
*/
|
|
1027
1101
|
ChartDelegate.setChartType = function (oMDCChart, sChartType) {
|
|
@@ -1033,53 +1107,64 @@ sap.ui.define([
|
|
|
1033
1107
|
*/
|
|
1034
1108
|
ChartDelegate.createInnerChartContent = function (oMDCChart, fnCallbackDataLoaded) {
|
|
1035
1109
|
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1110
|
+
return new Promise(function(resolve,reject){
|
|
1111
|
+
this._setChart(oMDCChart, new Chart({
|
|
1112
|
+
id: oMDCChart.getId() + "--innerChart",
|
|
1113
|
+
chartType: "column",
|
|
1114
|
+
width: "100%",
|
|
1115
|
+
isAnalytical: true//,
|
|
1116
|
+
}));
|
|
1042
1117
|
|
|
1043
|
-
|
|
1044
|
-
|
|
1118
|
+
this._getChart(oMDCChart).setCustomMessages({
|
|
1119
|
+
'NO_DATA': oMDCChart.getNoDataText()
|
|
1120
|
+
});
|
|
1045
1121
|
|
|
1046
|
-
|
|
1047
|
-
this.
|
|
1048
|
-
}
|
|
1122
|
+
//Initialize empty; will get filled later on
|
|
1123
|
+
this._getState(oMDCChart).inResultDimensions = [];
|
|
1049
1124
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
this.adjustChartHeight(oMDCChart);
|
|
1053
|
-
}.bind(this));
|
|
1054
|
-
|
|
1055
|
-
var oState = this._getState(oMDCChart);
|
|
1056
|
-
oState.aColMeasures = [];
|
|
1057
|
-
oState.aInSettings = [];
|
|
1058
|
-
this._setState(oMDCChart, oState);
|
|
1059
|
-
|
|
1060
|
-
//Create initial content during pre-processing
|
|
1061
|
-
this._createContentFromItems(oMDCChart);
|
|
1062
|
-
|
|
1063
|
-
//Since zoom information is not yet available for sap.chart.Chart after data load is complete, do it on renderComplete instead
|
|
1064
|
-
//This is a workaround which is hopefully not needed in other chart libraries
|
|
1065
|
-
this._getChart(oMDCChart).attachRenderComplete(function () {
|
|
1066
|
-
if (this._getState(oMDCChart).toolbarUpdateRequested){
|
|
1067
|
-
oMDCChart._updateToolbar();
|
|
1068
|
-
this._getState(oMDCChart).toolbarUpdateRequested = false;
|
|
1125
|
+
if (oMDCChart.getHeight()){
|
|
1126
|
+
this._getChart(oMDCChart).setHeight(this._calculateInnerChartHeight(oMDCChart));
|
|
1069
1127
|
}
|
|
1070
|
-
}.bind(this));
|
|
1071
1128
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1129
|
+
//Set height correctly again if chart changes
|
|
1130
|
+
ResizeHandler.register(oMDCChart, function(){
|
|
1131
|
+
this.adjustChartHeight(oMDCChart);
|
|
1132
|
+
}.bind(this));
|
|
1133
|
+
|
|
1134
|
+
var oState = this._getState(oMDCChart);
|
|
1135
|
+
oState.aColMeasures = [];
|
|
1136
|
+
oState.aInSettings = [];
|
|
1137
|
+
this._setState(oMDCChart, oState);
|
|
1138
|
+
|
|
1139
|
+
//Create initial content during pre-processing
|
|
1140
|
+
this._createContentFromItems(oMDCChart).then(function(){
|
|
1141
|
+
//Since zoom information is not yet available for sap.chart.Chart after data load is complete, do it on renderComplete instead
|
|
1142
|
+
//This is a workaround which is hopefully not needed in other chart libraries
|
|
1143
|
+
this._getChart(oMDCChart).attachRenderComplete(function () {
|
|
1144
|
+
if (this._getState(oMDCChart).toolbarUpdateRequested){
|
|
1145
|
+
oMDCChart._updateToolbar();
|
|
1146
|
+
this._getState(oMDCChart).toolbarUpdateRequested = false;
|
|
1147
|
+
}
|
|
1148
|
+
}.bind(this));
|
|
1149
|
+
|
|
1150
|
+
this._getInnerStructure(oMDCChart).removeAllItems();
|
|
1151
|
+
this._getInnerStructure(oMDCChart).setJustifyContent(FlexJustifyContent.Start);
|
|
1152
|
+
this._getInnerStructure(oMDCChart).setAlignItems(FlexAlignItems.Stretch);
|
|
1153
|
+
this._getInnerStructure(oMDCChart).addItem(this._getChart(oMDCChart));
|
|
1154
|
+
|
|
1155
|
+
oState.dataLoadedCallback = fnCallbackDataLoaded;
|
|
1156
|
+
|
|
1157
|
+
this._setState(oMDCChart, oState);
|
|
1158
|
+
var oBindingInfo = this._getBindingInfo(oMDCChart);
|
|
1159
|
+
this.updateBindingInfo(oMDCChart, oBindingInfo); //Applies filters
|
|
1160
|
+
this.rebind(oMDCChart, oBindingInfo);
|
|
1161
|
+
|
|
1162
|
+
resolve();
|
|
1163
|
+
}.bind(this));
|
|
1164
|
+
|
|
1076
1165
|
|
|
1077
|
-
|
|
1166
|
+
}.bind(this));
|
|
1078
1167
|
|
|
1079
|
-
this._setState(oMDCChart, oState);
|
|
1080
|
-
var oBindingInfo = this._getBindingInfo(oMDCChart);
|
|
1081
|
-
this.updateBindingInfo(oMDCChart, oBindingInfo); //Applies filters
|
|
1082
|
-
this.rebind(oMDCChart, oBindingInfo);
|
|
1083
1168
|
};
|
|
1084
1169
|
|
|
1085
1170
|
ChartDelegate._calculateInnerChartHeight = function(oMDCChart) {
|
|
@@ -1126,32 +1211,18 @@ sap.ui.define([
|
|
|
1126
1211
|
//TODO: Check for Hierachy and Time
|
|
1127
1212
|
//TODO: Check for role annotation
|
|
1128
1213
|
|
|
1129
|
-
this.
|
|
1130
|
-
|
|
1131
|
-
//Uses MDC Chart Item ID to identify preoperty, not internal chart id
|
|
1132
|
-
var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
|
|
1133
|
-
return oCurrentPropertyInfo.name === oMDCChartItem.getName();
|
|
1134
|
-
});
|
|
1135
|
-
|
|
1136
|
-
this._addInnerDimension(oMDCChart, oMDCChartItem, oPropertyInfo);
|
|
1137
|
-
|
|
1214
|
+
this._getPropertyInfosByName(oMDCChartItem.getName(), oMDCChart).then(function(oPropInfo){
|
|
1215
|
+
this._addInnerDimension(oMDCChart, oMDCChartItem, oPropInfo);
|
|
1138
1216
|
}.bind(this));
|
|
1139
1217
|
|
|
1218
|
+
|
|
1140
1219
|
};
|
|
1141
1220
|
|
|
1142
1221
|
ChartDelegate.createInnerMeasure = function (oMDCChart, oMDCChartItem) {
|
|
1143
1222
|
|
|
1144
|
-
this.
|
|
1145
|
-
|
|
1146
|
-
//Uses MDC Chart Item ID to identify preoperty, not internal chart id
|
|
1147
|
-
var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
|
|
1148
|
-
return oCurrentPropertyInfo.name === oMDCChartItem.getName();
|
|
1149
|
-
});
|
|
1150
|
-
|
|
1151
|
-
this._addInnerMeasure(oMDCChart, oMDCChartItem, oPropertyInfo);
|
|
1152
|
-
|
|
1223
|
+
this._getPropertyInfosByName(oMDCChartItem.getName(), oMDCChart).then(function(oPropInfo){
|
|
1224
|
+
this._addInnerMeasure(oMDCChart, oMDCChartItem, oPropInfo);
|
|
1153
1225
|
}.bind(this));
|
|
1154
|
-
|
|
1155
1226
|
};
|
|
1156
1227
|
|
|
1157
1228
|
/**
|
|
@@ -1167,7 +1238,7 @@ sap.ui.define([
|
|
|
1167
1238
|
if (oPropertyInfo.textProperty){
|
|
1168
1239
|
oDimension.setTextProperty(oPropertyInfo.textProperty);
|
|
1169
1240
|
if (oPropertyInfo.textFormatter){
|
|
1170
|
-
oDimension.setTextFormatter(oPropertyInfo
|
|
1241
|
+
oDimension.setTextFormatter(this._formatText.bind(oPropertyInfo));
|
|
1171
1242
|
}
|
|
1172
1243
|
oDimension.setDisplayText(true);
|
|
1173
1244
|
}
|
|
@@ -1257,7 +1328,7 @@ sap.ui.define([
|
|
|
1257
1328
|
|
|
1258
1329
|
/**
|
|
1259
1330
|
* Returns whether the inner chart is currently bound
|
|
1260
|
-
* @returns {
|
|
1331
|
+
* @returns {boolean} true if inner chart is bound; false if not
|
|
1261
1332
|
*/
|
|
1262
1333
|
ChartDelegate.getInnerChartBound = function (oMDCChart) {
|
|
1263
1334
|
var oState = this._getState(oMDCChart);
|
|
@@ -1276,47 +1347,114 @@ sap.ui.define([
|
|
|
1276
1347
|
* @param {Object} oBindingInfo The binding info of the chart
|
|
1277
1348
|
*/
|
|
1278
1349
|
ChartDelegate.updateBindingInfo = function (oMDCChart, oBindingInfo) {
|
|
1279
|
-
var
|
|
1280
|
-
|
|
1281
|
-
|
|
1350
|
+
var aFilters = createInnerFilters.call(this, oMDCChart).concat(createOuterFilters.call(this, oMDCChart));
|
|
1351
|
+
addSearchParameter(oMDCChart, oBindingInfo);
|
|
1352
|
+
oBindingInfo.filters = new Filter(aFilters, true);
|
|
1353
|
+
oBindingInfo.sorter = this.getSorters(oMDCChart);
|
|
1282
1354
|
|
|
1283
|
-
|
|
1355
|
+
};
|
|
1284
1356
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1357
|
+
function createInnerFilters(oChart) {
|
|
1358
|
+
var bFilterEnabled = oChart.getP13nMode().indexOf("Filter") > -1;
|
|
1359
|
+
var aFilters = [];
|
|
1288
1360
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
if (oFilterInfo) {
|
|
1293
|
-
oBindingInfo.filters = oFilterInfo.filters;
|
|
1294
|
-
}
|
|
1361
|
+
if (bFilterEnabled) {
|
|
1362
|
+
var aChartProperties = oChart.getPropertyHelper().getProperties();
|
|
1363
|
+
var oInnerFilterInfo = FilterUtil.getFilterInfo(this.getTypeUtil(), oChart.getConditions(), aChartProperties);
|
|
1295
1364
|
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
}
|
|
1365
|
+
if (oInnerFilterInfo.filters) {
|
|
1366
|
+
aFilters.push(oInnerFilterInfo.filters);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1301
1369
|
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
if (sSearchText) {
|
|
1370
|
+
return aFilters;
|
|
1371
|
+
}
|
|
1305
1372
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1373
|
+
function createOuterFilters(oChart) {
|
|
1374
|
+
var oFilter = Core.byId(oChart.getFilter());
|
|
1375
|
+
var aFilters = [];
|
|
1309
1376
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1377
|
+
if (!oFilter) {
|
|
1378
|
+
return aFilters;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
var mConditions = oFilter.getConditions();
|
|
1382
|
+
|
|
1383
|
+
if (mConditions) {
|
|
1384
|
+
var aPropertiesMetadata = oFilter.getPropertyInfoSet ? oFilter.getPropertyInfoSet() : null;
|
|
1385
|
+
var aParameterNames = DelegateUtil.getParameterNames(oFilter);
|
|
1386
|
+
var oOuterFilterInfo = FilterUtil.getFilterInfo(this.getTypeUtil(), mConditions, aPropertiesMetadata, aParameterNames);
|
|
1387
|
+
|
|
1388
|
+
if (oOuterFilterInfo.filters) {
|
|
1389
|
+
aFilters.push(oOuterFilterInfo.filters);
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1318
1392
|
|
|
1393
|
+
return aFilters;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
function addSearchParameter(oChart, oBindingInfo) {
|
|
1397
|
+
var oFilter = Core.byId(oChart.getFilter());
|
|
1398
|
+
if (!oFilter) {
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
var mConditions = oFilter.getConditions();
|
|
1403
|
+
// get the basic search
|
|
1404
|
+
var sSearchText = oFilter.getSearch instanceof Function ? oFilter.getSearch() : "";
|
|
1405
|
+
|
|
1406
|
+
if (mConditions) {
|
|
1407
|
+
var sParameterPath = DelegateUtil.getParametersInfo(oFilter, mConditions);
|
|
1408
|
+
if (sParameterPath) {
|
|
1409
|
+
oBindingInfo.path = sParameterPath;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
if (!oBindingInfo.parameters) {
|
|
1414
|
+
oBindingInfo.parameters = {};
|
|
1319
1415
|
}
|
|
1416
|
+
|
|
1417
|
+
oBindingInfo.parameters["$search"] = sSearchText || undefined;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Returns sorters available for the data
|
|
1422
|
+
*
|
|
1423
|
+
* @returns {array} Array containing available sorters
|
|
1424
|
+
*
|
|
1425
|
+
* @experimental
|
|
1426
|
+
* @private
|
|
1427
|
+
* @ui5-restricted sap.ui.mdc
|
|
1428
|
+
*/
|
|
1429
|
+
ChartDelegate.getSorters = function (oMDCChart) {
|
|
1430
|
+
var aSorters;
|
|
1431
|
+
var aSorterProperties = oMDCChart.getSortConditions() ? oMDCChart.getSortConditions().sorters : [];
|
|
1432
|
+
|
|
1433
|
+
aSorterProperties.forEach(function (oSortProp) {
|
|
1434
|
+
|
|
1435
|
+
var oMDCItem = oMDCChart.getItems().find(function (oProp) {
|
|
1436
|
+
return oProp.getName() === oSortProp.name;
|
|
1437
|
+
});
|
|
1438
|
+
|
|
1439
|
+
//Ignore not visible Items
|
|
1440
|
+
if (!oMDCItem) {
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
//TODO: Check for inResultDimensions
|
|
1445
|
+
var oSorter = this.getSorterForItem(oMDCItem, oSortProp);
|
|
1446
|
+
|
|
1447
|
+
if (aSorters) {
|
|
1448
|
+
aSorters.push(oSorter);
|
|
1449
|
+
} else {
|
|
1450
|
+
aSorters = [
|
|
1451
|
+
oSorter
|
|
1452
|
+
];//[] has special meaning in sorting
|
|
1453
|
+
}
|
|
1454
|
+
}.bind(this));
|
|
1455
|
+
|
|
1456
|
+
return aSorters;
|
|
1457
|
+
|
|
1320
1458
|
};
|
|
1321
1459
|
|
|
1322
1460
|
ChartDelegate._getAggregatedMeasureNameForMDCItem = function(oMDCItem){
|
|
@@ -1348,41 +1486,6 @@ sap.ui.define([
|
|
|
1348
1486
|
return oMDCChart.getPropertyHelper().getProperty(sName);
|
|
1349
1487
|
};
|
|
1350
1488
|
|
|
1351
|
-
/**
|
|
1352
|
-
* This returns the layout options for a specific type of Item (measure/dimension,groupable/aggregatable)
|
|
1353
|
-
* It is used by p13n to determine which layout options to show in the p13n panel
|
|
1354
|
-
* @param {string} sType the type for which the layout options are requested
|
|
1355
|
-
*/
|
|
1356
|
-
ChartDelegate._getLayoutOptionsForType = function(sType){
|
|
1357
|
-
var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
1358
|
-
var oAvailableRoles = {
|
|
1359
|
-
groupable: [
|
|
1360
|
-
{
|
|
1361
|
-
key: MDCLib.ChartItemRoleType.category,
|
|
1362
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_CATEGORY')
|
|
1363
|
-
}, {
|
|
1364
|
-
key: MDCLib.ChartItemRoleType.category2,
|
|
1365
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_CATEGORY2')
|
|
1366
|
-
}, {
|
|
1367
|
-
key: MDCLib.ChartItemRoleType.series,
|
|
1368
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_SERIES')
|
|
1369
|
-
}
|
|
1370
|
-
],
|
|
1371
|
-
aggregatable: [
|
|
1372
|
-
{
|
|
1373
|
-
key: MDCLib.ChartItemRoleType.axis1,
|
|
1374
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS1')
|
|
1375
|
-
}, {
|
|
1376
|
-
key: MDCLib.ChartItemRoleType.axis2,
|
|
1377
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS2')
|
|
1378
|
-
}, {
|
|
1379
|
-
key: MDCLib.ChartItemRoleType.axis3,
|
|
1380
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS3')
|
|
1381
|
-
}
|
|
1382
|
-
]
|
|
1383
|
-
};
|
|
1384
|
-
return oAvailableRoles[sType];
|
|
1385
|
-
};
|
|
1386
1489
|
|
|
1387
1490
|
/**
|
|
1388
1491
|
* Adds an item to the inner chart (measure/dimension)
|
|
@@ -1408,7 +1511,8 @@ sap.ui.define([
|
|
|
1408
1511
|
|
|
1409
1512
|
/**
|
|
1410
1513
|
* Sets tooltips visible/invisible on inner chart
|
|
1411
|
-
* @param {
|
|
1514
|
+
* @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart
|
|
1515
|
+
* @param {boolean} bFlag true for visible, false for invisible
|
|
1412
1516
|
*/
|
|
1413
1517
|
ChartDelegate.setChartTooltipVisibility = function (oMDCChart, bFlag) {
|
|
1414
1518
|
|
|
@@ -1459,44 +1563,35 @@ sap.ui.define([
|
|
|
1459
1563
|
};
|
|
1460
1564
|
|
|
1461
1565
|
/**
|
|
1462
|
-
*
|
|
1463
|
-
*
|
|
1464
|
-
* @param {sap.ui.mdc.Chart} oMDCChart reference to the MDC Chart
|
|
1465
|
-
* @returns {Promise<sap.ui.mdc.table.V4AnalyticsPropertyHelper>} A promise that resolves with the property helper.
|
|
1466
|
-
* @private
|
|
1467
|
-
* @ui5-restricted sap.ui.mdc
|
|
1566
|
+
* Returns the propertyHelper used for the chart delegate
|
|
1567
|
+
* @returns {Promise} Promise with the property helper reference
|
|
1468
1568
|
*/
|
|
1469
|
-
ChartDelegate.
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
this.fetchProperties(oMDCChart),
|
|
1473
|
-
loadModules("sap/ui/mdc/odata/v4/ChartPropertyHelper")
|
|
1474
|
-
]).then(function (aResult) {
|
|
1475
|
-
return Promise.all(aResult.concat(this.fetchPropertyExtensions(oMDCChart, aResult[0])));
|
|
1476
|
-
}.bind(this)).then(function (aResult) {
|
|
1477
|
-
var aProperties = aResult[0];
|
|
1478
|
-
var PropertyHelper = aResult[1][0];
|
|
1479
|
-
var mExtensions = aResult[2];
|
|
1480
|
-
var iMatchingExtensions = 0;
|
|
1481
|
-
var aPropertiesWithExtension = [];
|
|
1482
|
-
|
|
1483
|
-
for (var i = 0; i < aProperties.length; i++) {
|
|
1484
|
-
aPropertiesWithExtension.push(Object.assign({}, aProperties[i], {
|
|
1485
|
-
extension: mExtensions[aProperties[i].name] || {}
|
|
1486
|
-
}));
|
|
1487
|
-
|
|
1488
|
-
if (aProperties[i].name in mExtensions) {
|
|
1489
|
-
iMatchingExtensions++;
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1569
|
+
ChartDelegate.getPropertyHelperClass = function () {
|
|
1570
|
+
return PropertyHelper;
|
|
1571
|
+
};
|
|
1492
1572
|
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1573
|
+
/**
|
|
1574
|
+
* This allows formatting for axis labels of the inner sap.chart.Chart.
|
|
1575
|
+
* Note: As the inner chart has no association to the propertyInfo, "this" will be bound to the propertyInfo object when calling this method
|
|
1576
|
+
* @param {string} sKey the key of the dimension
|
|
1577
|
+
* @param {string} SDesc the description provided by the metadata
|
|
1578
|
+
* @returns {string} the label which should be shown on the chart axis
|
|
1579
|
+
*/
|
|
1580
|
+
ChartDelegate._formatText = function(sKey, SDesc) {
|
|
1581
|
+
return sKey;
|
|
1582
|
+
};
|
|
1496
1583
|
|
|
1497
|
-
|
|
1584
|
+
/**
|
|
1585
|
+
* Defines a <code>noDataText</code>text for the inner chart.
|
|
1586
|
+
* @param {sap.ui.mdc.Chart} oMDCChart Reference to chart
|
|
1587
|
+
* @param {string} sText Text to show if no data is displayed in the chart
|
|
1588
|
+
*/
|
|
1589
|
+
ChartDelegate.setNoDataText = function(oMDCChart, sText) {
|
|
1590
|
+
this._getChart(oMDCChart).setCustomMessages({
|
|
1591
|
+
'NO_DATA': sText
|
|
1498
1592
|
});
|
|
1499
1593
|
};
|
|
1594
|
+
|
|
1500
1595
|
/**
|
|
1501
1596
|
* Returns the relevant propery infos based on the metadata used with the MDC Chart instance.
|
|
1502
1597
|
*
|
|
@@ -1504,6 +1599,7 @@ sap.ui.define([
|
|
|
1504
1599
|
* @returns {array} Array of the property infos to be used within MDC Chart
|
|
1505
1600
|
*/
|
|
1506
1601
|
ChartDelegate.fetchProperties = function (oMDCChart) {
|
|
1602
|
+
|
|
1507
1603
|
var oModel = this._getModel(oMDCChart);
|
|
1508
1604
|
var pCreatePropertyInfos;
|
|
1509
1605
|
|
|
@@ -1513,10 +1609,10 @@ sap.ui.define([
|
|
|
1513
1609
|
resolver: resolve
|
|
1514
1610
|
}, onModelContextChange, this);
|
|
1515
1611
|
}.bind(this)).then(function (oModel) {
|
|
1516
|
-
return this._createPropertyInfos(oMDCChart, oModel);
|
|
1612
|
+
return this._createPropertyInfos(oMDCChart.getDelegate().payload, oModel);
|
|
1517
1613
|
}.bind(this));
|
|
1518
1614
|
} else {
|
|
1519
|
-
pCreatePropertyInfos = this._createPropertyInfos(oMDCChart, oModel);
|
|
1615
|
+
pCreatePropertyInfos = this._createPropertyInfos(oMDCChart.getDelegate().payload, oModel);
|
|
1520
1616
|
}
|
|
1521
1617
|
|
|
1522
1618
|
return pCreatePropertyInfos.then(function (aProperties) {
|
|
@@ -1537,10 +1633,10 @@ sap.ui.define([
|
|
|
1537
1633
|
}
|
|
1538
1634
|
}
|
|
1539
1635
|
|
|
1540
|
-
ChartDelegate._createPropertyInfos = function (
|
|
1541
|
-
var oMetadataInfo = oMDCChart.getDelegate().payload;
|
|
1636
|
+
ChartDelegate._createPropertyInfos = function (oDelegatePayload, oModel) {
|
|
1637
|
+
//var oMetadataInfo = oMDCChart.getDelegate().payload;
|
|
1542
1638
|
var aProperties = [];
|
|
1543
|
-
var sEntitySetPath = "/" +
|
|
1639
|
+
var sEntitySetPath = "/" + oDelegatePayload.collectionName;
|
|
1544
1640
|
var oMetaModel = oModel.getMetaModel();
|
|
1545
1641
|
|
|
1546
1642
|
return Promise.all([
|
|
@@ -1574,7 +1670,7 @@ sap.ui.define([
|
|
|
1574
1670
|
}
|
|
1575
1671
|
|
|
1576
1672
|
if (oPropertyAnnotations["@Org.OData.Aggregation.V1.Aggregatable"]){
|
|
1577
|
-
aProperties = aProperties.concat(this._createPropertyInfosForAggregatable(sKey, oPropertyAnnotations, oFilterRestrictionsInfo, oSortRestrictionsInfo));
|
|
1673
|
+
aProperties = aProperties.concat(this._createPropertyInfosForAggregatable(sKey, oPropertyAnnotations, oObj, oFilterRestrictionsInfo, oSortRestrictionsInfo));
|
|
1578
1674
|
}
|
|
1579
1675
|
|
|
1580
1676
|
if (oPropertyAnnotations["@Org.OData.Aggregation.V1.Groupable"]) {
|
|
@@ -1589,12 +1685,13 @@ sap.ui.define([
|
|
|
1589
1685
|
aggregatable: false,
|
|
1590
1686
|
maxConditions: ODataMetaModelUtil.isMultiValueFilterExpression(oFilterRestrictionsInfo.propertyInfo[sKey]) ? -1 : 1,
|
|
1591
1687
|
sortKey: sKey,
|
|
1592
|
-
|
|
1593
|
-
|
|
1688
|
+
dataType: oObj.$Type,
|
|
1689
|
+
//formatOptions: null,
|
|
1690
|
+
//constraints: {},
|
|
1594
1691
|
role: MDCLib.ChartItemRoleType.category, //standard, normally this should be interpreted from UI.Chart annotation
|
|
1595
1692
|
criticality: null ,//To be implemented by FE
|
|
1596
1693
|
textProperty: oPropertyAnnotations["@com.sap.vocabularies.Common.v1.Text"] ? oPropertyAnnotations["@com.sap.vocabularies.Common.v1.Text"].$Path : null //To be implemented by FE
|
|
1597
|
-
//textFormatter:
|
|
1694
|
+
//textFormatter: string-> can be used to provide a custom formatter for the textProperty
|
|
1598
1695
|
});
|
|
1599
1696
|
}
|
|
1600
1697
|
}
|
|
@@ -1603,7 +1700,7 @@ sap.ui.define([
|
|
|
1603
1700
|
}.bind(this));
|
|
1604
1701
|
};
|
|
1605
1702
|
|
|
1606
|
-
ChartDelegate._createPropertyInfosForAggregatable = function(sKey, oPropertyAnnotations, oFilterRestrictionsInfo, oSortRestrictionsInfo) {
|
|
1703
|
+
ChartDelegate._createPropertyInfosForAggregatable = function(sKey, oPropertyAnnotations, oObj, oFilterRestrictionsInfo, oSortRestrictionsInfo) {
|
|
1607
1704
|
var aProperties = [];
|
|
1608
1705
|
|
|
1609
1706
|
if (oPropertyAnnotations["@Org.OData.Aggregation.V1.SupportedAggregationMethods"]){
|
|
@@ -1618,13 +1715,10 @@ sap.ui.define([
|
|
|
1618
1715
|
aggregatable: oPropertyAnnotations["@Org.OData.Aggregation.V1.Aggregatable"],
|
|
1619
1716
|
aggregationMethod: sAggregationMethod,
|
|
1620
1717
|
maxConditions: ODataMetaModelUtil.isMultiValueFilterExpression(oFilterRestrictionsInfo.propertyInfo[sKey]) ? -1 : 1,
|
|
1621
|
-
|
|
1622
|
-
kind: "Aggregatable",//Only needed for P13n Item Panel
|
|
1623
|
-
availableRoles: this._getLayoutOptionsForType("aggregatable"), //for p13n
|
|
1624
|
-
role: MDCLib.ChartItemRoleType.axis1,
|
|
1718
|
+
dataType: oObj.$Type,
|
|
1625
1719
|
datapoint: null //To be implemented by FE
|
|
1626
1720
|
});
|
|
1627
|
-
}
|
|
1721
|
+
});
|
|
1628
1722
|
}
|
|
1629
1723
|
|
|
1630
1724
|
return aProperties;
|
|
@@ -1632,15 +1726,7 @@ sap.ui.define([
|
|
|
1632
1726
|
|
|
1633
1727
|
//Gets internal property infos by excact property name
|
|
1634
1728
|
ChartDelegate._getPropertyInfosByName = function(sName, oMDCChart){
|
|
1635
|
-
return
|
|
1636
|
-
this.fetchProperties(oMDCChart).then(function(aProperties){
|
|
1637
|
-
var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
|
|
1638
|
-
return oCurrentPropertyInfo.name === sName;
|
|
1639
|
-
});
|
|
1640
|
-
|
|
1641
|
-
resolve(oPropertyInfo);
|
|
1642
|
-
});
|
|
1643
|
-
}.bind(this));
|
|
1729
|
+
return oMDCChart._getPropertyByNameAsync(sName);
|
|
1644
1730
|
};
|
|
1645
1731
|
|
|
1646
1732
|
|