@openui5/sap.ui.mdc 1.112.2 → 1.114.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 +1 -1
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +5 -4
- package/src/sap/ui/mdc/BaseDelegate.js +49 -15
- package/src/sap/ui/mdc/Chart.js +167 -147
- package/src/sap/ui/mdc/ChartDelegate.js +525 -481
- package/src/sap/ui/mdc/Control.js +3 -2
- package/src/sap/ui/mdc/DefaultTypeMap.js +72 -0
- package/src/sap/ui/mdc/Element.js +3 -2
- package/src/sap/ui/mdc/Field.js +53 -17
- package/src/sap/ui/mdc/FilterBar.js +24 -11
- package/src/sap/ui/mdc/FilterBarDelegate.js +40 -55
- package/src/sap/ui/mdc/FilterField.js +17 -8
- package/src/sap/ui/mdc/Link.js +69 -55
- package/src/sap/ui/mdc/LinkDelegate.js +26 -30
- package/src/sap/ui/mdc/MultiValueField.js +42 -4
- package/src/sap/ui/mdc/Table.js +276 -178
- package/src/sap/ui/mdc/TableDelegate.js +187 -16
- package/src/sap/ui/mdc/ValueHelp.js +13 -14
- package/src/sap/ui/mdc/ValueHelpDelegate.js +12 -7
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +4 -9
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +194 -197
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -4
- package/src/sap/ui/mdc/chart/ChartToolbar.js +1 -1
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +42 -56
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +3 -3
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +60 -69
- package/src/sap/ui/mdc/chart/Item.js +13 -13
- package/src/sap/ui/mdc/chart/PropertyHelper.js +7 -7
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +24 -15
- package/src/sap/ui/mdc/condition/Condition.js +21 -15
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +6 -149
- package/src/sap/ui/mdc/condition/ConditionModelPropertyBinding.js +5 -3
- package/src/sap/ui/mdc/condition/FilterConverter.js +2 -22
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +910 -22
- package/src/sap/ui/mdc/condition/Operator.js +78 -42
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +3 -2
- package/src/sap/ui/mdc/condition/RangeOperator.js +104 -104
- package/src/sap/ui/mdc/enum/ConditionValidated.js +4 -1
- package/src/sap/ui/mdc/enum/ContentMode.js +1 -1
- package/src/sap/ui/mdc/enum/EditMode.js +7 -7
- package/src/sap/ui/mdc/enum/FieldDisplay.js +3 -3
- package/src/sap/ui/mdc/enum/LinkType.js +46 -0
- package/src/sap/ui/mdc/enum/OperatorOverwrite.js +34 -0
- package/src/sap/ui/mdc/field/ConditionType.js +30 -30
- package/src/sap/ui/mdc/field/ConditionsType.js +5 -5
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +22 -10
- package/src/sap/ui/mdc/field/FieldBase.js +128 -40
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +17 -28
- package/src/sap/ui/mdc/field/FieldInfoBase.js +29 -14
- 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/ListFieldHelpItem.js +9 -29
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -2
- package/src/sap/ui/mdc/field/TokenDisplay.js +2 -2
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -2
- package/src/sap/ui/mdc/field/content/ContentFactory.js +1 -1
- package/src/sap/ui/mdc/field/content/DateContent.js +43 -37
- package/src/sap/ui/mdc/field/content/LinkContent.js +8 -4
- package/src/sap/ui/mdc/field/content/UnitContent.js +11 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +33 -62
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +31 -14
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +6 -7
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +2 -4
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +0 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +13 -17
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +16 -10
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +0 -21
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +0 -18
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +0 -15
- 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/GroupFlex.js +2 -22
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -21
- package/src/sap/ui/mdc/flexibility/Util.js +11 -9
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +1 -1
- package/src/sap/ui/mdc/library.js +209 -48
- 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/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 +11 -2
- package/src/sap/ui/mdc/messagebundle_ar.properties +20 -15
- package/src/sap/ui/mdc/messagebundle_bg.properties +6 -1
- package/src/sap/ui/mdc/messagebundle_ca.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +6 -1
- package/src/sap/ui/mdc/messagebundle_de.properties +7 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_en.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +6 -1
- package/src/sap/ui/mdc/messagebundle_es.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_hu.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_kk.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_ko.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +6 -1
- package/src/sap/ui/mdc/messagebundle_nl.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +6 -1
- package/src/sap/ui/mdc/messagebundle_pl.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +11 -6
- package/src/sap/ui/mdc/messagebundle_tr.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +7 -2
- package/src/sap/ui/mdc/messagebundle_vi.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +5 -0
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +5 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +11 -4
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/TypeMap.js +81 -0
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +7 -2
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +7 -8
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +166 -19
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +40 -0
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +8 -8
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +22 -50
- 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/AdaptFiltersPanel.js +4 -0
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +12 -24
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +1 -1
- package/src/sap/ui/mdc/table/Column.js +0 -8
- package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +20 -100
- package/src/sap/ui/mdc/table/PropertyHelper.js +49 -1
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +18 -73
- package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +37 -131
- package/src/sap/ui/mdc/table/TableTypeBase.js +46 -5
- package/src/sap/ui/mdc/table/TreeTableType.js +11 -28
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/menu/Item.js +1 -1
- package/src/sap/ui/mdc/table/menu/ItemContainer.js +4 -0
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +12 -7
- package/src/sap/ui/mdc/table/utils/Personalization.js +236 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +3 -3
- package/src/sap/ui/mdc/util/DateUtil.js +10 -6
- package/src/sap/ui/mdc/util/FilterUtil.js +3 -0
- package/src/sap/ui/mdc/util/InfoBar.js +2 -3
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/util/TypeMap.js +177 -0
- package/src/sap/ui/mdc/util/TypeUtilFactory.js +183 -0
- package/src/sap/ui/mdc/valuehelp/Dialog.js +6 -5
- package/src/sap/ui/mdc/valuehelp/Popover.js +3 -2
- package/src/sap/ui/mdc/valuehelp/base/Container.js +20 -2
- package/src/sap/ui/mdc/valuehelp/base/Content.js +6 -3
- package/src/sap/ui/mdc/{field → valuehelp/base}/DefineConditionPanel.js +51 -43
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +12 -36
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +5 -2
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +9 -9
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +21 -4
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +5 -4
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +63 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +4 -2
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +8 -7
- package/test/sap/ui/mdc/testutils/opa/chart/AssertionsViz.js +4 -4
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +3 -1
- package/test/sap/ui/mdc/testutils/opa/table/Actions.js +39 -66
- package/test/sap/ui/mdc/testutils/opa/valueHelp/doWait.js +1 -1
- package/src/sap/ui/mdc/designtime/p13n/PersistenceProvider.designtime.js +0 -21
|
@@ -13,7 +13,10 @@ sap.ui.define([
|
|
|
13
13
|
"sap/m/library",
|
|
14
14
|
"sap/ui/Device",
|
|
15
15
|
"sap/base/Log",
|
|
16
|
-
"sap/m/IllustratedMessage"
|
|
16
|
+
"sap/m/IllustratedMessage",
|
|
17
|
+
"sap/m/SearchField",
|
|
18
|
+
"sap/ui/model/json/JSONModel",
|
|
19
|
+
"sap/ui/model/Filter"
|
|
17
20
|
], function(
|
|
18
21
|
Core,
|
|
19
22
|
ResponsivePopover,
|
|
@@ -24,16 +27,16 @@ sap.ui.define([
|
|
|
24
27
|
MLibrary,
|
|
25
28
|
Device,
|
|
26
29
|
Log,
|
|
27
|
-
IllustratedMessage
|
|
30
|
+
IllustratedMessage,
|
|
31
|
+
SearchField,
|
|
32
|
+
JSONModel,
|
|
33
|
+
Filter
|
|
28
34
|
) {
|
|
29
35
|
"use strict";
|
|
30
36
|
|
|
31
37
|
// shortcut for sap.m.PlacementType
|
|
32
38
|
var PlacementType = MLibrary.PlacementType;
|
|
33
39
|
|
|
34
|
-
// shortcut for sap.m.ListType
|
|
35
|
-
var ListType = MLibrary.ListType;
|
|
36
|
-
|
|
37
40
|
// shortcut for sap.m.ListMode
|
|
38
41
|
var ListMode = MLibrary.ListMode;
|
|
39
42
|
|
|
@@ -65,36 +68,67 @@ sap.ui.define([
|
|
|
65
68
|
/**
|
|
66
69
|
* Creates a drill down popover
|
|
67
70
|
* @param oMDCChart
|
|
68
|
-
* @returns the popover object
|
|
71
|
+
* @returns {sap.ui.ResponsivePopover} the popover object
|
|
69
72
|
*
|
|
70
73
|
* @private
|
|
71
74
|
* @ui5-restricted sap.ui.mdc
|
|
72
75
|
*/
|
|
73
76
|
DrillStackHandler.createDrillDownPopover = function(oMDCChart) {
|
|
77
|
+
var oList;
|
|
78
|
+
var oRb = Core.getLibraryResourceBundle("sap.ui.mdc");
|
|
79
|
+
|
|
80
|
+
var oSearchField = new SearchField({
|
|
81
|
+
placeholder: oRb.getText("chart.CHART_DRILLDOWN_SEARCH"),
|
|
82
|
+
liveChange: function(oEvent) {
|
|
83
|
+
|
|
84
|
+
if (!oList) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
var sSearchValue = oEvent.getParameter("newValue");
|
|
89
|
+
var oSearchFilter = [];
|
|
90
|
+
if (sSearchValue) {
|
|
91
|
+
oSearchFilter = new Filter("text", "Contains", sSearchValue);
|
|
92
|
+
}
|
|
93
|
+
oList.getBinding("items").filter(oSearchFilter);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
74
96
|
|
|
75
|
-
//var oSubHeader = new Bar();
|
|
76
|
-
var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
77
97
|
var oPopover = new ResponsivePopover({
|
|
78
98
|
id: oMDCChart.getId() + "-drilldownPopover",
|
|
79
99
|
contentWidth: "25rem",
|
|
80
100
|
contentHeight: "20rem",
|
|
81
|
-
placement: PlacementType.
|
|
82
|
-
|
|
101
|
+
placement: PlacementType.VerticalPreferredBottom,
|
|
102
|
+
subHeader: oSearchField,
|
|
103
|
+
afterClose: function(){
|
|
104
|
+
oPopover.destroy();
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
var oItemTemplate = new StandardListItem({
|
|
109
|
+
title: "{$ChartDrilldown>text}"
|
|
83
110
|
});
|
|
84
|
-
|
|
85
|
-
|
|
111
|
+
|
|
112
|
+
oList = new List({
|
|
113
|
+
noData: new IllustratedMessage({enableVerticalResponsiveness: true, title: oRb.getText("chart.NO_DRILLABLE_DIMENSION"), description: oRb.getText("chart.NO_DRILLABLE_DIMENSION_DESC"), illustrationType: MLibrary.IllustratedMessageType.NoDimensionsSet}),
|
|
86
114
|
mode: ListMode.SingleSelectMaster,
|
|
115
|
+
items: {
|
|
116
|
+
path: "$ChartDrilldown>/items",
|
|
117
|
+
template: oItemTemplate
|
|
118
|
+
},
|
|
87
119
|
selectionChange: function(oControlEvent) {
|
|
88
120
|
var oListItem = oControlEvent.getParameter("listItem");
|
|
89
121
|
|
|
90
122
|
if (oListItem) {
|
|
91
|
-
|
|
123
|
+
var oContext = oListItem.getBindingContext("$ChartDrilldown");
|
|
124
|
+
var sDimensionName = oContext.getObject().id;
|
|
92
125
|
|
|
126
|
+
//Call flex to capture current state before adding an item to the chart aggregation
|
|
93
127
|
oMDCChart.getEngine().createChanges({
|
|
94
128
|
control: oMDCChart,
|
|
95
129
|
key: "Item",
|
|
96
130
|
state: [{
|
|
97
|
-
name:
|
|
131
|
+
name: sDimensionName,
|
|
98
132
|
position: oMDCChart.getItems().length
|
|
99
133
|
}]
|
|
100
134
|
});
|
|
@@ -104,21 +138,6 @@ sap.ui.define([
|
|
|
104
138
|
}
|
|
105
139
|
});
|
|
106
140
|
|
|
107
|
-
oPopover.attachAfterClose(function(){
|
|
108
|
-
oPopover.destroy();
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
//TODO add search field
|
|
112
|
-
//var oSearchField = new SearchField({
|
|
113
|
-
//placeholder: this._oRb.getText("CHART_DRILLDOWN_SEARCH")
|
|
114
|
-
//});
|
|
115
|
-
//oSearchField.attachLiveChange(function(oEvent) {
|
|
116
|
-
//this._triggerSearchInDrillDownPopover(oEvent, oList);
|
|
117
|
-
//}.bind(this));
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var oRb = Core.getLibraryResourceBundle("sap.ui.mdc");
|
|
121
|
-
|
|
122
141
|
//Show header only in mobile scenarios
|
|
123
142
|
//still support screen reader while on desktops.
|
|
124
143
|
if (Device.system.desktop) {
|
|
@@ -139,8 +158,9 @@ sap.ui.define([
|
|
|
139
158
|
|
|
140
159
|
/**
|
|
141
160
|
* Shows the drill-down popover on the toolbar button of an mdc.Chart instance
|
|
142
|
-
* @param {sap.ui.mdc.Chart} oMDCChart
|
|
143
|
-
* @param {sap.m.Button} oDrillBtn
|
|
161
|
+
* @param {sap.ui.mdc.Chart} oMDCChart chart instance
|
|
162
|
+
* @param {sap.m.Button} oDrillBtn button which opens the popover
|
|
163
|
+
* @returns {Promise} promise
|
|
144
164
|
*
|
|
145
165
|
* @experimental
|
|
146
166
|
* @private
|
|
@@ -150,50 +170,21 @@ sap.ui.define([
|
|
|
150
170
|
//TODO: Rename "Measure" and "Dimensions"?
|
|
151
171
|
var pSortedDimensionsPromise = oMDCChart.getControlDelegate().getSortedDimensions(oMDCChart);
|
|
152
172
|
return pSortedDimensionsPromise.then(function(aSortedDimensions) {
|
|
153
|
-
//Remove all prior items from drill-down list
|
|
154
173
|
var oDrillDownPopover = oMDCChart._oDrillDownPopover;
|
|
155
|
-
var aIgnoreDimensions
|
|
156
|
-
|
|
157
|
-
var aFilteredList = oDrillDownPopover.getContent().filter(function(oEntry){return oEntry.getMetadata().getClass() == List;});
|
|
158
|
-
var oDrillDownList = aFilteredList.length > 0 ? aFilteredList[0] : null;
|
|
159
|
-
|
|
160
|
-
if (!oDrillDownList){
|
|
161
|
-
Log.error("MDC Chart: Could not determine list to show drilldown. This should not happen. Did the application modify the drill-down popover?");
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
oDrillDownList.destroyItems();
|
|
174
|
+
var aIgnoreDimensions;
|
|
166
175
|
|
|
167
176
|
// Ignore currently applied dimensions from drill-stack for selection
|
|
168
177
|
aIgnoreDimensions = _getDrillStackDimensions(oMDCChart);
|
|
178
|
+
aSortedDimensions = aSortedDimensions.filter(function(oDimension){ return aIgnoreDimensions.indexOf(oDimension.name) < 0; });
|
|
169
179
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
//TODO: Check if still valid
|
|
178
|
-
// If dimension is not filterable and datapoints are selected then skip
|
|
179
|
-
/*if (!oViewField.filterable && this._oChart.getSelectedDataPoints().count > 0) {
|
|
180
|
-
continue;
|
|
181
|
-
}*/
|
|
182
|
-
|
|
183
|
-
oListItem = new StandardListItem({
|
|
184
|
-
title: oDimension.label,
|
|
185
|
-
type: ListType.Active
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
oListItem.data("dim", {dim: oDimension});
|
|
189
|
-
|
|
190
|
-
/*sTooltip = this._getFieldTooltip(oDimension.name);
|
|
191
|
-
if (sTooltip) {
|
|
192
|
-
oListItem.setTooltip(sTooltip);
|
|
193
|
-
}*/
|
|
180
|
+
var oData = { items : [] };
|
|
181
|
+
aSortedDimensions.forEach(function(oDimension) {
|
|
182
|
+
oData.items.push({ text: oDimension.label, id: oDimension.name });
|
|
183
|
+
});
|
|
184
|
+
oDrillDownPopover.setModel(new JSONModel(oData), "$ChartDrilldown");
|
|
194
185
|
|
|
195
|
-
|
|
196
|
-
|
|
186
|
+
if (oData.items.length < 7) {
|
|
187
|
+
oDrillDownPopover.getSubHeader().setVisible(false);
|
|
197
188
|
}
|
|
198
189
|
|
|
199
190
|
return new Promise(function(resolve, reject) {
|
|
@@ -6,23 +6,20 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/core/Element",
|
|
8
8
|
"sap/base/Log"
|
|
9
|
-
], function(Element, Log) {
|
|
9
|
+
], function (Element, Log) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
|
-
// Provides the Item class.
|
|
13
12
|
/**
|
|
14
|
-
* Constructor for a new Item
|
|
13
|
+
* Constructor for a new <code>Item</code>.
|
|
15
14
|
*
|
|
16
15
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
17
16
|
* @param {object} [mSettings] initial settings for the new control
|
|
18
|
-
* @class The <code>Item</code> control for the
|
|
19
|
-
* behavior.
|
|
17
|
+
* @class The <code>Item</code> control for the chart/property metadata used within MDC Chart. An instance can be created to override the default/metadata behavior.
|
|
20
18
|
* @extends sap.ui.core.Element
|
|
21
19
|
* @author SAP SE
|
|
22
20
|
* @private
|
|
23
21
|
* @ui5-restricted sap.fe
|
|
24
22
|
* @MDC_PUBLIC_CANDIDATE
|
|
25
|
-
* @experimental
|
|
26
23
|
* @since 1.88
|
|
27
24
|
* @alias sap.ui.mdc.chart.Item
|
|
28
25
|
*/
|
|
@@ -44,19 +41,22 @@ sap.ui.define([
|
|
|
44
41
|
label: {
|
|
45
42
|
type: "string"
|
|
46
43
|
},
|
|
47
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Specifies the type of the item for the chart (groupable and aggregateable).
|
|
46
|
+
* This is specific for the used chart library.
|
|
47
|
+
*/
|
|
48
48
|
type: {
|
|
49
|
-
type:"string",
|
|
50
|
-
defaultValue:""
|
|
49
|
+
type: "string",
|
|
50
|
+
defaultValue: ""
|
|
51
51
|
},
|
|
52
52
|
/**
|
|
53
|
-
* Specifies the role of the item for the chart.
|
|
53
|
+
* Specifies the role of the item for the chart (category, axis1...).
|
|
54
54
|
* This is specific for the used chart library.
|
|
55
|
-
*
|
|
55
|
+
* <b>NOTE:</b> This property must not be changed after initialization.
|
|
56
56
|
*/
|
|
57
57
|
role: {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
type: "string"
|
|
59
|
+
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
}
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @extends sap.ui.mdc.util.PropertyHelper
|
|
27
27
|
*
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.114.0
|
|
30
30
|
*
|
|
31
31
|
* @private
|
|
32
32
|
* @experimental
|
|
@@ -101,12 +101,12 @@ sap.ui.define([
|
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
/**
|
|
105
|
+
* This returns the layout options for a specific type of Item (measure/dimension,groupable/aggregatable)
|
|
106
|
+
* It is used by p13n to determine which layout options to show in the p13n panel
|
|
107
|
+
* @param {string} sType the type for which the layout options are requested
|
|
108
|
+
*/
|
|
109
|
+
PropertyHelper.prototype._getLayoutOptionsForType = function(sType){
|
|
110
110
|
var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
111
111
|
var oAvailableRoles = {
|
|
112
112
|
groupable: [
|
|
@@ -5,37 +5,46 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/core/Element"
|
|
8
|
-
], function(Element) {
|
|
8
|
+
], function (Element) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
|
-
// The aggregation to feed details actions for datapoint selection in the mdc chart
|
|
12
11
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
* Constructor for a new SelectionDetailsActions.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
15
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
16
|
+
*
|
|
17
|
+
* @extends sap.ui.core.Element
|
|
18
|
+
* @author SAP SE
|
|
19
|
+
* @class The SelectionDetailsActions are used to provide additional functionality to the Details popover.
|
|
20
|
+
*
|
|
21
|
+
* @ui5-restricted sap.fe
|
|
22
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
23
|
+
* @since 1.88
|
|
24
|
+
* @alias sap.ui.mdc.chart.SelectionDetailsActions
|
|
25
|
+
*/
|
|
26
26
|
var SelectionDetailsActions = Element.extend("sap.ui.mdc.chart.SelectionDetailsActions", {
|
|
27
27
|
|
|
28
28
|
metadata: {
|
|
29
29
|
library: "sap.ui.mdc",
|
|
30
30
|
aggregations: {
|
|
31
|
+
/**
|
|
32
|
+
* Action <code>item</code> shown in the Items area of the details.
|
|
33
|
+
*/
|
|
31
34
|
detailsItemActions: {
|
|
32
35
|
type: "sap.ui.core.Item",
|
|
33
36
|
multiple: true
|
|
34
37
|
},
|
|
38
|
+
/**
|
|
39
|
+
* Action <code>item</code> shown in the Details area of the details.
|
|
40
|
+
*/
|
|
35
41
|
detailsActions: {
|
|
36
42
|
type: "sap.ui.core.Item",
|
|
37
43
|
multiple: true
|
|
38
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* Action <code>item</code> shown in the Groups area of the details.
|
|
47
|
+
*/
|
|
39
48
|
actionGroups: {
|
|
40
49
|
type: "sap.ui.core.Item",
|
|
41
50
|
multiple: true
|
|
@@ -13,6 +13,12 @@ sap.ui.define([
|
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
+
var fnSerializeCondition = function (oCondition) {
|
|
17
|
+
return JSON.stringify(Object.assign({}, oCondition, {isEmpty: undefined}), function (sKey, vValue) {
|
|
18
|
+
return vValue === undefined ? '[undefined]' : vValue;
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* @namespace
|
|
18
24
|
* @name sap.ui.mdc.condition
|
|
@@ -20,6 +26,7 @@ sap.ui.define([
|
|
|
20
26
|
* @private
|
|
21
27
|
* @experimental As of version 1.61
|
|
22
28
|
* @ui5-restricted sap.fe
|
|
29
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
23
30
|
*/
|
|
24
31
|
|
|
25
32
|
/**
|
|
@@ -28,7 +35,7 @@ sap.ui.define([
|
|
|
28
35
|
*
|
|
29
36
|
* @namespace
|
|
30
37
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
38
|
+
* @version 1.114.0
|
|
32
39
|
* @since 1.61.0
|
|
33
40
|
* @alias sap.ui.mdc.condition.Condition
|
|
34
41
|
*
|
|
@@ -46,11 +53,11 @@ sap.ui.define([
|
|
|
46
53
|
* @constant
|
|
47
54
|
* @typedef {object} sap.ui.mdc.condition.ConditionObject
|
|
48
55
|
* @property {string} operator Operator of the condition
|
|
49
|
-
* @property {any[]} values Array of values of the condition. Depending on the <code>operator</code>, this contains one or more entries
|
|
50
|
-
* @property {object} [inParameters] In parameters of the condition. For each field path, a value is stored
|
|
51
|
-
* @property {object} [outParameters] Out parameters of the condition. For each field path, a value is stored
|
|
52
|
-
* @property {boolean} [isEmpty] If set, the condition is empty (used as dummy condition in {@link sap.ui.mdc.
|
|
53
|
-
* @property {sap.ui.mdc.enum.ConditionValidated} validated If set to <code>ConditionValidated.Validated</code>, the condition is validated (by the
|
|
56
|
+
* @property {any[]} values Array of values of the condition. Depending on the <code>operator</code>, this contains one or more entries. The entries are sored in internal format regarding the used data type.
|
|
57
|
+
* @property {object} [inParameters] In parameters of the condition. For each field path, a value is stored. (It is obsolete and only filled for conditions stored on old user-variants.)
|
|
58
|
+
* @property {object} [outParameters] Out parameters of the condition. For each field path, a value is stored. (It is obsolete and only filled for conditions stored on old user-variants.)
|
|
59
|
+
* @property {boolean} [isEmpty] If set, the condition is empty (used as dummy condition in {@link sap.ui.mdc.valuehelp.base.DefineConditionPanel DefineConditionPanel})
|
|
60
|
+
* @property {sap.ui.mdc.enum.ConditionValidated} validated If set to <code>ConditionValidated.Validated</code>, the condition is validated (by the value help) and not shown in the {@link sap.ui.mdc.valuehelp.base.DefineConditionPanel DefineConditionPanel} control
|
|
54
61
|
* @property {object} [payload] Payload of the condition. Set by application. Data needs to be stringified. (as stored and loaded in variants)
|
|
55
62
|
* @private
|
|
56
63
|
* @ui5-restricted sap.fe
|
|
@@ -58,15 +65,15 @@ sap.ui.define([
|
|
|
58
65
|
*/
|
|
59
66
|
|
|
60
67
|
/**
|
|
61
|
-
* Creates a condition instance for a condition representing a item chosen from the
|
|
68
|
+
* Creates a condition instance for a condition representing a item chosen from the value help.
|
|
62
69
|
*
|
|
63
70
|
* This is a "equal to" (EQ) condition with key and description. It is used for entries selected in the field help
|
|
64
71
|
* and for everything entered in the {@link sap.ui.mdc.Field Field} control.
|
|
65
72
|
*
|
|
66
73
|
* @param {string} sKey Operator for the condition
|
|
67
74
|
* @param {string} sDescription Description of the operator
|
|
68
|
-
* @param {object} [oInParameters] In parameters of the condition
|
|
69
|
-
* @param {object} [oOutParameters] Out parameters of the condition
|
|
75
|
+
* @param {object} [oInParameters] In parameters of the condition. (Do not use it for new conditions, use payload instead.)
|
|
76
|
+
* @param {object} [oOutParameters] Out parameters of the condition. (Do not use it for new conditions, use payload instead.)
|
|
70
77
|
* @param {object} [oPayload] Payload of the condition
|
|
71
78
|
* @returns {sap.ui.mdc.condition.ConditionObject} The new condition object with the EQ operator along with <code>sKey</code> and <code>sDescription</code> as <code>aValues</code>
|
|
72
79
|
* @private
|
|
@@ -90,8 +97,8 @@ sap.ui.define([
|
|
|
90
97
|
*
|
|
91
98
|
* @param {string} sOperator Operator for the condition
|
|
92
99
|
* @param {any[]} aValues Array of values for the condition
|
|
93
|
-
* @param {object} [oInParameters] In parameters of the condition
|
|
94
|
-
* @param {object} [oOutParameters] Out parameters of the condition
|
|
100
|
+
* @param {object} [oInParameters] In parameters of the condition. (Do not use it for new conditions, use payload instead.)
|
|
101
|
+
* @param {object} [oOutParameters] Out parameters of the condition. (Do not use it for new conditions, use payload instead.)
|
|
95
102
|
* @param {sap.ui.mdc.enum.ConditionValidated} sValidated If set to <code>ConditionValidated.Validated</code>, the condition is validated (by the field help) and not shown in the <code>DefineConditionPanel</code> control
|
|
96
103
|
* @param {object} [oPayload] Payload of the condition
|
|
97
104
|
* @returns {sap.ui.mdc.condition.ConditionObject} The new condition object with the given operator and values
|
|
@@ -117,7 +124,7 @@ sap.ui.define([
|
|
|
117
124
|
/**
|
|
118
125
|
* Compares two conditions in detail
|
|
119
126
|
*
|
|
120
|
-
* Opposed to <code>FilterOperatorUtil.compareConditions</code> this comparison checks the whole condition object for equality except the
|
|
127
|
+
* Opposed to <code>FilterOperatorUtil.compareConditions</code> this comparison checks the whole condition object for equality except the {@link sap.ui.mdc.valuehelp.base.DefineConditionPanel DefineConditionPanel} specific <code>isEmpty</code> flag.
|
|
121
128
|
*
|
|
122
129
|
* @param {undefined|sap.ui.mdc.condition.ConditionObject} oCondition1 Condition to check
|
|
123
130
|
* @param {undefined|sap.ui.mdc.condition.ConditionObject} oCondition2 Condition to check
|
|
@@ -126,9 +133,8 @@ sap.ui.define([
|
|
|
126
133
|
* @ui5-restricted sap.ui.mdc
|
|
127
134
|
*/
|
|
128
135
|
compareConditions: function(oCondition1, oCondition2) {
|
|
129
|
-
var
|
|
130
|
-
var
|
|
131
|
-
var sCheckValue2 = JSON.stringify(Object.assign({}, oCondition2, oIgnoredKeys));
|
|
136
|
+
var sCheckValue1 = fnSerializeCondition(oCondition1);
|
|
137
|
+
var sCheckValue2 = fnSerializeCondition(oCondition2);
|
|
132
138
|
return sCheckValue1 === sCheckValue2;
|
|
133
139
|
|
|
134
140
|
},
|
|
@@ -13,7 +13,8 @@ sap.ui.define([
|
|
|
13
13
|
'sap/base/util/deepEqual',
|
|
14
14
|
'sap/base/Log',
|
|
15
15
|
'sap/ui/mdc/condition/Condition',
|
|
16
|
-
"sap/ui/mdc/condition/FilterConverter"
|
|
16
|
+
"sap/ui/mdc/condition/FilterConverter",
|
|
17
|
+
'sap/ui/core/date/UI5Date'
|
|
17
18
|
],
|
|
18
19
|
function (
|
|
19
20
|
ConditionModelPropertyBinding,
|
|
@@ -25,7 +26,8 @@ sap.ui.define([
|
|
|
25
26
|
deepEqual,
|
|
26
27
|
Log,
|
|
27
28
|
Condition,
|
|
28
|
-
FilterConverter
|
|
29
|
+
FilterConverter,
|
|
30
|
+
UI5Date
|
|
29
31
|
) {
|
|
30
32
|
"use strict";
|
|
31
33
|
|
|
@@ -35,7 +37,7 @@ sap.ui.define([
|
|
|
35
37
|
* @extends sap.ui.model.json.JSONModel
|
|
36
38
|
*
|
|
37
39
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
40
|
+
* @version 1.114.0
|
|
39
41
|
* @since 1.48.0
|
|
40
42
|
* @alias sap.ui.mdc.condition.ConditionModel
|
|
41
43
|
*
|
|
@@ -501,154 +503,9 @@ sap.ui.define([
|
|
|
501
503
|
return oFieldPath[sEscapedFieldPath];
|
|
502
504
|
};
|
|
503
505
|
|
|
504
|
-
// ConditionModel.prototype._prettyPrintFilters = function (oFilter) {
|
|
505
|
-
// var sRes;
|
|
506
|
-
// if (!oFilter) {
|
|
507
|
-
// return "";
|
|
508
|
-
// }
|
|
509
|
-
// if (oFilter._bMultiFilter) {
|
|
510
|
-
// sRes = "";
|
|
511
|
-
// var bAnd = oFilter.bAnd;
|
|
512
|
-
// oFilter.aFilters.forEach(function (oFilter, index, aFilters) {
|
|
513
|
-
// sRes += this._prettyPrintFilters(oFilter);
|
|
514
|
-
// if (aFilters.length - 1 != index) {
|
|
515
|
-
// sRes += bAnd ? " and " : " or ";
|
|
516
|
-
// }
|
|
517
|
-
// }, this);
|
|
518
|
-
// return "(" + sRes + ")";
|
|
519
|
-
// } else {
|
|
520
|
-
// sRes = oFilter.sPath + " " + oFilter.sOperator + " '" + oFilter.oValue1 + "'";
|
|
521
|
-
// if (oFilter.sOperator === "BT") {
|
|
522
|
-
// sRes += "...'" + oFilter.oValue2 + "'";
|
|
523
|
-
// }
|
|
524
|
-
// return sRes;
|
|
525
|
-
// }
|
|
526
|
-
// };
|
|
527
|
-
|
|
528
506
|
ConditionModel.prototype.getFilters = function (sFieldPath) {
|
|
529
507
|
Log.error("ConditionModel", "usage or deprecated getFilters() function! Please use the FilterConverter.createFilters() function instead.");
|
|
530
508
|
return FilterConverter.createFilters( this.getAllConditions(), {});
|
|
531
|
-
|
|
532
|
-
// var i, aLocalFilters, aLocalNEFilters, aOverallFilters = [],
|
|
533
|
-
// oConditions,
|
|
534
|
-
// oToAnyFilterParam, aSections, sNavPath, sPropertyPath;
|
|
535
|
-
|
|
536
|
-
// if (sFieldPath === undefined) {
|
|
537
|
-
// oConditions = this.getAllConditions();
|
|
538
|
-
// } else if (typeof sFieldPath === "string") {
|
|
539
|
-
// oConditions = {};
|
|
540
|
-
// oConditions[sFieldPath] = this.getConditions(sFieldPath);
|
|
541
|
-
// } else {
|
|
542
|
-
// oConditions = {};
|
|
543
|
-
// }
|
|
544
|
-
|
|
545
|
-
// var oOperator, oFilter;
|
|
546
|
-
|
|
547
|
-
// // OR-combine filters for each property
|
|
548
|
-
// for (var sMyFieldPath in oConditions) {
|
|
549
|
-
// aLocalFilters = [];
|
|
550
|
-
// aLocalNEFilters = [];
|
|
551
|
-
// oToAnyFilterParam = null;
|
|
552
|
-
// var aConditions = oConditions[sMyFieldPath];
|
|
553
|
-
// var oFieldPath = this.getProperty("/fieldPath");
|
|
554
|
-
// var oFildPathInfo = oFieldPath[sMyFieldPath]; // to get unescaped fieldPath
|
|
555
|
-
// var sFilterPath = oFildPathInfo ? oFildPathInfo.fieldPath : sMyFieldPath;
|
|
556
|
-
|
|
557
|
-
// for (i = 0; i < aConditions.length; i++) {
|
|
558
|
-
// // only collect conditions for fieldPath and operator != NE
|
|
559
|
-
// oOperator = FilterOperatorUtil.getOperator(aConditions[i].operator);
|
|
560
|
-
|
|
561
|
-
// if (!oOperator) {
|
|
562
|
-
// continue; // ignore unknown operators
|
|
563
|
-
// }
|
|
564
|
-
|
|
565
|
-
// oFilter = oOperator.getModelFilter(aConditions[i], sFilterPath);
|
|
566
|
-
|
|
567
|
-
// if (!oOperator.exclude) {
|
|
568
|
-
|
|
569
|
-
// if (oFilter.sPath === "$search") {
|
|
570
|
-
// //ignore the $search conditions
|
|
571
|
-
// continue;
|
|
572
|
-
// }
|
|
573
|
-
|
|
574
|
-
// // basic search condition handling split the oFilter with sPath == "*xxx,yyy*" into multiple filter
|
|
575
|
-
// // e.g. fieldPath "*title,year*" - such fieldPath onlyworks with type string and an operation with a single value (e.g. contains)
|
|
576
|
-
// //TODO this should be removed. Only $search will be supported as sPath. This mapping of a *fieldPath1,FieldPath2* is currently only used on the mockServer
|
|
577
|
-
// var $searchfilters = /^\*(.+)\*$/.exec(oFilter.sPath);
|
|
578
|
-
// if ($searchfilters) {
|
|
579
|
-
// // $search mapping
|
|
580
|
-
// var aFieldPath = $searchfilters[1].split(',');
|
|
581
|
-
// for (var j = 0; j < aFieldPath.length; j++) {
|
|
582
|
-
// aLocalFilters.push(new Filter(aFieldPath[j], oFilter.sOperator, oFilter.oValue1));
|
|
583
|
-
// }
|
|
584
|
-
// continue;
|
|
585
|
-
// }
|
|
586
|
-
|
|
587
|
-
// // ANY condition handling e.g. fieldPath "navPath*/propertyPath"
|
|
588
|
-
// if (oFilter.sPath && oFilter.sPath.indexOf('*/') > -1) {
|
|
589
|
-
// aSections = oFilter.sPath.split('*/');
|
|
590
|
-
// if (aSections.length === 2) {
|
|
591
|
-
// sNavPath = aSections[0];
|
|
592
|
-
// sPropertyPath = aSections[1];
|
|
593
|
-
// oFilter.sPath = 'L1/' + sPropertyPath;
|
|
594
|
-
|
|
595
|
-
// if (!oToAnyFilterParam) {
|
|
596
|
-
// oToAnyFilterParam = {
|
|
597
|
-
// path: sNavPath,
|
|
598
|
-
// operator: 'Any',
|
|
599
|
-
// variable: 'L1'
|
|
600
|
-
// };
|
|
601
|
-
// }
|
|
602
|
-
// aLocalFilters.push(oFilter);
|
|
603
|
-
// } else {
|
|
604
|
-
// throw new Error("Not Implemented");
|
|
605
|
-
// }
|
|
606
|
-
// } else {
|
|
607
|
-
// aLocalFilters.push(oFilter);
|
|
608
|
-
// }
|
|
609
|
-
// } else {
|
|
610
|
-
// //collect all exclude (NE) conditions as AND fieldPath != "value"
|
|
611
|
-
// aLocalNEFilters.push(oFilter);
|
|
612
|
-
// }
|
|
613
|
-
// }
|
|
614
|
-
|
|
615
|
-
// if (oToAnyFilterParam) {
|
|
616
|
-
// if (aLocalFilters.length === 1) {
|
|
617
|
-
// oToAnyFilterParam.condition = aLocalFilters[0];
|
|
618
|
-
// } else if (aLocalFilters.length > 1) {
|
|
619
|
-
// oToAnyFilterParam.condition = new Filter({ filters: aLocalFilters, and: false });
|
|
620
|
-
// }
|
|
621
|
-
// aLocalFilters = [new Filter(oToAnyFilterParam)];
|
|
622
|
-
// }
|
|
623
|
-
|
|
624
|
-
// // take the single Filter or combine all with OR
|
|
625
|
-
// oFilter = undefined;
|
|
626
|
-
// if (aLocalFilters.length === 1) {
|
|
627
|
-
// oFilter = aLocalFilters[0]; // could omit this and have an OR-ed array with only one filter, but it's nice this way.
|
|
628
|
-
// } else if (aLocalFilters.length > 1) {
|
|
629
|
-
// oFilter = new Filter({ filters: aLocalFilters, and: false });
|
|
630
|
-
// }
|
|
631
|
-
|
|
632
|
-
// // merge Include-filter and all NE-filter into the Overallfilter, they will be AND added to the result
|
|
633
|
-
// if (oFilter) {
|
|
634
|
-
// aLocalNEFilters.unshift(oFilter); // add in-filters to the beginning (better to read)
|
|
635
|
-
// }
|
|
636
|
-
|
|
637
|
-
// if (aLocalNEFilters.length === 1) {
|
|
638
|
-
// aOverallFilters.push(aLocalNEFilters[0]);
|
|
639
|
-
// } else if (aLocalNEFilters.length > 1) {
|
|
640
|
-
// aOverallFilters.push(new Filter({ filters: aLocalNEFilters, and: true })); // to have all filters for one path grouped
|
|
641
|
-
// }
|
|
642
|
-
// }
|
|
643
|
-
|
|
644
|
-
// // AND-combine filters for different properties and apply filters
|
|
645
|
-
// if (aOverallFilters.length === 1) {
|
|
646
|
-
// return aOverallFilters[0]; // could omit this and have an ORed array with only one filter, but it's nice this way.
|
|
647
|
-
// } else if (aOverallFilters.length > 1) {
|
|
648
|
-
// return new Filter({ filters: aOverallFilters, and: true });
|
|
649
|
-
// } else { // no filters
|
|
650
|
-
// return null;
|
|
651
|
-
// }
|
|
652
509
|
};
|
|
653
510
|
|
|
654
511
|
ConditionModel.prototype.serialize = function () {
|
|
@@ -674,7 +531,7 @@ sap.ui.define([
|
|
|
674
531
|
if (!isNaN(parseInt(key)) && (typeof value === 'string')) {
|
|
675
532
|
a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/.exec(value);
|
|
676
533
|
if (a) {
|
|
677
|
-
return
|
|
534
|
+
return UI5Date.getInstance(value);
|
|
678
535
|
}
|
|
679
536
|
}
|
|
680
537
|
return value;
|
|
@@ -9,13 +9,15 @@ sap.ui.define([
|
|
|
9
9
|
'sap/ui/model/ChangeReason',
|
|
10
10
|
'sap/ui/model/json/JSONPropertyBinding',
|
|
11
11
|
'sap/base/util/merge',
|
|
12
|
-
'sap/base/util/deepEqual'
|
|
12
|
+
'sap/base/util/deepEqual',
|
|
13
|
+
'sap/ui/core/date/UI5Date'
|
|
13
14
|
],
|
|
14
15
|
function(
|
|
15
16
|
ChangeReason,
|
|
16
17
|
JSONPropertyBinding,
|
|
17
18
|
merge,
|
|
18
|
-
deepEqual
|
|
19
|
+
deepEqual,
|
|
20
|
+
UI5Date
|
|
19
21
|
) {
|
|
20
22
|
"use strict";
|
|
21
23
|
|
|
@@ -89,7 +91,7 @@ sap.ui.define([
|
|
|
89
91
|
} else if (Array.isArray(oValue)) {
|
|
90
92
|
oCopy = merge([], oValue);
|
|
91
93
|
} else if (oValue instanceof Date) {
|
|
92
|
-
oCopy =
|
|
94
|
+
oCopy = UI5Date.getInstance(oValue);
|
|
93
95
|
} else if (typeof oValue === "object") {
|
|
94
96
|
oCopy = merge({}, oValue);
|
|
95
97
|
} else {
|