@openui5/sap.ui.mdc 1.111.1 → 1.112.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/Chart.js +21 -23
- package/src/sap/ui/mdc/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/ChartRenderer.js +0 -2
- 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 +6 -6
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +0 -37
- package/src/sap/ui/mdc/FilterField.js +4 -4
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +3 -11
- package/src/sap/ui/mdc/TableDelegate.js +5 -3
- package/src/sap/ui/mdc/ValueHelp.js +28 -15
- 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 +0 -2
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +2 -2
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +2 -2
- package/src/sap/ui/mdc/chart/PropertyHelper.js +35 -2
- 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 +43 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +10 -17
- package/src/sap/ui/mdc/condition/RangeOperator.js +7 -8
- package/src/sap/ui/mdc/field/ConditionType.js +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +6 -6
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +49 -62
- package/src/sap/ui/mdc/field/FieldBase.js +93 -33
- 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/DateContent.js +1 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +3 -0
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +29 -2
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +56 -9
- package/src/sap/ui/mdc/flexibility/SortFlex.js +56 -9
- package/src/sap/ui/mdc/flexibility/Util.js +8 -3
- package/src/sap/ui/mdc/library.js +108 -2
- 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 +15 -0
- package/src/sap/ui/mdc/messagebundle_ar.properties +11 -1
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_el.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_hu.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +11 -1
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_nl.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +4 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -71
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +7 -0
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +382 -376
- 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/AdaptFiltersController.js +5 -3
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +158 -11
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +7 -7
- package/src/sap/ui/mdc/p13n/subcontroller/SelectionController.js +1 -1
- 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 +19 -0
- package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- 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/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/menu/Item.js +6 -0
- package/src/sap/ui/mdc/themes/base/Chart.less +1 -1
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +5 -1
- package/src/sap/ui/mdc/util/DateUtil.js +84 -95
- package/src/sap/ui/mdc/util/InfoBar.js +88 -60
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +5 -1
- package/src/sap/ui/mdc/util/TypeUtil.js +6 -3
- package/src/sap/ui/mdc/valuehelp/Dialog.js +67 -58
- package/src/sap/ui/mdc/valuehelp/Popover.js +19 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +12 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -8
- package/src/sap/ui/mdc/p13n/Engine.js +0 -1200
- package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -276
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +0 -438
|
@@ -86,7 +86,7 @@ sap.ui.define([
|
|
|
86
86
|
* @implements sap.ui.core.IFormContent, sap.ui.core.ISemanticFormContent
|
|
87
87
|
*
|
|
88
88
|
* @author SAP SE
|
|
89
|
-
* @version 1.
|
|
89
|
+
* @version 1.112.0
|
|
90
90
|
*
|
|
91
91
|
* @constructor
|
|
92
92
|
* @alias sap.ui.mdc.field.FieldBase
|
|
@@ -512,7 +512,8 @@ sap.ui.define([
|
|
|
512
512
|
defaultAggregation: "content"
|
|
513
513
|
},
|
|
514
514
|
renderer: FieldBaseRenderer,
|
|
515
|
-
_oManagedObjectModel: null
|
|
515
|
+
_oManagedObjectModel: null,
|
|
516
|
+
_oInvalidInput: null
|
|
516
517
|
});
|
|
517
518
|
|
|
518
519
|
// apply the message mixin so all message on the input will get the associated label-texts injected
|
|
@@ -626,8 +627,28 @@ sap.ui.define([
|
|
|
626
627
|
return this._oContentFactory;
|
|
627
628
|
};
|
|
628
629
|
|
|
630
|
+
var _setFocusTimer = function (oEvent) {
|
|
631
|
+
var oFieldHelp = _getFieldHelp.call(this);
|
|
632
|
+
if (oFieldHelp && !this._iFocusTimer && oFieldHelp.shouldOpenOnFocus() && !oFieldHelp.isOpen()) {
|
|
633
|
+
this._iFocusTimer = setTimeout(function () {
|
|
634
|
+
oFieldHelp.open(true);
|
|
635
|
+
this._redirectFocus(oEvent, oFieldHelp);
|
|
636
|
+
this._iFocusTimer = null;
|
|
637
|
+
}.bind(this),300);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
var _clearFocusTimer = function () {
|
|
642
|
+
if (this._iFocusTimer) {
|
|
643
|
+
clearTimeout(this._iFocusTimer);
|
|
644
|
+
this._iFocusTimer = null;
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
|
|
629
648
|
FieldBase.prototype.exit = function() {
|
|
630
649
|
|
|
650
|
+
_clearFocusTimer.call(this);
|
|
651
|
+
|
|
631
652
|
var oFieldInfo = this.getFieldInfo();
|
|
632
653
|
if (oFieldInfo) {
|
|
633
654
|
// as aggregations are destroyed after exit
|
|
@@ -717,15 +738,13 @@ sap.ui.define([
|
|
|
717
738
|
};
|
|
718
739
|
|
|
719
740
|
FieldBase.prototype.onfocusin = function(oEvent) {
|
|
720
|
-
|
|
721
741
|
_connectFieldhelp.call(this);
|
|
722
|
-
|
|
742
|
+
_setFocusTimer.call(this, oEvent);
|
|
723
743
|
};
|
|
724
744
|
|
|
725
745
|
FieldBase.prototype.onsapfocusleave = function(oEvent) {
|
|
726
|
-
|
|
746
|
+
_clearFocusTimer.call(this);
|
|
727
747
|
_clearLiveChangeTimer.call(this);
|
|
728
|
-
|
|
729
748
|
};
|
|
730
749
|
|
|
731
750
|
// fire change event only if unit and currency field are left
|
|
@@ -742,7 +761,7 @@ sap.ui.define([
|
|
|
742
761
|
if (oPromise) {
|
|
743
762
|
_executeChange.call(this, undefined, undefined, undefined, oPromise);
|
|
744
763
|
} else {
|
|
745
|
-
_executeChange.call(this, this.getConditions(), !this.
|
|
764
|
+
_executeChange.call(this, this.getConditions(), !this._isInvalidInput());
|
|
746
765
|
}
|
|
747
766
|
}
|
|
748
767
|
}
|
|
@@ -806,7 +825,7 @@ sap.ui.define([
|
|
|
806
825
|
|
|
807
826
|
// if same value is entered again no change event is triggered, So we need to close the suggestion here
|
|
808
827
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
809
|
-
if (oFieldHelp && oFieldHelp.isOpen(
|
|
828
|
+
if (oFieldHelp && oFieldHelp.isOpen()) {
|
|
810
829
|
oFieldHelp.close();
|
|
811
830
|
}
|
|
812
831
|
this._sFilterValue = "";
|
|
@@ -820,19 +839,23 @@ sap.ui.define([
|
|
|
820
839
|
|
|
821
840
|
};
|
|
822
841
|
|
|
842
|
+
FieldBase.prototype._redirectFocus = function (oEvent, oFieldHelp) {
|
|
843
|
+
var oSource = oEvent.srcControl;
|
|
844
|
+
if (oFieldHelp.isOpen() && (!this._getContentFactory().isMeasure() || (oSource.getShowValueHelp && oSource.getShowValueHelp()))) {
|
|
845
|
+
oSource.addStyleClass("sapMFocus"); // to show focus outline again after navigation
|
|
846
|
+
oFieldHelp.removeFocus();
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
|
|
823
850
|
FieldBase.prototype.ontap = function(oEvent) {
|
|
824
851
|
|
|
825
852
|
// in "Select"-case the suggestion help should open on click into field
|
|
826
853
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
827
854
|
if (oFieldHelp) {
|
|
828
|
-
if (oFieldHelp.shouldOpenOnClick() && !oFieldHelp.isOpen(
|
|
855
|
+
if (oFieldHelp.shouldOpenOnClick() && !oFieldHelp.isOpen()) {
|
|
829
856
|
oFieldHelp.open(true);
|
|
830
857
|
}
|
|
831
|
-
|
|
832
|
-
if (oFieldHelp.isOpen(true) && (!this._getContentFactory().isMeasure() || (oSource.getShowValueHelp && oSource.getShowValueHelp()))) {
|
|
833
|
-
oSource.addStyleClass("sapMFocus"); // to show focus outline again after navigation
|
|
834
|
-
oFieldHelp.removeFocus();
|
|
835
|
-
}
|
|
858
|
+
this._redirectFocus(oEvent, oFieldHelp);
|
|
836
859
|
}
|
|
837
860
|
|
|
838
861
|
};
|
|
@@ -926,7 +949,12 @@ sap.ui.define([
|
|
|
926
949
|
if (bValid) {
|
|
927
950
|
oPromise = Promise.resolve(this._getResultForPromise(aConditions));
|
|
928
951
|
} else {
|
|
929
|
-
|
|
952
|
+
var oException = this._getInvalidInputException();
|
|
953
|
+
if (oException) {
|
|
954
|
+
oPromise = Promise.reject(oException);
|
|
955
|
+
} else { // maybe e.g. DatePicker fires change with valid=false but no exception
|
|
956
|
+
oPromise = Promise.reject(vWrongValue);
|
|
957
|
+
}
|
|
930
958
|
}
|
|
931
959
|
}
|
|
932
960
|
|
|
@@ -951,7 +979,7 @@ sap.ui.define([
|
|
|
951
979
|
|
|
952
980
|
if (oPromise) {
|
|
953
981
|
bPending = true;
|
|
954
|
-
} else if (this.
|
|
982
|
+
} else if (this._isInvalidInput()) {
|
|
955
983
|
oPromise = Promise.reject();
|
|
956
984
|
} else {
|
|
957
985
|
oPromise = Promise.resolve(this._getResultForPromise(this.getConditions()));
|
|
@@ -961,7 +989,7 @@ sap.ui.define([
|
|
|
961
989
|
if (bPending) {
|
|
962
990
|
_executeChange.call(this, undefined, undefined, undefined, oPromise);
|
|
963
991
|
} else {
|
|
964
|
-
_executeChange.call(this, this.getConditions(), !this.
|
|
992
|
+
_executeChange.call(this, this.getConditions(), !this._isInvalidInput(), undefined, oPromise);
|
|
965
993
|
}
|
|
966
994
|
}
|
|
967
995
|
|
|
@@ -1133,7 +1161,7 @@ sap.ui.define([
|
|
|
1133
1161
|
}
|
|
1134
1162
|
|
|
1135
1163
|
if (oChanges.name === "conditions") {
|
|
1136
|
-
this.
|
|
1164
|
+
this._resetInvalidInput(); // if conditions updated from outside parse error is obsolete. If updated from inside no parse error occurs
|
|
1137
1165
|
_handleConditionsChange.call(this, oChanges.current, oChanges.old);
|
|
1138
1166
|
|
|
1139
1167
|
// try to find the corresponding async. change
|
|
@@ -1827,9 +1855,9 @@ sap.ui.define([
|
|
|
1827
1855
|
this._getContentFactory().setUnitOriginalType(undefined);
|
|
1828
1856
|
}
|
|
1829
1857
|
|
|
1830
|
-
if (this.
|
|
1858
|
+
if (this._isInvalidInput()) {
|
|
1831
1859
|
// as wrong input get lost if content control is destroyed.
|
|
1832
|
-
this.
|
|
1860
|
+
this._resetInvalidInput();
|
|
1833
1861
|
this._removeUIMessage();
|
|
1834
1862
|
}
|
|
1835
1863
|
|
|
@@ -2075,10 +2103,36 @@ sap.ui.define([
|
|
|
2075
2103
|
|
|
2076
2104
|
}
|
|
2077
2105
|
|
|
2106
|
+
FieldBase.prototype._setInvalidInput = function(oException, vValue, sReason) {
|
|
2107
|
+
|
|
2108
|
+
this._oInvalidInput = {exception: oException, value: vValue, reason: sReason};
|
|
2109
|
+
|
|
2110
|
+
};
|
|
2111
|
+
|
|
2112
|
+
FieldBase.prototype._getInvalidInputException = function() {
|
|
2113
|
+
|
|
2114
|
+
return this._oInvalidInput && this._oInvalidInput.exception;
|
|
2115
|
+
|
|
2116
|
+
};
|
|
2117
|
+
|
|
2118
|
+
FieldBase.prototype._resetInvalidInput = function() {
|
|
2119
|
+
|
|
2120
|
+
this._oInvalidInput = null;
|
|
2121
|
+
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
FieldBase.prototype._isInvalidInput = function() {
|
|
2125
|
+
|
|
2126
|
+
return !!this._oInvalidInput;
|
|
2127
|
+
|
|
2128
|
+
};
|
|
2129
|
+
|
|
2078
2130
|
function _handleParseError(oEvent) {
|
|
2079
2131
|
|
|
2080
2132
|
// as change event if inner control is fired even Input is wrong, check parse exception from binding
|
|
2081
|
-
|
|
2133
|
+
var vValue = oEvent.getParameter("newValue");
|
|
2134
|
+
var oException = oEvent.getParameter("exception");
|
|
2135
|
+
this._setInvalidInput(oException, vValue, "ParseError");
|
|
2082
2136
|
this._sFilterValue = "";
|
|
2083
2137
|
|
|
2084
2138
|
}
|
|
@@ -2086,12 +2140,12 @@ sap.ui.define([
|
|
|
2086
2140
|
function _handleValidationError(oEvent) {
|
|
2087
2141
|
|
|
2088
2142
|
// as change event if inner control is fired even Input is wrong, check validation exception from binding
|
|
2089
|
-
|
|
2143
|
+
var vValue = oEvent.getParameter("newValue");
|
|
2144
|
+
var oException = oEvent.getParameter("exception");
|
|
2145
|
+
this._setInvalidInput(oException, vValue, "ValidationError");
|
|
2090
2146
|
this._sFilterValue = "";
|
|
2091
2147
|
|
|
2092
2148
|
// try to find the corresponding async. change and reject it
|
|
2093
|
-
var vValue = oEvent.getParameter("newValue");
|
|
2094
|
-
var oException = oEvent.getParameter("exception");
|
|
2095
2149
|
var aWrongConditions = oException && oException instanceof ConditionValidateException && oException.getConditions(); // we store the conditions in the ConditionValidationException
|
|
2096
2150
|
var bFound = false;
|
|
2097
2151
|
var i = 0;
|
|
@@ -2119,7 +2173,7 @@ sap.ui.define([
|
|
|
2119
2173
|
|
|
2120
2174
|
function _handleValidationSuccess(oEvent) {
|
|
2121
2175
|
|
|
2122
|
-
this.
|
|
2176
|
+
this._resetInvalidInput(); // if last valid value is entered again no condition is updated
|
|
2123
2177
|
|
|
2124
2178
|
}
|
|
2125
2179
|
|
|
@@ -2152,7 +2206,7 @@ sap.ui.define([
|
|
|
2152
2206
|
|
|
2153
2207
|
if (oChange.changeEvent.parameters.hasOwnProperty("valid")) {
|
|
2154
2208
|
bValid = oChange.changeEvent.parameters["valid"];
|
|
2155
|
-
} else if (this.
|
|
2209
|
+
} else if (this._isInvalidInput()) {
|
|
2156
2210
|
// this might be result of a value that cannot be parsed
|
|
2157
2211
|
bValid = false;
|
|
2158
2212
|
}
|
|
@@ -2221,7 +2275,7 @@ sap.ui.define([
|
|
|
2221
2275
|
if (oFieldHelp && (!this._getContentFactory().isMeasure() || oSource.getShowValueHelp())) {
|
|
2222
2276
|
if (bEscPressed) {
|
|
2223
2277
|
// close FieldHelp if escape pressed and not repoen it for last typed characters
|
|
2224
|
-
if (oFieldHelp.isOpen(
|
|
2278
|
+
if (oFieldHelp.isOpen()) {
|
|
2225
2279
|
oFieldHelp.close();
|
|
2226
2280
|
_setConditionsOnFieldHelp.call(this, this.getConditions(), oFieldHelp); // reset conditions
|
|
2227
2281
|
_clearLiveChangeTimer.call(this);
|
|
@@ -2245,6 +2299,9 @@ sap.ui.define([
|
|
|
2245
2299
|
this._bIgnoreInputValue = false; // after typing the input value is the current one and should be used
|
|
2246
2300
|
this._vLiveChangeValue = vValue;
|
|
2247
2301
|
if (!this._fnLiveChangeTimer) {
|
|
2302
|
+
|
|
2303
|
+
_clearFocusTimer.call(this);
|
|
2304
|
+
|
|
2248
2305
|
this._fnLiveChangeTimer = debounce(function() {
|
|
2249
2306
|
var sDisplay = this.getDisplay();
|
|
2250
2307
|
// remove "(", ")" from serach string
|
|
@@ -2454,7 +2511,7 @@ sap.ui.define([
|
|
|
2454
2511
|
}
|
|
2455
2512
|
|
|
2456
2513
|
var aHelpConditions;
|
|
2457
|
-
if (this.
|
|
2514
|
+
if (this._isInvalidInput() && this.getMaxConditionsForHelp() === 1) {
|
|
2458
2515
|
// if parsing error and single value case do not see the old (outdated) condition as selected
|
|
2459
2516
|
// TODO: handling if error only on unit or number part
|
|
2460
2517
|
aHelpConditions = [];
|
|
@@ -2481,6 +2538,9 @@ sap.ui.define([
|
|
|
2481
2538
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
2482
2539
|
|
|
2483
2540
|
if (oFieldHelp) {
|
|
2541
|
+
if (this._fnLiveChangeTimer) { // as live change might pending we need to update the filterValue
|
|
2542
|
+
this._fnLiveChangeTimer.flush();
|
|
2543
|
+
}
|
|
2484
2544
|
oFieldHelp.setFilterValue(this._sFilterValue); // use types value for filtering, even if reopening FieldHelp
|
|
2485
2545
|
var aConditions = this.getConditions();
|
|
2486
2546
|
_setConditionsOnFieldHelp.call(this, aConditions, oFieldHelp);
|
|
@@ -2615,8 +2675,8 @@ sap.ui.define([
|
|
|
2615
2675
|
}
|
|
2616
2676
|
|
|
2617
2677
|
// after selection input cannot be wrong
|
|
2618
|
-
if (this.
|
|
2619
|
-
this.
|
|
2678
|
+
if (this._isInvalidInput()) { // only remove messages set by Field itself, message from outside should stay.
|
|
2679
|
+
this._resetInvalidInput();
|
|
2620
2680
|
this._removeUIMessage();
|
|
2621
2681
|
bChangeAfterError = true;
|
|
2622
2682
|
}
|
|
@@ -2789,7 +2849,7 @@ sap.ui.define([
|
|
|
2789
2849
|
// // also in display mode to get right text
|
|
2790
2850
|
// _handleConditionsChange.call(this, this.getConditions());
|
|
2791
2851
|
if (!isEditing && !this._bPendingConditionUpdate && this.getConditions().length > 0 &&
|
|
2792
|
-
(this.getMaxConditions() !== 1 || (this.getDisplay() !== FieldDisplay.Value && !this.
|
|
2852
|
+
(this.getMaxConditions() !== 1 || (this.getDisplay() !== FieldDisplay.Value && !this._isInvalidInput()))
|
|
2793
2853
|
&& this._oManagedObjectModel) {
|
|
2794
2854
|
// update tokens in MultiValue
|
|
2795
2855
|
// update text/value only if no parse error, otherwise wrong value would be removed
|
|
@@ -3076,7 +3136,7 @@ sap.ui.define([
|
|
|
3076
3136
|
|
|
3077
3137
|
oPromise.then(function(vResult) {// vResult can be a condition or an array of conditions
|
|
3078
3138
|
oChange.result = vResult;
|
|
3079
|
-
this.
|
|
3139
|
+
this._resetInvalidInput();
|
|
3080
3140
|
var aConditions = this.getConditions();
|
|
3081
3141
|
if (deepEqual(vResult, aConditions)) {
|
|
3082
3142
|
// parsingResult is same as current value -> no update will happen
|
|
@@ -3090,7 +3150,7 @@ sap.ui.define([
|
|
|
3090
3150
|
// unknown error -> just raise it
|
|
3091
3151
|
throw oException;
|
|
3092
3152
|
}
|
|
3093
|
-
this.
|
|
3153
|
+
this._setInvalidInput(oException, undefined, "AsyncParsing");
|
|
3094
3154
|
fReject(oException);
|
|
3095
3155
|
_removeAsyncChange.call(this, oChange);
|
|
3096
3156
|
}.bind(this));
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @param {object} [mSettings] Initial settings for the new control
|
|
28
28
|
* @class A <code>FieldInfoBase</code> element is a base class that shows any kind of information related to the <code>Field</code> control, for example, navigation targets or contact details.
|
|
29
29
|
* @extends sap.ui.mdc.Element
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.112.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.54.0
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @param {object} [mSettings] Initial settings for the new control
|
|
24
24
|
* @class The <code>FieldInput</code> control is used to render an input field inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
25
25
|
* @extends sap.m.Input
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.112.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @abstract
|
|
29
29
|
* @private
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @class Functions uses in <code>FieldInputRenderer</code> and <code>FieldMultiInputRenderer</code> to adjust aria attributes.
|
|
17
17
|
*
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.112.0
|
|
20
20
|
* @since 1.86.0
|
|
21
21
|
* @alias sap.ui.mdc.field.FieldInputRenderUtil
|
|
22
22
|
*
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @param {object} [mSettings] Initial settings for the new control
|
|
24
24
|
* @class The <code>FieldMultiInput</code> control is used to render a multi-input field inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
25
25
|
* @extends sap.m.MultiInput
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.112.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @abstract
|
|
29
29
|
* @private
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @param {object} [mSettings] Initial settings for the new control
|
|
21
21
|
* @class Base type for <code>MultiValueFieldItem</code> control.
|
|
22
22
|
* @extends sap.ui.core.Element
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.112.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @abstract
|
|
26
26
|
* @private
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @param {object} [mSettings] Initial settings for the new control
|
|
24
24
|
* @class The <code>TokenDisplay</code> control is used to render a field inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
25
25
|
* @extends sap.m.Token
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.112.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @abstract
|
|
29
29
|
* @private
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @param {object} [mSettings] Initial settings for the new control
|
|
29
29
|
* @class The <code>TokenizerDisplay</code> control is used to render a Tokenizer inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
30
30
|
* @extends sap.m.Tokenizer
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.112.0
|
|
32
32
|
* @constructor
|
|
33
33
|
* @abstract
|
|
34
34
|
* @private
|
|
@@ -281,7 +281,7 @@ sap.ui.define([
|
|
|
281
281
|
var oType = oContentFactory.retrieveDataType(); // TODO: do we need to create data type right now?
|
|
282
282
|
var sBaseType = oContentFactory.getField().getBaseType();
|
|
283
283
|
var oFormatOptions = oType.getFormatOptions();
|
|
284
|
-
var oUsedFormatOptions = {
|
|
284
|
+
var oUsedFormatOptions = {};
|
|
285
285
|
var oDateRangeFormatOptions = {};
|
|
286
286
|
|
|
287
287
|
if (oFormatOptions.style) {
|
|
@@ -292,7 +292,6 @@ sap.ui.define([
|
|
|
292
292
|
|
|
293
293
|
if (sBaseType === BaseType.DateTime) {
|
|
294
294
|
oDateRangeFormatOptions.datetime = oUsedFormatOptions;
|
|
295
|
-
oDateRangeFormatOptions.datetime.UTC = oType.getFormatOptions().UTC === true; // for DateTime we have to set it depending on the type UTC setting
|
|
296
295
|
}
|
|
297
296
|
|
|
298
297
|
// use Date FormatOptions anyhow for Operations supporting only dates
|
|
@@ -62,7 +62,7 @@ sap.ui.define([
|
|
|
62
62
|
* @class The <code>FilterBarBase</code> control is used as a faceless base class for common functionality of any MDC FilterBar derivation.
|
|
63
63
|
* @extends sap.ui.mdc.Control
|
|
64
64
|
* @author SAP SE
|
|
65
|
-
* @version 1.
|
|
65
|
+
* @version 1.112.0
|
|
66
66
|
* @constructor
|
|
67
67
|
* @private
|
|
68
68
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -1666,7 +1666,7 @@ sap.ui.define([
|
|
|
1666
1666
|
this._filterItemRemoved(oFilterField);
|
|
1667
1667
|
}
|
|
1668
1668
|
|
|
1669
|
-
this._oFilterBarLayout.
|
|
1669
|
+
this._oFilterBarLayout.invalidate();
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
@@ -33,6 +33,9 @@ sap.ui.define([],
|
|
|
33
33
|
FilterBarBaseRenderer.render = function (oRm, oControl) {
|
|
34
34
|
oRm.openStart("div", oControl);
|
|
35
35
|
oRm.class(FilterBarBaseRenderer.CSS_CLASS);
|
|
36
|
+
if (oControl.isA("sap.ui.mdc.filterbar.p13n.AdaptationFilterBar") && oControl.getProperty("_useFixedWidth")) {
|
|
37
|
+
oRm.style("width", oControl.getWidth());
|
|
38
|
+
}
|
|
36
39
|
oRm.openEnd();
|
|
37
40
|
var oInnerLayout = oControl.getAggregation("layout") ? oControl.getAggregation("layout").getInner() : null;
|
|
38
41
|
oRm.renderControl(oInnerLayout);
|
|
@@ -15,20 +15,34 @@ sap.ui.define([
|
|
|
15
15
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
16
16
|
* @param {object} [mSettings] initial settings for the new control
|
|
17
17
|
* @class The <code>AdaptationFilterBar</code> control is used for a lightweight FilterBar implementation for p13n use cases.
|
|
18
|
-
* The <code>AdaptationFilterBar</code> should only be used if the consuming control implements
|
|
18
|
+
* The <code>AdaptationFilterBar</code> should only be used if the consuming control implements at least the <code>IFilterSource</code>
|
|
19
19
|
* interface to provide basic filter functionality.
|
|
20
20
|
*
|
|
21
21
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.112.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
|
+
* @ui5-restricted sap.ui.mdc
|
|
26
27
|
* @since 1.80.0
|
|
27
28
|
* @alias sap.ui.mdc.filterbar.p13n.AdaptationFilterBar
|
|
28
29
|
*/
|
|
29
30
|
var AdaptationFilterBar = FilterBarBase.extend("sap.ui.mdc.filterbar.p13n.AdaptationFilterBar", {
|
|
30
31
|
metadata: {
|
|
31
32
|
library: "sap.ui.mdc",
|
|
33
|
+
properties: {
|
|
34
|
+
/**
|
|
35
|
+
* Determines whether the <code>AdaptationFilterBar</code> has a fixed width.
|
|
36
|
+
*
|
|
37
|
+
* @private
|
|
38
|
+
* @ui5-restricted sap.ui.mdc
|
|
39
|
+
*/
|
|
40
|
+
_useFixedWidth: {
|
|
41
|
+
type: "boolean",
|
|
42
|
+
defaultValue: false,
|
|
43
|
+
visibility: "hidden"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
32
46
|
associations: {
|
|
33
47
|
/**
|
|
34
48
|
* Determines the parent on which the condition changes should be applied on.
|
|
@@ -49,6 +63,8 @@ sap.ui.define([
|
|
|
49
63
|
renderer: FilterBarBaseRenderer
|
|
50
64
|
});
|
|
51
65
|
|
|
66
|
+
AdaptationFilterBar.prototype.WIDTH = "30rem";
|
|
67
|
+
|
|
52
68
|
AdaptationFilterBar.prototype.init = function() {
|
|
53
69
|
FilterBarBase.prototype.init.apply(this,arguments);
|
|
54
70
|
this.addStyleClass("sapUIAdaptationFilterBar");
|
|
@@ -87,6 +103,17 @@ sap.ui.define([
|
|
|
87
103
|
return this._oFilterBarLayout.getInitialFocusedControl();
|
|
88
104
|
};
|
|
89
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Getter for the fixed width of the <code>AdaptationFilterBar</code>
|
|
108
|
+
*
|
|
109
|
+
* @private
|
|
110
|
+
* @ui5-restricted sap.ui.mdc
|
|
111
|
+
* @returns {string} The fixed width of the <code>AdaptationFilterBar</code>
|
|
112
|
+
*/
|
|
113
|
+
AdaptationFilterBar.prototype.getWidth = function() {
|
|
114
|
+
return this.WIDTH;
|
|
115
|
+
};
|
|
116
|
+
|
|
90
117
|
AdaptationFilterBar.prototype.applySettings = function() {
|
|
91
118
|
FilterBarBase.prototype._applySettings.apply(this, arguments);
|
|
92
119
|
this._waitForAdaptControlAndPropertyHelper().then(function() {
|
|
@@ -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.112.0
|
|
60
60
|
* @constructor
|
|
61
61
|
* @private
|
|
62
62
|
* @ui5-restricted sap.fe
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/m/p13n/Engine",
|
|
8
8
|
"sap/ui/mdc/flexibility/Util",
|
|
9
|
-
"sap/ui/fl/changeHandler/Base"
|
|
10
|
-
|
|
9
|
+
"sap/ui/fl/changeHandler/Base",
|
|
10
|
+
"sap/ui/fl/changeHandler/condenser/Classification"
|
|
11
|
+
], function(Engine, Util, FLChangeHandlerBase, CondenserClassification) {
|
|
11
12
|
"use strict";
|
|
12
13
|
|
|
13
14
|
var fRebindControl = function (oControl) {
|
|
@@ -146,19 +147,65 @@ sap.ui.define([
|
|
|
146
147
|
};
|
|
147
148
|
|
|
148
149
|
var Group = {};
|
|
149
|
-
Group.removeGroup = Util.createChangeHandler({
|
|
150
|
-
apply: fRemoveGroup,
|
|
151
|
-
revert: fAddGroup
|
|
152
|
-
});
|
|
153
|
-
|
|
154
150
|
Group.addGroup = Util.createChangeHandler({
|
|
155
151
|
apply: fAddGroup,
|
|
156
|
-
revert: fRemoveGroup
|
|
152
|
+
revert: fRemoveGroup,
|
|
153
|
+
getCondenserInfo: function(oChange, mPropertyBag) {
|
|
154
|
+
return {
|
|
155
|
+
affectedControl: {id: oChange.getContent().name},
|
|
156
|
+
affectedControlIdProperty: "name",
|
|
157
|
+
targetContainer: oChange.getSelector(),
|
|
158
|
+
targetAggregation: "groupLevels",
|
|
159
|
+
customAggregation: mPropertyBag.modifier.bySelector(oChange.getSelector(), mPropertyBag.appComponent).getGroupConditions().groupLevels,
|
|
160
|
+
classification: CondenserClassification.Create,
|
|
161
|
+
setTargetIndex: function(oChange, iNewTargetIndex) {
|
|
162
|
+
oChange.getContent().index = iNewTargetIndex;
|
|
163
|
+
},
|
|
164
|
+
getTargetIndex: function(oChange) {
|
|
165
|
+
return oChange.getContent().index;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
Group.removeGroup = Util.createChangeHandler({
|
|
172
|
+
apply: fRemoveGroup,
|
|
173
|
+
revert: fAddGroup,
|
|
174
|
+
getCondenserInfo: function(oChange, mPropertyBag) {
|
|
175
|
+
return {
|
|
176
|
+
affectedControl: {id: oChange.getContent().name},
|
|
177
|
+
affectedControlIdProperty: "name",
|
|
178
|
+
targetContainer: oChange.getSelector(),
|
|
179
|
+
targetAggregation: "groupLevels",
|
|
180
|
+
customAggregation: mPropertyBag.modifier.bySelector(oChange.getSelector(), mPropertyBag.appComponent).getGroupConditions().groupLevels,
|
|
181
|
+
classification: CondenserClassification.Destroy,
|
|
182
|
+
sourceIndex: oChange.getRevertData().index
|
|
183
|
+
};
|
|
184
|
+
}
|
|
157
185
|
});
|
|
158
186
|
|
|
159
187
|
Group.moveGroup = Util.createChangeHandler({
|
|
160
188
|
apply: fMoveGroup,
|
|
161
|
-
revert: fMoveGroup
|
|
189
|
+
revert: fMoveGroup,
|
|
190
|
+
getCondenserInfo: function(oChange, mPropertyBag) {
|
|
191
|
+
return {
|
|
192
|
+
affectedControl: {id: oChange.getContent().name},
|
|
193
|
+
affectedControlIdProperty: "name",
|
|
194
|
+
targetContainer: oChange.getSelector(),
|
|
195
|
+
targetAggregation: "groupLevels",
|
|
196
|
+
classification: CondenserClassification.Move,
|
|
197
|
+
sourceIndex: oChange.getContent().index,
|
|
198
|
+
customAggregation: mPropertyBag.modifier.bySelector(oChange.getSelector(), mPropertyBag.appComponent).getGroupConditions().groupLevels,
|
|
199
|
+
sourceContainer: oChange.getSelector(),
|
|
200
|
+
sourceAggregation: "groupLevels",
|
|
201
|
+
setTargetIndex: function(oChange, iNewTargetIndex) {
|
|
202
|
+
oChange.getContent().index = iNewTargetIndex;
|
|
203
|
+
},
|
|
204
|
+
getTargetIndex: function(oChange) {
|
|
205
|
+
return oChange.getContent().index;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
162
209
|
});
|
|
163
210
|
|
|
164
211
|
return Group;
|