@eclipse-scout/core 22.0.0-beta.5 → 22.0.2

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 (101) hide show
  1. package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js +2 -0
  2. package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js.map +1 -0
  3. package/dist/eclipse-scout-core-theme-6b2fef56e9e49231a49c.min.css +1 -0
  4. package/dist/eclipse-scout-core-theme-dark-d2bb274dd42f132bfca0.min.css +1 -0
  5. package/dist/eclipse-scout-core-theme-dark.css +511 -399
  6. package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
  7. package/dist/eclipse-scout-core-theme.css +247 -135
  8. package/dist/eclipse-scout-core-theme.css.map +1 -1
  9. package/dist/eclipse-scout-core.js +865 -646
  10. package/dist/eclipse-scout-core.js.map +1 -1
  11. package/dist/file-list +7 -0
  12. package/dist/locales.json +47126 -0
  13. package/dist/texts.json +1153 -0
  14. package/package.json +2 -2
  15. package/src/App.js +17 -10
  16. package/src/action/Button.less +1 -0
  17. package/src/box/Box.less +2 -2
  18. package/src/breadcrumbbar/BreadcrumbBarLayout.js +2 -2
  19. package/src/calendar/Calendar.js +40 -58
  20. package/src/calendar/Calendar.less +10 -10
  21. package/src/calendar/CalendarLayout.js +3 -1
  22. package/src/datepicker/DatePicker.less +1 -0
  23. package/src/desktop/desktoptab/DesktopTab.less +19 -2
  24. package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
  25. package/src/desktop/desktoptab/DesktopTabAreaLayout.js +1 -1
  26. package/src/desktop/navigation/DesktopNavigation.less +4 -0
  27. package/src/desktop/notification/DesktopNotification.js +11 -4
  28. package/src/desktop/notification/DesktopNotification.less +5 -3
  29. package/src/desktop/outline/Outline.js +0 -30
  30. package/src/desktop/outline/Outline.less +4 -4
  31. package/src/desktop/viewbutton/ViewButton.less +18 -9
  32. package/src/desktop/viewbutton/ViewButtonBox.js +2 -2
  33. package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
  34. package/src/filechooser/FileChooser.less +1 -1
  35. package/src/form/Form.less +1 -0
  36. package/src/form/fields/LookupBox.js +2 -1
  37. package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +14 -0
  38. package/src/form/fields/groupbox/GroupBox.js +13 -9
  39. package/src/form/fields/groupbox/GroupBox.less +4 -1
  40. package/src/form/fields/htmlfield/HtmlField.less +0 -1
  41. package/src/form/fields/listbox/ListBox.js +8 -3
  42. package/src/form/fields/tabbox/TabAreaLayout.js +63 -66
  43. package/src/form/fields/tabbox/TabBox.js +4 -7
  44. package/src/form/fields/tabbox/TabBox.less +2 -1
  45. package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
  46. package/src/glasspane/GlassPane.js +3 -3
  47. package/src/group/Group.less +1 -1
  48. package/src/index.js +2 -1
  49. package/src/index.less +1 -0
  50. package/src/jquery/jquery-scout.js +5 -4
  51. package/src/login/LoginBox.less +9 -7
  52. package/src/menu/ContextMenuPopup.less +9 -2
  53. package/src/menu/Menu.less +1 -0
  54. package/src/messagebox/MessageBox.less +3 -3
  55. package/src/modeselector/Mode.less +15 -37
  56. package/src/modeselector/ModeSelector.js +1 -1
  57. package/src/modeselector/ModeSelector.less +2 -1
  58. package/src/planner/PlannerHeader.less +2 -1
  59. package/src/popup/Popup.js +24 -8
  60. package/src/popup/PopupLayout.js +2 -8
  61. package/src/scrollbar/Scrollbar.less +8 -1
  62. package/src/scrollbar/scrollbars.js +26 -4
  63. package/src/session/Session.js +4 -1
  64. package/src/style/colors-dark.less +25 -11
  65. package/src/style/colors.less +17 -3
  66. package/src/style/fonts.less +5 -0
  67. package/src/style/mixins.less +21 -14
  68. package/src/style/sizes-dark.less +4 -1
  69. package/src/style/sizes.less +7 -7
  70. package/src/table/Table.js +45 -33
  71. package/src/table/Table.less +49 -16
  72. package/src/table/TableHeader.js +10 -8
  73. package/src/table/TableHeader.less +1 -0
  74. package/src/table/TableHeaderMenu.js +3 -1
  75. package/src/table/TableHeaderMenu.less +7 -2
  76. package/src/table/columns/BooleanColumn.js +2 -2
  77. package/src/table/columns/Column.js +3 -3
  78. package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
  79. package/src/table/editor/CellEditorPopup.js +8 -1
  80. package/src/tagbar/TagBarOverflowPopupLayout.js +1 -1
  81. package/src/tile/TileGrid.js +1 -1
  82. package/src/tile/TileGridLayout.js +2 -2
  83. package/src/tile/accordion/TileAccordion.js +16 -1
  84. package/src/tile/fields/FormFieldTile.less +18 -11
  85. package/src/tile/fields/button/ButtonTile.js +1 -1
  86. package/src/tile/fields/htmlfield/TileHtmlField.js +28 -0
  87. package/src/tooltip/Tooltip.less +7 -5
  88. package/src/tree/CompactTree.less +1 -1
  89. package/src/tree/LazyNodeFilter.js +26 -15
  90. package/src/tree/Tree.js +114 -143
  91. package/src/tree/Tree.less +3 -5
  92. package/src/tree/TreeLayout.js +1 -1
  93. package/src/tree/TreeNode.js +2 -2
  94. package/src/util/Device.js +6 -2
  95. package/src/util/arrays.js +24 -2
  96. package/src/util/dragAndDrop.js +5 -4
  97. package/src/util/events.js +1 -1
  98. package/src/util/objects.js +4 -1
  99. package/src/widget/FilterSupport.js +7 -5
  100. package/src/widget/FilterSupport.less +38 -9
  101. package/src/widget/Widget.js +24 -7
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -26,9 +26,10 @@
26
26
  @drop-shadow-blur: 13px;
