@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.
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js +2 -0
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js.map +1 -0
- package/dist/eclipse-scout-core-theme-6b2fef56e9e49231a49c.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark-d2bb274dd42f132bfca0.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark.css +511 -399
- package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
- package/dist/eclipse-scout-core-theme.css +247 -135
- package/dist/eclipse-scout-core-theme.css.map +1 -1
- package/dist/eclipse-scout-core.js +865 -646
- 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 +17 -10
- package/src/action/Button.less +1 -0
- package/src/box/Box.less +2 -2
- package/src/breadcrumbbar/BreadcrumbBarLayout.js +2 -2
- package/src/calendar/Calendar.js +40 -58
- package/src/calendar/Calendar.less +10 -10
- package/src/calendar/CalendarLayout.js +3 -1
- package/src/datepicker/DatePicker.less +1 -0
- package/src/desktop/desktoptab/DesktopTab.less +19 -2
- package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
- package/src/desktop/desktoptab/DesktopTabAreaLayout.js +1 -1
- package/src/desktop/navigation/DesktopNavigation.less +4 -0
- package/src/desktop/notification/DesktopNotification.js +11 -4
- package/src/desktop/notification/DesktopNotification.less +5 -3
- package/src/desktop/outline/Outline.js +0 -30
- package/src/desktop/outline/Outline.less +4 -4
- package/src/desktop/viewbutton/ViewButton.less +18 -9
- package/src/desktop/viewbutton/ViewButtonBox.js +2 -2
- package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
- package/src/filechooser/FileChooser.less +1 -1
- package/src/form/Form.less +1 -0
- package/src/form/fields/LookupBox.js +2 -1
- package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +14 -0
- package/src/form/fields/groupbox/GroupBox.js +13 -9
- package/src/form/fields/groupbox/GroupBox.less +4 -1
- package/src/form/fields/htmlfield/HtmlField.less +0 -1
- package/src/form/fields/listbox/ListBox.js +8 -3
- package/src/form/fields/tabbox/TabAreaLayout.js +63 -66
- package/src/form/fields/tabbox/TabBox.js +4 -7
- package/src/form/fields/tabbox/TabBox.less +2 -1
- package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
- package/src/glasspane/GlassPane.js +3 -3
- package/src/group/Group.less +1 -1
- package/src/index.js +2 -1
- package/src/index.less +1 -0
- package/src/jquery/jquery-scout.js +5 -4
- package/src/login/LoginBox.less +9 -7
- package/src/menu/ContextMenuPopup.less +9 -2
- package/src/menu/Menu.less +1 -0
- package/src/messagebox/MessageBox.less +3 -3
- package/src/modeselector/Mode.less +15 -37
- package/src/modeselector/ModeSelector.js +1 -1
- package/src/modeselector/ModeSelector.less +2 -1
- 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 +4 -1
- package/src/style/colors-dark.less +25 -11
- package/src/style/colors.less +17 -3
- package/src/style/fonts.less +5 -0
- package/src/style/mixins.less +21 -14
- package/src/style/sizes-dark.less +4 -1
- package/src/style/sizes.less +7 -7
- package/src/table/Table.js +45 -33
- package/src/table/Table.less +49 -16
- 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/columns/BooleanColumn.js +2 -2
- package/src/table/columns/Column.js +3 -3
- package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
- package/src/table/editor/CellEditorPopup.js +8 -1
- package/src/tagbar/TagBarOverflowPopupLayout.js +1 -1
- package/src/tile/TileGrid.js +1 -1
- 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/htmlfield/TileHtmlField.js +28 -0
- package/src/tooltip/Tooltip.less +7 -5
- package/src/tree/CompactTree.less +1 -1
- package/src/tree/LazyNodeFilter.js +26 -15
- package/src/tree/Tree.js +114 -143
- package/src/tree/Tree.less +3 -5
- package/src/tree/TreeLayout.js +1 -1
- package/src/tree/TreeNode.js +2 -2
- package/src/util/Device.js +6 -2
- package/src/util/arrays.js +24 -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 +7 -5
- package/src/widget/FilterSupport.less +38 -9
- package/src/widget/Widget.js +24 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
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
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: center;
|
|
21
21
|
background-color: transparent;
|
|
22
|
+
cursor: pointer;
|
|
22
23
|
|
|
23
24
|
&:hover {
|
|
24
25
|
background-color: @view-menu-tab-hover-background-color;
|
|
25
26
|
color: inherit;
|
|
26
|
-
cursor: pointer;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&.disabled {
|
|
@@ -158,6 +158,7 @@
|
|
|
158
158
|
& > .view-button {
|
|
159
159
|
padding-left: @view-tab-margin;
|
|
160
160
|
width: @view-tab-selected-width;
|
|
161
|
+
cursor: default;
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
.selected-button-invisible& > .view-menu {
|
package/src/form/Form.less
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
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
|
|
@@ -19,6 +19,7 @@ export default class LookupBox extends ValueField {
|
|
|
19
19
|
this.gridDataHints.weightY = 1.0;
|
|
20
20
|
this.gridDataHints.h = 2;
|
|
21
21
|
this.value = [];
|
|
22
|
+
this.clearable = ValueField.Clearable.NEVER;
|
|
22
23
|
|
|
23
24
|
this.lookupCall = null;
|
|
24
25
|
this._pendingLookup = null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2010-2022 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
|
+
.breadcrumb-bar-field > .field {
|
|
12
|
+
padding-top: @borderless-field-padding-y;
|
|
13
|
+
padding-bottom: @borderless-field-padding-y + 1px; // BreadCrumbItem uses 14px instead of 13px font size
|
|
14
|
+
}
|
|
@@ -162,12 +162,12 @@ export default class GroupBox extends CompositeField {
|
|
|
162
162
|
render: () => true,
|
|
163
163
|
offset: 0,
|
|
164
164
|
hAlign: HAlign.RIGHT,
|
|
165
|
-
$drawingArea:
|
|
166
|
-
if (this.
|
|
165
|
+
$drawingArea: ($drawingArea, event) => {
|
|
166
|
+
if (this.$header && this.$header.isVisible()) {
|
|
167
167
|
return this.$header;
|
|
168
168
|
}
|
|
169
169
|
return this.$body;
|
|
170
|
-
}
|
|
170
|
+
}
|
|
171
171
|
};
|
|
172
172
|
|
|
173
173
|
keyStrokes
|
|
@@ -360,14 +360,11 @@ export default class GroupBox extends CompositeField {
|
|
|
360
360
|
this.$container.toggleClass('has-scroll-shadow-bottom', hasScrollShadowBottom);
|
|
361
361
|
if ((headerVisible || hasMenubarTop) && oldHasScrollShadowTop !== hasScrollShadowTop
|
|
362
362
|
|| hasMenubarBottom && oldHasScrollShadowBottom !== hasScrollShadowBottom) {
|
|
363
|
-
this.
|
|
363
|
+
this.invalidateLayoutTree(false);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
// Enlarge header line if there is a shadow, but don't do it if there is a menubar on top
|
|
367
367
|
fields.adjustStatusPositionForScrollShadow(this, () => hasScrollShadowTop && headerVisible && !hasMenubarTop);
|
|
368
|
-
|
|
369
|
-
// Prevent flickering of status icon
|
|
370
|
-
this.validateLayout();
|
|
371
368
|
}
|
|
372
369
|
|
|
373
370
|
setMainBox(mainBox) {
|
|
@@ -782,9 +779,16 @@ export default class GroupBox extends CompositeField {
|
|
|
782
779
|
}
|
|
783
780
|
|
|
784
781
|
_onControlClick(event) {
|
|
785
|
-
if (this.expandable) {
|
|
786
|
-
|
|
782
|
+
if (!this.expandable) {
|
|
783
|
+
return;
|
|
787
784
|
}
|
|
785
|
+
const target = scout.widget(event.target);
|
|
786
|
+
if (this.menuBarPosition === GroupBox.MenuBarPosition.TITLE && this.menuBar.has(target)) {
|
|
787
|
+
// If the position of the menubar is set to title and a menu has been clicked, then the event must not be handled
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
this.setExpanded(!this.expanded);
|
|
788
792
|
$.suppressEvent(event); // otherwise, the event would be triggered twice sometimes (by group-box-control and group-box-title)
|
|
789
793
|
}
|
|
790
794
|
|
|
@@ -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
|
|
@@ -119,6 +119,8 @@
|
|
|
119
119
|
display: inline-block;
|
|
120
120
|
vertical-align: middle;
|
|
121
121
|
padding: @group-box-title-padding-top 0 @group-box-title-padding-bottom 0;
|
|
122
|
+
max-width: 100%;
|
|
123
|
+
margin-top: @text-margin-top;
|
|
122
124
|
|
|
123
125
|
.group-box.has-sub-label > & {
|
|
124
126
|
padding-bottom: @group-box-title-with-sub-label-padding-bottom;
|
|
@@ -135,6 +137,7 @@
|
|
|
135
137
|
font-size: @sub-title-font-size;
|
|
136
138
|
letter-spacing: @sub-title-letter-spacing;
|
|
137
139
|
color: @sub-title-color;
|
|
140
|
+
#scout.overflow-ellipsis();
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
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
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {arrays, ListBoxLayout, LookupBox, scout, Table
|
|
11
|
+
import {arrays, ListBoxLayout, LookupBox, scout, Table} from '../../../index';
|
|
12
12
|
|
|
13
13
|
export default class ListBox extends LookupBox {
|
|
14
14
|
|
|
@@ -17,7 +17,6 @@ export default class ListBox extends LookupBox {
|
|
|
17
17
|
|
|
18
18
|
this.table = null;
|
|
19
19
|
this.lookupStatus = null;
|
|
20
|
-
this.clearable = ValueField.Clearable.NEVER;
|
|
21
20
|
|
|
22
21
|
this._addWidgetProperties(['table', 'filterBox']);
|
|
23
22
|
}
|
|
@@ -32,6 +31,12 @@ export default class ListBox extends LookupBox {
|
|
|
32
31
|
if (!this.table) {
|
|
33
32
|
this.table = this._createDefaultListBoxTable();
|
|
34
33
|
}
|
|
34
|
+
|
|
35
|
+
// align checkableColumn in table with checkboxes of tree fields
|
|
36
|
+
if (this.table.checkableColumn) { // may be null if a non-default list-box-table with checkable=false is used
|
|
37
|
+
this.table.checkableColumn.minWidth = 28;
|
|
38
|
+
this.table.checkableColumn.width = this.table.checkableColumn.minWidth; // do not use setWidth here
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
_render() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
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
|
|
@@ -30,32 +30,37 @@ export default class TabAreaLayout extends AbstractLayout {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
layout($container) {
|
|
33
|
-
let
|
|
34
|
-
htmlContainer = HtmlComponent.get($container),
|
|
33
|
+
let htmlContainer = HtmlComponent.get($container),
|
|
35
34
|
containerSize = htmlContainer.availableSize().subtract(htmlContainer.insets());
|
|
36
35
|
|
|
37
36
|
// compute visible and overflown tabs
|
|
38
37
|
this.preferredLayoutSize($container, {
|
|
39
38
|
widthHint: containerSize.width
|
|
40
39
|
});
|
|
40
|
+
this._layoutSelectionMarker();
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.visibleTabs.forEach(tabItem => {
|
|
47
|
-
tabItem.setOverflown(false);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
this.overflowTabs.forEach(tabItem => {
|
|
51
|
-
tabItem.setOverflown(true);
|
|
52
|
-
});
|
|
43
|
+
_layoutSelectionMarker() {
|
|
44
|
+
let $selectionMarker = this.tabArea.$selectionMarker,
|
|
45
|
+
selectedTab = this.tabArea.selectedTab,
|
|
46
|
+
selectedItemBounds;
|
|
53
47
|
|
|
54
|
-
if (
|
|
55
|
-
|
|
48
|
+
if (selectedTab) {
|
|
49
|
+
$selectionMarker.setVisible(true);
|
|
50
|
+
selectedItemBounds = graphics.bounds(selectedTab.$container);
|
|
51
|
+
$selectionMarker.cssLeft(selectedItemBounds.x);
|
|
52
|
+
$selectionMarker.cssWidth(selectedItemBounds.width);
|
|
53
|
+
} else {
|
|
54
|
+
$selectionMarker.setVisible(false);
|
|
56
55
|
}
|
|
56
|
+
}
|
|
57
57
|
|
|
58
|
+
_updateEllipsis() {
|
|
59
|
+
let ellipsis = this.tabArea.ellipsis;
|
|
60
|
+
ellipsis.setHidden(this.overflowTabs.length < 1);
|
|
58
61
|
ellipsis.setText(this.overflowTabs.length + '');
|
|
62
|
+
this.visibleTabs.forEach(tabItem => tabItem.setOverflown(false));
|
|
63
|
+
this.overflowTabs.forEach(tabItem => tabItem.setOverflown(true));
|
|
59
64
|
|
|
60
65
|
ellipsis.setChildActions(this.overflowTabs.map(tab => {
|
|
61
66
|
let menu = scout.create('Menu', {
|
|
@@ -73,73 +78,54 @@ export default class TabAreaLayout extends AbstractLayout {
|
|
|
73
78
|
});
|
|
74
79
|
return menu;
|
|
75
80
|
}, this));
|
|
76
|
-
|
|
77
|
-
this._layoutSelectionMarker();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
_layoutSelectionMarker() {
|
|
81
|
-
let $selectionMarker = this.tabArea.$selectionMarker,
|
|
82
|
-
selectedTab = this.tabArea.selectedTab,
|
|
83
|
-
selectedItemBounds;
|
|
84
|
-
|
|
85
|
-
if (selectedTab) {
|
|
86
|
-
$selectionMarker.setVisible(true);
|
|
87
|
-
selectedItemBounds = graphics.bounds(selectedTab.$container);
|
|
88
|
-
$selectionMarker.cssLeft(selectedItemBounds.x);
|
|
89
|
-
$selectionMarker.cssWidth(selectedItemBounds.width);
|
|
90
|
-
} else {
|
|
91
|
-
$selectionMarker.setVisible(false);
|
|
92
|
-
}
|
|
93
81
|
}
|
|
94
82
|
|
|
95
83
|
preferredLayoutSize($container, options) {
|
|
96
84
|
let htmlComp = HtmlComponent.get($container),
|
|
97
85
|
prefSize = new Dimension(0, 0),
|
|
98
|
-
prefWidth = Number.MAX_VALUE
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
86
|
+
prefWidth = Number.MAX_VALUE;
|
|
87
|
+
this.visibleTabs = this.tabArea.visibleTabs();
|
|
88
|
+
let overflowableIndexes = this.visibleTabs.map((tabItem, index) => {
|
|
89
|
+
if (tabItem.selected) {
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
return index;
|
|
93
|
+
}).filter(index => index >= 0);
|
|
106
94
|
|
|
107
95
|
this.overflowTabs = [];
|
|
108
96
|
|
|
109
|
-
// consider avoid falsy 0 in
|
|
97
|
+
// consider avoid falsy 0 in tab-boxes a 0 withHint will be used to calculate the minimum width
|
|
110
98
|
if (options.widthHint === 0 || options.widthHint) {
|
|
111
99
|
prefWidth = options.widthHint - htmlComp.insets().horizontal();
|
|
112
100
|
}
|
|
113
101
|
|
|
114
102
|
// shortcut for minimum size.
|
|
115
103
|
if (prefWidth <= 0) {
|
|
116
|
-
return this._minSize(
|
|
104
|
+
return this._minSize(this.visibleTabs).add(htmlComp.insets());
|
|
117
105
|
}
|
|
118
106
|
|
|
119
|
-
|
|
120
|
-
this.
|
|
121
|
-
prefSize = this._prefSize(
|
|
107
|
+
this._setFirstLastMarker(this.visibleTabs);
|
|
108
|
+
this._updateEllipsis();
|
|
109
|
+
prefSize = this._prefSize(this.visibleTabs);
|
|
110
|
+
|
|
122
111
|
while (prefSize.width > prefWidth && overflowableIndexes.length > 0) {
|
|
123
|
-
overflowIndex = overflowableIndexes.splice(-1)[0];
|
|
124
|
-
this.overflowTabs.splice(0, 0,
|
|
125
|
-
|
|
126
|
-
this._setFirstLastMarker(
|
|
127
|
-
|
|
112
|
+
let overflowIndex = overflowableIndexes.splice(-1)[0];
|
|
113
|
+
this.overflowTabs.splice(0, 0, this.visibleTabs[overflowIndex]);
|
|
114
|
+
this.visibleTabs.splice(overflowIndex, 1);
|
|
115
|
+
this._setFirstLastMarker(this.visibleTabs);
|
|
116
|
+
this._updateEllipsis(); // update ellipsis here already so that the prefSize on the next line is correct
|
|
117
|
+
prefSize = this._prefSize(this.visibleTabs);
|
|
128
118
|
}
|
|
129
119
|
|
|
130
|
-
this.visibleTabs = visibleTabItems;
|
|
131
|
-
|
|
132
120
|
// Use the total available space if spreading tabs evenly.
|
|
133
121
|
if (this.tabArea.displayStyle === TabArea.DisplayStyle.SPREAD_EVEN) {
|
|
134
122
|
return graphics.prefSize($container, options);
|
|
135
123
|
}
|
|
136
|
-
|
|
137
124
|
return graphics.exactPrefSize(prefSize.add(htmlComp.insets()), options);
|
|
138
125
|
}
|
|
139
126
|
|
|
140
127
|
_minSize(tabItems) {
|
|
141
|
-
let visibleTabItems = []
|
|
142
|
-
prefSize;
|
|
128
|
+
let visibleTabItems = [];
|
|
143
129
|
this.overflowTabs = tabItems.filter(tabItem => {
|
|
144
130
|
if (tabItem.selected) {
|
|
145
131
|
visibleTabItems.push(tabItem);
|
|
@@ -150,23 +136,21 @@ export default class TabAreaLayout extends AbstractLayout {
|
|
|
150
136
|
|
|
151
137
|
this.visibleTabs = visibleTabItems;
|
|
152
138
|
this._setFirstLastMarker(visibleTabItems);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return prefSize;
|
|
139
|
+
return this._prefSize(visibleTabItems);
|
|
156
140
|
}
|
|
157
141
|
|
|
158
142
|
_prefSize(tabItems, considerEllipsis) {
|
|
159
|
-
let prefSize = tabItems
|
|
160
|
-
|
|
143
|
+
let prefSize = tabItems
|
|
144
|
+
.map(tabItem => this._tabItemSize(tabItem))
|
|
145
|
+
.reduce((prefSize, itemSize) => {
|
|
161
146
|
prefSize.height = Math.max(prefSize.height, itemSize.height);
|
|
162
147
|
prefSize.width += itemSize.width;
|
|
163
148
|
return prefSize;
|
|
164
|
-
}, new Dimension(0, 0))
|
|
165
|
-
ellipsisSize = new Dimension(0, 0);
|
|
149
|
+
}, new Dimension(0, 0));
|
|
166
150
|
|
|
167
151
|
considerEllipsis = scout.nvl(considerEllipsis, this.overflowTabs.length > 0);
|
|
168
152
|
if (considerEllipsis) {
|
|
169
|
-
ellipsisSize = this._tabItemSize(this.tabArea.ellipsis
|
|
153
|
+
let ellipsisSize = this._tabItemSize(this.tabArea.ellipsis);
|
|
170
154
|
prefSize.height = Math.max(prefSize.height, ellipsisSize.height);
|
|
171
155
|
prefSize.width += ellipsisSize.width;
|
|
172
156
|
}
|
|
@@ -193,8 +177,8 @@ export default class TabAreaLayout extends AbstractLayout {
|
|
|
193
177
|
}
|
|
194
178
|
}
|
|
195
179
|
|
|
196
|
-
_tabItemSize(
|
|
197
|
-
let prefSize,
|
|
180
|
+
_tabItemSize(item) {
|
|
181
|
+
let htmlComp = item.htmlComp, prefSize,
|
|
198
182
|
classList = htmlComp.$comp.attr('class');
|
|
199
183
|
|
|
200
184
|
// temporarily revert display style to default. otherwise the pref size of the tab item will be the size of the container.
|
|
@@ -208,6 +192,19 @@ export default class TabAreaLayout extends AbstractLayout {
|
|
|
208
192
|
prefSize = htmlComp.prefSize({
|
|
209
193
|
exact: true
|
|
210
194
|
}).add(graphics.margins(htmlComp.$comp));
|
|
195
|
+
if (item.fieldStatus && item.fieldStatus.htmlComp) {
|
|
196
|
+
let statusOverflownAndHidden = item.overflown && !item.fieldStatus.visible;
|
|
197
|
+
if (statusOverflownAndHidden) {
|
|
198
|
+
// overflown tabs have no fieldStatus: explicitly set to visible so that the real consumed space can be computed
|
|
199
|
+
item.fieldStatus.setVisible(true);
|
|
200
|
+
}
|
|
201
|
+
let statusWidth = item.fieldStatus.htmlComp.prefSize({includeMargin: true}).width;
|
|
202
|
+
if (statusOverflownAndHidden) {
|
|
203
|
+
// restore
|
|
204
|
+
item.fieldStatus.setVisible(false);
|
|
205
|
+
}
|
|
206
|
+
prefSize.width += statusWidth;
|
|
207
|
+
}
|
|
211
208
|
|
|
212
209
|
htmlComp.$comp.attrOrRemove('class', classList);
|
|
213
210
|
|
|
@@ -32,7 +32,6 @@ export default class TabBox extends CompositeField {
|
|
|
32
32
|
this._addPreserveOnPropertyChangeProperties(['selectedTab']);
|
|
33
33
|
|
|
34
34
|
this._tabBoxHeaderPropertyChangeHander = this._onTabBoxHeaderPropertyChange.bind(this);
|
|
35
|
-
this._selectedTabScrollTopChangeHandler = this._updateScrollShadow.bind(this);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
/**
|
|
@@ -173,16 +172,17 @@ export default class TabBox extends CompositeField {
|
|
|
173
172
|
_renderSelectedTab() {
|
|
174
173
|
if (this.selectedTab) {
|
|
175
174
|
this.selectedTab.render(this._$tabContent);
|
|
176
|
-
this.selectedTab.
|
|
175
|
+
this.selectedTab.get$Scrollable().data('scroll-shadow-customizer', this._updateScrollShadow.bind(this));
|
|
177
176
|
}
|
|
178
177
|
if (this.rendered) {
|
|
178
|
+
this._updateScrollShadow();
|
|
179
179
|
HtmlComponent.get(this._$tabContent).invalidateLayoutTree();
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
_removeSelectedTab() {
|
|
184
184
|
if (this.selectedTab) {
|
|
185
|
-
this.selectedTab.
|
|
185
|
+
this.selectedTab.get$Scrollable().removeData('scroll-shadow-customizer');
|
|
186
186
|
this.selectedTab.remove();
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -195,14 +195,11 @@ export default class TabBox extends CompositeField {
|
|
|
195
195
|
let oldHasScrollShadowTop = this.$container.hasClass('has-scroll-shadow-top');
|
|
196
196
|
this.$container.toggleClass('has-scroll-shadow-top', hasScrollShadowTop);
|
|
197
197
|
if (oldHasScrollShadowTop !== hasScrollShadowTop) {
|
|
198
|
-
this.
|
|
198
|
+
this.invalidateLayoutTree(false);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
// Enlarge header line if there is a shadow, but only if there is a header (controlled by labelVisible)
|
|
202
202
|
fields.adjustStatusPositionForScrollShadow(this, () => hasScrollShadowTop && this.labelVisible);
|
|
203
|
-
|
|
204
|
-
// Prevent flickering of status icon
|
|
205
|
-
this.validateLayout();
|
|
206
203
|
}
|
|
207
204
|
|
|
208
205
|
setTabAreaStyle(tabAreaStyle) {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
& > .menubar {
|
|
75
75
|
position: absolute;
|
|
76
76
|
#scout.menubar-background-color-inherit();
|
|
77
|
-
border-bottom
|
|
77
|
+
border-bottom: none;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
& > .status {
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
display: inline-block;
|
|
164
164
|
vertical-align: middle;
|
|
165
165
|
padding: @tab-item-title-padding-top 0 @tab-item-title-padding-bottom;
|
|
166
|
+
margin-top: @text-margin-top;
|
|
166
167
|
|
|
167
168
|
.tab-area.has-sub-label > & {
|
|
168
169
|
padding-bottom: @group-box-title-with-sub-label-padding-bottom;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
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
|
|
@@ -34,14 +34,14 @@ export default class TabBoxHeaderLayout extends AbstractLayout {
|
|
|
34
34
|
this.tabBoxHeader.invalidateLayoutTree();
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
layout($container) {
|
|
37
|
+
layout($container) {
|
|
38
38
|
let htmlContainer = HtmlComponent.get($container),
|
|
39
39
|
tabArea = this.tabBoxHeader.tabArea,
|
|
40
40
|
tabAreaMargins = tabArea.htmlComp.margins(),
|
|
41
41
|
tabAreaPrefSize,
|
|
42
42
|
menuBar = this.tabBoxHeader.menuBar,
|
|
43
43
|
menuBarMargins = menuBar.htmlComp.margins(),
|
|
44
|
-
|
|
44
|
+
menuBarMinimumSize,
|
|
45
45
|
$status = this.tabBoxHeader.tabBox.$status,
|
|
46
46
|
statusSizeLarge = new Dimension(),
|
|
47
47
|
insets = htmlContainer.insets(),
|
|
@@ -49,7 +49,7 @@ export default class TabBoxHeaderLayout extends AbstractLayout {
|
|
|
49
49
|
exact: true
|
|
50
50
|
}).subtract(htmlContainer.insets());
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
menuBarMinimumSize = menuBar.htmlComp.prefSize({
|
|
53
53
|
widthHint: 0
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -59,7 +59,7 @@ export default class TabBoxHeaderLayout extends AbstractLayout {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
tabAreaPrefSize = tabArea.htmlComp.prefSize({
|
|
62
|
-
widthHint: containerSize.width -
|
|
62
|
+
widthHint: containerSize.width - menuBarMinimumSize.width - menuBarMargins.horizontal() - statusSizeLarge.width,
|
|
63
63
|
exact: false
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -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
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import {Widget} from '../index';
|
|
12
12
|
import $ from 'jquery';
|
|
13
13
|
|
|
14
14
|
export default class GlassPane extends Widget {
|
|
@@ -24,7 +24,7 @@ export default class GlassPane extends Widget {
|
|
|
24
24
|
|
|
25
25
|
this.$parent.addClass('glasspane-parent');
|
|
26
26
|
let cssPosition = this.$parent.css('position');
|
|
27
|
-
if (
|
|
27
|
+
if (cssPosition === 'static') {
|
|
28
28
|
this.$parent.css('position', 'relative');
|
|
29
29
|
}
|
|
30
30
|
|
package/src/group/Group.less
CHANGED
package/src/index.js
CHANGED
|
@@ -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
|
|
@@ -605,6 +605,7 @@ export {default as FormFieldTile} from './tile/fields/FormFieldTile';
|
|
|
605
605
|
export {default as FormFieldTileAdapter} from './tile/fields/FormFieldTileAdapter';
|
|
606
606
|
export {default as ButtonTile} from './tile/fields/button/ButtonTile';
|
|
607
607
|
export {default as TileButton} from './tile/fields/button/TileButton';
|
|
608
|
+
export {default as TileHtmlField} from './tile/fields/htmlfield/TileHtmlField';
|
|
608
609
|
export {default as TileTableField} from './tile/fields/tablefield/TileTableField';
|
|
609
610
|
export {default as SimpleTab} from './tabbox/SimpleTab';
|
|
610
611
|
export {default as SimpleTabArea} from './tabbox/SimpleTabArea';
|
package/src/index.less
CHANGED
|
@@ -144,5 +144,6 @@
|
|
|
144
144
|
@import "tile/fields/tablefield/TileTableField";
|
|
145
145
|
@import "widget/FilterSupport";
|
|
146
146
|
@import "login/LoginBox";
|
|
147
|
+
@import "form/fields/breadcrumbbarfield/BreadcrumbBarField";
|
|
147
148
|
@import "breadcrumbbar/BreadcrumbBar";
|
|
148
149
|
@import "breadcrumbbar/BreadcrumbItem";
|
|
@@ -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
|
|
@@ -1049,16 +1049,17 @@ $.fn.oneAnimationEnd = function(handler) {
|
|
|
1049
1049
|
if (!handler) {
|
|
1050
1050
|
return this;
|
|
1051
1051
|
}
|
|
1052
|
-
|
|
1052
|
+
let oneHandler = event => {
|
|
1053
1053
|
if (event.target !== this[0]) {
|
|
1054
1054
|
// Ignore events that bubble up from child elements
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
1057
|
// Unregister listener to implement "one" semantics
|
|
1058
|
-
this.off(
|
|
1058
|
+
this.off('animationend webkitAnimationEnd', oneHandler);
|
|
1059
1059
|
// Notify actual event handler
|
|
1060
1060
|
handler(event);
|
|
1061
|
-
}
|
|
1061
|
+
};
|
|
1062
|
+
return this.on('animationend webkitAnimationEnd', oneHandler);
|
|
1062
1063
|
};
|
|
1063
1064
|
|
|
1064
1065
|
$.fn.hasAnimationClass = function() {
|
package/src/login/LoginBox.less
CHANGED
|
@@ -53,18 +53,20 @@
|
|
|
53
53
|
*/
|
|
54
54
|
.login-button.default {
|
|
55
55
|
|
|
56
|
-
&.login-error {
|
|
57
|
-
border-color:
|
|
58
|
-
background-color: @
|
|
56
|
+
&.login-error:not(.disabled) {
|
|
57
|
+
border-color: transparent;
|
|
58
|
+
background-color: @error-color;
|
|
59
59
|
|
|
60
60
|
&:hover {
|
|
61
|
-
background-color: @
|
|
62
|
-
border-color: @palette-red-4;
|
|
61
|
+
background-color: @error-default-button-background-hover-color;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
&:active {
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
background-color: @error-default-button-background-active-color;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:focus {
|
|
69
|
+
#scout.focus-border(@box-shadow-color: @error-focus-box-shadow-color, @border-color: mix(@error-color, @error-focus-box-shadow-color, 25%));
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -53,14 +53,21 @@
|
|
|
53
53
|
&.selected {
|
|
54
54
|
background-color: @item-selection-background-color;
|
|
55
55
|
|
|
56
|
+
&.has-popup {
|
|
57
|
+
color: @context-menu-item-color;
|
|
58
|
+
|
|
59
|
+
&.disabled {
|
|
60
|
+
color: @menu-item-disabled-color;
|
|
61
|
+
background-color: @item-selection-background-color;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
56
65
|
& > .submenu-icon {
|
|
57
66
|
transform: none;
|
|
58
67
|
}
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
&.expanded {
|
|
62
|
-
color: @active-color;
|
|
63
|
-
|
|
64
71
|
& > .submenu-icon {
|
|
65
72
|
#scout.submenu-icon-open();
|
|
66
73
|
}
|