@openui5/sap.ui.mdc 1.141.2 → 1.143.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.
Files changed (189) hide show
  1. package/README.md +2 -2
  2. package/REUSE.toml +39 -1
  3. package/THIRDPARTY.txt +36 -3
  4. package/package.json +4 -4
  5. package/src/sap/ui/mdc/.library +1 -1
  6. package/src/sap/ui/mdc/ActionToolbar.js +89 -63
  7. package/src/sap/ui/mdc/Chart.js +1 -1
  8. package/src/sap/ui/mdc/Control.js +1 -1
  9. package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
  10. package/src/sap/ui/mdc/Element.js +1 -1
  11. package/src/sap/ui/mdc/Field.js +31 -8
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterField.js +11 -11
  14. package/src/sap/ui/mdc/Geomap.js +571 -0
  15. package/src/sap/ui/mdc/GeomapDelegate.js +285 -0
  16. package/src/sap/ui/mdc/GeomapRenderer.js +76 -0
  17. package/src/sap/ui/mdc/Link.js +1 -1
  18. package/src/sap/ui/mdc/MultiValueField.js +7 -7
  19. package/src/sap/ui/mdc/Table.js +141 -116
  20. package/src/sap/ui/mdc/TableDelegate.js +3 -2
  21. package/src/sap/ui/mdc/ValueHelp.js +1 -1
  22. package/src/sap/ui/mdc/ValueHelpDelegate.js +4 -1
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  24. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
  25. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  26. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  27. package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
  28. package/src/sap/ui/mdc/chart/Util.js +5 -2
  29. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  30. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  31. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  32. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  33. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
  34. package/src/sap/ui/mdc/condition/Operator.js +1 -1
  35. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
  36. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  37. package/src/sap/ui/mdc/designtime/geomap/Geomap.designtime.js +23 -0
  38. package/src/sap/ui/mdc/enums/GeomapControlPosition.js +46 -0
  39. package/src/sap/ui/mdc/enums/TableActionPosition.js +123 -0
  40. package/src/sap/ui/mdc/enums/TablePopinDisplay.js +36 -0
  41. package/src/sap/ui/mdc/field/ConditionType.js +1 -1
  42. package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
  43. package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
  44. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  45. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -1
  46. package/src/sap/ui/mdc/field/FieldBase.js +137 -66
  47. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  48. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  49. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  50. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  51. package/src/sap/ui/mdc/field/FieldSelect.js +7 -1
  52. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  53. package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +22 -0
  54. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  55. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  56. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  57. package/src/sap/ui/mdc/field/content/ContentFactory.js +3 -0
  58. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +35 -1
  59. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +3 -0
  60. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  61. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
  62. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  63. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  64. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  65. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  66. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
  67. package/src/sap/ui/mdc/flexibility/SortFlex.js +12 -5
  68. package/src/sap/ui/mdc/flexibility/Table.flexibility.js +17 -11
  69. package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
  70. package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
  71. package/src/sap/ui/mdc/flexibility/helpers/getAffectedSorter.js +25 -0
  72. package/src/sap/ui/mdc/geomap/Item.js +48 -0
  73. package/src/sap/ui/mdc/geomap/PropertyHelper.js +70 -0
  74. package/src/sap/ui/mdc/library.js +19 -4
  75. package/src/sap/ui/mdc/link/Factory.js +1 -1
  76. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  77. package/src/sap/ui/mdc/link/Panel.js +1 -1
  78. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  79. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  80. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  81. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  82. package/src/sap/ui/mdc/messagebundle.properties +15 -1
  83. package/src/sap/ui/mdc/messagebundle_ar.properties +8 -0
  84. package/src/sap/ui/mdc/messagebundle_bg.properties +8 -0
  85. package/src/sap/ui/mdc/messagebundle_ca.properties +8 -0
  86. package/src/sap/ui/mdc/messagebundle_cnr.properties +8 -0
  87. package/src/sap/ui/mdc/messagebundle_cs.properties +8 -0
  88. package/src/sap/ui/mdc/messagebundle_cy.properties +9 -1
  89. package/src/sap/ui/mdc/messagebundle_da.properties +8 -0
  90. package/src/sap/ui/mdc/messagebundle_de.properties +10 -2
  91. package/src/sap/ui/mdc/messagebundle_el.properties +9 -1
  92. package/src/sap/ui/mdc/messagebundle_en.properties +9 -1
  93. package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -1
  94. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +12 -1
  95. package/src/sap/ui/mdc/messagebundle_es.properties +10 -2
  96. package/src/sap/ui/mdc/messagebundle_es_MX.properties +8 -0
  97. package/src/sap/ui/mdc/messagebundle_et.properties +8 -0
  98. package/src/sap/ui/mdc/messagebundle_fi.properties +8 -0
  99. package/src/sap/ui/mdc/messagebundle_fr.properties +11 -3
  100. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +8 -0
  101. package/src/sap/ui/mdc/messagebundle_hi.properties +8 -0
  102. package/src/sap/ui/mdc/messagebundle_hr.properties +9 -1
  103. package/src/sap/ui/mdc/messagebundle_hu.properties +8 -0
  104. package/src/sap/ui/mdc/messagebundle_id.properties +11 -3
  105. package/src/sap/ui/mdc/messagebundle_it.properties +8 -0
  106. package/src/sap/ui/mdc/messagebundle_iw.properties +8 -0
  107. package/src/sap/ui/mdc/messagebundle_ja.properties +9 -1
  108. package/src/sap/ui/mdc/messagebundle_kk.properties +9 -1
  109. package/src/sap/ui/mdc/messagebundle_ko.properties +8 -0
  110. package/src/sap/ui/mdc/messagebundle_lt.properties +8 -0
  111. package/src/sap/ui/mdc/messagebundle_lv.properties +8 -0
  112. package/src/sap/ui/mdc/messagebundle_mk.properties +8 -0
  113. package/src/sap/ui/mdc/messagebundle_ms.properties +9 -1
  114. package/src/sap/ui/mdc/messagebundle_nl.properties +8 -0
  115. package/src/sap/ui/mdc/messagebundle_no.properties +8 -0
  116. package/src/sap/ui/mdc/messagebundle_pl.properties +8 -0
  117. package/src/sap/ui/mdc/messagebundle_pt.properties +9 -1
  118. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +8 -0
  119. package/src/sap/ui/mdc/messagebundle_ro.properties +9 -1
  120. package/src/sap/ui/mdc/messagebundle_ru.properties +9 -1
  121. package/src/sap/ui/mdc/messagebundle_sh.properties +8 -0
  122. package/src/sap/ui/mdc/messagebundle_sk.properties +8 -0
  123. package/src/sap/ui/mdc/messagebundle_sl.properties +9 -1
  124. package/src/sap/ui/mdc/messagebundle_sr.properties +8 -0
  125. package/src/sap/ui/mdc/messagebundle_sv.properties +8 -0
  126. package/src/sap/ui/mdc/messagebundle_th.properties +8 -0
  127. package/src/sap/ui/mdc/messagebundle_tr.properties +9 -1
  128. package/src/sap/ui/mdc/messagebundle_uk.properties +8 -0
  129. package/src/sap/ui/mdc/messagebundle_vi.properties +11 -3
  130. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -1
  131. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +8 -0
  132. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  133. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  134. package/src/sap/ui/mdc/mixin/FilterBarLayoutMixin.js +1 -1
  135. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  136. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  137. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  138. package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
  139. package/src/sap/ui/mdc/odata/v4/GeomapDelegate.js +60 -0
  140. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +53 -2
  141. package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
  142. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +16 -0
  143. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  144. package/src/sap/ui/mdc/p13n/StateUtil.js +1 -1
  145. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +3 -0
  146. package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
  147. package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
  148. package/src/sap/ui/mdc/rules/Table.support.js +149 -118
  149. package/src/sap/ui/mdc/table/ActionLayoutData.js +47 -0
  150. package/src/sap/ui/mdc/table/Column.js +40 -186
  151. package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
  152. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  153. package/src/sap/ui/mdc/table/DragDropConfig.js +1 -1
  154. package/src/sap/ui/mdc/table/GridTableType.js +35 -21
  155. package/src/sap/ui/mdc/table/ODataV4PropertyHelper.js +1 -1
  156. package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
  157. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
  158. package/src/sap/ui/mdc/table/ResponsiveTableType.js +97 -14
  159. package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
  160. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  161. package/src/sap/ui/mdc/table/TableSettings.js +34 -7
  162. package/src/sap/ui/mdc/table/TableTypeBase.js +38 -7
  163. package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
  164. package/src/sap/ui/mdc/themes/base/Geomap.less +50 -0
  165. package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
  166. package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
  167. package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
  168. package/src/sap/ui/mdc/util/InfoBar.js +1 -1
  169. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  170. package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
  171. package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
  172. package/src/sap/ui/mdc/valuehelp/Dialog.js +2 -2
  173. package/src/sap/ui/mdc/valuehelp/FilterBar.js +22 -3
  174. package/src/sap/ui/mdc/valuehelp/Popover.js +1 -1
  175. package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
  176. package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
  177. package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +140 -26
  178. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  179. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -3
  180. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  181. package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
  182. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
  183. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
  184. package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
  185. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
  186. package/src/sap/ui/mdc/valuehelp/content/MTable.js +7 -5
  187. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +36 -0
  188. package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +20 -3
  189. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +33 -1
