@openui5/sap.ui.mdc 1.93.3 → 1.96.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +236 -334
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +150 -22
- package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
- package/src/sap/ui/mdc/ChartNew.js +107 -66
- package/src/sap/ui/mdc/Control.js +4 -3
- package/src/sap/ui/mdc/Element.js +5 -4
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -10
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +160 -79
- package/src/sap/ui/mdc/TableDelegate.js +20 -3
- package/src/sap/ui/mdc/ValueHelp.js +1474 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
- package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
- package/src/sap/ui/mdc/chart/Item.js +2 -3
- package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
- package/src/sap/ui/mdc/condition/Operator.js +4 -4
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
- package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +19 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
- 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 +38 -14
- package/src/sap/ui/mdc/field/FieldBase.js +92 -41
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
- package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
- package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
- package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
- package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
- package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +588 -8
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +31 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
- package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +3 -2
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
- 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/modification/ModificationHandler.js +22 -24
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
- package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
- package/src/sap/ui/mdc/table/Column.js +35 -9
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +0 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -4,8 +4,51 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
'sap/ui/mdc/p13n/subcontroller/FilterController',
|
|
8
|
-
|
|
7
|
+
'sap/ui/mdc/p13n/subcontroller/FilterController',
|
|
8
|
+
'sap/ui/core/library',
|
|
9
|
+
'sap/ui/mdc/p13n/FlexUtil',
|
|
10
|
+
'sap/ui/Device',
|
|
11
|
+
'sap/ui/mdc/Control',
|
|
12
|
+
'sap/base/Log',
|
|
13
|
+
'sap/base/util/merge',
|
|
14
|
+
'sap/ui/model/base/ManagedObjectModel',
|
|
15
|
+
'sap/ui/base/ManagedObjectObserver',
|
|
16
|
+
'sap/ui/mdc/condition/ConditionModel',
|
|
17
|
+
'sap/ui/mdc/condition/Condition',
|
|
18
|
+
'sap/ui/mdc/util/IdentifierUtil',
|
|
19
|
+
'sap/ui/mdc/condition/ConditionConverter',
|
|
20
|
+
"sap/ui/mdc/p13n/StateUtil",
|
|
21
|
+
"sap/ui/mdc/condition/FilterConverter",
|
|
22
|
+
"sap/ui/mdc/util/FilterUtil",
|
|
23
|
+
"sap/ui/mdc/filterbar/PropertyHelper",
|
|
24
|
+
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
25
|
+
"sap/m/library",
|
|
26
|
+
"sap/m/Button",
|
|
27
|
+
'sap/m/MessageBox',
|
|
28
|
+
"sap/ui/core/ShortcutHintsMixin"],
|
|
29
|
+
function(
|
|
30
|
+
FilterController,
|
|
31
|
+
coreLibrary,
|
|
32
|
+
FlexUtil,
|
|
33
|
+
Device,
|
|
34
|
+
Control,
|
|
35
|
+
Log,
|
|
36
|
+
merge,
|
|
37
|
+
ManagedObjectModel,
|
|
38
|
+
ManagedObjectObserver,
|
|
39
|
+
ConditionModel,
|
|
40
|
+
Condition,
|
|
41
|
+
IdentifierUtil,
|
|
42
|
+
ConditionConverter,
|
|
43
|
+
StateUtil,
|
|
44
|
+
FilterConverter,
|
|
45
|
+
FilterUtil,
|
|
46
|
+
PropertyHelper,
|
|
47
|
+
ControlVariantApplyAPI,
|
|
48
|
+
mLibrary,
|
|
49
|
+
Button,
|
|
50
|
+
MessageBox,
|
|
51
|
+
ShortcutHintsMixin) {
|
|
9
52
|
"use strict";
|
|
10
53
|
|
|
11
54
|
var ValueState = coreLibrary.ValueState;
|
|
@@ -17,7 +60,7 @@ sap.ui.define([
|
|
|
17
60
|
* @class The <code>FilterBarBase</code> control is used as a faceless base class for common functionality of any MDC FilterBar derivation.
|
|
18
61
|
* @extends sap.ui.mdc.Control
|
|
19
62
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
63
|
+
* @version 1.96.1
|
|
21
64
|
* @constructor
|
|
22
65
|
* @private
|
|
23
66
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -29,6 +72,7 @@ sap.ui.define([
|
|
|
29
72
|
{
|
|
30
73
|
metadata: {
|
|
31
74
|
library: "sap.ui.mdc",
|
|
75
|
+
designtime: "sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime",
|
|
32
76
|
defaultAggregation: "filterItems",
|
|
33
77
|
interfaces : [
|
|
34
78
|
"sap.ui.mdc.IFilter",
|
|
@@ -234,8 +278,6 @@ sap.ui.define([
|
|
|
234
278
|
|
|
235
279
|
this._bPersistValues = false;
|
|
236
280
|
|
|
237
|
-
this._aProperties = null;
|
|
238
|
-
|
|
239
281
|
this._fResolveInitialFiltersApplied = undefined;
|
|
240
282
|
this._oInitialFiltersAppliedPromise = new Promise(function(resolve) {
|
|
241
283
|
this._fResolveInitialFiltersApplied = resolve;
|
|
@@ -574,7 +616,7 @@ sap.ui.define([
|
|
|
574
616
|
|
|
575
617
|
if (this._bPersistValues && this._isPersistenceSupported()) {
|
|
576
618
|
var mOrigConditions = {};
|
|
577
|
-
mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, oEvent.getParameter("value"));
|
|
619
|
+
mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, merge([], oEvent.getParameter("value")));
|
|
578
620
|
this._cleanupConditions(mOrigConditions[sFieldPath]);
|
|
579
621
|
|
|
580
622
|
var oChangePromise = this.getEngine().createChanges({
|
|
@@ -672,7 +714,6 @@ sap.ui.define([
|
|
|
672
714
|
return oResultCondition;
|
|
673
715
|
};
|
|
674
716
|
|
|
675
|
-
|
|
676
717
|
FilterBarBase.prototype._stringifyConditions = function(sFieldPath, aConditions) {
|
|
677
718
|
var oProperty = this._getPropertyByName(sFieldPath);
|
|
678
719
|
var aResultConditions = aConditions;
|
|
@@ -720,8 +761,16 @@ sap.ui.define([
|
|
|
720
761
|
FilterBarBase.prototype.onReset = function(oEvent) {
|
|
721
762
|
this._getConditionModel().oConditionModel.removeAllConditions();
|
|
722
763
|
};
|
|
764
|
+
|
|
723
765
|
FilterBarBase.prototype.onSearch = function(oEvent) {
|
|
724
|
-
this.
|
|
766
|
+
if (!this._bSearchPressed) {
|
|
767
|
+
this._bSearchPressed = true;
|
|
768
|
+
this.triggerSearch().then(function() {
|
|
769
|
+
this._bSearchPressed = false;
|
|
770
|
+
}.bind(this), function(){
|
|
771
|
+
this._bSearchPressed = false;
|
|
772
|
+
}.bind(this));
|
|
773
|
+
}
|
|
725
774
|
};
|
|
726
775
|
|
|
727
776
|
/**
|
|
@@ -735,7 +784,7 @@ sap.ui.define([
|
|
|
735
784
|
this._bSearchTriggered = true;
|
|
736
785
|
return Promise.resolve();
|
|
737
786
|
}
|
|
738
|
-
return this.
|
|
787
|
+
return this.validate().then(function(){
|
|
739
788
|
this.fireSearch();
|
|
740
789
|
}.bind(this));
|
|
741
790
|
};
|
|
@@ -750,24 +799,24 @@ sap.ui.define([
|
|
|
750
799
|
* @returns {Promise} Returns a Promise which resolves after the validation of erroneous fields has been propagated.
|
|
751
800
|
*
|
|
752
801
|
*/
|
|
753
|
-
FilterBarBase.prototype.
|
|
802
|
+
FilterBarBase.prototype.validate = function() {
|
|
754
803
|
|
|
755
804
|
return this.initialized().then(function() {
|
|
756
|
-
if (!this.
|
|
805
|
+
if (!this._oValidationPromise) {
|
|
757
806
|
|
|
758
|
-
this.
|
|
807
|
+
this._oValidationPromise = new Promise(function(resolve, reject) {
|
|
759
808
|
this._fResolvedSearchPromise = resolve;
|
|
760
809
|
this._fRejectedSearchPromise = reject;
|
|
761
810
|
}.bind(this));
|
|
762
811
|
|
|
763
812
|
var fDelayedFunction = function() {
|
|
764
813
|
this._validate();
|
|
765
|
-
this.
|
|
814
|
+
this._oValidationPromise = null;
|
|
766
815
|
};
|
|
767
816
|
setTimeout(fDelayedFunction.bind(this), 0);
|
|
768
817
|
}
|
|
769
818
|
|
|
770
|
-
return this.
|
|
819
|
+
return this._oValidationPromise;
|
|
771
820
|
|
|
772
821
|
}.bind(this));
|
|
773
822
|
};
|
|
@@ -844,8 +893,17 @@ sap.ui.define([
|
|
|
844
893
|
var oPromise = oEvent.getParameter("promise");
|
|
845
894
|
if (oPromise) {
|
|
846
895
|
oPromise.then(function() {
|
|
847
|
-
this.
|
|
848
|
-
|
|
896
|
+
if (this._aCollectedChangePromises && this._aCollectedChangePromises.length > 0) {
|
|
897
|
+
var aChangePromises = this._aCollectedChangePromises.slice();
|
|
898
|
+
Promise.all(aChangePromises).then(function() {
|
|
899
|
+
this.triggerSearch();
|
|
900
|
+
}.bind(this));
|
|
901
|
+
} else {
|
|
902
|
+
this.triggerSearch();
|
|
903
|
+
}
|
|
904
|
+
}.bind(this)).catch(function(oEx) {
|
|
905
|
+
Log.error(oEx);
|
|
906
|
+
});
|
|
849
907
|
}
|
|
850
908
|
};
|
|
851
909
|
|
|
@@ -969,8 +1027,15 @@ sap.ui.define([
|
|
|
969
1027
|
}
|
|
970
1028
|
|
|
971
1029
|
if (vRetErrorState === ErrorState.NoError) {
|
|
972
|
-
this.
|
|
973
|
-
|
|
1030
|
+
if (this._isChangeApplying()) {
|
|
1031
|
+
this._oFlexPromise.then(function() {
|
|
1032
|
+
this._fResolvedSearchPromise();
|
|
1033
|
+
fnCleanup();
|
|
1034
|
+
}.bind(this));
|
|
1035
|
+
} else {
|
|
1036
|
+
this._fResolvedSearchPromise();
|
|
1037
|
+
fnCleanup();
|
|
1038
|
+
}
|
|
974
1039
|
} else {
|
|
975
1040
|
if (vRetErrorState === ErrorState.RequiredHasNoValue) {
|
|
976
1041
|
sErrorMessage = this._oRb.getText("filterbar.REQUIRED_CONDITION_MISSING");
|
|
@@ -997,8 +1062,9 @@ sap.ui.define([
|
|
|
997
1062
|
|
|
998
1063
|
/**
|
|
999
1064
|
* Assigns conditions to the inner condition model.
|
|
1000
|
-
* This method is only called for filling the in parameters for value help scenarios.
|
|
1001
|
-
* @
|
|
1065
|
+
* <br><b>Note:</b>This method is only called for filling the in parameters for value help scenarios.
|
|
1066
|
+
* @private
|
|
1067
|
+
* @ui5-restricted sap.ui.mdc
|
|
1002
1068
|
* @param {map} mConditions A map containing the conditions
|
|
1003
1069
|
*/
|
|
1004
1070
|
FilterBarBase.prototype.setInternalConditions = function(mConditions) {
|
|
@@ -1009,9 +1075,9 @@ sap.ui.define([
|
|
|
1009
1075
|
};
|
|
1010
1076
|
|
|
1011
1077
|
/**
|
|
1012
|
-
* Returns the conditions of the inner condition model
|
|
1013
|
-
*
|
|
1014
|
-
* @
|
|
1078
|
+
* Returns the conditions of the inner condition model.
|
|
1079
|
+
* @private
|
|
1080
|
+
* @ui5-restricted sap.ui.mdc
|
|
1015
1081
|
* @returns {map} A map containing the conditions
|
|
1016
1082
|
*/
|
|
1017
1083
|
FilterBarBase.prototype.getInternalConditions = function() {
|
|
@@ -1041,10 +1107,10 @@ sap.ui.define([
|
|
|
1041
1107
|
FilterBarBase.prototype._getModelConditions = function(oModel, bDoNotExternalize, bKeepAllValues) {
|
|
1042
1108
|
var mConditions = {};
|
|
1043
1109
|
if (oModel) {
|
|
1044
|
-
var aAllConditions = oModel.getAllConditions();
|
|
1110
|
+
var aAllConditions = merge({}, oModel.getAllConditions());
|
|
1045
1111
|
for (var sFieldPath in aAllConditions) {
|
|
1046
1112
|
if (aAllConditions[sFieldPath] && (bKeepAllValues || aAllConditions[sFieldPath].length > 0)) {
|
|
1047
|
-
mConditions[sFieldPath] =
|
|
1113
|
+
mConditions[sFieldPath] = aAllConditions[sFieldPath];
|
|
1048
1114
|
if (!bDoNotExternalize) {
|
|
1049
1115
|
this._cleanupConditions(mConditions[sFieldPath]);
|
|
1050
1116
|
var aFieldConditions = this._stringifyConditions(sFieldPath, mConditions[sFieldPath]);
|
|
@@ -1324,7 +1390,6 @@ sap.ui.define([
|
|
|
1324
1390
|
return oFilterField;
|
|
1325
1391
|
};
|
|
1326
1392
|
|
|
1327
|
-
|
|
1328
1393
|
FilterBarBase.prototype._retrieveMetadata = function() {
|
|
1329
1394
|
|
|
1330
1395
|
if (this._oMetadataAppliedPromise) {
|
|
@@ -1340,26 +1405,16 @@ sap.ui.define([
|
|
|
1340
1405
|
this.initControlDelegate().then(function() {
|
|
1341
1406
|
if (!this._bIsBeingDestroyed) {
|
|
1342
1407
|
|
|
1343
|
-
this._aProperties = [];
|
|
1344
|
-
|
|
1345
1408
|
var fnResolveMetadata = function() {
|
|
1346
1409
|
this._fResolveMetadataApplied();
|
|
1347
1410
|
this._fResolveMetadataApplied = null;
|
|
1348
1411
|
}.bind(this);
|
|
1349
1412
|
|
|
1350
1413
|
if (this.bDelegateInitialized && this.getControlDelegate().fetchProperties) {
|
|
1351
|
-
|
|
1352
|
-
this.
|
|
1353
|
-
this._aProperties = aProperties;
|
|
1354
|
-
fnResolveMetadata();
|
|
1355
|
-
}.bind(this), function(sMsg) {
|
|
1356
|
-
Log.error(sMsg);
|
|
1357
|
-
fnResolveMetadata();
|
|
1358
|
-
});
|
|
1359
|
-
} catch (ex) {
|
|
1360
|
-
Log.error("Exception during fetchProperties occured: " + ex.message);
|
|
1414
|
+
this.initPropertyHelper(PropertyHelper).then(function(oPropertyHelper) {
|
|
1415
|
+
//this._oPropertyHelper = oPropertyHelper;
|
|
1361
1416
|
fnResolveMetadata();
|
|
1362
|
-
}
|
|
1417
|
+
});
|
|
1363
1418
|
} else {
|
|
1364
1419
|
Log.error("Provided delegate '" + this.getDelegate().path + "' not valid.");
|
|
1365
1420
|
fnResolveMetadata();
|
|
@@ -1390,7 +1445,12 @@ sap.ui.define([
|
|
|
1390
1445
|
|
|
1391
1446
|
|
|
1392
1447
|
FilterBarBase.prototype.getPropertyInfoSet = function() {
|
|
1393
|
-
|
|
1448
|
+
try {
|
|
1449
|
+
var oPropertyHelper = this.getPropertyHelper();
|
|
1450
|
+
return oPropertyHelper ? oPropertyHelper.getProperties() : [];
|
|
1451
|
+
} catch (ex) {
|
|
1452
|
+
return [];
|
|
1453
|
+
}
|
|
1394
1454
|
};
|
|
1395
1455
|
|
|
1396
1456
|
FilterBarBase.prototype._getNonHiddenPropertyInfoSet = function() {
|
|
@@ -1454,7 +1514,7 @@ sap.ui.define([
|
|
|
1454
1514
|
|
|
1455
1515
|
FilterBarBase.prototype._cleanUpFilterFieldInErrorState = function(oFilterField) {
|
|
1456
1516
|
|
|
1457
|
-
if (oFilterField
|
|
1517
|
+
if (oFilterField && (oFilterField.getValueState() !== ValueState.None)) {
|
|
1458
1518
|
oFilterField.setValueState(ValueState.None);
|
|
1459
1519
|
}
|
|
1460
1520
|
|
|
@@ -1605,7 +1665,9 @@ sap.ui.define([
|
|
|
1605
1665
|
|
|
1606
1666
|
FilterBarBase.prototype._changesApplied = function() {
|
|
1607
1667
|
|
|
1608
|
-
this.
|
|
1668
|
+
if (!this._isChangeApplying()) {
|
|
1669
|
+
this._bIgnoreChanges = false;
|
|
1670
|
+
}
|
|
1609
1671
|
|
|
1610
1672
|
this._reportModelChange(this._bExecuteOnSelect, this._bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch);
|
|
1611
1673
|
this._bExecuteOnSelect = undefined;
|
|
@@ -1687,7 +1749,6 @@ sap.ui.define([
|
|
|
1687
1749
|
this._bPersistValues = null;
|
|
1688
1750
|
|
|
1689
1751
|
this._oDelegate = null;
|
|
1690
|
-
this._aProperties = null;
|
|
1691
1752
|
|
|
1692
1753
|
this._oFlexPromise = null;
|
|
1693
1754
|
|
|
@@ -1696,7 +1757,7 @@ sap.ui.define([
|
|
|
1696
1757
|
|
|
1697
1758
|
this._oInitialFiltersAppliedPromise = null;
|
|
1698
1759
|
|
|
1699
|
-
this.
|
|
1760
|
+
this._oValidationPromise = null;
|
|
1700
1761
|
|
|
1701
1762
|
this._aBindings = null;
|
|
1702
1763
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"../util/PropertyHelper"
|
|
9
|
+
], function(
|
|
10
|
+
PropertyHelperBase
|
|
11
|
+
) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Constructor for a new filter bar property helper.
|
|
16
|
+
*
|
|
17
|
+
* @param {object[]} aProperties
|
|
18
|
+
* The properties to process in this helper
|
|
19
|
+
* @param {object<string, object>} [mExtensions]
|
|
20
|
+
* Key-value map, where the key is the name of the property and the value is the extension containing mode-specific information.
|
|
21
|
+
* The extension of a property is stored in a reserved <code>extension</code> attribute and its attributes must be specified with
|
|
22
|
+
* <code>mExtensionAttributeMetadata</code>.
|
|
23
|
+
* @param {sap.ui.base.ManagedObject} [oParent]
|
|
24
|
+
* A reference to an instance that will act as the parent of this helper
|
|
25
|
+
* @param {object} [mExtensionAttributeMetadata]
|
|
26
|
+
* The attribute metadata for the model-specific property extension
|
|
27
|
+
*
|
|
28
|
+
* @class
|
|
29
|
+
* Filter bar property helpers give a consistent and standardized view on properties and their attributes.
|
|
30
|
+
* Validates the given properties, sets defaults, and provides utilities to work with these properties.
|
|
31
|
+
* The utilities can only be used for properties that are known to the helper. Known properties are all those that are passed to the constructor.
|
|
32
|
+
*
|
|
33
|
+
* @extends sap.ui.mdc.util.PropertyHelper
|
|
34
|
+
*
|
|
35
|
+
* @author SAP SE
|
|
36
|
+
* @version 1.96.1
|
|
37
|
+
*
|
|
38
|
+
* @private
|
|
39
|
+
* @experimental
|
|
40
|
+
* @since 1.95
|
|
41
|
+
* @alias sap.ui.mdc.filterbar.PropertyHelper
|
|
42
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
43
|
+
*/
|
|
44
|
+
var PropertyHelper = PropertyHelperBase.extend("sap.ui.mdc.filterbar.PropertyHelper", {
|
|
45
|
+
constructor: function(aProperties, mExtensions, oParent, mExtensionAttributeMetadata) {
|
|
46
|
+
var aAllowedAttributes = ["required", "hiddenFilter"];
|
|
47
|
+
PropertyHelperBase.call(this, aProperties, mExtensions, oParent, aAllowedAttributes, mExtensionAttributeMetadata);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return PropertyHelper;
|
|
52
|
+
});
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/mdc/filterbar/p13n/GroupContainer", "sap/ui/mdc/filterbar/p13n/FilterGroupLayout","sap/ui/mdc/filterbar/p13n/TableContainer", "sap/ui/mdc/filterbar/p13n/FilterColumnLayout", "sap/ui/mdc/filterbar/FilterBarBase", "sap/ui/mdc/filterbar/FilterBarBaseRenderer"
|
|
8
|
-
], function( GroupContainer, FilterGroupLayout, TableContainer, FilterColumnLayout, FilterBarBase, FilterBarBaseRenderer
|
|
7
|
+
"sap/ui/mdc/filterbar/p13n/GroupContainer", "sap/ui/mdc/filterbar/p13n/FilterGroupLayout","sap/ui/mdc/filterbar/p13n/TableContainer", "sap/ui/mdc/filterbar/p13n/FilterColumnLayout", "sap/ui/mdc/filterbar/FilterBarBase", "sap/ui/mdc/filterbar/FilterBarBaseRenderer"
|
|
8
|
+
], function( GroupContainer, FilterGroupLayout, TableContainer, FilterColumnLayout, FilterBarBase, FilterBarBaseRenderer) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
*
|
|
19
19
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.96.1
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
24
24
|
* @since 1.80.0
|
|
@@ -129,6 +129,13 @@ sap.ui.define([
|
|
|
129
129
|
this.triggerSearch();
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
+
|
|
133
|
+
AdaptationFilterBar.prototype.initPropertyHelper = function(){
|
|
134
|
+
return this.getAdaptationControl().awaitPropertyHelper().then(function(oPropertyHelper) {
|
|
135
|
+
this._oPropertyHelper = oPropertyHelper;
|
|
136
|
+
}.bind(this));
|
|
137
|
+
};
|
|
138
|
+
|
|
132
139
|
/**
|
|
133
140
|
* Method which will initialize the <code>AdaptationFilterBar</code> and create the required FilterFields
|
|
134
141
|
*
|
|
@@ -307,54 +314,6 @@ sap.ui.define([
|
|
|
307
314
|
this.oAdaptationModel = null;
|
|
308
315
|
};
|
|
309
316
|
|
|
310
|
-
AdaptationFilterBar.prototype._retrieveMetadata = function() {
|
|
311
|
-
|
|
312
|
-
if (this._oMetadataAppliedPromise) {
|
|
313
|
-
return this._oMetadataAppliedPromise;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
this._fResolveMetadataApplied = undefined;
|
|
317
|
-
this._oMetadataAppliedPromise = new Promise(function(resolve) {
|
|
318
|
-
this._fResolveMetadataApplied = resolve;
|
|
319
|
-
}.bind(this));
|
|
320
|
-
|
|
321
|
-
var oAdaptationControl = this.getAdaptationControl();
|
|
322
|
-
|
|
323
|
-
Promise.all([oAdaptationControl && oAdaptationControl.awaitControlDelegate && oAdaptationControl.awaitControlDelegate(), this.initControlDelegate()]).then(function() {
|
|
324
|
-
if (!this._bIsBeingDestroyed) {
|
|
325
|
-
|
|
326
|
-
this._aProperties = [];
|
|
327
|
-
|
|
328
|
-
var fnResolveMetadata = function() {
|
|
329
|
-
this._fResolveMetadataApplied();
|
|
330
|
-
this._fResolveMetadataApplied = null;
|
|
331
|
-
}.bind(this);
|
|
332
|
-
|
|
333
|
-
var oParentDelegate = oAdaptationControl.getControlDelegate();
|
|
334
|
-
|
|
335
|
-
if (oParentDelegate && oParentDelegate.fetchProperties) {
|
|
336
|
-
try {
|
|
337
|
-
oParentDelegate.fetchProperties(oAdaptationControl).then(function(aProperties) {
|
|
338
|
-
this._aProperties = aProperties;
|
|
339
|
-
fnResolveMetadata();
|
|
340
|
-
}.bind(this), function(sMsg) {
|
|
341
|
-
Log.error(sMsg);
|
|
342
|
-
fnResolveMetadata();
|
|
343
|
-
});
|
|
344
|
-
} catch (ex) {
|
|
345
|
-
Log.error("Exception during fetchProperties occured: " + ex.message);
|
|
346
|
-
fnResolveMetadata();
|
|
347
|
-
}
|
|
348
|
-
} else {
|
|
349
|
-
Log.error("Provided delegate '" + this.getDelegate().path + "' not valid.");
|
|
350
|
-
fnResolveMetadata();
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}.bind(this));
|
|
354
|
-
|
|
355
|
-
return this._oMetadataAppliedPromise;
|
|
356
|
-
};
|
|
357
|
-
|
|
358
317
|
return AdaptationFilterBar;
|
|
359
318
|
|
|
360
319
|
});
|
|
@@ -33,7 +33,7 @@ sap.ui.define(
|
|
|
33
33
|
* The metadata information is provided via the {@link sap.ui.mdc.FilterBarDelegate FilterBarDelegate} implementation. This implementation has to be provided by the application.
|
|
34
34
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.96.1
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
39
39
|
* @since 1.84.0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
'./ItemBaseFlex'
|
|
9
|
+
], function(ItemBaseFlex) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
var oActionFlex = Object.assign({}, ItemBaseFlex);
|
|
13
|
+
oActionFlex.findItem = function(oModifier, aActions, sName) {
|
|
14
|
+
return sap.ui.getCore().byId(sName);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"moveControls": "default",
|
|
19
|
+
moveAction: oActionFlex.createMoveChangeHandler()
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([], function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
unhideControl: {
|
|
12
|
+
changeHandler: "default"
|
|
13
|
+
},
|
|
14
|
+
hideControl: {
|
|
15
|
+
changeHandler: "default"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
});
|
|
@@ -8,6 +8,28 @@ sap.ui.define([
|
|
|
8
8
|
], function(merge, FilterOperatorUtil) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
|
+
/*
|
|
12
|
+
* NOTE: As the ConditionFlex is the central changehandler for filter condition
|
|
13
|
+
* processing, it might happen that the in/out handling of the ConditionModel
|
|
14
|
+
* might cause multiple condition changes to be applied in parallel. Due to the
|
|
15
|
+
* asynchronous modifier handling, we need to make sure to queue these changes in their
|
|
16
|
+
* incoming order as parallel processing might falsely overwrite the 'filterConditions'
|
|
17
|
+
* property causing the changehandler to break the controls housekeeping and the last
|
|
18
|
+
* parallel filter change would always win.
|
|
19
|
+
*/
|
|
20
|
+
var fnQueueChange = function(oControl, fTask) {
|
|
21
|
+
var fCleanupPromiseQueue = function(pOriginalPromise) {
|
|
22
|
+
if (oControl._pQueue === pOriginalPromise){
|
|
23
|
+
delete oControl._pQueue;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
oControl._pQueue = oControl._pQueue instanceof Promise ? oControl._pQueue.then(fTask) : fTask();
|
|
28
|
+
oControl._pQueue.then(fCleanupPromiseQueue.bind(null, oControl._pQueue));
|
|
29
|
+
|
|
30
|
+
return oControl._pQueue;
|
|
31
|
+
};
|
|
32
|
+
|
|
11
33
|
var fDetermineFilterControl = function(oControl) {
|
|
12
34
|
var oController = oControl && oControl.getEngine ? oControl.getEngine().getController(oControl, "Filter") : null;
|
|
13
35
|
return oController ? oController.getFilterControl() : null;
|
|
@@ -21,54 +43,48 @@ sap.ui.define([
|
|
|
21
43
|
oFilterControl.applyConditionsAfterChangesApplied();
|
|
22
44
|
}
|
|
23
45
|
|
|
24
|
-
return
|
|
25
|
-
|
|
46
|
+
return fnQueueChange(oControl, function(){
|
|
26
47
|
var mConditionsData, aConditions = null, oModifier = mPropertyBag.modifier;
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
49
|
+
return oModifier.getProperty(oControl, "filterConditions")
|
|
50
|
+
.then(function(mFilterConditions) {
|
|
51
|
+
// 'filterConditions' property needs to be updated for change selector
|
|
52
|
+
mConditionsData = merge({}, mFilterConditions);
|
|
53
|
+
if (mConditionsData) {
|
|
54
|
+
for (var sFieldPath in mConditionsData) {
|
|
55
|
+
if (sFieldPath === oChangeContent.name) {
|
|
56
|
+
aConditions = mConditionsData[sFieldPath];
|
|
57
|
+
break;
|
|
39
58
|
}
|
|
40
59
|
}
|
|
60
|
+
}
|
|
41
61
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var nConditionIdx = FilterOperatorUtil.indexOfCondition(oChangeContent.condition, aConditions);
|
|
48
|
-
if (nConditionIdx < 0) {
|
|
49
|
-
aConditions.push(oChangeContent.condition);
|
|
62
|
+
if (!aConditions) {
|
|
63
|
+
mConditionsData[oChangeContent.name] = [];
|
|
64
|
+
aConditions = mConditionsData[oChangeContent.name];
|
|
65
|
+
}
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
|
|
67
|
+
var nConditionIdx = FilterOperatorUtil.indexOfCondition(oChangeContent.condition, aConditions);
|
|
68
|
+
if (nConditionIdx < 0) {
|
|
69
|
+
aConditions.push(oChangeContent.condition);
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
// 'filterConditions' property needs to be updated for change selector
|
|
72
|
+
oModifier.setProperty(oControl, "filterConditions", mConditionsData);
|
|
73
|
+
|
|
74
|
+
if (!bIsRevert) {
|
|
75
|
+
// Set revert data on the change
|
|
76
|
+
oChange.setRevertData({
|
|
77
|
+
name: oChangeContent.name,
|
|
78
|
+
condition: oChangeContent.condition
|
|
79
|
+
});
|
|
80
|
+
}
|
|
61
81
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
82
|
+
// the control providing the filter functionality needs to be used to update the ConditionModel
|
|
83
|
+
if (oFilterControl && oFilterControl.addCondition) {
|
|
84
|
+
return oFilterControl.addCondition(oChangeContent.name, oChangeContent.condition);
|
|
66
85
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.catch(function(oError) {
|
|
70
|
-
reject(oError);
|
|
71
|
-
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
72
88
|
});
|
|
73
89
|
};
|
|
74
90
|
|
|
@@ -80,11 +96,10 @@ sap.ui.define([
|
|
|
80
96
|
oFilterControl.applyConditionsAfterChangesApplied();
|
|
81
97
|
}
|
|
82
98
|
|
|
83
|
-
return
|
|
99
|
+
return fnQueueChange(oControl, function(){
|
|
84
100
|
var mConditionsData, aConditions, nDelIndex = -1, oModifier = mPropertyBag.modifier;
|
|
85
101
|
|
|
86
|
-
|
|
87
|
-
.then(oModifier.getProperty.bind(oModifier, oControl, "filterConditions"))
|
|
102
|
+
return oModifier.getProperty(oControl, "filterConditions")
|
|
88
103
|
.then(function(mFilterConditions) {
|
|
89
104
|
// 'filterConditions' property needs to be updated for change selector
|
|
90
105
|
mConditionsData = merge({}, mFilterConditions);
|
|
@@ -123,10 +138,6 @@ sap.ui.define([
|
|
|
123
138
|
}
|
|
124
139
|
}
|
|
125
140
|
}
|
|
126
|
-
})
|
|
127
|
-
.then(resolve)
|
|
128
|
-
.catch(function(oError) {
|
|
129
|
-
reject(oError);
|
|
130
141
|
});
|
|
131
142
|
});
|
|
132
143
|
};
|