@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
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* ! OpenUI5
|
|
4
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/m/p13n/QueryPanel", "sap/m/VBox", "sap/m/Text", "sap/ui/layout/Grid", "sap/ui/layout/GridData", "sap/m/Button", "sap/m/ComboBox", 'sap/base/util/merge'
|
|
9
|
+
|
|
10
|
+
], function (QueryPanel, VBox, Text, Grid, GridData, Button, ComboBox, merge) {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
var FilterPanel = QueryPanel.extend("sap.ui.mdc.p13n.panels.FilterPanel", {
|
|
14
|
+
metadata: {
|
|
15
|
+
properties: {
|
|
16
|
+
itemFactory: {
|
|
17
|
+
type: "function"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
renderer: {}
|
|
22
|
+
});
|
|
23
|
+
FilterPanel.prototype.PRESENCE_ATTRIBUTE = "active";
|
|
24
|
+
|
|
25
|
+
FilterPanel.prototype._createQueryRowGrid = function(oItem) {
|
|
26
|
+
var oSelect = oItem.name ? new VBox({
|
|
27
|
+
items:[
|
|
28
|
+
new Text({
|
|
29
|
+
text: oItem.label
|
|
30
|
+
}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin")
|
|
31
|
+
]
|
|
32
|
+
}) : this._createKeySelect(oItem.name);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
var oAddButton;
|
|
36
|
+
if (!oItem.name) {
|
|
37
|
+
oAddButton = new Button({
|
|
38
|
+
text: "Add",
|
|
39
|
+
press: this._addPressed.bind(this),
|
|
40
|
+
enabled: false
|
|
41
|
+
});
|
|
42
|
+
oAddButton.setLayoutData(new GridData({
|
|
43
|
+
indent: "XL7 L7 M7 S7",
|
|
44
|
+
span: "XL1 L1 M1 S1"
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return new Grid({
|
|
49
|
+
containerQuery: true,
|
|
50
|
+
defaultSpan: "XL4 L4 M4 S4",
|
|
51
|
+
content: [
|
|
52
|
+
oSelect, oItem.name ? this._createFactoryControl(oItem) : oAddButton
|
|
53
|
+
]
|
|
54
|
+
}).addStyleClass("sapUiTinyMargin");
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
FilterPanel.prototype._createKeySelect = function (sKey) {
|
|
58
|
+
|
|
59
|
+
var oKeySelect = new ComboBox({
|
|
60
|
+
width: "100%",
|
|
61
|
+
items: this._getAvailableItems(),
|
|
62
|
+
placeholder: "Select Filter",
|
|
63
|
+
selectionChange: this._selectKey.bind(this)
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return oKeySelect;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
FilterPanel.prototype._getAvailableItems = function (sKey) {
|
|
70
|
+
var aItems = QueryPanel.prototype._getAvailableItems.apply(this, arguments);
|
|
71
|
+
aItems.shift();
|
|
72
|
+
return aItems;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
FilterPanel.prototype._createRemoveButton = function (bVisible) {
|
|
76
|
+
var oRemoveBtn = QueryPanel.prototype._createRemoveButton.apply(this, arguments);
|
|
77
|
+
oRemoveBtn.setLayoutData(new GridData({
|
|
78
|
+
span: "XL1 L1 M1 S1"
|
|
79
|
+
}));
|
|
80
|
+
return oRemoveBtn;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
FilterPanel.prototype._addPressed = function(oEvt) {
|
|
84
|
+
this._selectKey();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
FilterPanel.prototype._selectKey = function(oEvt) {
|
|
88
|
+
var oQueryRowGrid, sKey;
|
|
89
|
+
if (oEvt) {
|
|
90
|
+
this._oEvt = merge({}, oEvt);
|
|
91
|
+
oQueryRowGrid = oEvt.oSource.getParent();
|
|
92
|
+
sKey = oEvt.oSource.getSelectedKey();
|
|
93
|
+
oQueryRowGrid.getContent()[1].setEnabled(!!sKey);
|
|
94
|
+
} else if (this._oEvt) {
|
|
95
|
+
oEvt = this._oEvt;
|
|
96
|
+
oQueryRowGrid = oEvt.oSource.getParent();
|
|
97
|
+
sKey = oEvt.oSource.getSelectedKey();
|
|
98
|
+
|
|
99
|
+
if (sKey) {
|
|
100
|
+
QueryPanel.prototype._selectKey.call(this, oEvt);
|
|
101
|
+
|
|
102
|
+
var sText = sKey ? oEvt.getParameter("selectedItem").getText() : "";
|
|
103
|
+
|
|
104
|
+
var oSelect = oQueryRowGrid.getContent()[0];
|
|
105
|
+
oQueryRowGrid.removeContent(oSelect);
|
|
106
|
+
var oAddBtn = oQueryRowGrid.getContent()[0];
|
|
107
|
+
oQueryRowGrid.removeContent(oAddBtn);
|
|
108
|
+
|
|
109
|
+
// var sKey = oSelect._key;
|
|
110
|
+
var oFieldBox = new VBox({
|
|
111
|
+
items:[
|
|
112
|
+
new Text({
|
|
113
|
+
text: sText
|
|
114
|
+
}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin")
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
oFieldBox._key = sKey;
|
|
118
|
+
|
|
119
|
+
oQueryRowGrid.insertContent(oFieldBox,0);
|
|
120
|
+
var oFilterField = this._createFactoryControl({name: sKey});
|
|
121
|
+
oQueryRowGrid.insertContent(oFilterField, 1);
|
|
122
|
+
}
|
|
123
|
+
delete this._oEvt;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
FilterPanel.prototype._createFactoryControl = function(oItem) {
|
|
128
|
+
var oField = this.getItemFactory().call(this, oItem);
|
|
129
|
+
oField.setLayoutData(new GridData({
|
|
130
|
+
span: "XL7 L7 M7 S7"
|
|
131
|
+
}));
|
|
132
|
+
return oField;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
return FilterPanel;
|
|
136
|
+
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"
|
|
7
|
+
"sap/m/p13n/BasePanel",
|
|
8
8
|
"sap/m/Label",
|
|
9
9
|
"sap/base/util/deepEqual",
|
|
10
10
|
"sap/m/CustomListItem",
|
|
@@ -15,8 +15,9 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/core/Icon",
|
|
16
16
|
"sap/ui/core/library",
|
|
17
17
|
"sap/m/HBox",
|
|
18
|
-
"sap/m/library"
|
|
19
|
-
|
|
18
|
+
"sap/m/library",
|
|
19
|
+
"sap/base/util/merge"
|
|
20
|
+
], function(BasePanel, Label, deepEqual, CustomListItem, List, Panel, Toolbar,Text, Icon, coreLibrary, HBox, mLibrary, merge) {
|
|
20
21
|
"use strict";
|
|
21
22
|
|
|
22
23
|
|
|
@@ -35,7 +36,7 @@ sap.ui.define([
|
|
|
35
36
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
36
37
|
* @param {object} [mSettings] initial settings for the new control
|
|
37
38
|
* @class The GroupView is a list based view to personalize selection and filter values of a Control that allows certain filter capabilities.
|
|
38
|
-
* @extends sap.
|
|
39
|
+
* @extends sap.m.p13n.BasePanel
|
|
39
40
|
* @author SAP SE
|
|
40
41
|
* @private
|
|
41
42
|
* @experimental
|
|
@@ -45,7 +46,12 @@ sap.ui.define([
|
|
|
45
46
|
*/
|
|
46
47
|
var GroupView = BasePanel.extend("sap.ui.mdc.p13n.panels.GroupView", {
|
|
47
48
|
metadata: {
|
|
48
|
-
library: "sap.ui.mdc"
|
|
49
|
+
library: "sap.ui.mdc",
|
|
50
|
+
properties: {
|
|
51
|
+
itemFactory: {
|
|
52
|
+
type: "function"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
49
55
|
},
|
|
50
56
|
renderer: {
|
|
51
57
|
apiVersion: 2
|
|
@@ -64,8 +70,8 @@ sap.ui.define([
|
|
|
64
70
|
//Do not read the whole content
|
|
65
71
|
//Announce tet 'Filter Group' + <grouplabel>, e.g. "Filter Group Basic"
|
|
66
72
|
formatter: function(sGroupLabel) {
|
|
67
|
-
return
|
|
68
|
-
}
|
|
73
|
+
return sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.FILTER_GROUP_DESCRIPTION", sGroupLabel);
|
|
74
|
+
}
|
|
69
75
|
},
|
|
70
76
|
content: [
|
|
71
77
|
this._createGroupPanelTemplate()
|
|
@@ -77,11 +83,12 @@ sap.ui.define([
|
|
|
77
83
|
|
|
78
84
|
this._aInitializedLists = [];
|
|
79
85
|
|
|
80
|
-
this.
|
|
86
|
+
this._setTemplate(oGroupPanelTemplate);
|
|
87
|
+
oGroupPanelTemplate.setType("Inactive");
|
|
81
88
|
this._setMoveButtonVisibility(true);
|
|
82
89
|
};
|
|
83
90
|
|
|
84
|
-
GroupView.prototype.
|
|
91
|
+
GroupView.prototype._getShowFactory = function() {
|
|
85
92
|
return this._bShowFactory;
|
|
86
93
|
};
|
|
87
94
|
|
|
@@ -116,9 +123,9 @@ sap.ui.define([
|
|
|
116
123
|
var oSource = oEvt.getSource();
|
|
117
124
|
var oInnerList = oSource.getContent()[0];
|
|
118
125
|
this._addInitializedList(oInnerList);
|
|
119
|
-
if (this.
|
|
126
|
+
if (this._getShowFactory()){
|
|
120
127
|
this._addFactoryControl(oInnerList);
|
|
121
|
-
this.
|
|
128
|
+
this.filterContent(this._aCurrentFilters);// --> check if there is already an existing Filter
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
}.bind(this),
|
|
@@ -144,16 +151,18 @@ sap.ui.define([
|
|
|
144
151
|
GroupView.prototype._createGroupListTemplate = function() {
|
|
145
152
|
var oList = new List({
|
|
146
153
|
keyboardMode: ListKeyboardMode.Navigation,
|
|
147
|
-
selectionChange: function(
|
|
148
|
-
var sPath =
|
|
149
|
-
var oItem = this.
|
|
154
|
+
selectionChange: function(oEvent) {
|
|
155
|
+
var sPath = oEvent.getParameter("listItem").getBindingContext(this.P13N_MODEL).sPath;
|
|
156
|
+
var oItem = this._getP13nModel().getProperty(sPath);
|
|
150
157
|
var oP13nModel = this.getModel(this.P13N_MODEL);
|
|
151
158
|
//TODO: remove 'selected' condition enhance
|
|
152
159
|
if (oP13nModel && oItem) {
|
|
153
160
|
oP13nModel.setProperty(sPath + "/selected", oItem.visible);
|
|
154
161
|
}
|
|
162
|
+
var sSpecialChangeReason = this._checkSpecialChangeReason(oEvent.getParameter("selectAll"), oEvent.getParameter("listItems"));
|
|
163
|
+
|
|
155
164
|
this.fireChange({
|
|
156
|
-
reason: oItem.visible ?
|
|
165
|
+
reason: sSpecialChangeReason || (oItem.visible ? this.CHANGE_REASON_ADD : this.CHANGE_REASON_REMOVE),
|
|
157
166
|
item: oItem
|
|
158
167
|
});
|
|
159
168
|
}.bind(this),
|
|
@@ -245,7 +254,7 @@ sap.ui.define([
|
|
|
245
254
|
size: "0.5rem",
|
|
246
255
|
color: IconColor.Neutral,
|
|
247
256
|
visible: {
|
|
248
|
-
path: this.P13N_MODEL + ">
|
|
257
|
+
path: this.P13N_MODEL + ">active",
|
|
249
258
|
formatter: function(bIsFiltered) {
|
|
250
259
|
if (bIsFiltered){
|
|
251
260
|
return true;
|
|
@@ -273,7 +282,7 @@ sap.ui.define([
|
|
|
273
282
|
oList.getItems().forEach(function(oItem){
|
|
274
283
|
|
|
275
284
|
var sPath = oItem.getBindingContextPath();
|
|
276
|
-
var sKey = this.
|
|
285
|
+
var sKey = this._getP13nModel().getProperty(sPath).name;
|
|
277
286
|
|
|
278
287
|
fnItemCallback.call(this, oItem, sKey);
|
|
279
288
|
}.bind(this));
|
|
@@ -332,7 +341,7 @@ sap.ui.define([
|
|
|
332
341
|
return aSelectedItems;
|
|
333
342
|
};
|
|
334
343
|
|
|
335
|
-
GroupView.prototype.
|
|
344
|
+
GroupView.prototype.filterContent = function(aFilter) {
|
|
336
345
|
if (!this._bInitialized || deepEqual(aFilter, this._aCurrentFilters)) {
|
|
337
346
|
return;
|
|
338
347
|
}
|
|
@@ -348,7 +357,7 @@ sap.ui.define([
|
|
|
348
357
|
this._togglePanelVisibility(oPanel);
|
|
349
358
|
}
|
|
350
359
|
|
|
351
|
-
if (this.
|
|
360
|
+
if (this._getShowFactory() && aInitializedGroups.indexOf(oInnerList.getId()) > -1) {
|
|
352
361
|
this._addFactoryControl(oInnerList);
|
|
353
362
|
}
|
|
354
363
|
}.bind(this));
|
|
@@ -382,7 +391,7 @@ sap.ui.define([
|
|
|
382
391
|
this._oListControl.getItems().forEach(function(oOuterItem){
|
|
383
392
|
var oPanel = oOuterItem.getContent()[0];
|
|
384
393
|
var sBindingPath = oPanel.getBindingContext(this.P13N_MODEL).sPath;
|
|
385
|
-
var oItem = this.
|
|
394
|
+
var oItem = this._getP13nModel().getProperty(sBindingPath);
|
|
386
395
|
if (oItem.group === sGroup) {
|
|
387
396
|
oPanel.setExpanded(bExpand);
|
|
388
397
|
}
|
|
@@ -396,14 +405,18 @@ sap.ui.define([
|
|
|
396
405
|
if (oContext){
|
|
397
406
|
var sPanelBindingContextPath = oContext.sPath;
|
|
398
407
|
|
|
399
|
-
var oItem = this.
|
|
408
|
+
var oItem = this._getP13nModel().getProperty(sPanelBindingContextPath);
|
|
400
409
|
oItem.groupVisible = oInnerList.getVisibleItems().length < 1 ? false : true;
|
|
401
410
|
|
|
402
|
-
this.
|
|
411
|
+
this._getP13nModel().setProperty(sPanelBindingContextPath, oItem);
|
|
403
412
|
}
|
|
404
413
|
|
|
405
414
|
};
|
|
406
415
|
|
|
416
|
+
GroupView.prototype.getItems = function() {
|
|
417
|
+
return this._oListControl.getItems();
|
|
418
|
+
};
|
|
419
|
+
|
|
407
420
|
GroupView.prototype._checkFirstGroup = function() {
|
|
408
421
|
|
|
409
422
|
//One time operation for the first panel in the group view
|
|
@@ -429,32 +442,44 @@ sap.ui.define([
|
|
|
429
442
|
|
|
430
443
|
this._oListControl.getInfoToolbar().addContent(new Text({
|
|
431
444
|
width: "75%",
|
|
432
|
-
text:
|
|
445
|
+
text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.LIST_VIEW_COLUMN")
|
|
433
446
|
}).addStyleClass("firstColumnPadding"));
|
|
434
447
|
|
|
435
448
|
if (!this._bShowFactory) {
|
|
436
449
|
this._oListControl.getInfoToolbar().addContent(new Text({
|
|
437
450
|
textAlign: "Center",
|
|
438
451
|
width: "25%",
|
|
439
|
-
text:
|
|
452
|
+
text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.LIST_VIEW_ACTIVE")
|
|
440
453
|
}).addStyleClass("firstColumnPadding"));
|
|
441
454
|
}
|
|
442
455
|
|
|
443
456
|
};
|
|
444
457
|
|
|
445
|
-
GroupView.prototype.
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
458
|
+
GroupView.prototype.setP13nData = function(aP13nData) {
|
|
459
|
+
this._getP13nModel().setProperty("/itemsGrouped", aP13nData);
|
|
460
|
+
if (!this._bInitialized) {
|
|
461
|
+
this._bindListItems();
|
|
462
|
+
}
|
|
448
463
|
this._checkFirstGroup();
|
|
449
464
|
this._checkAllPanels();
|
|
450
465
|
};
|
|
451
466
|
|
|
467
|
+
GroupView.prototype.getP13nData = function (bOnlyActive) {
|
|
468
|
+
var aItems = this._getP13nModel().getProperty("/itemsGrouped");
|
|
469
|
+
if (bOnlyActive) {
|
|
470
|
+
aItems = aItems.filter(function(oItem){
|
|
471
|
+
return oItem[this.PRESENCE_ATTRIBUTE];
|
|
472
|
+
}.bind(this));
|
|
473
|
+
}
|
|
474
|
+
return aItems;
|
|
475
|
+
};
|
|
476
|
+
|
|
452
477
|
GroupView.prototype._bindListItems = function () {
|
|
453
478
|
this._oListControl.bindItems(Object.assign({
|
|
454
479
|
path: this.P13N_MODEL + ">/itemsGrouped",
|
|
455
480
|
templateShareable: false,
|
|
456
481
|
key: "group",
|
|
457
|
-
template: this.
|
|
482
|
+
template: this.getAggregation("_template").clone()
|
|
458
483
|
}));
|
|
459
484
|
};
|
|
460
485
|
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/m/p13n/SelectionPanel",
|
|
9
9
|
"sap/m/ColumnListItem",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
"sap/m/HBox",
|
|
11
|
+
"sap/m/VBox",
|
|
12
12
|
"sap/m/Link",
|
|
13
13
|
"sap/m/Text",
|
|
14
14
|
"sap/ui/core/Icon",
|
|
15
15
|
"sap/m/library",
|
|
16
|
-
"sap/m/
|
|
17
|
-
|
|
16
|
+
"sap/m/OverflowToolbar",
|
|
17
|
+
"sap/ui/model/Filter"
|
|
18
|
+
], function (SelectionPanel, ColumnListItem, HBox, VBox, Link, Text, Icon, mLibrary, OverflowToolbar, Filter) {
|
|
18
19
|
"use strict";
|
|
19
20
|
|
|
20
21
|
// shortcut for sap.m.ListType
|
|
@@ -40,25 +41,49 @@ sap.ui.define([
|
|
|
40
41
|
selected: "{" + this.P13N_MODEL + ">" + this.PRESENCE_ATTRIBUTE + "}",
|
|
41
42
|
type: ListType.Active,
|
|
42
43
|
cells: [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
new HBox({
|
|
45
|
+
items: [
|
|
46
|
+
new VBox({
|
|
47
|
+
items: [
|
|
48
|
+
new Link({
|
|
49
|
+
tooltip: "{" + this.P13N_MODEL + ">tooltip}",
|
|
50
|
+
text: "{" + this.P13N_MODEL + ">text}",
|
|
51
|
+
href: "{" + this.P13N_MODEL + ">href}",
|
|
52
|
+
target: "{" + this.P13N_MODEL + ">target}",
|
|
53
|
+
press: this._onLinkPressed.bind(this)
|
|
54
|
+
}),
|
|
55
|
+
new Text({
|
|
56
|
+
text: "{" + this.P13N_MODEL + ">description}",
|
|
57
|
+
visible: "{= ${" + this.P13N_MODEL + ">description} ? true:false}"
|
|
58
|
+
})
|
|
59
|
+
]
|
|
55
60
|
})
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
]
|
|
62
|
+
})
|
|
58
63
|
]
|
|
59
64
|
});
|
|
60
65
|
};
|
|
61
66
|
|
|
67
|
+
LinkSelectionPanel.prototype.setShowHeader = function(bShowHeader) {
|
|
68
|
+
if (bShowHeader){
|
|
69
|
+
this._oListControl.setHeaderToolbar(new OverflowToolbar({
|
|
70
|
+
content: [
|
|
71
|
+
this._getSearchField()
|
|
72
|
+
]
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
this.setProperty("showHeader", bShowHeader);
|
|
76
|
+
return this;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
LinkSelectionPanel.prototype._getSearchField = function() {
|
|
80
|
+
var oSearchField = SelectionPanel.prototype._getSearchField.apply(this, arguments);
|
|
81
|
+
|
|
82
|
+
oSearchField.getLayoutData().setMaxWidth(undefined);
|
|
83
|
+
|
|
84
|
+
return oSearchField;
|
|
85
|
+
};
|
|
86
|
+
|
|
62
87
|
LinkSelectionPanel.prototype._onLinkPressed = function(oEvent) {
|
|
63
88
|
this.fireLinkPressed(oEvent);
|
|
64
89
|
};
|
|
@@ -67,6 +92,17 @@ sap.ui.define([
|
|
|
67
92
|
this._oListControl.setMultiSelectMode(sMultiSelectMode);
|
|
68
93
|
};
|
|
69
94
|
|
|
95
|
+
LinkSelectionPanel.prototype._filterList = function(bShowSelected, sSarch) {
|
|
96
|
+
var oSearchFilter = [], oSelectedFilter = [];
|
|
97
|
+
if (bShowSelected) {
|
|
98
|
+
oSelectedFilter = new Filter(this.PRESENCE_ATTRIBUTE, "EQ", true);
|
|
99
|
+
}
|
|
100
|
+
if (sSarch) {
|
|
101
|
+
oSearchFilter = new Filter("text", "Contains", sSarch);
|
|
102
|
+
}
|
|
103
|
+
this._oListControl.getBinding("items").filter(new Filter([].concat(oSelectedFilter, oSearchFilter), true));
|
|
104
|
+
};
|
|
105
|
+
|
|
70
106
|
return LinkSelectionPanel;
|
|
71
107
|
|
|
72
108
|
});
|
|
@@ -27,14 +27,11 @@ sap.ui.define([
|
|
|
27
27
|
showHeader: true
|
|
28
28
|
});
|
|
29
29
|
oSelectionPanel.setEnableReorder(false);
|
|
30
|
-
oSelectionPanel.
|
|
31
|
-
width: "25%",
|
|
32
|
-
hAlign: "Center",
|
|
33
|
-
vAlign: "Middle"
|
|
34
|
-
})]);
|
|
35
|
-
var oAdaptationModel = this._getP13nModel(oPropertyHelper);
|
|
36
|
-
oSelectionPanel.setP13nModel(oAdaptationModel);
|
|
30
|
+
oSelectionPanel.setFieldColumn(oResourceBundle.getText("actiontoolbar.RTA_COLUMN_HEADER"));
|
|
37
31
|
|
|
32
|
+
var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
|
|
33
|
+
oSelectionPanel.setP13nData(oAdaptationData.items);
|
|
34
|
+
this._oPanel = oSelectionPanel;
|
|
38
35
|
return Promise.resolve(oSelectionPanel);
|
|
39
36
|
};
|
|
40
37
|
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
|
|
54
54
|
return this.getAdaptationControl().retrieveInbuiltFilter().then(function(oAdaptationFilterBar){
|
|
55
55
|
var oAdaptationModel = this._getP13nModel(oPropertyHelper);
|
|
56
|
-
oAdaptationFilterBar.
|
|
56
|
+
oAdaptationFilterBar.setP13nData(oAdaptationModel.oData);
|
|
57
57
|
oAdaptationFilterBar.setLiveMode(false);
|
|
58
58
|
return oAdaptationFilterBar.createFilterFields().then(function(){
|
|
59
59
|
return oAdaptationFilterBar;
|
|
@@ -79,7 +79,6 @@ sap.ui.define([
|
|
|
79
79
|
var aExistingFilters = mExistingFilters[oProperty.name];
|
|
80
80
|
oItem.visible = oExistingProperty ? true : false;
|
|
81
81
|
oItem.visibleInDialog = true;
|
|
82
|
-
oItem.selected = oItem.visible;
|
|
83
82
|
oItem.position = oExistingProperty ? oExistingProperty.position : -1;
|
|
84
83
|
oItem.isFiltered = aExistingFilters && aExistingFilters.length > 0 ? true : false;
|
|
85
84
|
oItem.required = oProperty.required;
|
|
@@ -96,11 +96,15 @@ sap.ui.define([
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
+
FilterController.prototype._getPresenceAttribute = function(bexternalAppliance){
|
|
100
|
+
return "isFiltered";
|
|
101
|
+
};
|
|
102
|
+
|
|
99
103
|
FilterController.prototype.getAdaptationUI = function (oPropertyHelper, oWrapper) {
|
|
100
104
|
var oAdaptationModel = this._getP13nModel(oPropertyHelper);
|
|
101
105
|
|
|
102
106
|
return this.getAdaptationControl().retrieveInbuiltFilter().then(function(oAdaptationFilterBar){
|
|
103
|
-
oAdaptationFilterBar.
|
|
107
|
+
oAdaptationFilterBar.setP13nData(oAdaptationModel.oData);
|
|
104
108
|
oAdaptationFilterBar.setLiveMode(false);
|
|
105
109
|
this._oAdaptationFB = oAdaptationFilterBar;
|
|
106
110
|
return oAdaptationFilterBar.createFilterFields().then(function(){
|
|
@@ -121,8 +125,8 @@ sap.ui.define([
|
|
|
121
125
|
FilterController.prototype.model2State = function() {
|
|
122
126
|
var oItems = {},
|
|
123
127
|
oFilter = this.getCurrentState();
|
|
124
|
-
|
|
125
|
-
if (oItem.
|
|
128
|
+
this._oAdaptationModel.getProperty("/items").forEach(function(oItem) {
|
|
129
|
+
if (oItem.active && Object.keys(oFilter).includes(oItem.name)) {
|
|
126
130
|
oItems[oItem.name] = oFilter[oItem.name];
|
|
127
131
|
}
|
|
128
132
|
});
|
|
@@ -139,7 +143,7 @@ sap.ui.define([
|
|
|
139
143
|
var sName = oProperty.name;
|
|
140
144
|
|
|
141
145
|
var aExistingFilters = mExistingFilters[sName];
|
|
142
|
-
mItem.
|
|
146
|
+
mItem.active = aExistingFilters && aExistingFilters.length > 0 ? true : false;
|
|
143
147
|
|
|
144
148
|
return !(oProperty.filterable === false);
|
|
145
149
|
});
|
|
@@ -40,6 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
|
|
41
41
|
LinkPanelController.prototype.getAdaptationUI = function(oPropertyHelper) {
|
|
42
42
|
var oSelectionPanel = new SelectionPanel({
|
|
43
|
+
showHeader: true,
|
|
43
44
|
fieldColumn: oResourceBundle.getText("info.SELECTION_DIALOG_COLUMNHEADER_WITHOUT_COUNT"),
|
|
44
45
|
enableCount: true,
|
|
45
46
|
linkPressed: this._onLinkPressed.bind(this)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
'./BaseController', 'sap/ui/mdc/p13n/P13nBuilder', 'sap/
|
|
9
|
-
], function (BaseController, P13nBuilder,
|
|
8
|
+
'./BaseController', 'sap/ui/mdc/p13n/P13nBuilder', 'sap/m/p13n/SortPanel'
|
|
9
|
+
], function (BaseController, P13nBuilder, SortPanel) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
var SortController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.SortController", {
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* {@link sap.ui.mdc.table.Column#getCreationTemplate creationTemplate} aggregation of the {@link sap.ui.mdc.table.Column}.
|
|
22
22
|
* @extends sap.ui.core.Element
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.100.1
|
|
25
25
|
* @constructor
|
|
26
26
|
* @experimental
|
|
27
27
|
* @private
|