@openui5/sap.ui.table 1.119.1 → 1.120.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 (58) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +3 -3
  3. package/src/sap/ui/table/.library +1 -1
  4. package/src/sap/ui/table/AnalyticalColumn.js +25 -15
  5. package/src/sap/ui/table/AnalyticalColumnMenu.js +6 -5
  6. package/src/sap/ui/table/AnalyticalTable.js +25 -38
  7. package/src/sap/ui/table/Column.js +135 -95
  8. package/src/sap/ui/table/ColumnMenu.js +1 -1
  9. package/src/sap/ui/table/CreationRow.js +1 -1
  10. package/src/sap/ui/table/Row.js +1 -1
  11. package/src/sap/ui/table/RowAction.js +1 -1
  12. package/src/sap/ui/table/RowActionItem.js +1 -1
  13. package/src/sap/ui/table/RowSettings.js +1 -1
  14. package/src/sap/ui/table/Table.js +206 -186
  15. package/src/sap/ui/table/TablePersoController.js +1 -1
  16. package/src/sap/ui/table/TableRenderer.js +35 -11
  17. package/src/sap/ui/table/TreeTable.js +1 -1
  18. package/src/sap/ui/table/designtime/Table.designtime.js +21 -2
  19. package/src/sap/ui/table/extensions/Accessibility.js +18 -8
  20. package/src/sap/ui/table/extensions/AccessibilityRender.js +3 -1
  21. package/src/sap/ui/table/extensions/DragAndDrop.js +1 -1
  22. package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
  23. package/src/sap/ui/table/extensions/Keyboard.js +1 -1
  24. package/src/sap/ui/table/extensions/KeyboardDelegate.js +24 -10
  25. package/src/sap/ui/table/extensions/Pointer.js +1 -1
  26. package/src/sap/ui/table/extensions/Scrolling.js +1 -1
  27. package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
  28. package/src/sap/ui/table/extensions/Synchronization.js +1 -1
  29. package/src/sap/ui/table/library.js +25 -16
  30. package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
  31. package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +26 -13
  32. package/src/sap/ui/table/messagebundle_mk.properties +126 -0
  33. package/src/sap/ui/table/messagebundle_sh.properties +16 -16
  34. package/src/sap/ui/table/plugins/BindingSelection.js +10 -5
  35. package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +9 -3
  36. package/src/sap/ui/table/plugins/ODataV4Selection.js +9 -4
  37. package/src/sap/ui/table/plugins/PluginBase.js +1 -1
  38. package/src/sap/ui/table/plugins/SelectionModelSelection.js +10 -5
  39. package/src/sap/ui/table/plugins/SelectionPlugin.js +17 -3
  40. package/src/sap/ui/table/plugins/V4Aggregation.js +1 -1
  41. package/src/sap/ui/table/rowmodes/Auto.js +5 -5
  42. package/src/sap/ui/table/rowmodes/Fixed.js +5 -5
  43. package/src/sap/ui/table/rowmodes/Interactive.js +1 -1
  44. package/src/sap/ui/table/rowmodes/RowMode.js +11 -1
  45. package/src/sap/ui/table/rowmodes/Variable.js +1 -1
  46. package/src/sap/ui/table/rules/Plugins.support.js +23 -21
  47. package/src/sap/ui/table/rules/Rows.support.js +24 -5
  48. package/src/sap/ui/table/themes/base/Cell.less +1 -1
  49. package/src/sap/ui/table/themes/base/Grouping.less +1 -1
  50. package/src/sap/ui/table/themes/base/Table.less +1 -1
  51. package/src/sap/ui/table/themes/base/library.source.less +0 -3
  52. package/src/sap/ui/table/themes/sap_hcb/library.source.less +0 -3
  53. package/src/sap/ui/table/utils/TableUtils.js +10 -12
  54. package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
  55. package/src/sap/ui/table/utils/_ColumnUtils.js +1 -1
  56. package/src/sap/ui/table/utils/_GroupingUtils.js +1 -1
  57. package/src/sap/ui/table/utils/_HookUtils.js +34 -3
  58. package/src/sap/ui/table/utils/_MenuUtils.js +1 -1
