@eclipse-scout/core 22.0.0 → 22.0.10
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-e5e8740e3649f5b9f279.min.js +2 -0
- package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.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 +597 -422
- package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
- package/dist/eclipse-scout-core-theme.css +333 -158
- package/dist/eclipse-scout-core-theme.css.map +1 -1
- package/dist/eclipse-scout-core.js +1196 -811
- package/dist/eclipse-scout-core.js.map +1 -1
- package/dist/file-list +7 -0
- package/dist/locales.json +47126 -0
- package/dist/texts.json +1153 -0
- package/package.json +2 -2
- package/src/App.js +1 -1
- package/src/ErrorHandler.js +66 -28
- package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
- package/src/action/Button.less +1 -0
- package/src/box/Box.less +12 -8
- package/src/breadcrumbbar/BreadcrumbBarLayout.js +2 -2
- package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
- package/src/calendar/Calendar.js +40 -58
- package/src/calendar/Calendar.less +10 -10
- package/src/calendar/CalendarLayout.js +3 -1
- package/src/checkbox/CheckBox.less +3 -1
- package/src/datepicker/DatePicker.less +1 -0
- 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/DesktopTab.less +5 -2
- package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
- package/src/desktop/desktoptab/DesktopTabAreaLayout.js +1 -1
- package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
- package/src/desktop/navigation/DesktopNavigation.less +4 -0
- package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
- package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
- package/src/desktop/notification/DesktopNotification.js +11 -4
- package/src/desktop/notification/DesktopNotification.less +5 -3
- package/src/desktop/outline/Outline.less +4 -4
- package/src/desktop/viewbutton/ViewButton.less +18 -9
- package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
- package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
- package/src/filechooser/FileChooser.js +1 -1
- package/src/filechooser/FileChooser.less +16 -11
- package/src/focus/FocusContext.js +11 -8
- package/src/focus/FocusManager.js +24 -5
- package/src/form/Form.less +1 -0
- package/src/form/fields/LookupBox.js +5 -2
- 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 +20 -0
- 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 +14 -9
- package/src/form/fields/groupbox/GroupBox.less +1 -0
- package/src/form/fields/htmlfield/HtmlField.less +0 -1
- package/src/form/fields/listbox/ListBox.js +13 -7
- 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/TabAreaLayout.js +63 -66
- 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 +8 -7
- package/src/form/fields/tabbox/TabBox.less +2 -1
- package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
- package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
- package/src/form/fields/tabbox/TabItem.js +4 -0
- package/src/form/fields/treebox/TreeBox.js +6 -5
- package/src/glasspane/GlassPane.js +3 -3
- package/src/group/Group.less +1 -1
- package/src/index.js +1 -1
- package/src/index.less +1 -0
- package/src/jquery/jquery-scout.js +17 -4
- 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 +27 -8
- package/src/menu/ContextMenuPopup.less +9 -2
- package/src/menu/Menu.less +1 -0
- 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 +20 -20
- package/src/modeselector/Mode.less +15 -37
- package/src/modeselector/ModeSelector.js +1 -1
- package/src/modeselector/ModeSelector.less +2 -1
- package/src/planner/Planner.js +2 -0
- package/src/planner/PlannerHeader.less +2 -1
- package/src/popup/Popup.js +24 -8
- package/src/popup/PopupLayout.js +2 -8
- package/src/scrollbar/Scrollbar.less +8 -1
- package/src/scrollbar/scrollbars.js +26 -4
- package/src/session/Session.js +8 -5
- package/src/style/colors-dark.less +25 -11
- package/src/style/colors.less +17 -3
- package/src/style/fonts.less +10 -1
- package/src/style/mixins.less +21 -14
- package/src/style/sizes-dark.less +4 -1
- package/src/style/sizes.less +17 -9
- package/src/table/Table.js +63 -49
- package/src/table/Table.less +50 -20
- package/src/table/TableAdapter.js +9 -12
- package/src/table/TableHeader.js +10 -8
- package/src/table/TableHeader.less +1 -0
- package/src/table/TableHeaderMenu.js +3 -1
- package/src/table/TableHeaderMenu.less +7 -2
- package/src/table/TableHeaderMenuButton.js +2 -2
- package/src/table/TableLayout.js +6 -0
- package/src/table/columns/BooleanColumn.js +2 -2
- package/src/table/columns/Column.js +10 -7
- package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
- package/src/table/editor/CellEditorPopup.js +29 -15
- 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/tagbar/TagBarOverflowPopupLayout.js +1 -1
- package/src/testing/index.js +1 -0
- package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
- package/src/tile/TileGrid.js +10 -12
- package/src/tile/TileGridLayout.js +2 -2
- package/src/tile/accordion/TileAccordion.js +16 -1
- package/src/tile/fields/FormFieldTile.less +18 -11
- package/src/tile/fields/button/ButtonTile.js +1 -1
- 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/CompactTree.less +1 -1
- package/src/tree/LazyNodeFilter.js +4 -2
- package/src/tree/Tree.js +7 -5
- package/src/tree/Tree.less +13 -5
- 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 +44 -2
- package/src/util/dragAndDrop.js +5 -4
- package/src/util/events.js +1 -1
- package/src/util/objects.js +4 -1
- package/src/widget/FilterSupport.js +1 -1
- package/src/widget/Widget.js +17 -7
|
@@ -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) {
|
|
@@ -396,7 +400,7 @@ export default class TileGrid extends Widget {
|
|
|
396
400
|
}
|
|
397
401
|
|
|
398
402
|
_onAnimatedTileRemove(tile) {
|
|
399
|
-
if (!tile.
|
|
403
|
+
if (!tile.removalPending) {
|
|
400
404
|
return;
|
|
401
405
|
}
|
|
402
406
|
this.tileRemovalPendingCount++;
|
|
@@ -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,5 +1,5 @@
|
|
|
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
|
|
@@ -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-
|
|
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
|
|
226
|
-
|
|
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:
|
|
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:
|
|
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
|
}
|
|
@@ -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
|
/**
|
|
@@ -20,7 +20,9 @@ export default class LazyNodeFilter {
|
|
|
20
20
|
return true;
|
|
21
21
|
}
|
|
22
22
|
// not expanded: remove lazy expand marker (forget lazy expanded children)
|
|
23
|
-
node.childNodes.forEach(child =>
|
|
23
|
+
node.childNodes.forEach(child => {
|
|
24
|
+
child._lazyNodeFilterAccepted = false;
|
|
25
|
+
});
|
|
24
26
|
|
|
25
27
|
if (!node.parentNode || !node.parentNode.expandedLazy || !node.parentNode.lazyExpandingEnabled || !this.tree.lazyExpandingEnabled) {
|
|
26
28
|
// no lazy expanding supported
|
|
@@ -33,7 +35,7 @@ export default class LazyNodeFilter {
|
|
|
33
35
|
if (typeof selectedNode === 'string') {
|
|
34
36
|
break;
|
|
35
37
|
}
|
|
36
|
-
if (selectedNode
|
|
38
|
+
if (selectedNode === node) {
|
|
37
39
|
node._lazyNodeFilterAccepted = true;
|
|
38
40
|
return true;
|
|
39
41
|
}
|
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
|
|
@@ -250,7 +250,9 @@ export default class Tree extends Widget {
|
|
|
250
250
|
}
|
|
251
251
|
this._inSelectionPathList[selectedNode.id] = true;
|
|
252
252
|
|
|
253
|
-
selectedNode.childNodes.forEach(child =>
|
|
253
|
+
selectedNode.childNodes.forEach(child => {
|
|
254
|
+
this._inSelectionPathList[child.id] = true;
|
|
255
|
+
});
|
|
254
256
|
|
|
255
257
|
let parentNode = selectedNode.parentNode;
|
|
256
258
|
while (parentNode) {
|
|
@@ -909,7 +911,7 @@ export default class Tree extends Widget {
|
|
|
909
911
|
this._installOrUninstallDragAndDropHandler();
|
|
910
912
|
let enabled = this.enabledComputed;
|
|
911
913
|
this.$data.setEnabled(enabled);
|
|
912
|
-
this.$container.
|
|
914
|
+
this.$container.setTabbableOrFocusable(enabled);
|
|
913
915
|
}
|
|
914
916
|
|
|
915
917
|
/**
|
|
@@ -2450,7 +2452,7 @@ export default class Tree extends Widget {
|
|
|
2450
2452
|
}
|
|
2451
2453
|
nodes = arrays.ensure(nodes);
|
|
2452
2454
|
nodes.forEach(function(node) {
|
|
2453
|
-
if (!node.enabled && opts.checkOnlyEnabled || node.checked === opts.checked) {
|
|
2455
|
+
if (!node.enabled && opts.checkOnlyEnabled || node.checked === opts.checked || !node.filterAccepted) {
|
|
2454
2456
|
if (opts.checkChildren) {
|
|
2455
2457
|
this.checkNodes(node.childNodes, opts);
|
|
2456
2458
|
}
|
|
@@ -3168,7 +3170,7 @@ export default class Tree extends Widget {
|
|
|
3168
3170
|
// same as on Table.prototype._onDesktopPopupOpen
|
|
3169
3171
|
_onDesktopPopupOpen(event) {
|
|
3170
3172
|
let popup = event.popup;
|
|
3171
|
-
if (!this.
|
|
3173
|
+
if (!this.isFocusable(false)) {
|
|
3172
3174
|
return;
|
|
3173
3175
|
}
|
|
3174
3176
|
// 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
|
}
|
|
@@ -216,18 +226,16 @@
|
|
|
216
226
|
|
|
217
227
|
.tree-node.lazy > & {
|
|
218
228
|
font-family: @font-default-family;
|
|
219
|
-
font-size: @font-size-normal;
|
|
220
229
|
content: '+';
|
|
221
230
|
/* Move to left because '+' sign is not as wide as 'arrow-down' */
|
|
222
231
|
margin-left: -2px;
|
|
223
232
|
}
|
|
224
233
|
|
|
225
234
|
.tree-node.expanded > & {
|
|
226
|
-
/* This "imprecise" angle is a
|
|
235
|
+
/* This "imprecise" angle is a workaround for firefox to prevent shifting the div a little when the animation finishes. */
|
|
227
236
|
/* See https://bugzilla.mozilla.org/show_bug.cgi?id=739176 */
|
|
228
237
|
#scout.transform(rotate(89.99deg));
|
|
229
238
|
}
|
|
230
|
-
|
|
231
239
|
}
|
|
232
240
|
|
|
233
241
|
&:hover {
|
|
@@ -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
|
/**
|
package/src/util/arrays.js
CHANGED
|
@@ -206,6 +206,11 @@ export function containsAll(haystack, needles) {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* @template T
|
|
211
|
+
* @param {T[]} arr
|
|
212
|
+
* @return {T}
|
|
213
|
+
*/
|
|
209
214
|
export function first(arr) {
|
|
210
215
|
if (Array.isArray(arr)) {
|
|
211
216
|
return arr[0];
|
|
@@ -213,6 +218,11 @@ export function first(arr) {
|
|
|
213
218
|
return arr;
|
|
214
219
|
}
|
|
215
220
|
|
|
221
|
+
/**
|
|
222
|
+
* @template T
|
|
223
|
+
* @param {T[]} arr
|
|
224
|
+
* @return {T}
|
|
225
|
+
*/
|
|
216
226
|
export function last(arr) {
|
|
217
227
|
if (Array.isArray(arr)) {
|
|
218
228
|
return arr[arr.length - 1];
|
|
@@ -285,8 +295,8 @@ export function union(array1, array2) {
|
|
|
285
295
|
return result;
|
|
286
296
|
}
|
|
287
297
|
|
|
288
|
-
// noinspection DuplicatedCode
|
|
289
298
|
export function equalsIgnoreOrder(arr, arr2) {
|
|
299
|
+
// noinspection DuplicatedCode
|
|
290
300
|
if (arr === arr2) {
|
|
291
301
|
return true;
|
|
292
302
|
}
|
|
@@ -302,8 +312,8 @@ export function equalsIgnoreOrder(arr, arr2) {
|
|
|
302
312
|
return containsAll(arr, arr2);
|
|
303
313
|
}
|
|
304
314
|
|
|
305
|
-
// noinspection DuplicatedCode
|
|
306
315
|
export function equals(arr, arr2) {
|
|
316
|
+
// noinspection DuplicatedCode
|
|
307
317
|
if (arr === arr2) {
|
|
308
318
|
return true;
|
|
309
319
|
}
|
|
@@ -600,9 +610,40 @@ export function toMap(array, keyMapper = (el => el), valueMapper = (el => el)) {
|
|
|
600
610
|
}, {}));
|
|
601
611
|
}
|
|
602
612
|
|
|
613
|
+
/**
|
|
614
|
+
* If the argument is an empty array, null is returned. Otherwise, the argument is returned unchanged.
|
|
615
|
+
*
|
|
616
|
+
* @template T
|
|
617
|
+
* @param {T[]} array
|
|
618
|
+
* @return {T[]|null}
|
|
619
|
+
*/
|
|
620
|
+
export function nullIfEmpty(array) {
|
|
621
|
+
return empty(array) ? null : array;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Clears the content of an array <i>in-place</i>. All elements are removed from the array and the
|
|
626
|
+
* length will be set to 0. If the given argument is not an array, nothing happens.
|
|
627
|
+
*
|
|
628
|
+
* This is a more readable version of `array.splice(0, a.length)`.
|
|
629
|
+
*
|
|
630
|
+
* The return value is an array of all deleted elements (never null).
|
|
631
|
+
*
|
|
632
|
+
* @template T
|
|
633
|
+
* @param {T[]} array
|
|
634
|
+
* @return {T[]}
|
|
635
|
+
*/
|
|
636
|
+
export function clear(array) {
|
|
637
|
+
if (Array.isArray(array)) {
|
|
638
|
+
return array.splice(0, array.length);
|
|
639
|
+
}
|
|
640
|
+
return [];
|
|
641
|
+
}
|
|
642
|
+
|
|
603
643
|
export default {
|
|
604
644
|
$indexOf,
|
|
605
645
|
$remove,
|
|
646
|
+
clear,
|
|
606
647
|
contains,
|
|
607
648
|
containsAll,
|
|
608
649
|
containsAny,
|
|
@@ -638,6 +679,7 @@ export default {
|
|
|
638
679
|
max,
|
|
639
680
|
min,
|
|
640
681
|
move,
|
|
682
|
+
nullIfEmpty,
|
|
641
683
|
pushAll,
|
|
642
684
|
pushIfDefined,
|
|
643
685
|
pushSet,
|
package/src/util/dragAndDrop.js
CHANGED
|
@@ -175,13 +175,13 @@ export function _createDragAndDropHandlerOptions(target) {
|
|
|
175
175
|
target: target,
|
|
176
176
|
supportedScoutTypes: dragAndDrop.SCOUT_TYPES.FILE_TRANSFER,
|
|
177
177
|
validateFiles: (files, defaultValidator) => defaultValidator(files),
|
|
178
|
-
onDrop:
|
|
178
|
+
onDrop: files => {
|
|
179
179
|
},
|
|
180
180
|
dropType: () => dragAndDrop.SCOUT_TYPES.FILE_TRANSFER,
|
|
181
181
|
dropMaximumSize: () => target.dropMaximumSize,
|
|
182
182
|
doInstall: () => target.enabledComputed,
|
|
183
183
|
container: () => target.$container,
|
|
184
|
-
additionalDropProperties:
|
|
184
|
+
additionalDropProperties: event => {
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
}
|
|
@@ -269,6 +269,7 @@ export default {
|
|
|
269
269
|
* @property {String} [selector] CSS selector which will be added to the event source.
|
|
270
270
|
* @property {dropType} [dropType] Returns the allowed drop type during a drop event. Default is {@link dragAndDrop.SCOUT_TYPES.FILE_TRANSFER}
|
|
271
271
|
* @property {dropMaximumSize} [dropMaximumSize] Returns the maximum allowed size of a dropped object. Default is {@link DragAndDropTarget.dropMaximumSize}
|
|
272
|
-
* @property {validateFiles} [validateFiles] An optional function to add a custom file validation logic. Throw a {@link dropValidationErrorMessage} to indicate a failed validation.
|
|
272
|
+
* @property {validateFiles} [validateFiles] An optional function to add a custom file validation logic. Throw a {@link dropValidationErrorMessage} to indicate a failed validation.
|
|
273
|
+
* If no custom validator is installed, the default maximum file size validator is invoked.
|
|
273
274
|
* @property {additionalDropProperties} [additionalDropProperties] Returns additional drop properties to be used in {@link DragAndDropHandler.uploadFiles} as uploadProperties
|
|
274
|
-
*/
|
|
275
|
+
*/
|
package/src/util/events.js
CHANGED
|
@@ -220,7 +220,7 @@ export function onSwipe($element, id, onDown, onMove, onUp) {
|
|
|
220
220
|
let pageX = events.pageX(event);
|
|
221
221
|
let deltaX = pageX - origPageX;
|
|
222
222
|
let newLeft = origPosLeft + deltaX;
|
|
223
|
-
if (newLeft
|
|
223
|
+
if (newLeft !== curPosLeft) {
|
|
224
224
|
// only update swipe direction if it actually changed
|
|
225
225
|
direction = Math.sign(newLeft - curPosLeft);
|
|
226
226
|
}
|