@openui5/sap.ui.mdc 1.110.0 → 1.111.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/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +20 -2
- package/src/sap/ui/mdc/Chart.js +121 -3
- package/src/sap/ui/mdc/ChartRenderer.js +9 -6
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +96 -4
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Link.js +9 -2
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +136 -74
- package/src/sap/ui/mdc/ValueHelp.js +7 -40
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartImplementationContainerRenderer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSettings.js +7 -3
- package/src/sap/ui/mdc/chart/ChartToolbar.js +37 -6
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +2 -2
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +3 -1
- package/src/sap/ui/mdc/enum/FilterBarValidationStatus.js +56 -0
- package/src/sap/ui/mdc/enum/ReasonMode.js +53 -0
- package/src/sap/ui/mdc/field/ConditionType.js +19 -33
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -3
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +2 -4
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -3
- package/src/sap/ui/mdc/field/FieldBase.js +60 -100
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +28 -69
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +66 -9
- package/src/sap/ui/mdc/field/content/DateContent.js +3 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +172 -112
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +18 -3
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +2 -2
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +16 -4
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +14 -3
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +17 -5
- 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 +9 -3
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +71 -8
- package/src/sap/ui/mdc/flexibility/SortFlex.js +10 -4
- package/src/sap/ui/mdc/flexibility/Util.js +5 -3
- package/src/sap/ui/mdc/flexibility/xConfigFlex.js +11 -3
- package/src/sap/ui/mdc/library.js +2 -18
- 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 +7 -3
- package/src/sap/ui/mdc/messagebundle_ar.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_bg.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_cy.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_el.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +12 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_es.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_fr.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_id.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_it.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_iw.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_kk.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_lt.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_no.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_pl.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_pt.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ru.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_sl.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_th.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_tr.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +5 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +12 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +29 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +96 -77
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +0 -32
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +3 -0
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +6 -5
- package/src/sap/ui/mdc/p13n/Engine.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/table/Column.js +5 -2
- 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 +1 -16
- package/src/sap/ui/mdc/table/PropertyHelper.js +50 -12
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +1 -15
- 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 +14 -13
- package/src/sap/ui/mdc/table/TreeTableType.js +2 -19
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +34 -2
- package/src/sap/ui/mdc/themes/base/FieldBase.less +12 -25
- package/src/sap/ui/mdc/util/FilterUtil.js +24 -1
- package/src/sap/ui/mdc/util/InfoBar.js +118 -0
- package/src/sap/ui/mdc/util/InfoBarRenderer.js +35 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +41 -41
- package/src/sap/ui/mdc/util/TypeUtil.js +3 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -3
- package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -4
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -23
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +19 -21
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/field/Actions.js +4 -2
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +4 -2
- package/test/sap/ui/mdc/testutils/opa/filterfield/TestObjects.js +0 -11
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +16 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/JSDoc.md +98 -9
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +85 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/doWait.js +2 -2
- package/src/sap/ui/mdc/enum/OutParameterMode.js +0 -39
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +0 -437
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +0 -325
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +0 -101
- package/src/sap/ui/mdc/field/FieldHelpBase.js +0 -1517
- package/src/sap/ui/mdc/field/FieldHelpBaseDelegate.js +0 -55
- package/src/sap/ui/mdc/field/FieldValueHelp.js +0 -2834
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +0 -525
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +0 -171
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +0 -359
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +0 -416
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +0 -977
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +0 -329
- package/src/sap/ui/mdc/field/InParameter.js +0 -229
- package/src/sap/ui/mdc/field/ListFieldHelp.js +0 -620
- package/src/sap/ui/mdc/field/OutParameter.js +0 -75
- package/src/sap/ui/mdc/field/ValueHelpPanel.control.xml +0 -71
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +0 -525
- package/src/sap/ui/mdc/odata/v4/FieldValueHelpDelegate.js +0 -125
|
@@ -18,11 +18,13 @@ sap.ui.define([
|
|
|
18
18
|
'sap/ui/mdc/condition/Condition',
|
|
19
19
|
'sap/ui/mdc/condition/ConditionConverter',
|
|
20
20
|
'sap/ui/mdc/util/IdentifierUtil',
|
|
21
|
+
'sap/ui/mdc/util/FilterUtil',
|
|
21
22
|
"sap/ui/mdc/filterbar/PropertyHelper",
|
|
23
|
+
"sap/ui/mdc/enum/ReasonMode",
|
|
24
|
+
"sap/ui/mdc/enum/FilterBarValidationStatus",
|
|
22
25
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
23
26
|
"sap/m/library",
|
|
24
27
|
"sap/m/Button",
|
|
25
|
-
'sap/m/MessageBox',
|
|
26
28
|
"./FilterBarBaseRenderer"
|
|
27
29
|
],
|
|
28
30
|
function(
|
|
@@ -40,11 +42,13 @@ sap.ui.define([
|
|
|
40
42
|
Condition,
|
|
41
43
|
ConditionConverter,
|
|
42
44
|
IdentifierUtil,
|
|
45
|
+
FilterUtil,
|
|
43
46
|
PropertyHelper,
|
|
47
|
+
ReasonMode,
|
|
48
|
+
FilterBarValidationStatus,
|
|
44
49
|
ControlVariantApplyAPI,
|
|
45
50
|
mLibrary,
|
|
46
51
|
Button,
|
|
47
|
-
MessageBox,
|
|
48
52
|
FilterBarBaseRenderer
|
|
49
53
|
) {
|
|
50
54
|
"use strict";
|
|
@@ -58,7 +62,7 @@ sap.ui.define([
|
|
|
58
62
|
* @class The <code>FilterBarBase</code> control is used as a faceless base class for common functionality of any MDC FilterBar derivation.
|
|
59
63
|
* @extends sap.ui.mdc.Control
|
|
60
64
|
* @author SAP SE
|
|
61
|
-
* @version 1.
|
|
65
|
+
* @version 1.111.0
|
|
62
66
|
* @constructor
|
|
63
67
|
* @private
|
|
64
68
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -118,6 +122,7 @@ sap.ui.define([
|
|
|
118
122
|
/**
|
|
119
123
|
* Displays possible errors during the search in a message box.
|
|
120
124
|
* @since 1.74
|
|
125
|
+
* @deprecated Since version 1.111 replaced by the new validation handling through {@link sap.ui.mdc.FilterBarDelegate#determineValidationState determineValidationState} and {@link sap.ui.mdc.FilterBarDelegate#visualizeValidationState visualizeValidationState}.
|
|
121
126
|
*/
|
|
122
127
|
showMessages: {
|
|
123
128
|
type: "boolean",
|
|
@@ -224,6 +229,20 @@ sap.ui.define([
|
|
|
224
229
|
* <b>Note</b>: this event should never be executed programmatically. It is triggered internally by the filter bar after a <code>triggerSearch</code> is executed
|
|
225
230
|
*/
|
|
226
231
|
search: {
|
|
232
|
+
/**
|
|
233
|
+
* Indicates the initial reason for the search. This can either be:<br>
|
|
234
|
+
* <ul>
|
|
235
|
+
* <li><code>{@link sap.ui.mdc.enum.ReasonMode.Variant}</code>: Search is triggered based on variant settings</li>
|
|
236
|
+
* <li><code>{@link sap.ui.mdc.enum.ReasonMode.Enter}</code>: Search is triggered based on pressing Enter in a filter field</li>
|
|
237
|
+
* <li><code>{@link sap.ui.mdc.enum.ReasonMode.Go}</code>: Search is triggered based on pressing the Go button</li>
|
|
238
|
+
* <li><code>{@link sap.ui.mdc.enum.ReasonMode.Unclear}</code>: Any other reasons for the search</li>
|
|
239
|
+
* </ul>
|
|
240
|
+
*
|
|
241
|
+
* @since 1.111.0
|
|
242
|
+
*/
|
|
243
|
+
reason: {
|
|
244
|
+
type: "sap.ui.mdc.enum.ReasonMode"
|
|
245
|
+
}
|
|
227
246
|
},
|
|
228
247
|
|
|
229
248
|
/**
|
|
@@ -269,14 +288,6 @@ sap.ui.define([
|
|
|
269
288
|
FilterBarBase.INNER_MODEL_NAME = "$sap.ui.filterbar.mdc.FilterBarBase";
|
|
270
289
|
FilterBarBase.CONDITION_MODEL_NAME = "$filters";
|
|
271
290
|
|
|
272
|
-
var ErrorState = {
|
|
273
|
-
NoError: -1,
|
|
274
|
-
RequiredHasNoValue: 0,
|
|
275
|
-
FieldInErrorState: 1,
|
|
276
|
-
AsyncValidation: 2,
|
|
277
|
-
OngoingChangeAppliance: 3
|
|
278
|
-
};
|
|
279
|
-
|
|
280
291
|
FilterBarBase.prototype.init = function() {
|
|
281
292
|
|
|
282
293
|
Control.prototype.init.apply(this, arguments);
|
|
@@ -666,13 +677,6 @@ sap.ui.define([
|
|
|
666
677
|
|
|
667
678
|
FilterBarBase.prototype._addConditionChange = function(pConditionState) {
|
|
668
679
|
|
|
669
|
-
if (!this._oApplyingChanges) {
|
|
670
|
-
this._fResolveApplyingChanges = undefined;
|
|
671
|
-
this._oApplyingChanges = new Promise(function(resolve) {
|
|
672
|
-
this._fResolveApplyingChanges = resolve;
|
|
673
|
-
}.bind(this));
|
|
674
|
-
}
|
|
675
|
-
|
|
676
680
|
this._aOngoingChangeAppliance.push(this.getEngine().createChanges({
|
|
677
681
|
control: this,
|
|
678
682
|
applySequentially: true,
|
|
@@ -863,6 +867,9 @@ sap.ui.define([
|
|
|
863
867
|
FilterBarBase.prototype.onSearch = function(oEvent) {
|
|
864
868
|
if (!this._bSearchPressed) {
|
|
865
869
|
this._bSearchPressed = true;
|
|
870
|
+
|
|
871
|
+
this._sReason = ReasonMode.Go;
|
|
872
|
+
|
|
866
873
|
this.triggerSearch().then(function() {
|
|
867
874
|
this._bSearchPressed = false;
|
|
868
875
|
}.bind(this), function(){
|
|
@@ -939,33 +946,21 @@ sap.ui.define([
|
|
|
939
946
|
}
|
|
940
947
|
};
|
|
941
948
|
|
|
942
|
-
FilterBarBase.prototype._getRequiredFieldsWithoutValues = function() {
|
|
943
|
-
var aReqFiltersWithoutValue = [];
|
|
944
|
-
this._getRequiredPropertyNames().forEach(function(sName) {
|
|
945
|
-
var aConditions = this._getConditionModel().getConditions(sName);
|
|
946
|
-
if (!aConditions || aConditions.length === 0) {
|
|
947
|
-
aReqFiltersWithoutValue.push(sName);
|
|
948
|
-
}
|
|
949
|
-
}.bind(this));
|
|
950
|
-
|
|
951
|
-
return aReqFiltersWithoutValue;
|
|
952
|
-
};
|
|
953
|
-
|
|
954
949
|
FilterBarBase.prototype._checkAsyncValidation = function() {
|
|
955
|
-
var vRetErrorState =
|
|
950
|
+
var vRetErrorState = FilterBarValidationStatus.NoError;
|
|
956
951
|
|
|
957
952
|
if (this._aFIChanges && this._aFIChanges.length > 0) {
|
|
958
|
-
vRetErrorState =
|
|
953
|
+
vRetErrorState = FilterBarValidationStatus.AsyncValidation;
|
|
959
954
|
}
|
|
960
955
|
|
|
961
956
|
return vRetErrorState;
|
|
962
957
|
};
|
|
963
958
|
|
|
964
959
|
FilterBarBase.prototype._checkOngoingChangeAppliance = function() {
|
|
965
|
-
var vRetErrorState =
|
|
960
|
+
var vRetErrorState = FilterBarValidationStatus.NoError;
|
|
966
961
|
|
|
967
962
|
if (this._aOngoingChangeAppliance && this._aOngoingChangeAppliance.length > 0) {
|
|
968
|
-
vRetErrorState =
|
|
963
|
+
vRetErrorState = FilterBarValidationStatus.OngoingChangeAppliance;
|
|
969
964
|
}
|
|
970
965
|
|
|
971
966
|
return vRetErrorState;
|
|
@@ -979,7 +974,7 @@ sap.ui.define([
|
|
|
979
974
|
(oFilterField.getValueStateText() === this._oRb.getText("filterbar.REQUIRED_FILTER_VALUE_MISSING"))) {
|
|
980
975
|
|
|
981
976
|
if (!aReqFiltersWithoutValue) {
|
|
982
|
-
aReqFiltersWithoutValue =
|
|
977
|
+
aReqFiltersWithoutValue = FilterUtil.getRequiredFieldNamesWithoutValues(this);
|
|
983
978
|
}
|
|
984
979
|
|
|
985
980
|
if (aReqFiltersWithoutValue.indexOf(oFilterField.getFieldPath()) < 0) {
|
|
@@ -991,9 +986,9 @@ sap.ui.define([
|
|
|
991
986
|
};
|
|
992
987
|
|
|
993
988
|
FilterBarBase.prototype._checkRequiredFields = function() {
|
|
994
|
-
var vRetErrorState =
|
|
989
|
+
var vRetErrorState = FilterBarValidationStatus.NoError;
|
|
995
990
|
|
|
996
|
-
var aReqFiltersWithoutValue =
|
|
991
|
+
var aReqFiltersWithoutValue = FilterUtil.getRequiredFieldNamesWithoutValues(this);
|
|
997
992
|
aReqFiltersWithoutValue.forEach(function(sName) {
|
|
998
993
|
var oFilterField = this._getFilterField(sName);
|
|
999
994
|
if (oFilterField) {
|
|
@@ -1005,23 +1000,23 @@ sap.ui.define([
|
|
|
1005
1000
|
Log.error("Mandatory filter field '" + sName + "' not visible on FilterBarBase has no value.");
|
|
1006
1001
|
}
|
|
1007
1002
|
|
|
1008
|
-
vRetErrorState =
|
|
1003
|
+
vRetErrorState = FilterBarValidationStatus.RequiredHasNoValue;
|
|
1009
1004
|
}.bind(this));
|
|
1010
1005
|
|
|
1011
1006
|
return vRetErrorState;
|
|
1012
1007
|
};
|
|
1013
1008
|
|
|
1014
1009
|
FilterBarBase.prototype._checkFieldsInErrorState = function() {
|
|
1015
|
-
var vRetErrorState =
|
|
1010
|
+
var vRetErrorState = FilterBarValidationStatus.NoError;
|
|
1016
1011
|
|
|
1017
1012
|
this.getFilterItems().some(function(oFilterField) {
|
|
1018
1013
|
if (oFilterField && (oFilterField.getValueState() !== ValueState.None)) {
|
|
1019
1014
|
if (oFilterField.getValueStateText() !== this._oRb.getText("filterbar.REQUIRED_FILTER_VALUE_MISSING")) {
|
|
1020
|
-
vRetErrorState =
|
|
1015
|
+
vRetErrorState = FilterBarValidationStatus.FieldInErrorState;
|
|
1021
1016
|
}
|
|
1022
1017
|
}
|
|
1023
1018
|
|
|
1024
|
-
return vRetErrorState !==
|
|
1019
|
+
return vRetErrorState !== FilterBarValidationStatus.NoError;
|
|
1025
1020
|
}.bind(this));
|
|
1026
1021
|
|
|
1027
1022
|
return vRetErrorState;
|
|
@@ -1031,11 +1026,18 @@ sap.ui.define([
|
|
|
1031
1026
|
|
|
1032
1027
|
var oPromise = oEvent.getParameter("promise");
|
|
1033
1028
|
if (oPromise) {
|
|
1029
|
+
|
|
1030
|
+
this._sReason = ReasonMode.Enter;
|
|
1031
|
+
|
|
1034
1032
|
oPromise.then(function() {
|
|
1035
|
-
this.
|
|
1033
|
+
var oWaitPromises = (this._aOngoingChangeAppliance && (this._aOngoingChangeAppliance.length > 0)) ? this._aOngoingChangeAppliance.slice() : [Promise.resolve()];
|
|
1034
|
+
Promise.all(oWaitPromises).then(function() {
|
|
1035
|
+
this.triggerSearch();
|
|
1036
|
+
}.bind(this));
|
|
1036
1037
|
}.bind(this)).catch(function(oEx) {
|
|
1037
1038
|
Log.error(oEx);
|
|
1038
|
-
|
|
1039
|
+
this.triggerSearch().catch(function(oEx) { }); // catch rejected and do nothing
|
|
1040
|
+
}.bind(this));
|
|
1039
1041
|
}
|
|
1040
1042
|
};
|
|
1041
1043
|
|
|
@@ -1058,24 +1060,33 @@ sap.ui.define([
|
|
|
1058
1060
|
this._aFIChanges.push({ name: oFilterField.getFieldPath(), promise: oEvent.getParameter("promise")});
|
|
1059
1061
|
};
|
|
1060
1062
|
|
|
1061
|
-
|
|
1063
|
+
/**
|
|
1064
|
+
* Checks the validation status of the filter fields.
|
|
1065
|
+
* <b>Note:</b><br>
|
|
1066
|
+
* This method returns the current inner state of the filter bar.
|
|
1067
|
+
* @private
|
|
1068
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
1069
|
+
* @ui5-restricted sap.fe, sap.ui.mdc
|
|
1070
|
+
* @returns {sap.ui.mdc.enum.FilterBarValidationStatus} Returns the validation status
|
|
1071
|
+
*/
|
|
1072
|
+
FilterBarBase.prototype.checkFilters = function() {
|
|
1062
1073
|
var vRetErrorState = this._checkAsyncValidation();
|
|
1063
|
-
if (vRetErrorState !==
|
|
1074
|
+
if (vRetErrorState !== FilterBarValidationStatus.NoError) {
|
|
1064
1075
|
return vRetErrorState;
|
|
1065
1076
|
}
|
|
1066
1077
|
|
|
1067
1078
|
vRetErrorState = this._checkOngoingChangeAppliance();
|
|
1068
|
-
if (vRetErrorState !==
|
|
1079
|
+
if (vRetErrorState !== FilterBarValidationStatus.NoError) {
|
|
1069
1080
|
return vRetErrorState;
|
|
1070
1081
|
}
|
|
1071
1082
|
|
|
1072
|
-
vRetErrorState = this.
|
|
1073
|
-
if (vRetErrorState !==
|
|
1083
|
+
vRetErrorState = this._checkFieldsInErrorState();
|
|
1084
|
+
if (vRetErrorState !== FilterBarValidationStatus.NoError) {
|
|
1074
1085
|
return vRetErrorState;
|
|
1075
1086
|
}
|
|
1076
1087
|
|
|
1077
|
-
vRetErrorState = this.
|
|
1078
|
-
if (vRetErrorState !==
|
|
1088
|
+
vRetErrorState = this._checkRequiredFields();
|
|
1089
|
+
if (vRetErrorState !== FilterBarValidationStatus.NoError) {
|
|
1079
1090
|
return vRetErrorState;
|
|
1080
1091
|
}
|
|
1081
1092
|
|
|
@@ -1095,7 +1106,12 @@ sap.ui.define([
|
|
|
1095
1106
|
return oFilterField;
|
|
1096
1107
|
};
|
|
1097
1108
|
|
|
1098
|
-
FilterBarBase.prototype._handleAsyncValidation = function(bFireSearch) {
|
|
1109
|
+
FilterBarBase.prototype._handleAsyncValidation = function(bFireSearch, fnCallBack) {
|
|
1110
|
+
|
|
1111
|
+
if (!fnCallBack) {
|
|
1112
|
+
fnCallBack = this._validate.bind(this);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1099
1115
|
if (this._aFIChanges && (this._aFIChanges.length > 0)) {
|
|
1100
1116
|
|
|
1101
1117
|
var aNamePromisesArray = this._aFIChanges.slice();
|
|
@@ -1114,14 +1130,19 @@ sap.ui.define([
|
|
|
1114
1130
|
oFF.setValueState(ValueState.None); //valid existing value -> clear missing required error
|
|
1115
1131
|
}
|
|
1116
1132
|
}, this);
|
|
1117
|
-
|
|
1118
|
-
}.bind(this)
|
|
1119
|
-
|
|
1120
|
-
}
|
|
1133
|
+
fnCallBack(bFireSearch);
|
|
1134
|
+
}.bind(this)).catch(function(oEx) {
|
|
1135
|
+
fnCallBack(bFireSearch);
|
|
1136
|
+
});
|
|
1121
1137
|
}
|
|
1122
1138
|
};
|
|
1123
1139
|
|
|
1124
|
-
FilterBarBase.prototype._handleOngoingChangeAppliance = function(bFireSearch) {
|
|
1140
|
+
FilterBarBase.prototype._handleOngoingChangeAppliance = function(bFireSearch, fnCallBack) {
|
|
1141
|
+
|
|
1142
|
+
if (!fnCallBack) {
|
|
1143
|
+
fnCallBack = this._validate.bind(this);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1125
1146
|
if (this._aOngoingChangeAppliance && (this._aOngoingChangeAppliance.length > 0)) {
|
|
1126
1147
|
|
|
1127
1148
|
var aChangePromises = this._aOngoingChangeAppliance.slice();
|
|
@@ -1132,22 +1153,85 @@ sap.ui.define([
|
|
|
1132
1153
|
}
|
|
1133
1154
|
|
|
1134
1155
|
Promise.all(aChangePromises).then(function() {
|
|
1135
|
-
|
|
1136
|
-
}.
|
|
1137
|
-
|
|
1138
|
-
}
|
|
1156
|
+
fnCallBack(bFireSearch);
|
|
1157
|
+
}).catch(function(oEx) {
|
|
1158
|
+
fnCallBack(bFireSearch);
|
|
1159
|
+
});
|
|
1139
1160
|
}
|
|
1140
1161
|
};
|
|
1141
1162
|
|
|
1163
|
+
FilterBarBase.prototype._determineValidationState = function() {
|
|
1164
|
+
return this.awaitControlDelegate().then(function(oDelegate) {
|
|
1165
|
+
return oDelegate.determineValidationState(this, this.checkFilters());
|
|
1166
|
+
}.bind(this));
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
FilterBarBase.prototype._visualizeValidationState = function(nValidationStatus) {
|
|
1170
|
+
if (this._oDelegate) {
|
|
1171
|
+
this._oDelegate.visualizeValidationState(this, { status: nValidationStatus});
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Returns the corresponding library text.
|
|
1177
|
+
* @private
|
|
1178
|
+
* @param {strings} sKey of the text
|
|
1179
|
+
* @returns {string} associated text from the message bundle
|
|
1180
|
+
*/
|
|
1181
|
+
FilterBarBase.prototype.getText = function(sKey) {
|
|
1182
|
+
return this._oRb.getText(sKey);
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
FilterBarBase.prototype._restartCheckAndNotify = function(bFireSearch) {
|
|
1187
|
+
var vRetErrorState = this.checkFilters();
|
|
1188
|
+
this._checkAndNotify(bFireSearch, vRetErrorState);
|
|
1189
|
+
};
|
|
1190
|
+
|
|
1191
|
+
FilterBarBase.prototype._checkAndNotify = function(bFireSearch, vRetErrorState) {
|
|
1192
|
+
var fnCheckAndFireSearch = function() {
|
|
1193
|
+
if (bFireSearch) {
|
|
1194
|
+
var oObj = {
|
|
1195
|
+
reason: this._sReason ? this._sReason : ReasonMode.Unclear
|
|
1196
|
+
};
|
|
1197
|
+
this._sReason = ReasonMode.Unclear;
|
|
1198
|
+
|
|
1199
|
+
this.fireSearch(oObj);
|
|
1200
|
+
}
|
|
1201
|
+
}.bind(this);
|
|
1202
|
+
|
|
1203
|
+
var fnCleanup = function() {
|
|
1204
|
+
this._oValidationPromise = null;
|
|
1205
|
+
this._fRejectedSearchPromise = null;
|
|
1206
|
+
this._fResolvedSearchPromise = null;
|
|
1207
|
+
}.bind(this);
|
|
1208
|
+
|
|
1209
|
+
if (vRetErrorState === FilterBarValidationStatus.AsyncValidation) {
|
|
1210
|
+
this._handleAsyncValidation(bFireSearch, this._restartCheckAndNotify.bind(this));
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
if (vRetErrorState === FilterBarValidationStatus.OngoingChangeAppliance) {
|
|
1215
|
+
this._handleOngoingChangeAppliance(bFireSearch, this._restartCheckAndNotify.bind(this));
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
if (vRetErrorState === FilterBarValidationStatus.NoError) {
|
|
1220
|
+
if (this._fResolvedSearchPromise) {
|
|
1221
|
+
fnCheckAndFireSearch();
|
|
1222
|
+
this._fResolvedSearchPromise();
|
|
1223
|
+
}
|
|
1224
|
+
} else if (this._fRejectedSearchPromise) {
|
|
1225
|
+
//this._setFocusOnFirstErroneousField();
|
|
1226
|
+
this._fRejectedSearchPromise();
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
this._visualizeValidationState(vRetErrorState);
|
|
1230
|
+
fnCleanup();
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1142
1233
|
// Executes the search.
|
|
1143
1234
|
FilterBarBase.prototype._validate = function(bFireSearch) {
|
|
1144
|
-
var sErrorMessage, vRetErrorState;
|
|
1145
|
-
|
|
1146
|
-
var fnCheckAndFireSearch = function() {
|
|
1147
|
-
if (bFireSearch) {
|
|
1148
|
-
this.fireSearch();
|
|
1149
|
-
}
|
|
1150
|
-
}.bind(this);
|
|
1151
1235
|
|
|
1152
1236
|
var fnCleanup = function() {
|
|
1153
1237
|
this._oValidationPromise = null;
|
|
@@ -1160,45 +1244,9 @@ sap.ui.define([
|
|
|
1160
1244
|
return;
|
|
1161
1245
|
}
|
|
1162
1246
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
if (vRetErrorState === ErrorState.AsyncValidation) {
|
|
1167
|
-
this._handleAsyncValidation(bFireSearch);
|
|
1168
|
-
return;
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
if (vRetErrorState === ErrorState.OngoingChangeAppliance) {
|
|
1172
|
-
this._handleOngoingChangeAppliance(bFireSearch);
|
|
1173
|
-
return;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
if (vRetErrorState === ErrorState.NoError) {
|
|
1177
|
-
fnCheckAndFireSearch();
|
|
1178
|
-
this._fResolvedSearchPromise();
|
|
1179
|
-
fnCleanup();
|
|
1180
|
-
} else {
|
|
1181
|
-
if (vRetErrorState === ErrorState.RequiredHasNoValue) {
|
|
1182
|
-
sErrorMessage = this._oRb.getText("filterbar.REQUIRED_CONDITION_MISSING");
|
|
1183
|
-
} else {
|
|
1184
|
-
sErrorMessage = this._oRb.getText("filterbar.VALIDATION_ERROR");
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
if (this.getShowMessages() && !this._isLiveMode()) {
|
|
1188
|
-
try {
|
|
1189
|
-
MessageBox.error(sErrorMessage, {
|
|
1190
|
-
styleClass: (this.$() && this.$().closest(".sapUiSizeCompact").length) ? "sapUiSizeCompact" : "",
|
|
1191
|
-
onClose: this._setFocusOnFirstErroneousField.bind(this)
|
|
1192
|
-
});
|
|
1193
|
-
} catch (x) {
|
|
1194
|
-
Log.error(x.message);
|
|
1195
|
-
}
|
|
1196
|
-
} else {
|
|
1197
|
-
Log.warning("search was not triggered. " + sErrorMessage);
|
|
1198
|
-
}
|
|
1199
|
-
this._fRejectedSearchPromise();
|
|
1200
|
-
fnCleanup();
|
|
1201
|
-
}
|
|
1247
|
+
this._determineValidationState().then(function(vRetErrorState) {
|
|
1248
|
+
this._checkAndNotify(bFireSearch, vRetErrorState);
|
|
1249
|
+
}.bind(this));
|
|
1202
1250
|
};
|
|
1203
1251
|
|
|
1204
1252
|
/**
|
|
@@ -1405,17 +1453,27 @@ sap.ui.define([
|
|
|
1405
1453
|
// --> no filter changes have been done
|
|
1406
1454
|
return Promise.resolve();
|
|
1407
1455
|
}
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
var fResolveApplyingChanges;
|
|
1459
|
+
|
|
1460
|
+
if (!this._oApplyingChanges) {
|
|
1461
|
+
this._oApplyingChanges = new Promise(function(resolve) {
|
|
1462
|
+
fResolveApplyingChanges = resolve;
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1408
1466
|
return this._setXConditions(this.getFilterConditions()).then(function(){
|
|
1467
|
+
|
|
1409
1468
|
this._reportModelChange({
|
|
1410
1469
|
triggerSearch: false,
|
|
1411
1470
|
triggerFilterUpdate: true,
|
|
1412
1471
|
recheckMissingRequired: true
|
|
1413
1472
|
});
|
|
1414
1473
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1474
|
+
fResolveApplyingChanges();
|
|
1475
|
+
this._oApplyingChanges = null;
|
|
1476
|
+
|
|
1419
1477
|
}.bind(this));
|
|
1420
1478
|
};
|
|
1421
1479
|
|
|
@@ -1668,7 +1726,7 @@ sap.ui.define([
|
|
|
1668
1726
|
this._fRejectMetadataApplied = null;
|
|
1669
1727
|
}.bind(this);
|
|
1670
1728
|
|
|
1671
|
-
if (this.
|
|
1729
|
+
if (this.isControlDelegateInitialized()) {
|
|
1672
1730
|
this.finalizePropertyHelper().then(function() {
|
|
1673
1731
|
fnResolveMetadata(true);
|
|
1674
1732
|
});
|
|
@@ -1814,6 +1872,8 @@ sap.ui.define([
|
|
|
1814
1872
|
|
|
1815
1873
|
this._bExecuteOnSelect = this._getExecuteOnSelectionOnVariant(oVariant);
|
|
1816
1874
|
|
|
1875
|
+
this._sReason = this._bExecuteOnSelect ? ReasonMode.Variant : ReasonMode.Unclear;
|
|
1876
|
+
|
|
1817
1877
|
this._bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch = false;
|
|
1818
1878
|
if (oVariant.hasOwnProperty("createScenario") && (oVariant.createScenario === "saveAs")) {
|
|
1819
1879
|
//during SaveAs a switch occurs but the processing of related variants based changes may still be ongoing
|
|
@@ -1907,7 +1967,7 @@ sap.ui.define([
|
|
|
1907
1967
|
});
|
|
1908
1968
|
}
|
|
1909
1969
|
|
|
1910
|
-
if (this.
|
|
1970
|
+
if (this.isControlDelegateInitialized() && this.getControlDelegate().cleanup) {
|
|
1911
1971
|
this.getControlDelegate().cleanup(this);
|
|
1912
1972
|
}
|
|
1913
1973
|
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
*
|
|
21
21
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.111.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @since 1.80.0
|
|
@@ -150,12 +150,24 @@ sap.ui.define([
|
|
|
150
150
|
}.bind(this));
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
+
AdaptationFilterBar.prototype.awaitControlDelegate = function() {
|
|
154
|
+
return this._oAdaptationControlPromise.then(function() {
|
|
155
|
+
return this._getAdaptationControlInstance().awaitControlDelegate();
|
|
156
|
+
}.bind(this));
|
|
157
|
+
};
|
|
158
|
+
|
|
153
159
|
AdaptationFilterBar.prototype.initPropertyHelper = function() {
|
|
154
160
|
return this._oAdaptationControlPromise.then(function() {
|
|
155
161
|
return this._getAdaptationControlInstance().initPropertyHelper();
|
|
156
162
|
}.bind(this));
|
|
157
163
|
};
|
|
158
164
|
|
|
165
|
+
AdaptationFilterBar.prototype.finalizePropertyHelper = function() {
|
|
166
|
+
return this._oAdaptationControlPromise.then(function() {
|
|
167
|
+
return this._getAdaptationControlInstance().finalizePropertyHelper();
|
|
168
|
+
}.bind(this));
|
|
169
|
+
};
|
|
170
|
+
|
|
159
171
|
AdaptationFilterBar.prototype.getTypeUtil = function() {
|
|
160
172
|
if (!this._getAdaptationControlInstance()) {
|
|
161
173
|
throw new Error("No adaptation control assigned yet.");
|
|
@@ -192,7 +204,6 @@ sap.ui.define([
|
|
|
192
204
|
|
|
193
205
|
return this._oAdaptationControlPromise.then(function() {
|
|
194
206
|
return this._getAdaptationControlInstance().awaitPropertyHelper().then(function(oPropertyHelper) {
|
|
195
|
-
this._oMetadataAppliedPromise = Promise.resolve();
|
|
196
207
|
if (!this._getAdaptationControlInstance().isPropertyHelperFinal()) {
|
|
197
208
|
return this.finalizePropertyHelper();
|
|
198
209
|
}
|
|
@@ -202,8 +213,12 @@ sap.ui.define([
|
|
|
202
213
|
}.bind(this));
|
|
203
214
|
};
|
|
204
215
|
|
|
216
|
+
AdaptationFilterBar.prototype.isControlDelegateInitialized = function() {
|
|
217
|
+
return this._getAdaptationControlInstance().isControlDelegateInitialized();
|
|
218
|
+
};
|
|
219
|
+
|
|
205
220
|
AdaptationFilterBar.prototype.createConditionChanges = function() {
|
|
206
|
-
return Promise.all([this._oAdaptationControlPromise, this.
|
|
221
|
+
return Promise.all([this._oAdaptationControlPromise, this.awaitControlDelegate()]).then(function() {
|
|
207
222
|
var mConditions = this._getModelConditions(this._getConditionModel(), false, true);
|
|
208
223
|
if (this._bPersistValues) {
|
|
209
224
|
//this._getAdaptationControlInstance(), "Filter", mConditions, true, true
|
|
@@ -56,7 +56,7 @@ sap.ui.define(
|
|
|
56
56
|
* The metadata information is provided via the {@link sap.ui.mdc.FilterBarDelegate FilterBarDelegate} implementation. This implementation has to be provided by the application.
|
|
57
57
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
58
58
|
* @author SAP SE
|
|
59
|
-
* @version 1.
|
|
59
|
+
* @version 1.111.0
|
|
60
60
|
* @constructor
|
|
61
61
|
* @private
|
|
62
62
|
* @ui5-restricted sap.fe
|
|
@@ -303,7 +303,7 @@ sap.ui.define(
|
|
|
303
303
|
/**
|
|
304
304
|
* Getter for the initial focusable <code>control</code> on the <code>FilterBar</code>.
|
|
305
305
|
*
|
|
306
|
-
* @returns {
|
|
306
|
+
* @returns {sap.ui.core.Control} Control instance which could get the focus.
|
|
307
307
|
*
|
|
308
308
|
* @private
|
|
309
309
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/m/p13n/Engine",
|
|
8
|
-
"sap/ui/mdc/flexibility/Util"
|
|
9
|
-
|
|
8
|
+
"sap/ui/mdc/flexibility/Util",
|
|
9
|
+
"sap/ui/fl/changeHandler/condenser/Classification"
|
|
10
|
+
], function(Engine, Util, CondenserClassification) {
|
|
10
11
|
"use strict";
|
|
11
12
|
|
|
12
13
|
var fRebindControl = function (oControl) {
|
|
@@ -91,14 +92,25 @@ sap.ui.define([
|
|
|
91
92
|
|
|
92
93
|
var Aggregate = {};
|
|
93
94
|
|
|
95
|
+
var fGetCondenserInfoCondition = function(oChange, mPropertyBag) {
|
|
96
|
+
var oContent = oChange.getContent();
|
|
97
|
+
return {
|
|
98
|
+
classification: CondenserClassification.Reverse,
|
|
99
|
+
affectedControl: oChange.getSelector(),
|
|
100
|
+
uniqueKey: "aggregate" + "_" + oContent.name
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
|
|
94
104
|
Aggregate.addAggregate = Util.createChangeHandler({
|
|
95
105
|
apply: fAddAggregate,
|
|
96
|
-
revert: fRemoveAggregate
|
|
106
|
+
revert: fRemoveAggregate,
|
|
107
|
+
getCondenserInfo: fGetCondenserInfoCondition
|
|
97
108
|
});
|
|
98
109
|
|
|
99
110
|
Aggregate.removeAggregate = Util.createChangeHandler({
|
|
100
111
|
apply: fRemoveAggregate,
|
|
101
|
-
revert: fAddAggregate
|
|
112
|
+
revert: fAddAggregate,
|
|
113
|
+
getCondenserInfo: fGetCondenserInfoCondition
|
|
102
114
|
});
|
|
103
115
|
|
|
104
116
|
return Aggregate;
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/mdc/flexibility/Util"
|
|
8
|
-
|
|
7
|
+
"sap/ui/mdc/flexibility/Util",
|
|
8
|
+
"sap/ui/fl/changeHandler/condenser/Classification"
|
|
9
|
+
], function(Util, Classification) {
|
|
9
10
|
"use strict";
|
|
10
11
|
|
|
11
12
|
var ChartTypeFlex = {};
|
|
@@ -25,11 +26,21 @@ sap.ui.define([
|
|
|
25
26
|
var fRevertChartType = function(oChange, oChart, mPropertyBag) {
|
|
26
27
|
mPropertyBag.modifier.setProperty(oChart, "chartType", oChange.getRevertData());
|
|
27
28
|
oChange.resetRevertData();
|
|
29
|
+
return Promise.resolve();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var fGetCondenserInfoChartType = function(oChange, mPropertyBag) {
|
|
33
|
+
return {
|
|
34
|
+
classification: Classification.LastOneWins,
|
|
35
|
+
affectedControl: oChange.getSelector(),
|
|
36
|
+
uniqueKey: "chartType"
|
|
37
|
+
};
|
|
28
38
|
};
|
|
29
39
|
|
|
30
40
|
ChartTypeFlex.setChartType = Util.createChangeHandler({
|
|
31
41
|
apply: fSetChartType,
|
|
32
|
-
revert: fRevertChartType
|
|
42
|
+
revert: fRevertChartType,
|
|
43
|
+
getCondenserInfo: fGetCondenserInfoChartType
|
|
33
44
|
});
|
|
34
45
|
|
|
35
46
|
return ChartTypeFlex;
|