@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
package/src/table/Table.less
CHANGED
|
@@ -49,25 +49,48 @@
|
|
|
49
49
|
/* Used for scout.Table.CheckableStyle.TABLE_ROW */
|
|
50
50
|
|
|
51
51
|
&.table-row-check {
|
|
52
|
+
& > .table-data {
|
|
53
|
+
& > .table-row {
|
|
54
|
+
&.selected {
|
|
55
|
+
/* Don't draw selection */
|
|
56
|
+
background-color: transparent;
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
&::after {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
&:hover {
|
|
64
|
+
background-color: @hover-background-color;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
& > .table-row.disabled,
|
|
69
|
+
&.disabled > .table-row {
|
|
57
70
|
background-color: transparent;
|
|
71
|
+
}
|
|
58
72
|
|
|
59
|
-
|
|
60
|
-
|
|
73
|
+
& > .table-row {
|
|
74
|
+
&.checked,
|
|
75
|
+
&.checked.selected {
|
|
76
|
+
/* Mark checked rows with a background color */
|
|
77
|
+
background-color: @table-row-checked-background-color;
|
|
78
|
+
|
|
79
|
+
& > .table-cell {
|
|
80
|
+
color: @table-row-checked-color;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
background-color: @selected-hover-background-color;
|
|
85
|
+
}
|
|
61
86
|
}
|
|
62
87
|
}
|
|
63
88
|
|
|
64
|
-
|
|
65
|
-
&.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
& > .table-cell {
|
|
70
|
-
color: @table-row-checked-color;
|
|
89
|
+
& > .table-row.disabled,
|
|
90
|
+
&.disabled > .table-row {
|
|
91
|
+
&.checked,
|
|
92
|
+
&.checked.selected {
|
|
93
|
+
background-color: @selected-disabled-background-color;
|
|
71
94
|
}
|
|
72
95
|
}
|
|
73
96
|
}
|
|
@@ -419,6 +442,9 @@
|
|
|
419
442
|
.table-cell-icon {
|
|
420
443
|
.font-icon& {
|
|
421
444
|
color: @icon-color;
|
|
445
|
+
font-size: @table-cell-font-icon-size;
|
|
446
|
+
line-height: @table-cell-font-icon-line-height;
|
|
447
|
+
vertical-align: top;
|
|
422
448
|
|
|
423
449
|
.disabled & {
|
|
424
450
|
color: @disabled-color;
|
|
@@ -443,15 +469,12 @@
|
|
|
443
469
|
overflow: hidden;
|
|
444
470
|
padding-left: var(--table-row-margin-x);
|
|
445
471
|
padding-right: var(--table-row-margin-x);
|
|
472
|
+
font-size: @table-aggregate-row-font-size;
|
|
446
473
|
|
|
447
474
|
& > .table-cell {
|
|
448
475
|
padding: var(--table-row-padding-y) @table-cell-padding-right 0 @table-cell-padding-left;
|
|
449
476
|
border-bottom: 0;
|
|
450
477
|
height: 100%;
|
|
451
|
-
|
|
452
|
-
& > .font-icon {
|
|
453
|
-
margin-top: 1px;
|
|
454
|
-
}
|
|
455
478
|
}
|
|
456
479
|
}
|
|
457
480
|
|
|
@@ -463,7 +486,7 @@
|
|
|
463
486
|
margin-top: -1px; // top border should cover bottom border of the previous row
|
|
464
487
|
padding-left: var(--table-row-margin-x);
|
|
465
488
|
padding-right: var(--table-row-margin-x);
|
|
466
|
-
font-size:
|
|
489
|
+
font-size: @table-aggregate-row-font-size;
|
|
467
490
|
|
|
468
491
|
& > .table-cell {
|
|
469
492
|
border-bottom: 0;
|
|
@@ -495,10 +518,17 @@
|
|
|
495
518
|
display: inline-block;
|
|
496
519
|
color: @text-color;
|
|
497
520
|
vertical-align: middle;
|
|
521
|
+
line-height: @table-aggregate-cell-font-icon-line-height;
|
|
498
522
|
}
|
|
499
523
|
|
|
500
|
-
&.sum > .table-cell-icon,
|
|
501
|
-
|
|
524
|
+
&.sum > .table-cell-icon,
|
|
525
|
+
&.avg > .table-cell-icon {
|
|
526
|
+
font-size: @table-aggregate-sum-avg-font-icon-size;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
&.min > .table-cell-icon,
|
|
530
|
+
&.max > .table-cell-icon {
|
|
531
|
+
font-size: @table-aggregate-min-max-font-icon-size;
|
|
502
532
|
}
|
|
503
533
|
|
|
504
534
|
/* if aggregation is based on selected rows */
|
|
@@ -622,4 +652,4 @@
|
|
|
622
652
|
|
|
623
653
|
.organize-columns-behind-scrollbar-column.table-cell.last {
|
|
624
654
|
padding: 0;
|
|
625
|
-
}
|
|
655
|
+
}
|
|
@@ -187,26 +187,20 @@ export default class TableAdapter extends ModelAdapter {
|
|
|
187
187
|
|
|
188
188
|
_onWidgetCompleteCellEdit(event) {
|
|
189
189
|
event.preventDefault();
|
|
190
|
-
this._sendCompleteCellEdit(
|
|
190
|
+
this._sendCompleteCellEdit();
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
_sendCompleteCellEdit(
|
|
194
|
-
|
|
195
|
-
fieldId: field.id
|
|
196
|
-
};
|
|
197
|
-
this._send('completeCellEdit', data);
|
|
193
|
+
_sendCompleteCellEdit() {
|
|
194
|
+
this._send('completeCellEdit');
|
|
198
195
|
}
|
|
199
196
|
|
|
200
197
|
_onWidgetCancelCellEdit(event) {
|
|
201
198
|
event.preventDefault();
|
|
202
|
-
this._sendCancelCellEdit(
|
|
199
|
+
this._sendCancelCellEdit();
|
|
203
200
|
}
|
|
204
201
|
|
|
205
|
-
_sendCancelCellEdit(
|
|
206
|
-
|
|
207
|
-
fieldId: field.id
|
|
208
|
-
};
|
|
209
|
-
this._send('cancelCellEdit', data);
|
|
202
|
+
_sendCancelCellEdit() {
|
|
203
|
+
this._send('cancelCellEdit');
|
|
210
204
|
}
|
|
211
205
|
|
|
212
206
|
_onWidgetRowsChecked(event) {
|
|
@@ -507,6 +501,9 @@ export default class TableAdapter extends ModelAdapter {
|
|
|
507
501
|
|
|
508
502
|
_onEndCellEdit(fieldId) {
|
|
509
503
|
let field = this.session.getModelAdapter(fieldId);
|
|
504
|
+
if (!field) {
|
|
505
|
+
throw new Error('Field adapter could not be resolved. Id: ' + fieldId);
|
|
506
|
+
}
|
|
510
507
|
this.widget.endCellEdit(field.widget);
|
|
511
508
|
}
|
|
512
509
|
|
package/src/table/TableHeader.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {arrays, Column, ColumnUserFilter, Device, graphics, GroupBoxMenuItemsOrder, inspector, MenuBar, MenuDestinations, scout, scrollbars, strings, styles, Table, tooltips, Widget} from '../index';
|
|
11
|
+
import {arrays, Column, ColumnUserFilter, Device, graphics, GroupBoxMenuItemsOrder, inspector, MenuBar, MenuDestinations, objects, scout, scrollbars, strings, styles, Table, tooltips, Widget} from '../index';
|
|
12
12
|
import $ from 'jquery';
|
|
13
13
|
|
|
14
14
|
export default class TableHeader extends Widget {
|
|
@@ -459,21 +459,23 @@ export default class TableHeader extends Widget {
|
|
|
459
459
|
let filtered = this.table.getFilter(column.id);
|
|
460
460
|
if (column.sortActive || column.grouped || filtered) {
|
|
461
461
|
if (column.minWidth < Column.DEFAULT_MIN_WIDTH) {
|
|
462
|
-
column.
|
|
462
|
+
column.__minWidthWithoutState = column.minWidth;
|
|
463
|
+
column.__widthWithoutState = column.width;
|
|
463
464
|
column.minWidth = Column.DEFAULT_MIN_WIDTH;
|
|
464
465
|
}
|
|
465
466
|
if (column.width < column.minWidth) {
|
|
466
467
|
this.table.resizeColumn(column, column.minWidth);
|
|
467
468
|
}
|
|
468
469
|
} else {
|
|
469
|
-
// Reset to
|
|
470
|
-
if (column.
|
|
471
|
-
column.minWidth = column.
|
|
472
|
-
column
|
|
473
|
-
// Resize to old min width, assuming user has not manually changed the size because column is still as width as default_min_width
|
|
470
|
+
// Reset to previous min width if no state is visible
|
|
471
|
+
if (!objects.isNullOrUndefined(column.__minWidthWithoutState)) {
|
|
472
|
+
column.minWidth = column.__minWidthWithoutState;
|
|
473
|
+
// Resize to previous min width, assuming user has not manually changed the size because column is still as width as default_min_width
|
|
474
474
|
if (column.width === Column.DEFAULT_MIN_WIDTH) {
|
|
475
|
-
this.table.resizeColumn(column, column.
|
|
475
|
+
this.table.resizeColumn(column, column.__widthWithoutState);
|
|
476
476
|
}
|
|
477
|
+
column.__minWidthWithoutState = null;
|
|
478
|
+
column.__widthWithoutState = null;
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
481
|
}
|
|
@@ -241,7 +241,9 @@ export default class TableHeaderMenu extends Popup {
|
|
|
241
241
|
if (this.filterTable) {
|
|
242
242
|
this.filterTable.off('rowsChecked', this._filterTableRowsCheckedHandler);
|
|
243
243
|
}
|
|
244
|
-
this.tableHeader
|
|
244
|
+
if (this.tableHeader.rendered) {
|
|
245
|
+
this.tableHeader.$container.off('scroll', this._tableHeaderScrollHandler);
|
|
246
|
+
}
|
|
245
247
|
this.$headerItem.select(false);
|
|
246
248
|
this.table.off('columnMoved', this._onColumnMovedHandler);
|
|
247
249
|
this.table.off('filterAdded', this._tableFilterHandler);
|
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
display: inline-block;
|
|
34
34
|
vertical-align: top;
|
|
35
35
|
padding: @table-header-menu-padding;
|
|
36
|
+
|
|
37
|
+
& > .table-header-menu-group > .table-header-menu-group-text {
|
|
38
|
+
// Increase size a little to ensure every text is fully visible, at least for german and english (currently necessary for additional sorting group)
|
|
39
|
+
width: calc(100% + 12px);
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
.table-header-menu-filters {
|
|
@@ -252,11 +257,11 @@
|
|
|
252
257
|
|
|
253
258
|
& > .table-data {
|
|
254
259
|
margin-top: 0;
|
|
255
|
-
padding: 3px
|
|
260
|
+
padding: 3px;
|
|
256
261
|
|
|
257
262
|
& > .table-row {
|
|
258
263
|
border-radius: @border-radius;
|
|
259
|
-
margin-bottom:
|
|
264
|
+
margin-bottom: 2px;
|
|
260
265
|
|
|
261
266
|
&.last {
|
|
262
267
|
margin-bottom: 0;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {Action,
|
|
11
|
+
import {Action, ActionExecKeyStroke} from '../index';
|
|
12
12
|
|
|
13
13
|
export default class TableHeaderMenuButton extends Action {
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ export default class TableHeaderMenuButton extends Action {
|
|
|
24
24
|
_initKeyStrokeContext() {
|
|
25
25
|
super._initKeyStrokeContext();
|
|
26
26
|
|
|
27
|
-
this.keyStrokeContext.registerKeyStroke([new
|
|
27
|
+
this.keyStrokeContext.registerKeyStroke([new ActionExecKeyStroke(this)]);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
_render() {
|
package/src/table/TableLayout.js
CHANGED
|
@@ -104,6 +104,12 @@ export default class TableLayout extends AbstractLayout {
|
|
|
104
104
|
// Always render viewport (not only when viewRangeSize changes), because view range depends on scroll position and data height
|
|
105
105
|
this.table._renderViewport();
|
|
106
106
|
|
|
107
|
+
// Render scroll top again to make sure the data is really at the correct position after rendering viewport.
|
|
108
|
+
// Somehow table.$data[0].scrollTop changes during _renderViewport sometimes (e.g. when there are aggregate rows)
|
|
109
|
+
if (!htmlContainer.layouted) {
|
|
110
|
+
this.table._renderScrollTop();
|
|
111
|
+
}
|
|
112
|
+
|
|
107
113
|
// Make sure tooltips and editor popup are at correct position after layouting (e.g after window resizing)
|
|
108
114
|
this.table.tooltips.forEach(tooltip => {
|
|
109
115
|
if (tooltip.rendered) {
|
|
@@ -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
|
|
@@ -21,7 +21,7 @@ export default class BooleanColumn extends Column {
|
|
|
21
21
|
this.comparator = comparators.NUMERIC;
|
|
22
22
|
this.filterType = 'ColumnUserFilter';
|
|
23
23
|
this.horizontalAlignment = 0;
|
|
24
|
-
this.minWidth = Column.
|
|
24
|
+
this.minWidth = Column.SMALL_MIN_WIDTH;
|
|
25
25
|
this.triStateEnabled = false;
|
|
26
26
|
this.textBased = false;
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2010-
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
@@ -43,7 +43,6 @@ export default class Column {
|
|
|
43
43
|
this.type = 'text';
|
|
44
44
|
this.width = 60;
|
|
45
45
|
this.initialWidth = undefined; // the width the column initially has
|
|
46
|
-
this.prefMinWidth = null;
|
|
47
46
|
this.minWidth = Column.DEFAULT_MIN_WIDTH; // the minimal width the column can have
|
|
48
47
|
this.showSeparator = true;
|
|
49
48
|
this.table = null;
|
|
@@ -71,7 +70,8 @@ export default class Column {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
static DEFAULT_MIN_WIDTH = 60;
|
|
74
|
-
static
|
|
73
|
+
static SMALL_MIN_WIDTH = 38;
|
|
74
|
+
static NARROW_MIN_WIDTH = 34;
|
|
75
75
|
|
|
76
76
|
init(model) {
|
|
77
77
|
this.session = model.session;
|
|
@@ -394,16 +394,19 @@ export default class Column {
|
|
|
394
394
|
cell.field = field;
|
|
395
395
|
// Override field alignment with the cell's alignment
|
|
396
396
|
cell.field.gridData.horizontalAlignment = cell.horizontalAlignment;
|
|
397
|
+
popup = this._createEditorPopup(row, cell);
|
|
398
|
+
popup.$anchor = $cell;
|
|
399
|
+
popup.open(this.table.$data);
|
|
400
|
+
return popup;
|
|
401
|
+
}
|
|
397
402
|
|
|
398
|
-
|
|
403
|
+
_createEditorPopup(row, cell) {
|
|
404
|
+
return scout.create('CellEditorPopup', {
|
|
399
405
|
parent: this.table,
|
|
400
406
|
column: this,
|
|
401
407
|
row: row,
|
|
402
408
|
cell: cell
|
|
403
409
|
});
|
|
404
|
-
popup.$anchor = $cell;
|
|
405
|
-
popup.open(this.table.$data);
|
|
406
|
-
return popup;
|
|
407
410
|
}
|
|
408
411
|
|
|
409
412
|
/**
|
|
@@ -178,7 +178,7 @@ export default class ColumnOptimalWidthMeasurer {
|
|
|
178
178
|
return 0;
|
|
179
179
|
}
|
|
180
180
|
let $neighbour = cellRange[cellRange.length - 1];
|
|
181
|
-
if ($neighbour.hasClass('empty') || $cell.hasClass('halign-right')
|
|
181
|
+
if ($neighbour.hasClass('empty') || $cell.hasClass('halign-right') === $neighbour.hasClass('halign-right')) {
|
|
182
182
|
return 0;
|
|
183
183
|
}
|
|
184
184
|
let $neighbourText = $neighbour.children('.text');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
@@ -63,6 +63,13 @@ export default class CellEditorPopup extends Popup {
|
|
|
63
63
|
this.pack();
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @override
|
|
68
|
+
*/
|
|
69
|
+
_getDefaultOpen$Parent() {
|
|
70
|
+
return this.table.$data;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
_render() {
|
|
67
74
|
super._render();
|
|
68
75
|
|
|
@@ -87,12 +94,10 @@ export default class CellEditorPopup extends Popup {
|
|
|
87
94
|
cssClass: cssClass
|
|
88
95
|
});
|
|
89
96
|
|
|
90
|
-
this._alignWithSelection();
|
|
91
|
-
|
|
92
97
|
// Make sure cell content is not visible while the editor is open (especially necessary for transparent editors like checkboxes)
|
|
93
98
|
this.$anchor.css('visibility', 'hidden');
|
|
94
99
|
|
|
95
|
-
this._rowOrderChangedFunc =
|
|
100
|
+
this._rowOrderChangedFunc = event => {
|
|
96
101
|
if (event.animating) {
|
|
97
102
|
// row is only set while animating
|
|
98
103
|
if (event.row === this.row) {
|
|
@@ -101,7 +106,7 @@ export default class CellEditorPopup extends Popup {
|
|
|
101
106
|
} else {
|
|
102
107
|
this.position();
|
|
103
108
|
}
|
|
104
|
-
}
|
|
109
|
+
};
|
|
105
110
|
this.table.on('rowOrderChanged', this._rowOrderChangedFunc);
|
|
106
111
|
// Set table style to focused, so that it looks as it still has the focus.
|
|
107
112
|
// This prevents flickering if the cell editor gets opened, especially when tabbing to the next cell editor.
|
|
@@ -161,14 +166,15 @@ export default class CellEditorPopup extends Popup {
|
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
position() {
|
|
164
|
-
let
|
|
165
|
-
$tableData = this.table.$data,
|
|
169
|
+
let $tableData = this.table.$data,
|
|
166
170
|
$row = this.row.$row,
|
|
167
171
|
$cell = this.$anchor,
|
|
168
172
|
insetsLeft = $tableData.cssPaddingLeft() + $row.cssMarginLeft() + $row.cssBorderLeftWidth();
|
|
169
173
|
|
|
170
|
-
|
|
171
|
-
|
|
174
|
+
this._alignWithSelection();
|
|
175
|
+
|
|
176
|
+
let cellBounds = graphics.bounds($cell);
|
|
177
|
+
let rowBounds = graphics.bounds($row);
|
|
172
178
|
this.setLocation(new Point(insetsLeft + cellBounds.x, $tableData.scrollTop() + rowBounds.y));
|
|
173
179
|
}
|
|
174
180
|
|
|
@@ -196,7 +202,8 @@ export default class CellEditorPopup extends Popup {
|
|
|
196
202
|
}
|
|
197
203
|
|
|
198
204
|
this._pendingCompleteCellEdit.then(() => {
|
|
199
|
-
|
|
205
|
+
// Ensure complete will never be called more than once
|
|
206
|
+
this._pendingCompleteCellEdit = $.resolvedPromise();
|
|
200
207
|
});
|
|
201
208
|
|
|
202
209
|
return this._pendingCompleteCellEdit;
|
|
@@ -236,11 +243,7 @@ export default class CellEditorPopup extends Popup {
|
|
|
236
243
|
}
|
|
237
244
|
|
|
238
245
|
_onKeyStroke(event) {
|
|
239
|
-
if (!this.
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
if (this.$container.isOrHas(event.keyStrokeContext.$getScopeTarget())) {
|
|
243
|
-
// 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)) {
|
|
244
247
|
return;
|
|
245
248
|
}
|
|
246
249
|
// Make sure completeEdit is called immediately after calling acceptInput.
|
|
@@ -249,6 +252,17 @@ export default class CellEditorPopup extends Popup {
|
|
|
249
252
|
this.completeEdit(false);
|
|
250
253
|
}
|
|
251
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
|
+
|
|
252
266
|
waitForCompleteCellEdit() {
|
|
253
267
|
if (this._pendingCompleteCellEdit) {
|
|
254
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';
|