27
27
  @drop-shadow-large-y: 8px;
28
28
  @drop-shadow-large-blur: 32px;
29
- @filter-field-bottom: 6px;
30
- @filter-field-right: 6px;
29
+ @filter-field-bottom: 8px;
30
+ @filter-field-right: 8px;
31
31
  @filter-field-height: @logical-grid-row-height;
32
+ @filter-field-height-dense: @logical-grid-row-height-dense;
32
33
  @filter-field-width: 190px;
33
34
  @filter-field-min-width: 75px;
34
35
  @filter-field-max-width: 60%;
@@ -54,7 +55,7 @@
54
55
  @focus-box-shadow-size: 3px;
55
56
  @text-field-padding-x: 10px;
56
57
  @text-field-padding-y: 7px;
57
- @text-field-padding-top-compensation: 1px;
58
+ @text-field-padding-top-compensation: 1px + @text-margin-top;
58
59
  @text-field-alternative-padding-left: 0;
59
60
  @text-field-alternative-padding-right: 0;
60
61
  @text-field-icon-size: 24px;
@@ -161,6 +162,7 @@
161
162
  @desktop-navigation-width: 290px;
162
163
  @desktop-notification-no-icon-padding-y: 16px;
163
164
  @desktop-tab-border-radius: @view-tab-border-radius;
165
+ @desktop-tab-border-width: 0;
164
166
  @desktop-tab-key-box-bottom: @view-tab-key-box-bottom;
165
167
  @desktop-tab-margin-top: @view-tab-margin-top;
166
168
  @desktop-tab-margin-right: 3px;
@@ -222,17 +224,15 @@
222
224
  @mobile-popup-title-margin-top: 10px;
223
225
  @mode-padding-x: 12px;
224
226
  @mode-padding-y: 6px;
225
- @mode-padding-dense: @mode-padding-dense-y @mode-padding-dense-x;
226
227
  @mode-padding-dense-x: 5px;
227
228
  @mode-padding-dense-y: 3px;
228
229
  @mode-border-width: 1px;
229
- @mode-alternative-border-width: 3px;
230
+ @mode-selector-alternative-border-width: 3px;
230
231
  @notification-no-icon-padding-y: 13px;
231
232
  @outline-breadcrumb-node-padding-x: @outline-title-padding-left;
232
233
  @outline-breadcrumb-node-padding-y: 12px;
233
234
  @outline-data-padding-top: 16px;
