@openui5/sap.ui.mdc 1.93.3 → 1.96.1
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 +160 -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 +11 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -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 +35 -28
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
- package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -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
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 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/ui/mdc/valuehelp/base/Content',
|
|
9
|
+
'sap/ui/mdc/enum/ConditionValidated'
|
|
10
|
+
], function(
|
|
11
|
+
Content,
|
|
12
|
+
ConditionValidated
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for a new <code>ListContent</code>.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
20
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
21
|
+
* @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element.
|
|
22
|
+
* @extends sap.ui.mdc.valuehelp.base.Content
|
|
23
|
+
* @version 1.96.1
|
|
24
|
+
* @constructor
|
|
25
|
+
* @abstract
|
|
26
|
+
* @private
|
|
27
|
+
* @ui5-restricted sap.ui.mdc
|
|
28
|
+
* @since 1.95.0
|
|
29
|
+
* @alias sap.ui.mdc.valuehelp.base.ListContent
|
|
30
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
31
|
+
*/
|
|
32
|
+
var ListContent = Content.extend("sap.ui.mdc.valuehelp.base.ListContent", /** @lends sap.ui.mdc.valuehelp.base.ListContent.prototype */
|
|
33
|
+
{
|
|
34
|
+
metadata: {
|
|
35
|
+
library: "sap.ui.mdc",
|
|
36
|
+
properties: {
|
|
37
|
+
/**
|
|
38
|
+
* If this property is set to <code>true</code>, the filtering for user input is always case-sensitive.
|
|
39
|
+
* Otherwise user input is checked case-insensitively.
|
|
40
|
+
* If <code>$search</code> is used, this property has no effect on the <code>$search</code> request.
|
|
41
|
+
*
|
|
42
|
+
* If the used back-end service supports a case-insensitive search, set this property to <code>false</code>.
|
|
43
|
+
*/
|
|
44
|
+
caseSensitive: {
|
|
45
|
+
type: "boolean",
|
|
46
|
+
defaultValue: false
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* If set, <code>getKeyForText</code> returns the first item that matches the text.
|
|
51
|
+
*
|
|
52
|
+
* This is the case if the text of the item starts with the text entered.
|
|
53
|
+
*/
|
|
54
|
+
useFirstMatch: {
|
|
55
|
+
type: "boolean",
|
|
56
|
+
group: "Behavior",
|
|
57
|
+
defaultValue: true
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* If set, the List is also opened if the ValueHelp icon is pressed.
|
|
61
|
+
*/
|
|
62
|
+
useAsValueHelp: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
group: "Behavior",
|
|
65
|
+
defaultValue: true // TODO - right default?
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
aggregations: {
|
|
69
|
+
/**
|
|
70
|
+
* Sets the in parameters of a field help.
|
|
71
|
+
*
|
|
72
|
+
* If set, the field help reads the data of these entities in the model and uses it to filter in the value help.
|
|
73
|
+
*/
|
|
74
|
+
inParameters: {
|
|
75
|
+
type: "sap.ui.mdc.field.InParameter",
|
|
76
|
+
group: "Data",
|
|
77
|
+
multiple: true
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Sets the out parameters of a field help.
|
|
82
|
+
*
|
|
83
|
+
* If set, the fields sets the data of these entities in the model based to the selected values.
|
|
84
|
+
*/
|
|
85
|
+
outParameters: {
|
|
86
|
+
type: "sap.ui.mdc.field.OutParameter",
|
|
87
|
+
group: "Data",
|
|
88
|
+
multiple: true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
events: {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
ListContent.prototype.init = function() {
|
|
97
|
+
|
|
98
|
+
Content.prototype.init.apply(this, arguments);
|
|
99
|
+
|
|
100
|
+
this._oObserver.observe(this, {
|
|
101
|
+
properties: ["caseSensitive"]
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
ListContent.prototype._observeChanges = function(oChanges) {
|
|
107
|
+
|
|
108
|
+
if (oChanges.name === "caseSensitive") {
|
|
109
|
+
this._handleFilterValueUpdate(oChanges);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
Content.prototype._observeChanges.apply(this, arguments);
|
|
113
|
+
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
ListContent.prototype.getCount = function (aConditions) {
|
|
117
|
+
var iCount = 0;
|
|
118
|
+
|
|
119
|
+
for (var i = 0; i < aConditions.length; i++) {
|
|
120
|
+
var oCondition = aConditions[i];
|
|
121
|
+
if (oCondition.isEmpty !== true && oCondition.validated === ConditionValidated.Validated) {
|
|
122
|
+
iCount++;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return iCount;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
// has navigate method ?
|
|
130
|
+
|
|
131
|
+
return ListContent;
|
|
132
|
+
|
|
133
|
+
});
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 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/ui/mdc/valuehelp/content/FixedList",
|
|
9
|
+
"sap/ui/mdc/util/loadModules",
|
|
10
|
+
"sap/ui/model/ParseException"
|
|
11
|
+
], function(
|
|
12
|
+
FixedList,
|
|
13
|
+
loadModules,
|
|
14
|
+
ParseException
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Constructor for a new <code>Bool</code> content.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
22
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
23
|
+
* @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element to provide a value help for boolean fields.
|
|
24
|
+
* @extends sap.ui.mdc.valuehelp.content.FixedList
|
|
25
|
+
* @version 1.96.1
|
|
26
|
+
* @constructor
|
|
27
|
+
* @abstract
|
|
28
|
+
* @private
|
|
29
|
+
* @ui5-restricted sap.ui.mdc
|
|
30
|
+
* @since 1.95.0
|
|
31
|
+
* @alias sap.ui.mdc.valuehelp.content.Bool
|
|
32
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
33
|
+
*/
|
|
34
|
+
var Bool = FixedList.extend("sap.ui.mdc.valuehelp.content.Bool", /** @lends sap.ui.mdc.valuehelp.content.Bool.prototype */
|
|
35
|
+
{
|
|
36
|
+
metadata: {
|
|
37
|
+
library: "sap.ui.mdc",
|
|
38
|
+
interfaces: [
|
|
39
|
+
"sap.ui.mdc.valuehelp.ITypeaheadContent"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
Bool.prototype.init = function() {
|
|
45
|
+
|
|
46
|
+
FixedList.prototype.init.apply(this, arguments);
|
|
47
|
+
|
|
48
|
+
this.setUseFirstMatch(true); // as only 2 items
|
|
49
|
+
this.setUseAsValueHelp(true); // should be used as value help
|
|
50
|
+
this.setFilterList(false); // as only 2 items
|
|
51
|
+
this.setCaseSensitive(false); // as only 2 items
|
|
52
|
+
|
|
53
|
+
this._oObserver.observe(this, {
|
|
54
|
+
properties: ["config"]
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
Bool.prototype.exit = function() {
|
|
60
|
+
|
|
61
|
+
if (this._oModel) {
|
|
62
|
+
this._oModel.destroy();
|
|
63
|
+
this._oModel = undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
FixedList.prototype.exit.apply(this, arguments);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
Bool.prototype.getContent = function () {
|
|
70
|
+
return this._retrievePromise("boolContent", function () {
|
|
71
|
+
return loadModules([
|
|
72
|
+
"sap/ui/mdc/field/ListFieldHelpItem",
|
|
73
|
+
"sap/ui/model/json/JSONModel"
|
|
74
|
+
]).then(function (aModules) {
|
|
75
|
+
var ListFieldHelpItem = aModules[0];
|
|
76
|
+
var JSONModel = aModules[1];
|
|
77
|
+
this._oModel = new JSONModel({
|
|
78
|
+
"type": "",
|
|
79
|
+
"items": [
|
|
80
|
+
{
|
|
81
|
+
"key": true,
|
|
82
|
+
"text": "true"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"key": false,
|
|
86
|
+
"text": "false"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
_updateModel.call(this, this.getConfig());
|
|
91
|
+
|
|
92
|
+
var oItem = new ListFieldHelpItem(this.getId() + "-Item", {
|
|
93
|
+
key: {path: "$Bool>key"},
|
|
94
|
+
text: {path: "$Bool>text"}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
this.bindAggregation("items", {path: "$Bool>/items", template: oItem});
|
|
98
|
+
this.setModel(this._oModel, "$Bool");
|
|
99
|
+
|
|
100
|
+
return FixedList.prototype.getContent.apply(this, arguments);
|
|
101
|
+
}.bind(this));
|
|
102
|
+
}.bind(this));
|
|
103
|
+
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
Bool.prototype.getItemForValue = function (oConfig) {
|
|
107
|
+
|
|
108
|
+
return Promise.resolve().then(function () {
|
|
109
|
+
// don't need to create items for this, just use the type to check
|
|
110
|
+
var oGlobalConfig = this.getConfig();
|
|
111
|
+
var oType = oGlobalConfig && oGlobalConfig.dataType;
|
|
112
|
+
|
|
113
|
+
if (oType) {
|
|
114
|
+
if (oConfig.checkKey) {
|
|
115
|
+
if (oConfig.parsedValue === true || oConfig.parsedValue === false) {
|
|
116
|
+
return { key: oConfig.parsedValue, description: oType.formatValue(oConfig.parsedValue, "string") };
|
|
117
|
+
} else {
|
|
118
|
+
// as in bool case the description is comming from the type, search for description (first match) if parsing fails
|
|
119
|
+
oConfig.checkDescription = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (oConfig.checkDescription && oConfig.value) {
|
|
123
|
+
var sTrue = oType.formatValue(true, "string");
|
|
124
|
+
if (sTrue.toLowerCase().startsWith(oConfig.value.toLowerCase())) {
|
|
125
|
+
return { key: true, description: sTrue };
|
|
126
|
+
}
|
|
127
|
+
var sFalse = oType.formatValue(false, "string");
|
|
128
|
+
if (sFalse.toLowerCase().startsWith(oConfig.value.toLowerCase())) {
|
|
129
|
+
return { key: false, description: sFalse };
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
var sError = this._oResourceBundle.getText("valuehelp.VALUE_NOT_EXIST", [oConfig.value]);
|
|
133
|
+
var Exception = oConfig.exception || ParseException;
|
|
134
|
+
throw new Exception(sError);
|
|
135
|
+
} else {
|
|
136
|
+
throw new Error("Type missing");
|
|
137
|
+
}
|
|
138
|
+
}.bind(this));
|
|
139
|
+
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
Bool.prototype.shouldOpenOnClick = function() {
|
|
143
|
+
|
|
144
|
+
return false;
|
|
145
|
+
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
Bool.prototype._observeChanges = function(oChanges) {
|
|
149
|
+
|
|
150
|
+
if (oChanges.type === "property" && oChanges.name === "config") {
|
|
151
|
+
_updateModel.call(this, oChanges.current);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
FixedList.prototype._observeChanges.apply(this, arguments);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
function _updateModel(oConfig) {
|
|
158
|
+
if (this._oModel && oConfig) {
|
|
159
|
+
// use texts of used type
|
|
160
|
+
var oType = oConfig.dataType;
|
|
161
|
+
var oData = this._oModel.getData();
|
|
162
|
+
if (oType && oData["type"] !== oType.getMetadata().getName()) {
|
|
163
|
+
oData["type"] = oType.getMetadata().getName();
|
|
164
|
+
var aItems = oData["items"];
|
|
165
|
+
for (var i = 0; i < aItems.length; i++) {
|
|
166
|
+
var oItem = aItems[i];
|
|
167
|
+
oItem["text"] = oType.formatValue(oItem["key"], "string");
|
|
168
|
+
}
|
|
169
|
+
this._oModel.checkUpdate(true);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Adds some item to the aggregation <code>items</code>.
|
|
176
|
+
*
|
|
177
|
+
* <b>Note:</b> Do not add items to the <code>Bool</code> content. The items will be filled by itself
|
|
178
|
+
*
|
|
179
|
+
* @param {sap.ui.mdc.field.ListFieldHelpItem} oItem The item to add; if empty, nothing is inserted
|
|
180
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
181
|
+
* @private
|
|
182
|
+
* @ui5-restricted sap.fe
|
|
183
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
184
|
+
* @deprecated Not supported, the items are automatically set.
|
|
185
|
+
* @ui5-not-supported
|
|
186
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#addItem
|
|
187
|
+
* @function
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Inserts a item to the aggregation <code>items</code>.
|
|
192
|
+
*
|
|
193
|
+
* <b>Note:</b> Do not add items to the <code>Bool</code> content. The items will be filled by itself
|
|
194
|
+
*
|
|
195
|
+
* @param {sap.ui.mdc.field.ListFieldHelpItem} oItem The item to add; if empty, nothing is inserted
|
|
196
|
+
* @param {int} iIndex The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
|
|
197
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
198
|
+
* @private
|
|
199
|
+
* @ui5-restricted sap.fe
|
|
200
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
201
|
+
* @deprecated Not supported, the items are automatically set.
|
|
202
|
+
* @ui5-not-supported
|
|
203
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#insertItem
|
|
204
|
+
* @function
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Destroys all the items in the aggregation <code>items</code>.
|
|
209
|
+
*
|
|
210
|
+
* <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by itself
|
|
211
|
+
*
|
|
212
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
213
|
+
* @private
|
|
214
|
+
* @ui5-restricted sap.fe
|
|
215
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
216
|
+
* @deprecated Not supported, the items are automatically set.
|
|
217
|
+
* @ui5-not-supported
|
|
218
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#destroyItems
|
|
219
|
+
* @function
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Removes all the controls from the aggregation <code>items</code>.
|
|
224
|
+
*
|
|
225
|
+
* <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by itself
|
|
226
|
+
*
|
|
227
|
+
* @returns {sap.ui.mdc.field.ListFieldHelpItem[]} An array of the removed elements (might be empty)
|
|
228
|
+
* @private
|
|
229
|
+
* @ui5-restricted sap.fe
|
|
230
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
231
|
+
* @deprecated Not supported, the items are automatically set.
|
|
232
|
+
* @ui5-not-supported
|
|
233
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#removeAllItems
|
|
234
|
+
* @function
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Removes a item from the aggregation <code>items</code>.
|
|
239
|
+
*
|
|
240
|
+
* <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by itself
|
|
241
|
+
*
|
|
242
|
+
* @param {int|string|sap.ui.mdc.field.ListFieldHelpItem} vItem The item to remove or its index or id
|
|
243
|
+
* @returns {sap.ui.mdc.field.ListFieldHelpItem} The removed item or null
|
|
244
|
+
* @private
|
|
245
|
+
* @ui5-restricted sap.fe
|
|
246
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
247
|
+
* @deprecated Not supported, the items are automatically set.
|
|
248
|
+
* @ui5-not-supported
|
|
249
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#removeItem
|
|
250
|
+
* @function
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Sets a new value for property <code>useFirstMatch</code>.
|
|
255
|
+
*
|
|
256
|
+
* <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
|
|
257
|
+
*
|
|
258
|
+
* @param {boolean} [bUseFirstMatch=true] New value for property <code>useFirstMatch</code>
|
|
259
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
260
|
+
* @private
|
|
261
|
+
* @ui5-restricted sap.fe
|
|
262
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
263
|
+
* @deprecated Not supported, the property is automatically set.
|
|
264
|
+
* @ui5-not-supported
|
|
265
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#setUseFirstMatch
|
|
266
|
+
* @function
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Sets a new value for property <code>useAsValueHelp</code>.
|
|
271
|
+
*
|
|
272
|
+
* <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
|
|
273
|
+
*
|
|
274
|
+
* @param {boolean} [bUseAsValueHelp=true] New value for property <code>useAsValueHelp</code>
|
|
275
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
276
|
+
* @private
|
|
277
|
+
* @ui5-restricted sap.fe
|
|
278
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
279
|
+
* @deprecated Not supported, the property is automatically set.
|
|
280
|
+
* @ui5-not-supported
|
|
281
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#setUseAsValueHelp
|
|
282
|
+
* @function
|
|
283
|
+
*/
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Sets a new value for property <code>filterList</code>.
|
|
287
|
+
*
|
|
288
|
+
* <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
|
|
289
|
+
*
|
|
290
|
+
* @param {boolean} [bFilterList=false] New value for property <code>filterList</code>
|
|
291
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
292
|
+
* @private
|
|
293
|
+
* @ui5-restricted sap.fe
|
|
294
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
295
|
+
* @deprecated Not supported, the property is automatically set.
|
|
296
|
+
* @ui5-not-supported
|
|
297
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#setFilterList
|
|
298
|
+
* @function
|
|
299
|
+
*/
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Sets a new value for property <code>caseSensitive</code>.
|
|
303
|
+
*
|
|
304
|
+
* <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
|
|
305
|
+
*
|
|
306
|
+
* @param {boolean} [bCaseSensitive=false] New value for property <code>caseSensitive</code>
|
|
307
|
+
* @returns {this} Reference to <code>this</code> to allow method chaining
|
|
308
|
+
* @private
|
|
309
|
+
* @ui5-restricted sap.fe
|
|
310
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
311
|
+
* @deprecated Not supported, the property is automatically set.
|
|
312
|
+
* @ui5-not-supported
|
|
313
|
+
* @name sap.ui.mdc.valuehelp.content.Bool#setCaseSensitive
|
|
314
|
+
* @function
|
|
315
|
+
*/
|
|
316
|
+
|
|
317
|
+
return Bool;
|
|
318
|
+
});
|