@openui5/sap.ui.mdc 1.141.2 → 1.142.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/README.md +2 -2
- package/REUSE.toml +38 -0
- package/THIRDPARTY.txt +34 -1
- 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 +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +26 -3
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Geomap.js +571 -0
- package/src/sap/ui/mdc/GeomapDelegate.js +285 -0
- package/src/sap/ui/mdc/GeomapRenderer.js +76 -0
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +3 -3
- package/src/sap/ui/mdc/Table.js +117 -101
- package/src/sap/ui/mdc/TableDelegate.js +3 -2
- package/src/sap/ui/mdc/ValueHelp.js +1 -1
- package/src/sap/ui/mdc/ValueHelpDelegate.js +4 -1
- 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/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/chart/ToolbarControlFactory.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 +1 -1
- 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/geomap/Geomap.designtime.js +23 -0
- package/src/sap/ui/mdc/enums/GeomapControlPosition.js +46 -0
- package/src/sap/ui/mdc/field/ConditionType.js +1 -1
- package/src/sap/ui/mdc/field/ConditionTypeMixin.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/DynamicDateRangeConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/FieldBase.js +45 -20
- 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/FieldSelect.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +22 -0
- 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/filterbar/FilterBarBase.js +35 -1
- 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 +1 -1
- 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/ItemBaseFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/SortFlex.js +12 -5
- package/src/sap/ui/mdc/flexibility/Table.flexibility.js +17 -11
- package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/helpers/getAffectedSorter.js +25 -0
- package/src/sap/ui/mdc/geomap/Item.js +48 -0
- package/src/sap/ui/mdc/geomap/PropertyHelper.js +70 -0
- package/src/sap/ui/mdc/library.js +6 -4
- package/src/sap/ui/mdc/link/Factory.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 +13 -1
- package/src/sap/ui/mdc/messagebundle_de.properties +2 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_fr.properties +1 -1
- 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/FilterBarLayoutMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
- package/src/sap/ui/mdc/odata/v4/GeomapDelegate.js +60 -0
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +53 -2
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
- package/src/sap/ui/mdc/rules/Table.support.js +149 -118
- 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/DragDropConfig.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +1 -14
- package/src/sap/ui/mdc/table/ODataV4PropertyHelper.js +1 -1
- 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/utils/Personalization.js +1 -1
- package/src/sap/ui/mdc/themes/base/Geomap.less +50 -0
- package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/util/InfoBar.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +2 -2
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +22 -3
- package/src/sap/ui/mdc/valuehelp/Popover.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +126 -25
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -3
- 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/FixedListItem.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +1 -1
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @param {object} [mSettings] Initial settings for the new control
|
|
38
38
|
* @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a popover.
|
|
39
39
|
* @extends sap.ui.mdc.valuehelp.base.Container
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.142.0
|
|
41
41
|
* @constructor
|
|
42
42
|
*
|
|
43
43
|
* @public
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @param {object} [mSettings] Initial settings for the new element
|
|
27
27
|
* @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element.
|
|
28
28
|
* @extends sap.ui.core.Element
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.142.0
|
|
30
30
|
* @constructor
|
|
31
31
|
* @abstract
|
|
32
32
|
*
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
* @param {object} [mSettings] Initial settings for the new element
|
|
37
37
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
38
38
|
* @extends sap.ui.core.Element
|
|
39
|
-
* @version 1.
|
|
39
|
+
* @version 1.142.0
|
|
40
40
|
* @constructor
|
|
41
41
|
* @abstract
|
|
42
42
|
*
|
|
@@ -15,6 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
'sap/ui/mdc/condition/Condition',
|
|
16
16
|
'sap/ui/mdc/condition/FilterOperatorUtil',
|
|
17
17
|
'sap/ui/mdc/field/ConditionsType',
|
|
18
|
+
'sap/ui/mdc/field/ConditionType',
|
|
18
19
|
'sap/ui/mdc/field/splitValue',
|
|
19
20
|
'sap/ui/mdc/enums/FieldEditMode',
|
|
20
21
|
'sap/ui/mdc/enums/FieldDisplay',
|
|
@@ -58,6 +59,7 @@ sap.ui.define([
|
|
|
58
59
|
Condition,
|
|
59
60
|
FilterOperatorUtil,
|
|
60
61
|
ConditionsType,
|
|
62
|
+
ConditionType,
|
|
61
63
|
splitValue,
|
|
62
64
|
FieldEditMode,
|
|
63
65
|
FieldDisplay,
|
|
@@ -121,7 +123,7 @@ sap.ui.define([
|
|
|
121
123
|
* @extends sap.ui.core.Control
|
|
122
124
|
*
|
|
123
125
|
* @author SAP SE
|
|
124
|
-
* @version 1.
|
|
126
|
+
* @version 1.142.0
|
|
125
127
|
*
|
|
126
128
|
* @constructor
|
|
127
129
|
* @alias sap.ui.mdc.valuehelp.base.DefineConditionPanel
|
|
@@ -304,6 +306,8 @@ sap.ui.define([
|
|
|
304
306
|
onpaste: this.onPaste
|
|
305
307
|
};
|
|
306
308
|
|
|
309
|
+
this._oConditionType = new ConditionType();
|
|
310
|
+
|
|
307
311
|
_createInnerControls.call(this);
|
|
308
312
|
this.setModel(this._oManagedObjectModel, "$this");
|
|
309
313
|
this.setModel(this._oManagedObjectModel, "$condition"); // TODO: better solution to have 2 bindingContexts on one control
|
|
@@ -326,6 +330,9 @@ sap.ui.define([
|
|
|
326
330
|
|
|
327
331
|
this._oManagedObjectModel.destroy();
|
|
328
332
|
delete this._oManagedObjectModel;
|
|
333
|
+
|
|
334
|
+
this._oConditionType.destroy();
|
|
335
|
+
delete this._oConditionType;
|
|
329
336
|
},
|
|
330
337
|
|
|
331
338
|
byId: function(sId) {
|
|
@@ -479,7 +486,7 @@ sap.ui.define([
|
|
|
479
486
|
onChange: function(oEvent) {
|
|
480
487
|
const oPromise = oEvent && oEvent.getParameter("promise");
|
|
481
488
|
const oSourceControl = oEvent && oEvent.getSource();
|
|
482
|
-
const fnHandleChange = function(oEvent) {
|
|
489
|
+
const fnHandleChange = function(oEvent, oControl) {
|
|
483
490
|
const aOperators = _getOperators.call(this);
|
|
484
491
|
const aConditions = this.getConditions();
|
|
485
492
|
FilterOperatorUtil.checkConditionsEmpty(aConditions, aOperators);
|
|
@@ -496,28 +503,39 @@ sap.ui.define([
|
|
|
496
503
|
}
|
|
497
504
|
|
|
498
505
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
506
|
+
if (deepEqual(aConditions, this.getConditions())) {
|
|
507
|
+
const oInvisibleText = _getInvisibleTextForField(oControl);
|
|
508
|
+
if (oInvisibleText) {
|
|
509
|
+
oInvisibleText.getBinding("text").checkUpdate(true);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
499
512
|
}.bind(this);
|
|
500
513
|
|
|
501
514
|
if (oPromise) {
|
|
502
515
|
oPromise.then((vResult) => {
|
|
503
516
|
this._bPendingChange = false;
|
|
504
|
-
fnHandleChange({ mParameters: { value: vResult } }); // TODO: use a real event?
|
|
517
|
+
fnHandleChange({ mParameters: { value: vResult } }, oSourceControl); // TODO: use a real event?
|
|
505
518
|
if (this._bPendingValidateCondition) {
|
|
506
519
|
_validateCondition.call(this, oSourceControl);
|
|
507
520
|
delete this._bPendingValidateCondition;
|
|
508
521
|
}
|
|
509
522
|
}).catch((oError) => { // cleanup pending stuff
|
|
510
523
|
this._bPendingChange = false;
|
|
524
|
+
_setInvalidInvisibleText(oSourceControl);
|
|
511
525
|
if (this._bPendingValidateCondition) {
|
|
512
526
|
_validateCondition.call(this, oSourceControl);
|
|
513
527
|
delete this._bPendingValidateCondition;
|
|
514
528
|
}
|
|
515
529
|
});
|
|
516
530
|
|
|
531
|
+
if (oSourceControl) {
|
|
532
|
+
_resetInvisibleRemoveText(oSourceControl);
|
|
533
|
+
}
|
|
534
|
+
|
|
517
535
|
this._bPendingChange = true; // TODO: handle multiple changes
|
|
518
536
|
return;
|
|
519
537
|
} else {
|
|
520
|
-
fnHandleChange();
|
|
538
|
+
fnHandleChange(undefined, oSourceControl);
|
|
521
539
|
}
|
|
522
540
|
|
|
523
541
|
},
|
|
@@ -576,8 +594,7 @@ sap.ui.define([
|
|
|
576
594
|
bInvalid = true;
|
|
577
595
|
oCondition.invalid = true;
|
|
578
596
|
bUpdate = true;
|
|
579
|
-
oField.
|
|
580
|
-
oField.setValueStateText(oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [sKey]));
|
|
597
|
+
_updateErrorValueState(oField, oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [sKey]));
|
|
581
598
|
break;
|
|
582
599
|
}
|
|
583
600
|
}
|
|
@@ -666,12 +683,8 @@ sap.ui.define([
|
|
|
666
683
|
const sConditionPath = oSource.getBindingContext("$condition").getPath(); // Path to condition of the active control
|
|
667
684
|
const iIndex = parseInt(sConditionPath.split("/")[2]); // index of current condition - to remove before adding new ones
|
|
668
685
|
const aConditions = this.getConditions();
|
|
669
|
-
|
|
670
|
-
oFormatOptions
|
|
671
|
-
oFormatOptions.getConditions = function() { return aConditions; }; // as condition where inserted will be removed
|
|
672
|
-
oFormatOptions.defaultOperatorName = aConditions[iIndex].operator; // use current operator as default
|
|
673
|
-
oFormatOptions.valueType = oFormatOptions.dataType;
|
|
674
|
-
delete oFormatOptions.dataType;
|
|
686
|
+
|
|
687
|
+
const oFormatOptions = _adjustFormatOptions(this.getConfig(), aConditions, iIndex);
|
|
675
688
|
const oConditionsType = new ConditionsType(oFormatOptions);
|
|
676
689
|
|
|
677
690
|
aConditions.splice(iIndex, 1); // remove old condition that is overwitten by pasting
|
|
@@ -753,6 +766,40 @@ sap.ui.define([
|
|
|
753
766
|
}
|
|
754
767
|
});
|
|
755
768
|
|
|
769
|
+
function _adjustFormatOptions(oOrigFormatOptions, aConditions, iCurrentCondition) {
|
|
770
|
+
const oCurrentCondition = aConditions[iCurrentCondition];
|
|
771
|
+
|
|
772
|
+
const oFormatOptions = merge({}, oOrigFormatOptions);
|
|
773
|
+
oFormatOptions.display = FieldDisplay.Value;
|
|
774
|
+
oFormatOptions.getConditions = function() { return aConditions; }; // as condition where inserted will be removed
|
|
775
|
+
oFormatOptions.defaultOperatorName = oCurrentCondition?.operator; // use current operator as default
|
|
776
|
+
oFormatOptions.valueType = oFormatOptions.dataType;
|
|
777
|
+
delete oFormatOptions.dataType;
|
|
778
|
+
|
|
779
|
+
return oFormatOptions;
|
|
780
|
+
}
|
|
781
|
+
// resetting the InvisibleText is necessary because conditions are updated async.
|
|
782
|
+
// the InvisibleText will be updated after the value is changed.
|
|
783
|
+
// and reading the old value again
|
|
784
|
+
function _resetInvisibleRemoveText(oField) {
|
|
785
|
+
const oInvisibleText = _getInvisibleTextForField(oField);
|
|
786
|
+
if (oInvisibleText) {
|
|
787
|
+
oInvisibleText.setText("");
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
function _getInvisibleTextForField(oField) {
|
|
793
|
+
if (!oField) {
|
|
794
|
+
return null;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
const oGrid = oField.getParent();
|
|
798
|
+
const oFieldIndex = oGrid.getContent().indexOf(oField);
|
|
799
|
+
const oInvisibleText = oGrid.getContent().find((oControl, iIndex) => oControl.isA("sap.ui.core.InvisibleText") && iIndex > oFieldIndex);
|
|
800
|
+
return oInvisibleText;
|
|
801
|
+
}
|
|
802
|
+
|
|
756
803
|
function _observeChanges(oChanges) {
|
|
757
804
|
|
|
758
805
|
if (oChanges.name === "value") {
|
|
@@ -780,6 +827,10 @@ sap.ui.define([
|
|
|
780
827
|
const oFormatOptionsOld = oTypeOld && oTypeOld.getFormatOptions();
|
|
781
828
|
const oConstraints = oType && oType.getConstraints();
|
|
782
829
|
const oConstraintsOld = oTypeOld && oTypeOld.getConstraints();
|
|
830
|
+
|
|
831
|
+
const oCopiedFormatOptions = _adjustFormatOptions(oChanges.current, aConditions, -1);
|
|
832
|
+
this._oConditionType.setFormatOptions(oCopiedFormatOptions);
|
|
833
|
+
|
|
783
834
|
if (sType !== sTypeOld || !deepEqual(oFormatOptions, oFormatOptionsOld) || !deepEqual(oConstraints, oConstraintsOld)) {
|
|
784
835
|
// operators might be changed if type changed
|
|
785
836
|
// Field binding needs to be updated if type changed
|
|
@@ -908,7 +959,7 @@ sap.ui.define([
|
|
|
908
959
|
|
|
909
960
|
oField.setAdditionalValue(sDescription);
|
|
910
961
|
|
|
911
|
-
this.onChange();
|
|
962
|
+
this.onChange(undefined);
|
|
912
963
|
}
|
|
913
964
|
|
|
914
965
|
function _createControl(oCondition, iIndex, sId, oBindingContext) {
|
|
@@ -1545,11 +1596,26 @@ sap.ui.define([
|
|
|
1545
1596
|
oGrid.insertContent(oOperatorField, iIndex); // insert as add-Button is already at the end
|
|
1546
1597
|
iIndex++;
|
|
1547
1598
|
|
|
1599
|
+
const oInvisibleRemoveText = new InvisibleText(sIdPrefix + "--ivtRemove", {
|
|
1600
|
+
text: {
|
|
1601
|
+
parts: [{ path: "$this>" }],
|
|
1602
|
+
formatter: _getRemoveTextForCondition.bind(this)
|
|
1603
|
+
}
|
|
1604
|
+
}).setLayoutData(new GridData({
|
|
1605
|
+
span: "XL1 L1 M1 S1",
|
|
1606
|
+
visibleS: false,
|
|
1607
|
+
visibleM: false,
|
|
1608
|
+
visibleL: false,
|
|
1609
|
+
visibleXL: false
|
|
1610
|
+
}))
|
|
1611
|
+
.setBindingContext(oBindingContext, "$this"); // to find condition on remove
|
|
1612
|
+
|
|
1548
1613
|
const oRemoveButton = new Button(sIdPrefix + "--removeBtnSmall", {
|
|
1549
1614
|
press: this.removeCondition.bind(this),
|
|
1550
1615
|
type: ButtonType.Transparent,
|
|
1551
1616
|
icon: "sap-icon://decline",
|
|
1552
|
-
tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}"
|
|
1617
|
+
tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}",
|
|
1618
|
+
ariaLabelledBy: oInvisibleRemoveText
|
|
1553
1619
|
})
|
|
1554
1620
|
.setLayoutData(new GridData({
|
|
1555
1621
|
span: "XL1 L1 M1 S2",
|
|
@@ -1560,6 +1626,7 @@ sap.ui.define([
|
|
|
1560
1626
|
visibleXL: false
|
|
1561
1627
|
}))
|
|
1562
1628
|
.setBindingContext(oBindingContext, "$this"); // to find condition on remove
|
|
1629
|
+
|
|
1563
1630
|
if (oBindingContext) {
|
|
1564
1631
|
// as Button is between Operatot and Value don't trigger validation on tabbing between
|
|
1565
1632
|
oRemoveButton.setFieldGroupIds([oBindingContext.getPath()]); // use path to have a ID for every condition
|
|
@@ -1582,7 +1649,8 @@ sap.ui.define([
|
|
|
1582
1649
|
press: this.removeCondition.bind(this),
|
|
1583
1650
|
type: ButtonType.Transparent,
|
|
1584
1651
|
icon: "sap-icon://decline",
|
|
1585
|
-
tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}"
|
|
1652
|
+
tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}",
|
|
1653
|
+
ariaLabelledBy: oInvisibleRemoveText
|
|
1586
1654
|
})
|
|
1587
1655
|
.setLayoutData(new GridData({
|
|
1588
1656
|
span: "XL1 L1 M1 S1",
|
|
@@ -1594,13 +1662,30 @@ sap.ui.define([
|
|
|
1594
1662
|
}))
|
|
1595
1663
|
.setBindingContext(oBindingContext, "$this"); // to find condition on remove
|
|
1596
1664
|
|
|
1597
|
-
|
|
1598
|
-
|
|
1665
|
+
oGrid.insertContent(oRemoveButton2, iIndex);
|
|
1666
|
+
iIndex++;
|
|
1667
|
+
oGrid.insertContent(oInvisibleRemoveText, iIndex);
|
|
1668
|
+
iIndex++;
|
|
1599
1669
|
|
|
1600
1670
|
return iIndex;
|
|
1601
1671
|
|
|
1602
1672
|
}
|
|
1603
1673
|
|
|
1674
|
+
function _getRemoveTextForCondition(oCondition) {
|
|
1675
|
+
const sRemoveUndefinedConditionText = oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ARIALABEL_UNDEFINED");
|
|
1676
|
+
const sFormatedValue = this._oConditionType.formatValue(oCondition);
|
|
1677
|
+
if (!oCondition) { // can only happen on delete
|
|
1678
|
+
return "";
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
if (oCondition.isEmpty || !sFormatedValue) {
|
|
1682
|
+
return sRemoveUndefinedConditionText;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
const sRemoveConditionText = oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ARIALABEL", [sFormatedValue]);
|
|
1686
|
+
return sRemoveConditionText;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1604
1689
|
function _getEditModeFromOperator(sOperator, bInvalid) {
|
|
1605
1690
|
|
|
1606
1691
|
if (!sOperator) {
|
|
@@ -1778,6 +1863,10 @@ sap.ui.define([
|
|
|
1778
1863
|
oRemoveButton2.setBindingContext(oBindingContext, "$this");
|
|
1779
1864
|
iIndex++;
|
|
1780
1865
|
|
|
1866
|
+
const oInvisibleText = aGridContent[iIndex];
|
|
1867
|
+
oInvisibleText.setBindingContext(oBindingContext, "$this");
|
|
1868
|
+
iIndex++;
|
|
1869
|
+
|
|
1781
1870
|
return iIndex;
|
|
1782
1871
|
|
|
1783
1872
|
}
|
|
@@ -1800,6 +1889,22 @@ sap.ui.define([
|
|
|
1800
1889
|
|
|
1801
1890
|
}
|
|
1802
1891
|
|
|
1892
|
+
function _updateErrorValueState(oField, sMessage) {
|
|
1893
|
+
oField.setValueState(ValueState.Error);
|
|
1894
|
+
oField.setValueStateText(sMessage);
|
|
1895
|
+
// update aria-label text
|
|
1896
|
+
_setInvalidInvisibleText(oField);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
function _setInvalidInvisibleText(oField) {
|
|
1900
|
+
const sInvalidMessage = oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ARIALABEL_INVALID");
|
|
1901
|
+
const oInvisibleText = _getInvisibleTextForField(oField);
|
|
1902
|
+
if (oInvisibleText) {
|
|
1903
|
+
oInvisibleText.setText(sInvalidMessage);
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
|
|
1803
1908
|
function _validateCondition(oField) {
|
|
1804
1909
|
|
|
1805
1910
|
const oGrid = oField.getParent();
|
|
@@ -1849,11 +1954,9 @@ sap.ui.define([
|
|
|
1849
1954
|
}
|
|
1850
1955
|
} catch (oException) {
|
|
1851
1956
|
bInvalid = true;
|
|
1852
|
-
oField.
|
|
1853
|
-
oField.setValueStateText(oException.message);
|
|
1957
|
+
_updateErrorValueState(oField, oException.message);
|
|
1854
1958
|
if (oField2 && oField2.getMetadata().getAllProperties().valueState) {
|
|
1855
|
-
oField2.
|
|
1856
|
-
oField2.setValueStateText(oException.message);
|
|
1959
|
+
_updateErrorValueState(oField2, oException.message);
|
|
1857
1960
|
}
|
|
1858
1961
|
}
|
|
1859
1962
|
}
|
|
@@ -1866,11 +1969,9 @@ sap.ui.define([
|
|
|
1866
1969
|
for (let i = 0; i < aConditions.length; i++) {
|
|
1867
1970
|
if (i !== iIndex && !oCondition.isEmpty && FilterOperatorUtil.compareConditions(oCondition, aConditions[i])) {
|
|
1868
1971
|
bInvalid = true;
|
|
1869
|
-
oField.
|
|
1870
|
-
oField.setValueStateText(oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[0]]));
|
|
1972
|
+
_updateErrorValueState(oField, oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[0]]));
|
|
1871
1973
|
if (oField2 && oField2.getMetadata().getAllProperties().valueState) {
|
|
1872
|
-
oField2.
|
|
1873
|
-
oField2.setValueStateText(oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[1]]));
|
|
1974
|
+
_updateErrorValueState(oField2, oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[1]]));
|
|
1874
1975
|
}
|
|
1875
1976
|
break;
|
|
1876
1977
|
}
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @param {object} [mSettings] Initial settings for the new control
|
|
21
21
|
* @class Content for the <code>sap.ui.mdc.valuehelp.content.Dialog</code> element.
|
|
22
22
|
* @extends sap.ui.core.Control
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.142.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @param {object} [mSettings] Initial settings for the new element
|
|
45
45
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
46
46
|
* @extends sap.ui.mdc.valuehelp.base.ListContent
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.142.0
|
|
48
48
|
* @constructor
|
|
49
49
|
* @abstract
|
|
50
50
|
* @public
|
|
@@ -227,7 +227,9 @@ sap.ui.define([
|
|
|
227
227
|
FilterableListContent.prototype._findConditionsForContext = function(oContext, aConditions) {
|
|
228
228
|
const oDelegate = this.isValueHelpDelegateInitialized() && this.getValueHelpDelegate();
|
|
229
229
|
if (oContext && oDelegate) {
|
|
230
|
-
|
|
230
|
+
/**
|
|
231
|
+
* @deprecated since 1.118.0
|
|
232
|
+
*/
|
|
231
233
|
if (oDelegate.isFilterableListItemSelected) {
|
|
232
234
|
Log.warning("MDC.ValueHelp", "Delegate method 'isFilterableListItemSelected' is deprecated, please implement 'findConditionsForContext' instead.");
|
|
233
235
|
|
|
@@ -247,7 +249,6 @@ sap.ui.define([
|
|
|
247
249
|
}
|
|
248
250
|
return [];
|
|
249
251
|
}
|
|
250
|
-
// -->
|
|
251
252
|
return oDelegate.findConditionsForContext(this.getValueHelpInstance(), this, oContext, aConditions);
|
|
252
253
|
}
|
|
253
254
|
return [];
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @param {object} [mSettings] Initial settings for the new element
|
|
22
22
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
23
23
|
* @extends sap.ui.mdc.valuehelp.base.Content
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.142.0
|
|
25
25
|
* @constructor
|
|
26
26
|
* @abstract
|
|
27
27
|
* @public
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @param {object} [mSettings] Initial settings for the new element
|
|
21
21
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element to provide a value help for boolean fields.
|
|
22
22
|
* @extends sap.ui.mdc.valuehelp.content.FixedList
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.142.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @param {object} [mSettings] Initial settings for the new element
|
|
28
28
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a condition panel.
|
|
29
29
|
* @extends sap.ui.mdc.valuehelp.base.Content
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.142.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @public
|
|
33
33
|
* @since 1.95.0
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
* @param {object} [mSettings] Initial settings for the new element
|
|
35
35
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a list with fixed values.
|
|
36
36
|
* @extends sap.ui.mdc.valuehelp.base.ListContent
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.142.0
|
|
38
38
|
* @constructor
|
|
39
39
|
* @public
|
|
40
40
|
* @since 1.95.0
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @param {object} [mSettings] Initial settings for the new element
|
|
43
43
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.ui.mdc.Table}.
|
|
44
44
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.142.0
|
|
46
46
|
* @constructor
|
|
47
47
|
* @public
|
|
48
48
|
* @since 1.95.0
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* @param {object} [mSettings] Initial settings for the new element
|
|
56
56
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.m.Table}.
|
|
57
57
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
58
|
-
* @version 1.
|
|
58
|
+
* @version 1.142.0
|
|
59
59
|
* @constructor
|
|
60
60
|
* @public
|
|
61
61
|
* @since 1.95.0
|