@@ -5,46 +5,48 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "./TableHelper.support",
8
- "sap/ui/support/library"
9
- ], function(SupportHelper, SupportLibrary) {
8
+ "sap/ui/support/library",
9
+ "sap/m/plugins/PluginBase"
10
+ ], function(SupportHelper, SupportLibrary, PluginBase) {
10
11
  "use strict";
11
12
 
12
13
  var Categories = SupportLibrary.Categories;
13
14
  var Severity = SupportLibrary.Severity;
14
15
 
15
- /*
16
+ /**
16
17
  * Checks the number and type of plugins which are applied to the table.
17
18
  */
18
- var oPlugins = SupportHelper.normalizeRule({
19
+ var oSelectionPlugins = SupportHelper.normalizeRule({
19
20
  id: "Plugins",
20
21
  minversion: "1.64",
21
22
  categories: [Categories.Usage],
22
- title: "Plugins validation",
23
- description: "Checks the number and type of plugins which are applied to the table. Only one selection plugin can be applied. "
24
- + "No other plugins are allowed.",
25
- resolution: "Check if multiple selection plugins are applied, or a plugin of another type is applied to the table.",
23
+ title: "Single selection plugin",
24
+ description: "Only one selection plugin should be applied to avoid potential conflicts.",
25
+ resolution: "Only apply a single selection plugin.",
26
26
  check: function(oIssueManager, oCoreFacade, oScope) {
27
27
  var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
28
28
 
29
29
  for (var i = 0; i < aTables.length; i++) {
30
30
  var oTable = aTables[i];
31
- var aPlugins = oTable.getPlugins();
32
- if (aPlugins.length > 1) {
33
- SupportHelper.reportIssue(oIssueManager,
34
- "Only one plugin can be applied to the table",
35
- Severity.High, oTable.getId());
36
- } else if (aPlugins.length == 1) {
37
- var oPlugin = aPlugins[0];
38
- if (!oPlugin.isA("sap.ui.table.plugins.SelectionPlugin")) {
39
- SupportHelper.reportIssue(oIssueManager,
40
- "Only a selection plugin can be applied to the table",
41
- Severity.High, oTable.getId());
42
- }
31
+ var aSelectionPlugins = oTable.getDependents().filter((oPlugin) => oPlugin.isA("sap.ui.table.plugins.SelectionPlugin"));
32
+
33
+ /**
34
+ * @deprecated As of version 1.120
35
+ */
36
+ aSelectionPlugins.concat(oTable.getPlugins());
37
+
38
+ if (aSelectionPlugins.length > 1) {
39
+ SupportHelper.reportIssue(
40
+ oIssueManager,
41
+ "Only one selection plugin should be applied to the table",
42
+ Severity.High,
43
+ oTable.getId()
44
+ );
43
45
  }
44
46
  }
45
47
  }
46
48
  });
47
49
 
48
- return [oPlugins];
50
+ return [oSelectionPlugins];
49
51
 
50
52
  }, true);
@@ -4,11 +4,18 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
+ "sap/ui/table/rowmodes/Type",
7
8
  "./TableHelper.support",
8
9
  "sap/ui/support/library",
9
10
  "sap/ui/Device",
10
11
  "sap/ui/thirdparty/jquery"
11
- ], function(SupportHelper, SupportLibrary, Device, jQuery) {
12
+ ], function(
13
+ RowModeType,
14
+ SupportHelper,
15
+ SupportLibrary,
16
+ Device,
17
+ jQuery
18
+ ) {
12
19
  "use strict";
13
20
 
14
21
  var Categories = SupportLibrary.Categories;
@@ -164,13 +171,25 @@ sap.ui.define([
164
171
  }
165
172
 
166
173
  function checkConfiguration(oTable, oDynamicPage) {
167
- if (oTable._getRowMode().isA("sap.ui.table.rowmodes.Auto") && !oDynamicPage.getFitContent()) {
174
+ var vRowMode = oTable.getRowMode();
175
+ var bIsTableInAutoMode = false;
176
+
177
+ /**
178
+ * @deprecated As of version 1.119
179
+ */
180
+ if (!vRowMode) {
181
+ bIsTableInAutoMode = oTable.getVisibleRowCountMode() === "Auto";
182
+ }
183
+
184
+ if (vRowMode) {
185
+ bIsTableInAutoMode = vRowMode === RowModeType.Auto || vRowMode.isA("sap.ui.table.rowmodes.Auto");
186
+ }
187
+
188
+ if (bIsTableInAutoMode && !oDynamicPage.getFitContent()) {
168
189
  SupportHelper.reportIssue(oIssueManager,
169
190
  "A table with an auto row mode is placed inside a sap.f.DynamicPage with fitContent=\"false\"",
170
191
  Severity.High, oTable.getId());
171
- } else if ((oTable._getRowMode().isA("sap.ui.table.rowmodes.Fixed")
172
- || oTable._getRowMode().isA("sap.ui.table.rowmodes.Interactive"))
173
- && oDynamicPage.getFitContent()) {
192
+ } else if (!bIsTableInAutoMode && oDynamicPage.getFitContent()) {
174
193
  SupportHelper.reportIssue(oIssueManager,
175
194
  "A table with a fixed or interactive row mode is placed inside a sap.f.DynamicPage with fitContent=\"true\"",
176
195
  Severity.Low, oTable.getId());
@@ -25,7 +25,7 @@
25
25
  position: absolute;
26
26
  inset: 0;
27
27
  pointer-events: none;
28
- outline: @_sap_ui_table_FocusOutlineWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
28
+ outline: @sapUiContentFocusWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
29
29
  outline-offset: @_sap_ui_table_Cell_FocusOutlineOffset;
30
30
 
31
31
  .sapUiTableZoomout & {
@@ -8,7 +8,7 @@
8
8
  @_sap_ui_table_Grouping_GroupIconHeightCondensed: @_sap_ui_table_RowHeightCondensed;
9
9
  @_sap_ui_table_Grouping_GroupHeaderBackground: @sapUiListTableGroupHeaderBackground;
10
10
  @_sap_ui_table_Grouping_GroupHeaderFadingWidth: 40px;
11
- @_sap_ui_table_Grouping_GroupOutlineWidth: @_sap_ui_table_FocusOutlineWidth;
11
+ @_sap_ui_table_Grouping_GroupOutlineWidth: @sapUiContentFocusWidth;
12
12
  @_sap_ui_table_Grouping_GroupIconBorderWidth: @_sap_ui_table_BaseBorderWidth;
13
13
  @_sap_ui_table_Grouping_GroupIconFontSize: @sapMFontMediumSize;
14
14
 
@@ -187,7 +187,7 @@
187
187
  .sapUiTableOverlayArea:focus,
188
188
  .sapUiTableCtrlEmpty:focus,
189
189
  .sapUiTableCnt > .sapUiLocalBusyIndicator:focus {
190
- outline-width: @_sap_ui_table_FocusOutlineWidth;
190
+ outline-width: @sapUiContentFocusWidth;
191
191
  outline-style: @sapUiContentFocusStyle;
192
192
  outline-offset: -3px;
193
193
  outline-color: @sapUiContentFocusColor;
@@ -45,9 +45,6 @@
45
45
  @_sap_ui_table_DeleteIcon: sys-cancel;
46
46
  @_sap_ui_table_ClearSelectionIcon: clear-all;
47
47
 
48
- /*TBD: Table specific parameter should be removed and replaced with sapUiContentFocusWidth*/
49
- @_sap_ui_table_FocusOutlineWidth: @sapUiContentFocusWidth;
50
-
51
48
  @import "Table.less";
52
49
  @import "Row.less";
53
50
  @import "CreationRow.less";
@@ -7,9 +7,6 @@
7
7
  @import "../base/library.source.less";
8
8
  @import "../../../../../sap/ui/core/themes/sap_hcb/global.less";
9
9
 
10
- /* shared local library less parameters */
11
- @_sap_ui_table_FocusOutlineWidth: 2px;
12
-
13
10
  @import "Table.less";
14
11
  @import "Row.less";
15
12
  @import "RowHighlight.less";
@@ -17,6 +17,7 @@ sap.ui.define([
17
17
  "sap/ui/core/library",
18
18
  "sap/ui/core/theming/Parameters",
19
19
  "sap/ui/core/Icon",
20
+ "sap/ui/core/Lib",
20
21
  "sap/ui/model/ChangeReason",
21
22
  "sap/ui/thirdparty/jquery",
22
23
  "sap/base/util/restricted/_throttle",
@@ -33,6 +34,7 @@ sap.ui.define([
33
34
  coreLibrary,
34
35
  ThemeParameters,
35
36
  Icon,
37
+ Lib,
36
38
  ChangeReason,
37
39
  jQuery,
38
40
  throttle,
@@ -207,7 +209,7 @@ sap.ui.define([
207
209
  * Static collection of utility functions related to the sap.ui.table.Table, ...
208
210
  *
209
211
  * @author SAP SE
210
- * @version 1.119.1
212
+ * @version 1.120.1
211
213
  * @namespace
212
214
  * @alias sap.ui.table.utils.TableUtils
213
215
  * @private
@@ -341,8 +343,7 @@ sap.ui.define([
341
343
  * @returns {boolean} Whether the no data text is shown.
342
344
  */
343
345
  isNoDataVisible: function(oTable) {
344
- return oTable.getShowNoData() && (oTable._getRowMode() && !oTable._getRowMode().isNoDataDisabled()) && !TableUtils.hasData(oTable)
345
- || TableUtils.getVisibleColumnCount(oTable) === 0;
346
+ return !oTable._isNoDataDisabled() && !TableUtils.hasData(oTable) || TableUtils.getVisibleColumnCount(oTable) === 0;
346
347
  },
347
348
 
348
349
  /**
@@ -380,7 +381,7 @@ sap.ui.define([
380
381
  * @returns {boolean} Whether this object is an instance of the given type or of any of the given types.
381
382
  */
382
383
  isA: function(oObject, vTypeName) {
383
- return BaseObject.isA(oObject, vTypeName);
384
+ return BaseObject.isObjectA(oObject, vTypeName);
384
385
  },
385
386
 
386
387
  /**
@@ -1182,15 +1183,12 @@ sap.ui.define([
1182
1183
  }
1183
1184
  }
1184
1185
 
1185
- var vResult = sap.ui.getCore().getLibraryResourceBundle("sap.ui.table", mOptions.async === true);
1186
+ var vResult = Lib.getResourceBundleFor("sap.ui.table");
1186
1187
 
1187
- if (vResult instanceof Promise) {
1188
- vResult = vResult.then(function(oBundle) {
1189
- oResourceBundle = oBundle;
1190
- return oResourceBundle;
1191
- });
1192
- } else {
1193
- oResourceBundle = vResult;
1188
+ oResourceBundle = vResult;
1189
+
1190
+ if (mOptions.async === true) {
1191
+ vResult = Promise.resolve(oResourceBundle);
1194
1192
  }
1195
1193
 
1196
1194
  return vResult;
@@ -14,7 +14,7 @@ sap.ui.define([], function() {
14
14
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Binding...</code>
15
15
  *
16
16
  * @author SAP SE
17
- * @version 1.119.1
17
+ * @version 1.120.1
18
18
  * @namespace
19
19
  * @alias sap.ui.table.utils._BindingUtils
20
20
  * @private
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Column...</code>
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.119.1
21
+ * @version 1.120.1
22
22
  * @namespace
23
23
  * @alias sap.ui.table.utils._ColumnUtils
24
24
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Grouping...</code>
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.119.1
26
+ * @version 1.120.1
27
27
  * @namespace
28
28
  * @alias sap.ui.table.utils._GroupingUtils
29
29
  * @private
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  // Provides helper sap.ui.table.utils._HookUtils.
8
- sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
8
+ sap.ui.define(["sap/ui/base/DataType", "sap/ui/model/ChangeReason"], function(DataType, ChangeReason) {
9
9
  "use strict";
10
10
 
11
11
  var Hooks = new window.WeakMap();
@@ -22,7 +22,7 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
22
22
  * - There is no concept for public or protected hooks. Never expose a hook directly, only indirectly as can be seen in the examples.
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.119.1
25
+ * @version 1.120.1
26
26
  * @namespace
27
27
  * @alias sap.ui.table.utils._HookUtils
28
28
  *
@@ -176,6 +176,33 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
176
176
  ]
177
177
  }
178
178
  },
179
+ TableRenderer: {
180
+ RenderTableStyles: {
181
+ arguments: [
182
+ {type: "object" /* RenderManager */}
183
+ ]
184
+ },
185
+ RenderInTableBottomArea: {
186
+ arguments: [
187
+ {type: "object" /* RenderManager */}
188
+ ]
189
+ },
190
+ RenderRowContainerStyles: {
191
+ arguments: [
192
+ {type: "object" /* RenderManager */}
193
+ ]
194
+ },
195
+ RenderRowStyles: {
196
+ arguments: [
197
+ {type: "object" /* RenderManager */}
198
+ ]
199
+ },
200
+ RenderCellContentStyles: {
201
+ arguments: [
202
+ {type: "object" /* RenderManager */}
203
+ ]
204
+ }
205
+ },
179
206
  Row: {
180
207
  UpdateState: {
181
208
  arguments: [
@@ -501,8 +528,12 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
501
528
  });
502
529
  }
503
530
 
531
+ function validateChangeReason(sReason) {
532
+ return typeof sReason === "string" && Object.values(ChangeReason).includes(sReason);
533
+ }
534
+
504
535
  function validateRowsUpdateReason(sReason) { // sap.ui.table.utils.TableUtils.RowsUpdateReason
505
- return sReason in HookUtils.TableUtils.RowsUpdateReason || DataType.getType("sap.ui.model.ChangeReason").isValid(sReason);
536
+ return sReason in HookUtils.TableUtils.RowsUpdateReason || validateChangeReason(sReason);
506
537
  }
507
538
 
508
539
  function validateCellInfo(oCellInfo) { // sap.ui.table.utils.TableUtils.CellInfo
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Menu...</code>
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.119.1
42
+ * @version 1.120.1
43
43
  * @namespace
44
44
  * @alias sap.ui.table.utils._MenuUtils
45
45
  * @private