@openui5/sap.ui.mdc 1.94.0 → 1.95.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 +1 -6
- package/THIRDPARTY.txt +3 -9
- 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 +12 -5
- package/src/sap/ui/mdc/ChartNew.js +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +44 -29
- package/src/sap/ui/mdc/ValueHelp.js +1459 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +41 -0
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +233 -224
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.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 +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- 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 +61 -29
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- 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 +13 -2
- package/src/sap/ui/mdc/field/FieldBase.js +81 -35
- 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 +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/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 +1 -1
- 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 +1 -1
- 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/filterbar/FilterBarBase.js +17 -9
- 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/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +576 -4
- 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 +1 -1
- 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 +10 -3
- package/src/sap/ui/mdc/messagebundle_ar.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_bg.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ca.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_cy.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_de.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_et.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fr.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_hr.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_id.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +32 -25
- package/src/sap/ui/mdc/messagebundle_iw.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ja.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_lt.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ms.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_no.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_pl.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_pt.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_ru.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sl.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_th.properties +15 -8
- package/src/sap/ui/mdc/messagebundle_tr.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_vi.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +9 -2
- 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 +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +1 -1
- 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/panels/BasePanel.js +2 -2
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ListView.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +1 -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/BaseController.js +1 -1
- package/src/sap/ui/mdc/table/Column.js +20 -4
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +176 -4
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +51 -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/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +19 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +475 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +346 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +440 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +442 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +96 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +537 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +105 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +232 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +250 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +504 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +619 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +881 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -2
- 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 +239 -77
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -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,440 @@
|
|
|
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/core/Element',
|
|
9
|
+
'sap/ui/mdc/mixin/PromiseMixin',
|
|
10
|
+
'sap/ui/model/BindingMode',
|
|
11
|
+
'sap/ui/base/ManagedObjectObserver'
|
|
12
|
+
], function(
|
|
13
|
+
Element,
|
|
14
|
+
PromiseMixin,
|
|
15
|
+
BindingMode,
|
|
16
|
+
ManagedObjectObserver
|
|
17
|
+
) {
|
|
18
|
+
"use strict";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Constructor for a new <code>Container</code>.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
24
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
25
|
+
* @class Container for the <code>ValueHelp</code> element.
|
|
26
|
+
* @extends sap.ui.core.Element
|
|
27
|
+
* @version 1.95.0
|
|
28
|
+
* @constructor
|
|
29
|
+
* @abstract
|
|
30
|
+
* @private
|
|
31
|
+
* @ui5-restricted sap.ui.mdc
|
|
32
|
+
* @since 1.91.0
|
|
33
|
+
* @alias sap.ui.mdc.valuehelp.base.Container
|
|
34
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
35
|
+
*/
|
|
36
|
+
var Container = Element.extend("sap.ui.mdc.valuehelp.base.Container", /** @lends sap.ui.mdc.valuehelp.base.Container.prototype */
|
|
37
|
+
{
|
|
38
|
+
metadata: {
|
|
39
|
+
library: "sap.ui.mdc",
|
|
40
|
+
properties: {
|
|
41
|
+
/**
|
|
42
|
+
* Title text that appears in the dialog or tab header.
|
|
43
|
+
*/
|
|
44
|
+
title: {
|
|
45
|
+
type: "string",
|
|
46
|
+
group: "Appearance",
|
|
47
|
+
defaultValue: ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
aggregations: {
|
|
51
|
+
_container: {
|
|
52
|
+
type: "sap.ui.core.Element",
|
|
53
|
+
multiple: false,
|
|
54
|
+
visibility: "hidden"
|
|
55
|
+
},
|
|
56
|
+
content: {
|
|
57
|
+
type: "sap.ui.mdc.valuehelp.base.Content",
|
|
58
|
+
multiple: true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
events: {
|
|
62
|
+
select: {
|
|
63
|
+
parameters: {
|
|
64
|
+
type: { type: "sap.ui.mdc.enum.SelectType" },
|
|
65
|
+
conditions: { type: "object[]" }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
confirm: {
|
|
69
|
+
parameters: {
|
|
70
|
+
close: { type: "boolean" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
opened: {},
|
|
74
|
+
closed: {},
|
|
75
|
+
cancel: {},
|
|
76
|
+
requestDelegateContent: {
|
|
77
|
+
parameters: {
|
|
78
|
+
container: { type: "sap.ui.mdc.valuehelp.base.Container" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
requestSwitchToDialog: {},
|
|
82
|
+
navigated: {
|
|
83
|
+
parameters: {
|
|
84
|
+
bLeaveFocus: { type: "boolean" },
|
|
85
|
+
condition: { type: "object" },
|
|
86
|
+
value: { type: "string" },
|
|
87
|
+
key: { type: "string" },
|
|
88
|
+
itemId: { type: "string" }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
Container.prototype.init = function () {
|
|
96
|
+
this._oObserver = new ManagedObjectObserver(this._observeChanges.bind(this));
|
|
97
|
+
this._oObserver.observe(this, {
|
|
98
|
+
aggregations: ["content"]
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
Container.prototype._observeChanges = function (oChanges) {
|
|
103
|
+
if (oChanges.name === "content") {
|
|
104
|
+
var oContent = oChanges.child;
|
|
105
|
+
if (oChanges.mutation === "remove") {
|
|
106
|
+
oContent.unbindProperty("_filterValue");
|
|
107
|
+
oContent.unbindProperty("_conditions");
|
|
108
|
+
oContent.unbindProperty("_config");
|
|
109
|
+
oContent.detachConfirm(this._handleConfirmed, this);
|
|
110
|
+
oContent.detachCancel(this._handleCanceled, this);
|
|
111
|
+
oContent.detachSelect(this._handleSelect, this);
|
|
112
|
+
oContent.detachRequestDelegateContent(this._handleRequestDelegateContent, this);
|
|
113
|
+
|
|
114
|
+
if (oContent.detachNavigated) {
|
|
115
|
+
oContent.detachNavigated(this._handleNavigated, this);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (oContent.detachRequestSwitchToDialog) {
|
|
119
|
+
oContent.detachRequestSwitchToDialog(this._handleRequestSwitchToDialog, this);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
} else {
|
|
123
|
+
oContent.bindProperty("_filterValue", { path: "/filterValue", model: "$valueHelp", mode: BindingMode.OneWay}); // inherit from ValueHelp
|
|
124
|
+
var oBindingOptions = { path: "/conditions", model: "$valueHelp", mode: BindingMode.OneWay};
|
|
125
|
+
if (oContent._formatConditions) {
|
|
126
|
+
oBindingOptions.formatter = oContent._formatConditions.bind(oContent);
|
|
127
|
+
}
|
|
128
|
+
oContent.bindProperty("_conditions", oBindingOptions); // inherit from ValueHelp
|
|
129
|
+
oContent.bindProperty("_config", { path: "/_config", model: "$valueHelp", mode: BindingMode.OneWay}); // inherit from ValueHelp
|
|
130
|
+
|
|
131
|
+
oContent.attachConfirm(this._handleConfirmed, this);
|
|
132
|
+
oContent.attachCancel(this._handleCanceled, this);
|
|
133
|
+
oContent.attachSelect(this._handleSelect, this);
|
|
134
|
+
oContent.attachRequestDelegateContent(this._handleRequestDelegateContent, this);
|
|
135
|
+
|
|
136
|
+
if (oContent.attachNavigated) {
|
|
137
|
+
oContent.attachNavigated(this._handleNavigated, this);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (oContent.attachRequestSwitchToDialog) {
|
|
141
|
+
oContent.attachRequestSwitchToDialog(this._handleRequestSwitchToDialog, this);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
Container.prototype._handleNavigated = function (oEvent) {
|
|
148
|
+
this.fireNavigated(oEvent.mParameters);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
Container.prototype._handleRequestSwitchToDialog = function (oEvent) {
|
|
152
|
+
this.fireRequestSwitchToDialog({container: this});
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
Container.prototype._getContainer = function () {
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
Container.prototype._getControl = function () {
|
|
159
|
+
var oValueHelp = this.getParent();
|
|
160
|
+
return oValueHelp && oValueHelp.getControl();
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
Container.prototype.getMaxConditions = function() {
|
|
164
|
+
var oVHModel = this.getModel("$valueHelp");
|
|
165
|
+
return oVHModel && oVHModel.getObject("/_config/maxConditions");
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
Container.prototype._isSingleSelect = function() {
|
|
169
|
+
return this.getMaxConditions() === 1;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
Container.prototype.getDomRef = function() {
|
|
173
|
+
// need to be implemented by real container
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
Container.prototype.getUIArea = function() { // TODO: Ask Frank, if better way available
|
|
177
|
+
return null; // don't use UIArea of parent as rendered as Popover or Dialog
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
Container.prototype._getUIAreaForContent = function() { // to map UIArea of content to Popover or Dialog
|
|
181
|
+
return this.getUIArea();
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Opens the container
|
|
186
|
+
*
|
|
187
|
+
* @returns {Promise} This promise resolves after the container completely opened.
|
|
188
|
+
*
|
|
189
|
+
* @private
|
|
190
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
191
|
+
*/
|
|
192
|
+
Container.prototype.open = function (oValueHelpContentPromise) {
|
|
193
|
+
if (!this.isOpening()) {
|
|
194
|
+
var oOpenPromise = this._addPromise("open");
|
|
195
|
+
return Promise.all([this._getContainer(), oValueHelpContentPromise]).then(function (aResults) {
|
|
196
|
+
return this._placeContent(aResults[0]);
|
|
197
|
+
}.bind(this)).then(function(oContainer) {
|
|
198
|
+
if (!oOpenPromise.isCanceled()) {
|
|
199
|
+
this._open(oContainer);
|
|
200
|
+
}
|
|
201
|
+
return oOpenPromise;
|
|
202
|
+
}.bind(this));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return this._retrievePromise("open");
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Closes the container
|
|
210
|
+
*
|
|
211
|
+
* @returns {Promise} This promise resolves after the container completely closed.
|
|
212
|
+
*
|
|
213
|
+
* @private
|
|
214
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
215
|
+
*/
|
|
216
|
+
Container.prototype.close = function () {
|
|
217
|
+
var oPromise = this._retrievePromise("open");
|
|
218
|
+
if (oPromise) {
|
|
219
|
+
if (oPromise.isSettled()) {
|
|
220
|
+
this._close();
|
|
221
|
+
} else {
|
|
222
|
+
this._cancelPromise(oPromise);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
Container.prototype._placeContent = function (oContainer) {
|
|
228
|
+
return oContainer;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
Container.prototype._open = function (oContainer) {
|
|
232
|
+
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
Container.prototype._close = function () {
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
Container.prototype._handleOpened = function () {
|
|
239
|
+
this._resolvePromise("open");
|
|
240
|
+
this.fireOpened();
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
Container.prototype._handleClosed = function (oEvent) {
|
|
244
|
+
this._removePromise("open");
|
|
245
|
+
this.fireClosed();
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
Container.prototype._handleConfirmed = function (oEvent) {
|
|
249
|
+
this.fireConfirm();
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
Container.prototype._handleCanceled = function (oEvent) {
|
|
253
|
+
this.fireCancel();
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
Container.prototype._handleRequestDelegateContent = function (oEvent) {
|
|
257
|
+
this.fireRequestDelegateContent({container: this});
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
Container.prototype._handleSelect = function (oEvent) {
|
|
261
|
+
this.fireSelect({type: oEvent.getParameter("type"), conditions: oEvent.getParameter("conditions")});
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
Container.prototype.isOpen = function () {
|
|
265
|
+
var oPromise = this._retrievePromise("open");
|
|
266
|
+
return oPromise && oPromise.isSettled();
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
Container.prototype.isOpening = function () {
|
|
270
|
+
var oPromise = this._retrievePromise("open");
|
|
271
|
+
return oPromise && !oPromise.isCanceled() && !oPromise.isSettled();
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
Container.prototype.getItemForValue = function(oConfig) { // TODO only for TypeAhead container
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
Container.prototype.isValidationSupported = function(oConfig) { // TODO only for TypeAhead container
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
Container.prototype.navigate = function(iStep) { // pass through to content
|
|
282
|
+
return Promise.all([this._getContainer()]).then(function (aResults) {
|
|
283
|
+
return this._placeContent(aResults[0]);
|
|
284
|
+
}.bind(this)).then(function(oContainer) {
|
|
285
|
+
this._navigate(iStep);
|
|
286
|
+
}.bind(this));
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
Container.prototype._navigate = function(iStep) { // implemented by Popover
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* The focus visualization of the field help needs to be removed as the user starts typing into the field.
|
|
294
|
+
*
|
|
295
|
+
* @private
|
|
296
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
297
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
298
|
+
*/
|
|
299
|
+
Container.prototype.removeFocus = function() {
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
Container.prototype.isTypeahead = function () {
|
|
303
|
+
var oValueHelp = this.getParent();
|
|
304
|
+
return oValueHelp && oValueHelp.getTypeahead() === this;
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
Container.prototype.getValueHelpDelegate = function () {
|
|
308
|
+
var oValueHelp = this.getParent();
|
|
309
|
+
return oValueHelp && oValueHelp.getControlDelegate();
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
Container.prototype.awaitValueHelpDelegate = function () {
|
|
313
|
+
var oValueHelp = this.getParent();
|
|
314
|
+
return oValueHelp && oValueHelp.awaitControlDelegate();
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
Container.prototype.isValueHelpDelegateInitialized = function () {
|
|
318
|
+
var oValueHelp = this.getParent();
|
|
319
|
+
return oValueHelp && oValueHelp.bDelegateInitialized;
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* If the container is used for type-ahead it might be wanted that the same content should
|
|
324
|
+
* also be shown as valuehelp. If not, the field should not show a valuehelp icon.
|
|
325
|
+
*
|
|
326
|
+
* <b>Note</b> This function needs only to be implemented for <code>Container</code>
|
|
327
|
+
* implementing the <code>sap.ui.mdc.valuehelp.container.ITypeahead</code> interface.
|
|
328
|
+
*
|
|
329
|
+
* @returns {boolean} True if value help shall open as valuehelp
|
|
330
|
+
* @private
|
|
331
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
332
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
333
|
+
*/
|
|
334
|
+
Container.prototype.getUseAsValueHelp = function() {
|
|
335
|
+
return false;
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Return the value help icon that should be used for the field.
|
|
340
|
+
*
|
|
341
|
+
* @returns {string} Name of the icon
|
|
342
|
+
* @private
|
|
343
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
344
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
345
|
+
*/
|
|
346
|
+
Container.prototype.getValueHelpIcon = function() {
|
|
347
|
+
// not define icon property on Container as it might be dependent Popover/Dialog or used content
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
//TODO: define aria attribute object
|
|
351
|
+
/**
|
|
352
|
+
* Returns the aria attributes the field needs from the value help
|
|
353
|
+
*
|
|
354
|
+
* @param {int} iMaxConditions maximal conditions allowed (as FieldHelp might not be connected to a field)
|
|
355
|
+
* @returns {object} object with the aria-attibutes
|
|
356
|
+
* @private
|
|
357
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
358
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
359
|
+
*/
|
|
360
|
+
Container.prototype.getAriaAttributes = function(iMaxConditions) {
|
|
361
|
+
|
|
362
|
+
return { // return default values, but needs to be implemented by specific container
|
|
363
|
+
contentId: null,
|
|
364
|
+
ariaHasPopup: "listbox",
|
|
365
|
+
role: "combobox",
|
|
366
|
+
roleDescription: null
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
Container.prototype.getScrollDelegate = function(iMaxConditions) {
|
|
372
|
+
var oContainer = this.getAggregation("_container");
|
|
373
|
+
return oContainer && oContainer.getScrollDelegate && oContainer.getScrollDelegate();
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Determines if the value help should be opened when the user clicks into the connected control.
|
|
378
|
+
*
|
|
379
|
+
* @returns {boolean} If <code>true</code>, the value help should open when user clicks into the connected field control
|
|
380
|
+
* @private
|
|
381
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
382
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
383
|
+
*/
|
|
384
|
+
Container.prototype.shouldOpenOnClick = function() {
|
|
385
|
+
return false;
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Determines if the value help should be opened when the user used the arrow keys.
|
|
390
|
+
*
|
|
391
|
+
* @returns {boolean} If <code>true</code>, the value help should open when user used the arrow keys in the connected field control
|
|
392
|
+
* @private
|
|
393
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
394
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
395
|
+
*/
|
|
396
|
+
Container.prototype.shouldOpenOnNavigate = function() {
|
|
397
|
+
return false;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Determines if the focus is set in the value help or stays in the calling control.
|
|
403
|
+
*
|
|
404
|
+
* @returns {boolean} if true, focus goes to the value help, if false it stays in the calling control.
|
|
405
|
+
*
|
|
406
|
+
* @private
|
|
407
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
408
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
409
|
+
*/
|
|
410
|
+
Container.prototype.isFocusInHelp = function() {
|
|
411
|
+
|
|
412
|
+
return !this.isTypeahead();
|
|
413
|
+
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Determines if multiselection is active.
|
|
418
|
+
*
|
|
419
|
+
* @returns {boolean} if true, multi-selection is active.
|
|
420
|
+
*
|
|
421
|
+
* @private
|
|
422
|
+
* @ui5-restricted sap.ui.mdc.ValueHelp
|
|
423
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
424
|
+
*/
|
|
425
|
+
Container.prototype.isMultiSelect = function() {
|
|
426
|
+
|
|
427
|
+
return false;
|
|
428
|
+
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
Container.prototype.exit = function() {
|
|
432
|
+
this._oObserver.disconnect();
|
|
433
|
+
this._oObserver = undefined;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
PromiseMixin.call(Container.prototype);
|
|
437
|
+
|
|
438
|
+
return Container;
|
|
439
|
+
|
|
440
|
+
});
|