@eclipse-scout/core 22.0.2 → 22.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js +2 -0
  2. package/dist/eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js.map +1 -0
  3. package/dist/eclipse-scout-core-theme-74b63e0d57bed407a729.min.css +1 -0
  4. package/dist/eclipse-scout-core-theme-dark-b82aea152f416e38ce7f.min.css +1 -0
  5. package/dist/eclipse-scout-core-theme-dark.css +153 -52
  6. package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
  7. package/dist/eclipse-scout-core-theme.css +153 -52
  8. package/dist/eclipse-scout-core-theme.css.map +1 -1
  9. package/dist/eclipse-scout-core.js +785 -564
  10. package/dist/eclipse-scout-core.js.map +1 -1
  11. package/dist/file-list +4 -4
  12. package/package.json +2 -2
  13. package/src/ErrorHandler.js +66 -28
  14. package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
  15. package/src/box/Box.less +10 -6
  16. package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
  17. package/src/checkbox/CheckBox.less +3 -1
  18. package/src/datepicker/DatePickerTouchPopup.js +8 -0
  19. package/src/desktop/DisableBrowserF5ReloadKeyStroke.js +1 -0
  20. package/src/desktop/bench/DesktopTabSelectKeyStroke.js +2 -1
  21. package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
  22. package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
  23. package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
  24. package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
  25. package/src/filechooser/FileChooser.js +1 -1
  26. package/src/filechooser/FileChooser.less +15 -10
  27. package/src/focus/FocusContext.js +11 -8
  28. package/src/focus/FocusManager.js +24 -5
  29. package/src/form/fields/LookupBox.js +3 -1
  30. package/src/form/fields/LookupBox.less +28 -2
  31. package/src/form/fields/TextFieldIcon.less +2 -2
  32. package/src/form/fields/ValueField.js +11 -2
  33. package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +10 -4
  34. package/src/form/fields/button/ButtonKeyStroke.js +0 -3
  35. package/src/form/fields/datefield/DateField.js +31 -47
  36. package/src/form/fields/filechooserfield/FileChooserFieldBrowseKeyStroke.js +1 -3
  37. package/src/form/fields/filechooserfield/FileChooserFieldDeleteKeyStroke.js +1 -3
  38. package/src/form/fields/groupbox/GroupBox.js +1 -0
  39. package/src/form/fields/listbox/ListBox.js +5 -4
  40. package/src/form/fields/lookupfield/lookupField.js +6 -5
  41. package/src/form/fields/smartfield/ProposalField.js +2 -1
  42. package/src/form/fields/smartfield/ProposalTreeNode.js +4 -8
  43. package/src/form/fields/smartfield/SmartField.js +4 -20
  44. package/src/form/fields/smartfield/SmartField.less +24 -11
  45. package/src/form/fields/splitbox/SplitBoxCollapseKeyStroke.js +1 -0
  46. package/src/form/fields/splitbox/SplitBoxFirstCollapseKeyStroke.js +1 -0
  47. package/src/form/fields/splitbox/SplitBoxSecondCollapseKeyStroke.js +1 -0
  48. package/src/form/fields/tabbox/TabAreaLeftKeyStroke.js +2 -0
  49. package/src/form/fields/tabbox/TabAreaRightKeyStroke.js +2 -0
  50. package/src/form/fields/tabbox/TabBox.js +4 -0
  51. package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
  52. package/src/form/fields/tabbox/TabItem.js +4 -0
  53. package/src/form/fields/treebox/TreeBox.js +6 -5
  54. package/src/index.js +1 -1
  55. package/src/jquery/jquery-scout.js +12 -0
  56. package/src/keystroke/CloseKeyStroke.js +1 -0
  57. package/src/keystroke/ContextMenuKeyStroke.js +1 -0
  58. package/src/keystroke/FocusFilterFieldKeyStroke.js +1 -0
  59. package/src/keystroke/KeyStroke.js +11 -3
  60. package/src/keystroke/TabItemKeyStroke.js +8 -5
  61. package/src/logging/logging.js +16 -8
  62. package/src/login/LoginBox.js +3 -2
  63. package/src/login/LoginBox.less +18 -1
  64. package/src/menu/MenuExecKeyStroke.js +3 -17
  65. package/src/menu/MenuNavigationKeyStroke.js +1 -0
  66. package/src/menu/menubar/MenuBarLeftKeyStroke.js +2 -0
  67. package/src/menu/menubar/MenuBarRightKeyStroke.js +2 -0
  68. package/src/messagebox/MessageBox.less +17 -17
  69. package/src/planner/Planner.js +2 -0
  70. package/src/session/Session.js +8 -5
  71. package/src/style/fonts.less +5 -1
  72. package/src/style/sizes.less +14 -5
  73. package/src/table/Table.js +25 -19
  74. package/src/table/Table.less +14 -7
  75. package/src/table/TableAdapter.js +9 -12
  76. package/src/table/TableHeaderMenuButton.js +2 -2
  77. package/src/table/TableLayout.js +6 -0
  78. package/src/table/columns/Column.js +8 -5
  79. package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
  80. package/src/table/editor/CellEditorPopup.js +21 -14
  81. package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -0
  82. package/src/table/keystrokes/TableCopyKeyStroke.js +1 -0
  83. package/src/table/keystrokes/TableNavigationCollapseKeyStroke.js +2 -2
  84. package/src/table/keystrokes/TableNavigationEndKeyStroke.js +2 -2
  85. package/src/table/keystrokes/TableNavigationExpandKeyStroke.js +2 -2
  86. package/src/table/keystrokes/TableNavigationHomeKeyStroke.js +2 -2
  87. package/src/table/keystrokes/TableNavigationPageDownKeyStroke.js +2 -2
  88. package/src/table/keystrokes/TableNavigationPageUpKeyStroke.js +2 -2
  89. package/src/table/keystrokes/TableNavigationUpKeyStroke.js +2 -2
  90. package/src/table/keystrokes/TableRefreshKeyStroke.js +2 -2
  91. package/src/table/keystrokes/TableSelectAllKeyStroke.js +3 -2
  92. package/src/table/keystrokes/TableStartCellEditKeyStroke.js +2 -2
  93. package/src/testing/index.js +1 -0
  94. package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
  95. package/src/tile/TileGrid.js +9 -11
  96. package/src/tile/fields/tablefield/TileTableField.less +19 -2
  97. package/src/tile/keystrokes/TileGridSelectKeyStroke.js +3 -2
  98. package/src/timepicker/TimePickerTouchPopup.js +8 -0
  99. package/src/tree/Tree.js +8 -4
  100. package/src/tree/Tree.less +12 -2
  101. package/src/tree/keystrokes/AbstractTreeNavigationKeyStroke.js +1 -0
  102. package/src/tree/keystrokes/TreeCollapseAllKeyStroke.js +2 -2
  103. package/src/tree/keystrokes/TreeExpandOrDrillDownKeyStroke.js +2 -2
  104. package/src/tree/keystrokes/TreeNavigationDownKeyStroke.js +2 -2
  105. package/src/tree/keystrokes/TreeNavigationEndKeyStroke.js +2 -2
  106. package/src/tree/keystrokes/TreeNavigationUpKeyStroke.js +2 -2
  107. package/src/util/Device.js +4 -4
  108. package/src/util/arrays.js +20 -0
  109. package/src/widget/Widget.js +6 -4
  110. package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js +0 -2
  111. package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js.map +0 -1
  112. package/dist/eclipse-scout-core-theme-6b2fef56e9e49231a49c.min.css +0 -1
  113. package/dist/eclipse-scout-core-theme-dark-d2bb274dd42f132bfca0.min.css +0 -1