234
235
  @outline-font-size: @font-size-normal;
235
- @outline-node-control-size: 18px;
236
236
  @outline-node-control-padding-left: @outline-title-padding-left;
237
237
  @outline-node-control-padding-y: @outline-node-padding-y;
238
238
  @outline-node-control-line-height: @tree-node-control-line-height;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ export default class Table extends Widget {
23
23
  this.contextColumn = null;
24
24
  this.checkable = false;
25
25
  this.checkableStyle = Table.CheckableStyle.CHECKBOX;
26
+ this.cellEditorPopup = null;
26
27
  this.compact = false;
27
28
  this.compactHandler = scout.create('TableCompactHandler', {table: this});
28
29
  this.compactColumn = null;
@@ -100,6 +101,7 @@ export default class Table extends Widget {
100
101
  this._popupOpenHandler = this._onDesktopPopupOpen.bind(this);
101
102
  this._rerenderViewPortAfterAttach = false;
102
103
  this._renderViewPortAfterAttach = false;
104
+ this._postAttachActions = [];
103
105
  this._desktopPropertyChangeHandler = this._onDesktopPropertyChange.bind(this);
104
106
  this._addWidgetProperties(['tableControls', 'menus', 'keyStrokes', 'staticMenus', 'tileTableHeader', 'tableTileGridMediator']);
105
107
 
@@ -475,7 +477,6 @@ export default class Table extends Widget {
475
477
  }
476
478
 
477
479
  _removeData() {
478
- this._destroyCellEditorPopup();
479
480
  this._removeAggregateRows();
480
481
  this._uninstallImageListeners();
481
482
  this._uninstallCellTooltipSupport();
@@ -633,11 +634,11 @@ export default class Table extends Widget {
633
634
  // Don't start cell editor or trigger click if row control was clicked (expansion itself is handled by the mouse down handler)
634
635
  return;
635
636
  }
637
+ let row = $row.data('row'); // read row before the $row potentially could be replaced by the column specific logic on mouse up
636
638
  if (mouseButton === 1) {
637
639
  column.onMouseUp(event, $row);
638
640
  $appLink = this._find$AppLink(event);
639
641
  }
640
- let row = $row.data('row');
641
642
  if ($appLink) {
642
643
  this._triggerAppLinkAction(column, row, $appLink.data('ref'), $appLink);
643
644
  } else {
@@ -848,7 +849,7 @@ export default class Table extends Widget {
848
849
  _isAggregatedTooltip($cell) {
849
850
  let $row = $cell.parent();
850
851
  return $row.data('aggregateRow') /* row in the table */
851
- || $row.hasClass('table-aggregate') /* aggregate table control */;
852
+ || $row.hasClass('table-aggregate'); /* aggregate table control */
852
853
  }
853
854
 
854
855
  reload(reloadReason) {
@@ -2068,8 +2069,24 @@ export default class Table extends Widget {
2068
2069
  }
2069
2070
 
2070
2071
  /**
2071
- * This functions starts the cell editor for the given row and column. Prepare must wait until
2072
- * a pending completeCellEdit operation is resolved.
2072
+ * Starts cell editing for the cell at the given column and row, but only if editing is allowed.
2073
+ * @see prepareCellEdit
2074
+ */
2075
+ focusCell(column, row) {
2076
+ let cell = this.cell(column, row);
2077
+ if (this.enabledComputed && row.enabled && cell.editable) {
2078
+ this.prepareCellEdit(column, row);
2079
+ }
2080
+ }
2081
+
2082
+ /**
2083
+ * Creates a cell editor for the cell at the given column and row, ensures the row is selected and passes the editor
2084
+ * to {@link #startCellEdit} which starts the editing by rendering the editor in a {@link CellEditorPopup}.<br>
2085
+ * If the completion of a previous cell edit is still in progress, the preparation is delayed until the completion is finished.
2086
+ *
2087
+ * @param {boolean} [openFieldPopupOnCellEdit] true to instruct the editor to open its control popup when the editor is rendered.
2088
+ * This only has an effect if the editor has a popup (e.g. SmartField or DateField).
2089
+ * @returns Promise the promise will be resolved when the preparation has been finished.
2073
2090
  */
2074
2091
  prepareCellEdit(column, row, openFieldPopupOnCellEdit) {
2075
2092
  let promise = $.resolvedPromise();
@@ -2080,10 +2097,10 @@ export default class Table extends Widget {
2080
2097
  }
2081
2098
 
2082
2099
  /**
2083
- * @param openFieldPopupOnCellEdit when this parameter is set to true, the CellEditorPopup sets an
2100
+ * @param {boolean} [openFieldPopupOnCellEdit] when this parameter is set to true, the CellEditorPopup sets an
2084
2101
  * additional property 'cellEditor' on the editor-field. The field instance may use this property
2085
2102
  * to decide whether or not it should open a popup immediately after it is rendered. This is used
2086
- * for Smart- and DateFields.
2103
+ * for Smart- and DateFields. Default is false.
2087
2104
  */
2088
2105
  prepareCellEditInternal(column, row, openFieldPopupOnCellEdit) {
2089
2106
  let event = new Event({
@@ -2199,7 +2216,7 @@ export default class Table extends Widget {
2199
2216
  let cell, column, predicate;
2200
2217
 
2201
2218
  predicate = function(column) {
2202
- if (column.guiOnly) {
2219
+ if (!column.isVisible() || column.guiOnly) {
2203
2220
  // does not support tabbing
2204
2221
  return false;
2205
2222
  }
@@ -3043,10 +3060,18 @@ export default class Table extends Widget {
3043
3060
  }
3044
3061
 
3045
3062
  startCellEdit(column, row, field) {
3046
- if (!this._isDataRendered() || !this.isAttachedAndRendered()) {
3063
+ if (field.destroyed) {
3064
+ // May happen if the action was postponed and the field destroyed in the meantime using endCellEdit.
3065
+ return;
3066
+ }
3067
+ if (!this._isDataRendered()) {
3047
3068
  this._postRenderActions.push(this.startCellEdit.bind(this, column, row, field));
3048
3069
  return;
3049
3070
  }
3071
+ if (!this.$container.isAttached()) {
3072
+ this._postAttachActions.push(this.startCellEdit.bind(this, column, row, field));
3073
+ return;
3074
+ }
3050
3075
 
3051
3076
  this.trigger('startCellEdit', {
3052
3077
  column: column,
@@ -3056,6 +3081,7 @@ export default class Table extends Widget {
3056
3081
  this.ensureRowRendered(row);
3057
3082
  let popup = column.startCellEdit(row, field);
3058
3083
  this.cellEditorPopup = popup;
3084
+ this.$container.toggleClass('has-cell-editor-popup', !!popup);
3059
3085
  return popup;
3060
3086
  }
3061
3087
 
@@ -3065,11 +3091,6 @@ export default class Table extends Widget {
3065
3091
  * value is updated by an updateRow event instead.
3066
3092
  */
3067
3093
  endCellEdit(field, saveEditorValue) {
3068
- if (!this._isDataRendered() || !this.isAttachedAndRendered()) {
3069
- this._postRenderActions.push(this.endCellEdit.bind(this, field, saveEditorValue));
3070
- return;
3071
- }
3072
-
3073
3094
  if (!this.cellEditorPopup) {
3074
3095
  // the cellEditorPopup could already be removed by scrolling (out of view range) or be removed by update rows
3075
3096
  field.destroy();
@@ -3754,7 +3775,7 @@ export default class Table extends Widget {
3754
3775
  addFilter(filter, applyFilter = true) {
3755
3776
  if (filter instanceof TableUserFilter) {
3756
3777
  let previousFilter = this.getFilter(filter.createKey());
3757
- this.filterSupport.removeFilter(previousFilter);
3778
+ this.filterSupport.removeFilter(previousFilter, false);
3758
3779
  }
3759
3780
 
3760
3781
  let added = this.filterSupport.addFilter(filter, applyFilter);
@@ -4655,7 +4676,9 @@ export default class Table extends Widget {
4655
4676
  this.$container.toggleClass('checkable', scout.isOneOf(this.checkableStyle, Table.CheckableStyle.TABLE_ROW, Table.CheckableStyle.CHECKBOX_TABLE_ROW));
4656
4677
  this.$container.toggleClass('table-row-check', this.checkableStyle === Table.CheckableStyle.TABLE_ROW);
4657
4678
  if (this._isDataRendered()) {
4679
+ this._updateRowWidth();
4658
4680
  this._redraw();
4681
+ this.invalidateLayoutTree();
4659
4682
  }
4660
4683
  }
4661
4684
 
@@ -5301,18 +5324,6 @@ export default class Table extends Widget {
5301
5324
  }
5302
5325
  }
5303
5326
 
5304
- focusCell(column, row) {
5305
- if (!this._isDataRendered() || !this.isAttachedAndRendered()) {
5306
- this._postRenderActions.push(this.focusCell.bind(this, column, row));
5307
- return;
5308
- }
5309
-
5310
- let cell = this.cell(column, row);
5311
- if (this.enabledComputed && row.enabled && cell.editable) {
5312
- this.prepareCellEdit(column, row, false);
5313
- }
5314
- }
5315
-
5316
5327
  _attach() {
5317
5328
  this.$parent.append(this.$container);
5318
5329
  super._attach();
@@ -5336,6 +5347,9 @@ export default class Table extends Widget {
5336
5347
  super._renderOnAttach();
5337
5348
  this._rerenderViewportAfterAttach();
5338
5349
  this._renderViewportAfterAttach();
5350
+ let actions = this._postAttachActions;
5351
+ this._postAttachActions = [];
5352
+ actions.forEach(action => action());
5339
5353
  }
5340
5354
 
5341
5355
  _rerenderViewportAfterAttach() {
@@ -5364,11 +5378,6 @@ export default class Table extends Widget {
5364
5378
  super._detach();
5365
5379
  }
5366
5380
 
5367
- _onDetach() {
5368
- super._onDetach();
5369
- this._destroyCellEditorPopup();
5370
- }
5371
-
5372
5381
  /**
5373
5382
  * @param {function} [callback] function to be called right after the popup is destroyed
5374
5383
  */
@@ -5384,6 +5393,9 @@ export default class Table extends Widget {
5384
5393
  let destroyEditor = () => {
5385
5394
  this.cellEditorPopup.destroy();
5386
5395
  this.cellEditorPopup = null;
5396
+ if (this.$container) {
5397
+ this.$container.removeClass('has-cell-editor-popup');
5398
+ }
5387
5399
  if (callback) {
5388
5400
  callback();
5389
5401
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -49,25 +49,48 @@
49
49
  /* Used for scout.Table.CheckableStyle.TABLE_ROW */
50
50
 
51
51
  &.table-row-check {
52
+ & > .table-data {
53
+ & > .table-row {
54
+ &.selected {
55
+ /* Don't draw selection */
56
+ background-color: transparent;
52
57
 
53
- & > .table-data > .table-row {
58
+ &::after {
59
+ display: none;
60
+ }
61
+ }
54
62
 
55
- &.selected {
56
- /* Don't draw selection */
63
+ &:hover {
64
+ background-color: @hover-background-color;
65
+ }
66
+ }
67
+
68
+ & > .table-row.disabled,
69
+ &.disabled > .table-row {
57
70
  background-color: transparent;
71
+ }
58
72
 
59
- &::after {
60
- display: none;
73
+ & > .table-row {
74
+ &.checked,
75
+ &.checked.selected {
76
+ /* Mark checked rows with a background color */
77
+ background-color: @table-row-checked-background-color;
78
+
79
+ & > .table-cell {
80
+ color: @table-row-checked-color;
81
+ }
82
+
83
+ &:hover {
84
+ background-color: @selected-hover-background-color;
85
+ }
61
86
  }
62
87
  }
63
88
 
64
- &.checked,
65
- &.checked.selected {
66
- /* Mark checked rows with a background color */
67
- background-color: @table-row-checked-background-color;
68
-
69
- & > .table-cell {
70
- color: @table-row-checked-color;
89
+ & > .table-row.disabled,
90
+ &.disabled > .table-row {
91
+ &.checked,
92
+ &.checked.selected {
93
+ background-color: @selected-disabled-background-color;
71
94
  }
72
95
  }
73
96
  }
@@ -121,20 +144,30 @@
121
144
  }
122
145
 
123
146
  & > .filter-field {
124
- --filter-field-max-bottom: calc(~'50% - ' (@filter-field-height + var(--controls-height)) / 2);
147
+ --filter-field-max-bottom: calc(~'50% - ' (var(--filter-field-height) + var(--controls-height)) / 2);
125
148
 
126
149
  &:not(.focused).empty {
127
150
  --filter-field-max-bottom: calc(~'50% - ' (@filter-field-icon-size + var(--controls-height)) / 2);
128
151
  }
129
152
 
130
153
  .has-menubar.menubar-bottom& {
131
- --filter-field-max-bottom: calc(~'50% - ' (@filter-field-height + var(--controls-height)) / 2);
154
+ --filter-field-max-bottom: calc(~'50% - ' (var(--filter-field-height) + var(--controls-height)) / 2);
132
155
  bottom: calc(min(var(--filter-field-bottom), var(--filter-field-max-bottom)) + var(--menubar-height));
133
156
 
134
157
  &:not(.focused).empty {
135
158
  --filter-field-max-bottom: calc(~'50% - ' (@filter-field-icon-size + var(--controls-height)) / 2);
136
159
  }
137
160
  }
161
+
162
+ .has-cell-editor-popup& {
163
+ opacity: 0;
164
+ visibility: hidden;
165
+
166
+ // start the "fade out" transition right away
167
+ --filter-field-opacity-transition-delay: 0s;
168
+ // set visibility to hidden right after the "fade out" transition ends
169
+ --filter-field-visibility-transition-delay: calc(@filter-field-transition-duration + var(--filter-field-opacity-transition-delay));
170
+ }
138
171
  }
139
172
  }
140
173
 
@@ -612,4 +645,4 @@
612
645
 
613
646
  .organize-columns-behind-scrollbar-column.table-cell.last {
614
647
  padding: 0;
615
- }
648
+ }
@@ -8,7 +8,7 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
- import {arrays, Column, ColumnUserFilter, Device, graphics, GroupBoxMenuItemsOrder, inspector, MenuBar, MenuDestinations, scout, scrollbars, strings, styles, Table, tooltips, Widget} from '../index';
11
+ import {arrays, Column, ColumnUserFilter, Device, graphics, GroupBoxMenuItemsOrder, inspector, MenuBar, MenuDestinations, objects, scout, scrollbars, strings, styles, Table, tooltips, Widget} from '../index';
12
12
  import $ from 'jquery';
13
13
 
14
14
  export default class TableHeader extends Widget {
@@ -459,21 +459,23 @@ export default class TableHeader extends Widget {
459
459
  let filtered = this.table.getFilter(column.id);
460
460
  if (column.sortActive || column.grouped || filtered) {
461
461
  if (column.minWidth < Column.DEFAULT_MIN_WIDTH) {
462
- column.prefMinWidth = column.minWidth;
462
+ column.__minWidthWithoutState = column.minWidth;
463
+ column.__widthWithoutState = column.width;
463
464
  column.minWidth = Column.DEFAULT_MIN_WIDTH;
464
465
  }
465
466
  if (column.width < column.minWidth) {
466
467
  this.table.resizeColumn(column, column.minWidth);
467
468
  }
468
469
  } else {
469
- // Reset to preferred min width if no state is visible
470
- if (column.prefMinWidth !== null) {
471
- column.minWidth = column.prefMinWidth;
472
- column.prefMinWidth = null;
473
- // Resize to old min width, assuming user has not manually changed the size because column is still as width as default_min_width
470
+ // Reset to previous min width if no state is visible
471
+ if (!objects.isNullOrUndefined(column.__minWidthWithoutState)) {
472
+ column.minWidth = column.__minWidthWithoutState;
473
+ // Resize to previous min width, assuming user has not manually changed the size because column is still as width as default_min_width
474
474
  if (column.width === Column.DEFAULT_MIN_WIDTH) {
475
- this.table.resizeColumn(column, column.minWidth);
475
+ this.table.resizeColumn(column, column.__widthWithoutState);
476
476
  }
477
+ column.__minWidthWithoutState = null;
478
+ column.__widthWithoutState = null;
477
479
  }
478
480
  }
479
481
  }
@@ -180,6 +180,7 @@
180
180
 
181
181
  .table-header-item-text {
182
182
  #scout.overflow-ellipsis-nowrap();
183
+ margin-top: @text-margin-top;
183
184
  }
184
185
 
185
186
  .table-header-item-state {
@@ -241,7 +241,9 @@ export default class TableHeaderMenu extends Popup {
241
241
  if (this.filterTable) {
242
242
  this.filterTable.off('rowsChecked', this._filterTableRowsCheckedHandler);
243
243
  }
244
- this.tableHeader.$container.off('scroll', this._tableHeaderScrollHandler);
244
+ if (this.tableHeader.rendered) {
245
+ this.tableHeader.$container.off('scroll', this._tableHeaderScrollHandler);
246
+ }
245
247
  this.$headerItem.select(false);
246
248
  this.table.off('columnMoved', this._onColumnMovedHandler);
247
249
  this.table.off('filterAdded', this._tableFilterHandler);
@@ -33,6 +33,11 @@
33
33
  display: inline-block;
34
34
  vertical-align: top;
35
35
  padding: @table-header-menu-padding;
36
+
37
+ & > .table-header-menu-group > .table-header-menu-group-text {
38
+ // Increase size a little to ensure every text is fully visible, at least for german and english (currently necessary for additional sorting group)
39
+ width: calc(100% + 12px);
40
+ }
36
41
  }
37
42
 
38
43
  .table-header-menu-filters {
@@ -252,11 +257,11 @@
252
257
 
253
258
  & > .table-data {
254
259
  margin-top: 0;
255
- padding: 3px 4px;
260
+ padding: 3px;
256
261
 
257
262
  & > .table-row {
258
263
  border-radius: @border-radius;
259
- margin-bottom: 1px;
264
+ margin-bottom: 2px;
260
265
 
261
266
  &.last {
262
267
  margin-bottom: 0;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2020 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ export default class BooleanColumn extends Column {
21
21
  this.comparator = comparators.NUMERIC;
22
22
  this.filterType = 'ColumnUserFilter';
23
23
  this.horizontalAlignment = 0;
24
- this.minWidth = Column.NARROW_MIN_WIDTH;
24
+ this.minWidth = Column.SMALL_MIN_WIDTH;
25
25
  this.triStateEnabled = false;
26
26
  this.textBased = false;
27
27
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -43,7 +43,6 @@ export default class Column {
43
43
  this.type = 'text';
44
44
  this.width = 60;
45
45
  this.initialWidth = undefined; // the width the column initially has
46
- this.prefMinWidth = null;
47
46
  this.minWidth = Column.DEFAULT_MIN_WIDTH; // the minimal width the column can have
48
47
  this.showSeparator = true;
49
48
  this.table = null;
@@ -71,7 +70,8 @@ export default class Column {
71
70
  }
72
71
 
73
72
  static DEFAULT_MIN_WIDTH = 60;
74
- static NARROW_MIN_WIDTH = 32; // for columns without text (icon, check box)
73
+ static SMALL_MIN_WIDTH = 38;
74
+ static NARROW_MIN_WIDTH = 32;
75
75
 
76
76
  init(model) {
77
77
  this.session = model.session;
@@ -178,7 +178,7 @@ export default class ColumnOptimalWidthMeasurer {
178
178
  return 0;
179
179
  }
180
180
  let $neighbour = cellRange[cellRange.length - 1];
181
- if ($neighbour.hasClass('empty') || $cell.hasClass('halign-right') == $neighbour.hasClass('halign-right')) {
181
+ if ($neighbour.hasClass('empty') || $cell.hasClass('halign-right') === $neighbour.hasClass('halign-right')) {
182
182
  return 0;
183
183
  }
184
184
  let $neighbourText = $neighbour.children('.text');
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -63,6 +63,13 @@ export default class CellEditorPopup extends Popup {
63
63
  this.pack();
64
64
  }
65
65
 
66
+ /**
67
+ * @override
68
+ */
69
+ _getDefaultOpen$Parent() {
70
+ return this.table.$data;
71
+ }
72
+
66
73
  _render() {
67
74
  super._render();
68
75
 
@@ -20,4 +20,4 @@ export default class TagBarOverflowPopupLayout extends PopupLayout {
20
20
  prefSize.width += this.popup.htmlComp.insets().horizontal();
21
21
  return prefSize;
22
22
  }
23
- }
23
+ }
@@ -396,7 +396,7 @@ export default class TileGrid extends Widget {
396
396
  }
397
397
 
398
398
  _onAnimatedTileRemove(tile) {
399
- if (!tile.rendered || !tile.animateRemoval) {
399
+ if (!tile.removalPending) {
400
400
  return;
401
401
  }
402
402
  this.tileRemovalPendingCount++;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -151,7 +151,7 @@ export default class TileGridLayout extends LogicalGridLayout {
151
151
  */
152
152
  _layoutCellBounds(containerSize, containerInsets) {
153
153
  // Since the tiles are positioned absolutely it is necessary to add the height of the filler to the top insets
154
- if (this.widget.virtual) {
154
+ if (this.widget.virtual && this.widget.$fillBefore) {
155
155
  containerInsets.top += this.widget.$fillBefore.outerHeight(true);
156
156
  }
157
157
  return super._layoutCellBounds(containerSize, containerInsets);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
@@ -352,6 +352,21 @@ export default class TileAccordion extends Accordion {
352
352
  _filter() {
353
353
  this.groups.forEach(group => {
354
354
  group.body.filter();
355
+
356
+ // If the layout has not been invalidated as part of the filtering above, it even though must be validated here.
357
+ // This is because groups above might have fewer visible Tiles now which makes room for this group.
358
+ // The revalidateLayout() with scrolling=true here ensures TileGrid._renderViewPort() is called to ensure these Tiles become visible as there is space available now.
359
+ // It is executed as postValidateFunction because the groups above must have completed their layouting so that
360
+ // TileGrid._renderViewPort() knows that there is more space available now.
361
+ if (group.body.htmlComp && group.body.htmlComp.valid && !group.body._accordionLayoutHandler /* skip if already registered */) {
362
+ group.body._accordionLayoutHandler = () => {
363
+ group.body.scrolling = true;
364
+ group.body.revalidateLayout();
365
+ group.body.scrolling = false;
366
+ group.body._accordionLayoutHandler = null;
367
+ };
368
+ this.session.layoutValidator.schedulePostValidateFunction(group.body._accordionLayoutHandler);
369
+ }
355
370
  });
356
371
  }
357
372
 
@@ -222,8 +222,16 @@
222
222
  }
223
223
  }
224
224
 
225
- &.has-error > .status::before {
226
- color: @palette-red-3;
225
+ &.has-error > .status {
226
+ &::before {
227
+ color: @tile-default-inverted-error-status-color;
228
+ }
229
+
230
+ &:hover::before,
231
+ &:active::before,
232
+ &.selected::before {
233
+ color: @tile-default-inverted-error-status-hover-color;
234
+ }
227
235
  }
228
236
 
229
237
  .scrollbar-thumb-handle {
@@ -315,11 +323,11 @@
315
323
  }
316
324
 
317
325
  &.selected {
318
- #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-selected-border-color, @y2: 0px, @blur2: 0px);
326
+ #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @y2: 0px, @blur2: 0px);
319
327
 
320
328
  &.inverted {
321
- --tile-background-color: mix(@tile-default-inverted-background-color, @tile-default-inverted-selection-background-color, 65%);
322
- #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @y2: 0px, @blur2: 0px);
329
+ --tile-background-color: @dashboard-tile-default-inverted-background-color;
330
+ #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-inverted-selected-border-color, @y2: 0px, @blur2: 0px);
323
331
  }
324
332
 
325
333
  &.color-alternative {
@@ -327,16 +335,15 @@
327
335
  }
328
336
 
329
337
  &.inverted.color-alternative {
330
- --tile-background-color: mix(@tile-alternative-inverted-background-color, @tile-alternative-inverted-selection-background-color, 65%);
331
- #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-selected-border-color, @y2: 0px, @blur2: 0px);
338
+ --tile-background-color: @dashboard-tile-alternative-inverted-background-color;
339
+ #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-inverted-selected-border-color, @y2: 0px, @blur2: 0px);
332
340
  }
333
341
 
334
-
335
342
  .dimmed-background & {
336
- #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-light-alpha);
343
+ #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-light-alpha);
337
344
 
338
345
  &.inverted {
339
- #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
346
+ #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-inverted-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
340
347
  }
341
348
 
342
349
  &.color-alternative {
@@ -344,7 +351,7 @@
344
351
  }
345
352
 
346
353
  &.inverted.color-alternative {
347
- #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
354
+ #scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-inverted-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
348
355
  }
349
356
  }
350
357
  }
@@ -15,4 +15,4 @@ export default class ButtonTile extends FormFieldTile {
15
15
  super._render();
16
16
  this.$container.addClass('button-tile');
17
17
  }
18
- }
18
+ }