@openui5/sap.ui.mdc 1.94.0 → 1.95.0

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 (178) hide show
  1. package/.reuse/dep5 +1 -6
  2. package/THIRDPARTY.txt +3 -9
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  6. package/src/sap/ui/mdc/Chart.js +12 -5
  7. package/src/sap/ui/mdc/ChartNew.js +1 -1
  8. package/src/sap/ui/mdc/Control.js +1 -1
  9. package/src/sap/ui/mdc/Element.js +2 -2
  10. package/src/sap/ui/mdc/Field.js +2 -2
  11. package/src/sap/ui/mdc/FilterBar.js +1 -1
  12. package/src/sap/ui/mdc/FilterField.js +28 -4
  13. package/src/sap/ui/mdc/Link.js +1 -1
  14. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  15. package/src/sap/ui/mdc/Table.js +44 -29
  16. package/src/sap/ui/mdc/ValueHelp.js +1459 -0
  17. package/src/sap/ui/mdc/ValueHelpDelegate.js +41 -0
  18. package/src/sap/ui/mdc/chart/ToolbarHandler.js +233 -224
  19. package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
  20. package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +1 -1
  21. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
  22. package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
  23. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  24. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  25. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  26. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  27. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
  28. package/src/sap/ui/mdc/condition/Operator.js +1 -1
  29. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  30. package/src/sap/ui/mdc/enum/SelectType.js +43 -0
  31. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  32. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  33. package/src/sap/ui/mdc/field/ConditionType.js +61 -29
  34. package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
  35. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  36. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  37. package/src/sap/ui/mdc/field/DefineConditionPanel.js +13 -2
  38. package/src/sap/ui/mdc/field/FieldBase.js +81 -35
  39. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
  40. package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
  41. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  42. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  43. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  44. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  45. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
  46. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  47. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  48. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
  49. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
  50. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  51. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  52. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  53. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  54. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  55. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  56. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  57. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +17 -9
  58. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  59. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
  60. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  61. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  62. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  63. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  64. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
  65. package/src/sap/ui/mdc/library.js +576 -4
  66. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  67. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  68. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  69. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  70. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  71. package/src/sap/ui/mdc/link/Factory.js +1 -1
  72. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  73. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  74. package/src/sap/ui/mdc/link/Panel.js +1 -1
  75. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  76. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  77. package/src/sap/ui/mdc/link/SelectionDialog.js +1 -1
  78. package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
  79. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  80. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  81. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  82. package/src/sap/ui/mdc/messagebundle.properties +10 -3
  83. package/src/sap/ui/mdc/messagebundle_ar.properties +10 -3
  84. package/src/sap/ui/mdc/messagebundle_bg.properties +9 -2
  85. package/src/sap/ui/mdc/messagebundle_ca.properties +9 -2
  86. package/src/sap/ui/mdc/messagebundle_cs.properties +11 -4
  87. package/src/sap/ui/mdc/messagebundle_cy.properties +9 -2
  88. package/src/sap/ui/mdc/messagebundle_da.properties +9 -2
  89. package/src/sap/ui/mdc/messagebundle_de.properties +9 -2
  90. package/src/sap/ui/mdc/messagebundle_el.properties +10 -3
  91. package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
  92. package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -2
  93. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -2
  94. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -2
  95. package/src/sap/ui/mdc/messagebundle_es.properties +33 -26
  96. package/src/sap/ui/mdc/messagebundle_es_MX.properties +9 -2
  97. package/src/sap/ui/mdc/messagebundle_et.properties +9 -2
  98. package/src/sap/ui/mdc/messagebundle_fi.properties +10 -3
  99. package/src/sap/ui/mdc/messagebundle_fr.properties +16 -9
  100. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +9 -2
  101. package/src/sap/ui/mdc/messagebundle_hi.properties +9 -2
  102. package/src/sap/ui/mdc/messagebundle_hr.properties +9 -2
  103. package/src/sap/ui/mdc/messagebundle_hu.properties +10 -3
  104. package/src/sap/ui/mdc/messagebundle_id.properties +9 -2
  105. package/src/sap/ui/mdc/messagebundle_it.properties +32 -25
  106. package/src/sap/ui/mdc/messagebundle_iw.properties +9 -2
  107. package/src/sap/ui/mdc/messagebundle_ja.properties +9 -2
  108. package/src/sap/ui/mdc/messagebundle_kk.properties +9 -2
  109. package/src/sap/ui/mdc/messagebundle_ko.properties +9 -2
  110. package/src/sap/ui/mdc/messagebundle_lt.properties +9 -2
  111. package/src/sap/ui/mdc/messagebundle_lv.properties +9 -2
  112. package/src/sap/ui/mdc/messagebundle_ms.properties +9 -2
  113. package/src/sap/ui/mdc/messagebundle_nl.properties +10 -3
  114. package/src/sap/ui/mdc/messagebundle_no.properties +16 -9
  115. package/src/sap/ui/mdc/messagebundle_pl.properties +13 -6
  116. package/src/sap/ui/mdc/messagebundle_pt.properties +9 -2
  117. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +9 -2
  118. package/src/sap/ui/mdc/messagebundle_ro.properties +12 -5
  119. package/src/sap/ui/mdc/messagebundle_ru.properties +9 -2
  120. package/src/sap/ui/mdc/messagebundle_sh.properties +9 -2
  121. package/src/sap/ui/mdc/messagebundle_sk.properties +10 -3
  122. package/src/sap/ui/mdc/messagebundle_sl.properties +9 -2
  123. package/src/sap/ui/mdc/messagebundle_sv.properties +10 -3
  124. package/src/sap/ui/mdc/messagebundle_th.properties +15 -8
  125. package/src/sap/ui/mdc/messagebundle_tr.properties +9 -2
  126. package/src/sap/ui/mdc/messagebundle_uk.properties +9 -2
  127. package/src/sap/ui/mdc/messagebundle_vi.properties +9 -2
  128. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -2
  129. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +9 -2
  130. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  131. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  132. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  133. package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
  134. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
  135. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
  136. package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
  137. package/src/sap/ui/mdc/p13n/Engine.js +1 -1
  138. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  139. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  140. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +2 -2
  141. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
  142. package/src/sap/ui/mdc/p13n/panels/ListView.js +1 -1
  143. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +1 -1
  144. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
  145. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
  146. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
  147. package/src/sap/ui/mdc/table/Column.js +20 -4
  148. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  149. package/src/sap/ui/mdc/table/PropertyHelper.js +176 -4
  150. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  151. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  152. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +51 -21
  153. package/src/sap/ui/mdc/ui/Container.js +2 -2
  154. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  155. package/src/sap/ui/mdc/util/Common.js +26 -0
  156. package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
  157. package/src/sap/ui/mdc/util/PropertyHelper.js +19 -1
  158. package/src/sap/ui/mdc/valuehelp/Dialog.js +475 -0
  159. package/src/sap/ui/mdc/valuehelp/Popover.js +346 -0
  160. package/src/sap/ui/mdc/valuehelp/base/Container.js +440 -0
  161. package/src/sap/ui/mdc/valuehelp/base/Content.js +442 -0
  162. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +96 -0
  163. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +537 -0
  164. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +105 -0
  165. package/src/sap/ui/mdc/valuehelp/content/Bool.js +232 -0
  166. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +250 -0
  167. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +504 -0
  168. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +619 -0
  169. package/src/sap/ui/mdc/valuehelp/content/MTable.js +881 -0
  170. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -2
  171. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
  172. package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
  173. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
  174. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
  175. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +239 -77
  176. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
  177. package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
  178. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