@@ -3,12 +3,18 @@
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
- * http://www.eclipse.org/legal/epl-v10.html
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
10
10
  */
11
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
- }
12
+
13
+ // BreadCrumbItem uses 14px instead of 13px font size
14
+ padding-bottom: @breadcrumb-bar-field-padding-bottom;
15
+
16
+ .dense & {
17
+ // But it uses normal 13px in dense mode
18
+ padding-bottom: @breadcrumb-bar-field-padding-bottom-dense;
19
+ }
20
+ }
@@ -20,9 +20,6 @@ export default class ButtonKeyStroke extends KeyStroke {
20
20
  this.stopImmediatePropagation = true;
21
21
 
22
22
  this.renderingHints.hAlign = HAlign.RIGHT;
23
- this.renderingHints.$drawingArea = function($drawingArea, event) {
24
- return this.field.$container;
25
- }.bind(this);
26
23
  }
27
24
 
28
25
  /**
@@ -8,29 +8,7 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
- import {
12
- arrays,
13
- DateFormat,
14
- DatePickerPopup,
15
- DatePredictionFailedStatus,
16
- dates,
17
- DateTimeCompositeLayout,
18
- Device,
19
- fields,
20
- focusUtils,
21
- FormField,
22
- HtmlComponent,
23
- InputFieldKeyStrokeContext,
24
- keys,
25
- objects,
26
- ParsingFailedStatus,
27
- scout,
28
- Status,
29
- strings,
30
- styles,
31
- TimePickerPopup,
32
- ValueField
33
- } from '../../../index';
11
+ import {arrays, DateFormat, DatePickerPopup, DatePredictionFailedStatus, dates, DateTimeCompositeLayout, Device, fields, focusUtils, FormField, HtmlComponent, InputFieldKeyStrokeContext, keys, objects, ParsingFailedStatus, scout, Status, strings, styles, TimePickerPopup, ValueField} from '../../../index';
34
12
  import $ from 'jquery';
35
13
 
36
14
  export default class DateField extends ValueField {
@@ -695,7 +673,7 @@ export default class DateField extends ValueField {
695
673
  }
696
674
 
697
675
  _renderDateClearable() {
698
- if (this.hasDate || this.isClearable()) {
676
+ if (this.hasDate && this.isClearable()) {
699
677
  if (!this.$dateClearIcon) {
700
678
  // date clear icon
701
679
  this.$dateClearIcon = this.$field.appendSpan('icon date-clear unfocusable text-field-icon action')
@@ -711,14 +689,18 @@ export default class DateField extends ValueField {
711
689
  }
712
690
 
713
691
  _renderTimeClearable() {
714
- if (this.hasTime && this.isClearable() && !this.$timeClearIcon) {
715
- // date clear icon
716
- this.$timeClearIcon = this.$field.appendSpan('icon time-clear unfocusable text-field-icon action')
717
- .on('mousedown', this._onTimeClearIconMouseDown.bind(this));
718
- } else if ((!this.hasTime || !this.isClearable()) && this.$timeClearIcon) {
719
- // Remove $dateField
720
- this.$timeClearIcon.remove();
721
- this.$timeClearIcon = null;
692
+ if (this.hasTime && this.isClearable()) {
693
+ if (!this.$timeClearIcon) {
694
+ // time clear icon
695
+ this.$timeClearIcon = this.$field.appendSpan('icon time-clear unfocusable text-field-icon action')
696
+ .on('mousedown', this._onTimeClearIconMouseDown.bind(this));
697
+ }
698
+ } else {
699
+ if (this.$timeClearIcon) {
700
+ // Remove clear icon
701
+ this.$timeClearIcon.remove();
702
+ this.$timeClearIcon = null;
703
+ }
722
704
  }
723
705
  }
724
706
 
@@ -1192,21 +1174,19 @@ export default class DateField extends ValueField {
1192
1174
  }
1193
1175
 
1194
1176
  _onDatePickerDateSelect(event) {
1195
- this._setDateValid(true);
1196
- this._setTimeValid(true);
1197
- let newValue = this._newTimestampAsDate(event.date, this.value);
1198
- this.setValue(newValue);
1199
- this.closePopup();
1200
- this._triggerAcceptInput();
1177
+ this._setNewDateTimeValue(this._newTimestampAsDate(event.date, this.value));
1201
1178
  }
1202
1179
 
1203
1180
  _onTimePickerTimeSelect(event) {
1181
+ this._setNewDateTimeValue(this._newTimestampAsDate(this.value, event.time));
1182
+ }
1183
+
1184
+ _setNewDateTimeValue(newValue) {
1204
1185
  this._setDateValid(true);
1205
1186
  this._setTimeValid(true);
1206
- let newValue = this._newTimestampAsDate(this.value, event.time);
1207
1187
  this.setValue(newValue);
1208
- this.closePopup();
1209
1188
  this._triggerAcceptInput();
1189
+ this.closePopup();
1210
1190
  }
1211
1191
 
1212
1192
  _createPredictionField($inputField) {
@@ -1385,10 +1365,12 @@ export default class DateField extends ValueField {
1385
1365
  this.popup = this.createDatePopup();
1386
1366
  this.popup.open();
1387
1367
  this.$dateField.addClass('focused');
1388
- this.popup.on('remove', event => {
1389
- this._onPopupRemove(event);
1390
- this.popup = null;
1368
+ this.popup.one('destroy', event => {
1369
+ // Removing the class must happen before _onPopupDestroy() is called, otherwise the date field no longer exists,
1370
+ // because in touch mode _onPopupDestroy() destroys the date field.
1391
1371
  this.$dateField.removeClass('focused');
1372
+ this._onPopupDestroy(event);
1373
+ this.popup = null;
1392
1374
  });
1393
1375
  this.getDatePicker().on('dateSelect', this._onDatePickerDateSelect.bind(this));
1394
1376
  }
@@ -1416,10 +1398,12 @@ export default class DateField extends ValueField {
1416
1398
  this.popup = this.createTimePopup();
1417
1399
  this.popup.open();
1418
1400
  this.$timeField.addClass('focused');
1419
- this.popup.on('remove', event => {
1420
- this._onPopupRemove(event);
1421
- this.popup = null;
1401
+ this.popup.one('destroy', event => {
1402
+ // Removing the class must happen before _onPopupDestroy() is called, otherwise the date field no longer exists,
1403
+ // because in touch mode _onPopupDestroy() destroys the date field.
1422
1404
  this.$timeField.removeClass('focused');
1405
+ this._onPopupDestroy(event);
1406
+ this.popup = null;
1423
1407
  });
1424
1408
  this.getTimePicker().on('timeSelect', this._onTimePickerTimeSelect.bind(this));
1425
1409
  }
@@ -1686,7 +1670,7 @@ export default class DateField extends ValueField {
1686
1670
  }
1687
1671
  }
1688
1672
 
1689
- _onPopupRemove(event) {
1673
+ _onPopupDestroy(event) {
1690
1674
  if (!this.touchMode || !this._cellEditorPopup) {
1691
1675
  return;
1692
1676
  }
@@ -19,9 +19,7 @@ export default class FileChooserFieldBrowseKeyStroke extends KeyStroke {
19
19
  this.stopPropagation = true;
20
20
 
21
21
  this.renderingHints.hAlign = HAlign.LEFT;
22
- this.renderingHints.$drawingArea = function($drawingArea, event) {
23
- return this.field.$fieldContainer;
24
- }.bind(this);
22
+ this.renderingHints.$drawingArea = ($drawingArea, event) => this.field.$fieldContainer;
25
23
  }
26
24
 
27
25
  /**
@@ -20,9 +20,7 @@ export default class FileChooserFieldDeleteKeyStroke extends KeyStroke {
20
20
 
21
21
  this.renderingHints.offset = 25;
22
22
  this.renderingHints.hAlign = HAlign.RIGHT;
23
- this.renderingHints.$drawingArea = function($drawingArea, event) {
24
- return this.field.$fieldContainer;
25
- }.bind(this);
23
+ this.renderingHints.$drawingArea = ($drawingArea, event) => this.field.$fieldContainer;
26
24
  }
27
25
 
28
26
  /**
@@ -42,6 +42,7 @@ export default class GroupBox extends CompositeField {
42
42
  this.processButtons = [];
43
43
  this.processMenus = [];
44
44
  this.staticMenus = [];
45
+ this.selectionKeystroke = null;
45
46
  this.responsive = null;
46
47
 
47
48
  this.$header = null;
@@ -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
- * http://www.eclipse.org/legal/epl-v10.html
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
@@ -179,12 +179,13 @@ export default class ListBox extends LookupBox {
179
179
  if (lookupRow.enabled === false) {
180
180
  row.enabled = false;
181
181
  }
182
- if (lookupRow.active === false) {
183
- row.active = false;
184
- }
185
182
  if (lookupRow.cssClass) {
186
183
  row.cssClass = lookupRow.cssClass;
187
184
  }
185
+ if (lookupRow.active === false) {
186
+ row.active = false;
187
+ row.cssClass = (row.cssClass ? (row.cssClass + ' ') : '') + 'inactive';
188
+ }
188
189
 
189
190
  return row;
190
191
  }
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
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
@@ -25,12 +25,13 @@ export function createTableRow(lookupRow, multipleColumns) {
25
25
  if (lookupRow.enabled === false) {
26
26
  row.enabled = false;
27
27
  }
28
- if (lookupRow.active === false) {
29
- row.active = false;
30
- }
31
28
  if (lookupRow.cssClass) {
32
29
  row.cssClass = lookupRow.cssClass;
33
30
  }
31
+ if (lookupRow.active === false) {
32
+ row.active = false;
33
+ row.cssClass = (row.cssClass ? (row.cssClass + ' ') : '') + 'inactive';
34
+ }
34
35
 
35
36
  if (!multipleColumns) {
36
37
  cells.push(createTableCell(lookupRow, null, null));
@@ -189,11 +189,12 @@ export default class ProposalField extends SmartField {
189
189
  // this causes a lookup which may fail and open a new proposal chooser (property
190
190
  // change for 'result').
191
191
  if (searchTextChanged) {
192
+ this.clearErrorStatus();
192
193
  this._acceptByText(sync, searchText);
193
194
  } else if (!this._hasUiError()) {
194
195
  this._inputAccepted(false);
195
196
  } else {
196
- // even though there's nothing todo, someone could wait for our promise to be resolved
197
+ // even though there's nothing to do, someone could wait for our promise to be resolved
197
198
  this._acceptInputDeferred.resolve();
198
199
  }
199
200
 
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
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
@@ -22,14 +22,10 @@ export default class ProposalTreeNode extends TreeNode {
22
22
  }
23
23
 
24
24
  _renderText() {
25
- let text = this.text;
26
- if (this.lookupRow.active === false) {
27
- text += ' (' + this.session.text('InactiveState') + ')';
28
- }
29
25
  if (this.htmlEnabled) {
30
- this.$text.html(text);
26
+ this.$text.html(this.text);
31
27
  } else {
32
- this.$text.textOrNbsp(text);
28
+ this.$text.textOrNbsp(this.text);
33
29
  }
34
30
  }
35
31
 
@@ -1,31 +1,14 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
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
10
10
  */
