@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.
Files changed (173) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +4 -4
  3. package/src/sap/ui/mdc/.library +1 -1
  4. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  5. package/src/sap/ui/mdc/Chart.js +50 -32
  6. package/src/sap/ui/mdc/ChartDelegate.js +66 -21
  7. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  8. package/src/sap/ui/mdc/Control.js +11 -6
  9. package/src/sap/ui/mdc/Element.js +10 -6
  10. package/src/sap/ui/mdc/Field.js +19 -4
  11. package/src/sap/ui/mdc/FilterBar.js +1 -1
  12. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  13. package/src/sap/ui/mdc/FilterField.js +41 -3
  14. package/src/sap/ui/mdc/Link.js +3 -3
  15. package/src/sap/ui/mdc/MultiValueField.js +11 -1
  16. package/src/sap/ui/mdc/Table.js +73 -39
  17. package/src/sap/ui/mdc/TableDelegate.js +28 -1
  18. package/src/sap/ui/mdc/ValueHelp.js +8 -3
  19. package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
  20. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  21. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  22. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  23. package/src/sap/ui/mdc/chart/ChartToolbar.js +13 -6
  24. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +7 -7
  25. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  26. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  27. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  28. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  29. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  30. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  31. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +133 -25
  32. package/src/sap/ui/mdc/condition/Operator.js +4 -2
  33. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
  34. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  35. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  36. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  37. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +3 -0
  38. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  39. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
  40. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  41. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  42. package/src/sap/ui/mdc/field/ConditionType.js +15 -4
  43. package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
  44. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  45. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  46. package/src/sap/ui/mdc/field/DefineConditionPanel.js +16 -5
  47. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  48. package/src/sap/ui/mdc/field/FieldBase.js +62 -11
  49. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
  50. package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
  51. package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -1
  52. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  53. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  54. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  55. package/src/sap/ui/mdc/field/FieldValueHelp.js +4 -1
  56. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  57. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  58. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
  59. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +5 -3
  60. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
  62. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  63. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  64. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  65. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  66. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  67. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  68. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  69. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  70. package/src/sap/ui/mdc/field/content/ContentFactory.js +5 -1
  71. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  72. package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
  73. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +76 -208
  74. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  75. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +127 -57
  76. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  77. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  78. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  79. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +37 -19
  80. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  81. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  82. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  83. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  84. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
  85. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  86. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  87. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  88. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  89. package/src/sap/ui/mdc/library.js +11 -4
  90. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  91. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  92. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  93. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  94. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  95. package/src/sap/ui/mdc/link/Factory.js +1 -1
  96. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  97. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  98. package/src/sap/ui/mdc/link/Panel.js +1 -1
  99. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  100. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  101. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  102. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  103. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  104. package/src/sap/ui/mdc/messagebundle.properties +2 -1
  105. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +20 -19
  106. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  107. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  108. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  109. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
  110. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  111. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  112. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  113. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  114. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +11 -33
  115. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  116. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
  117. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +281 -263
  118. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  119. package/src/sap/ui/mdc/p13n/Engine.js +21 -18
  120. package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -5
  121. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  122. package/src/sap/ui/mdc/p13n/StateUtil.js +4 -0
  123. package/src/sap/ui/mdc/p13n/UIManager.js +16 -13
  124. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +18 -14
  125. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
  126. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  127. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  128. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +4 -3
  129. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
  130. package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
  131. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  132. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  133. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  134. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
  135. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +8 -4
  136. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  137. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +2 -2
  138. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  139. package/src/sap/ui/mdc/table/GridTableType.js +75 -27
  140. package/src/sap/ui/mdc/table/PropertyHelper.js +20 -13
  141. package/src/sap/ui/mdc/table/ResponsiveTableType.js +86 -13
  142. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  143. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  144. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  145. package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
  146. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
  147. package/src/sap/ui/mdc/util/DateUtil.js +32 -7
  148. package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
  149. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  150. package/src/sap/ui/mdc/util/PropertyHelper.js +201 -76
  151. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  152. package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
  153. package/src/sap/ui/mdc/valuehelp/Popover.js +5 -3
  154. package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
  155. package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
  156. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  157. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -4
  158. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  159. package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
  160. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
  161. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +13 -10
  162. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +4 -10
  163. package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -4
  164. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +2 -0
  165. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +0 -1
  166. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +8 -6
  167. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  168. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  169. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  170. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  171. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  172. package/src/sap/ui/mdc/ui/Container.js +0 -240
  173. 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
