@openui5/sap.ui.mdc 1.93.3 → 1.96.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +236 -334
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +150 -22
- package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
- package/src/sap/ui/mdc/ChartNew.js +107 -66
- package/src/sap/ui/mdc/Control.js +4 -3
- package/src/sap/ui/mdc/Element.js +5 -4
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -10
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +172 -79
- package/src/sap/ui/mdc/TableDelegate.js +20 -3
- package/src/sap/ui/mdc/ValueHelp.js +1474 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
- package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
- package/src/sap/ui/mdc/chart/Item.js +2 -3
- package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
- package/src/sap/ui/mdc/condition/Operator.js +4 -4
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
- package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +19 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +38 -14
- package/src/sap/ui/mdc/field/FieldBase.js +92 -41
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
- package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
- package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
- package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
- package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
- package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +588 -8
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +31 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +31 -16
- package/src/sap/ui/mdc/messagebundle_cy.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +20 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +17 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +43 -28
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_fr.properties +32 -17
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +41 -26
- package/src/sap/ui/mdc/messagebundle_iw.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +28 -13
- package/src/sap/ui/mdc/messagebundle_kk.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +25 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +22 -7
- package/src/sap/ui/mdc/messagebundle_pt.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +21 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +24 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +18 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +18 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +3 -2
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +22 -24
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
- package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
- package/src/sap/ui/mdc/table/Column.js +35 -9
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +0 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -88,7 +88,7 @@ sap.ui.define([
|
|
|
88
88
|
* @extends sap.ui.core.Control
|
|
89
89
|
*
|
|
90
90
|
* @author SAP SE
|
|
91
|
-
* @version 1.
|
|
91
|
+
* @version 1.96.2
|
|
92
92
|
*
|
|
93
93
|
* @constructor
|
|
94
94
|
* @alias sap.ui.mdc.field.DefineConditionPanel
|
|
@@ -169,7 +169,12 @@ sap.ui.define([
|
|
|
169
169
|
visibility: "hidden"
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
-
events: {
|
|
172
|
+
events: {
|
|
173
|
+
/**
|
|
174
|
+
* Event is fired if the user processes a condition. (Not known if changed.)
|
|
175
|
+
*/
|
|
176
|
+
conditionProcessed: {}
|
|
177
|
+
}
|
|
173
178
|
},
|
|
174
179
|
_oManagedObjectModel: null,
|
|
175
180
|
|
|
@@ -272,6 +277,8 @@ sap.ui.define([
|
|
|
272
277
|
|
|
273
278
|
aConditions.splice(iIndex, 1);
|
|
274
279
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
280
|
+
|
|
281
|
+
this.fireConditionProcessed();
|
|
275
282
|
},
|
|
276
283
|
|
|
277
284
|
addCondition: function(oEvent) {
|
|
@@ -354,7 +361,7 @@ sap.ui.define([
|
|
|
354
361
|
var aConditions = this.getConditions();
|
|
355
362
|
var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
|
|
356
363
|
|
|
357
|
-
if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== Operator.ValueType.Static) {
|
|
364
|
+
if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== Operator.ValueType.Static ) {
|
|
358
365
|
// type changed -> remove entered value (only if changed by user in Select)
|
|
359
366
|
// As Static text updated on condition change, don't delete it here.
|
|
360
367
|
if (iIndex >= 0) {
|
|
@@ -362,17 +369,28 @@ sap.ui.define([
|
|
|
362
369
|
|
|
363
370
|
oCondition.values.forEach(function(value, index) {
|
|
364
371
|
if (value !== null) {
|
|
365
|
-
|
|
366
|
-
|
|
372
|
+
if ((oOperator.valueTypes[index] === Operator.ValueType.Self && oOperatorOld.valueTypes[index] === Operator.ValueType.SelfNoParse) ||
|
|
373
|
+
(oOperator.valueTypes[index] === Operator.ValueType.SelfNoParse && oOperatorOld.valueTypes[index] === Operator.ValueType.Self)) {
|
|
374
|
+
// as for Decimal values the type might change we need to format and parse again
|
|
375
|
+
var oType = _getFieldType.call(this, oOperator.name, index);
|
|
376
|
+
var oTypeOld = _getFieldType.call(this, oOperatorOld.name, index);
|
|
377
|
+
var sValue = oTypeOld.formatValue(oCondition.values[index], "string");
|
|
378
|
+
var vValue = oType.parseValue(sValue, "string");
|
|
379
|
+
if (vValue !== oCondition.values[index]) {
|
|
380
|
+
oCondition.values[index] = oType.parseValue(sValue, "string");
|
|
381
|
+
bUpdate = true;
|
|
382
|
+
}
|
|
383
|
+
} else {
|
|
384
|
+
oCondition.values[index] = null;
|
|
385
|
+
bUpdate = true;
|
|
386
|
+
}
|
|
367
387
|
}
|
|
368
|
-
});
|
|
388
|
+
}.bind(this));
|
|
369
389
|
}
|
|
370
390
|
}
|
|
371
391
|
|
|
372
392
|
if (iIndex >= 0 && oOperator.valueDefaults) {
|
|
373
|
-
var bCheckEmpty = false;
|
|
374
393
|
// sets the default values for the operator back to default, if the condition is inital or the value is null
|
|
375
|
-
|
|
376
394
|
oCondition = aConditions[iIndex];
|
|
377
395
|
|
|
378
396
|
oCondition.values.forEach(function(value, index) {
|
|
@@ -381,12 +399,8 @@ sap.ui.define([
|
|
|
381
399
|
oCondition.values[index] = oOperator.valueDefaults[index];
|
|
382
400
|
oCondition.isInitial = true;
|
|
383
401
|
bUpdate = true;
|
|
384
|
-
bCheckEmpty = true;
|
|
385
402
|
}
|
|
386
403
|
});
|
|
387
|
-
if (bCheckEmpty) {
|
|
388
|
-
FilterOperatorUtil.checkConditionsEmpty(oCondition, _getOperators.call(this));
|
|
389
|
-
}
|
|
390
404
|
}
|
|
391
405
|
|
|
392
406
|
|
|
@@ -402,6 +416,7 @@ sap.ui.define([
|
|
|
402
416
|
}
|
|
403
417
|
|
|
404
418
|
if (bUpdate) {
|
|
419
|
+
FilterOperatorUtil.checkConditionsEmpty(oCondition, _getOperators.call(this));
|
|
405
420
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
406
421
|
}
|
|
407
422
|
}
|
|
@@ -484,6 +499,8 @@ sap.ui.define([
|
|
|
484
499
|
FilterOperatorUtil.checkConditionsEmpty(aConditions);
|
|
485
500
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
486
501
|
|
|
502
|
+
this.fireConditionProcessed();
|
|
503
|
+
|
|
487
504
|
}.bind(this), 0);
|
|
488
505
|
}
|
|
489
506
|
},
|
|
@@ -650,8 +667,10 @@ sap.ui.define([
|
|
|
650
667
|
|
|
651
668
|
var oControl;
|
|
652
669
|
if (oOperator.createControl) {
|
|
653
|
-
oControl = oOperator.createControl(oNullableType, "$this>", iIndex, sId);
|
|
654
|
-
}
|
|
670
|
+
oControl = oOperator.createControl(oNullableType, "$this>", iIndex, sId); // the returned control can be null, in this case the default Field will be used
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (!oControl) {
|
|
655
674
|
oControl = new Field(sId, {
|
|
656
675
|
delegate: _getDelegate.call(this),
|
|
657
676
|
value: { path: "$this>", type: oNullableType, mode: 'TwoWay', targetType: 'raw' },
|
|
@@ -725,6 +744,9 @@ sap.ui.define([
|
|
|
725
744
|
if (oDataType.getConstraints() && oDataType.getConstraints().hasOwnProperty("nullable") && oDataType.getConstraints().nullable === false) {
|
|
726
745
|
// "clone" type and make nullable
|
|
727
746
|
oNullableType = _createNullableType(oDataType);
|
|
747
|
+
if (oDataType._bCreatedByOperator) {
|
|
748
|
+
oNullableType = oOperator._createLocalType(oOperator.valueTypes[iIndex], oDataType);
|
|
749
|
+
}
|
|
728
750
|
} else {
|
|
729
751
|
oNullableType = oDataType; // use given type or default string type
|
|
730
752
|
}
|
|
@@ -1439,6 +1461,8 @@ sap.ui.define([
|
|
|
1439
1461
|
// check if at least one condition has an error
|
|
1440
1462
|
_checkInvalidInput.call(this, bInvalid);
|
|
1441
1463
|
|
|
1464
|
+
this.fireConditionProcessed();
|
|
1465
|
+
|
|
1442
1466
|
}
|
|
1443
1467
|
|
|
1444
1468
|
function _checkInvalidInput(bInvalid) {
|
|
@@ -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.96.2
|
|
90
90
|
*
|
|
91
91
|
* @constructor
|
|
92
92
|
* @alias sap.ui.mdc.field.FieldBase
|
|
@@ -449,7 +449,7 @@ sap.ui.define([
|
|
|
449
449
|
* <b>Note:</b> For Boolean fields, no <code>FieldHelp</code> should be added, but a default <code>FieldHelp</code> used instead.
|
|
450
450
|
*/
|
|
451
451
|
fieldHelp: {
|
|
452
|
-
type: "sap.ui.mdc.
|
|
452
|
+
type: "sap.ui.mdc.ValueHelp",
|
|
453
453
|
multiple: false
|
|
454
454
|
},
|
|
455
455
|
|
|
@@ -728,7 +728,8 @@ sap.ui.define([
|
|
|
728
728
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
729
729
|
var oSource = oEvent.srcControl;
|
|
730
730
|
|
|
731
|
-
if (oFieldHelp && (!this._oContentFactory.isMeasure() || oSource.getShowValueHelp())) {
|
|
731
|
+
if (oFieldHelp && (!oFieldHelp.valueHelpEnabled || oFieldHelp.valueHelpEnabled() || oFieldHelp.isOpen()) && (!this._oContentFactory.isMeasure() || oSource.getShowValueHelp())) {
|
|
732
|
+
// if only type-ahead but no real value help, only navigate if open TODO: remove function check
|
|
732
733
|
oEvent.preventDefault();
|
|
733
734
|
oEvent.stopPropagation();
|
|
734
735
|
oFieldHelp.setFilterValue(this._sFilterValue); // to be sure to filter for typed value
|
|
@@ -742,7 +743,8 @@ sap.ui.define([
|
|
|
742
743
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
743
744
|
var oSource = oEvent.srcControl;
|
|
744
745
|
|
|
745
|
-
if (oFieldHelp && (!this._oContentFactory.isMeasure() || oSource.getShowValueHelp())) {
|
|
746
|
+
if (oFieldHelp && (!oFieldHelp.valueHelpEnabled || oFieldHelp.valueHelpEnabled() || oFieldHelp.isOpen()) && (!this._oContentFactory.isMeasure() || oSource.getShowValueHelp())) {
|
|
747
|
+
// if only type-ahead but no real value help, only navigate if open TODO: remove function check
|
|
746
748
|
oEvent.preventDefault();
|
|
747
749
|
oEvent.stopPropagation();
|
|
748
750
|
oFieldHelp.setFilterValue(this._sFilterValue); // to be sure to filter for typed value
|
|
@@ -774,11 +776,11 @@ sap.ui.define([
|
|
|
774
776
|
// in "Select"-case the suggestion help should open on click into field
|
|
775
777
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
776
778
|
if (oFieldHelp) {
|
|
777
|
-
if (oFieldHelp.
|
|
779
|
+
if (oFieldHelp.shouldOpenOnClick() && !oFieldHelp.isOpen(true)) {
|
|
778
780
|
oFieldHelp.open(true);
|
|
779
781
|
}
|
|
780
782
|
var oSource = oEvent.srcControl;
|
|
781
|
-
if (oFieldHelp.isOpen(true) && (!this._oContentFactory.isMeasure() || oSource.getShowValueHelp())) {
|
|
783
|
+
if (oFieldHelp.isOpen(true) && (!this._oContentFactory.isMeasure() || (oSource.getShowValueHelp && oSource.getShowValueHelp()))) {
|
|
782
784
|
oSource.addStyleClass("sapMFocus"); // to show focus outline again after navigation
|
|
783
785
|
oFieldHelp.removeFocus();
|
|
784
786
|
}
|
|
@@ -1024,12 +1026,12 @@ sap.ui.define([
|
|
|
1024
1026
|
|
|
1025
1027
|
}
|
|
1026
1028
|
|
|
1027
|
-
function
|
|
1029
|
+
FieldBase.prototype._removeUIMessage = function() {
|
|
1028
1030
|
|
|
1029
1031
|
this.setValueState(ValueState.None);
|
|
1030
1032
|
this.setValueStateText();
|
|
1031
1033
|
|
|
1032
|
-
}
|
|
1034
|
+
};
|
|
1033
1035
|
|
|
1034
1036
|
/**
|
|
1035
1037
|
* Observes changes.
|
|
@@ -1191,7 +1193,7 @@ sap.ui.define([
|
|
|
1191
1193
|
* @private
|
|
1192
1194
|
* @ui5-restricted sap.ui.mdc.field.FieldHelpBase
|
|
1193
1195
|
*/
|
|
1194
|
-
|
|
1196
|
+
FieldBase.prototype.getControlForSuggestion = function() {
|
|
1195
1197
|
|
|
1196
1198
|
var aContent = this._getContent();
|
|
1197
1199
|
if (aContent.length > 0) {
|
|
@@ -1206,6 +1208,19 @@ sap.ui.define([
|
|
|
1206
1208
|
|
|
1207
1209
|
};
|
|
1208
1210
|
|
|
1211
|
+
FieldBase.prototype.getFocusElementForValueHelp = function(bTypahead) {
|
|
1212
|
+
var oSuggestControl = this.getControlForSuggestion();
|
|
1213
|
+
var aIcons = oSuggestControl && oSuggestControl.getMetadata().getAllPrivateAggregations()._endIcon && oSuggestControl.getAggregation("_endIcon");
|
|
1214
|
+
var oIcon;
|
|
1215
|
+
for (var i = 0; i < aIcons.length; i++) { // as MultiInput can have a invisible icon before visible icon
|
|
1216
|
+
if (aIcons[i].getVisible()) {
|
|
1217
|
+
oIcon = aIcons[i];
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
return bTypahead || !oIcon ? oSuggestControl : oIcon;
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1209
1224
|
/**
|
|
1210
1225
|
* In the case that number and unit are shown in different controls, only one unit is supported.
|
|
1211
1226
|
* So the value help needs to be in single selection mode.
|
|
@@ -1330,23 +1345,24 @@ sap.ui.define([
|
|
|
1330
1345
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
1331
1346
|
|
|
1332
1347
|
if (oFieldHelp) {
|
|
1333
|
-
var
|
|
1334
|
-
|
|
1348
|
+
var oAriaAttributes = oFieldHelp.getAriaAttributes(this.getMaxConditionsForHelp());
|
|
1349
|
+
var sRoleDescription = oAriaAttributes.roleDescription;
|
|
1350
|
+
oAttributes["role"] = oAriaAttributes.role;
|
|
1335
1351
|
if (sRoleDescription) {
|
|
1336
1352
|
oAttributes.aria["roledescription"] = sRoleDescription;
|
|
1337
1353
|
}
|
|
1338
|
-
oAttributes.aria["haspopup"] =
|
|
1354
|
+
oAttributes.aria["haspopup"] = oAriaAttributes.ariaHasPopup;
|
|
1339
1355
|
oAttributes["autocomplete"] = "off";
|
|
1340
1356
|
if (bOpen) {
|
|
1341
1357
|
oAttributes.aria["expanded"] = "true";
|
|
1342
|
-
oAttributes.aria["controls"] =
|
|
1358
|
+
oAttributes.aria["controls"] = oAriaAttributes.contentId;
|
|
1343
1359
|
if (sItemId) {
|
|
1344
1360
|
oAttributes.aria["activedescendant"] = sItemId;
|
|
1345
1361
|
}
|
|
1346
1362
|
} else {
|
|
1347
1363
|
oAttributes.aria["expanded"] = "false";
|
|
1348
1364
|
}
|
|
1349
|
-
oAttributes["valueHelpEnabled"] =
|
|
1365
|
+
oAttributes["valueHelpEnabled"] = oAriaAttributes.valueHelpEnabled;
|
|
1350
1366
|
}
|
|
1351
1367
|
|
|
1352
1368
|
this.setProperty("_ariaAttributes", oAttributes, true);
|
|
@@ -1663,7 +1679,7 @@ sap.ui.define([
|
|
|
1663
1679
|
if (this._bParseError) {
|
|
1664
1680
|
// as wrong input get lost if content control is destroyed.
|
|
1665
1681
|
this._bParseError = false;
|
|
1666
|
-
_removeUIMessage
|
|
1682
|
+
this._removeUIMessage();
|
|
1667
1683
|
}
|
|
1668
1684
|
|
|
1669
1685
|
if (this._oContentFactory.isMeasure()) {
|
|
@@ -1993,7 +2009,7 @@ sap.ui.define([
|
|
|
1993
2009
|
|
|
1994
2010
|
if (bUpdateConditions) {
|
|
1995
2011
|
// text typed in MultiInput
|
|
1996
|
-
_removeUIMessage
|
|
2012
|
+
this._removeUIMessage();
|
|
1997
2013
|
var oConditionType;
|
|
1998
2014
|
var oMyChange;
|
|
1999
2015
|
|
|
@@ -2001,6 +2017,10 @@ sap.ui.define([
|
|
|
2001
2017
|
// remove filter value from input and don't use it as input
|
|
2002
2018
|
this._bIgnoreInputValue = false;
|
|
2003
2019
|
oSource.setDOMValue("");
|
|
2020
|
+
if (oSource.getMetadata().hasProperty("value")) {
|
|
2021
|
+
// clear "value" property of MultiInput as there might be an old value from a invalid input before
|
|
2022
|
+
oSource.setValue();
|
|
2023
|
+
}
|
|
2004
2024
|
return;
|
|
2005
2025
|
}
|
|
2006
2026
|
|
|
@@ -2070,7 +2090,7 @@ sap.ui.define([
|
|
|
2070
2090
|
this._sFilterValue = "";
|
|
2071
2091
|
if (!bAsync && bValid) {
|
|
2072
2092
|
_setConditionsOnFieldHelp.call(this, aConditions, oFieldHelp);
|
|
2073
|
-
oFieldHelp.
|
|
2093
|
+
oFieldHelp.onControlChange();
|
|
2074
2094
|
}
|
|
2075
2095
|
// do not trigger async suggestion
|
|
2076
2096
|
_clearLiveChangeTimer.call(this);
|
|
@@ -2141,7 +2161,7 @@ sap.ui.define([
|
|
|
2141
2161
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
2142
2162
|
if (oFieldHelp && this._bConnected) {
|
|
2143
2163
|
_setConditionsOnFieldHelp.call(this, aConditions, oFieldHelp);
|
|
2144
|
-
oFieldHelp.
|
|
2164
|
+
oFieldHelp.onControlChange();
|
|
2145
2165
|
}
|
|
2146
2166
|
oChange.result = aConditions;
|
|
2147
2167
|
_resolveAsyncChange.call(this, oChange);
|
|
@@ -2231,8 +2251,8 @@ sap.ui.define([
|
|
|
2231
2251
|
}
|
|
2232
2252
|
}
|
|
2233
2253
|
|
|
2234
|
-
var vOpenByTyping = oFieldHelp.
|
|
2235
|
-
if (this._bConnected && this._getContent()[0] && vOpenByTyping
|
|
2254
|
+
var vOpenByTyping = this.hasOwnProperty("_bOpenByTyping") ? this._bOpenByTyping : oFieldHelp.isTypeaheadSupported();
|
|
2255
|
+
if (this._bConnected && this._getContent()[0] && vOpenByTyping /*&& !(vOpenByTyping instanceof Promise)*/ && //TODO: isTypeaheadsupported always returns a promise now
|
|
2236
2256
|
(sap.ui.getCore().getCurrentFocusedControlId() === this._getContent()[0].getId() ||
|
|
2237
2257
|
(this._getContent()[1] && sap.ui.getCore().getCurrentFocusedControlId() === this._getContent()[1].getId()))) { // only if still connected and focussed
|
|
2238
2258
|
oFieldHelp.setFilterValue(this._sFilterValue);
|
|
@@ -2249,14 +2269,15 @@ sap.ui.define([
|
|
|
2249
2269
|
// on first call init FieldHelp (trigger loading metadata on first typing)
|
|
2250
2270
|
oFieldHelp.initBeforeOpen(true);
|
|
2251
2271
|
}
|
|
2252
|
-
var vOpenByTyping = oFieldHelp.
|
|
2272
|
+
var vOpenByTyping = oFieldHelp.isTypeaheadSupported(); // trigger determination of search functionality
|
|
2253
2273
|
if (vOpenByTyping instanceof Promise) {
|
|
2254
|
-
vOpenByTyping.then(function() {
|
|
2274
|
+
vOpenByTyping.then(function(bOpenByTyping) {
|
|
2255
2275
|
// trigger open after Promise resolved
|
|
2256
2276
|
var oFocusedElement = document.activeElement;
|
|
2257
2277
|
if (oFocusedElement && (containsOrEquals(this.getDomRef(), oFocusedElement)) && this._fnLiveChangeTimer) { // if destroyed this._fnLiveChangeTimer is removed
|
|
2258
2278
|
this._fnLiveChangeTimer(); // if resolved while initial debounce-time frame, it will not triggered twice
|
|
2259
2279
|
}
|
|
2280
|
+
this._bOpenByTyping = bOpenByTyping;
|
|
2260
2281
|
}.bind(this));
|
|
2261
2282
|
}
|
|
2262
2283
|
this._fnLiveChangeTimer();
|
|
@@ -2336,7 +2357,7 @@ sap.ui.define([
|
|
|
2336
2357
|
var oFieldHelp = sap.ui.getCore().byId(sId);
|
|
2337
2358
|
if (oFieldHelp) {
|
|
2338
2359
|
oFieldHelp.detachEvent("select", _handleFieldHelpSelect, this);
|
|
2339
|
-
oFieldHelp.detachEvent("
|
|
2360
|
+
oFieldHelp.detachEvent("navigated", _handleFieldHelpNavigated, this);
|
|
2340
2361
|
oFieldHelp.detachEvent("dataUpdate", _handleHelpDataUpdate, this);
|
|
2341
2362
|
oFieldHelp.detachEvent("disconnect", _handleDisconnect, this);
|
|
2342
2363
|
oFieldHelp.detachEvent("afterClose", _handleFieldHelpAfterClose, this);
|
|
@@ -2363,7 +2384,9 @@ sap.ui.define([
|
|
|
2363
2384
|
var oFieldHelp = sap.ui.getCore().byId(sId);
|
|
2364
2385
|
if (oFieldHelp) {
|
|
2365
2386
|
oFieldHelp.attachEvent("dataUpdate", _handleHelpDataUpdate, this);
|
|
2366
|
-
|
|
2387
|
+
if (!oFieldHelp.valueHelpEnabled || oFieldHelp.valueHelpEnabled()) { //TODO: remove check for existence of function
|
|
2388
|
+
this.setProperty("_fieldHelpEnabled", true, true);
|
|
2389
|
+
}
|
|
2367
2390
|
}
|
|
2368
2391
|
}
|
|
2369
2392
|
|
|
@@ -2470,8 +2493,8 @@ sap.ui.define([
|
|
|
2470
2493
|
var aValue = this.getControlDelegate().enhanceValueForUnit(this.getPayload(), [null, aNewConditions[0].values[0]], this._oTypeInitialization); // Delegate must be initialized right now
|
|
2471
2494
|
oCondition = Condition.createCondition(oOperator.name, [aValue], aNewConditions[0].inParameters, aNewConditions[0].outParameters, ConditionValidated.NotValidated);
|
|
2472
2495
|
aConditions.push(oCondition);
|
|
2473
|
-
var oConditionType = this._oContentFactory.getConditionType();
|
|
2474
|
-
var oConditionsType = this._oContentFactory.getUnitConditionsType();
|
|
2496
|
+
var oConditionType = this._oContentFactory.getConditionType(true);
|
|
2497
|
+
var oConditionsType = this._oContentFactory.getUnitConditionsType(true);
|
|
2475
2498
|
// TODO: format once to update current value in type (as empty condtions are not displayed as token)
|
|
2476
2499
|
if (oConditionType) {
|
|
2477
2500
|
sDOMValue = oConditionType.formatValue(oCondition);
|
|
@@ -2513,9 +2536,9 @@ sap.ui.define([
|
|
|
2513
2536
|
// so we need to set the DOM value here. Otherwise it is not updated or, if empty, selected.
|
|
2514
2537
|
if (this._oContentFactory.isMeasure() && this._oContentFactory.getUnitConditionsType()) {
|
|
2515
2538
|
sDOMValue = this._oContentFactory.getUnitConditionsType().formatValue(aConditions);
|
|
2516
|
-
} else if (this._oContentFactory.getConditionType()) {
|
|
2539
|
+
} else if (this._oContentFactory.getConditionType(true)) {
|
|
2517
2540
|
sDOMValue = this._oContentFactory.getConditionType().formatValue(aConditions[0]);
|
|
2518
|
-
} else if (this._oContentFactory.getConditionsType()) {
|
|
2541
|
+
} else if (this._oContentFactory.getConditionsType(true)) {
|
|
2519
2542
|
sDOMValue = this._oContentFactory.getConditionsType().formatValue(aConditions);
|
|
2520
2543
|
}
|
|
2521
2544
|
|
|
@@ -2531,7 +2554,10 @@ sap.ui.define([
|
|
|
2531
2554
|
}
|
|
2532
2555
|
this._sFilterValue = "";
|
|
2533
2556
|
} else if (bClose) {
|
|
2534
|
-
|
|
2557
|
+
if (this.getMaxConditions() !== 1 && !this._oContentFactory.getBoundProperty() && oContent.getMetadata().hasProperty("value") && oContent.getProperty("value")) {
|
|
2558
|
+
// clear "value" property of MultiInput as there might be an old value from a invalid input before
|
|
2559
|
+
oContent.setValue();
|
|
2560
|
+
}
|
|
2535
2561
|
oContent.setDOMValue("");
|
|
2536
2562
|
this._sFilterValue = "";
|
|
2537
2563
|
this._bIgnoreInputValue = false; // just clean up
|
|
@@ -2542,7 +2568,7 @@ sap.ui.define([
|
|
|
2542
2568
|
// after selection input cannot be wrong
|
|
2543
2569
|
if (this._bParseError) { // only remove messages set by Field itself, message from outside should stay.
|
|
2544
2570
|
this._bParseError = false;
|
|
2545
|
-
_removeUIMessage
|
|
2571
|
+
this._removeUIMessage();
|
|
2546
2572
|
}
|
|
2547
2573
|
}
|
|
2548
2574
|
|
|
@@ -2555,7 +2581,7 @@ sap.ui.define([
|
|
|
2555
2581
|
|
|
2556
2582
|
if (!FilterOperatorUtil.compareConditionsArray(aConditions, aConditionsOld)) { // update only if real change
|
|
2557
2583
|
// handle out-parameters
|
|
2558
|
-
oFieldHelp.
|
|
2584
|
+
oFieldHelp.onControlChange();
|
|
2559
2585
|
|
|
2560
2586
|
_triggerChange.call(this, aConditions, true);
|
|
2561
2587
|
}
|
|
@@ -2563,21 +2589,26 @@ sap.ui.define([
|
|
|
2563
2589
|
|
|
2564
2590
|
}
|
|
2565
2591
|
|
|
2566
|
-
function
|
|
2592
|
+
function _handleFieldHelpNavigated(oEvent) {
|
|
2567
2593
|
|
|
2568
2594
|
var sValue = oEvent.getParameter("value");
|
|
2569
2595
|
var vKey = oEvent.getParameter("key");
|
|
2570
2596
|
var oCondition = oEvent.getParameter("condition");
|
|
2571
2597
|
var sItemId = oEvent.getParameter("itemId");
|
|
2572
2598
|
var bLeaveFocus = oEvent.getParameter("leaveFocus");
|
|
2599
|
+
|
|
2600
|
+
if (!oCondition && vKey) {
|
|
2601
|
+
oCondition = Condition.createItemCondition(vKey, sValue);
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2573
2604
|
var sNewValue;
|
|
2574
2605
|
var sDOMValue;
|
|
2575
2606
|
var oContent = this.getControlForSuggestion();
|
|
2576
2607
|
var oOperator = FilterOperatorUtil.getEQOperator(this._getOperators()); /// use EQ operator of Field (might be different one)
|
|
2608
|
+
var oFieldHelp = _getFieldHelp.call(this);
|
|
2577
2609
|
|
|
2578
2610
|
if (bLeaveFocus) {
|
|
2579
2611
|
// nothing to navigate, just set focus visualization back to field
|
|
2580
|
-
var oFieldHelp = _getFieldHelp.call(this);
|
|
2581
2612
|
oContent.addStyleClass("sapMFocus");
|
|
2582
2613
|
oContent.focus();
|
|
2583
2614
|
oFieldHelp.removeFocus();
|
|
@@ -2628,17 +2659,19 @@ sap.ui.define([
|
|
|
2628
2659
|
if (!sDOMValue) {
|
|
2629
2660
|
if (this._oContentFactory.isMeasure() && this._oContentFactory.getUnitConditionsType() && this._oNavigateCondition) {
|
|
2630
2661
|
sDOMValue = this._oContentFactory.getUnitConditionsType().formatValue([this._oNavigateCondition]);
|
|
2631
|
-
} else if (this._oContentFactory.getConditionType() && this._oNavigateCondition) {
|
|
2662
|
+
} else if (this._oContentFactory.getConditionType(true) && this._oNavigateCondition) {
|
|
2632
2663
|
sDOMValue = this._oContentFactory.getConditionType().formatValue(this._oNavigateCondition);
|
|
2633
|
-
} else if (this._oContentFactory.getConditionsType() && this._oNavigateCondition) {
|
|
2664
|
+
} else if (this._oContentFactory.getConditionsType(true) && this._oNavigateCondition) {
|
|
2634
2665
|
sDOMValue = this._oContentFactory.getConditionsType().formatValue([this._oNavigateCondition]);
|
|
2635
2666
|
} else {
|
|
2636
2667
|
sDOMValue = sValue || vKey;
|
|
2637
2668
|
}
|
|
2638
2669
|
}
|
|
2639
|
-
oContent.removeStyleClass("sapMFocus"); // to have focus outline on navigated item
|
|
2640
2670
|
oContent.setDOMValue(sDOMValue);
|
|
2641
2671
|
oContent._doSelect();
|
|
2672
|
+
if (oFieldHelp.isOpen()) {
|
|
2673
|
+
oContent.removeStyleClass("sapMFocus"); // to have focus outline on navigated item only
|
|
2674
|
+
}
|
|
2642
2675
|
}
|
|
2643
2676
|
|
|
2644
2677
|
this._bPreventGetDescription = false; // back to default
|
|
@@ -2658,6 +2691,10 @@ sap.ui.define([
|
|
|
2658
2691
|
var oContent = this.getControlForSuggestion();
|
|
2659
2692
|
this._bIgnoreInputValue = false;
|
|
2660
2693
|
oContent.setDOMValue("");
|
|
2694
|
+
if (this.getMaxConditions() !== 1 && !this._oContentFactory.getBoundProperty() && oContent.getMetadata().hasProperty("value") && oContent.getProperty("value")) {
|
|
2695
|
+
// clear "value" property of MultiInput as there might be an old value from a invalid input before
|
|
2696
|
+
oContent.setValue();
|
|
2697
|
+
}
|
|
2661
2698
|
}
|
|
2662
2699
|
|
|
2663
2700
|
_setAriaAttributes.call(this, false);
|
|
@@ -2697,10 +2734,11 @@ sap.ui.define([
|
|
|
2697
2734
|
|
|
2698
2735
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
2699
2736
|
oFieldHelp.detachEvent("select", _handleFieldHelpSelect, this);
|
|
2700
|
-
oFieldHelp.detachEvent("
|
|
2737
|
+
oFieldHelp.detachEvent("navigated", _handleFieldHelpNavigated, this);
|
|
2701
2738
|
oFieldHelp.detachEvent("disconnect", _handleDisconnect, this);
|
|
2702
|
-
oFieldHelp.detachEvent("afterClose", _handleFieldHelpAfterClose, this);
|
|
2739
|
+
oFieldHelp.detachEvent("afterClose", _handleFieldHelpAfterClose, this); // TODO: remove
|
|
2703
2740
|
oFieldHelp.detachEvent("switchToValueHelp", _handleFieldSwitchToValueHelp, this);
|
|
2741
|
+
oFieldHelp.detachEvent("closed", _handleFieldHelpAfterClose, this);
|
|
2704
2742
|
this._bConnected = false;
|
|
2705
2743
|
|
|
2706
2744
|
}
|
|
@@ -2709,13 +2747,26 @@ sap.ui.define([
|
|
|
2709
2747
|
|
|
2710
2748
|
var oFieldHelp = _getFieldHelp.call(this);
|
|
2711
2749
|
if (oFieldHelp && !this._bConnected) {
|
|
2712
|
-
|
|
2750
|
+
var oConditionModelInfo = _getConditionModelInfo.call(this);
|
|
2751
|
+
var oConfig = { // TODO: only what is needed (also for DefineConditions and Tokenizer)
|
|
2752
|
+
maxConditions: this.getMaxConditions(), // TODO: in unit case only 1?
|
|
2753
|
+
dataType: this._oContentFactory.getDataType(),
|
|
2754
|
+
operators: this._getOperators(),
|
|
2755
|
+
display: this._oContentFactory.isMeasure() ? FieldDisplay.Value : this.getDisplay(),
|
|
2756
|
+
delegate: this.getControlDelegate(),
|
|
2757
|
+
delegateName: this.getDelegate() && this.getDelegate().name,
|
|
2758
|
+
payload: this.getPayload(),
|
|
2759
|
+
conditionModel: oConditionModelInfo.model,
|
|
2760
|
+
conditionModelName : oConditionModelInfo.name
|
|
2761
|
+
};
|
|
2762
|
+
oFieldHelp.connect(this, oConfig);
|
|
2713
2763
|
this._bConnected = true;
|
|
2714
2764
|
oFieldHelp.attachEvent("select", _handleFieldHelpSelect, this);
|
|
2715
|
-
oFieldHelp.attachEvent("
|
|
2765
|
+
oFieldHelp.attachEvent("navigated", _handleFieldHelpNavigated, this);
|
|
2716
2766
|
oFieldHelp.attachEvent("disconnect", _handleDisconnect, this);
|
|
2717
|
-
oFieldHelp.attachEvent("afterClose", _handleFieldHelpAfterClose, this);
|
|
2767
|
+
oFieldHelp.attachEvent("afterClose", _handleFieldHelpAfterClose, this); // TODO: remove
|
|
2718
2768
|
oFieldHelp.attachEvent("switchToValueHelp", _handleFieldSwitchToValueHelp, this);
|
|
2769
|
+
oFieldHelp.attachEvent("closed", _handleFieldHelpAfterClose, this);
|
|
2719
2770
|
var aConditions = this.getConditions();
|
|
2720
2771
|
_setConditionsOnFieldHelp.call(this, aConditions, oFieldHelp);
|
|
2721
2772
|
|
|
@@ -184,10 +184,17 @@ sap.ui.define([
|
|
|
184
184
|
* @ui5-restricted sap.fe
|
|
185
185
|
* @MDC_PUBLIC_CANDIDATE
|
|
186
186
|
*/
|
|
187
|
-
FieldBaseDelegate.getItemForValue = function(oPayload, oFieldHelp, vValue, vParsedValue, oBindingContext, bCheckKeyFirst, bCheckKey, bCheckDescription, oConditionModel, sConditionModelName) {
|
|
187
|
+
// FieldBaseDelegate.getItemForValue = function(oPayload, oFieldHelp, vValue, vParsedValue, oBindingContext, bCheckKeyFirst, bCheckKey, bCheckDescription, oConditionModel, sConditionModelName) {
|
|
188
|
+
//
|
|
189
|
+
// if (oFieldHelp) {
|
|
190
|
+
// return oFieldHelp.getItemForValue(vValue, vParsedValue, undefined, undefined, oBindingContext, bCheckKeyFirst, bCheckKey, bCheckDescription, oConditionModel, sConditionModelName);
|
|
191
|
+
// }
|
|
192
|
+
//
|
|
193
|
+
// };
|
|
194
|
+
FieldBaseDelegate.getItemForValue = function(oPayload, oFieldHelp, oConfig) {
|
|
188
195
|
|
|
189
196
|
if (oFieldHelp) {
|
|
190
|
-
return oFieldHelp.getItemForValue(
|
|
197
|
+
return oFieldHelp.getItemForValue(oConfig);
|
|
191
198
|
}
|
|
192
199
|
|
|
193
200
|
};
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @class Base type for the <code>FieldHelp</code> association in the <code>FieldBase</code> controls.
|
|
41
41
|
* @extends sap.ui.mdc.Element
|
|
42
42
|
* @implements sap.ui.core.PopupInterface
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.96.2
|
|
44
44
|
* @constructor
|
|
45
45
|
* @abstract
|
|
46
46
|
* @private
|
|
@@ -712,7 +712,7 @@ sap.ui.define([
|
|
|
712
712
|
|
|
713
713
|
/**
|
|
714
714
|
* Calls initialization of the FieldHelp before the FieldHelp is really opened.
|
|
715
|
-
* This is called in
|
|
715
|
+
* This is called in Typeahead on first letter before the FieldHelp is opened with a delay. So the
|
|
716
716
|
* content can be determined in the delegate coding early.
|
|
717
717
|
*
|
|
718
718
|
* <b>Note:</b> This function must only be called by the control the <code>FieldHelp</code> element
|
|
@@ -1091,7 +1091,7 @@ sap.ui.define([
|
|
|
1091
1091
|
*/
|
|
1092
1092
|
FieldHelpBase.prototype.isValidationSupported = function() {
|
|
1093
1093
|
// to be implemented by the concrete FieldHelp
|
|
1094
|
-
return
|
|
1094
|
+
return this.isUsableForValidation();
|
|
1095
1095
|
};
|
|
1096
1096
|
|
|
1097
1097
|
/**
|
|
@@ -1122,7 +1122,28 @@ sap.ui.define([
|
|
|
1122
1122
|
*/
|
|
1123
1123
|
FieldHelpBase.prototype.getItemForValue = function(vValue, vParsedValue, oInParameters, oOutParameters, oBindingContext, bCheckKeyFirst, bCheckKey, bCheckDescription, oConditionModel, sConditionModelName) {
|
|
1124
1124
|
|
|
1125
|
-
|
|
1125
|
+
if (typeof vValue !== "object" || !vValue.hasOwnProperty("value")) {
|
|
1126
|
+
// not new config object -> map old properties to config
|
|
1127
|
+
vValue = {
|
|
1128
|
+
value: vValue,
|
|
1129
|
+
parsedValue: vParsedValue,
|
|
1130
|
+
inParameters: oInParameters, // TODO: needed?
|
|
1131
|
+
outParameters: oOutParameters, // TODO: needed?
|
|
1132
|
+
bindingContext: oBindingContext,
|
|
1133
|
+
checkKeyFirst: bCheckKeyFirst, // TODO: not longer needed?
|
|
1134
|
+
checkKey: bCheckKey,
|
|
1135
|
+
checkDescription: bCheckDescription,
|
|
1136
|
+
conditionModel: oConditionModel,
|
|
1137
|
+
conditionModelName: sConditionModelName
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
if (vValue && typeof vValue === "object" && vValue.hasOwnProperty("value")) {
|
|
1142
|
+
// map new Config to old API
|
|
1143
|
+
return _getItemForValue.call(this, vValue.value, vValue.parsedValue, vValue.inParameters, vValue.outParameters, vValue.bindingContext, vValue.checkKeyFirst && vValue.checkKey, vValue.checkKey, vValue.checkDescription, vValue.conditionModel, vValue.conditionModelName);
|
|
1144
|
+
} else {
|
|
1145
|
+
return _getItemForValue.call(this, vValue, vParsedValue, oInParameters, oOutParameters, oBindingContext, bCheckKeyFirst && bCheckKey, bCheckKey, bCheckDescription, oConditionModel, sConditionModelName);
|
|
1146
|
+
}
|
|
1126
1147
|
|
|
1127
1148
|
};
|
|
1128
1149
|
|
|
@@ -1476,6 +1497,45 @@ sap.ui.define([
|
|
|
1476
1497
|
|
|
1477
1498
|
}
|
|
1478
1499
|
|
|
1500
|
+
/// renaming of functions -> call original ones
|
|
1501
|
+
FieldHelpBase.prototype.isTypeaheadSupported = function() {
|
|
1502
|
+
return this.openByTyping();
|
|
1503
|
+
};
|
|
1504
|
+
FieldHelpBase.prototype.shouldOpenOnClick = function() {
|
|
1505
|
+
return this.openByClick();
|
|
1506
|
+
};
|
|
1507
|
+
FieldHelpBase.prototype.onControlChange = function() {
|
|
1508
|
+
return this.onFieldChange();
|
|
1509
|
+
};
|
|
1510
|
+
|
|
1511
|
+
FieldHelpBase.prototype.getAriaAttributes = function(iMaxConditions) {
|
|
1512
|
+
|
|
1513
|
+
return {
|
|
1514
|
+
contentId: this.getContentId(),
|
|
1515
|
+
ariaHasPopup: this.getAriaHasPopup(),
|
|
1516
|
+
role: "combobox",
|
|
1517
|
+
roleDescription: this.getRoleDescription(iMaxConditions),
|
|
1518
|
+
valueHelpEnabled: this.getValueHelpEnabled()
|
|
1519
|
+
};
|
|
1520
|
+
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
FieldHelpBase.prototype.attachEvent = function(sEventId, oData, fnFunction, oListener) {
|
|
1524
|
+
if (sEventId === "navigated") {
|
|
1525
|
+
return Element.prototype.attachEvent.apply(this, ["navigate", oData, fnFunction, oListener]);
|
|
1526
|
+
} else {
|
|
1527
|
+
return Element.prototype.attachEvent.apply(this, arguments);
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
FieldHelpBase.prototype.detachEvent = function(sEventId, fnFunction, oListener) {
|
|
1532
|
+
if (sEventId === "navigated") {
|
|
1533
|
+
return Element.prototype.detachEvent.apply(this, ["navigate", fnFunction, oListener]);
|
|
1534
|
+
} else {
|
|
1535
|
+
return Element.prototype.detachEvent.apply(this, arguments);
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1479
1539
|
return FieldHelpBase;
|
|
1480
1540
|
|
|
1481
1541
|
});
|
|
@@ -27,10 +27,12 @@ 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.96.2
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.54.0
|
|
34
|
+
* @experimental As of version 1.54
|
|
35
|
+
* @ui5-restricted sap.ui.mdc
|
|
34
36
|
* @alias sap.ui.mdc.field.FieldInfoBase
|
|
35
37
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
36
38
|
*/
|
|
@@ -39,7 +41,13 @@ sap.ui.define([
|
|
|
39
41
|
metadata: {
|
|
40
42
|
library: "sap.ui.mdc",
|
|
41
43
|
events: {
|
|
44
|
+
/**
|
|
45
|
+
* This event is fired if the data was updated.
|
|
46
|
+
*/
|
|
42
47
|
dataUpdate: {},
|
|
48
|
+
/**
|
|
49
|
+
* This event is fired after the popover is opened.
|
|
50
|
+
*/
|
|
43
51
|
popoverAfterOpen: {}
|
|
44
52
|
}
|
|
45
53
|
}
|
|
@@ -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.96.2
|
|
27
27
|
* @constructor
|
|
28
28
|
* @abstract
|
|
29
29
|
* @private
|