11
- import {
12
- arrays,
13
- Device,
14
- fields,
15
- FormField,
16
- InputFieldKeyStrokeContext,
17
- keys,
18
- LookupCall,
19
- objects,
20
- QueryBy,
21
- scout,
22
- SimpleLoadingSupport,
23
- SmartFieldCancelKeyStroke,
24
- SmartFieldLayout,
25
- Status,
26
- strings,
27
- ValueField
28
- } from '../../../index';
11
+ import {arrays, Device, fields, FormField, InputFieldKeyStrokeContext, keys, LookupCall, objects, QueryBy, scout, SimpleLoadingSupport, SmartFieldCancelKeyStroke, SmartFieldLayout, Status, strings, ValueField} from '../../../index';
29
12
  import $ from 'jquery';
30
13
 
31
14
  export default class SmartField extends ValueField {
@@ -932,6 +915,7 @@ export default class SmartField extends ValueField {
932
915
  });
933
916
 
934
917
  this.popup.open();
918
+ this.popup.$container.css('--inactive-lookup-row-suffix-text', `'${this.session.text('InactiveState')}'`);
935
919
 
936
920
  /* This variable is required to route events to the right field:
937
921
  * - in normal mode popup events should be processed by the normal smart-field
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
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
@@ -266,13 +266,23 @@
266
266
  & > .table-data {
267
267
  padding: @proposal-chooser-padding-y @proposal-chooser-padding-x;
268
268
 
269
- & > .table-row.first {
270
- border-top: 1px solid @table-row-border-color;
269
+ & > .table-row {
270
+ &.first {
271
+ border-top: 1px solid @table-row-border-color;
271
272
 
272
- &.selected::after {
273
- // If header is invisible, selection of first row starts at 0
274
- // Since we now have a top border we can move it to -1px again to cover the border
275
- top: -1px;
273
+ &.selected::after {
274
+ // If header is invisible, selection of first row starts at 0
275
+ // Since we now have a top border we can move it to -1px again to cover the border
276
+ top: -1px;
277
+ }
278
+ }
279
+
280
+ &.inactive {
281
+ font-style: italic;
282
+
283
+ & > .table-cell.last > .text::after {
284
+ content: ' (' var(--inactive-lookup-row-suffix-text) ')';
285
+ }
276
286
  }
277
287
  }
278
288
 
@@ -286,9 +296,12 @@
286
296
  & > .tree-data {
287
297
  padding: @proposal-chooser-padding-y @proposal-chooser-padding-x;
288
298
 
289
- & > .tree-node {
290
- &.inactive {
291
- font-style: italic;
299
+ & > .tree-node.inactive,
300
+ & > .animation-wrapper > .tree-node.inactive {
301
+ font-style: italic;
302
+
303
+ & > .text::after {
304
+ content: ' (' var(--inactive-lookup-row-suffix-text) ')';
292
305
  }
293
306
  }
294
307
  }
@@ -16,6 +16,7 @@ export default class SplitBoxCollapseKeyStroke extends KeyStroke {
16
16
  super();
17
17
  this.field = splitBox;
18
18
  this.parseAndSetKeyStroke(keyStroke);
19
+ this.inheritAccessibility = false;
19
20
  }
20
21
 
21
22
  handle(event) {
@@ -16,6 +16,7 @@ export default class SplitBoxFirstCollapseKeyStroke extends KeyStroke {
16
16
  super();
17
17
  this.field = splitBox;
18
18
  this.parseAndSetKeyStroke(keyStroke);
19
+ this.inheritAccessibility = false;
19
20
  }
20
21
 
21
22
  handle(event) {
@@ -16,6 +16,7 @@ export default class SplitBoxSecondCollapseKeyStroke extends KeyStroke {
16
16
  super();
17
17
  this.field = splitBox;
18
18
  this.parseAndSetKeyStroke(keyStroke);
19
+ this.inheritAccessibility = false;
19
20
  }
20
21
 
21
22
  handle(event) {
@@ -12,6 +12,7 @@ import {keys, KeyStroke} from '../../../index';
12
12
 
13
13
  export default class TabAreaLeftKeyStroke extends KeyStroke {
14
14
 
15
+ // noinspection DuplicatedCode
15
16
  constructor(tabArea) {
16
17
  super();
17
18
  this.field = tabArea;
@@ -19,6 +20,7 @@ export default class TabAreaLeftKeyStroke extends KeyStroke {
19
20
  this.renderingHints.render = false;
20
21
  this.stopPropagation = true;
21
22
  this.keyStrokeMode = KeyStroke.Mode.DOWN;
23
+ this.inheritAccessibility = false;
22
24
  }
23
25
 
24
26
  handle(event) {
@@ -12,6 +12,7 @@ import {keys, KeyStroke} from '../../../index';
12
12
 
13
13
  export default class TabAreaRightKeyStroke extends KeyStroke {
14
14
 
15
+ // noinspection DuplicatedCode
15
16
  constructor(tabArea) {
16
17
  super();
17
18
  this.field = tabArea;
@@ -19,6 +20,7 @@ export default class TabAreaRightKeyStroke extends KeyStroke {
19
20
  this.renderingHints.render = false;
20
21
  this.stopPropagation = true;
21
22
  this.keyStrokeMode = KeyStroke.Mode.DOWN;
23
+ this.inheritAccessibility = false;
22
24
  }
23
25
 
24
26
  handle(event) {
@@ -290,6 +290,10 @@ export default class TabBox extends CompositeField {
290
290
  this.header.focusTabItem(tabItem);
291
291
  }
292
292
 
293
+ getTabForItem(tabItem) {
294
+ return this.header.getTabForItem(tabItem);
295
+ }
296
+
293
297
  _onTabBoxHeaderPropertyChange(event) {
294
298
  if (event.propertyName === 'selectedTabItem') {
295
299
  this.setSelectedTab(event.newValue);
@@ -89,6 +89,10 @@ export default class TabBoxHeader extends Widget {
89
89
  this.tabArea.focusTabItem(tabItem);
90
90
  }
91
91
 
92
+ getTabForItem(tabItem) {
93
+ return this.tabArea.getTabForItem(tabItem);
94
+ }
95
+
92
96
  _onTabBoxPropertyChange(event) {
93
97
  if (event.propertyName === 'menus') {
94
98
  this.menuBar.setMenuItems(this.tabBox.menus);
@@ -74,4 +74,8 @@ export default class TabItem extends GroupBox {
74
74
  this.parent.setSelectedTab(this);
75
75
  }
76
76
  }
77
+
78
+ getTab() {
79
+ return this.parent.getTabForItem(this);
80
+ }
77
81
  }
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
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
@@ -193,12 +193,13 @@ export default class TreeBox extends LookupBox {
193
193
  if (lookupRow.enabled === false) {
194
194
  node.enabled = false;
195
195
  }
196
- if (lookupRow.active === false) {
197
- node.active = false;
198
- }
199
196
  if (lookupRow.cssClass) {
200
197
  node.cssClass = lookupRow.cssClass;
201
198
  }
199
+ if (lookupRow.active === false) {
200
+ node.active = false;
201
+ node.cssClass = (node.cssClass ? (node.cssClass + ' ') : '') + 'inactive';
202
+ }
202
203
 
203
204
  return node;
204
205
  }
package/src/index.js CHANGED
@@ -181,6 +181,7 @@ export {default as tooltips} from './tooltip/tooltips';
181
181
  export {default as WidgetTooltip} from './tooltip/WidgetTooltip';
182
182
  export {default as Action} from './action/Action';
183
183
  export {default as ActionAdapter} from './action/ActionAdapter';
184
+ export {default as ActionExecKeyStroke} from './action/ActionExecKeyStroke';
184
185
  export {default as ActionKeyStroke} from './action/ActionKeyStroke';
185
186
  export {default as Box} from './box/Box';
186
187
  export {default as Label} from './label/Label';
@@ -308,7 +309,6 @@ export {default as TableHeaderMenu} from './table/TableHeaderMenu';
308
309
  export {default as TableHeaderMenuLayout} from './table/TableHeaderMenuLayout';
309
310
  export {default as TableHeaderMenuGroup} from './table/TableHeaderMenuGroup';
310
311
  export {default as TableHeaderMenuButton} from './table/TableHeaderMenuButton';
311
- export {default as TableHeaderMenuButtonKeyStroke} from './table/TableHeaderMenuButtonKeyStroke';
312
312
  export {default as TableLayout} from './table/TableLayout';
313
313
  export {default as TableSelectionHandler} from './table/TableSelectionHandler';
314
314
  export {default as TableTileGridMediator} from './table/TableTileGridMediator';
@@ -834,10 +834,22 @@ $.fn.isDisplayNone = function() {
834
834
  return this.css('display') === 'none';
835
835
  };
836
836
 
837
+ /**
838
+ * @param {boolean} tabbable true, to make the component tabbable. False, to make it neither tabbable nor focusable.
839
+ * @returns {$}
840
+ */
837
841
  $.fn.setTabbable = function(tabbable) {
838
842
  return this.attr('tabIndex', tabbable ? 0 : null);
839
843
  };