@@ -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.141.2
126
+ * @version 1.143.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.setValueState(ValueState.Error);
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
- const oFormatOptions = merge({}, this.getConfig());
670
- oFormatOptions.display = FieldDisplay.Value;
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
@@ -745,7 +758,11 @@ sap.ui.define([
745
758
  return oCtrl;
746
759
  },
747
760
 
748
- // TODO: remove this function and replace by getValueHelp once FieldHelp association is completetly removed.
761
+ /**
762
+ * @deprecated As of 1.114.0, together with `fieldHelp` association
763
+ * @ui5-transform-hint replace-call getValueHelp
764
+ * @private
765
+ */
749
766
  _getValueHelp: function() {
750
767
 
751
768
  return this.getValueHelp() || (this.getFieldHelp && this.getFieldHelp()); // as getFieldHelp not exist in legacy-free UI5
@@ -753,6 +770,40 @@ sap.ui.define([
753
770
  }
754
771
  });
755
772
 
773
+ function _adjustFormatOptions(oOrigFormatOptions, aConditions, iCurrentCondition) {
774
+ const oCurrentCondition = aConditions[iCurrentCondition];
775
+
776
+ const oFormatOptions = merge({}, oOrigFormatOptions);
777
+ oFormatOptions.display = FieldDisplay.Value;
778
+ oFormatOptions.getConditions = function() { return aConditions; }; // as condition where inserted will be removed
779
+ oFormatOptions.defaultOperatorName = oCurrentCondition?.operator; // use current operator as default
780
+ oFormatOptions.valueType = oFormatOptions.dataType;
781
+ delete oFormatOptions.dataType;
782
+
783
+ return oFormatOptions;
784
+ }
785
+ // resetting the InvisibleText is necessary because conditions are updated async.
786
+ // the InvisibleText will be updated after the value is changed.
787
+ // and reading the old value again
788
+ function _resetInvisibleRemoveText(oField) {
789
+ const oInvisibleText = _getInvisibleTextForField(oField);
790
+ if (oInvisibleText) {
791
+ oInvisibleText.setText("");
792
+ }
793
+ }
794
+
795
+
796
+ function _getInvisibleTextForField(oField) {
797
+ if (!oField) {
798
+ return null;
799
+ }
800
+
801
+ const oGrid = oField.getParent();
802
+ const oFieldIndex = oGrid.getContent().indexOf(oField);
803
+ const oInvisibleText = oGrid.getContent().find((oControl, iIndex) => oControl.isA("sap.ui.core.InvisibleText") && iIndex > oFieldIndex);
804
+ return oInvisibleText;
805
+ }
806
+
756
807
  function _observeChanges(oChanges) {
757
808
 
758
809
  if (oChanges.name === "value") {
@@ -780,6 +831,10 @@ sap.ui.define([
780
831
  const oFormatOptionsOld = oTypeOld && oTypeOld.getFormatOptions();
781
832
  const oConstraints = oType && oType.getConstraints();
782
833
  const oConstraintsOld = oTypeOld && oTypeOld.getConstraints();
834
+
835
+ const oCopiedFormatOptions = _adjustFormatOptions(oChanges.current, aConditions, -1);
836
+ this._oConditionType.setFormatOptions(oCopiedFormatOptions);
837
+
783
838
  if (sType !== sTypeOld || !deepEqual(oFormatOptions, oFormatOptionsOld) || !deepEqual(oConstraints, oConstraintsOld)) {
784
839
  // operators might be changed if type changed
785
840
  // Field binding needs to be updated if type changed
@@ -822,6 +877,9 @@ sap.ui.define([
822
877
  // return aValueHelpSupportedOperators.length === 0 || aValueHelpSupportedOperators.indexOf(sKey) >= 0;
823
878
  }
824
879
 
880
+ /**
881
+ * @this {sap.ui.mdc.valuehelp.base.DefineConditionPanel}
882
+ */
825
883
  function _operatorChanged(oField, sKey, sOldKey) {
826
884
  oField._sOldKey = sOldKey; // to know in change event
827
885
 
@@ -908,9 +966,12 @@ sap.ui.define([
908
966
 
909
967
  oField.setAdditionalValue(sDescription);
910
968
 
911
- this.onChange();
969
+ this.onChange(undefined);
912
970
  }
913
971
 
972
+ /**
973
+ * @this {sap.ui.mdc.valuehelp.base.DefineConditionPanel}
974
+ */
914
975
  function _createControl(oCondition, iIndex, sId, oBindingContext) {
915
976
 
916
977
  const oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
@@ -1545,11 +1606,26 @@ sap.ui.define([
1545
1606
  oGrid.insertContent(oOperatorField, iIndex); // insert as add-Button is already at the end
1546
1607
  iIndex++;
1547
1608
 
1609
+ const oInvisibleRemoveText = new InvisibleText(sIdPrefix + "--ivtRemove", {
1610
+ text: {
1611
+ parts: [{ path: "$this>" }],
1612
+ formatter: _getRemoveTextForCondition.bind(this)
1613
+ }
1614
+ }).setLayoutData(new GridData({
1615
+ span: "XL1 L1 M1 S1",
1616
+ visibleS: false,
1617
+ visibleM: false,
1618
+ visibleL: false,
1619
+ visibleXL: false
1620
+ }))
1621
+ .setBindingContext(oBindingContext, "$this"); // to find condition on remove
1622
+
1548
1623
  const oRemoveButton = new Button(sIdPrefix + "--removeBtnSmall", {
1549
1624
  press: this.removeCondition.bind(this),
1550
1625
  type: ButtonType.Transparent,
1551
1626
  icon: "sap-icon://decline",
1552
- tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}"
1627
+ tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}",
1628
+ ariaLabelledBy: oInvisibleRemoveText
1553
1629
  })
1554
1630
  .setLayoutData(new GridData({
1555
1631
  span: "XL1 L1 M1 S2",
@@ -1560,6 +1636,7 @@ sap.ui.define([
1560
1636
  visibleXL: false
1561
1637
  }))
1562
1638
  .setBindingContext(oBindingContext, "$this"); // to find condition on remove
1639
+
1563
1640
  if (oBindingContext) {
1564
1641
  // as Button is between Operatot and Value don't trigger validation on tabbing between
1565
1642
  oRemoveButton.setFieldGroupIds([oBindingContext.getPath()]); // use path to have a ID for every condition
@@ -1582,7 +1659,8 @@ sap.ui.define([
1582
1659
  press: this.removeCondition.bind(this),
1583
1660
  type: ButtonType.Transparent,
1584
1661
  icon: "sap-icon://decline",
1585
- tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}"
1662
+ tooltip: "{$i18n>valuehelp.DEFINECONDITIONS_REMOVECONDITION}",
1663
+ ariaLabelledBy: oInvisibleRemoveText
1586
1664
  })
1587
1665
  .setLayoutData(new GridData({
1588
1666
  span: "XL1 L1 M1 S1",
@@ -1594,13 +1672,30 @@ sap.ui.define([
1594
1672
  }))
1595
1673
  .setBindingContext(oBindingContext, "$this"); // to find condition on remove
1596
1674
 
1597
- oGrid.insertContent(oRemoveButton2, iIndex);
1598
- iIndex++;
1675
+ oGrid.insertContent(oRemoveButton2, iIndex);
1676
+ iIndex++;
1677
+ oGrid.insertContent(oInvisibleRemoveText, iIndex);
1678
+ iIndex++;
1599
1679
 
1600
1680
  return iIndex;
1601
1681
 
1602
1682
  }
1603
1683
 
1684
+ function _getRemoveTextForCondition(oCondition) {
1685
+ const sRemoveUndefinedConditionText = oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ARIALABEL_UNDEFINED");
1686
+ const sFormatedValue = this._oConditionType.formatValue(oCondition);
1687
+ if (!oCondition) { // can only happen on delete
1688
+ return "";
1689
+ }
1690
+
1691
+ if (oCondition.isEmpty || !sFormatedValue) {
1692
+ return sRemoveUndefinedConditionText;
1693
+ }
1694
+
1695
+ const sRemoveConditionText = oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ARIALABEL", [sFormatedValue]);
1696
+ return sRemoveConditionText;
1697
+ }
1698
+
1604
1699
  function _getEditModeFromOperator(sOperator, bInvalid) {
1605
1700
 
1606
1701
  if (!sOperator) {
@@ -1689,6 +1784,9 @@ sap.ui.define([
1689
1784
  }
1690
1785
  }
1691
1786
 
1787
+ /**
1788
+ * @this {sap.ui.mdc.valuehelp.base.DefineConditionPanel}
1789
+ */
1692
1790
  function _updateRow(oCondition, oGrid, iIndex, oBindingContext, iRow) {
1693
1791
 
1694
1792
  const sIdPrefix = this.getId() + "--" + iRow;
@@ -1778,6 +1876,10 @@ sap.ui.define([
1778
1876
  oRemoveButton2.setBindingContext(oBindingContext, "$this");
1779
1877
  iIndex++;
1780
1878
 
1879
+ const oInvisibleText = aGridContent[iIndex];
1880
+ oInvisibleText.setBindingContext(oBindingContext, "$this");
1881
+ iIndex++;
1882
+
1781
1883
  return iIndex;
1782
1884
 
1783
1885
  }
@@ -1800,6 +1902,22 @@ sap.ui.define([
1800
1902
 
1801
1903
  }
1802
1904
 
1905
+ function _updateErrorValueState(oField, sMessage) {
1906
+ oField.setValueState(ValueState.Error);
1907
+ oField.setValueStateText(sMessage);
1908
+ // update aria-label text
1909
+ _setInvalidInvisibleText(oField);
1910
+ }
1911
+
1912
+ function _setInvalidInvisibleText(oField) {
1913
+ const sInvalidMessage = oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ARIALABEL_INVALID");
1914
+ const oInvisibleText = _getInvisibleTextForField(oField);
1915
+ if (oInvisibleText) {
1916
+ oInvisibleText.setText(sInvalidMessage);
1917
+ }
1918
+ }
1919
+
1920
+
1803
1921
  function _validateCondition(oField) {
1804
1922
 
1805
1923
  const oGrid = oField.getParent();
@@ -1849,11 +1967,9 @@ sap.ui.define([
1849
1967
  }
1850
1968
  } catch (oException) {
1851
1969
  bInvalid = true;
1852
- oField.setValueState(ValueState.Error);
1853
- oField.setValueStateText(oException.message);
1970
+ _updateErrorValueState(oField, oException.message);
1854
1971
  if (oField2 && oField2.getMetadata().getAllProperties().valueState) {
1855
- oField2.setValueState(ValueState.Error);
1856
- oField2.setValueStateText(oException.message);
1972
+ _updateErrorValueState(oField2, oException.message);
1857
1973
  }
1858
1974
  }
1859
1975
  }
@@ -1866,11 +1982,9 @@ sap.ui.define([
1866
1982
  for (let i = 0; i < aConditions.length; i++) {
1867
1983
  if (i !== iIndex && !oCondition.isEmpty && FilterOperatorUtil.compareConditions(oCondition, aConditions[i])) {
1868
1984
  bInvalid = true;
1869
- oField.setValueState(ValueState.Error);
1870
- oField.setValueStateText(oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[0]]));
1985
+ _updateErrorValueState(oField, oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[0]]));
1871
1986
  if (oField2 && oField2.getMetadata().getAllProperties().valueState) {
1872
- oField2.setValueState(ValueState.Error);
1873
- oField2.setValueStateText(oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[1]]));
1987
+ _updateErrorValueState(oField2, oMessageBundle.getText("field.CONDITION_ALREADY_EXIST", [oCondition.values[1]]));
1874
1988
  }
1875
1989
  break;
1876
1990
  }
@@ -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.141.2
23
+ * @version 1.143.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.141.2
47
+ * @version 1.143.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
- // <!-- Support for deprecated delegate method isFilterableListItemSelected
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.141.2
24
+ * @version 1.143.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.141.2
23
+ * @version 1.143.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.141.2
30
+ * @version 1.143.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.141.2
37
+ * @version 1.143.0
38
38
  * @constructor
39
39
  * @public
40
40
  * @since 1.95.0
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.ui.core.ListItem
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.141.2
26
+ * @version 1.143.0
27
27
  *
28
28
  * @public
29
29
  * @since 1.114.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.141.2
45
+ * @version 1.143.0
46
46
  * @constructor
47
47
  * @public
48
48
  * @since 1.95.0
@@ -22,7 +22,8 @@ sap.ui.define([
22
22
  'sap/ui/core/Element',
23
23
  'sap/ui/Device',
24
24
  'sap/ui/dom/containsOrEquals',
25
- "sap/m/table/Util"
25
+ "sap/m/table/Util",
26
+ "sap/ui/events/KeyCodes"
26
27
  ], (
27
28
  Library,
28
29
  FilterableListContent,
@@ -41,7 +42,8 @@ sap.ui.define([
41
42
  Element,
42
43
  Device,
43
44
  containsOrEquals,
44
- MTableUtil
45
+ MTableUtil,
46
+ KeyCodes
45
47
  ) => {
46
48
  "use strict";
47
49
 
@@ -55,7 +57,7 @@ sap.ui.define([
55
57
  * @param {object} [mSettings] Initial settings for the new element
56
58
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.m.Table}.
57
59
  * @extends sap.ui.mdc.valuehelp.base.FilterableListContent
58
- * @version 1.141.2
60
+ * @version 1.143.0
59
61
  * @constructor
60
62
  * @public
61
63
  * @since 1.95.0
@@ -1187,7 +1189,7 @@ sap.ui.define([
1187
1189
 
1188
1190
  switch (oEvent.type) {
1189
1191
  case "sapprevious":
1190
- if (oItem.isA("sap.m.ListItemBase")) {
1192
+ if (oEvent.which !== KeyCodes.ARROW_LEFT && oItem.isA("sap.m.ListItemBase")) {
1191
1193
  if (oTable.indexOfItem(oItem) === 0) {
1192
1194
  this.fireNavigated({ condition: undefined, itemId: undefined, leaveFocus: true });
1193
1195
  oEvent.preventDefault();
@@ -1197,7 +1199,7 @@ sap.ui.define([
1197
1199
  }
1198
1200
  break;
1199
1201
  case "sapnext":
1200
- if (oItem.isA("sap.m.ListItemBase") && this._oShowAllItemsButton) {
1202
+ if (oEvent.which !== KeyCodes.ARROW_RIGHT && oItem.isA("sap.m.ListItemBase") && this._oShowAllItemsButton) {
1201
1203
  const aItems = oTable.getItems();
1202
1204
  if (aItems.indexOf(oItem) === aItems.length - 1) { // end reached, focus show-all to behave similar to single-select
1203
1205
  oEvent.preventDefault();
@@ -533,6 +533,42 @@ sap.ui.define([
533
533
  }
534
534
  });
535
535
  },
536
+ iChangeFilterFieldSelectionInAdaptFiltersPanel: function(sName, bSelect) {
537
+ return this.waitFor({
538
+ controlType: "sap.ui.mdc.p13n.panels.AdaptFiltersPanel",
539
+ success:function(aAdaptFiltersPanel) {
540
+ Opa5.assert.ok(true, "Adapt Filters Panel found");
541
+ return this.waitFor({
542
+ controlType: "sap.m.CustomListItem",
543
+ matchers: {
544
+ ancestor: {
545
+ controlType: "sap.m.Panel",
546
+ visible: true
547
+ }
548
+ },
549
+ success: function(aItems) {
550
+ let bFound = false;
551
+ let oItemToSelect;
552
+ aItems.forEach(function(oItem) {
553
+ if (oItem.getContent()[0].getItems()[0].getText() === sName) {
554
+ bFound = true;
555
+ oItemToSelect = oItem;
556
+ }
557
+ });
558
+ if (bFound) {
559
+ //here we only select/deselect the Checkbox - not testing the CheckBox in the item
560
+ oItemToSelect.setSelected(bSelect);
561
+ Opa5.assert.ok(bFound, "FilterField " + sName + " selected" );
562
+ } else {
563
+ Opa5.assert.notOk(!bFound, "No FilterField with label" + sName + " found" );
564
+ }
565
+ }
566
+ });
567
+ },
568
+ errorMessage: "No Adapt Filters Panel found"
569
+ });
570
+
571
+ },
536
572
 
537
573
  iPressOnTheAdaptFiltersButton: function() {
538
574
  return waitForAdaptFiltersButton.call(this, {
@@ -8,14 +8,18 @@ sap.ui.define([
8
8
  "./waitForFilterField",
9
9
  "sap/ui/events/KeyCodes",
10
10
  "../Utils",
11
- "../actions/TriggerEvent"
11
+ "../actions/TriggerEvent",
12
+ "sap/ui/test/matchers/PropertyStrictEquals",
13
+ "sap/ui/test/actions/Press"
12
14
  ], function(
13
15
  Opa5,
14
16
  EnterText,
15
17
  waitForFilterField,
16
18
  KeyCodes,
17
19
  Utils,
18
- TriggerEvent
20
+ TriggerEvent,
21
+ PropertyStrictEquals,
22
+ Press
19
23
  ) {
20
24
  "use strict";
21
25
 
@@ -78,7 +82,20 @@ sap.ui.define([
78
82
  }));
79
83
  }
80
84
  }));
81
- }
85
+ },
86
+ iSelectDisplayListItem: function(sValue) {
87
+ return this.waitFor({
88
+ controlType: "sap.m.DisplayListItem",
89
+ matchers: new PropertyStrictEquals({
90
+ name: "label",
91
+ value: sValue
92
+ }),
93
+ success: function(oDisplayListItems) {
94
+ new Press().executeOn(oDisplayListItems[0]);
95
+ },
96
+ errorMessage: "The value [" + sValue + "] was not found in the ValueHelp"
97
+ });
98
+ }
82
99
  };
83
100
 
84
101
  return oActions;
@@ -79,7 +79,13 @@ sap.ui.define([
79
79
  var oMatcher = new Matcher();
80
80
  oMatcher.isMatching = function(oListItem) {
81
81
  return !!oListItem.getCells().find(function (oCell) {
82
- return sText === oCell.mProperties["text"];
82
+ const oMetadata = oCell.getMetadata();
83
+ if (oMetadata.hasProperty("value")) {
84
+ return sText === oCell.getProperty("value");
85
+ } else if (oMetadata.hasProperty("text")) {
86
+ return sText === oCell.getProperty("text");
87
+ }
88
+ return false;
83
89
  });
84
90
  };
85
91
 
@@ -316,6 +322,32 @@ sap.ui.define([
316
322
  },
317
323
  errorMessage: "Expand/Hide Filters Button not found."
318
324
  });
325
+ },
326
+ iSelectSearchTemplate: function (sTemplateName, sValueHelpId) {
327
+ return doWait(this).forValueHelpDialog({
328
+ success: function(oDialog) {
329
+ return this.waitFor({
330
+ controlType: "sap.ui.mdc.valuehelp.CollectiveSearchSelect",
331
+ success: function (aSelects) {
332
+ new Press().executeOn(aSelects[0]);
333
+ return this.waitFor({
334
+ controlType: "sap.ui.core.Item",
335
+ matchers: [
336
+ new Ancestor(aSelects[0]),
337
+ new PropertyStrictEquals({
338
+ name: "text",
339
+ value: sTemplateName
340
+ })
341
+ ],
342
+ success: function (aItems) {
343
+ new Press().executeOn(aItems[0]);
344
+ Opa5.assert.ok(aItems[0], "Selected Search Template " + sTemplateName);
345
+ }
346
+ });
347
+ }
348
+ });
349
+ }
350
+ }, sValueHelpId);
319
351
  }
320
352
  };
321
353