@openui5/sap.ui.mdc 1.95.0 → 1.96.3
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 +10 -5
- package/THIRDPARTY.txt +17 -8
- 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/Chart.js +140 -20
- package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
- package/src/sap/ui/mdc/ChartNew.js +83 -56
- package/src/sap/ui/mdc/Control.js +4 -3
- package/src/sap/ui/mdc/Element.js +4 -3
- 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 +2 -2
- 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 +81 -25
- package/src/sap/ui/mdc/ValueHelp.js +29 -14
- package/src/sap/ui/mdc/ValueHelpDelegate.js +110 -4
- 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 +5 -3
- 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/DrillStackHandlerNew.js +11 -9
- 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 +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/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 +19 -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/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/field/FieldBase.js +16 -9
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- 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 +1 -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/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 +5 -2
- 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/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/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/library.js +17 -7
- 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 +22 -4
- package/src/sap/ui/mdc/messagebundle_ar.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +21 -13
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_de.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_en.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_fr.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_hi.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_ja.properties +18 -10
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_no.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_pl.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_pt.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_th.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +11 -3
- 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/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +2 -2
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +212 -32
- 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 +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/ActionToolbarPanel.js +59 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +6 -6
- 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 +1 -2
- package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +1 -1
- 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/GroupController.js +5 -12
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
- package/src/sap/ui/mdc/table/Column.js +14 -5
- 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 +17 -86
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +12 -2
- 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/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +49 -26
- package/src/sap/ui/mdc/valuehelp/Popover.js +35 -19
- package/src/sap/ui/mdc/valuehelp/base/Container.js +221 -19
- package/src/sap/ui/mdc/valuehelp/base/Content.js +219 -33
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +50 -7
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +47 -27
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +38 -10
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +135 -49
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +64 -38
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +55 -27
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +25 -6
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +120 -85
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -1
- 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/p13n/Actions.js +163 -17
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -0
|
@@ -15,6 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
'sap/ui/model/FilterProcessor',
|
|
16
16
|
'sap/ui/mdc/util/Common',
|
|
17
17
|
'sap/base/strings/formatMessage',
|
|
18
|
+
'sap/base/util/merge',
|
|
18
19
|
'sap/ui/mdc/enum/SelectType',
|
|
19
20
|
'sap/base/Log'
|
|
20
21
|
], function(
|
|
@@ -28,6 +29,7 @@ sap.ui.define([
|
|
|
28
29
|
FilterProcessor,
|
|
29
30
|
Common,
|
|
30
31
|
formatMessage,
|
|
32
|
+
merge,
|
|
31
33
|
SelectType,
|
|
32
34
|
Log
|
|
33
35
|
) {
|
|
@@ -36,6 +38,22 @@ sap.ui.define([
|
|
|
36
38
|
var ListMode = library.ListMode;
|
|
37
39
|
var Sticky = library.Sticky;
|
|
38
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Constructor for a new <code>MTable</code> content.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
45
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
46
|
+
* @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element using a sap.m.Table.
|
|
47
|
+
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
48
|
+
* @version 1.96.3
|
|
49
|
+
* @constructor
|
|
50
|
+
* @abstract
|
|
51
|
+
* @private
|
|
52
|
+
* @ui5-restricted sap.ui.mdc
|
|
53
|
+
* @since 1.95.0
|
|
54
|
+
* @alias sap.ui.mdc.valuehelp.content.MTable
|
|
55
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
56
|
+
*/
|
|
39
57
|
var MTable = FilterableListContent.extend("sap.ui.mdc.valuehelp.content.MTable", /** @lends sap.ui.mdc.valuehelp.content.MTable.prototype */
|
|
40
58
|
{
|
|
41
59
|
metadata: {
|
|
@@ -48,12 +66,18 @@ sap.ui.define([
|
|
|
48
66
|
|
|
49
67
|
},
|
|
50
68
|
aggregations: {
|
|
69
|
+
/**
|
|
70
|
+
* Table to be used in value help
|
|
71
|
+
*/
|
|
51
72
|
table: {
|
|
52
73
|
type: "sap.m.Table",
|
|
53
74
|
multiple: false
|
|
54
75
|
}
|
|
55
76
|
},
|
|
56
77
|
events: {
|
|
78
|
+
/**
|
|
79
|
+
* This event is fired if the content of the table is updated
|
|
80
|
+
*/
|
|
57
81
|
contentUpdated: {} // TODO: Better way to solve missing popover maxheight? Part of ITypeahead? Or is this explicitly for IPopoverContent?
|
|
58
82
|
},
|
|
59
83
|
defaultAggregation: "table"
|
|
@@ -85,13 +109,13 @@ sap.ui.define([
|
|
|
85
109
|
|
|
86
110
|
function _updateSelection () {
|
|
87
111
|
if (this._oTable) {
|
|
88
|
-
// var aSelectedIds = this.
|
|
112
|
+
// var aSelectedIds = this.getConditions().filter(function (oCondition) {
|
|
89
113
|
// return oCondition.operator === "EQ";
|
|
90
114
|
// }).map(function (oCondition) {
|
|
91
115
|
// return oCondition.values[0];
|
|
92
116
|
// });
|
|
93
117
|
var aItems = this._oTable.getItems();
|
|
94
|
-
var aConditions = this.
|
|
118
|
+
var aConditions = this.getConditions();
|
|
95
119
|
|
|
96
120
|
for (var iId in aItems) {
|
|
97
121
|
var oItem = aItems[iId];
|
|
@@ -115,7 +139,9 @@ sap.ui.define([
|
|
|
115
139
|
|
|
116
140
|
if ((!oListBinding || !bValueHelpDelegateInitialized) && (this.isContainerOpening() || this.isTypeahead())) {
|
|
117
141
|
Promise.all([this._retrievePromise("listBinding"), this._awaitValueHelpDelegate()]).then(function () {
|
|
118
|
-
this.
|
|
142
|
+
if (!this.bIsDestroyed) {
|
|
143
|
+
this.applyFilters(sFieldSearch);
|
|
144
|
+
}
|
|
119
145
|
}.bind(this));
|
|
120
146
|
return;
|
|
121
147
|
}
|
|
@@ -125,11 +151,10 @@ sap.ui.define([
|
|
|
125
151
|
}
|
|
126
152
|
|
|
127
153
|
var oDelegate = this._getValueHelpDelegate();
|
|
128
|
-
var
|
|
129
|
-
var oDelegatePayload = oValueHelpModel && oValueHelpModel.getObject("/delegate").payload;
|
|
154
|
+
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
130
155
|
|
|
131
156
|
var oFilterBar = this._getPriorityFilterBar();
|
|
132
|
-
var oConditions = oFilterBar ? oFilterBar.getInternalConditions() : this.getProperty("
|
|
157
|
+
var oConditions = oFilterBar ? oFilterBar.getInternalConditions() : this.getProperty("inConditions"); // use InParameter if no FilterBar
|
|
133
158
|
var oConditionTypes = oConditions && this._getTypesForConditions(oConditions);
|
|
134
159
|
var oFilter = oConditions && FilterConverter.createFilters( oConditions, oConditionTypes, undefined, this.getCaseSensitive());
|
|
135
160
|
var aFilters = oFilter && [oFilter];
|
|
@@ -181,8 +206,6 @@ sap.ui.define([
|
|
|
181
206
|
var oParams = oEvent.getParameters();
|
|
182
207
|
var aListItems = oParams.listItems || oParams.listItem && [oParams.listItem];
|
|
183
208
|
var aConditions = aListItems.map(function (oItem) {
|
|
184
|
-
// var sKey = _getListItemKey.call(this, oItem);
|
|
185
|
-
// return sKey && this._createCondition(sKey);
|
|
186
209
|
var oValues = this._getItemFromContext(oItem.getBindingContext());
|
|
187
210
|
return oValues && this._createCondition(oValues.key, oValues.description, oValues.inParameters, oValues.outParameters);
|
|
188
211
|
}.bind(this));
|
|
@@ -195,7 +218,6 @@ sap.ui.define([
|
|
|
195
218
|
|
|
196
219
|
MTable.prototype._handleItemPress = function (oEvent) {
|
|
197
220
|
var oItem = oEvent.getParameter("listItem");
|
|
198
|
-
// var oKey = _getListItemKey.call(this, oItem);
|
|
199
221
|
var oValues = this._getItemFromContext(oItem.getBindingContext());
|
|
200
222
|
var bIsSingleSelect = this._isSingleSelect();
|
|
201
223
|
var bSelected = bIsSingleSelect ? true : !oItem.getSelected();
|
|
@@ -205,7 +227,6 @@ sap.ui.define([
|
|
|
205
227
|
oItem.setSelected(bSelected);
|
|
206
228
|
sSelectType = bSelected ? SelectType.Add : SelectType.Remove;
|
|
207
229
|
}
|
|
208
|
-
// var oCondition = this._createCondition(oKey);
|
|
209
230
|
var oCondition = this._createCondition(oValues.key, oValues.description, oValues.inParameters, oValues.outParameters);
|
|
210
231
|
this.fireSelect({type: sSelectType, conditions: [oCondition]});
|
|
211
232
|
if (this.isTypeahead()) {
|
|
@@ -218,12 +239,6 @@ sap.ui.define([
|
|
|
218
239
|
this.fireContentUpdated();
|
|
219
240
|
};
|
|
220
241
|
|
|
221
|
-
MTable.prototype.getContentHeight = function () { // Part of iTypeAhead? iPopover? Better solution for popover height?
|
|
222
|
-
var oTable = this._getTable();
|
|
223
|
-
var oDomRef = oTable && oTable.getDomRef();
|
|
224
|
-
return oDomRef && Math.round(oDomRef.getBoundingClientRect().height);
|
|
225
|
-
};
|
|
226
|
-
|
|
227
242
|
MTable.prototype._getTable = function () {
|
|
228
243
|
return this._oTable;
|
|
229
244
|
};
|
|
@@ -261,23 +276,26 @@ sap.ui.define([
|
|
|
261
276
|
"sap/ui/layout/FixFlex",
|
|
262
277
|
"sap/m/VBox",
|
|
263
278
|
"sap/m/Panel",
|
|
264
|
-
"sap/m/ScrollContainer"
|
|
279
|
+
"sap/m/ScrollContainer",
|
|
280
|
+
"sap/ui/model/resource/ResourceModel"
|
|
265
281
|
]).then(function(aModules) {
|
|
266
282
|
|
|
267
283
|
var FixFlex = aModules[0];
|
|
268
284
|
var VBox = aModules[1];
|
|
269
285
|
var Panel = aModules[2];
|
|
270
286
|
var ScrollContainer = aModules[3];
|
|
287
|
+
var ResourceModel = aModules[4];
|
|
271
288
|
|
|
272
289
|
if (!this._oContentLayout) {
|
|
273
290
|
|
|
274
|
-
this._oFilterBarVBox = new VBox(this.getId() + "-FilterBarBox"
|
|
291
|
+
this._oFilterBarVBox = new VBox(this.getId() + "-FilterBarBox");
|
|
275
292
|
this._oFilterBarVBox.addStyleClass("sapMdcValueHelpPanelFilterbar");
|
|
276
293
|
this._oFilterBarVBox._oWrapper = this;
|
|
277
294
|
this._oFilterBarVBox.getItems = function () {
|
|
278
295
|
return [this._oWrapper._getPriorityFilterBar.call(this._oWrapper)];
|
|
279
296
|
};
|
|
280
297
|
|
|
298
|
+
this.setModel(new ResourceModel({ bundleName: "sap/ui/mdc/messagebundle", async: false }), "$i18n");
|
|
281
299
|
var _formatTableTitle = function (sText) {
|
|
282
300
|
var iItems = 0; //TODO from where do we get the count
|
|
283
301
|
if (iItems === 0) {
|
|
@@ -310,7 +328,7 @@ sap.ui.define([
|
|
|
310
328
|
this._oTablePanel.addContent(this._oScrollContainer);
|
|
311
329
|
}
|
|
312
330
|
|
|
313
|
-
this.setAggregation("
|
|
331
|
+
this.setAggregation("displayContent", this._oContentLayout);
|
|
314
332
|
|
|
315
333
|
var oFilterBar = this._getPriorityFilterBar();
|
|
316
334
|
if (!oFilterBar) {
|
|
@@ -325,32 +343,6 @@ sap.ui.define([
|
|
|
325
343
|
return this._oTable;
|
|
326
344
|
};
|
|
327
345
|
|
|
328
|
-
MTable.prototype.getFooterContent = function () {
|
|
329
|
-
return this._retrievePromise("footer", function () {
|
|
330
|
-
return this._retrievePromise("listBinding").then(function (oListBinding) {
|
|
331
|
-
var oBindingInfo = this._getListBindingInfo();
|
|
332
|
-
if (oBindingInfo && oBindingInfo.length) {
|
|
333
|
-
return loadModules(["sap/m/Button", "sap/m/Toolbar", "sap/m/ToolbarSpacer"]).then(function (aModules) {
|
|
334
|
-
var Button = aModules[0];
|
|
335
|
-
var Toolbar = aModules[1];
|
|
336
|
-
var ToolbarSpacer = aModules[2];
|
|
337
|
-
var oShowAllItemsButton = new Button(this.getId() + "-showAllItems", {
|
|
338
|
-
text: this._oMResourceBundle.getText("INPUT_SUGGESTIONS_SHOW_ALL"),
|
|
339
|
-
press: function () {
|
|
340
|
-
this.fireRequestSwitchToDialog();
|
|
341
|
-
}.bind(this)
|
|
342
|
-
});
|
|
343
|
-
var aToolbarContent = [new ToolbarSpacer(this.getId() + "-Spacer")].concat(oShowAllItemsButton);
|
|
344
|
-
var oFooter = new Toolbar(this.getId() + "-TB", {
|
|
345
|
-
content: aToolbarContent
|
|
346
|
-
});
|
|
347
|
-
return oFooter;
|
|
348
|
-
}.bind(this));
|
|
349
|
-
}
|
|
350
|
-
}.bind(this));
|
|
351
|
-
}.bind(this));
|
|
352
|
-
};
|
|
353
|
-
|
|
354
346
|
MTable.prototype.getItemForValue = function (oConfig) {
|
|
355
347
|
|
|
356
348
|
if (!oConfig.checkKey && oConfig.parsedValue && !oConfig.checkDescription) {
|
|
@@ -365,10 +357,10 @@ sap.ui.define([
|
|
|
365
357
|
*/
|
|
366
358
|
oConfig.caseSensitive = oConfig.caseSensitive || this.getCaseSensitive();
|
|
367
359
|
|
|
368
|
-
return _checkListBindingPending.call(this).then(function(
|
|
360
|
+
return _checkListBindingPending.call(this).then(function(bPending) {
|
|
369
361
|
var oResult;
|
|
370
362
|
|
|
371
|
-
if (
|
|
363
|
+
if (!bPending) {
|
|
372
364
|
var oTable = this.getTable();
|
|
373
365
|
oResult = _filterItems.call(this, oConfig, oTable.getItems());
|
|
374
366
|
}
|
|
@@ -385,19 +377,22 @@ sap.ui.define([
|
|
|
385
377
|
function _checkListBindingPending() {
|
|
386
378
|
return this._retrievePromise("listBinding").then(function (oListBinding) {
|
|
387
379
|
var oDelegate = this._getValueHelpDelegate();
|
|
388
|
-
var
|
|
389
|
-
var oDelegatePayload = oValueHelpModel && oValueHelpModel.getObject("/delegate").payload;
|
|
380
|
+
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
390
381
|
var oListBindingInfo = this._getListBindingInfo();
|
|
391
382
|
if (oListBinding && oDelegate){
|
|
392
383
|
return oDelegate.checkListBindingPending(oDelegatePayload, oListBinding, oListBindingInfo);
|
|
393
384
|
} else {
|
|
394
|
-
return
|
|
385
|
+
return true;
|
|
395
386
|
}
|
|
396
387
|
}.bind(this));
|
|
397
388
|
}
|
|
398
389
|
|
|
399
390
|
function _filterItems(oConfig, aItems) {
|
|
400
391
|
|
|
392
|
+
if (aItems.length === 0) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
|
|
401
396
|
var aFields = [];
|
|
402
397
|
|
|
403
398
|
if (oConfig.checkKey && oConfig.hasOwnProperty("parsedValue")) { // empty string or false could be key too
|
|
@@ -438,7 +433,7 @@ sap.ui.define([
|
|
|
438
433
|
if (!oConfig.inParameters.aFilters) {
|
|
439
434
|
aInParameters.push(oConfig.inParameters.sPath);
|
|
440
435
|
} else {
|
|
441
|
-
for (
|
|
436
|
+
for (i = 0; i < oConfig.inParameters.aFilters.length; i++) {
|
|
442
437
|
if (aInParameters.indexOf(oConfig.inParameters.aFilters[i].sPath) < 0) {
|
|
443
438
|
aInParameters.push(oConfig.inParameters.aFilters[i].sPath);
|
|
444
439
|
}
|
|
@@ -458,7 +453,9 @@ sap.ui.define([
|
|
|
458
453
|
} else if (aFilteredItems.length > 1) {
|
|
459
454
|
if (!oConfig.caseSensitive) {
|
|
460
455
|
// try with case sensitive search
|
|
461
|
-
|
|
456
|
+
var oNewConfig = merge({}, oConfig);
|
|
457
|
+
oNewConfig.caseSensitive = true;
|
|
458
|
+
return _filterItems.call(this, oNewConfig, aItems);
|
|
462
459
|
}
|
|
463
460
|
throw _createException.call(this, oConfig.exception, true, aFields[0].value);
|
|
464
461
|
}
|
|
@@ -497,8 +494,7 @@ sap.ui.define([
|
|
|
497
494
|
var sPath = oListBinding && oListBinding.getPath();
|
|
498
495
|
|
|
499
496
|
var oDelegate = this._getValueHelpDelegate();
|
|
500
|
-
var
|
|
501
|
-
var oDelegatePayload = oValueHelpModel && oValueHelpModel.getObject("/delegate").payload;
|
|
497
|
+
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
502
498
|
|
|
503
499
|
var sPromiseKey = ["loadItemForValue", sPath, sKeyPath, oConfig.parsedValue || oConfig.value].join("_");
|
|
504
500
|
|
|
@@ -516,11 +512,21 @@ sap.ui.define([
|
|
|
516
512
|
var oFilter = aFilters.length > 1 ? new Filter({filters: aFilters, and: false}) : aFilters[0];
|
|
517
513
|
aFilters = [oFilter];
|
|
518
514
|
|
|
515
|
+
var aInParameters;
|
|
519
516
|
if (oConfig.inParameters) {
|
|
520
517
|
// use in-parameters as additional filters
|
|
521
518
|
aFilters.push(oConfig.inParameters);
|
|
519
|
+
aInParameters = []; // TODO: maybe provide paths from outside? No need to analyze Filters backwards
|
|
520
|
+
if (!oConfig.inParameters.aFilters) {
|
|
521
|
+
aInParameters.push(oConfig.inParameters.sPath);
|
|
522
|
+
} else {
|
|
523
|
+
for (var i = 0; i < oConfig.inParameters.aFilters.length; i++) {
|
|
524
|
+
if (aInParameters.indexOf(oConfig.inParameters.aFilters[i].sPath) < 0) {
|
|
525
|
+
aInParameters.push(oConfig.inParameters.aFilters[i].sPath);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
522
529
|
}
|
|
523
|
-
|
|
524
530
|
// if (oConfig.oOutParameters) {
|
|
525
531
|
// // use out-parameters as additional filters (only if not already set by InParameter
|
|
526
532
|
// if (oConfig.oInParameters) {
|
|
@@ -556,7 +562,7 @@ sap.ui.define([
|
|
|
556
562
|
}, 0);
|
|
557
563
|
|
|
558
564
|
if (aContexts.length && (aContexts.length < 2 || bUseFirstMatch)) {
|
|
559
|
-
return this._getItemFromContext(aContexts[0], {keyPath: sKeyPath, descriptionPath: sDescriptionPath});
|
|
565
|
+
return this._getItemFromContext(aContexts[0], {keyPath: sKeyPath, descriptionPath: sDescriptionPath, inParameters: aInParameters});
|
|
560
566
|
} else if (oConfig.checkKey && oConfig.parsedValue === "" && aContexts.length === 0) {
|
|
561
567
|
// nothing found for empty key -> this is not an error
|
|
562
568
|
return null;
|
|
@@ -586,35 +592,13 @@ sap.ui.define([
|
|
|
586
592
|
return true;
|
|
587
593
|
};
|
|
588
594
|
|
|
589
|
-
MTable.prototype._isTableReady = function () {
|
|
590
|
-
var oTable = this._getTable();
|
|
591
|
-
var oListBinding = oTable && oTable.getBinding("items");
|
|
592
|
-
|
|
593
|
-
if (!oTable || !oListBinding) {
|
|
594
|
-
return false;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
if (oListBinding && (oListBinding.isSuspended() || oListBinding.getLength() === 0)) {
|
|
598
|
-
return false; // if no context exist, Table is not ready
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
return true;
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
|
|
605
595
|
MTable.prototype.navigate = function (iStep) {
|
|
606
596
|
|
|
607
597
|
var oListBinding = this._getListBinding();
|
|
608
598
|
|
|
609
|
-
if (!oListBinding) {
|
|
610
|
-
return
|
|
611
|
-
|
|
612
|
-
}.bind(this));
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
if (!oListBinding.getLength()) {
|
|
616
|
-
return _checkListBindingPending.call(this).then(function (bReady) {
|
|
617
|
-
if (bReady) {
|
|
599
|
+
if (!oListBinding || !oListBinding.getLength()) {
|
|
600
|
+
return _checkListBindingPending.call(this).then(function (bPending) {
|
|
601
|
+
if (!bPending && oListBinding.getLength() !== 0) { // if no items - no navigation is possible
|
|
618
602
|
return this.navigate(iStep);
|
|
619
603
|
}
|
|
620
604
|
return false;
|
|
@@ -665,6 +649,19 @@ sap.ui.define([
|
|
|
665
649
|
iSelectedIndex--;
|
|
666
650
|
}
|
|
667
651
|
}
|
|
652
|
+
if (iSelectedIndex < 0 || iSelectedIndex > iItems - 1) {
|
|
653
|
+
// find last not groupable item
|
|
654
|
+
bSearchForNext = !bSearchForNext;
|
|
655
|
+
bLeaveFocus = iSelectedIndex < 0;
|
|
656
|
+
iSelectedIndex = iSelectedIndex < 0 ? 0 : iItems - 1;
|
|
657
|
+
while (aItems[iSelectedIndex] && aItems[iSelectedIndex].isA("sap.m.GroupHeaderListItem")) { // ignore group headers
|
|
658
|
+
if (bSearchForNext) {
|
|
659
|
+
iSelectedIndex++;
|
|
660
|
+
} else {
|
|
661
|
+
iSelectedIndex--;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
668
665
|
|
|
669
666
|
var oItem = aItems[iSelectedIndex];
|
|
670
667
|
if (oItem) {
|
|
@@ -674,7 +671,7 @@ sap.ui.define([
|
|
|
674
671
|
|
|
675
672
|
var oValues = this._getItemFromContext(oItem.getBindingContext());
|
|
676
673
|
oCondition = oValues && this._createCondition(oValues.key, oValues.description, oValues.inParameters, oValues.outParameters);
|
|
677
|
-
this.setProperty("
|
|
674
|
+
this.setProperty("conditions", [oCondition], true);
|
|
678
675
|
|
|
679
676
|
if (this._bVisible) {
|
|
680
677
|
this._handleScrolling(oItem);
|
|
@@ -728,6 +725,43 @@ sap.ui.define([
|
|
|
728
725
|
};
|
|
729
726
|
};
|
|
730
727
|
|
|
728
|
+
MTable.prototype.getContainerConfig = function () {
|
|
729
|
+
return {
|
|
730
|
+
'sap.ui.mdc.valuehelp.Popover': {
|
|
731
|
+
getContentHeight: function () {
|
|
732
|
+
var oTable = this._getTable();
|
|
733
|
+
var oDomRef = oTable && oTable.getDomRef();
|
|
734
|
+
return oDomRef && Math.round(oDomRef.getBoundingClientRect().height);
|
|
735
|
+
}.bind(this),
|
|
736
|
+
getFooter: function () {
|
|
737
|
+
return this._retrievePromise("footer", function () {
|
|
738
|
+
return this._retrievePromise("listBinding").then(function (oListBinding) {
|
|
739
|
+
var oBindingInfo = this._getListBindingInfo();
|
|
740
|
+
if (oBindingInfo && oBindingInfo.length) {
|
|
741
|
+
return loadModules(["sap/m/Button", "sap/m/Toolbar", "sap/m/ToolbarSpacer"]).then(function (aModules) {
|
|
742
|
+
var Button = aModules[0];
|
|
743
|
+
var Toolbar = aModules[1];
|
|
744
|
+
var ToolbarSpacer = aModules[2];
|
|
745
|
+
var oShowAllItemsButton = new Button(this.getId() + "-showAllItems", {
|
|
746
|
+
text: this._oMResourceBundle.getText("INPUT_SUGGESTIONS_SHOW_ALL"),
|
|
747
|
+
press: function () {
|
|
748
|
+
this.fireRequestSwitchToDialog();
|
|
749
|
+
}.bind(this)
|
|
750
|
+
});
|
|
751
|
+
var aToolbarContent = [new ToolbarSpacer(this.getId() + "-Spacer")].concat(oShowAllItemsButton);
|
|
752
|
+
var oFooter = new Toolbar(this.getId() + "-TB", {
|
|
753
|
+
content: aToolbarContent
|
|
754
|
+
});
|
|
755
|
+
return oFooter;
|
|
756
|
+
}.bind(this));
|
|
757
|
+
}
|
|
758
|
+
}.bind(this));
|
|
759
|
+
}.bind(this));
|
|
760
|
+
}.bind(this)
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
|
|
731
765
|
function _adjustTable () {
|
|
732
766
|
if (this._oTable && this.getParent()) {
|
|
733
767
|
|
|
@@ -756,7 +790,7 @@ sap.ui.define([
|
|
|
756
790
|
};
|
|
757
791
|
|
|
758
792
|
var _handleSearch = function () {
|
|
759
|
-
return this.applyFilters(this.
|
|
793
|
+
return this.applyFilters(this.getFilterValue());
|
|
760
794
|
};
|
|
761
795
|
|
|
762
796
|
MTable.prototype._observeChanges = function (oChanges) {
|
|
@@ -776,7 +810,7 @@ sap.ui.define([
|
|
|
776
810
|
|
|
777
811
|
if (oChanges.name === "filterBar") {
|
|
778
812
|
oFilterBar = oChanges.child;
|
|
779
|
-
oDefaultFilterBar = this.
|
|
813
|
+
oDefaultFilterBar = this.getAggregation("_defaultFilterBar");
|
|
780
814
|
if (oChanges.mutation === "insert") {
|
|
781
815
|
if (oDefaultFilterBar) {
|
|
782
816
|
oDefaultFilterBar.detachSearch(_handleSearch, this);
|
|
@@ -787,10 +821,11 @@ sap.ui.define([
|
|
|
787
821
|
oDefaultFilterBar.attachSearch(_handleSearch, this);
|
|
788
822
|
}
|
|
789
823
|
oFilterBar.detachSearch(_handleSearch, this);
|
|
824
|
+
this._createDefaultFilterBar(); // TODO: should this be part of FilterableListContent?
|
|
790
825
|
}
|
|
791
826
|
}
|
|
792
827
|
|
|
793
|
-
if (oChanges.name === "
|
|
828
|
+
if (oChanges.name === "config") {
|
|
794
829
|
_adjustTable.call(this);
|
|
795
830
|
}
|
|
796
831
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
sap.ui.define([
|
|
5
5
|
"sap/ui/test/Opa5",
|
|
6
6
|
"test-resources/sap/ui/mdc/testutils/opa/table/TestObjects",
|
|
7
|
-
"test-resources/sap/ui/mdc/testutils/opa/filterbar/TestObjects"
|
|
7
|
+
"test-resources/sap/ui/mdc/testutils/opa/filterbar/TestObjects",
|
|
8
|
+
"test-resources/sap/ui/mdc/testutils/opa/chartNew/TestObjects"
|
|
8
9
|
], function() {
|
|
9
10
|
"use strict";
|
|
10
11
|
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/actions/Action"
|
|
7
|
+
], function(Action) {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @class
|
|
12
|
+
* The <code>ContextMenu</code> action is used to simulate a right-click interaction
|
|
13
|
+
* with a control.
|
|
14
|
+
*
|
|
15
|
+
* @extends sap.ui.test.actions.Action
|
|
16
|
+
* @public
|
|
17
|
+
* @alias sap.ui.mdc.ActionToolbarTesting.pages.OpenContextMenu
|
|
18
|
+
* @author SAP SE
|
|
19
|
+
* @since 1.96
|
|
20
|
+
*/
|
|
21
|
+
var ContextMenu = Action.extend("sap.ui.mdc.ActionToolbarTesting.pages.OpenContextMenu", /** @lends sap.ui.mdc.ActionToolbarTesting.pages.OpenContextMenu.prototype */ {
|
|
22
|
+
metadata : {
|
|
23
|
+
publicMethods : [ "executeOn" ]
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Focuses on a given control and triggers a <code>contextmenu</code> event for it.
|
|
28
|
+
* Logs an error if the control is not visible (for example, if it has no DOM representation)
|
|
29
|
+
*
|
|
30
|
+
* @param {sap.ui.core.Control} oControl The control on which the <code>contextmenu</code> event is triggered
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
executeOn : function (oControl) {
|
|
34
|
+
var $ActionDomRef = this.$(oControl);
|
|
35
|
+
|
|
36
|
+
if ($ActionDomRef.length) {
|
|
37
|
+
this.oLogger.timestamp("sap.ui.comp.actions.ContextMenu");
|
|
38
|
+
this.oLogger.debug("Right-clicked the control " + oControl);
|
|
39
|
+
|
|
40
|
+
this._tryOrSimulateFocusin($ActionDomRef, oControl);
|
|
41
|
+
|
|
42
|
+
$ActionDomRef.triggerHandler("contextmenu");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return ContextMenu;
|
|
48
|
+
});
|