840
844
 
845
+ /**
846
+ * @param {boolean} tabbable true, to make the component tabbable. False, to make it not tabbable but focusable, so the user can focus it with the mouse but not with the keyboard.
847
+ * @returns {$}
848
+ */
849
+ $.fn.setTabbableOrFocusable = function(tabbable) {
850
+ return this.attr('tabIndex', tabbable ? 0 : -1);
851
+ };
852
+
841
853
  $.fn.isTabbable = function() {
842
854
  return this.attr('tabIndex') >= 0;
843
855
  };
@@ -22,6 +22,7 @@ export default class CloseKeyStroke extends KeyStroke {
22
22
  render: !!$drawingArea,
23
23
  $drawingArea: $drawingArea
24
24
  };
25
+ this.inheritAccessibility = false;
25
26
  }
26
27
 
27
28
  handle(event) {
@@ -24,6 +24,7 @@ export default class ContextMenuKeyStroke extends KeyStroke {
24
24
  this.ctrl = false;
25
25
  this.shift = false;
26
26
  this.stopPropagation = true;
27
+ this.inheritAccessibility = false;
27
28
  }
28
29
 
29
30
  /**
@@ -30,6 +30,7 @@ export default class FocusFilterFieldKeyStroke extends KeyStroke {
30
30
  this.preventDefault = false; // false so that the key is inserted into the search field.
31
31
  this.keyStrokeMode = KeyStroke.Mode.DOWN;
32
32
  this.stopPropagation = true;
33
+ this.inheritAccessibility = false;
33
34
  }
34
35
 
35
36
  /**
@@ -18,6 +18,7 @@ export default class KeyStroke {
18
18
 
19
19
  this.which = []; // keys which this keystroke is bound to. Typically, this is a single key, but may be multiple keys if handling the same action (e.g. ENTER and SPACE on a button).
20
20
  this.ctrl = false;
21
+ this.inheritAccessibility = true;
21
22
  this.alt = false;
22
23
  this.shift = false;
23
24
  this.preventDefault = true;
@@ -138,9 +139,16 @@ export default class KeyStroke {
138
139
  if (this.field.visible !== undefined && !this.field.visible) {
139
140
  return false;
140
141
  }
141
- // Check enabled state
142
- if (this.field.enabled !== undefined && !this.field.enabled) {
143
- return false;
142
+ // Check enabled state (if inheritAccessibility is true)
143
+ if (!this.inheritAccessibility) {
144
+ return true;
145
+ }
146
+ if (this.field.enabledComputed !== undefined) {
147
+ return this.field.enabledComputed;
148
+ }
149
+ if (this.field.enabled !== undefined) {
150
+ // This should actually not happen because this.field should always be a hypothetical case if this.field is not a widget
151
+ return this.field.enabled;
144
152
  }
145
153
  }
146
154
  return true;
@@ -19,15 +19,18 @@ export default class TabItemKeyStroke extends KeyStroke {
19
19
 
20
20
  this.renderingHints.offset = 16;
21
21
  this.renderingHints.hAlign = HAlign.RIGHT;
22
- this.renderingHints.$drawingArea = function($drawingArea, event) {
23
- return this.field.$tabContainer;
24
- }.bind(this);
22
+ this.renderingHints.render = () => {
23
+ let tab = this.field.getTab();
24
+ return tab && tab.rendered;
25
+ };
26
+ this.renderingHints.$drawingArea = ($drawingArea, event) => this.field.getTab().$container;
27
+ this.inheritAccessibility = false;
25
28
  }
26
29
 
27
30
  /**
28
- * @override KeyStroke.js
31
+ * @override
29
32
  */
30
33
  handle(event) {
31
- this.field.parent.setSelectedTab(this.field);
34
+ this.field.select();
32
35
  }
33
36
  }