@openui5/sap.ui.mdc 1.100.0 → 1.102.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/.eslintrc.json +19 -0
- package/THIRDPARTY.txt +5 -5
- 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 +28 -46
- package/src/sap/ui/mdc/ChartDelegate.js +10 -0
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +9 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/LinkDelegate.js +7 -5
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +313 -424
- package/src/sap/ui/mdc/TableDelegate.js +92 -39
- package/src/sap/ui/mdc/ValueHelp.js +147 -634
- package/src/sap/ui/mdc/ValueHelpDelegate.js +159 -7
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +8 -3
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +11 -2
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +2 -0
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +14 -9
- package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
- 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 +14 -10
- package/src/sap/ui/mdc/condition/Operator.js +95 -15
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +5 -3
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +13 -1
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +1 -1
- package/src/sap/ui/mdc/enum/PropagationReason.js +43 -0
- package/src/sap/ui/mdc/enum/SelectType.js +3 -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 +59 -21
- package/src/sap/ui/mdc/field/ConditionsType.js +7 -2
- 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 +15 -19
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +3 -3
- package/src/sap/ui/mdc/field/FieldBase.js +29 -13
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- 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 +6 -4
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +3 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +7 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +28 -29
- 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/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +8 -0
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +43 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +90 -69
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +41 -11
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +37 -5
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +4 -41
- package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +2 -2
- 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 +21 -25
- package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
- 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/ContactDetailsRenderer.js +26 -0
- 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 +196 -24
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
- 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 +9 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +9 -7
- package/src/sap/ui/mdc/messagebundle_bg.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ca.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_cs.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_da.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_de.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_es.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_et.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fr.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hr.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hu.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_id.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_it.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_iw.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_ja.properties +8 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ko.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_lt.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_lv.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ms.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_nl.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_no.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_pl.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_pt.properties +13 -11
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ro.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ru.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -8
- package/src/sap/ui/mdc/messagebundle_sk.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_sl.properties +8 -6
- package/src/sap/ui/mdc/messagebundle_sv.properties +8 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -8
- package/src/sap/ui/mdc/messagebundle_uk.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_vi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +7 -5
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +4 -11
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +10 -4
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +18 -33
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +63 -3
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +76 -3
- package/src/sap/ui/mdc/p13n/Engine.js +154 -54
- package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -14
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +30 -51
- package/src/sap/ui/mdc/p13n/UIManager.js +6 -2
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -178
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +15 -12
- package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +73 -14
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +42 -18
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +1 -0
- package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
- package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +24 -6
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +2 -2
- package/src/sap/ui/mdc/table/Column.js +271 -132
- package/src/sap/ui/mdc/table/CreationRow.js +3 -1
- package/src/sap/ui/mdc/table/GridTableType.js +0 -5
- package/src/sap/ui/mdc/table/PropertyHelper.js +80 -158
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +64 -44
- package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +10 -22
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/menu/Item.js +78 -0
- package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
- package/src/sap/ui/mdc/themes/base/Chart.less +9 -0
- package/src/sap/ui/mdc/themes/base/InfoPanel.less +1 -0
- package/src/sap/ui/mdc/ui/Container.js +0 -0
- package/src/sap/ui/mdc/util/DateUtil.js +30 -5
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +3 -3
- package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
- package/src/sap/ui/mdc/util/PropertyHelper.js +5 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +291 -66
- package/src/sap/ui/mdc/valuehelp/Popover.js +4 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +71 -52
- package/src/sap/ui/mdc/valuehelp/base/Content.js +57 -24
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +193 -280
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +6 -6
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +65 -59
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +95 -182
- package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +48 -2
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +4 -5
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +55 -4
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +2 -2
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +53 -12
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +6 -6
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +103 -122
- package/test/sap/ui/mdc/testutils/opa/p13n/waitForSelectWithSelectedTextOnPanel.js +5 -2
- package/test/sap/ui/mdc/testutils/opa/table/Actions.js +70 -0
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +9 -7
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
- package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
- package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
- package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
|
@@ -8,33 +8,31 @@ sap.ui.define([
|
|
|
8
8
|
'sap/ui/mdc/util/loadModules',
|
|
9
9
|
'sap/ui/mdc/valuehelp/base/ListContent',
|
|
10
10
|
'sap/ui/mdc/condition/Condition',
|
|
11
|
-
'sap/ui/mdc/condition/FilterConverter',
|
|
12
11
|
'sap/ui/mdc/enum/ConditionValidated',
|
|
13
|
-
'sap/base/util/deepEqual',
|
|
14
12
|
'sap/ui/mdc/util/Common',
|
|
15
|
-
'sap/ui/
|
|
16
|
-
'sap/
|
|
13
|
+
'sap/ui/mdc/enum/PersistenceMode',
|
|
14
|
+
'sap/ui/mdc/p13n/Engine',
|
|
15
|
+
'sap/base/util/merge'
|
|
17
16
|
], function(
|
|
18
17
|
loadModules,
|
|
19
18
|
ListContent,
|
|
20
19
|
Condition,
|
|
21
|
-
FilterConverter,
|
|
22
20
|
ConditionValidated,
|
|
23
|
-
deepEqual,
|
|
24
21
|
Common,
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
PersistenceMode,
|
|
23
|
+
Engine,
|
|
24
|
+
merge
|
|
27
25
|
) {
|
|
28
26
|
"use strict";
|
|
29
27
|
|
|
30
28
|
/**
|
|
31
29
|
* Constructor for a new <code>FilterableListContent</code>.
|
|
32
30
|
*
|
|
33
|
-
* @param {string} [sId] ID for the new
|
|
34
|
-
* @param {object} [mSettings] Initial settings for the new
|
|
35
|
-
* @class Content for the
|
|
31
|
+
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
|
|
32
|
+
* @param {object} [mSettings] Initial settings for the new element
|
|
33
|
+
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
36
34
|
* @extends sap.ui.mdc.valuehelp.base.ListContent
|
|
37
|
-
* @version 1.
|
|
35
|
+
* @version 1.102.1
|
|
38
36
|
* @constructor
|
|
39
37
|
* @abstract
|
|
40
38
|
* @private
|
|
@@ -84,30 +82,17 @@ sap.ui.define([
|
|
|
84
82
|
type: "string",
|
|
85
83
|
defaultValue: ""
|
|
86
84
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
type: "object",
|
|
92
|
-
defaultValue: {},
|
|
93
|
-
byValue: true//,
|
|
94
|
-
//visibility: "hidden"
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* Internal property to allow to bind the paths used by OutParameters to content
|
|
98
|
-
*/
|
|
99
|
-
outParameterNames: {
|
|
100
|
-
type: "string[]",
|
|
101
|
-
defaultValue: [],
|
|
102
|
-
byValue: true//,
|
|
103
|
-
//visibility: "hidden"
|
|
85
|
+
|
|
86
|
+
group: {
|
|
87
|
+
type: "string",
|
|
88
|
+
defaultValue: ""
|
|
104
89
|
}
|
|
105
90
|
},
|
|
106
91
|
aggregations: {
|
|
107
92
|
/**
|
|
108
93
|
* Items used for collective search. If none assigned, no collective search is available.
|
|
109
94
|
*/
|
|
110
|
-
collectiveSearchItems: {
|
|
95
|
+
collectiveSearchItems: { // TODO: remove!
|
|
111
96
|
type: "sap.ui.core.Item",
|
|
112
97
|
multiple: true,
|
|
113
98
|
singularName : "collectiveSearchItem"
|
|
@@ -128,6 +113,12 @@ sap.ui.define([
|
|
|
128
113
|
visibility: "hidden"
|
|
129
114
|
}
|
|
130
115
|
},
|
|
116
|
+
associations: {
|
|
117
|
+
filters: {
|
|
118
|
+
type: "sap.ui.mdc.IFilter",
|
|
119
|
+
multiple: true
|
|
120
|
+
}
|
|
121
|
+
},
|
|
131
122
|
events: {
|
|
132
123
|
}
|
|
133
124
|
}
|
|
@@ -140,12 +131,11 @@ sap.ui.define([
|
|
|
140
131
|
this._oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
141
132
|
|
|
142
133
|
this._oObserver.observe(this, {
|
|
143
|
-
|
|
144
|
-
|
|
134
|
+
properties: ["filterFields"],
|
|
135
|
+
aggregations: ["_defaultFilterBar", "filterBar"]
|
|
145
136
|
});
|
|
146
137
|
|
|
147
|
-
|
|
148
|
-
this.bindProperty("outParameterNames", { path: "/_outParameters", model: "$valueHelp"}); // inherit from ValueHelp
|
|
138
|
+
Engine.getInstance().defaultProviderRegistry.attach(this, PersistenceMode.Transient);
|
|
149
139
|
};
|
|
150
140
|
|
|
151
141
|
FilterableListContent.prototype._handleFilterValueUpdate = function (oChanges) {
|
|
@@ -155,8 +145,14 @@ sap.ui.define([
|
|
|
155
145
|
}
|
|
156
146
|
};
|
|
157
147
|
|
|
158
|
-
FilterableListContent.prototype.
|
|
148
|
+
FilterableListContent.prototype._reduceIFilterConditions = function (oConditions) {
|
|
149
|
+
var oDelegate = this._getValueHelpDelegate();
|
|
150
|
+
var oPayload = this._getValueHelpDelegatePayload();
|
|
151
|
+
return oDelegate ? oDelegate.reduceIFilterConditions(oPayload, this, oConditions) : oConditions;
|
|
152
|
+
};
|
|
159
153
|
|
|
154
|
+
FilterableListContent.prototype.applyFilters = function (sSearch) {
|
|
155
|
+
this.applyFilterConditions();
|
|
160
156
|
};
|
|
161
157
|
|
|
162
158
|
|
|
@@ -200,65 +196,42 @@ sap.ui.define([
|
|
|
200
196
|
var sDescriptionPath = (oOptions && oOptions.descriptionPath) || this.getDescriptionPath();
|
|
201
197
|
var vKey;
|
|
202
198
|
var sDescription;
|
|
203
|
-
var sPath;
|
|
199
|
+
//var sPath;
|
|
204
200
|
|
|
205
201
|
if (!sKeyPath) {
|
|
206
202
|
throw new Error("KeyPath missing"); // as we cannot determine key without keyPath
|
|
207
203
|
}
|
|
208
204
|
|
|
209
|
-
var aInParameters = oOptions && oOptions.inParameters || [];
|
|
210
|
-
if (aInParameters.length === 0) {
|
|
211
|
-
for (sPath in this.getProperty("inConditions")) {
|
|
212
|
-
aInParameters.push(sPath);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
var aOutParameters = oOptions && oOptions.outParameters || this.getProperty("outParameterNames");
|
|
217
|
-
var oInParameters = aInParameters.length > 0 ? {} : null;
|
|
218
|
-
var oOutParameters = aOutParameters.length > 0 ? {} : null;
|
|
219
|
-
|
|
220
205
|
if (oBindingContext) {
|
|
221
206
|
vKey = sKeyPath ? oBindingContext.getProperty(sKeyPath) : undefined;
|
|
222
207
|
sDescription = sDescriptionPath ? oBindingContext.getProperty(sDescriptionPath) : undefined;
|
|
223
|
-
var i = 0;
|
|
224
|
-
for (i = 0; i < aInParameters.length; i++) {
|
|
225
|
-
sPath = aInParameters[i];
|
|
226
|
-
oInParameters[sPath] = oBindingContext.getProperty(sPath);
|
|
227
|
-
}
|
|
228
|
-
for (i = 0; i < aOutParameters.length; i++) {
|
|
229
|
-
sPath = aOutParameters[i];
|
|
230
|
-
oOutParameters[sPath] = oBindingContext.getProperty(sPath);
|
|
231
|
-
}
|
|
232
208
|
}
|
|
233
209
|
|
|
234
210
|
if (vKey === null || vKey === undefined) {
|
|
235
211
|
return false;
|
|
236
212
|
}
|
|
237
213
|
|
|
238
|
-
|
|
239
|
-
};
|
|
214
|
+
var oPayload = this._createConditionPayload([vKey, sDescription], oBindingContext);
|
|
240
215
|
|
|
241
|
-
FilterableListContent.prototype._isItemSelected = function (oItem, aConditions) {
|
|
242
216
|
|
|
243
|
-
|
|
244
|
-
|
|
217
|
+
return {key: vKey, description: sDescription, payload: oPayload};
|
|
218
|
+
};
|
|
245
219
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
//check for inParameters and outParameters
|
|
250
|
-
if (oCondition.inParameters && oItemData.inParameters && !deepEqual(oCondition.inParameters, oItemData.inParameters)) {
|
|
251
|
-
continue;
|
|
252
|
-
}
|
|
253
|
-
if (oCondition.outParameters && oItemData.outParameters && !deepEqual(oCondition.outParameters, oItemData.outParameters)) {
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
return true;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
220
|
+
FilterableListContent.prototype._createConditionPayload = function(aValues, vContext) {
|
|
221
|
+
var oConditionPayload;
|
|
222
|
+
var oDelegate = this._getValueHelpDelegate();
|
|
259
223
|
|
|
260
|
-
|
|
224
|
+
if (oDelegate) {
|
|
225
|
+
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
226
|
+
oConditionPayload = {};
|
|
227
|
+
oConditionPayload = oDelegate.createConditionPayload(oDelegatePayload, this, aValues, vContext);
|
|
228
|
+
}
|
|
229
|
+
return oConditionPayload;
|
|
230
|
+
};
|
|
261
231
|
|
|
232
|
+
FilterableListContent.prototype._isItemSelected = function (oItem, aConditions) {
|
|
233
|
+
var oDelegate = this._isValueHelpDelegateInitialized() && this._getValueHelpDelegate();
|
|
234
|
+
return oDelegate ? oDelegate.isFilterableListItemSelected(this._getValueHelpDelegatePayload(), this, oItem, aConditions) : false;
|
|
262
235
|
};
|
|
263
236
|
|
|
264
237
|
FilterableListContent.prototype._createDefaultFilterBar = function() {
|
|
@@ -270,92 +243,59 @@ sap.ui.define([
|
|
|
270
243
|
liveMode: false, // !oWrapper.isSuspended(), // if suspended, no live search
|
|
271
244
|
showGoButton: false
|
|
272
245
|
});
|
|
246
|
+
_setBasicSearch.call(this, oFilterBar);
|
|
273
247
|
this.setAggregation("_defaultFilterBar", oFilterBar, true);
|
|
274
248
|
return oFilterBar;
|
|
275
249
|
}.bind(this));
|
|
276
250
|
};
|
|
277
251
|
|
|
278
|
-
FilterableListContent.prototype.
|
|
279
|
-
|
|
280
|
-
_createCollectiveSearch.call(this, bInitializeKey).then(function(oCollectiveSearchSelect) {
|
|
281
|
-
var oFilterBar = this._getPriorityFilterBar();
|
|
282
|
-
if (oFilterBar.setCollectiveSearch) {
|
|
283
|
-
oFilterBar.setCollectiveSearch(oCollectiveSearchSelect);
|
|
284
|
-
}
|
|
285
|
-
}.bind(this));
|
|
252
|
+
FilterableListContent.prototype._handleSearch = function (oEvent) {
|
|
253
|
+
// to be implemented by MTable and MDCTable
|
|
286
254
|
};
|
|
287
255
|
|
|
288
|
-
function
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
256
|
+
function _setBasicSearch(oFilterBar) {
|
|
257
|
+
var oExistingBasicSearchField = oFilterBar.getBasicSearchField();
|
|
258
|
+
var sFilterFields = this.getFilterFields();
|
|
259
|
+
if (!oExistingBasicSearchField && sFilterFields) { // TODO: use isSearchSupported but here Delegate needs to be loaded
|
|
260
|
+
if (!this._oSearchField) {
|
|
261
|
+
return loadModules([
|
|
262
|
+
"sap/ui/mdc/FilterField"
|
|
263
|
+
]).then(function (aModules){
|
|
264
|
+
if (!oFilterBar.bIsDestroyed) {
|
|
265
|
+
var FilterField = aModules[0];
|
|
266
|
+
this._oSearchField = new FilterField(this.getId() + "-search", {
|
|
267
|
+
conditions: "{$filters>/conditions/" + sFilterFields + "}",
|
|
268
|
+
placeholder:"{$i18n>filterbar.SEARCH}",
|
|
269
|
+
label:"{$i18n>filterbar.SEARCH}", // TODO: do we want a label?
|
|
270
|
+
maxConditions: 1,
|
|
271
|
+
width: "50%"
|
|
272
|
+
});
|
|
273
|
+
this._oSearchField._bCreatedByValueHelp = true;
|
|
274
|
+
_setBasicSearch.call(this, oFilterBar);
|
|
275
|
+
}
|
|
276
|
+
}.bind(this));
|
|
277
|
+
}
|
|
278
|
+
oFilterBar.setBasicSearchField(this._oSearchField);
|
|
279
|
+
} else if (oExistingBasicSearchField) {
|
|
280
|
+
if (sFilterFields) {
|
|
281
|
+
oExistingBasicSearchField.setConditions([]); // initialize search field
|
|
282
|
+
} else if (oExistingBasicSearchField._bCreatedByValueHelp) {
|
|
283
|
+
oFilterBar.setBasicSearchField(); // remove to reuse on other FilterBar
|
|
307
284
|
}
|
|
308
|
-
}.bind(this));
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function _handleCollectiveSearchSelect(oEvent) {
|
|
313
|
-
|
|
314
|
-
var sKey = oEvent.getParameter("key");
|
|
315
|
-
MessageToast.show("ColSearch: " + sKey);
|
|
316
|
-
|
|
317
|
-
this.fireRequestDelegateContent();
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function _createCollectiveSearchSelect(CollectiveSearchSelect, Item) {
|
|
321
|
-
|
|
322
|
-
if (!this._oCollectiveSearchSelect) {
|
|
323
|
-
|
|
324
|
-
this._oObserver.observe(this, {
|
|
325
|
-
properties: ["filterFields"],
|
|
326
|
-
aggregations: ["collectiveSearchItems"]
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
this._oManagedObjectModel = new ManagedObjectModel(this);
|
|
330
|
-
this.setModel(this._oManagedObjectModel, "$contenthelp");
|
|
331
|
-
|
|
332
|
-
var oItemTemplate = new Item(this.getId() + "-collSearchItem", {
|
|
333
|
-
key: "{$contenthelp>key}",
|
|
334
|
-
text: "{$contenthelp>text}",
|
|
335
|
-
enabled: "{$contenthelp>enabled}",
|
|
336
|
-
textDirection: "{$contenthelp>textDirection}"
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
this._oCollectiveSearchSelect = new CollectiveSearchSelect(this.getId() + "-collSearch", {
|
|
340
|
-
title: "{$i18n>COL_SEARCH_SEL_TITLE}",
|
|
341
|
-
items: {path: "$contenthelp>/collectiveSearchItems", template: oItemTemplate},
|
|
342
|
-
select: _handleCollectiveSearchSelect.bind(this)
|
|
343
|
-
});
|
|
344
285
|
}
|
|
345
|
-
|
|
346
|
-
return this._oCollectiveSearchSelect;
|
|
347
|
-
|
|
348
286
|
}
|
|
349
287
|
|
|
350
288
|
FilterableListContent.prototype.onShow = function () {
|
|
351
289
|
ListContent.prototype.onShow.apply(this, arguments);
|
|
352
290
|
|
|
353
|
-
var oListBinding = this.
|
|
291
|
+
var oListBinding = this.getListBinding();
|
|
354
292
|
var oListBindingInfo = this._getListBindingInfo();
|
|
355
293
|
|
|
356
294
|
var bBindingSuspended = oListBinding && oListBinding.isSuspended();
|
|
357
295
|
var bBindingWillBeSuspended = !oListBinding && oListBindingInfo && oListBindingInfo.suspended;
|
|
358
296
|
|
|
297
|
+
this._applyInitialConditions(this._getPriorityFilterBar()); // to set incomming condition on FilterBar
|
|
298
|
+
|
|
359
299
|
if ((bBindingSuspended || bBindingWillBeSuspended) && !this.isTypeahead()) {
|
|
360
300
|
return; // in dialog case do not resume suspended table on opening
|
|
361
301
|
}
|
|
@@ -363,50 +303,10 @@ sap.ui.define([
|
|
|
363
303
|
this.applyFilters(this.getFilterValue());
|
|
364
304
|
};
|
|
365
305
|
|
|
366
|
-
FilterableListContent.prototype.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
var aInParameters = this.getModel("$valueHelp").getProperty("/inParameters");
|
|
370
|
-
var aOutParameters = this.getModel("$valueHelp").getProperty("/outParameters");
|
|
371
|
-
|
|
372
|
-
for (var i = 0; i < aConditions.length; i++) {
|
|
373
|
-
var oCondition = aConditions[i];
|
|
374
|
-
if (oCondition.inParameters) {
|
|
375
|
-
oCondition.inParameters = _mapParametersToHelp.call(this, oCondition.inParameters, aInParameters);
|
|
376
|
-
}
|
|
377
|
-
if (oCondition.outParameters) {
|
|
378
|
-
oCondition.outParameters = _mapParametersToHelp.call(this, oCondition.outParameters, aOutParameters);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
return aConditions;
|
|
383
|
-
|
|
306
|
+
FilterableListContent.prototype.onHide = function () {
|
|
307
|
+
ListContent.prototype.onHide.apply(this, arguments);
|
|
384
308
|
};
|
|
385
309
|
|
|
386
|
-
function _mapParametersToHelp(oParameters, aParameters) {
|
|
387
|
-
|
|
388
|
-
var oHelpParameters;
|
|
389
|
-
|
|
390
|
-
if (aParameters.length > 0) {
|
|
391
|
-
for (var sMyFieldPath in oParameters) {
|
|
392
|
-
for (var i = 0; i < aParameters.length; i++) {
|
|
393
|
-
var oParameter = aParameters[i];
|
|
394
|
-
var sHelpPath = oParameter.getHelpPath();
|
|
395
|
-
var sFieldPath = oParameter.getFieldPath();
|
|
396
|
-
if (sFieldPath && (sFieldPath === sMyFieldPath || sFieldPath === "conditions/" + sMyFieldPath) && sHelpPath) { // support also old saved conditions without "conditions/" in name
|
|
397
|
-
if (!oHelpParameters) {
|
|
398
|
-
oHelpParameters = {};
|
|
399
|
-
}
|
|
400
|
-
oHelpParameters[sHelpPath] = oParameters[sMyFieldPath];
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
return oHelpParameters;
|
|
407
|
-
|
|
408
|
-
}
|
|
409
|
-
|
|
410
310
|
FilterableListContent.prototype._getPriorityFilterBar = function () {
|
|
411
311
|
return this.getFilterBar() || this.getAggregation("_defaultFilterBar");
|
|
412
312
|
};
|
|
@@ -414,74 +314,62 @@ sap.ui.define([
|
|
|
414
314
|
FilterableListContent.prototype._observeChanges = function (oChanges) {
|
|
415
315
|
if (oChanges.object == this) {
|
|
416
316
|
|
|
417
|
-
if (oChanges.name === "collectiveSearchItems") {
|
|
317
|
+
/* if (oChanges.name === "collectiveSearchItems") {
|
|
418
318
|
this._assignCollectiveSearch(true);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}
|
|
319
|
+
} */
|
|
320
|
+
|
|
321
|
+
var oFilterBar;
|
|
423
322
|
|
|
424
323
|
if (["_defaultFilterBar", "filterBar"].indexOf(oChanges.name) !== -1) {
|
|
425
|
-
|
|
426
|
-
var
|
|
324
|
+
oFilterBar = oChanges.child;
|
|
325
|
+
var oDefaultFilterBar;
|
|
427
326
|
if (oChanges.mutation === "insert") {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
if (!oFilterBar.bIsDestroyed) {
|
|
434
|
-
var FilterField = aModules[0];
|
|
435
|
-
var oSearchField = new FilterField(this.getId() + "-search", {
|
|
436
|
-
conditions: "{$filters>/conditions/" + sFilterFields + "}",
|
|
437
|
-
placeholder:"{$i18n>filterbar.SEARCH}",
|
|
438
|
-
label:"{$i18n>filterbar.SEARCH}", // TODO: do we want a label?
|
|
439
|
-
maxConditions: 1,
|
|
440
|
-
width: "50%"
|
|
441
|
-
});
|
|
442
|
-
oSearchField._bCreatedByValueHelp = true;
|
|
443
|
-
oFilterBar.setBasicSearchField(oSearchField);
|
|
444
|
-
}
|
|
445
|
-
}.bind(this));
|
|
446
|
-
} else if (oExistingBasicSearchField) {
|
|
447
|
-
oExistingBasicSearchField.setConditions([]);
|
|
327
|
+
_setBasicSearch.call(this, oFilterBar);
|
|
328
|
+
this._assignCollectiveSearchSelect();
|
|
329
|
+
|
|
330
|
+
if (oChanges.name !== "_defaultFilterBar" || !this.getFilterBar()) { // DefaultFilterBar only used if no other FilterBar assigned
|
|
331
|
+
oFilterBar.attachSearch(this._handleSearch, this);
|
|
448
332
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
333
|
+
if (oChanges.name === "filterBar") {
|
|
334
|
+
oDefaultFilterBar = this.getAggregation("_defaultFilterBar");
|
|
335
|
+
if (oDefaultFilterBar) {
|
|
336
|
+
oDefaultFilterBar.detachSearch(this._handleSearch, this);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
} else { // remove case
|
|
340
|
+
var oExistingBasicSearchField = oFilterBar.getBasicSearchField();
|
|
453
341
|
if (oExistingBasicSearchField && oExistingBasicSearchField._bCreatedByValueHelp) {
|
|
454
|
-
|
|
342
|
+
oFilterBar.setBasicSearchField(); // remove to reuse on other FilterBar
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
oFilterBar.detachSearch(this._handleSearch, this);
|
|
346
|
+
|
|
347
|
+
if (oChanges.name === "filterBar") {
|
|
348
|
+
oDefaultFilterBar = this.getAggregation("_defaultFilterBar");
|
|
349
|
+
if (oDefaultFilterBar) {
|
|
350
|
+
oDefaultFilterBar.attachSearch(this._handleSearch, this);
|
|
351
|
+
} else {
|
|
352
|
+
this._createDefaultFilterBar();
|
|
353
|
+
}
|
|
455
354
|
}
|
|
456
|
-
|
|
355
|
+
}
|
|
356
|
+
_addFilterValueToFilterBar.call(this, this._getPriorityFilterBar(), this.getFilterValue()); // as might set before a FilterBar exist
|
|
357
|
+
} else if (oChanges.name === "filterFields") {
|
|
358
|
+
// check if search fields needs to be removed or added
|
|
359
|
+
oFilterBar = this._getPriorityFilterBar();
|
|
360
|
+
if (oFilterBar) {
|
|
361
|
+
_setBasicSearch.call(this, oFilterBar);
|
|
457
362
|
}
|
|
458
363
|
}
|
|
459
364
|
}
|
|
460
365
|
ListContent.prototype._observeChanges.apply(this, arguments);
|
|
461
366
|
};
|
|
462
367
|
|
|
463
|
-
FilterableListContent.prototype.exit = function () {
|
|
464
|
-
|
|
465
|
-
Common.cleanup(this, [
|
|
466
|
-
"_oCollectiveSearchSelect","_oManagedObjectModel"
|
|
467
|
-
]);
|
|
468
|
-
|
|
469
|
-
ListContent.prototype.exit.apply(this, arguments);
|
|
470
|
-
};
|
|
471
|
-
|
|
472
368
|
FilterableListContent.prototype.getCollectiveSearchKey = function () {
|
|
473
369
|
return this._oCollectiveSearchSelect && this._oCollectiveSearchSelect.getSelectedItemKey();
|
|
474
370
|
};
|
|
475
371
|
|
|
476
|
-
FilterableListContent.prototype.
|
|
477
|
-
var oFilterBar = this._getPriorityFilterBar();
|
|
478
|
-
var oCurrentFilterBarConditions = oFilterBar.getConditions();
|
|
479
|
-
var oConditionTypes = this._getTypesForConditions(oCurrentFilterBarConditions);
|
|
480
|
-
var oCreatedFBFilters = oCurrentFilterBarConditions && oConditionTypes && FilterConverter.createFilters(oCurrentFilterBarConditions, oConditionTypes, undefined, this.getCaseSensitive());
|
|
481
|
-
return oCreatedFBFilters ? [].concat(oCreatedFBFilters) : [];
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
FilterableListContent.prototype._getListBinding = function () {
|
|
372
|
+
FilterableListContent.prototype.getListBinding = function () {
|
|
485
373
|
throw new Error("FilterableListContent: Every filterable listcontent must implement this method.");
|
|
486
374
|
};
|
|
487
375
|
|
|
@@ -490,51 +378,11 @@ sap.ui.define([
|
|
|
490
378
|
};
|
|
491
379
|
|
|
492
380
|
FilterableListContent.prototype._getTypesForConditions = function (oConditions) {
|
|
493
|
-
|
|
494
|
-
var
|
|
495
|
-
|
|
496
|
-
var oConditionTypes;
|
|
497
|
-
var sFieldPath;
|
|
498
|
-
|
|
499
|
-
if (oFilterBar) {
|
|
500
|
-
oConditionTypes = FilterConverter.createConditionTypesMapFromFilterBar( oConditions, oFilterBar);
|
|
501
|
-
} else {
|
|
502
|
-
// collect condition Fieldpaths here
|
|
503
|
-
oConditionTypes = {};
|
|
504
|
-
for (sFieldPath in oConditions) {
|
|
505
|
-
oConditionTypes[sFieldPath] = {type: null};
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
// try to find missing type from InParameter
|
|
510
|
-
for (sFieldPath in oConditionTypes) {
|
|
511
|
-
if (!oConditionTypes[sFieldPath].type) {
|
|
512
|
-
for (var i = 0; i < aInParameters.length; i++) {
|
|
513
|
-
var oInParameter = aInParameters[i];
|
|
514
|
-
if (oInParameter.getHelpPath() === sFieldPath) {
|
|
515
|
-
oConditionTypes[sFieldPath].type = oInParameter.getDataType();
|
|
516
|
-
break;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
return oConditionTypes;
|
|
523
|
-
|
|
381
|
+
var oDelegate = this._getValueHelpDelegate();
|
|
382
|
+
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
383
|
+
return oDelegate ? oDelegate.getTypesForConditions(oDelegatePayload, this, oConditions) : {};
|
|
524
384
|
};
|
|
525
385
|
|
|
526
|
-
function _addInParameterToFilterBar(oFilterBar, oInConditions) {
|
|
527
|
-
if (oFilterBar) {
|
|
528
|
-
// add inParameters to FilterBar
|
|
529
|
-
var oConditions = oFilterBar.getInternalConditions();
|
|
530
|
-
for ( var sFilterPath in oInConditions) {
|
|
531
|
-
oConditions[sFilterPath] = oInConditions[sFilterPath];
|
|
532
|
-
}
|
|
533
|
-
oFilterBar.setInternalConditions(oConditions); // TODO: remove on hide?
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
|
|
538
386
|
function _addFilterValueToFilterBar(oFilterBar, sFilterValue) {
|
|
539
387
|
var sFilterFields = this.getFilterFields();
|
|
540
388
|
|
|
@@ -567,17 +415,82 @@ sap.ui.define([
|
|
|
567
415
|
|
|
568
416
|
FilterableListContent.prototype.isSearchSupported = function () {
|
|
569
417
|
|
|
570
|
-
var sFilterFields =
|
|
418
|
+
var sFilterFields = this.getFilterFields();
|
|
571
419
|
var bSearchSupported = !!sFilterFields;
|
|
572
420
|
if (sFilterFields === "$search") {
|
|
573
|
-
var oListBinding = this.
|
|
421
|
+
var oListBinding = this.getListBinding();
|
|
574
422
|
var oDelegate = this._getValueHelpDelegate();
|
|
575
423
|
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
576
424
|
bSearchSupported = oDelegate && oDelegate.isSearchSupported(oDelegatePayload, this, oListBinding);
|
|
577
425
|
}
|
|
578
426
|
|
|
579
427
|
return bSearchSupported;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
FilterableListContent.prototype.setCollectiveSearchSelect = function (oDropdown) {
|
|
431
|
+
this._oCollectiveSearchSelect = oDropdown;
|
|
432
|
+
this._assignCollectiveSearchSelect();
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
FilterableListContent.prototype._assignCollectiveSearchSelect = function () {
|
|
436
|
+
var oFilterBar = this._getPriorityFilterBar();
|
|
437
|
+
if (oFilterBar.setCollectiveSearch && this._oCollectiveSearchSelect) {
|
|
438
|
+
oFilterBar.setCollectiveSearch(this._oCollectiveSearchSelect);
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
FilterableListContent.prototype.onBeforeShow = function() {
|
|
443
|
+
var oDelegate = this._getValueHelpDelegate();
|
|
444
|
+
return Promise.resolve(oDelegate && oDelegate.getInitialFilterConditions(this._getValueHelpDelegatePayload(), this, this._getControl())).then(function (oConditions) {
|
|
445
|
+
this._oInitialFilterConditions = oConditions;
|
|
446
|
+
}.bind(this));
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
FilterableListContent.prototype._applyInitialConditions = function (oFilterBar) {
|
|
450
|
+
if (oFilterBar) {
|
|
451
|
+
var sFilterFields = this.getFilterFields();
|
|
452
|
+
var oNewConditions = merge({}, this._oInitialFilterConditions);
|
|
453
|
+
if (!oNewConditions[sFilterFields]) { // not set from Delegate
|
|
454
|
+
// use existing search
|
|
455
|
+
var oConditions = oFilterBar.getInternalConditions();
|
|
456
|
+
if (oConditions[sFilterFields]) {
|
|
457
|
+
oNewConditions[sFilterFields] = oConditions[sFilterFields];
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
oFilterBar.setInternalConditions(oNewConditions);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
FilterableListContent.prototype._fireSelect = function (oChange) {
|
|
465
|
+
var oDelegate = this._getValueHelpDelegate();
|
|
466
|
+
var oDelegatePayload = this._getValueHelpDelegatePayload();
|
|
467
|
+
var oModifiedSelectionChange = oDelegate && oDelegate.modifySelectionBehaviour ? oDelegate.modifySelectionBehaviour(oDelegatePayload, this, oChange) : oChange;
|
|
468
|
+
if (oModifiedSelectionChange) {
|
|
469
|
+
this.fireSelect(oModifiedSelectionChange);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
FilterableListContent.prototype.exit = function () {
|
|
474
|
+
|
|
475
|
+
Engine.getInstance().defaultProviderRegistry.detach(this);
|
|
476
|
+
|
|
477
|
+
Common.cleanup(this, [
|
|
478
|
+
"_oCollectiveSearchSelect", "_oInitialFilterConditions"
|
|
479
|
+
]);
|
|
480
|
+
|
|
481
|
+
if (this._oSearchField && !this._oSearchField.getParent()) {
|
|
482
|
+
this._oSearchField.destroy();
|
|
483
|
+
delete this._oSearchField;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
ListContent.prototype.exit.apply(this, arguments);
|
|
488
|
+
};
|
|
580
489
|
|
|
490
|
+
FilterableListContent.prototype.getCount = function (aConditions, sGroup) {
|
|
491
|
+
var oDelegate = this._isValueHelpDelegateInitialized() && this._getValueHelpDelegate();
|
|
492
|
+
var oDelegatePayload = oDelegate && this._getValueHelpDelegatePayload();
|
|
493
|
+
return oDelegate && oDelegate.getCount ? oDelegate.getCount(oDelegatePayload, this, aConditions, sGroup) : ListContent.prototype.getCount.apply(this, arguments);
|
|
581
494
|
};
|
|
582
495
|
|
|
583
496
|
return FilterableListContent;
|
|
@@ -16,11 +16,11 @@ sap.ui.define([
|
|
|
16
16
|
/**
|
|
17
17
|
* Constructor for a new <code>ListContent</code>.
|
|
18
18
|
*
|
|
19
|
-
* @param {string} [sId] ID for the new
|
|
20
|
-
* @param {object} [mSettings] Initial settings for the new
|
|
21
|
-
* @class Content for the
|
|
19
|
+
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
|
|
20
|
+
* @param {object} [mSettings] Initial settings for the new element
|
|
21
|
+
* @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
|
|
22
22
|
* @extends sap.ui.mdc.valuehelp.base.Content
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.102.1
|
|
24
24
|
* @constructor
|
|
25
25
|
* @abstract
|
|
26
26
|
* @private
|
|
@@ -72,7 +72,7 @@ sap.ui.define([
|
|
|
72
72
|
*
|
|
73
73
|
* If set, the field help reads the data of these entities in the model and uses it to filter in the value help.
|
|
74
74
|
*/
|
|
75
|
-
inParameters: {
|
|
75
|
+
inParameters: { // TODO: remove!
|
|
76
76
|
type: "sap.ui.mdc.field.InParameter",
|
|
77
77
|
group: "Data",
|
|
78
78
|
multiple: true
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
*
|
|
84
84
|
* If set, the fields sets the data of these entities in the model based to the selected values.
|
|
85
85
|
*/
|
|
86
|
-
outParameters: {
|
|
86
|
+
outParameters: { // TODO: remove!
|
|
87
87
|
type: "sap.ui.mdc.field.OutParameter",
|
|
88
88
|
group: "Data",
|
|
89
89
|
multiple: true
|