package/.reuse/dep5 CHANGED
@@ -309,7 +309,7 @@ License: MIT
309
309
  Comment: these files belong to: lodash
310
310
 
311
311
  Files: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
312
- Copyright: 2018 Mathias Nater
312
+ Copyright: 2021 Mathias Nater
313
313
  License: MIT
314
314
  Comment: these files belong to: Hyphenopoly
315
315
 
@@ -347,11 +347,6 @@ Copyright: 2013 Ariya Hidayat and other contributors
347
347
  License: BSD-2-Clause
348
348
  Comment: these files belong to: Esprima
349
349
 
350
- Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
351
- Copyright: 2006 Google Inc.
352
- License: Apache-2.0
353
- Comment: these files belong to: google-code-prettify
354
-
355
350
  Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/highlight.js/*
356
351
  Copyright: 2006-2020, Ivan Sagalaev
357
352
  License: BSD-3-Clause
package/THIRDPARTY.txt CHANGED
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
6
6
 
7
7
  Library: sap.ui.codeeditor:
8
8
 
9
- Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.4
9
+ Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.12
10
10
  Copyright: 2010, Ajax.org B.V.
11
11
  License: BSD-3-Clause
12
12
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
@@ -279,8 +279,8 @@ License: MIT
279
279
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
280
280
  Contained in: src/sap.ui.core/src/sap/ui/base/util/restricted/_/lodash.custom.js
281
281
 
282
- Component: Hyphenopoly, version: 2.4.0
283
- Copyright: 2018 Mathias Nater
282
+ Component: Hyphenopoly, version: 3.4.0
283
+ Copyright: 2021 Mathias Nater
284
284
  License: MIT
285
285
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
286
286
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
@@ -324,12 +324,6 @@ License: BSD-2-Clause
324
324
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-2-Clause.txt
325
325
  Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/esprima.js
326
326
 
327
- Component: google-code-prettify, version: 20130304
328
- Copyright: 2006 Google Inc.
329
- License: Apache-2.0
330
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
331
- Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
332
-
333
327
  Component: highlight.js, version: 10.4.1
334
328
  Copyright: 2006-2020, Ivan Sagalaev
335
329
  License: BSD-3-Clause
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.mdc",
3
- "version": "1.94.0",
3
+ "version": "1.95.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.mdc",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,8 +14,8 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.94.0",
18
- "@openui5/sap.ui.core": "1.94.0",
19
- "@openui5/sap.ui.layout": "1.94.0"
17
+ "@openui5/sap.m": "1.95.0",
18
+ "@openui5/sap.ui.core": "1.95.0",
19
+ "@openui5/sap.ui.layout": "1.95.0"
20
20
  }
21
21
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.94.0</version>
9
+ <version>1.95.0</version>
10
10
 
11
11
  <documentation>UI5 library: sap.ui.mdc</documentation>
12
12
 
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @class The column for the metadata driven table, that hold the template to be shown when the rows has data.
22
22
  * @extends sap.m.OverflowToolbar
23
23
  * @author SAP SE
24
- * @version 1.94.0
24
+ * @version 1.95.0
25
25
  * @constructor
26
26
  * @private
27
27
  * @experimental
@@ -69,7 +69,7 @@ sap.ui.define([
69
69
  * @class The Chart control creates a chart based on metadata and the configuration specified.
70
70
  * @extends sap.ui.mdc.Control
71
71
  * @author SAP SE
72
- * @version 1.94.0
72
+ * @version 1.95.0
73
73
  * @constructor
74
74
  * @experimental As of version 1.61
75
75
  * @private
@@ -478,7 +478,10 @@ sap.ui.define([
478
478
  this._mStoredActions = aActions;
479
479
 
480
480
  //Toolbar needs settings to be applied before creation to read properties like header/title
481
- ToolbarHandler.createToolbar(this, aActions, true);
481
+ if (!this._oToolbarHandler) {
482
+ this._oToolbarHandler = new ToolbarHandler();
483
+ }
484
+ this._oToolbarHandler.createToolbar(this, aActions, true);
482
485
  this._createTempNoData();
483
486
  }
484
487
 
@@ -562,10 +565,14 @@ sap.ui.define([
562
565
 
563
566
  .then(function createDrillBreadcrumbs(oInnerChart) {
564
567
 
568
+ if (!this._oToolbarHandler) {
569
+ this._oToolbarHandler = new ToolbarHandler();
570
+ }
571
+
565
572
  if (this.getAutoBindOnInit()){
566
- ToolbarHandler.createToolbar(this, aActions);
573
+ this._oToolbarHandler.createToolbar(this, aActions);
567
574
  } else {
568
- ToolbarHandler.updateToolbar(this);
575
+ this._oToolbarHandler.updateToolbar(this);
569
576
  }
570
577
 
571
578
  this._createDrillBreadcrumbs();
@@ -628,7 +635,7 @@ sap.ui.define([
628
635
  };
629
636
 
630
637
  Chart.prototype._onDataLoadComplete = function(mEventParams) {
631
- if (mEventParams.mParameters.reason === "change" && !mEventParams.mParameters.detailedReason) {
638
+ if ((mEventParams.mParameters.reason === "change" || mEventParams.mParameters.reason === "filter" ) && !mEventParams.mParameters.detailedReason) {
632
639
  this.setBusy(false);
633
640
  }
634
641
  };
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @class The Chart control creates a chart based on metadata and the configuration specified.
58
58
  * @extends sap.ui.mdc.Control
59
59
  * @author SAP SE
60
- * @version 1.94.0
60
+ * @version 1.95.0
61
61
  * @constructor
62
62
  * @experimental As of version ...
63
63
  * @private
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @extends sap.ui.core.Control
21
21
  * @abstract
22
22
  * @author SAP SE
23
- * @version 1.94.0
23
+ * @version 1.95.0
24
24
  * @alias sap.ui.mdc.Control
25
25
  *
26
26
  * @borrows sap.ui.mdc.mixin.DelegateMixin.awaitControlDelegate as awaitControlDelegate
@@ -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
- "sap/ui/core/Element", "sap/ui/mdc/mixin/DelegateMixin", "sap/ui/mdc/mixin/AdaptationMixin"
7
+ "sap/ui/core/Element", "sap/ui/mdc/mixin/DelegateMixin", "sap/ui/mdc/mixin/AdaptationMixin"
8
8
  ], function(CoreElement, DelegateMixin, AdaptationMixin) {
9
9
  "use strict";
10
10
 
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @extends sap.ui.core.Element
21
21
  * @abstract
22
22
  * @author SAP SE
23
- * @version 1.94.0
23
+ * @version 1.95.0
24
24
  * @alias sap.ui.mdc.Element
25
25
  *
26
26
  * @borrows sap.ui.mdc.mixin.DelegateMixin.awaitControlDelegate as awaitControlDelegate
@@ -46,12 +46,12 @@ sap.ui.define([
46
46
  * @implements sap.ui.core.IFormContent
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.94.0
49
+ * @version 1.95.0
50
50
  *
51
51
  * @constructor
52
52
  * @alias sap.ui.mdc.Field
53
53
  * @author SAP SE
54
- * @version 1.94.0
54
+ * @version 1.95.0
55
55
  * @since 1.54.0
56
56
  * @experimental As of version 1.54
57
57
  *
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * The metadata information is provided via the {@link sap.ui.mdc.FilterBarDelegate FilterBarDelegate} implementation. This implementation has to be provided by the application.
22
22
  * @extends sap.ui.mdc.filterbar.FilterBarBase
23
23
  * @author SAP SE
24
- * @version 1.94.0
24
+ * @version 1.95.0
25
25
  * @constructor
26
26
  * @experimental As of version 1.61
27
27
  * @private
@@ -6,11 +6,13 @@
6
6
  sap.ui.define([
7
7
  'sap/ui/mdc/field/FieldBase',
8
8
  'sap/ui/mdc/field/FieldBaseRenderer',
9
- 'sap/base/util/merge'
9
+ 'sap/base/util/merge',
10
+ 'sap/base/util/deepEqual'
10
11
  ], function(
11
12
  FieldBase,
12
13
  FieldBaseRenderer,
13
- merge
14
+ merge,
15
+ deepEqual
14
16
  ) {
15
17
  "use strict";
16
18
 
@@ -29,12 +31,12 @@ sap.ui.define([
29
31
  * @extends sap.ui.mdc.field.FieldBase
30
32
  *
31
33
  * @author SAP SE
32
- * @version 1.94.0
34
+ * @version 1.95.0
33
35
  *
34
36
  * @constructor
35
37
  * @alias sap.ui.mdc.FilterField
36
38
  * @author SAP SE
37
- * @version 1.94.0
39
+ * @version 1.95.0
38
40
  * @since 1.48.0
39
41
  *
40
42
  * @experimental As of version 1.48
@@ -127,6 +129,28 @@ sap.ui.define([
127
129
 
128
130
  };
129
131
 
132
+ FilterField.prototype.setProperty = function(sPropertyName, oValue, bSuppressInvalidate) {
133
+
134
+ if (sPropertyName === "conditions" && this._bParseError && deepEqual(this.getConditions(), this.validateProperty(sPropertyName, oValue))) {
135
+ // in parse error and same Conditions - no update on property - so remove error here
136
+ // As ConditionModel triggers checkUpdate in forced mode on addCondition, setConditions... also unchanged conditions will be updated
137
+ // So e.g. if a variant is applied an error will be removed.
138
+ if (this._oContentFactory.getBoundProperty()) { // single value case
139
+ this._oManagedObjectModel.checkUpdate(true, true); // async. to reduce updates (additionalValue will follow)
140
+ } else { // Multi value case - don't update tokens, initialize value
141
+ var oContent = this._getContent()[0];
142
+ if (oContent && oContent.setValue) {
143
+ oContent.setValue(); // TODO: custom controls with different property?
144
+ }
145
+ this._removeUIMessage();
146
+ }
147
+ this._bParseError = false;
148
+ }
149
+
150
+ return FieldBase.prototype.setProperty.apply(this, arguments);
151
+
152
+ };
153
+
130
154
  FilterField.prototype._fireChange = function(aConditions, bValid, vWrongValue, oPromise) {
131
155
 
132
156
  var vValue;
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @extends sap.ui.mdc.field.FieldInfoBase
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.94.0
48
+ * @version 1.95.0
49
49
  *
50
50
  * @constructor
51
51
  * @alias sap.ui.mdc.Link
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @constructor
36
36
  * @alias sap.ui.mdc.MultiValueField
37
37
  * @author SAP SE
38
- * @version 1.94.0
38
+ * @version 1.95.0
39
39
  * @since 1.93.0
40
40
  *
41
41
  * @private
@@ -364,6 +364,24 @@ sap.ui.define([
364
364
  type: "sap.ui.mdc.MultiSelectMode",
365
365
  group: "Behavior",
366
366
  defaultValue: MultiSelectMode.Default
367
+ },
368
+
369
+ /**
370
+ * Enables automatic column width calculation based on metadata information if set to <code>true</code>.
371
+ * The column width calculation takes the type, column label, referenced properties, and many other metadata parameters into account.
372
+ * Providing a more precise <code>maxLength</code> value for the <code>String</code> type or <code>precision</code> value for numeric types can help this algorithm to produce better results.
373
+ * The calculated column widths can have a minimum of 3rem and a maximum of 20rem.
374
+ *
375
+ * <b>Note:</b> To customize the automatic column width calculation the <code>visualSettings.widthSettings</code> key of the <code>PropertyInfo</code> can be used.
376
+ * To avoid the heuristic column width calculation for a particular column, the <code>visualSettings.widthSettings</code> key of the <code>PropertyInfo</code> can be set to <code>false</code>.
377
+ * This feature has no effect if the <code>width</code> property of the column is bound or its value is set.
378
+ *
379
+ * @since 1.95
380
+ */
381
+ enableAutoColumnWidth: {
382
+ type: "boolean",
383
+ group: "Behavior",
384
+ defaultValue: false
367
385
  }
