@openui5/sap.ui.mdc 1.124.2 → 1.126.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/.reuse/dep5 +9 -4
- package/THIRDPARTY.txt +13 -6
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +2 -2
- package/src/sap/ui/mdc/Chart.js +69 -40
- package/src/sap/ui/mdc/ChartDelegate.js +50 -26
- 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 +2 -2
- package/src/sap/ui/mdc/FilterBar.js +55 -7
- package/src/sap/ui/mdc/FilterField.js +68 -11
- package/src/sap/ui/mdc/Link.js +6 -5
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +8 -2
- package/src/sap/ui/mdc/ValueHelp.js +22 -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 +220 -113
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +10 -6
- 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/ConditionModelPropertyBinding.js +22 -4
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +19 -11
- package/src/sap/ui/mdc/condition/Operator.js +3 -3
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +2 -2
- package/src/sap/ui/mdc/condition/RangeOperator.js +34 -8
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +6 -3
- package/src/sap/ui/mdc/field/ConditionType.js +35 -40
- package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +10 -6
- 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 +66 -22
- package/src/sap/ui/mdc/field/FieldInfoBase.js +12 -3
- 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 +108 -4
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +1 -0
- package/src/sap/ui/mdc/field/content/DateContent.js +2 -2
- package/src/sap/ui/mdc/field/content/DefaultContent.js +4 -4
- package/src/sap/ui/mdc/field/content/UnitContent.js +3 -3
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +19 -3
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +2 -2
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +90 -100
- package/src/sap/ui/mdc/flexibility/Util.js +5 -2
- package/src/sap/ui/mdc/library.js +2 -2
- 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 +12 -15
- 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 +5 -0
- package/src/sap/ui/mdc/messagebundle_ar.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_bg.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_cnr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_en.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_hu.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ko.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_mk.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_nl.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_tr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_vi.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +3 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +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/ChartDelegate.js +3 -1
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +10 -3
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +7 -3
- package/src/sap/ui/mdc/table/Column.js +6 -0
- 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 +37 -13
- package/src/sap/ui/mdc/table/GridTableType.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/ResponsiveTableType.js +6 -7
- package/src/sap/ui/mdc/table/RowActionItem.js +2 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +1 -0
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
- package/src/sap/ui/mdc/themes/base/PersonalizationDialog.less +4 -4
- package/src/sap/ui/mdc/themes/base/Table.less +1 -0
- package/src/sap/ui/mdc/ushell/LinkDelegate.js +25 -19
- 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/valuehelp/Dialog.js +2 -2
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +21 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +28 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +19 -1
- package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -45
- package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +339 -332
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +7 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +23 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +6 -2
|
@@ -66,9 +66,27 @@ sap.ui.define([
|
|
|
66
66
|
* In case oLinkType.type is 2 the Link will get rendered as a Link and will open a Popover (default)
|
|
67
67
|
*/
|
|
68
68
|
LinkDelegate.fetchLinkType = function(oLink) {
|
|
69
|
+
const oPayload = oLink.getPayload();
|
|
70
|
+
|
|
71
|
+
if (oPayload && oPayload.semanticObjects) {
|
|
72
|
+
return LinkDelegate.hasDistinctSemanticObjects(oPayload.semanticObjects).then((bHasDisctinctSemanticObject) => {
|
|
73
|
+
return Promise.resolve({
|
|
74
|
+
type: bHasDisctinctSemanticObject ? LinkType.Popover : LinkType.Text,
|
|
75
|
+
directLink: undefined
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
throw new Error("no payload or semanticObjects found");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @param {string[]} aSemanticObjects Names of the SemanticObjects to check
|
|
85
|
+
* @returns {Promise<boolean>} Promise resolving to true if atleast one SemanticObject exists
|
|
86
|
+
*/
|
|
87
|
+
LinkDelegate.hasDistinctSemanticObjects = (aSemanticObjects) => {
|
|
69
88
|
const mSemanticObjects = {};
|
|
70
89
|
let oPromise = null;
|
|
71
|
-
const oPayload = oLink.getPayload();
|
|
72
90
|
|
|
73
91
|
const fnHaveBeenRetrievedAllSemanticObjects = function(aSemanticObjects) {
|
|
74
92
|
return aSemanticObjects.filter((sSemanticObject) => {
|
|
@@ -104,25 +122,13 @@ sap.ui.define([
|
|
|
104
122
|
}
|
|
105
123
|
return oPromise;
|
|
106
124
|
};
|
|
107
|
-
const fnHasDistinctSemanticObject = function(aSemanticObjects) {
|
|
108
|
-
if (fnHaveBeenRetrievedAllSemanticObjects(aSemanticObjects)) {
|
|
109
|
-
return Promise.resolve(fnAtLeastOneExistsSemanticObject(aSemanticObjects));
|
|
110
|
-
}
|
|
111
|
-
return fnRetrieveDistinctSemanticObjects().then(() => {
|
|
112
|
-
return fnAtLeastOneExistsSemanticObject(aSemanticObjects);
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
125
|
|
|
116
|
-
if (
|
|
117
|
-
return
|
|
118
|
-
return Promise.resolve({
|
|
119
|
-
type: bHasDisctinctSemanticObject ? LinkType.Popover : LinkType.Text,
|
|
120
|
-
directLink: undefined
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
} else {
|
|
124
|
-
throw new Error("no payload or semanticObjects found");
|
|
126
|
+
if (fnHaveBeenRetrievedAllSemanticObjects(aSemanticObjects)) {
|
|
127
|
+
return Promise.resolve(fnAtLeastOneExistsSemanticObject(aSemanticObjects));
|
|
125
128
|
}
|
|
129
|
+
return fnRetrieveDistinctSemanticObjects().then(() => {
|
|
130
|
+
return fnAtLeastOneExistsSemanticObject(aSemanticObjects);
|
|
131
|
+
});
|
|
126
132
|
};
|
|
127
133
|
|
|
128
134
|
/**
|
|
@@ -234,7 +240,7 @@ sap.ui.define([
|
|
|
234
240
|
ownNavigation: undefined,
|
|
235
241
|
availableActions: []
|
|
236
242
|
};
|
|
237
|
-
return Library.load({name: 'sap.ui.fl'}).then(() => {
|
|
243
|
+
return Library.load({ name: 'sap.ui.fl' }).then(() => {
|
|
238
244
|
|
|
239
245
|
const Utils = sap.ui.require('sap/ui/fl/Utils');
|
|
240
246
|
if (!Utils) {
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @class The <code>InfoBar</code> control provides an easy way of displaying filter information inside an <code>sap.ui.mdc.Chart</code> and an <code>sap.ui.mdc.Table</code>.
|
|
25
25
|
* @extends sap.ui.core.Control
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.126.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -45,7 +45,7 @@ sap.ui.define(
|
|
|
45
45
|
* Destroying the cache will cancel all registered promises and delete references. Convenience methods for promise creation, wrapping and replacement are offered.
|
|
46
46
|
*
|
|
47
47
|
* @author SAP SE
|
|
48
|
-
* @version 1.
|
|
48
|
+
* @version 1.126.0
|
|
49
49
|
* @alias sap.ui.mdc.util.PromiseCache
|
|
50
50
|
* @since 1.85.0
|
|
51
51
|
* @private
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
* @param {object} [mSettings] Initial settings for the new control
|
|
66
66
|
* @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a dialog.
|
|
67
67
|
* @extends sap.ui.mdc.valuehelp.base.Container
|
|
68
|
-
* @version 1.
|
|
68
|
+
* @version 1.126.0
|
|
69
69
|
* @constructor
|
|
70
70
|
* @public
|
|
71
71
|
* @since 1.95.0
|
|
@@ -755,7 +755,7 @@ sap.ui.define([
|
|
|
755
755
|
const oFilter = new Filter({ path: 'isEmpty', operator: 'NE', value1: true });
|
|
756
756
|
this._oConditionType.setFormatOptions(_getConditionFormatOptions.call(this)); // as config might be changed
|
|
757
757
|
const oTokenTemplate = new Token(this.getId() + "-Token", { text: { path: '$valueHelp>', type: this._oConditionType } });
|
|
758
|
-
this.oTokenMultiInput.bindAggregation("tokens", { path: '/conditions', model: "$valueHelp", templateShareable: false, template: oTokenTemplate, filters: oFilter });
|
|
758
|
+
this.oTokenMultiInput.bindAggregation("tokens", { path: '/conditions', model: "$valueHelp", templateShareable: false, template: oTokenTemplate, filters: oFilter, length: 50, startIndex: -50 });
|
|
759
759
|
}
|
|
760
760
|
} else if (oBindingInfo) { // remove binding if dialog is closed to prevent updated on tokens if conditions are updated. (Suspend would not be enough, as every single binding on token would need to be suspended too.)
|
|
761
761
|
this.oTokenMultiInput.unbindAggregation("tokens");
|
|
@@ -43,7 +43,7 @@ sap.ui.define(
|
|
|
43
43
|
* <b>Note:</b> The <code>FilterBar</code> can only be used for a {@link sap.ui.mdc.valuehelp.Dialog Dialog} and not on its own.
|
|
44
44
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.126.0
|
|
47
47
|
* @constructor
|
|
48
48
|
* @public
|
|
49
49
|
* @since 1.124.0
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @param {object} [mSettings] Initial settings for the new control
|
|
36
36
|
* @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a popover.
|
|
37
37
|
* @extends sap.ui.mdc.valuehelp.base.Container
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.126.0
|
|
39
39
|
* @constructor
|
|
40
40
|
* @public
|
|
41
41
|
* @since 1.95.0
|
|
@@ -215,8 +215,6 @@ sap.ui.define([
|
|
|
215
215
|
this._oInvisibleText = new InvisibleText({ text: Library.getResourceBundleFor("sap.ui.mdc").getText("valuehelp.POPOVER_AVALIABLE_VALUES") }).toStatic();
|
|
216
216
|
oPopover.addAriaLabelledBy(this._oInvisibleText);
|
|
217
217
|
|
|
218
|
-
oPopover.setFollowOf(false);
|
|
219
|
-
|
|
220
218
|
if (oValueStateHeader) {
|
|
221
219
|
oValueStateHeader.setPopup(oPopover);
|
|
222
220
|
}
|
|
@@ -633,10 +631,25 @@ sap.ui.define([
|
|
|
633
631
|
const bSingleSelect = this.isSingleSelect();
|
|
634
632
|
const bClose = oEvent.getParameter("close");
|
|
635
633
|
if (!Device.system.phone || bSingleSelect || bClose) {
|
|
634
|
+
if (!bClose) {
|
|
635
|
+
this._disableFollowOfTemporarily();
|
|
636
|
+
}
|
|
636
637
|
this.fireConfirm({ close: bClose || bSingleSelect });
|
|
637
638
|
}
|
|
638
639
|
};
|
|
639
640
|
|
|
641
|
+
// Workaround to prevent the popup from closing unexpectedly should formatting lead to field size adjustments
|
|
642
|
+
Popover.prototype._disableFollowOfTemporarily = function () {
|
|
643
|
+
if (this._followOfTimer) {
|
|
644
|
+
clearTimeout(this._followOfTimer);
|
|
645
|
+
}
|
|
646
|
+
const oPopover = this.getAggregation("_container");
|
|
647
|
+
oPopover.setFollowOf(false);
|
|
648
|
+
this._followOfTimer = setTimeout(() => {
|
|
649
|
+
oPopover.setFollowOf(true);
|
|
650
|
+
}, 300);
|
|
651
|
+
};
|
|
652
|
+
|
|
640
653
|
Popover.prototype.handleCanceled = function(oEvent) {
|
|
641
654
|
if (!Device.system.phone) { // on phone don't cancel if filterValue cleared
|
|
642
655
|
Container.prototype.handleCanceled.apply(this, arguments);
|
|
@@ -797,6 +810,11 @@ sap.ui.define([
|
|
|
797
810
|
this._oTokenConditionType = undefined;
|
|
798
811
|
}
|
|
799
812
|
|
|
813
|
+
if (this._followOfTimer) {
|
|
814
|
+
clearTimeout(this._followOfTimer);
|
|
815
|
+
this._followOfTimer = null;
|
|
816
|
+
}
|
|
817
|
+
|
|
800
818
|
Container.prototype.exit.apply(this, arguments);
|
|
801
819
|
};
|
|
802
820
|
|
|
@@ -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.126.0
|
|
30
30
|
* @constructor
|
|
31
31
|
* @abstract
|
|
32
32
|
* @public
|
|
@@ -76,6 +76,9 @@ sap.ui.define([
|
|
|
76
76
|
events: {
|
|
77
77
|
/**
|
|
78
78
|
* This event is fired if the selected condition has changed.
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
79
82
|
*/
|
|
80
83
|
select: {
|
|
81
84
|
parameters: {
|
|
@@ -93,6 +96,9 @@ sap.ui.define([
|
|
|
93
96
|
},
|
|
94
97
|
/**
|
|
95
98
|
* This event is fired if a change of the value help is confirmed.
|
|
99
|
+
*
|
|
100
|
+
* @private
|
|
101
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
96
102
|
*/
|
|
97
103
|
confirm: {
|
|
98
104
|
parameters: {
|
|
@@ -104,6 +110,9 @@ sap.ui.define([
|
|
|
104
110
|
},
|
|
105
111
|
/**
|
|
106
112
|
* This event is fired if the value help is opened.
|
|
113
|
+
*
|
|
114
|
+
* @private
|
|
115
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
107
116
|
*/
|
|
108
117
|
opened: {
|
|
109
118
|
parameters: {
|
|
@@ -115,14 +124,23 @@ sap.ui.define([
|
|
|
115
124
|
},
|
|
116
125
|
/**
|
|
117
126
|
* This event is fired if the value help is closed.
|
|
127
|
+
*
|
|
128
|
+
* @private
|
|
129
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
118
130
|
*/
|
|
119
131
|
closed: {},
|
|
120
132
|
/**
|
|
121
133
|
* This event is fired if the change is cancelled.
|
|
134
|
+
*
|
|
135
|
+
* @private
|
|
136
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
122
137
|
*/
|
|
123
138
|
cancel: {},
|
|
124
139
|
/**
|
|
125
140
|
* This event is fired if the container requests the delegate content.
|
|
141
|
+
*
|
|
142
|
+
* @private
|
|
143
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
126
144
|
*/
|
|
127
145
|
requestDelegateContent: {
|
|
128
146
|
parameters: {
|
|
@@ -134,10 +152,16 @@ sap.ui.define([
|
|
|
134
152
|
},
|
|
135
153
|
/**
|
|
136
154
|
* This event is fired if the value help should switch to dialog mode.
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
137
158
|
*/
|
|
138
159
|
requestSwitchToDialog: {},
|
|
139
160
|
/**
|
|
140
161
|
* This event is fired if a navigation has been executed in the content of the container.
|
|
162
|
+
*
|
|
163
|
+
* @private
|
|
164
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
141
165
|
*/
|
|
142
166
|
navigated: {
|
|
143
167
|
parameters: {
|
|
@@ -159,6 +183,9 @@ sap.ui.define([
|
|
|
159
183
|
},
|
|
160
184
|
/**
|
|
161
185
|
* This event is fired after a suggested item has been found for a type-ahead.
|
|
186
|
+
*
|
|
187
|
+
* @private
|
|
188
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
162
189
|
* @since 1.120.0
|
|
163
190
|
*/
|
|
164
191
|
typeaheadSuggested: {
|
|
@@ -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.
|
|
36
36
|
* @extends sap.ui.core.Element
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.126.0
|
|
38
38
|
* @constructor
|
|
39
39
|
* @abstract
|
|
40
40
|
* @public
|
|
@@ -132,6 +132,9 @@ sap.ui.define([
|
|
|
132
132
|
events: {
|
|
133
133
|
/**
|
|
134
134
|
* This event is fired if the selected condition has changed.
|
|
135
|
+
*
|
|
136
|
+
* @private
|
|
137
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
135
138
|
*/
|
|
136
139
|
select: {
|
|
137
140
|
parameters: {
|
|
@@ -149,6 +152,9 @@ sap.ui.define([
|
|
|
149
152
|
},
|
|
150
153
|
/**
|
|
151
154
|
* This event is fired if a change of the content is confirmed.
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
152
158
|
*/
|
|
153
159
|
confirm: {
|
|
154
160
|
parameters: {
|
|
@@ -160,15 +166,24 @@ sap.ui.define([
|
|
|
160
166
|
},
|
|
161
167
|
/**
|
|
162
168
|
* This event is fired if the change is cancelled.
|
|
169
|
+
*
|
|
170
|
+
* @private
|
|
171
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
163
172
|
*/
|
|
164
173
|
cancel: {},
|
|
165
174
|
|
|
166
175
|
/**
|
|
167
176
|
* This event is fired if the value help should switch to dialog mode.
|
|
177
|
+
*
|
|
178
|
+
* @private
|
|
179
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
168
180
|
*/
|
|
169
181
|
requestSwitchToDialog: {},
|
|
170
182
|
/**
|
|
171
183
|
* This event is fired if a navigation has been executed in the content.
|
|
184
|
+
*
|
|
185
|
+
* @private
|
|
186
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
172
187
|
*/
|
|
173
188
|
navigated: {
|
|
174
189
|
parameters: {
|
|
@@ -190,6 +205,9 @@ sap.ui.define([
|
|
|
190
205
|
},
|
|
191
206
|
/**
|
|
192
207
|
* This event is fired after a suggested item has been found for a type-ahead.
|
|
208
|
+
*
|
|
209
|
+
* @private
|
|
210
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
193
211
|
* @since 1.120.0
|
|
194
212
|
*/
|
|
195
213
|
typeaheadSuggested: {
|
|
@@ -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.126.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.126.0
|
|
48
48
|
* @constructor
|
|
49
49
|
* @abstract
|
|
50
50
|
* @public
|
|
@@ -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.126.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.126.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.126.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @public
|
|
33
33
|
* @since 1.95.0
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @param {object} [mSettings] Initial settings for the new element
|
|
33
33
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a list with fixed values.
|
|
34
34
|
* @extends sap.ui.mdc.valuehelp.base.ListContent
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.126.0
|
|
36
36
|
* @constructor
|
|
37
37
|
* @public
|
|
38
38
|
* @since 1.95.0
|
|
@@ -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 using a {@link sap.ui.mdc.Table}.
|
|
38
38
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
39
|
-
* @version 1.
|
|
39
|
+
* @version 1.126.0
|
|
40
40
|
* @constructor
|
|
41
41
|
* @public
|
|
42
42
|
* @since 1.95.0
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
* @param {object} [mSettings] Initial settings for the new element
|
|
52
52
|
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.m.Table}.
|
|
53
53
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
54
|
-
* @version 1.
|
|
54
|
+
* @version 1.126.0
|
|
55
55
|
* @constructor
|
|
56
56
|
* @public
|
|
57
57
|
* @since 1.95.0
|
|
@@ -290,22 +290,38 @@ sap.ui.define([
|
|
|
290
290
|
return this._oTable;
|
|
291
291
|
};
|
|
292
292
|
|
|
293
|
+
/*
|
|
294
|
+
* For non-typeahead multi-select content, 'SingleSelectMaster', 'SingleSelectLeft' and 'MultiSelect' are considered valid.
|
|
295
|
+
* For typeahead content, 'SingleSelectLeft' is considered invalid.
|
|
296
|
+
* For single-select content, 'MultiSelect' mode is considered invalid.
|
|
297
|
+
*/
|
|
298
|
+
function _getValidTableSelectModes(bTypeahead, bEnforceSingleSelect) {
|
|
299
|
+
return [
|
|
300
|
+
ListMode.SingleSelectMaster,
|
|
301
|
+
...bTypeahead ? [] : [ListMode.SingleSelectLeft],
|
|
302
|
+
...bEnforceSingleSelect ? [] : [ListMode.MultiSelect]
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
|
|
293
306
|
MTable.prototype.onShow = function(bInitial) {
|
|
294
307
|
const oTable = this._getTable();
|
|
295
308
|
if (oTable) {
|
|
296
309
|
if (!oTable.hasStyleClass("sapMComboBoxList")) { // TODO: only in typeahead case?
|
|
297
310
|
oTable.addStyleClass("sapMComboBoxList"); // to allow focus outline in navigation
|
|
298
311
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
if
|
|
308
|
-
|
|
312
|
+
|
|
313
|
+
const bTypeahead = this.isTypeahead();
|
|
314
|
+
const bEnforceSingleSelect = FilterableListContent.prototype.isSingleSelect.apply(this);
|
|
315
|
+
const sTableSelectMode = oTable.getMode();
|
|
316
|
+
|
|
317
|
+
if (sTableSelectMode === ListMode.None) { // set selection mode, if none is given
|
|
318
|
+
const sPreferredSingleSelectMode = bTypeahead ? ListMode.SingleSelectMaster : ListMode.SingleSelectLeft;
|
|
319
|
+
oTable.setMode(bEnforceSingleSelect ? sPreferredSingleSelectMode : ListMode.MultiSelect);
|
|
320
|
+
} else { // check if selection mode is fine
|
|
321
|
+
const aValidSelectModes = _getValidTableSelectModes(bTypeahead, bEnforceSingleSelect);
|
|
322
|
+
if (!aValidSelectModes.includes(sTableSelectMode)) {
|
|
323
|
+
throw new Error(`Table selection mode needs to be '${aValidSelectModes.join("' or '")}'`);
|
|
324
|
+
}
|
|
309
325
|
}
|
|
310
326
|
}
|
|
311
327
|
|
|
@@ -423,9 +439,18 @@ sap.ui.define([
|
|
|
423
439
|
|
|
424
440
|
MTable.prototype.getItemForValue = function(oConfig) {
|
|
425
441
|
|
|
426
|
-
if (!oConfig.checkKey &&
|
|
442
|
+
if (!oConfig.checkKey && !oConfig.checkDescription) {
|
|
427
443
|
return null;
|
|
428
444
|
}
|
|
445
|
+
|
|
446
|
+
if (oConfig.checkKey && !oConfig.hasOwnProperty("parsedValue")) {
|
|
447
|
+
throw new Error("MTable: Cannot check key without a given parsedValue! " + this.getId());
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (oConfig.checkDescription && !oConfig.hasOwnProperty("parsedDescription")) {
|
|
451
|
+
throw new Error("MTable: Cannot check description without a given parsedDescription! " + this.getId());
|
|
452
|
+
}
|
|
453
|
+
|
|
429
454
|
if (oConfig.checkKey && !this.getKeyPath()) {
|
|
430
455
|
throw new Error("MTable: KeyPath missing! " + this.getId());
|
|
431
456
|
}
|
|
@@ -519,7 +544,7 @@ sap.ui.define([
|
|
|
519
544
|
|
|
520
545
|
let oFilter = aFilters.length > 1 ? new Filter({ filters: aFilters, and: false }) : aFilters[0];
|
|
521
546
|
|
|
522
|
-
if (oConditions) {
|
|
547
|
+
if (oFilter && oConditions) {
|
|
523
548
|
const oConditionTypes = this._getTypesForConditions(oConditions);
|
|
524
549
|
const oConditionsFilter = FilterConverter.createFilters(oConditions, oConditionTypes, undefined, this.getCaseSensitive());
|
|
525
550
|
if (oConditionsFilter) {
|
|
@@ -561,10 +586,6 @@ sap.ui.define([
|
|
|
561
586
|
return null;
|
|
562
587
|
}
|
|
563
588
|
|
|
564
|
-
/* steps:
|
|
565
|
-
TODO: 1. wait for table binding
|
|
566
|
-
2. consider existing inparameters
|
|
567
|
-
*/
|
|
568
589
|
const sKeyPath = this.getKeyPath();
|
|
569
590
|
const sDescriptionPath = this.getDescriptionPath();
|
|
570
591
|
const bUseFirstMatch = this.getUseFirstMatch();
|
|
@@ -576,35 +597,26 @@ sap.ui.define([
|
|
|
576
597
|
const oDelegate = this.getValueHelpDelegate();
|
|
577
598
|
const oValueHelp = this.getValueHelpInstance();
|
|
578
599
|
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
oConfig.context,
|
|
583
|
-
oConfig.bindingContext && oConfig.bindingContext.getPath(),
|
|
584
|
-
oConditions
|
|
585
|
-
]);
|
|
600
|
+
const oFilter = _createItemFilters.call(this, oConfig, oConditions);
|
|
601
|
+
const oFilterListBinding = oListBinding.getModel().bindList(sPath, oListBinding.getContext(), undefined, oFilter);
|
|
602
|
+
oFilterListBinding.initialize();
|
|
586
603
|
|
|
587
|
-
return
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
} else {
|
|
604
|
-
const oException = _createException.call(this, oConfig.exception, aContexts.length > 1, oConfig.value);
|
|
605
|
-
throw oException;
|
|
606
|
-
}
|
|
607
|
-
});
|
|
604
|
+
return oDelegate.executeFilter(oValueHelp, oFilterListBinding, 2).then((oBinding) => {
|
|
605
|
+
const aContexts = oBinding.getContexts();
|
|
606
|
+
|
|
607
|
+
setTimeout(() => { // as Binding might process other steps after event was fired - destroy it lazy
|
|
608
|
+
oFilterListBinding.destroy();
|
|
609
|
+
}, 0);
|
|
610
|
+
|
|
611
|
+
if (aContexts.length && (aContexts.length < 2 || bUseFirstMatch)) {
|
|
612
|
+
return this.getItemFromContext(aContexts[0], { keyPath: sKeyPath, descriptionPath: sDescriptionPath, inParameters: undefined });
|
|
613
|
+
} else if (oConfig.checkKey && oConfig.parsedValue === "" && aContexts.length === 0) {
|
|
614
|
+
// nothing found for empty key -> this is not an error
|
|
615
|
+
return null;
|
|
616
|
+
} else {
|
|
617
|
+
const oException = _createException.call(this, oConfig.exception, aContexts.length > 1, oConfig.value);
|
|
618
|
+
throw oException;
|
|
619
|
+
}
|
|
608
620
|
});
|
|
609
621
|
};
|
|
610
622
|
|