@eclipse-scout/core 22.0.2 → 22.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js +2 -0
- package/dist/eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js.map +1 -0
- package/dist/eclipse-scout-core-theme-74b63e0d57bed407a729.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark-b82aea152f416e38ce7f.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark.css +153 -52
- package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
- package/dist/eclipse-scout-core-theme.css +153 -52
- package/dist/eclipse-scout-core-theme.css.map +1 -1
- package/dist/eclipse-scout-core.js +785 -564
- package/dist/eclipse-scout-core.js.map +1 -1
- package/dist/file-list +4 -4
- package/package.json +2 -2
- package/src/ErrorHandler.js +66 -28
- package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
- package/src/box/Box.less +10 -6
- package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
- package/src/checkbox/CheckBox.less +3 -1
- package/src/datepicker/DatePickerTouchPopup.js +8 -0
- package/src/desktop/DisableBrowserF5ReloadKeyStroke.js +1 -0
- package/src/desktop/bench/DesktopTabSelectKeyStroke.js +2 -1
- package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
- package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
- package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
- package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
- package/src/filechooser/FileChooser.js +1 -1
- package/src/filechooser/FileChooser.less +15 -10
- package/src/focus/FocusContext.js +11 -8
- package/src/focus/FocusManager.js +24 -5
- package/src/form/fields/LookupBox.js +3 -1
- package/src/form/fields/LookupBox.less +28 -2
- package/src/form/fields/TextFieldIcon.less +2 -2
- package/src/form/fields/ValueField.js +11 -2
- package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +10 -4
- package/src/form/fields/button/ButtonKeyStroke.js +0 -3
- package/src/form/fields/datefield/DateField.js +31 -47
- package/src/form/fields/filechooserfield/FileChooserFieldBrowseKeyStroke.js +1 -3
- package/src/form/fields/filechooserfield/FileChooserFieldDeleteKeyStroke.js +1 -3
- package/src/form/fields/groupbox/GroupBox.js +1 -0
- package/src/form/fields/listbox/ListBox.js +5 -4
- package/src/form/fields/lookupfield/lookupField.js +6 -5
- package/src/form/fields/smartfield/ProposalField.js +2 -1
- package/src/form/fields/smartfield/ProposalTreeNode.js +4 -8
- package/src/form/fields/smartfield/SmartField.js +4 -20
- package/src/form/fields/smartfield/SmartField.less +24 -11
- package/src/form/fields/splitbox/SplitBoxCollapseKeyStroke.js +1 -0
- package/src/form/fields/splitbox/SplitBoxFirstCollapseKeyStroke.js +1 -0
- package/src/form/fields/splitbox/SplitBoxSecondCollapseKeyStroke.js +1 -0
- package/src/form/fields/tabbox/TabAreaLeftKeyStroke.js +2 -0
- package/src/form/fields/tabbox/TabAreaRightKeyStroke.js +2 -0
- package/src/form/fields/tabbox/TabBox.js +4 -0
- package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
- package/src/form/fields/tabbox/TabItem.js +4 -0
- package/src/form/fields/treebox/TreeBox.js +6 -5
- package/src/index.js +1 -1
- package/src/jquery/jquery-scout.js +12 -0
- package/src/keystroke/CloseKeyStroke.js +1 -0
- package/src/keystroke/ContextMenuKeyStroke.js +1 -0
- package/src/keystroke/FocusFilterFieldKeyStroke.js +1 -0
- package/src/keystroke/KeyStroke.js +11 -3
- package/src/keystroke/TabItemKeyStroke.js +8 -5
- package/src/logging/logging.js +16 -8
- package/src/login/LoginBox.js +3 -2
- package/src/login/LoginBox.less +18 -1
- package/src/menu/MenuExecKeyStroke.js +3 -17
- package/src/menu/MenuNavigationKeyStroke.js +1 -0
- package/src/menu/menubar/MenuBarLeftKeyStroke.js +2 -0
- package/src/menu/menubar/MenuBarRightKeyStroke.js +2 -0
- package/src/messagebox/MessageBox.less +17 -17
- package/src/planner/Planner.js +2 -0
- package/src/session/Session.js +8 -5
- package/src/style/fonts.less +5 -1
- package/src/style/sizes.less +14 -5
- package/src/table/Table.js +25 -19
- package/src/table/Table.less +14 -7
- package/src/table/TableAdapter.js +9 -12
- package/src/table/TableHeaderMenuButton.js +2 -2
- package/src/table/TableLayout.js +6 -0
- package/src/table/columns/Column.js +8 -5
- package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
- package/src/table/editor/CellEditorPopup.js +21 -14
- package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -0
- package/src/table/keystrokes/TableCopyKeyStroke.js +1 -0
- package/src/table/keystrokes/TableNavigationCollapseKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationEndKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationExpandKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationHomeKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationPageDownKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationPageUpKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationUpKeyStroke.js +2 -2
- package/src/table/keystrokes/TableRefreshKeyStroke.js +2 -2
- package/src/table/keystrokes/TableSelectAllKeyStroke.js +3 -2
- package/src/table/keystrokes/TableStartCellEditKeyStroke.js +2 -2
- package/src/testing/index.js +1 -0
- package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
- package/src/tile/TileGrid.js +9 -11
- package/src/tile/fields/tablefield/TileTableField.less +19 -2
- package/src/tile/keystrokes/TileGridSelectKeyStroke.js +3 -2
- package/src/timepicker/TimePickerTouchPopup.js +8 -0
- package/src/tree/Tree.js +8 -4
- package/src/tree/Tree.less +12 -2
- package/src/tree/keystrokes/AbstractTreeNavigationKeyStroke.js +1 -0
- package/src/tree/keystrokes/TreeCollapseAllKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeExpandOrDrillDownKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeNavigationDownKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeNavigationEndKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeNavigationUpKeyStroke.js +2 -2
- package/src/util/Device.js +4 -4
- package/src/util/arrays.js +20 -0
- package/src/widget/Widget.js +6 -4
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js +0 -2
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js.map +0 -1
- package/dist/eclipse-scout-core-theme-6b2fef56e9e49231a49c.min.css +0 -1
- package/dist/eclipse-scout-core-theme-dark-d2bb274dd42f132bfca0.min.css +0 -1
|
@@ -147,7 +147,7 @@ export default class ColumnOptimalWidthMeasurer {
|
|
|
147
147
|
_build$CellForAggregateRow(row) {
|
|
148
148
|
let columns = this.table.visibleColumns();
|
|
149
149
|
let colIndex = columns.indexOf(this.column);
|
|
150
|
-
let $row = this.table.
|
|
150
|
+
let $row = this.table._build$AggregateRow(row);
|
|
151
151
|
|
|
152
152
|
$row.appendTo(this.table.$data);
|
|
153
153
|
columns
|
|
@@ -94,12 +94,10 @@ export default class CellEditorPopup extends Popup {
|
|
|
94
94
|
cssClass: cssClass
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
this._alignWithSelection();
|
|
98
|
-
|
|
99
97
|
// Make sure cell content is not visible while the editor is open (especially necessary for transparent editors like checkboxes)
|
|
100
98
|
this.$anchor.css('visibility', 'hidden');
|
|
101
99
|
|
|
102
|
-
this._rowOrderChangedFunc =
|
|
100
|
+
this._rowOrderChangedFunc = event => {
|
|
103
101
|
if (event.animating) {
|
|
104
102
|
// row is only set while animating
|
|
105
103
|
if (event.row === this.row) {
|
|
@@ -108,7 +106,7 @@ export default class CellEditorPopup extends Popup {
|
|
|
108
106
|
} else {
|
|
109
107
|
this.position();
|
|
110
108
|
}
|
|
111
|
-
}
|
|
109
|
+
};
|
|
112
110
|
this.table.on('rowOrderChanged', this._rowOrderChangedFunc);
|
|
113
111
|
// Set table style to focused, so that it looks as it still has the focus.
|
|
114
112
|
// This prevents flickering if the cell editor gets opened, especially when tabbing to the next cell editor.
|
|
@@ -168,14 +166,15 @@ export default class CellEditorPopup extends Popup {
|
|
|
168
166
|
}
|
|
169
167
|
|
|
170
168
|
position() {
|
|
171
|
-
let
|
|
172
|
-
$tableData = this.table.$data,
|
|
169
|
+
let $tableData = this.table.$data,
|
|
173
170
|
$row = this.row.$row,
|
|
174
171
|
$cell = this.$anchor,
|
|
175
172
|
insetsLeft = $tableData.cssPaddingLeft() + $row.cssMarginLeft() + $row.cssBorderLeftWidth();
|
|
176
173
|
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
this._alignWithSelection();
|
|
175
|
+
|
|
176
|
+
let cellBounds = graphics.bounds($cell);
|
|
177
|
+
let rowBounds = graphics.bounds($row);
|
|
179
178
|
this.setLocation(new Point(insetsLeft + cellBounds.x, $tableData.scrollTop() + rowBounds.y));
|
|
180
179
|
}
|
|
181
180
|
|
|
@@ -203,7 +202,8 @@ export default class CellEditorPopup extends Popup {
|
|
|
203
202
|
}
|
|
204
203
|
|
|
205
204
|
this._pendingCompleteCellEdit.then(() => {
|
|
206
|
-
|
|
205
|
+
// Ensure complete will never be called more than once
|
|
206
|
+
this._pendingCompleteCellEdit = $.resolvedPromise();
|
|
207
207
|
});
|
|
208
208
|
|
|
209
209
|
return this._pendingCompleteCellEdit;
|
|
@@ -243,11 +243,7 @@ export default class CellEditorPopup extends Popup {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
_onKeyStroke(event) {
|
|
246
|
-
if (!this.
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
if (this.$container.isOrHas(event.keyStrokeContext.$getScopeTarget())) {
|
|
250
|
-
// Don't interfere with key strokes of the popup or children of the popup (otherwise pressing enter would close both the popup and the form at once)
|
|
246
|
+
if (!this._invokeCompleteEditBeforeKeyStroke(event)) {
|
|
251
247
|
return;
|
|
252
248
|
}
|
|
253
249
|
// Make sure completeEdit is called immediately after calling acceptInput.
|
|
@@ -256,6 +252,17 @@ export default class CellEditorPopup extends Popup {
|
|
|
256
252
|
this.completeEdit(false);
|
|
257
253
|
}
|
|
258
254
|
|
|
255
|
+
_invokeCompleteEditBeforeKeyStroke(event) {
|
|
256
|
+
if (!this.session.keyStrokeManager.invokeAcceptInputOnActiveValueField(event.keyStroke, event.keyStrokeContext)) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
if (this.$container.isOrHas(event.keyStrokeContext.$getScopeTarget())) {
|
|
260
|
+
// Don't interfere with key strokes of the popup or children of the popup (otherwise pressing enter would close both the popup and the form at once)
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
|
|
259
266
|
waitForCompleteCellEdit() {
|
|
260
267
|
if (this._pendingCompleteCellEdit) {
|
|
261
268
|
return this._pendingCompleteCellEdit.promise();
|
|
@@ -19,6 +19,7 @@ export default class AbstractTableNavigationKeyStroke extends KeyStroke {
|
|
|
19
19
|
this.shift = !table.multiSelect ? false : undefined;
|
|
20
20
|
this.stopPropagation = true;
|
|
21
21
|
this.keyStrokeMode = KeyStroke.Mode.DOWN;
|
|
22
|
+
this.inheritAccessibility = false;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
_accept(event) {
|
|
@@ -17,12 +17,12 @@ export default class TableNavigationCollapseKeyStroke extends AbstractTableNavig
|
|
|
17
17
|
this.field = table;
|
|
18
18
|
this.which = [keys.SUBTRACT, keys.LEFT];
|
|
19
19
|
this.renderingHints.text = '-';
|
|
20
|
-
this.renderingHints.$drawingArea =
|
|
20
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
21
21
|
let row = this.field.selectedRows[0];
|
|
22
22
|
if (row) {
|
|
23
23
|
return row.$row;
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
_accept(event) {
|
|
@@ -16,12 +16,12 @@ export default class TableNavigationEndKeyStroke extends AbstractTableNavigation
|
|
|
16
16
|
super(table);
|
|
17
17
|
this.which = [keys.END];
|
|
18
18
|
this.renderingHints.text = 'End';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let viewport = this._viewportInfo();
|
|
21
21
|
if (viewport.lastRow) {
|
|
22
22
|
return viewport.lastRow.$row;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
handle(event) {
|
|
@@ -17,12 +17,12 @@ export default class TableNavigationExpandKeyStroke extends AbstractTableNavigat
|
|
|
17
17
|
this.field = table;
|
|
18
18
|
this.which = [keys.ADD, keys.RIGHT];
|
|
19
19
|
this.renderingHints.text = '+';
|
|
20
|
-
this.renderingHints.$drawingArea =
|
|
20
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
21
21
|
let row = this.field.selectedRows[0];
|
|
22
22
|
if (row) {
|
|
23
23
|
return row.$row;
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
_accept(event) {
|
|
@@ -16,12 +16,12 @@ export default class TableNavigationHomeKeyStroke extends AbstractTableNavigatio
|
|
|
16
16
|
super(table);
|
|
17
17
|
this.which = [keys.HOME];
|
|
18
18
|
this.renderingHints.text = 'Home';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let viewport = this._viewportInfo();
|
|
21
21
|
if (viewport.firstRow) {
|
|
22
22
|
return viewport.firstRow.$row;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
handle(event) {
|
|
@@ -16,12 +16,12 @@ export default class TableNavigationPageDownKeyStroke extends AbstractTableNavig
|
|
|
16
16
|
super(table);
|
|
17
17
|
this.which = [keys.PAGE_DOWN];
|
|
18
18
|
this.renderingHints.text = 'PgDn';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let viewport = this._viewportInfo();
|
|
21
21
|
if (viewport.lastRow) {
|
|
22
22
|
return viewport.lastRow.$row;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
handle(event) {
|
|
@@ -16,12 +16,12 @@ export default class TableNavigationPageUpKeyStroke extends AbstractTableNavigat
|
|
|
16
16
|
super(table);
|
|
17
17
|
this.which = [keys.PAGE_UP];
|
|
18
18
|
this.renderingHints.text = 'PgUp';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let viewport = this._viewportInfo();
|
|
21
21
|
if (viewport.firstRow) {
|
|
22
22
|
return viewport.firstRow.$row;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
handle(event) {
|
|
@@ -16,12 +16,12 @@ export default class TableNavigationUpKeyStroke extends AbstractTableNavigationK
|
|
|
16
16
|
super(table);
|
|
17
17
|
this.which = [keys.UP];
|
|
18
18
|
this.renderingHints.text = '↑';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let row = this.firstRowBeforeSelection();
|
|
21
21
|
if (row) {
|
|
22
22
|
return row.$row;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
handle(event) {
|
|
@@ -17,9 +17,9 @@ export default class TableRefreshKeyStroke extends KeyStroke {
|
|
|
17
17
|
this.field = table;
|
|
18
18
|
this.which = [keys.F5];
|
|
19
19
|
this.renderingHints.offset = 14;
|
|
20
|
-
this.renderingHints.$drawingArea =
|
|
20
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
21
21
|
return this.field.footer ? this.field.footer._$infoLoad.find('.table-info-button') : null;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
_accept(event) {
|
|
@@ -18,9 +18,10 @@ export default class TableSelectAllKeyStroke extends KeyStroke {
|
|
|
18
18
|
this.ctrl = true;
|
|
19
19
|
this.which = [keys.A];
|
|
20
20
|
this.renderingHints.offset = 14;
|
|
21
|
-
this.renderingHints.$drawingArea =
|
|
21
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
22
22
|
return this.field.footer ? this.field.footer._$infoSelection.find('.table-info-button') : null;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
|
+
this.inheritAccessibility = false;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
handle(event) {
|
|
@@ -18,7 +18,7 @@ export default class TableStartCellEditKeyStroke extends KeyStroke {
|
|
|
18
18
|
this.ctrl = true;
|
|
19
19
|
this.which = [keys.ENTER];
|
|
20
20
|
this.stopPropagation = true;
|
|
21
|
-
this.renderingHints.$drawingArea =
|
|
21
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
22
22
|
let editPosition = event._editPosition,
|
|
23
23
|
columnIndex = this.field.visibleColumns().indexOf(editPosition.column);
|
|
24
24
|
if (columnIndex === 0) {
|
|
@@ -26,7 +26,7 @@ export default class TableStartCellEditKeyStroke extends KeyStroke {
|
|
|
26
26
|
return editPosition.row.$row;
|
|
27
27
|
}
|
|
28
28
|
return this.field.$cell(columnIndex, editPosition.row.$row);
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
_accept(event) {
|
package/src/testing/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export {default as TestBeanField} from './form/fields/beanfield/TestBeanField';
|
|
|
20
20
|
export {default as TabBoxSpecHelper} from './form/fields/tabbox/TabBoxSpecHelper';
|
|
21
21
|
export {default as OutlineSpecHelper} from './desktop/outline/OutlineSpecHelper';
|
|
22
22
|
export {default as DummyLookupCall} from './lookup/DummyLookupCall';
|
|
23
|
+
export {default as AbortableMicrotaskStaticLookupCall} from './lookup/AbortableMicrotaskStaticLookupCall';
|
|
23
24
|
export {default as ActiveDummyLookupCall} from './lookup/ActiveDummyLookupCall';
|
|
24
25
|
export {default as ColumnDescriptorDummyLookupCall} from './lookup/ColumnDescriptorDummyLookupCall';
|
|
25
26
|
export {default as LanguageDummyLookupCall} from './lookup/LanguageDummyLookupCall';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2010-2020 BSI Business Systems Integration AG.
|
|
3
|
+
* All rights reserved. This program and the accompanying materials
|
|
4
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
+
* which accompanies this distribution, and is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-v10.html
|
|
7
|
+
*
|
|
8
|
+
* Contributors:
|
|
9
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
+
*/
|
|
11
|
+
import {StaticLookupCall} from '../../index';
|
|
12
|
+
import $ from 'jquery';
|
|
13
|
+
|
|
14
|
+
export default class AbortableMicrotaskStaticLookupCall extends StaticLookupCall {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this._deferred = null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
abort() {
|
|
21
|
+
this._deferred.reject({
|
|
22
|
+
canceled: true
|
|
23
|
+
});
|
|
24
|
+
super.abort();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_getByKey(key) {
|
|
28
|
+
this._deferred = $.Deferred();
|
|
29
|
+
queueMicrotask(this._queryByKey.bind(this, this._deferred, key));
|
|
30
|
+
return this._deferred.promise();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_getAll() {
|
|
34
|
+
this._deferred = $.Deferred();
|
|
35
|
+
queueMicrotask(this._queryByAll.bind(this, this._deferred));
|
|
36
|
+
return this._deferred.promise();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
_getByText(text) {
|
|
40
|
+
this._deferred = $.Deferred();
|
|
41
|
+
queueMicrotask(this._queryByText.bind(this, this._deferred, text));
|
|
42
|
+
return this._deferred.promise();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
_getByRec(rec) {
|
|
46
|
+
this._deferred = $.Deferred();
|
|
47
|
+
queueMicrotask(this._queryByRec.bind(this, this._deferred, rec));
|
|
48
|
+
return this._deferred.promise();
|
|
49
|
+
}
|
|
50
|
+
}
|
package/src/tile/TileGrid.js
CHANGED
|
@@ -198,7 +198,11 @@ export default class TileGrid extends Widget {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
_updateTabbable() {
|
|
201
|
-
|
|
201
|
+
if (!this.textFilterEnabled && !this.selectable) {
|
|
202
|
+
this.$container.setTabbable(false);
|
|
203
|
+
} else {
|
|
204
|
+
this.$container.setTabbableOrFocusable(this.enabledComputed);
|
|
205
|
+
}
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
insertTile(tile) {
|
|
@@ -760,16 +764,10 @@ export default class TileGrid extends Widget {
|
|
|
760
764
|
if ($scrollables.length === 0) {
|
|
761
765
|
return;
|
|
762
766
|
}
|
|
763
|
-
let oldScrollTopArr = $scrollables.map((i, $elem) => {
|
|
764
|
-
return $elem.scrollTop();
|
|
765
|
-
}).toArray();
|
|
766
767
|
// Make sure the tile grid has the focus when focusing a tile
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
$scrollables[idx].scrollTop(val);
|
|
771
|
-
}, this);
|
|
772
|
-
}
|
|
768
|
+
this.focus({
|
|
769
|
+
preventScroll: true
|
|
770
|
+
});
|
|
773
771
|
}
|
|
774
772
|
|
|
775
773
|
setSelectable(selectable) {
|
|
@@ -1382,7 +1380,7 @@ export default class TileGrid extends Widget {
|
|
|
1382
1380
|
}
|
|
1383
1381
|
|
|
1384
1382
|
_removeTileByFilter(tile) {
|
|
1385
|
-
// In virtual mode, filtered tiles are not rendered. In normal mode, the filter animation is
|
|
1383
|
+
// In virtual mode, filtered tiles are not rendered. In normal mode, the filter animation is triggered by _renderVisible of the tile.
|
|
1386
1384
|
// Since the tile is removed immediately, the invisible animation would not start, so we use the remove animation instead.
|
|
1387
1385
|
// But because the delete animation is a different one to the filter animation, the removeClass needs to be swapped
|
|
1388
1386
|
// Remove class first to make sure animation won't be finished before the animationend listener is attached in Widget._removeAnimated (which may happen because a setTimeout is used there)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2010-
|
|
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
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -53,6 +53,23 @@
|
|
|
53
53
|
& > .table-header-item {
|
|
54
54
|
color: @tile-table-default-color;
|
|
55
55
|
|
|
56
|
+
&.sorted,
|
|
57
|
+
&.grouped,
|
|
58
|
+
&.filtered {
|
|
59
|
+
padding-right: @table-header-item-padding-right;
|
|
60
|
+
|
|
61
|
+
&.halign-right,
|
|
62
|
+
&.halign-center {
|
|
63
|
+
padding-right: @table-header-item-padding-left;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.last.halign-left,
|
|
67
|
+
&.last.halign-center,
|
|
68
|
+
&.last.halign-right {
|
|
69
|
+
padding-right: @table-header-item-padding-right-last;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
56
73
|
& > .table-header-item-state {
|
|
57
74
|
display: none;
|
|
58
75
|
}
|
|
@@ -16,12 +16,13 @@ export default class TileGridSelectKeyStroke extends KeyStroke {
|
|
|
16
16
|
super();
|
|
17
17
|
this.field = tileGrid;
|
|
18
18
|
this.shift = !tileGrid.multiSelect ? false : undefined;
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let result = this._computeNewSelection();
|
|
21
21
|
if (result && result.focusedTile) {
|
|
22
22
|
return result.focusedTile.$container;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
|
+
this.inheritAccessibility = false;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/**
|
package/src/tree/Tree.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -911,7 +911,7 @@ export default class Tree extends Widget {
|
|
|
911
911
|
this._installOrUninstallDragAndDropHandler();
|
|
912
912
|
let enabled = this.enabledComputed;
|
|
913
913
|
this.$data.setEnabled(enabled);
|
|
914
|
-
this.$container.
|
|
914
|
+
this.$container.setTabbableOrFocusable(enabled);
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
/**
|
|
@@ -2452,7 +2452,7 @@ export default class Tree extends Widget {
|
|
|
2452
2452
|
}
|
|
2453
2453
|
nodes = arrays.ensure(nodes);
|
|
2454
2454
|
nodes.forEach(function(node) {
|
|
2455
|
-
if (!node.enabled && opts.checkOnlyEnabled || node.checked === opts.checked) {
|
|
2455
|
+
if (!node.enabled && opts.checkOnlyEnabled || node.checked === opts.checked || !node.filterAccepted) {
|
|
2456
2456
|
if (opts.checkChildren) {
|
|
2457
2457
|
this.checkNodes(node.childNodes, opts);
|
|
2458
2458
|
}
|
|
@@ -2926,6 +2926,10 @@ export default class Tree extends Widget {
|
|
|
2926
2926
|
} else if (newWidth > this.maxNodeWidth) {
|
|
2927
2927
|
this.maxNodeWidth = newWidth;
|
|
2928
2928
|
this.nodeWidthDirty = true;
|
|
2929
|
+
} else if (newWidth === oldWidth && newWidth === 0) {
|
|
2930
|
+
// newWidth and oldWidth are 0: this might be because the tree is invisible while a node is added:
|
|
2931
|
+
// Mark as dirty to update the width later during layouting (when the tree gets visible and the width is available)
|
|
2932
|
+
this.nodeWidthDirty = true;
|
|
2929
2933
|
}
|
|
2930
2934
|
node.width = newWidth;
|
|
2931
2935
|
}, this);
|
|
@@ -3170,7 +3174,7 @@ export default class Tree extends Widget {
|
|
|
3170
3174
|
// same as on Table.prototype._onDesktopPopupOpen
|
|
3171
3175
|
_onDesktopPopupOpen(event) {
|
|
3172
3176
|
let popup = event.popup;
|
|
3173
|
-
if (!this.
|
|
3177
|
+
if (!this.isFocusable(false)) {
|
|
3174
3178
|
return;
|
|
3175
3179
|
}
|
|
3176
3180
|
// Set tree style to focused if a context menu or a menu bar popup opens, so that it looks as it still has the focus
|
package/src/tree/Tree.less
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -64,6 +64,13 @@
|
|
|
64
64
|
& > .animation-wrapper > .tree-node {
|
|
65
65
|
cursor: pointer;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
&.disabled > .tree-node,
|
|
69
|
+
&.disabled > .animation-wrapper > .tree-node,
|
|
70
|
+
& > .tree-node.disabled,
|
|
71
|
+
& > .animation-wrapper > .tree-node.disabled {
|
|
72
|
+
cursor: default;
|
|
73
|
+
}
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
|
|
@@ -95,12 +102,14 @@
|
|
|
95
102
|
color: @disabled-color;
|
|
96
103
|
}
|
|
97
104
|
|
|
105
|
+
.disabled > .animation-wrapper > &,
|
|
98
106
|
.disabled > & {
|
|
99
107
|
/* Whole tree is disabled -> use darker disabled color */
|
|
100
108
|
color: @text-disabled-color;
|
|
101
109
|
}
|
|
102
110
|
|
|
103
|
-
.disabled.read-only > .
|
|
111
|
+
.disabled.read-only > .animation-wrapper > &,
|
|
112
|
+
.disabled.read-only > & {
|
|
104
113
|
color: @read-only-color;
|
|
105
114
|
}
|
|
106
115
|
|
|
@@ -132,6 +141,7 @@
|
|
|
132
141
|
&.font-icon {
|
|
133
142
|
/* Necessary to align with the text, depends on the used font size */
|
|
134
143
|
line-height: @tree-node-font-icon-line-height;
|
|
144
|
+
font-size: @tree-node-font-icon-size;
|
|
135
145
|
}
|
|
136
146
|
}
|
|
137
147
|
}
|
|
@@ -16,11 +16,11 @@ export default class TreeCollapseAllKeyStroke extends AbstractTreeNavigationKeyS
|
|
|
16
16
|
super(tree, keyStrokeModifier);
|
|
17
17
|
this.which = [keys.HOME];
|
|
18
18
|
this.renderingHints.hAlign = HAlign.RIGHT;
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
if (this.field.visibleNodesFlat.length > 0) {
|
|
21
21
|
return this.field.visibleNodesFlat[0].$node;
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
handle(event) {
|
|
@@ -16,14 +16,14 @@ export default class TreeExpandOrDrillDownKeyStroke extends AbstractTreeNavigati
|
|
|
16
16
|
super(tree, modifierBitMask);
|
|
17
17
|
this.which = [keys.ADD];
|
|
18
18
|
this.renderingHints.text = '+';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let currentNode = event._treeCurrentNode;
|
|
21
21
|
if (this.isNodeExpandable(currentNode)) {
|
|
22
22
|
return currentNode.$node;
|
|
23
23
|
} else if (currentNode.childNodes.length > 0) {
|
|
24
24
|
return currentNode.childNodes[0].$node;
|
|
25
25
|
}
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
_accept(event) {
|
|
@@ -16,12 +16,12 @@ export default class TreeNavigationDownKeyStroke extends AbstractTreeNavigationK
|
|
|
16
16
|
super(tree, modifierBitMask);
|
|
17
17
|
this.which = [keys.DOWN];
|
|
18
18
|
this.renderingHints.text = '↓';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let newSelectedNode = this._computeNewSelection(event._treeCurrentNode);
|
|
21
21
|
if (newSelectedNode) {
|
|
22
22
|
return newSelectedNode.$node;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
_computeNewSelection(currentNode) {
|
|
@@ -15,12 +15,12 @@ export default class TreeNavigationEndKeyStroke extends AbstractTreeNavigationKe
|
|
|
15
15
|
constructor(tree, modifierBitMask) {
|
|
16
16
|
super(tree, modifierBitMask);
|
|
17
17
|
this.which = [keys.END];
|
|
18
|
-
this.renderingHints.$drawingArea =
|
|
18
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
19
19
|
let newSelectedNode = this._computeNewSelection(event._treeCurrentNode);
|
|
20
20
|
if (newSelectedNode) {
|
|
21
21
|
return newSelectedNode.$node;
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
handle(event) {
|
|
@@ -16,12 +16,12 @@ export default class TreeNavigationUpKeyStroke extends AbstractTreeNavigationKey
|
|
|
16
16
|
super(tree, modifierBitMask);
|
|
17
17
|
this.which = [keys.UP];
|
|
18
18
|
this.renderingHints.text = '↑';
|
|
19
|
-
this.renderingHints.$drawingArea =
|
|
19
|
+
this.renderingHints.$drawingArea = ($drawingArea, event) => {
|
|
20
20
|
let newSelectedNode = this._computeNewSelection(event._treeCurrentNode);
|
|
21
21
|
if (newSelectedNode) {
|
|
22
22
|
return newSelectedNode.$node;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
_computeNewSelection(currentNode) {
|
package/src/util/Device.js
CHANGED
|
@@ -259,15 +259,15 @@ export default class Device {
|
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
* This method returns false for all browsers that are known to be unsupported, all others (e.g. unknown engines) are allowed by default.
|
|
262
|
-
* The supported browser versions are mainly determined by the features needed by Scout (e.g. class syntax, Array.flatMap, IntersectionObserver, Custom CSS Properties, CSS flex-box).
|
|
262
|
+
* The supported browser versions are mainly determined by the features needed by Scout (e.g. class syntax, Array.flatMap, IntersectionObserver, Custom CSS Properties, CSS flex-box, queueMicrotask).
|
|
263
263
|
*/
|
|
264
264
|
isSupportedBrowser(browser, version) {
|
|
265
265
|
browser = scout.nvl(browser, this.browser);
|
|
266
266
|
version = scout.nvl(version, this.browserVersion);
|
|
267
267
|
let browsers = Device.Browser;
|
|
268
|
-
return (browser === browsers.CHROME && version >=
|
|
269
|
-
|| (browser === browsers.FIREFOX && version >=
|
|
270
|
-
|| (browser === browsers.SAFARI && version >= 12);
|
|
268
|
+
return (browser === browsers.CHROME && version >= 71)
|
|
269
|
+
|| (browser === browsers.FIREFOX && version >= 69)
|
|
270
|
+
|| (browser === browsers.SAFARI && version >= 12.1);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
/**
|