@openui5/sap.ui.mdc 1.99.0 → 1.100.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/THIRDPARTY.txt +2 -2
- 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 +50 -32
- package/src/sap/ui/mdc/ChartDelegate.js +66 -21
- package/src/sap/ui/mdc/ChartRenderer.js +1 -1
- package/src/sap/ui/mdc/Control.js +11 -6
- package/src/sap/ui/mdc/Element.js +10 -6
- package/src/sap/ui/mdc/Field.js +19 -4
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +41 -3
- package/src/sap/ui/mdc/Link.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +11 -1
- package/src/sap/ui/mdc/Table.js +73 -39
- package/src/sap/ui/mdc/TableDelegate.js +28 -1
- package/src/sap/ui/mdc/ValueHelp.js +8 -3
- package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +13 -6
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +7 -7
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +133 -25
- package/src/sap/ui/mdc/condition/Operator.js +4 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
- package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
- package/src/sap/ui/mdc/designtime/Util.js +63 -0
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
- 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 +15 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +16 -5
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
- package/src/sap/ui/mdc/field/FieldBase.js +62 -11
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -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 +4 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +5 -3
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
- 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 +5 -1
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +76 -208
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +127 -57
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +37 -19
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
- package/src/sap/ui/mdc/library.js +11 -4
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/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 +2 -1
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +20 -19
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +11 -33
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +281 -263
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -18
- package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -5
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +4 -0
- package/src/sap/ui/mdc/p13n/UIManager.js +16 -13
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +18 -14
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +4 -3
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +8 -4
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +2 -2
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +75 -27
- package/src/sap/ui/mdc/table/PropertyHelper.js +20 -13
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +86 -13
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +42 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
- package/src/sap/ui/mdc/util/DateUtil.js +32 -7
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +201 -76
- package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +5 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -4
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +13 -10
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +4 -10
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -4
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +2 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +0 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +8 -6
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
|
@@ -12,8 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
'sap/ui/mdc/library',
|
|
13
13
|
'sap/m/library',
|
|
14
14
|
"sap/ui/table/library",
|
|
15
|
-
"sap/ui/
|
|
16
|
-
"sap/ui/mdc/enum/PersistenceMode"
|
|
15
|
+
"sap/ui/thirdparty/jquery"
|
|
17
16
|
|
|
18
17
|
], function(
|
|
19
18
|
FilterableListContent,
|
|
@@ -23,8 +22,7 @@ sap.ui.define([
|
|
|
23
22
|
library,
|
|
24
23
|
mLibrary,
|
|
25
24
|
uiTableLibrary,
|
|
26
|
-
|
|
27
|
-
PersistenceMode
|
|
25
|
+
jQuery
|
|
28
26
|
) {
|
|
29
27
|
"use strict";
|
|
30
28
|
|
|
@@ -224,9 +222,7 @@ sap.ui.define([
|
|
|
224
222
|
return false;
|
|
225
223
|
},
|
|
226
224
|
getContexts: function () {
|
|
227
|
-
return oListBinding &&
|
|
228
|
-
return oInnerTable.getContextByIndex(iIndex);
|
|
229
|
-
})) || oListBinding.getContexts());
|
|
225
|
+
return oListBinding && oListBinding.getAllCurrentContexts();
|
|
230
226
|
},
|
|
231
227
|
handleListBinding: function () {
|
|
232
228
|
oListBinding.attachEvent("change", this._handleUpdateFinished.bind(this));
|
|
@@ -261,7 +257,7 @@ sap.ui.define([
|
|
|
261
257
|
* @param {object} [mSettings] Initial settings for the new control
|
|
262
258
|
* @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element using a sap.ui.mdc.Table.
|
|
263
259
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
264
|
-
* @version 1.
|
|
260
|
+
* @version 1.100.1
|
|
265
261
|
* @constructor
|
|
266
262
|
* @abstract
|
|
267
263
|
* @private
|
|
@@ -435,14 +431,12 @@ sap.ui.define([
|
|
|
435
431
|
if (oChanges.name === "table") { // outer table
|
|
436
432
|
var oTable = oChanges.child;
|
|
437
433
|
if (oChanges.mutation === "remove") {
|
|
438
|
-
Engine.getInstance().defaultProviderRegistry.detach(oTable);
|
|
439
434
|
this._oObserver.unobserve(oTable);
|
|
440
435
|
this._oTable = null;
|
|
441
436
|
this._oTableHelper = null;
|
|
442
437
|
this._addPromise("listBinding");
|
|
443
438
|
} else {
|
|
444
439
|
this._oTable = oTable;
|
|
445
|
-
Engine.getInstance().defaultProviderRegistry.attach(oTable, PersistenceMode.Transient);
|
|
446
440
|
this._oObserver.observe(oTable, {aggregations: ["_content"]});
|
|
447
441
|
this._sTableType = _getMDCTableType(oTable);
|
|
448
442
|
oTable.addDelegate({ onmouseover: function (oEvent) { // Fix m.Table itemPress
|
|
@@ -19,7 +19,8 @@ sap.ui.define([
|
|
|
19
19
|
'sap/base/strings/formatMessage',
|
|
20
20
|
'sap/base/util/merge',
|
|
21
21
|
'sap/ui/mdc/enum/SelectType',
|
|
22
|
-
'sap/base/Log'
|
|
22
|
+
'sap/base/Log',
|
|
23
|
+
'sap/ui/thirdparty/jquery'
|
|
23
24
|
], function(
|
|
24
25
|
FilterableListContent,
|
|
25
26
|
Condition,
|
|
@@ -35,7 +36,8 @@ sap.ui.define([
|
|
|
35
36
|
formatMessage,
|
|
36
37
|
merge,
|
|
37
38
|
SelectType,
|
|
38
|
-
Log
|
|
39
|
+
Log,
|
|
40
|
+
jQuery
|
|
39
41
|
) {
|
|
40
42
|
"use strict";
|
|
41
43
|
|
|
@@ -49,7 +51,7 @@ sap.ui.define([
|
|
|
49
51
|
* @param {object} [mSettings] Initial settings for the new control
|
|
50
52
|
* @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element using a sap.m.Table.
|
|
51
53
|
* @extends sap.ui.mdc.valuehelp.base.FilterableListContent
|
|
52
|
-
* @version 1.
|
|
54
|
+
* @version 1.100.1
|
|
53
55
|
* @constructor
|
|
54
56
|
* @abstract
|
|
55
57
|
* @private
|
|
@@ -188,7 +190,7 @@ sap.ui.define([
|
|
|
188
190
|
bUseFilter = false;
|
|
189
191
|
}
|
|
190
192
|
|
|
191
|
-
if (sFilterFields === "$search" && oDelegate && oDelegate.isSearchSupported(oDelegatePayload, oListBinding)){
|
|
193
|
+
if (sFilterFields === "$search" && oDelegate && oDelegate.isSearchSupported(oDelegatePayload, this, oListBinding)){
|
|
192
194
|
if (!oListBinding.isSuspended() && bUseFilter) {
|
|
193
195
|
// as we trigger two changes this would result to two requests therefore we suspend the binding
|
|
194
196
|
oListBinding.suspend();
|
|
@@ -268,6 +268,7 @@ sap.ui.define([
|
|
|
268
268
|
},
|
|
269
269
|
/**
|
|
270
270
|
* Assertion to check visible dimensions on the MDC Chart
|
|
271
|
+
* @param {array} aDimensions
|
|
271
272
|
* @param {string} sId Id of the MDC Chart
|
|
272
273
|
* @returns {Promise} OPA waitFor
|
|
273
274
|
*/
|
|
@@ -276,6 +277,7 @@ sap.ui.define([
|
|
|
276
277
|
},
|
|
277
278
|
/**
|
|
278
279
|
* Assertion to check visible measures on the MDC Chart
|
|
280
|
+
* @param {array} aMeasures
|
|
279
281
|
* @param {string} sId Id of the MDC Chart
|
|
280
282
|
* @returns {Promise} OPA waitFor
|
|
281
283
|
*/
|
|
@@ -88,7 +88,6 @@ sap.ui.define([
|
|
|
88
88
|
* </li>
|
|
89
89
|
* </ol>
|
|
90
90
|
* @param {sap.ui.core.Control | string} oFilterBar Instance / ID of the <code>FilterBar</code>
|
|
91
|
-
* @param {string} sFilterLabel Label of the <code>FilterField</code>
|
|
92
91
|
* @param {Object} mSettings Map containing the settings for the filter values. Key is the label of the given group in the <code>FilterBar</code> personalization dialog, and value is an object containing the label of the <code>FilterField</code> and the values that are entered
|
|
93
92
|
* @returns
|
|
94
93
|
*/
|
|
@@ -17,7 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
"./Util",
|
|
18
18
|
"sap/base/Log",
|
|
19
19
|
"sap/base/util/UriParameters",
|
|
20
|
-
"sap/ui/core/Core"
|
|
20
|
+
"sap/ui/core/Core",
|
|
21
|
+
"sap/ui/Device"
|
|
21
22
|
], function(
|
|
22
23
|
Opa5,
|
|
23
24
|
Matcher,
|
|
@@ -33,7 +34,8 @@ sap.ui.define([
|
|
|
33
34
|
Util,
|
|
34
35
|
Log,
|
|
35
36
|
UriParameters,
|
|
36
|
-
oCore
|
|
37
|
+
oCore,
|
|
38
|
+
Device
|
|
37
39
|
) {
|
|
38
40
|
"use strict";
|
|
39
41
|
|
|
@@ -495,7 +497,7 @@ sap.ui.define([
|
|
|
495
497
|
|
|
496
498
|
var iPersonalizeListViewItems = function(oP13nDialog, aItems) {
|
|
497
499
|
this.waitFor({
|
|
498
|
-
controlType: oP13nDialog.getContent()[0].getView("columns") && oP13nDialog.getContent()[0].getView("columns").getContent().isA("sap.
|
|
500
|
+
controlType: oP13nDialog.getContent()[0].getView("columns") && oP13nDialog.getContent()[0].getView("columns").getContent().isA("sap.m.p13n.SelectionPanel") ? "sap.m.p13n.SelectionPanel" : "sap.m.p13n.SelectionPanel",
|
|
499
501
|
matchers: new Ancestor(oP13nDialog, false),
|
|
500
502
|
success: function(aListViews) {
|
|
501
503
|
var oListView = aListViews[0];
|
|
@@ -740,16 +742,16 @@ sap.ui.define([
|
|
|
740
742
|
* 2. Selects a chart type given by <code>sChartType</code>.
|
|
741
743
|
* 3. Executes the given <code>ChartPersonalizationConfiguration</code>.
|
|
742
744
|
* 4. Closes the personalization dialog.
|
|
743
|
-
* @param {sap.ui.core.Control | string}
|
|
745
|
+
* @param {sap.ui.core.Control | string} oControl Instance / ID of the <code>SmartChart</code> that is personalized
|
|
744
746
|
* @param {string} sChartType String containing the type of chart that is displayed
|
|
745
|
-
* @param {ChartPersonalizationConfiguration[]}
|
|
747
|
+
* @param {ChartPersonalizationConfiguration[]} aItems Array containing the chart personalization configuration objects
|
|
746
748
|
* @returns {Promise} OPA waitFor
|
|
747
749
|
*/
|
|
748
750
|
iPersonalizeChart: function(oControl, sChartType, aItems) {
|
|
749
751
|
return iPersonalize.call(this, oControl, Util.texts.chart, {
|
|
750
752
|
success: function(oP13nDialog) {
|
|
751
753
|
|
|
752
|
-
//oP13nDialog.getContent()[0].getView("item") && oP13nDialog.getContent()[0].getView("item").getContent().isA("sap.
|
|
754
|
+
//oP13nDialog.getContent()[0].getView("item") && oP13nDialog.getContent()[0].getView("item").getContent().isA("sap.m.p13n.SelectionPanel")
|
|
753
755
|
if (oP13nDialog.getContent()[0].getView("dimeasure").getContent().isA("sap.m.P13nDimMeasurePanel")){
|
|
754
756
|
iPersonalizeOldChartP13n.call(this, oControl, sChartType, aItems, oP13nDialog);
|
|
755
757
|
} else {
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ! OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
sap.ui.define([
|
|
7
|
-
"sap/ui/mdc/odata/v4/FilterBarDelegate",
|
|
8
|
-
'sap/ui/base/ManagedObjectObserver'
|
|
9
|
-
], function(FilterBarDelegate, ManagedObjectObserver) {
|
|
10
|
-
"use strict";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Helper class for sap.ui.mdc.filterbar.vh.GenericFilterBarDelegate.
|
|
14
|
-
* This GenericFilterbarDelegate creates the propertyInfo based on the FilterItems of the Filterbar and does NOT load and analyse any metadata!
|
|
15
|
-
* <h3><b>Note:</b></h3>
|
|
16
|
-
* The class is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
|
|
17
|
-
*
|
|
18
|
-
* @author SAP SE
|
|
19
|
-
* @private
|
|
20
|
-
* @experimental
|
|
21
|
-
* @since 1.86
|
|
22
|
-
* @alias sap.ui.mdc.filterbar.vh.GenericFilterBarDelegate
|
|
23
|
-
*/
|
|
24
|
-
var GenericFilterBarDelegate = Object.assign({}, FilterBarDelegate);
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Fetches the relevant metadata (from the FilterItems of the FiterBar) for the FilterBar and returns property info array
|
|
28
|
-
*
|
|
29
|
-
* @param {Object} oFilterBar - instance of the valuehelp FilterBar
|
|
30
|
-
* @returns {Array} array of property info
|
|
31
|
-
*/
|
|
32
|
-
GenericFilterBarDelegate.fetchProperties = function(oFilterBar) {
|
|
33
|
-
if (!oFilterBar.__oObserver) {
|
|
34
|
-
oFilterBar.__oObserver = new ManagedObjectObserver(_observeChanges.bind(this));
|
|
35
|
-
oFilterBar.__oObserver.observe(oFilterBar, {
|
|
36
|
-
aggregations: ["filterItems"]
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return new Promise(function(fResolve) {
|
|
41
|
-
var aFilterItems = oFilterBar.getFilterItems();
|
|
42
|
-
oFilterBar.__aProperties = [];
|
|
43
|
-
aFilterItems.forEach(function(oFF){
|
|
44
|
-
addFilterField.call(this, oFF, oFilterBar.__aProperties);
|
|
45
|
-
}.bind(this));
|
|
46
|
-
|
|
47
|
-
fResolve(oFilterBar.__aProperties);
|
|
48
|
-
}.bind(this));
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
function addFilterField(oFF, aProperties) {
|
|
53
|
-
var sPath = oFF.getBindingPath("conditions");
|
|
54
|
-
if (!sPath) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
var aPathParts = sPath.split("/");
|
|
58
|
-
var sFieldPath = aPathParts[aPathParts.length - 1];
|
|
59
|
-
|
|
60
|
-
aProperties.push({
|
|
61
|
-
name: sFieldPath,
|
|
62
|
-
label: oFF.getLabel() || sFieldPath,
|
|
63
|
-
type: oFF.getDataType(),
|
|
64
|
-
formatOptions: oFF.getDataTypeFormatOptions(),
|
|
65
|
-
constraints: oFF.getDataTypeConstraints(),
|
|
66
|
-
typeConfig: this.getTypeUtil().getTypeConfig(oFF.getDataType(), oFF.getDataTypeFormatOptions(), oFF.getDataTypeConstraints()),
|
|
67
|
-
required: oFF.getRequired(),
|
|
68
|
-
hiddenFilter: false,
|
|
69
|
-
visible: oFF.getVisible(),
|
|
70
|
-
maxConditions : oFF.getMaxConditions(),
|
|
71
|
-
fieldHelp: oFF.getFieldHelp()
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function removeFilterField(oFF, aProperties) {
|
|
76
|
-
var sPath = oFF.getBindingPath("conditions");
|
|
77
|
-
if (!sPath) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function _getProperty(sName) {
|
|
82
|
-
var oNamedProperty = null;
|
|
83
|
-
aProperties.some(function(oProperty) {
|
|
84
|
-
if (oProperty.name === sName) {
|
|
85
|
-
oNamedProperty = oProperty;
|
|
86
|
-
}
|
|
87
|
-
return oNamedProperty !== null;
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
return oNamedProperty;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function _removeProperty(sName) {
|
|
94
|
-
var nIdx = -1;
|
|
95
|
-
aProperties.some(function(oProperty, index) {
|
|
96
|
-
if (oProperty.name === sName) {
|
|
97
|
-
nIdx = index;
|
|
98
|
-
}
|
|
99
|
-
return nIdx !== -1;
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
if (nIdx >= 0) {
|
|
103
|
-
aProperties.splice(nIdx, 1);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return nIdx;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
var aPathParts = sPath.split("/");
|
|
110
|
-
var sFieldPath = aPathParts[aPathParts.length - 1];
|
|
111
|
-
if (_getProperty(sFieldPath)) {
|
|
112
|
-
_removeProperty(sFieldPath);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
function _observeChanges(oChanges) {
|
|
119
|
-
var oFilterBar, aProperties;
|
|
120
|
-
|
|
121
|
-
if (oChanges.name === "filterItems") {
|
|
122
|
-
if (oChanges.mutation === "insert") {
|
|
123
|
-
var oNewFF = oChanges.child;
|
|
124
|
-
oFilterBar = oNewFF.getParent();
|
|
125
|
-
aProperties = oFilterBar.__aProperties;
|
|
126
|
-
addFilterField.call(this, oNewFF, aProperties);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (oChanges.mutation === "remove") {
|
|
130
|
-
var oRemoveFF = oChanges.child;
|
|
131
|
-
oFilterBar = oRemoveFF.getParent();
|
|
132
|
-
aProperties = oFilterBar.__aProperties;
|
|
133
|
-
removeFilterField(oRemoveFF, aProperties);
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
GenericFilterBarDelegate.cleanup = function(oFilterBar) {
|
|
140
|
-
|
|
141
|
-
if (oFilterBar.__oObserver) {
|
|
142
|
-
oFilterBar.__oObserver.disconnect();
|
|
143
|
-
delete oFilterBar.__oObserver;
|
|
144
|
-
delete oFilterBar.__aProperties;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
return GenericFilterBarDelegate;
|
|
150
|
-
});
|