@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
|
@@ -10,23 +10,28 @@
|
|
|
10
10
|
|
|
11
11
|
sap.ui.define([
|
|
12
12
|
"sap/ui/mdc/BaseDelegate",
|
|
13
|
-
"sap/ui/model/FilterType"
|
|
13
|
+
"sap/ui/model/FilterType",
|
|
14
|
+
"sap/ui/mdc/enum/ConditionValidated"
|
|
14
15
|
], function(
|
|
15
16
|
BaseDelegate,
|
|
16
|
-
FilterType
|
|
17
|
+
FilterType,
|
|
18
|
+
ConditionValidated
|
|
17
19
|
) {
|
|
18
20
|
"use strict";
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
23
|
+
* Delegate for {@link sap.ui.mdc.ValueHelp ValueHelp}.<br>
|
|
22
24
|
* <b>Note:</b> The class is experimental and the API/behavior is not finalized and hence this should not be used for productive usage.
|
|
23
25
|
*
|
|
26
|
+
* @namespace
|
|
24
27
|
* @author SAP SE
|
|
25
28
|
* @private
|
|
26
|
-
* @ui5-restricted sap.
|
|
29
|
+
* @ui5-restricted sap.fe
|
|
30
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
27
31
|
* @experimental As of version 1.95
|
|
28
32
|
* @since 1.95.0
|
|
29
|
-
* @
|
|
33
|
+
* @extends module:sap/ui/mdc/BaseDelegate
|
|
34
|
+
* @alias module:sap/ui/mdc/ValueHelpDelegate
|
|
30
35
|
*/
|
|
31
36
|
var ValueHelpDelegate = Object.assign({}, BaseDelegate);
|
|
32
37
|
|
|
@@ -41,12 +46,14 @@ sap.ui.define([
|
|
|
41
46
|
*
|
|
42
47
|
* @param {object} oPayload Payload for delegate
|
|
43
48
|
* @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
|
|
49
|
+
* @param {string} sContentId id of the content shown after this call to retrieveContent
|
|
50
|
+
*
|
|
44
51
|
* @returns {Promise} Promise that is resolved if all content is available
|
|
45
52
|
* @private
|
|
46
53
|
* @ui5-restricted sap.fe
|
|
47
54
|
* @MDC_PUBLIC_CANDIDATE
|
|
48
55
|
*/
|
|
49
|
-
ValueHelpDelegate.retrieveContent = function (oPayload, oContainer) {
|
|
56
|
+
ValueHelpDelegate.retrieveContent = function (oPayload, oContainer, sContentId) {
|
|
50
57
|
return Promise.resolve();
|
|
51
58
|
};
|
|
52
59
|
|
|
@@ -151,7 +158,7 @@ sap.ui.define([
|
|
|
151
158
|
/**
|
|
152
159
|
* Checks if the <code>ListBinding</code> is waiting for an update.
|
|
153
160
|
* As long as the context has not been set for <code>ListBinding</code>,
|
|
154
|
-
* <code>
|
|
161
|
+
* <code>ValueHelp</code> needs to wait.
|
|
155
162
|
*
|
|
156
163
|
* @param {object} oPayload Payload for delegate
|
|
157
164
|
* @param {sap.ui.model.ListBinding} oListBinding <code>ListBinding</code> to check
|
|
@@ -164,5 +171,150 @@ sap.ui.define([
|
|
|
164
171
|
return false;
|
|
165
172
|
};
|
|
166
173
|
|
|
174
|
+
// InOut =====
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Callback invoked everytime a {@link sap.ui.mdc.ValueHelp ValueHelp} fires a select event or the value of the corresponding field changes
|
|
178
|
+
* This callback may be used to update external fields.
|
|
179
|
+
*
|
|
180
|
+
* @param {object} oPayload Payload for delegate
|
|
181
|
+
* @param {sap.ui.mdc.ValueHelp} oValueHelp <code>ValueHelp</code> control instance receiving the <code>controlChange</code>
|
|
182
|
+
* @param {sap.ui.mdc.enum.PropagationReason} sReason Reason why the method was invoked
|
|
183
|
+
* @param {object} oConfig current configuration provided by the calling control
|
|
184
|
+
* @private
|
|
185
|
+
* @ui5-restricted sap.fe
|
|
186
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
187
|
+
* @since 1.101.0
|
|
188
|
+
*/
|
|
189
|
+
ValueHelpDelegate.onConditionPropagation = function (oPayload, oValueHelp, sReason, oConfig) {
|
|
190
|
+
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Provides an initial condition configuration everytime a value help content is shown.
|
|
195
|
+
*
|
|
196
|
+
* <b>Note:</b> Make sure to provide the type information to the corresponding properties of
|
|
197
|
+
* the {@link sap.ui.mdc.filterbar.vh.FilterBar FilterBar}.
|
|
198
|
+
*
|
|
199
|
+
* <b>Note:</b> Be aware that setting the condition for the search field or type-ahead could
|
|
200
|
+
* lead to unwanted side effects.
|
|
201
|
+
*
|
|
202
|
+
* @param {object} oPayload Payload for delegate
|
|
203
|
+
* @param {sap.ui.mdc.valuehelp.base.FilterableListContent} oContent ValueHelp content requesting conditions configuration
|
|
204
|
+
* @param {sap.ui.core.Control} oControl Instance of the calling control
|
|
205
|
+
* @returns {Promise<object>|object} Returns a map of conditions suitable for a sap.ui.mdc.FilterBar control
|
|
206
|
+
* @private
|
|
207
|
+
* @ui5-restricted sap.fe
|
|
208
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
209
|
+
* @since 1.101.0
|
|
210
|
+
*/
|
|
211
|
+
ValueHelpDelegate.getInitialFilterConditions = function (oPayload, oContent, oControl) {
|
|
212
|
+
|
|
213
|
+
var oConditions = {};
|
|
214
|
+
return oConditions;
|
|
215
|
+
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Provides the possibility to customize selections in 'Select from list' scenarios.
|
|
220
|
+
* By default, only condition keys are considered. This may be extended with payload dependent filters.
|
|
221
|
+
*
|
|
222
|
+
* @param {object} oPayload Payload for delegate
|
|
223
|
+
* @param {sap.ui.mdc.valuehelp.base.FilterableListContent} oContent <code>ValueHelp</code> content instance
|
|
224
|
+
* @param {sap.ui.core.Element} oItem Entry of a given list
|
|
225
|
+
* @param {sap.ui.mdc.condition.ConditionObject[]} aConditions current conditions
|
|
226
|
+
* @returns {boolean} True, if item is selected
|
|
227
|
+
* @private
|
|
228
|
+
* @ui5-restricted sap.fe
|
|
229
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
230
|
+
* @since 1.101.0
|
|
231
|
+
*/
|
|
232
|
+
ValueHelpDelegate.isFilterableListItemSelected = function (oPayload, oContent, oItem, aConditions) {
|
|
233
|
+
var sModelName = oContent._getListBindingInfo().model;
|
|
234
|
+
var oContext = oItem && oItem.getBindingContext(sModelName);
|
|
235
|
+
var oItemData = oContent._getItemFromContext(oContext);
|
|
236
|
+
|
|
237
|
+
for (var i = 0; i < aConditions.length; i++) {
|
|
238
|
+
var oCondition = aConditions[i];
|
|
239
|
+
if (oCondition.validated === ConditionValidated.Validated && oItemData.key === oCondition.values[0]) { // TODO: check for specific EQ operator
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return false;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Provides the possibility to customize selection events in 'Select from list' scenarios.
|
|
249
|
+
* This enables an application to reuse conditions in collective search scenarios, instead of always creating new ones.
|
|
250
|
+
*
|
|
251
|
+
* @param {object} oPayload Payload for delegate
|
|
252
|
+
* @param {sap.ui.mdc.valuehelp.base.FilterableListContent} oContent <code>ValueHelp</code> content instance
|
|
253
|
+
* @param {object} oChange Selection event configuration
|
|
254
|
+
* @param {sap.ui.mdc.enum.SelectType} oChange.type Type of the selection change (add, remove)
|
|
255
|
+
* @param {object[]} oChange.conditions Array of changed conditions with structure {@link sap.ui.mdc.condition.ConditionObject ConditionObject}
|
|
256
|
+
* @returns {object} oRestult Selection event configuration object
|
|
257
|
+
* @returns {sap.ui.mdc.enum.SelectType} oRestult.type Type of the selection change (add, remove)
|
|
258
|
+
* @returns {object[]} oRestult.conditions Array of changed conditions with structure {@link sap.ui.mdc.condition.ConditionObject ConditionObject}
|
|
259
|
+
* @private
|
|
260
|
+
* @ui5-restricted sap.fe
|
|
261
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
262
|
+
* @since 1.101.0
|
|
263
|
+
*/
|
|
264
|
+
ValueHelpDelegate.modifySelectionBehaviour = function (oPayload, oContent, oChange) {
|
|
265
|
+
return oChange;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Provides the possibility to convey custom data in conditions.
|
|
270
|
+
* This enables an application to enhance conditions with data relevant for combined key or outparameter scenarios.
|
|
271
|
+
*
|
|
272
|
+
* @param {object} oPayload Payload for delegate
|
|
273
|
+
* @param {sap.ui.mdc.valuehelp.base.FilterableListContent} oContent <code>ValueHelp</code> content instance
|
|
274
|
+
* @param {any[]} aValues key, description pair for the condition which is to be created.
|
|
275
|
+
* @param {sap.ui.model.Context} [oContext] optional additional context
|
|
276
|
+
* @returns {undefined|object} Optionally returns a serializeable object to be stored in the condition payload field.
|
|
277
|
+
* @private
|
|
278
|
+
* @ui5-restricted sap.fe
|
|
279
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
280
|
+
* @since 1.101.0
|
|
281
|
+
*/
|
|
282
|
+
ValueHelpDelegate.createConditionPayload = function (oPayload, oContent, aValues, oContext) {
|
|
283
|
+
return undefined;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Provides type information for listcontent filtering
|
|
288
|
+
*
|
|
289
|
+
* @param {object} oPayload Payload for delegate
|
|
290
|
+
* @param {sap.ui.mdc.valuehelp.base.FilterableListContent} oContent <code>ValueHelp</code> content instance
|
|
291
|
+
* @param {object} oConditions set of conditions to create filters for
|
|
292
|
+
* @returns {object} Returns a type map for property paths
|
|
293
|
+
* @private
|
|
294
|
+
* @ui5-restricted sap.fe
|
|
295
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
296
|
+
* @since 1.101.0
|
|
297
|
+
*/
|
|
298
|
+
ValueHelpDelegate.getTypesForConditions = function (oPayload, oContent, oConditions) { // TODO: MDC.Table add UI.Table support
|
|
299
|
+
var oConditionTypes = {};
|
|
300
|
+
var oListBindingInfo = oContent && oContent._getListBindingInfo();
|
|
301
|
+
|
|
302
|
+
if (oListBindingInfo && oListBindingInfo.template) {
|
|
303
|
+
oListBindingInfo.template.mAggregations.cells.forEach(function (oCell) {
|
|
304
|
+
Object.values(oCell.mBindingInfos).forEach(function (oBindingInfo) {
|
|
305
|
+
oBindingInfo.parts.forEach(function (oPartInfo) {
|
|
306
|
+
oConditionTypes[oPartInfo.path] = {type: oPartInfo.type || null};
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
}, {});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return oConditionTypes;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
/* ValueHelpDelegate.getCount = function (oPayload, oContent, aConditions, sGroup) {
|
|
316
|
+
return 0;
|
|
317
|
+
}; */
|
|
318
|
+
|
|
167
319
|
return ValueHelpDelegate;
|
|
168
320
|
});
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @class The ChartSelectionDetails control creates a sap.m.SelectionDetails popover based on metadata and the configuration specified.
|
|
34
34
|
* @extends sap.m.SelectionDetails
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.102.1
|
|
37
37
|
* @constructor
|
|
38
38
|
* @experimental As of version ...
|
|
39
39
|
* @private
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @class The ChartToolbar control is a sap.m.OverflowToolbar based on metadata and the configuration specified.
|
|
43
43
|
* @extends sap.ui.mdc.ActionToolbar
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.102.1
|
|
46
46
|
* @constructor
|
|
47
47
|
* @experimental As of version 1.88
|
|
48
48
|
* @private
|
|
@@ -163,13 +163,18 @@ sap.ui.define([
|
|
|
163
163
|
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
164
164
|
enabled: false,
|
|
165
165
|
press: function (oEvent) {
|
|
166
|
+
var aP13nMode = oMDCChart.getP13nMode();
|
|
167
|
+
var iIdx = aP13nMode.indexOf("Type");
|
|
168
|
+
if (iIdx > -1) {
|
|
169
|
+
aP13nMode.splice(iIdx, 1);
|
|
170
|
+
}
|
|
166
171
|
|
|
167
172
|
//TODO: Move this to p13n functionality?
|
|
168
173
|
if (oMDCChart.isPropertyHelperFinal()){
|
|
169
|
-
oMDCChart.getEngine().uimanager.show(oMDCChart,
|
|
174
|
+
oMDCChart.getEngine().uimanager.show(oMDCChart, aP13nMode);
|
|
170
175
|
} else {
|
|
171
176
|
oMDCChart.finalizePropertyHelper().then(function(){
|
|
172
|
-
oMDCChart.getEngine().uimanager.show(oMDCChart,
|
|
177
|
+
oMDCChart.getEngine().uimanager.show(oMDCChart, aP13nMode);
|
|
173
178
|
});
|
|
174
179
|
}
|
|
175
180
|
}
|
|
@@ -182,12 +182,21 @@ sap.ui.define([
|
|
|
182
182
|
sap.ui.require([
|
|
183
183
|
"sap/ui/mdc/p13n/FlexUtil", "sap/ui/mdc/flexibility/Chart.flexibility"
|
|
184
184
|
], function(FlexUtil,ChartFlex) {
|
|
185
|
-
var aChanges = [];
|
|
185
|
+
//var aChanges = [];
|
|
186
|
+
|
|
187
|
+
oMDCChart.getEngine().createChanges({
|
|
188
|
+
control: oMDCChart,
|
|
189
|
+
key: "Type",
|
|
190
|
+
state: {
|
|
191
|
+
type: oObj.key
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
/*
|
|
186
195
|
aChanges.push(ChartFlex["setChartType"].changeHandler.createChange({
|
|
187
196
|
control: oMDCChart,
|
|
188
197
|
chartType: oObj.key
|
|
189
198
|
}));
|
|
190
|
-
FlexUtil.handleChanges(aChanges)
|
|
199
|
+
FlexUtil.handleChanges(aChanges);*/
|
|
191
200
|
});
|
|
192
201
|
}
|
|
193
202
|
}
|
|
@@ -23,13 +23,12 @@ sap.ui.define([
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
26
|
* Utilities to create conditions to be used in {@link sap.ui.mdc.FilterField FilterField},
|
|
28
27
|
* {@link sap.ui.mdc.FilterBar FilterBar} or {@link sap.ui.mdc.condition.ConditionModel ConditionModel}
|
|
29
28
|
*
|
|
30
29
|
* @namespace
|
|
31
30
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
31
|
+
* @version 1.102.1
|
|
33
32
|
* @since 1.61.0
|
|
34
33
|
* @alias sap.ui.mdc.condition.Condition
|
|
35
34
|
*
|
|
@@ -53,6 +52,7 @@ sap.ui.define([
|
|
|
53
52
|
* @property {object} [outParameters] Out parameters of the condition. For each field path, a value is stored
|
|
54
53
|
* @property {boolean} [isEmpty] If set, the condition is empty (used as dummy condition in {@link sap.ui.mdc.field.DefineConditionPanel DefineConditionPanel})
|
|
55
54
|
* @property {sap.ui.mdc.enum.ConditionValidated} validated If set to <code>ConditionValidated.Validated</code>, the condition is validated (by the field help) and not shown in the {@link sap.ui.mdc.field.DefineConditionPanel DefineConditionPanel} control
|
|
55
|
+
* @property {object} [payload] Payload of the condition. Set by application. Data needs to be stringified. (as stored and loaded in variants)
|
|
56
56
|
* @private
|
|
57
57
|
* @ui5-restricted sap.fe
|
|
58
58
|
* @MDC_PUBLIC_CANDIDATE
|
|
@@ -66,15 +66,16 @@ sap.ui.define([
|
|
|
66
66
|
*
|
|
67
67
|
* @param {string} sKey Operator for the condition
|
|
68
68
|
* @param {string} sDescription Description of the operator
|
|
69
|
-
* @param {object} oInParameters In parameters of the condition
|
|
70
|
-
* @param {object} oOutParameters Out parameters of the condition
|
|
69
|
+
* @param {object} [oInParameters] In parameters of the condition
|
|
70
|
+
* @param {object} [oOutParameters] Out parameters of the condition
|
|
71
|
+
* @param {object} [oPayload] Payload of the condition
|
|
71
72
|
* @returns {sap.ui.mdc.condition.ConditionObject} The new condition object with the EQ operator along with <code>sKey</code> and <code>sDescription</code> as <code>aValues</code>
|
|
72
73
|
* @private
|
|
73
74
|
* @ui5-restricted sap.fe
|
|
74
75
|
* @MDC_PUBLIC_CANDIDATE
|
|
75
76
|
*
|
|
76
77
|
*/
|
|
77
|
-
createItemCondition: function(sKey, sDescription, oInParameters, oOutParameters) {
|
|
78
|
+
createItemCondition: function(sKey, sDescription, oInParameters, oOutParameters, oPayload) {
|
|
78
79
|
var sValidated = ConditionValidated.NotValidated;
|
|
79
80
|
var aValues = [sKey, sDescription];
|
|
80
81
|
if (sDescription === null || sDescription === undefined) {
|
|
@@ -82,7 +83,7 @@ sap.ui.define([
|
|
|
82
83
|
} else {
|
|
83
84
|
sValidated = ConditionValidated.Validated; // if there is a description set it is validated (even if empty string)
|
|
84
85
|
}
|
|
85
|
-
return this.createCondition("EQ", aValues, oInParameters, oOutParameters, sValidated);
|
|
86
|
+
return this.createCondition("EQ", aValues, oInParameters, oOutParameters, sValidated, oPayload);
|
|
86
87
|
},
|
|
87
88
|
|
|
88
89
|
/**
|
|
@@ -90,16 +91,17 @@ sap.ui.define([
|
|
|
90
91
|
*
|
|
91
92
|
* @param {string} sOperator Operator for the condition
|
|
92
93
|
* @param {any[]} aValues Array of values for the condition
|
|
93
|
-
* @param {object} oInParameters In parameters of the condition
|
|
94
|
-
* @param {object} oOutParameters Out parameters of the condition
|
|
94
|
+
* @param {object} [oInParameters] In parameters of the condition
|
|
95
|
+
* @param {object} [oOutParameters] Out parameters of the condition
|
|
95
96
|
* @param {sap.ui.mdc.enum.ConditionValidated} sValidated If set to <code>ConditionValidated.Validated</code>, the condition is validated (by the field help) and not shown in the <code>DefineConditionPanel</code> control
|
|
97
|
+
* @param {object} [oPayload] Payload of the condition
|
|
96
98
|
* @returns {sap.ui.mdc.condition.ConditionObject} The new condition object with the given operator and values
|
|
97
99
|
* @private
|
|
98
100
|
* @ui5-restricted sap.fe
|
|
99
101
|
* @MDC_PUBLIC_CANDIDATE
|
|
100
102
|
*
|
|
101
103
|
*/
|
|
102
|
-
createCondition: function(sOperator, aValues, oInParameters, oOutParameters, sValidated) {
|
|
104
|
+
createCondition: function(sOperator, aValues, oInParameters, oOutParameters, sValidated, oPayload) {
|
|
103
105
|
var oCondition = { operator: sOperator, values: aValues, isEmpty: null, validated: sValidated }; // use null as undefined is not recognized by filter
|
|
104
106
|
if (oInParameters) {
|
|
105
107
|
oCondition.inParameters = oInParameters;
|
|
@@ -107,6 +109,9 @@ sap.ui.define([
|
|
|
107
109
|
if (oOutParameters) {
|
|
108
110
|
oCondition.outParameters = oOutParameters;
|
|
109
111
|
}
|
|
112
|
+
if (oPayload) {
|
|
113
|
+
oCondition.payload = oPayload;
|
|
114
|
+
}
|
|
110
115
|
return oCondition;
|
|
111
116
|
},
|
|
112
117
|
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
*
|
|
33
33
|
* @namespace
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.102.1
|
|
36
36
|
* @private
|
|
37
37
|
* @ui5-restricted sap.ui.mdc
|
|
38
38
|
* @experimental As of version 1.74
|
|
@@ -60,12 +60,13 @@ sap.ui.define([
|
|
|
60
60
|
|
|
61
61
|
// convert using "normalized" data type
|
|
62
62
|
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
|
|
63
|
-
var aValues = _valuesToString(oCondition.values, _getLocalTypeConfig(
|
|
63
|
+
var aValues = _valuesToString(oCondition.values, _getLocalTypeConfig(oTypeUtil, oTypeConfig, oOperator) || oTypeConfig, oOperator);
|
|
64
64
|
|
|
65
65
|
// inParameter, OutParameter
|
|
66
66
|
// TODO: we need the types of the in/out parameter
|
|
67
67
|
var oInParameters;
|
|
68
68
|
var oOutParameters;
|
|
69
|
+
var oPayload;
|
|
69
70
|
|
|
70
71
|
if (oCondition.inParameters) {
|
|
71
72
|
oInParameters = merge({}, oCondition.inParameters);
|
|
@@ -74,7 +75,11 @@ sap.ui.define([
|
|
|
74
75
|
oOutParameters = merge({}, oCondition.outParameters);
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
if (oCondition.payload) {
|
|
79
|
+
oPayload = merge({}, oCondition.payload);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var oResult = Condition.createCondition(oCondition.operator, aValues, oInParameters, oOutParameters, oCondition.validated, oPayload);
|
|
78
83
|
return oResult;
|
|
79
84
|
|
|
80
85
|
},
|
|
@@ -97,12 +102,13 @@ sap.ui.define([
|
|
|
97
102
|
toType: function(oCondition, oTypeConfig, oTypeUtil) {
|
|
98
103
|
// convert using "normalized" data type
|
|
99
104
|
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
|
|
100
|
-
var aValues = _stringToValues(oCondition.values, _getLocalTypeConfig(
|
|
105
|
+
var aValues = _stringToValues(oCondition.values, _getLocalTypeConfig(oTypeUtil, oTypeConfig, oOperator) || oTypeConfig);
|
|
101
106
|
|
|
102
107
|
// inParameter, OutParameter
|
|
103
108
|
// TODO: we need the types of the in/out parameter
|
|
104
109
|
var oInParameters;
|
|
105
110
|
var oOutParameters;
|
|
111
|
+
var oPayload;
|
|
106
112
|
|
|
107
113
|
if (oCondition.inParameters) {
|
|
108
114
|
oInParameters = merge({}, oCondition.inParameters);
|
|
@@ -111,7 +117,11 @@ sap.ui.define([
|
|
|
111
117
|
oOutParameters = merge({}, oCondition.outParameters);
|
|
112
118
|
}
|
|
113
119
|
|
|
114
|
-
|
|
120
|
+
if (oCondition.payload) {
|
|
121
|
+
oPayload = merge({}, oCondition.payload);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
var oResult = Condition.createCondition(oCondition.operator, aValues, oInParameters, oOutParameters, oCondition.validated, oPayload);
|
|
115
125
|
|
|
116
126
|
if (oResult.validated !== ConditionValidated.Validated && oOperator.validateInput) {
|
|
117
127
|
// let the operator check if the condition could be validated. (Use result to not change original condition.)
|
|
@@ -120,10 +130,52 @@ sap.ui.define([
|
|
|
120
130
|
|
|
121
131
|
return oResult;
|
|
122
132
|
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* creates a Condition from internal values
|
|
136
|
+
*
|
|
137
|
+
* @param {string} sOperator Name of operator
|
|
138
|
+
* @param {any[]} aValues values
|
|
139
|
+
* @param {sap.ui.mdc.enum.ConditionValidated} sValidated If set to <code>ConditionValidated.Validated</code>, the condition is validated (by the field help) and not shown in the <code>DefineConditionPanel</code> control
|
|
140
|
+
* @param {object} [oPayload] payload of condition
|
|
141
|
+
* @param {sap.ui.model.Type} oType Data type of the values
|
|
142
|
+
* @param {sap.ui.mdc.util.TypeUtil} oTypeUtil delegate dependent <code>TypeUtil</code> implementation
|
|
143
|
+
* @returns {sap.ui.mdc.condition.ConditionObject} stringified condition
|
|
144
|
+
* @private
|
|
145
|
+
* @ui5-restricted sap.ui.mdc
|
|
146
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
147
|
+
* @since 1.100.0
|
|
148
|
+
*/
|
|
149
|
+
createExternalCondition: function(sOperator, aValues, sValidated, oPayload, oType, oTypeUtil) {
|
|
150
|
+
// convert using "normalized" data type
|
|
151
|
+
var oOperator = FilterOperatorUtil.getOperator(sOperator);
|
|
152
|
+
var oTypeConfig = oTypeUtil.getTypeConfig(oType);
|
|
153
|
+
aValues = _valuesToString(aValues, _getLocalTypeConfig(oTypeUtil, oTypeConfig, oOperator) || oTypeConfig, oOperator);
|
|
154
|
+
var oCondition = Condition.createCondition(sOperator, aValues, undefined, undefined, sValidated); // TODO_ add payload
|
|
155
|
+
return oCondition;
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* gets internal values from stringified condition
|
|
159
|
+
*
|
|
160
|
+
* @param {sap.ui.mdc.condition.ConditionObject} oCondition stringified condition
|
|
161
|
+
* @param {sap.ui.model.Type} oType Data type of the values
|
|
162
|
+
* @param {sap.ui.mdc.util.TypeUtil} oTypeUtil delegate dependent <code>TypeUtil</code> implementation
|
|
163
|
+
* @returns {any[]} internal values
|
|
164
|
+
* @private
|
|
165
|
+
* @ui5-restricted sap.ui.mdc
|
|
166
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
167
|
+
* @since 1.100.0
|
|
168
|
+
*/
|
|
169
|
+
getInternalValues: function(oCondition, oType, oTypeUtil) {
|
|
170
|
+
// convert using "normalized" data type
|
|
171
|
+
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
|
|
172
|
+
var oTypeConfig = oTypeUtil.getTypeConfig(oType);
|
|
173
|
+
var aValues = _stringToValues(oCondition.values, _getLocalTypeConfig(oTypeUtil, oTypeConfig, oOperator) || oTypeConfig);
|
|
174
|
+
return aValues;
|
|
123
175
|
}
|
|
124
176
|
};
|
|
125
177
|
|
|
126
|
-
function _getLocalTypeConfig (
|
|
178
|
+
function _getLocalTypeConfig (oTypeUtil, oTypeConfig, oOperator) {
|
|
127
179
|
if (oOperator && oOperator.valueTypes[0] && (oOperator.valueTypes[0] !== Operator.ValueType.Self && oOperator.valueTypes[0] !== Operator.ValueType.Static)) {
|
|
128
180
|
// we have to create the type instance for the values
|
|
129
181
|
return oTypeUtil.getTypeConfig(oOperator._createLocalType(oOperator.valueTypes[0], oTypeConfig && oTypeConfig.typeInstance)); // TODO type for all values must be the same})
|
|
@@ -56,7 +56,7 @@ function(
|
|
|
56
56
|
*
|
|
57
57
|
* @namespace
|
|
58
58
|
* @author SAP SE
|
|
59
|
-
* @version 1.
|
|
59
|
+
* @version 1.102.1
|
|
60
60
|
* @since 1.73.0
|
|
61
61
|
* @alias sap.ui.mdc.condition.FilterOperatorUtil
|
|
62
62
|
*
|
|
@@ -81,7 +81,7 @@ function(
|
|
|
81
81
|
Description: "{1}",
|
|
82
82
|
Value: "{0}"
|
|
83
83
|
},
|
|
84
|
-
format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
|
|
84
|
+
format: function(oCondition, oType, sDisplayFormat, bHideOperator, aCompositeTypes) {
|
|
85
85
|
sDisplayFormat = sDisplayFormat || FieldDisplay.DescriptionValue;
|
|
86
86
|
var iCount = this.valueTypes.length;
|
|
87
87
|
var aValues = oCondition.values;
|
|
@@ -100,26 +100,30 @@ function(
|
|
|
100
100
|
vValue = "";
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
if (i == 0
|
|
103
|
+
if (i == 0) {
|
|
104
104
|
// only the first value can be formatted. second value is the description string
|
|
105
|
-
sReplace =
|
|
105
|
+
sReplace = this._formatValue(vValue, oType, aCompositeTypes);
|
|
106
106
|
} else {
|
|
107
107
|
sReplace = vValue;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
if (sReplace === null) {
|
|
111
|
+
sTokenText = null; // some types (like Unit) return null if no value is given, in this case stop formating and return null
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
sTokenText = sTokenText.replace(new RegExp("\\$" + i + "|" + i + "\\$" + "|" + "\\{" + i + "\\}", "g"), sReplace);
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
return sTokenText;
|
|
114
118
|
},
|
|
115
|
-
parse: function(sText, oType, sDisplayFormat, bDefaultOperator) {
|
|
119
|
+
parse: function(sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes) {
|
|
116
120
|
sDisplayFormat = sDisplayFormat || FieldDisplay.DescriptionValue;
|
|
117
|
-
var aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator]);
|
|
121
|
+
var aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes]);
|
|
118
122
|
|
|
119
123
|
if (bDefaultOperator && (!aResult || aResult[0] === null || aResult[0] === undefined) && sDisplayFormat !== FieldDisplay.Value) {
|
|
120
124
|
// in default case and no key determined (simple-EQ case)-> use text as key (parse again to use type)
|
|
121
125
|
sDisplayFormat = FieldDisplay.Value;
|
|
122
|
-
aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator]);
|
|
126
|
+
aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes]);
|
|
123
127
|
}
|
|
124
128
|
if (aResult && (aResult[1] === null || aResult[1] === undefined) && sDisplayFormat === FieldDisplay.Value) {
|
|
125
129
|
aResult = [aResult[0]]; // only key
|
|
@@ -774,7 +778,7 @@ function(
|
|
|
774
778
|
oDate = UniversalDateUtils.getMonthStartDate(oDate);
|
|
775
779
|
return UniversalDateUtils.getRange(0, "MONTH", oDate);
|
|
776
780
|
},
|
|
777
|
-
format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
|
|
781
|
+
format: function(oCondition, oType, sDisplayFormat, bHideOperator, aCompositeTypes) {
|
|
778
782
|
var iValue = oCondition.values[0];
|
|
779
783
|
var sTokenText = this.tokenFormat;
|
|
780
784
|
var sReplace = _getMonths.apply(this)[iValue];
|
|
@@ -844,7 +848,7 @@ function(
|
|
|
844
848
|
oDate = UniversalDateUtils.getMonthStartDate(oDate);
|
|
845
849
|
return UniversalDateUtils.getRange(0, "MONTH", oDate);
|
|
846
850
|
},
|
|
847
|
-
format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
|
|
851
|
+
format: function(oCondition, oType, sDisplayFormat, bHideOperator, aCompositeTypes) {
|
|
848
852
|
var iValue = oCondition.values[0];
|
|
849
853
|
var iYear = oCondition.values[1];
|
|
850
854
|
var sTokenText = this.tokenFormat;
|