368
386
  },
369
387
  aggregations: {
@@ -647,7 +665,7 @@ sap.ui.define([
647
665
  if (oDataStateIndicator) {
648
666
  oDataStateIndicator[sAction + "ApplyFilter"](this._onApplyMessageFilter, this);
649
667
  oDataStateIndicator[sAction + "ClearFilter"](this._onClearMessageFilter, this);
650
- oDataStateIndicator[sAction + "Event"]("filterInfoPress", this._showFilter, this);
668
+ oDataStateIndicator[sAction + "Event"]("filterInfoPress", onShowFilterDialog, this);
651
669
  }
652
670
  };
653
671
 
@@ -1137,9 +1155,7 @@ sap.ui.define([
1137
1155
  wrapping: false
1138
1156
  })
1139
1157
  ],
1140
- press: function() {
1141
- TableSettings.showPanel(oTable, "Filter", oFilterInfoToolbar);
1142
- }
1158
+ press: [onShowFilterDialog, oTable]
1143
1159
  });
1144
1160
 
1145
1161
  // If the toolbar is hidden while it has the focus, the focus moves to the body. This can happen, for example, when all filters are removed in
@@ -1563,12 +1579,10 @@ sap.ui.define([
1563
1579
  var aP13nMode = this.getP13nMode();
1564
1580
  var aButtons = [];
1565
1581
 
1566
- //Note: 'Aggregate' does not have a p13n UI, if only 'Aggregate' is enabled no settings icon is necessary
1582
+ // Note: 'Aggregate' does not have a p13n UI, if only 'Aggregate' is enabled no settings icon is necessary
1567
1583
  var bAggregateP13nOnly = aP13nMode.length === 1 && aP13nMode[0] === "Aggregate";
1568
1584
  if (aP13nMode.length > 0 && !bAggregateP13nOnly) {
1569
- aButtons.push(TableSettings["createSettingsButton"](this.getId(), [
1570
- this._showSettings, this
1571
- ]));
1585
+ aButtons.push(TableSettings.createSettingsButton(this.getId(), [onShowSettingsDialog, this]));
1572
1586
  }
1573
1587
 
1574
1588
  return aButtons;
@@ -1998,7 +2012,7 @@ sap.ui.define([
1998
2012
  var oFilter = new ColumnPopoverSelectListItem({
1999
2013
  label: oResourceBundle.getText("table.SETTINGS_FILTER"),
2000
2014
  icon: "sap-icon://filter",
2001
- action: [this._showFilter, this]
2015
+ action: [onShowFilterDialog, this]
2002
2016
  });
2003
2017
  aHeaderItems.unshift(oFilter);
2004
2018
  }
@@ -2050,11 +2064,26 @@ sap.ui.define([
2050
2064
  TableSettings.createAggregation(this, sSortProperty);
2051
2065
  };
2052
2066
 
2067
+ Table.prototype._setColumnWidth = function(oMDCColumn) {
2068
+ if (!this.getEnableAutoColumnWidth() || oMDCColumn.getWidth() || oMDCColumn.isBound("width")) {
2069
+ return;
2070
+ }
2071
+
2072
+ var oPropertyHelper = this._oPropertyHelper;
2073
+ if (oPropertyHelper) {
2074
+ oPropertyHelper.setColumnWidth(oMDCColumn);
2075
+ } else {
2076
+ this.awaitPropertyHelper().then(this._setColumnWidth.bind(this, oMDCColumn));
2077
+ }
2078
+ };
2079
+
2053
2080
  Table.prototype._insertInnerColumn = function(oMDCColumn, iIndex) {
2054
2081
  if (!this._oTable) {
2055
2082
  return;
2056
2083
  }
2057
2084
 
2085
+ this._setColumnWidth(oMDCColumn);
2086
+
2058
2087
  var oColumn = this._createColumn(oMDCColumn);
2059
2088
  setColumnTemplate(this, oMDCColumn, oColumn, iIndex);
2060
2089
  this._bForceRebind = true;
@@ -2612,27 +2641,13 @@ sap.ui.define([
2612
2641
  }
2613
2642
  };
2614
2643
 
2615
- /**
2616
- * Just for test purpose --> has to be finalised
2617
- *
2618
- * @param {object} oEvt Event object that gets processed
2619
- * @experimental
2620
- */
2621
- Table.prototype._showSettings = function(oEvt) {
2622
- TableSettings.showPanel(this, "Columns", oEvt.getSource());
2623
- };
2624
-
2625
- Table.prototype._showSort = function(oEvt) {
2626
- TableSettings.showPanel(this, "Sort", oEvt.getSource());
2627
- };
2628
-
2629
- Table.prototype._showFilter = function(oEvt) {
2630
- TableSettings.showPanel(this, "Filter", oEvt.getSource());
2631
- };
2644
+ function onShowSettingsDialog(oEvent) {
2645
+ TableSettings.showPanel(this, "Columns", oEvent.getSource());
2646
+ }
2632
2647
 
2633
- Table.prototype._showGroup = function (oEvt) {
2634
- TableSettings.showPanel(this, "Group", oEvt.getSource());
2635
- };
2648
+ function onShowFilterDialog(oEvent) {
2649
+ TableSettings.showPanel(this, "Filter", oEvent.getSource());
2650
+ }
2636
2651
 
2637
2652
  // TODO: move to a base util that can be used by most aggregations
2638
2653
  Table.prototype._getSorters = function() {