@openui5/sap.ui.mdc 1.136.2 → 1.138.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/.eslintrc.json +34 -0
- package/REUSE.toml +0 -28
- package/THIRDPARTY.txt +0 -24
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +174 -4
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +22 -2
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +14 -2
- package/src/sap/ui/mdc/Table.js +211 -170
- package/src/sap/ui/mdc/TableDelegate.js +17 -12
- package/src/sap/ui/mdc/ValueHelp.js +20 -1
- package/src/sap/ui/mdc/ValueHelpDelegate.js +6 -30
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +18 -18
- package/src/sap/ui/mdc/condition/Operator.js +3 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/enums/ContentMode.js +7 -1
- package/src/sap/ui/mdc/field/ConditionType.js +6 -3
- package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +26 -4
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +6 -3
- package/src/sap/ui/mdc/field/FieldBase.js +302 -75
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +5 -2
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldSelect.js +459 -0
- package/src/sap/ui/mdc/field/FieldSelectRenderer.js +66 -0
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +35 -6
- package/src/sap/ui/mdc/field/content/DateContent.js +6 -0
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +3 -0
- package/src/sap/ui/mdc/field/content/DefaultContent.js +45 -0
- package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
- package/src/sap/ui/mdc/field/content/SearchContent.js +6 -0
- package/src/sap/ui/mdc/field/content/TimeContent.js +3 -0
- package/src/sap/ui/mdc/field/content/UnitContent.js +18 -15
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Util.js +10 -0
- package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
- package/src/sap/ui/mdc/i18n/interaction.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_ar.xml +3 -3
- package/src/sap/ui/mdc/i18n/interaction_bg.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_ca.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_cnr.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_cs.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_cy.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_da.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_de.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_en.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_en_GB.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_en_US_saprigi.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_es.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_es_MX.xml +1 -1
- package/src/sap/ui/mdc/i18n/interaction_et.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_fi.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_hi.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_hr.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_hu.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_id.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_it.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_kk.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_lt.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_lv.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_mk.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_ms.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_nl.xml +1 -1
- package/src/sap/ui/mdc/i18n/interaction_no.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_pl.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_pt.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_pt_PT.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_ru.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_sh.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_sl.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_sr.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_sv.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_tr.xml +1 -1
- package/src/sap/ui/mdc/i18n/interaction_uk.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_vi.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_zh_CN.xml +2 -2
- package/src/sap/ui/mdc/i18n/interaction_zh_TW.xml +2 -2
- package/src/sap/ui/mdc/library.js +13 -7
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ar.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_bg.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_cnr.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_el.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_en.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -1
- package/src/sap/ui/mdc/messagebundle_et.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_kk.properties +18 -16
- package/src/sap/ui/mdc/messagebundle_ko.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_mk.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_nl.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_sr.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_tr.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_vi.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +2 -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/TableDelegate.js +12 -39
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
- package/src/sap/ui/mdc/table/Column.js +14 -13
- package/src/sap/ui/mdc/table/ColumnSettings.js +4 -2
- package/src/sap/ui/mdc/table/CreationRow.js +7 -3
- package/src/sap/ui/mdc/table/DragDropConfig.js +367 -349
- package/src/sap/ui/mdc/table/GridTableType.js +70 -42
- package/src/sap/ui/mdc/table/{V4AnalyticsPropertyHelper.js → ODataV4PropertyHelper.js} +6 -4
- package/src/sap/ui/mdc/table/PropertyHelper.js +10 -13
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +4 -2
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +27 -11
- package/src/sap/ui/mdc/table/RowActionItem.js +9 -8
- package/src/sap/ui/mdc/table/RowSettings.js +19 -19
- package/src/sap/ui/mdc/table/TableSettings.js +26 -23
- package/src/sap/ui/mdc/table/TableTypeBase.js +2 -1
- package/src/sap/ui/mdc/table/{menu → menus}/GroupHeaderRowContextMenu.js +2 -2
- package/src/sap/ui/mdc/table/{menu → menus}/QuickActionContainer.js +13 -3
- package/src/sap/ui/mdc/table/utils/Personalization.js +2 -2
- package/src/sap/ui/mdc/themes/base/Chart.less +30 -27
- 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 +39 -26
- package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +76 -64
- package/src/sap/ui/mdc/valuehelp/RequestShowContainerDefault.js +163 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +34 -4
- package/src/sap/ui/mdc/valuehelp/base/Content.js +26 -3
- 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 +63 -46
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +145 -17
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +9 -4
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +4 -2
- package/test/sap/ui/mdc/testutils/opa/Utils.js +9 -2
- package/test/sap/ui/mdc/testutils/opa/field/Actions.js +14 -4
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +302 -95
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +5 -4
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +27 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +23 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/TestObjects.js +24 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +47 -35
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +3 -2
|
@@ -232,12 +232,13 @@ sap.ui.define([
|
|
|
232
232
|
* @param {object} oConditionPayload Additional context information for this key
|
|
233
233
|
* @param {sap.ui.core.Control} oControl Instance of the calling control if it is not the field itself
|
|
234
234
|
* @param {sap.ui.model.Type} oType Type of the value
|
|
235
|
+
* @param {boolean} bEmptyAllowed If <code>true</code>, the connected control could be left empty (without conditions)
|
|
235
236
|
* @returns {string|sap.ui.mdc.valuehelp.base.ValueHelpItem|Promise<string|sap.ui.mdc.valuehelp.base.ValueHelpItem>} Description for key or object containing description, key, and payload. If it is not available right away (must be requested), a <code>Promise</code> is returned.
|
|
236
237
|
* @throws {sap.ui.model.FormatException} if the description cannot be determined
|
|
237
238
|
* @since: 1.78.0
|
|
238
239
|
* @public
|
|
239
240
|
*/
|
|
240
|
-
FieldBaseDelegate.getDescription = function(oField, oValueHelp, vKey, oInParameters, oOutParameters, oBindingContext, oDoNotUse, sDoNotUse, oConditionPayload, oControl, oType) {
|
|
241
|
+
FieldBaseDelegate.getDescription = function(oField, oValueHelp, vKey, oInParameters, oOutParameters, oBindingContext, oDoNotUse, sDoNotUse, oConditionPayload, oControl, oType, bEmptyAllowed) {
|
|
241
242
|
const oConfig = {
|
|
242
243
|
value: vKey,
|
|
243
244
|
parsedValue: vKey,
|
|
@@ -250,7 +251,9 @@ sap.ui.define([
|
|
|
250
251
|
caseSensitive: true, // case sensitive as used to get description for known key
|
|
251
252
|
exception: FormatException,
|
|
252
253
|
exactMatch: true,
|
|
253
|
-
control: oControl
|
|
254
|
+
control: oControl,
|
|
255
|
+
emptyAllowed: bEmptyAllowed
|
|
256
|
+
|
|
254
257
|
};
|
|
255
258
|
return oValueHelp && oValueHelp.getItemForValue(oConfig);
|
|
256
259
|
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* 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.
|
|
32
32
|
* This is the basis for link-features. If the link is pressed a popover might be opened.
|
|
33
33
|
* @extends sap.ui.mdc.Element
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.138.0
|
|
35
35
|
* @constructor
|
|
36
36
|
* @since 1.54.0
|
|
37
37
|
* @public
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* 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
|
* It enhances the {@link sap.m.Input Input} control to add ARIA attributes and other {@link sap.ui.mdc.field.FieldBase FieldBase}-specific logic.
|
|
26
26
|
* @extends sap.m.Input
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.138.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @abstract
|
|
30
30
|
* @private
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @class Functions uses in <code>FieldInputRenderer</code> and <code>FieldMultiInputRenderer</code> to adjust aria attributes.
|
|
17
17
|
*
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.138.0
|
|
20
20
|
* @since 1.86.0
|
|
21
21
|
* @alias sap.ui.mdc.field.FieldInputRenderUtil
|
|
22
22
|
*
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* The <code>FieldMultiInput</code> control is used to render a multi-input field inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
32
32
|
* It enhances the {@link sap.m.MultiInput MultiInput} control to add ARIA attributes and other {@link sap.ui.mdc.field.FieldBase FieldBase}-specific logic.
|
|
33
33
|
* @extends sap.m.MultiInput
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.138.0
|
|
35
35
|
* @constructor
|
|
36
36
|
* @abstract
|
|
37
37
|
* @private
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
'sap/m/Select',
|
|
9
|
+
'sap/ui/mdc/field/FieldSelectRenderer',
|
|
10
|
+
'sap/ui/mdc/field/ConditionsType',
|
|
11
|
+
'sap/ui/core/Element',
|
|
12
|
+
'sap/ui/base/ManagedObjectObserver',
|
|
13
|
+
'sap/base/util/merge'
|
|
14
|
+
|
|
15
|
+
], (
|
|
16
|
+
Select,
|
|
17
|
+
SelectRenderer,
|
|
18
|
+
ConditionsType,
|
|
19
|
+
Element,
|
|
20
|
+
ManagedObjectObserver,
|
|
21
|
+
merge
|
|
22
|
+
) => {
|
|
23
|
+
"use strict";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructor for a new <code>FieldSelect</code>.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
29
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
30
|
+
* @class
|
|
31
|
+
* The <code>FieldSelect</code> control is used to render an select field inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
32
|
+
* It enhances the {@link sap.m.Select Select} control to allow {@link sap.ui.mdc.field.FieldBase FieldBase}-specific ValueHelp logic.
|
|
33
|
+
* @extends sap.m.Input
|
|
34
|
+
* @version 1.138.0
|
|
35
|
+
* @constructor
|
|
36
|
+
* @abstract
|
|
37
|
+
* @private
|
|
38
|
+
* @ui5-restricted sap.ui.mdc.field.FieldBase
|
|
39
|
+
* @since 1.138
|
|
40
|
+
* @alias sap.ui.mdc.field.FieldSelect
|
|
41
|
+
*/
|
|
42
|
+
const FieldSelect = Select.extend("sap.ui.mdc.field.FieldSelect", /** @lends sap.ui.mdc.field.FieldSelect.prototype */ {
|
|
43
|
+
metadata: {
|
|
44
|
+
library: "sap.ui.mdc",
|
|
45
|
+
properties: {
|
|
46
|
+
/**
|
|
47
|
+
* Sets the ARIA attributes added to the <code>Select</code> control.
|
|
48
|
+
*
|
|
49
|
+
* The object contains ARIA attributes in an <code>aria</code> node.
|
|
50
|
+
* Additional attributes, such as <code>role</code>, <code>autocomplete</code> or <code>valueHelpEnabled</code>, are added on root level.
|
|
51
|
+
*/
|
|
52
|
+
ariaAttributes: {
|
|
53
|
+
type: "object",
|
|
54
|
+
defaultValue: {},
|
|
55
|
+
byValue: true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
events: {
|
|
59
|
+
/**
|
|
60
|
+
* Fired if value help is triggered.
|
|
61
|
+
*/
|
|
62
|
+
valueHelpRequest : {
|
|
63
|
+
parameters : {
|
|
64
|
+
/**
|
|
65
|
+
* The event parameter is set to true, when the event is fired after keyboard interaction, otherwise false.
|
|
66
|
+
*/
|
|
67
|
+
fromKeyboard: {type: "boolean"}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
renderer: SelectRenderer
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
FieldSelect.prototype.init = function() {
|
|
76
|
+
|
|
77
|
+
Select.prototype.init.apply(this, arguments);
|
|
78
|
+
|
|
79
|
+
this._sSelectedKeyOnFocus = null;
|
|
80
|
+
|
|
81
|
+
this._oObserver = new ManagedObjectObserver(_observeChanges.bind(this));
|
|
82
|
+
this._oObserver.observe(this, {
|
|
83
|
+
properties: ["ariaAttributes", "selectedKey"]
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
FieldSelect.prototype.exit = function() {
|
|
89
|
+
|
|
90
|
+
Select.prototype.exit.apply(this, arguments);
|
|
91
|
+
|
|
92
|
+
this._sSelectedKeyOnFocus = null;
|
|
93
|
+
|
|
94
|
+
if (this._oConditionsType) {
|
|
95
|
+
this._oConditionsType.destroy();
|
|
96
|
+
this._oConditionsType = undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
this._oObserver.disconnect();
|
|
100
|
+
this._oObserver = undefined;
|
|
101
|
+
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
FieldSelect.prototype.setProperty = function(sPropertyName, vValue, bSuppressInvalidate) {
|
|
105
|
+
|
|
106
|
+
// do not invalidate on ariaAttributes to prevent re-remdering. It needs to be changed directly in any case
|
|
107
|
+
if (sPropertyName === "ariaAttributes") {
|
|
108
|
+
bSuppressInvalidate = true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return Select.prototype.setProperty.apply(this, [sPropertyName, vValue, bSuppressInvalidate]);
|
|
112
|
+
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
function _observeChanges(oChanges) {
|
|
116
|
+
|
|
117
|
+
if (oChanges.name === "ariaAttributes") {
|
|
118
|
+
// set aria-attributes directly as done so in Select
|
|
119
|
+
const oDomRef = this.getFocusDomRef();
|
|
120
|
+
if (oDomRef) {
|
|
121
|
+
const fUpdate = (oChanges, oDomRef, sName) => {
|
|
122
|
+
if (oChanges.current.aria?.[sName] !== oChanges.old.aria?.[sName]) {
|
|
123
|
+
if (!oChanges.current.aria?.[sName]) {
|
|
124
|
+
oDomRef.removeAttribute("aria-" + sName);
|
|
125
|
+
} else {
|
|
126
|
+
oDomRef.setAttribute("aria-" + sName, oChanges.current.aria[sName]);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
fUpdate(oChanges, oDomRef, "activedescendant");
|
|
131
|
+
fUpdate(oChanges, oDomRef, "expanded");
|
|
132
|
+
fUpdate(oChanges, oDomRef, "controls");
|
|
133
|
+
}
|
|
134
|
+
} else if (oChanges.name === "selectedKey" && oChanges.current !== "") { // empty key handled by Select itself
|
|
135
|
+
this._bSetValuePending = true; // as value is set latest after rendering (don't set it before to prevent trigger async formatting multiple times)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
FieldSelect.prototype.createPicker = function() {
|
|
141
|
+
|
|
142
|
+
return null; // use ValueHelp, no own popover and list
|
|
143
|
+
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
function _formatConditions(aConditions) {
|
|
147
|
+
|
|
148
|
+
const oField = this.getParent();
|
|
149
|
+
|
|
150
|
+
if (!oField?.isA("sap.ui.mdc.field.FieldBase")) { // called from generic tests
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const oFormatOptions = merge({}, oField.getFormatOptions());
|
|
155
|
+
oFormatOptions.display = oField.getDisplay();
|
|
156
|
+
oFormatOptions.valueHelpID = oField._getValueHelp() || oField?._sDefaultValueHelp;
|
|
157
|
+
|
|
158
|
+
if (this._oConditionsType) {
|
|
159
|
+
this._oConditionsType.setFormatOptions(oFormatOptions); // as FormatOptions might be updated in Field
|
|
160
|
+
} else {
|
|
161
|
+
this._oConditionsType = new ConditionsType(oFormatOptions);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return this._oConditionsType.formatValue(aConditions, "string");
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function _formatNavigateCondition(bSelectedKeyFallback) {
|
|
169
|
+
|
|
170
|
+
const oField = this.getParent();
|
|
171
|
+
let sValue;
|
|
172
|
+
if (oField?._oNavigateCondition) { // format NavigationCondition
|
|
173
|
+
sValue = _formatConditions.call(this, [oField._oNavigateCondition]);
|
|
174
|
+
} else if (oField?._oNavigateCondition === null) { // empty-value navigated
|
|
175
|
+
sValue = _formatConditions.call(this, []);
|
|
176
|
+
} else if (bSelectedKeyFallback) {
|
|
177
|
+
const aConditions = this.getBinding("selectedKey")?.getRawValue();
|
|
178
|
+
sValue = _formatConditions.call(this, aConditions);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return sValue;
|
|
182
|
+
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function _formatNavigateConditionToKey() {
|
|
186
|
+
|
|
187
|
+
const oField = this.getParent();
|
|
188
|
+
let sKey;
|
|
189
|
+
|
|
190
|
+
if (oField?._oNavigateCondition) {
|
|
191
|
+
sKey = oField.getContentFactory().getConditionsType().formatValue([oField._oNavigateCondition]);
|
|
192
|
+
} else if (oField?._oNavigateCondition === null) {
|
|
193
|
+
sKey = "";
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return sKey;
|
|
197
|
+
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
FieldSelect.prototype._getSelectedItemText = function(vItem) {
|
|
201
|
+
|
|
202
|
+
// TODO: can it happen that no item is selected in Field case?
|
|
203
|
+
if (this._sValue !== undefined) { // formatted text already determined
|
|
204
|
+
return this._sValue;
|
|
205
|
+
} else {
|
|
206
|
+
return _formatNavigateCondition.call(this, true);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
FieldSelect.prototype.setValue = function(sValue) {
|
|
212
|
+
|
|
213
|
+
this._bSetValuePending = true;
|
|
214
|
+
Promise.all([sValue]).then((aResult) => { // as ConditionType.formatValue might return a Promise
|
|
215
|
+
const [sValue] = aResult;
|
|
216
|
+
this._sValue = sValue; // to also forward to _setHiddenSelectValue
|
|
217
|
+
Select.prototype.setValue.call(this, sValue);
|
|
218
|
+
delete this._sValue;
|
|
219
|
+
delete this._bSetValuePending;
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// here it just sets the string-formatted key from navigation, typeahead or valuehelp-selection
|
|
225
|
+
FieldSelect.prototype.setDOMValue = function(sValue) {
|
|
226
|
+
|
|
227
|
+
const sNavigateValue = _formatNavigateCondition.call(this, false);
|
|
228
|
+
sValue = sNavigateValue === undefined ? sValue : sNavigateValue;
|
|
229
|
+
|
|
230
|
+
this.setValue(sValue);
|
|
231
|
+
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
FieldSelect.prototype.getDOMValue = function(sValue) {
|
|
235
|
+
|
|
236
|
+
const oDomRef = this.getDomRef();
|
|
237
|
+
const oTextPlaceholder = oDomRef?.querySelector(".sapMSelectListItemText");
|
|
238
|
+
|
|
239
|
+
if (oTextPlaceholder) {
|
|
240
|
+
return oTextPlaceholder.textContent; // TODO: parse to key?
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return "";
|
|
244
|
+
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
FieldSelect.prototype._setHiddenSelectValue = function () {
|
|
248
|
+
|
|
249
|
+
const oSelect = this._getHiddenSelect();
|
|
250
|
+
const oInput = this._getHiddenInput();
|
|
251
|
+
let sSelectedKey = _formatNavigateConditionToKey.call(this);
|
|
252
|
+
const sSelectedItemText = this._sValue || this._getSelectedItemText();
|
|
253
|
+
|
|
254
|
+
if (sSelectedKey === undefined) {
|
|
255
|
+
sSelectedKey = this.getSelectedKey();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// the hidden INPUT is only used when the select is submitted
|
|
259
|
+
// with a form so update its value in all cases
|
|
260
|
+
oInput.attr("value", sSelectedKey || "");
|
|
261
|
+
|
|
262
|
+
if (!this._isIconOnly()) {
|
|
263
|
+
Promise.all([sSelectedItemText]).then((aResult) => {
|
|
264
|
+
const [sSelectedItemText] = aResult;
|
|
265
|
+
oSelect.text(sSelectedItemText);
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
FieldSelect.prototype.onBeforeRendering = function() {
|
|
272
|
+
|
|
273
|
+
Select.prototype.onBeforeRendering.apply(this, arguments);
|
|
274
|
+
|
|
275
|
+
// as text might be set via Navigation - just remember it
|
|
276
|
+
const sKey = this.getSelectedKey();
|
|
277
|
+
if (this._sSelectedKeyOnFocus === sKey && this.getDomRef() && !this._bSetValuePending) {
|
|
278
|
+
this._sValue = this.getDOMValue();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
FieldSelect.prototype.onAfterRendering = function() {
|
|
284
|
+
|
|
285
|
+
Select.prototype.onAfterRendering.apply(this, arguments);
|
|
286
|
+
|
|
287
|
+
// as text might be formatted async, set after rendering (as rendering clears value if there is a Promise)
|
|
288
|
+
const sText = this._getSelectedItemText();
|
|
289
|
+
this.setValue(sText);
|
|
290
|
+
delete this._sValue;
|
|
291
|
+
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// open/close handled by Field
|
|
295
|
+
FieldSelect.prototype.toggleOpenState = function() {
|
|
296
|
+
return this;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
FieldSelect.prototype.ontap = function(oEvent) {
|
|
300
|
+
|
|
301
|
+
if (!this.getEnabled() || !this.getEditable()) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const oValueHelp = _getValueHelp.call(this);
|
|
306
|
+
if (this.isOpenArea(oEvent.target) && oValueHelp?.isOpen()) { // as dropdown should also close on click in field, opening is handled on Field
|
|
307
|
+
this.fireValueHelpRequest();
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// disable Select-specific arrow-handling
|
|
313
|
+
FieldSelect.prototype.onsapdown = function(oEvent) {
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
FieldSelect.prototype.onsapup = function(oEvent) {
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
FieldSelect.prototype.onsappagedown = function(oEvent) {
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
FieldSelect.prototype.onsappageup = function(oEvent) {
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
FieldSelect.prototype.onsaphome = function(oEvent) {
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
FieldSelect.prototype.onsapend = function(oEvent) {
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
FieldSelect.prototype.onsapshow = function(oEvent) {
|
|
332
|
+
|
|
333
|
+
// prevents actions from occurring when the control is non-editable
|
|
334
|
+
if (!this.getEditable()) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
Select.prototype.onsapshow.apply(this, arguments);
|
|
339
|
+
|
|
340
|
+
this.fireValueHelpRequest({fromKeyboard: true}); // fromKeyboard set to force visual focus in dropdown
|
|
341
|
+
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
FieldSelect.prototype.onsapenter = function(oEvent) {
|
|
345
|
+
|
|
346
|
+
_updateSelectedKey.call(this);
|
|
347
|
+
|
|
348
|
+
Select.prototype.onsapenter.apply(this, arguments);
|
|
349
|
+
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
function _updateSelectedKey() {
|
|
353
|
+
|
|
354
|
+
const sKey = _formatNavigateConditionToKey.call(this);
|
|
355
|
+
|
|
356
|
+
if (sKey !== undefined) {
|
|
357
|
+
this.setSelectedKey(sKey);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
FieldSelect.prototype.onfocusin = function(oEvent) {
|
|
363
|
+
|
|
364
|
+
this._sSelectedKeyOnFocus = this.getSelectedKey();
|
|
365
|
+
Select.prototype.onfocusin.apply(this, arguments);
|
|
366
|
+
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
FieldSelect.prototype.onfocusout = function(oEvent) {
|
|
370
|
+
|
|
371
|
+
if (this.getId() !== oEvent.relatedControlId) {
|
|
372
|
+
_updateSelectedKey.call(this);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
Select.prototype.onfocusout.apply(this, arguments);
|
|
376
|
+
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
FieldSelect.prototype._isKeyAvailable = function (sKey) {
|
|
380
|
+
|
|
381
|
+
return false;
|
|
382
|
+
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
FieldSelect.prototype._checkSelectionChange = function() {
|
|
386
|
+
|
|
387
|
+
const sKey = this.getSelectedKey();
|
|
388
|
+
|
|
389
|
+
if (this._sSelectedKeyOnFocus !== sKey) {
|
|
390
|
+
this.fireChange({ selectedItem: null, previousSelectedItem: null, selectedKey: sKey });
|
|
391
|
+
this._sSelectedKeyOnFocus = sKey;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
FieldSelect.prototype._revertSelection = function() {
|
|
397
|
+
|
|
398
|
+
const sKey = _formatNavigateConditionToKey.call(this); // format NavigationCondition to key to compare with initial one
|
|
399
|
+
|
|
400
|
+
if (sKey !== undefined) {
|
|
401
|
+
if (this._sSelectedKeyOnFocus !== sKey) {
|
|
402
|
+
this.fireLiveChange({escPressed: true, value: this._sSelectedKeyOnFocus}); // let the Field close and reset ValueHelp and remove NavigationCondition
|
|
403
|
+
// this.setSelectedKey(this._sSelectedKeyOnFocus);
|
|
404
|
+
this.setValue(this._getSelectedItemText());
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
FieldSelect.prototype.searchNextItemByText = function(sText) {
|
|
411
|
+
|
|
412
|
+
// validation if sText is relevant string
|
|
413
|
+
if (!(typeof sText === "string" && sText !== "")) {
|
|
414
|
+
return null; // return null if sText is invalid
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
this.fireLiveChange({value: sText}); // let the Field do the typeahead
|
|
418
|
+
|
|
419
|
+
return null;
|
|
420
|
+
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
FieldSelect.prototype._addFocusClass = function () {
|
|
424
|
+
|
|
425
|
+
const oValueHelp = _getValueHelp.call(this);
|
|
426
|
+
|
|
427
|
+
if (!oValueHelp?.isOpen()) { // on open ValueHelp visual focus should be in dropdown
|
|
428
|
+
this.addStyleClass("sapMSltFocused"); // use addStyleClass to have same logoc like Input controls
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
FieldSelect.prototype._removeFocusClass = function () {
|
|
434
|
+
|
|
435
|
+
this.removeStyleClass("sapMSltFocused"); // use removeStyleClass to have same logoc like Input controls
|
|
436
|
+
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
function _getValueHelp() {
|
|
440
|
+
|
|
441
|
+
const oField = this.getParent();
|
|
442
|
+
let sId = oField?._getValueHelp();
|
|
443
|
+
let oValueHelp;
|
|
444
|
+
|
|
445
|
+
if (!sId && oField?._sDefaultValueHelp) {
|
|
446
|
+
sId = oField._sDefaultValueHelp;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
if (sId) {
|
|
450
|
+
oValueHelp = Element.getElementById(sId);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
return oValueHelp;
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
return FieldSelect;
|
|
458
|
+
|
|
459
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(['sap/ui/core/Renderer', 'sap/ui/core/library', 'sap/m/library', 'sap/m/SelectRenderer'],
|
|
8
|
+
(Renderer, coreLibrary, library, SelectRenderer) => {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
const {ValueState} = coreLibrary;
|
|
12
|
+
const {SelectType} = library;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* FieldSelect renderer.
|
|
16
|
+
* @namespace
|
|
17
|
+
*/
|
|
18
|
+
const FieldSelectRenderer = Renderer.extend(SelectRenderer);
|
|
19
|
+
FieldSelectRenderer.apiVersion = 2;
|
|
20
|
+
|
|
21
|
+
FieldSelectRenderer.writeAccessibilityState = function(oRm, oSelect) {
|
|
22
|
+
const sValueState = oSelect.getValueState(),
|
|
23
|
+
bIconOnly = oSelect.getType() === SelectType.IconOnly,
|
|
24
|
+
bEditabledAndEnabled = oSelect.getEnabled() && oSelect.getEditable(),
|
|
25
|
+
aLabels = [];
|
|
26
|
+
let aAriaLabelledBy = [],
|
|
27
|
+
sAriaDescribedBy;
|
|
28
|
+
const oAriaAttributes = oSelect.getAriaAttributes();
|
|
29
|
+
|
|
30
|
+
oSelect.getLabels().forEach((oLabel) => {
|
|
31
|
+
if (oLabel && oLabel.getId) {
|
|
32
|
+
aLabels.push(oLabel.getId());
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (sValueState !== ValueState.None && bEditabledAndEnabled) {
|
|
37
|
+
sAriaDescribedBy = oSelect.getValueStateMessageId() + "-sr";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (aLabels.length) {
|
|
41
|
+
aAriaLabelledBy = aAriaLabelledBy.concat(aLabels);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const oAriaLabelledBy = {
|
|
45
|
+
value: aAriaLabelledBy.join(" "),
|
|
46
|
+
append: true
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
oRm.accessibilityState(null, {
|
|
50
|
+
role: this.getAriaRole(oSelect),
|
|
51
|
+
roledescription: bIconOnly ? undefined : oSelect._sAriaRoleDescription,
|
|
52
|
+
readonly: bIconOnly ? undefined : oSelect.getEnabled() && !oSelect.getEditable(),
|
|
53
|
+
required: oSelect._isRequired() || undefined,
|
|
54
|
+
disabled: !oSelect.getEnabled() || undefined,
|
|
55
|
+
expanded: oAriaAttributes.aria?.expanded,
|
|
56
|
+
invalid: (oSelect.getValueState() === ValueState.Error && bEditabledAndEnabled) ? true : undefined,
|
|
57
|
+
labelledby: (bIconOnly || oAriaLabelledBy.value === "") ? undefined : oAriaLabelledBy,
|
|
58
|
+
describedby: sAriaDescribedBy,
|
|
59
|
+
activedescendant: oAriaAttributes.aria?.activedescendant,
|
|
60
|
+
controls: oAriaAttributes.aria?.controls,
|
|
61
|
+
haspopup: oSelect.getEditable() ? "listbox" : undefined
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return FieldSelectRenderer;
|
|
66
|
+
});
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* Base type for <code>MultiValueFieldItem</code> control.
|
|
21
21
|
* The {@link sap.ui.mdc.MultiValueField MultiValueField} holds its values as items. The <code>MultiValueFieldItem</code> element defines these items.
|
|
22
22
|
* @extends sap.ui.core.Element
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.138.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @since 1.93.0
|
|
26
26
|
* @public
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* The <code>TokenDisplay</code> control is used to render a field inside a control based on {@link sap.ui.mdc.field.FieldBase FieldBase}.
|
|
23
23
|
* It enhances the {@link sap.m.Token Token} control to add ARIA attributes and other {@link sap.ui.mdc.field.FieldBase FieldBase}-specific logic.
|
|
24
24
|
* @extends sap.m.Token
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.138.0
|
|
26
26
|
* @constructor
|
|
27
27
|
* @abstract
|
|
28
28
|
* @private
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* It enhances the {@link sap.m.Tokenizer Tokenizer} control to support display only tokens.
|
|
30
30
|
* @extends sap.m.Tokenizer
|
|
31
31
|
* @implements sap.ui.core.ILabelable
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.138.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @abstract
|
|
35
35
|
*
|