- "./BasePanel",
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
- ], function(BasePanel, Label, deepEqual, CustomListItem, List, Panel, Toolbar,Text, Icon, coreLibrary, HBox, mLibrary) {
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.ui.mdc.p13n.panels.BasePanel
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 this.getResourceText("p13nDialog.FILTER_GROUP_DESCRIPTION", sGroupLabel);
68
- }.bind(this)
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.setTemplate(oGroupPanelTemplate);
86
+ this._setTemplate(oGroupPanelTemplate);
87
+ oGroupPanelTemplate.setType("Inactive");
81
88
  this._setMoveButtonVisibility(true);
82
89
  };
83
90
 
84
- GroupView.prototype.getShowFactory = function() {
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.getShowFactory()){
126
+ if (this._getShowFactory()){
120
127
  this._addFactoryControl(oInnerList);
121
- this.filterWithoutDestroy(this._aCurrentFilters);// --> check if there is already an existing Filter
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(oBindingInfo) {
148
- var sPath = oBindingInfo.getParameter("listItem").getBindingContext(this.P13N_MODEL).sPath;
149
- var oItem = this.getP13nModel().getProperty(sPath);
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 ? "Add" : "Remove",
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 + ">isFiltered",
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.getP13nModel().getProperty(sPath).name;
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.filterWithoutDestroy = function(aFilter) {
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.getShowFactory() && aInitializedGroups.indexOf(oInnerList.getId()) > -1) {
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.getP13nModel().getProperty(sBindingPath);
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.getP13nModel().getProperty(sPanelBindingContextPath);
408
+ var oItem = this._getP13nModel().getProperty(sPanelBindingContextPath);
400
409
  oItem.groupVisible = oInnerList.getVisibleItems().length < 1 ? false : true;
401
410
 
402
- this.getP13nModel().setProperty(sPanelBindingContextPath, oItem);
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: this.getResourceText("p13nDialog.LIST_VIEW_COLUMN")
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: this.getResourceText("p13nDialog.LIST_VIEW_ACTIVE")
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.setP13nModel = function(oModel) {
446
- this.setModel(oModel, this.P13N_MODEL);
447
- this._bindListItems();
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.getTemplate().clone()
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
- "sap/m/HBox",
11
- "sap/m/VBox",
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/MessageBox"
17
- ], function (SelectionPanel, ColumnListItem, HBox, VBox, Link, Text, Icon, mLibrary, MessageBox) {
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
- new VBox({
44
- items: [
45
- new Link({
46
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
47
- text: "{" + this.P13N_MODEL + ">text}",
48
- href: "{" + this.P13N_MODEL + ">href}",
49
- target: "{" + this.P13N_MODEL + ">target}",
50
- press: this._onLinkPressed.bind(this)
51
- }),
52
- new Text({
53
- text: "{" + this.P13N_MODEL + ">description}",
54
- visible: "{= ${" + this.P13N_MODEL + ">description} ? true:false}"
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.setPanelColumns([oResourceBundle.getText("actiontoolbar.RTA_COLUMN_HEADER"), new Column({
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.setP13nModel(oAdaptationModel);
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;
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.base.Object
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.99.0
31
+ * @version 1.100.1
32
32
  *
33
33
  * @private
34
34
  * @ui5-restricted sap.ui.mdc
@@ -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.setP13nModel(oAdaptationModel);
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
- this._oAdaptationModel.getProperty("/items").forEach(function(oItem) {
125
- if (oItem.isFiltered && Object.keys(oFilter).includes(oItem.name)) {
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.isFiltered = aExistingFilters && aExistingFilters.length > 0 ? true : false;
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/ui/mdc/p13n/panels/SortPanel', 'sap/m/p13n/SortPanel'
9
- ], function (BaseController, P13nBuilder, SortPanelOld, SortPanel) {
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.99.0
24
+ * @version 1.100.1
25
25
  * @constructor
26
26
  * @experimental
27
27
  * @private