@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.
Files changed (166) hide show
  1. package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.min.js +2 -0
  2. package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.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 +597 -422
  6. package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
  7. package/dist/eclipse-scout-core-theme.css +333 -158
  8. package/dist/eclipse-scout-core-theme.css.map +1 -1
  9. package/dist/eclipse-scout-core.js +1196 -811
  10. package/dist/eclipse-scout-core.js.map +1 -1
  11. package/dist/file-list +7 -0
  12. package/dist/locales.json +47126 -0
  13. package/dist/texts.json +1153 -0
  14. package/package.json +2 -2
  15. package/src/App.js +1 -1
  16. package/src/ErrorHandler.js +66 -28
  17. package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
  18. package/src/action/Button.less +1 -0
  19. package/src/box/Box.less +12 -8
  20. package/src/breadcrumbbar/BreadcrumbBarLayout.js +2 -2
  21. package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
  22. package/src/calendar/Calendar.js +40 -58
  23. package/src/calendar/Calendar.less +10 -10
  24. package/src/calendar/CalendarLayout.js +3 -1
  25. package/src/checkbox/CheckBox.less +3 -1
  26. package/src/datepicker/DatePicker.less +1 -0
  27. package/src/datepicker/DatePickerTouchPopup.js +8 -0
  28. package/src/desktop/DisableBrowserF5ReloadKeyStroke.js +1 -0
  29. package/src/desktop/bench/DesktopTabSelectKeyStroke.js +2 -1
  30. package/src/desktop/desktoptab/DesktopTab.less +5 -2
  31. package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
  32. package/src/desktop/desktoptab/DesktopTabAreaLayout.js +1 -1
  33. package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
  34. package/src/desktop/navigation/DesktopNavigation.less +4 -0
  35. package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
  36. package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
  37. package/src/desktop/notification/DesktopNotification.js +11 -4
  38. package/src/desktop/notification/DesktopNotification.less +5 -3
  39. package/src/desktop/outline/Outline.less +4 -4
  40. package/src/desktop/viewbutton/ViewButton.less +18 -9
  41. package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
  42. package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
  43. package/src/filechooser/FileChooser.js +1 -1
  44. package/src/filechooser/FileChooser.less +16 -11
  45. package/src/focus/FocusContext.js +11 -8
  46. package/src/focus/FocusManager.js +24 -5
  47. package/src/form/Form.less +1 -0
  48. package/src/form/fields/LookupBox.js +5 -2
  49. package/src/form/fields/LookupBox.less +28 -2
  50. package/src/form/fields/TextFieldIcon.less +2 -2
  51. package/src/form/fields/ValueField.js +11 -2
  52. package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +20 -0
  53. package/src/form/fields/button/ButtonKeyStroke.js +0 -3
  54. package/src/form/fields/datefield/DateField.js +31 -47
  55. package/src/form/fields/filechooserfield/FileChooserFieldBrowseKeyStroke.js +1 -3
  56. package/src/form/fields/filechooserfield/FileChooserFieldDeleteKeyStroke.js +1 -3
  57. package/src/form/fields/groupbox/GroupBox.js +14 -9
  58. package/src/form/fields/groupbox/GroupBox.less +1 -0
  59. package/src/form/fields/htmlfield/HtmlField.less +0 -1
  60. package/src/form/fields/listbox/ListBox.js +13 -7
  61. package/src/form/fields/lookupfield/lookupField.js +6 -5
  62. package/src/form/fields/smartfield/ProposalField.js +2 -1
  63. package/src/form/fields/smartfield/ProposalTreeNode.js +4 -8
  64. package/src/form/fields/smartfield/SmartField.js +4 -20
  65. package/src/form/fields/smartfield/SmartField.less +24 -11
  66. package/src/form/fields/splitbox/SplitBoxCollapseKeyStroke.js +1 -0
  67. package/src/form/fields/splitbox/SplitBoxFirstCollapseKeyStroke.js +1 -0
  68. package/src/form/fields/splitbox/SplitBoxSecondCollapseKeyStroke.js +1 -0
  69. package/src/form/fields/tabbox/TabAreaLayout.js +63 -66
  70. package/src/form/fields/tabbox/TabAreaLeftKeyStroke.js +2 -0
  71. package/src/form/fields/tabbox/TabAreaRightKeyStroke.js +2 -0
  72. package/src/form/fields/tabbox/TabBox.js +8 -7
  73. package/src/form/fields/tabbox/TabBox.less +2 -1
  74. package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
  75. package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
  76. package/src/form/fields/tabbox/TabItem.js +4 -0
  77. package/src/form/fields/treebox/TreeBox.js +6 -5
  78. package/src/glasspane/GlassPane.js +3 -3
  79. package/src/group/Group.less +1 -1
  80. package/src/index.js +1 -1
  81. package/src/index.less +1 -0
  82. package/src/jquery/jquery-scout.js +17 -4
  83. package/src/keystroke/CloseKeyStroke.js +1 -0
  84. package/src/keystroke/ContextMenuKeyStroke.js +1 -0
  85. package/src/keystroke/FocusFilterFieldKeyStroke.js +1 -0
  86. package/src/keystroke/KeyStroke.js +11 -3
  87. package/src/keystroke/TabItemKeyStroke.js +8 -5
  88. package/src/logging/logging.js +16 -8
  89. package/src/login/LoginBox.js +3 -2
  90. package/src/login/LoginBox.less +27 -8
  91. package/src/menu/ContextMenuPopup.less +9 -2
  92. package/src/menu/Menu.less +1 -0
  93. package/src/menu/MenuExecKeyStroke.js +3 -17
  94. package/src/menu/MenuNavigationKeyStroke.js +1 -0
  95. package/src/menu/menubar/MenuBarLeftKeyStroke.js +2 -0
  96. package/src/menu/menubar/MenuBarRightKeyStroke.js +2 -0
  97. package/src/messagebox/MessageBox.less +20 -20
  98. package/src/modeselector/Mode.less +15 -37
  99. package/src/modeselector/ModeSelector.js +1 -1
  100. package/src/modeselector/ModeSelector.less +2 -1
  101. package/src/planner/Planner.js +2 -0
  102. package/src/planner/PlannerHeader.less +2 -1
  103. package/src/popup/Popup.js +24 -8
  104. package/src/popup/PopupLayout.js +2 -8
  105. package/src/scrollbar/Scrollbar.less +8 -1
  106. package/src/scrollbar/scrollbars.js +26 -4
  107. package/src/session/Session.js +8 -5
  108. package/src/style/colors-dark.less +25 -11
  109. package/src/style/colors.less +17 -3
  110. package/src/style/fonts.less +10 -1
  111. package/src/style/mixins.less +21 -14
  112. package/src/style/sizes-dark.less +4 -1
  113. package/src/style/sizes.less +17 -9
  114. package/src/table/Table.js +63 -49
  115. package/src/table/Table.less +50 -20
  116. package/src/table/TableAdapter.js +9 -12
  117. package/src/table/TableHeader.js +10 -8
  118. package/src/table/TableHeader.less +1 -0
  119. package/src/table/TableHeaderMenu.js +3 -1
  120. package/src/table/TableHeaderMenu.less +7 -2
  121. package/src/table/TableHeaderMenuButton.js +2 -2
  122. package/src/table/TableLayout.js +6 -0
  123. package/src/table/columns/BooleanColumn.js +2 -2
  124. package/src/table/columns/Column.js +10 -7
  125. package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
  126. package/src/table/editor/CellEditorPopup.js +29 -15
  127. package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -0
  128. package/src/table/keystrokes/TableCopyKeyStroke.js +1 -0
  129. package/src/table/keystrokes/TableNavigationCollapseKeyStroke.js +2 -2
  130. package/src/table/keystrokes/TableNavigationEndKeyStroke.js +2 -2
  131. package/src/table/keystrokes/TableNavigationExpandKeyStroke.js +2 -2
  132. package/src/table/keystrokes/TableNavigationHomeKeyStroke.js +2 -2
  133. package/src/table/keystrokes/TableNavigationPageDownKeyStroke.js +2 -2
  134. package/src/table/keystrokes/TableNavigationPageUpKeyStroke.js +2 -2
  135. package/src/table/keystrokes/TableNavigationUpKeyStroke.js +2 -2
  136. package/src/table/keystrokes/TableRefreshKeyStroke.js +2 -2
  137. package/src/table/keystrokes/TableSelectAllKeyStroke.js +3 -2
  138. package/src/table/keystrokes/TableStartCellEditKeyStroke.js +2 -2
  139. package/src/tagbar/TagBarOverflowPopupLayout.js +1 -1
  140. package/src/testing/index.js +1 -0
  141. package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
  142. package/src/tile/TileGrid.js +10 -12
  143. package/src/tile/TileGridLayout.js +2 -2
  144. package/src/tile/accordion/TileAccordion.js +16 -1
  145. package/src/tile/fields/FormFieldTile.less +18 -11
  146. package/src/tile/fields/button/ButtonTile.js +1 -1
  147. package/src/tile/fields/tablefield/TileTableField.less +19 -2
  148. package/src/tile/keystrokes/TileGridSelectKeyStroke.js +3 -2
  149. package/src/timepicker/TimePickerTouchPopup.js +8 -0
  150. package/src/tree/CompactTree.less +1 -1
  151. package/src/tree/LazyNodeFilter.js +4 -2
  152. package/src/tree/Tree.js +7 -5
  153. package/src/tree/Tree.less +13 -5
  154. package/src/tree/keystrokes/AbstractTreeNavigationKeyStroke.js +1 -0
  155. package/src/tree/keystrokes/TreeCollapseAllKeyStroke.js +2 -2
  156. package/src/tree/keystrokes/TreeExpandOrDrillDownKeyStroke.js +2 -2
  157. package/src/tree/keystrokes/TreeNavigationDownKeyStroke.js +2 -2
  158. package/src/tree/keystrokes/TreeNavigationEndKeyStroke.js +2 -2
  159. package/src/tree/keystrokes/TreeNavigationUpKeyStroke.js +2 -2
  160. package/src/util/Device.js +4 -4
  161. package/src/util/arrays.js +44 -2
  162. package/src/util/dragAndDrop.js +5 -4
  163. package/src/util/events.js +1 -1
  164. package/src/util/objects.js +4 -1
  165. package/src/widget/FilterSupport.js +1 -1
  166. package/src/widget/Widget.js +17 -7
@@ -19,4 +19,4 @@ export default class DesktopTabAreaLayout extends SimpleTabAreaLayout {
19
19
  super.layout($container);
20
20
  this.tabArea.updateFirstTabSelected();
21
21
  }
22
- }
22
+ }
@@ -35,6 +35,7 @@ export default class DisableBrowserTabSwitchingKeyStroke extends RangeKeyStroke
35
35
  this.renderingHints.render = false;
36
36
 
37
37
  this.preventDefault = true;
38
+ this.inheritAccessibility = false;
38
39
  }
39
40
 
40
41
  /**
@@ -47,5 +47,9 @@
47
47
  & > .font-icon {
48
48
  font-size: @view-tab-icon-font-size;
49
49
  }
50
+
51
+ &.ellipsis > .font-icon {
52
+ font-size: @view-tab-icon-font-size + 2px;
53
+ }
50
54
  }
51
55
  }
@@ -21,6 +21,7 @@ export default class EnlargeNavigationKeyStroke extends KeyStroke {
21
21
  // FF und Safari use different key codes for this key.
22
22
  this.which = [keys.forBrowser(keys.ANGULAR_BRACKET)];
23
23
  this.renderingHints.$drawingArea = ($drawingArea, event) => this.desktop.$container;
24
+ this.inheritAccessibility = false;
24
25
  }
25
26
 
26
27
  _accept(event) {
@@ -20,6 +20,7 @@ export default class ShrinkNavigationKeyStroke extends KeyStroke {
20
20
  // FF und Safari use different key codes for this key.
21
21
  this.which = [keys.forBrowser(keys.ANGULAR_BRACKET)];
22
22
  this.renderingHints.$drawingArea = ($drawingArea, event) => this.desktop.$container;
23
+ this.inheritAccessibility = false;
23
24
  }
24
25
 
25
26
  _accept(event) {
@@ -160,18 +160,17 @@ export default class DesktopNotification extends ScoutNotification {
160
160
  return;
161
161
  }
162
162
  if (this.nativeNotificationVisibility === DesktopNotification.NativeNotificationVisibility.NONE) {
163
+ this._hideLaterIfNativeOnly();
163
164
  return;
164
165
  }
165
166
 
166
167
  if (this.nativeNotificationVisibility === DesktopNotification.NativeNotificationVisibility.BACKGROUND && !this._isDocumentHidden()) {
168
+ this._hideLaterIfNativeOnly();
167
169
  return;
168
170
  }
169
171
 
170
172
  if (window.Notification && Notification.permission === 'denied') {
171
- if (this.nativeOnly) {
172
- // If native notifications are not allowed, there is no need to keep the (invisible) desktop notification open
173
- this.hide();
174
- }
173
+ this._hideLaterIfNativeOnly();
175
174
  return;
176
175
  }
177
176
  if (this._checkNotificationPromise()) {
@@ -182,6 +181,14 @@ export default class DesktopNotification extends ScoutNotification {
182
181
  }
183
182
  }
184
183
 
184
+ _hideLaterIfNativeOnly() {
185
+ if (!this.nativeOnly) {
186
+ return;
187
+ }
188
+ // If native notifications are not shown, there is no need to keep the (invisible) desktop notification open (prevent dom-leak)
189
+ setTimeout(() => this.hide()); // async because this method is called in render and removing the notification within render throws exception
190
+ }
191
+
185
192
  /**
186
193
  * Checks if browser supports the promise-based version of the method requestPermission. Safari only supports the older callback version.
187
194
  */
@@ -1,5 +1,5 @@
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
@@ -12,12 +12,14 @@
12
12
  @desktop-notification-margin-bottom: 10px;
13
13
 
14
14
  .desktop-notifications {
15
+ @desktop-notifications-margin-top: @desktop-header-height + 8px;
16
+
15
17
  position: fixed;
16
18
  right: 10px;
17
19
  top: 0;
18
- height: 100%;
20
+ height: calc(~'100% - ' @desktop-notifications-margin-top);
19
21
  width: @desktop-notification-width;
20
- margin-top: @desktop-header-height + 8px;
22
+ margin-top: @desktop-notifications-margin-top;
21
23
  pointer-events: none; /* Don't block access to the elements in the background */
22
24
  }
23
25
 
@@ -58,10 +58,6 @@
58
58
  line-height: @outline-node-control-line-height;
59
59
  color: @outline-node-control-color;
60
60
 
61
- &::before {
62
- font-size: @outline-node-control-size;
63
- }
64
-
65
61
  &:hover {
66
62
  color: @highlight-color;
67
63
  }
@@ -77,6 +73,10 @@
77
73
 
78
74
  & > .tree-node-control {
79
75
  color: @outline-node-selected-control-color;
76
+
77
+ &:hover {
78
+ color: @highlight-color;
79
+ }
80
80
  }
81
81
 
82
82
  & > .font-icon {
@@ -1,5 +1,5 @@
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
@@ -35,6 +35,11 @@
35
35
  border-radius: @view-tab-selected-border-radius;
36
36
  }
37
37
 
38
+ & > .edge {
39
+ // Ensure GlassPane.js does not set position: relative if glass pane is added before view tab is selected
40
+ position: absolute;
41
+ }
42
+
38
43
  &.selected:not(.in-background) {
39
44
  margin: @view-tab-selected-margin-top 0 0;
40
45
  border-radius: @view-tab-selected-border-radius @view-tab-selected-border-radius 0 0;
@@ -65,14 +70,12 @@
65
70
 
66
71
  &.left {
67
72
  visibility: hidden;
68
- left: 0;
69
- animation: show-view-tab-left-edge @view-tab-transition-duration ease-out 0s forwards;
73
+ animation: show-view-tab-left-edge 40ms ease-out 160ms forwards;
70
74
  }
71
75
 
72
76
  &.right {
73
77
  visibility: hidden;
74
- right: 0;
75
- animation: show-view-tab-right-edge @view-tab-transition-duration ease-out 0s forwards;
78
+ animation: show-view-tab-right-edge 40ms ease-out 160ms forwards;
76
79
  }
77
80
  }
78
81
  }
@@ -127,15 +130,21 @@
127
130
  }
128
131
 
129
132
  @keyframes show-view-tab-left-edge {
130
- to {
133
+ 0% {
131
134
  visibility: visible;
132
- transform: translateX(-24px);
135
+ left: -5px;
136
+ }
137
+ 100% {
138
+ left: -12px;
133
139
  }
134
140
  }
135
141
 
136
142
  @keyframes show-view-tab-right-edge {
137
- to {
143
+ 0% {
138
144
  visibility: visible;
139
- transform: translateX(24px);
145
+ right: -5px;
146
+ }
147
+ 100% {
148
+ right: -12px;
140
149
  }
141
150
  }
@@ -9,7 +9,7 @@
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
11
 
12
- import {KeyStroke, keys} from '../../index';
12
+ import {keys, KeyStroke} from '../../index';
13
13
 
14
14
  export default class ViewMenuPopupEnterKeyStroke extends KeyStroke {
15
15
 
@@ -24,6 +24,7 @@ export default class ViewMenuPopupEnterKeyStroke extends KeyStroke {
24
24
  return tile.$container;
25
25
  }
26
26
  };
27
+ this.inheritAccessibility = false;
27
28
  }
28
29
 
29
30
  accept(event) {
@@ -1,5 +1,5 @@
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
@@ -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 {
@@ -118,7 +118,7 @@ export default class FileChooser extends Widget {
118
118
  this.$container.addClass('calc-helper');
119
119
  let windowSize = this.$container.windowSize();
120
120
  // Use css width, but ensure that it is not larger than the window (mobile)
121
- let w = Math.min(this.$container.width(), windowSize.width - 20);
121
+ let w = Math.min(this.$container.width(), windowSize.width);
122
122
  this.$container.css('min-width', w);
123
123
  this.$container.css('max-width', w);
124
124
  this.$container.removeClass('calc-helper');
@@ -1,9 +1,9 @@
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
@@ -51,7 +51,7 @@
51
51
  text-align: center;
52
52
  word-wrap: break-word;
53
53
  #scout.font-text-large(@font-weight-bold);
54
- color: @active-color;
54
+ color: @info-color;
55
55
  }
56
56
 
57
57
  .file-chooser-label {
@@ -100,14 +100,19 @@
100
100
 
101
101
  @media (max-width: @filechooser-max-width) {
102
102
  .file-chooser {
103
- /* reduce message box width on small screens */
104
- max-width: 330px;
105
- /* no need to have a margin on small screens */
106
- margin: 0;
107
-
108
- & > .box-buttons > .box-button {
109
- margin-right: 4px;
110
- min-width: 70px; /* less min width for buttons on small screens */
103
+ margin: 0; /* no need to have a margin on small screens */
104
+
105
+ & > .box-buttons {
106
+ padding: 0 13px 26px 13px; /* use less x-padding for buttons so that more text can be shown */
107
+
108
+ & > .box-button {
109
+ margin-right: 4px;
110
+ min-width: 70px; /* less min width for buttons on small screens */
111
+
112
+ &:last-child {
113
+ margin-right: 0;
114
+ }
115
+ }
111
116
  }
112
117
  }
113
118
  }
@@ -121,7 +121,7 @@ export default class FocusContext {
121
121
  this.focusedElement = event.target;
122
122
 
123
123
  // Do not update current focus context nor validate focus if target is $entryPoint.
124
- // That is because focusing the $entryPoint is done whenever no control is currently focusable, e.g. due to glasspanes.
124
+ // That is because focusing the $entryPoint is done whenever no control is currently focusable, e.g. due to glass panes.
125
125
  if (event.target === this.$container.entryPoint(true)) {
126
126
  return;
127
127
  }
@@ -166,12 +166,12 @@ export default class FocusContext {
166
166
  /**
167
167
  * Focuses the given element if being a child of this context's container and matches the given filter (if provided).
168
168
  *
169
- * @param element
170
- * the element to gain focus, or null to focus the context's first focusable element matching the given filter.
171
- * @param filter
172
- * filter to control which element to gain focus, or null to accept all focusable candidates.
169
+ * @param {HTMLElement|$} [element]
170
+ * the element to focus, or null to focus the context's first focusable element matching the given filter.
171
+ * @param {function} [filter]
172
+ * filter that controls which element should be focused, or null to accept all focusable candidates.
173
173
  * @param {object} [options]
174
- * @param {boolean} [options.preventScroll] a boolean whether to prevent scrolling to focused element or not (defaults to false)
174
+ * @param {boolean} [options.preventScroll] prevents scrolling to new focused element (defaults to false)
175
175
  */
176
176
  validateAndSetFocus(element, filter, options) {
177
177
  // Ensure the element to be a child element, or set it to null otherwise.
@@ -213,8 +213,11 @@ export default class FocusContext {
213
213
 
214
214
  /**
215
215
  * Focuses the requested element.
216
+ *
217
+ * @param {HTMLElement} element
218
+ * the element to focus, or null to focus the context's first focusable element matching the given filter.
216
219
  * @param {object} [options]
217
- * @param {boolean} [options.preventScroll] a boolean whether to prevent scrolling to focused element or not (defaults to false)
220
+ * @param {boolean} [options.preventScroll] prevents scrolling to new focused element (defaults to false)
218
221
  */
219
222
  _focus(elementToFocus, options) {
220
223
  options = options || {};
@@ -237,7 +240,7 @@ export default class FocusContext {
237
240
  elementToFocus = null;
238
241
  }
239
242
 
240
- // Focus $entryPoint if current focus is to be blured.
243
+ // Focus $entryPoint if current focus is to be blurred.
241
244
  // Otherwise, the HTML body would be focused which makes global keystrokes (like backspace) not to work anymore.
242
245
  elementToFocus = elementToFocus || this.$container.entryPoint(true);
243
246
 
@@ -27,7 +27,8 @@ export default class FocusManager {
27
27
  // Auto focusing of elements is bad with on screen keyboards -> deactivate to prevent unwanted popping up of the keyboard
28
28
  active: !Device.get().supportsOnlyTouch(),
29
29
  // Preventing blur is bad on touch devices because every touch on a non input field is supposed to close the keyboard which does not happen if preventDefault is used on mouse down
30
- restrictedFocusGain: !Device.get().supportsOnlyTouch()
30
+ restrictedFocusGain: !Device.get().supportsOnlyTouch(),
31
+ session: null
31
32
  };
32
33
  $.extend(this, defaults, options);
33
34
 
@@ -251,15 +252,33 @@ export default class FocusManager {
251
252
  }
252
253
 
253
254
  requestFocusIfReady(element, filter) {
254
- return this.requestFocus(element, filter, true);
255
+ return this.requestFocus(element, filter, {
256
+ onlyIfReady: true
257
+ });
255
258
  }
256
259
 
257
260
  /**
258
261
  * Requests the focus for the given element, but only if being a valid focus location.
259
262
  *
263
+ * @param {HTMLElement|$} [element]
264
+ * the element to focus, or null to focus the context's first focusable element matching the given filter.
265
+ * @param {function} [filter]
266
+ * filter that controls which element should be focused, or null to accept all focusable candidates.
267
+ * @param {object|boolean} [options]
268
+ * Use object, boolean is deprecated
269
+ * @param {boolean} [options.preventScroll] prevents scrolling to new focused element (defaults to false)
270
+ * @param {boolean} [options.onlyIfReady] prevents focusing if not ready
260
271
  * @return {boolean} true if focus was gained, false otherwise.
261
272
  */
262
- requestFocus(element, filter, onlyIfReady) {
273
+ requestFocus(element, filter, options) {
274
+ // backward compatibility
275
+ if (typeof options === 'boolean') {
276
+ options = {
277
+ onlyIfReady: options
278
+ };
279
+ } else {
280
+ options = options || {};
281
+ }
263
282
  element = element instanceof $ ? element[0] : element;
264
283
  if (!element) {
265
284
  return false;
@@ -267,10 +286,10 @@ export default class FocusManager {
267
286
 
268
287
  let context = this._findFocusContextFor(element);
269
288
  if (context) {
270
- if (onlyIfReady && !context.prepared) {
289
+ if (scout.nvl(options.onlyIfReady, false) && !context.prepared) {
271
290
  return false;
272
291
  }
273
- context.validateAndSetFocus(element, filter);
292
+ context.validateAndSetFocus(element, filter, options);
274
293
  }
275
294
 
276
295
  return focusUtils.isActiveElement(element);
@@ -125,6 +125,7 @@
125
125
  #scout.overflow-ellipsis-nowrap();
126
126
  font-size: @font-size-large;
127
127
  color: @title-color;
128
+ margin-top: @text-margin-top;
128
129
  }
129
130
 
130
131
  & > .sub-title {
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2017 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
@@ -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;
@@ -66,6 +67,8 @@ export default class LookupBox extends ValueField {
66
67
  this.$field.addDeviceClass();
67
68
  this.$field.addClass('structure');
68
69
  this._renderFilterBox();
70
+
71
+ this.$container.css('--inactive-lookup-row-suffix-text', `'${this.session.text('InactiveState')}'`);
69
72
  }
70
73
 
71
74
  _renderFilterBox() {
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2017 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
@@ -43,6 +43,32 @@
43
43
  top: 0;
44
44
  height: 100%;
45
45
  }
46
+
47
+ &.inactive {
48
+ font-style: italic;
49
+
50
+ & > .table-cell.last > .text::after {
51
+ content: ' (' var(--inactive-lookup-row-suffix-text) ')';
52
+ }
53
+ }
54
+
55
+ // necessary for Scout Classic as row passes the css classes to its cells
56
+ & > .table-cell.last.inactive {
57
+ font-style: italic;
58
+
59
+ & > .text::after {
60
+ content: ' (' var(--inactive-lookup-row-suffix-text) ')';
61
+ }
62
+ }
63
+ }
64
+
65
+ & > .tree-data > .tree-node.inactive,
66
+ & > .tree-data > .animation-wrapper > .tree-node.inactive {
67
+ font-style: italic;
68
+
69
+ & > .text::after {
70
+ content: ' (' var(--inactive-lookup-row-suffix-text) ')';
71
+ }
46
72
  }
47
73
  }
48
74
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  &::before {
18
18
  #scout.font-icon();
19
- font-size: 14px;
19
+ font-size: @font-size-icon-small;
20
20
  color: @text-field-icon-color;
21
21
  border-radius: @control-border-radius;
22
22
  width: @text-field-icon-size;
@@ -39,4 +39,4 @@
39
39
  background-color: @hover-background-color;
40
40
  }
41
41
  }
42
- }
42
+ }
@@ -28,6 +28,7 @@ export default class ValueField extends FormField {
28
28
  this.value = null;
29
29
  this.validators = [];
30
30
  this.validators.push(this._validateValue.bind(this));
31
+ this._updateDisplayTextPending = false;
31
32
 
32
33
  this.$clearIcon = null;
33
34
 
@@ -517,16 +518,24 @@ export default class ValueField extends FormField {
517
518
  }
518
519
  value = scout.nvl(value, this.value);
519
520
  let returned = this.formatValue(value);
520
- if (returned && $.isFunction(returned.promise)) {
521
+ if (objects.isPromise(returned)) {
522
+ this._updateDisplayTextPending = true;
521
523
  // Promise is returned -> set display text later
522
524
  returned
523
525
  .done(this.setDisplayText.bind(this))
524
526
  .fail(() => {
525
- this.setDisplayText('');
527
+ // If display text was updated in the meantime, don't override the text with an empty string
528
+ if (this._updateDisplayTextPending) {
529
+ this.setDisplayText('');
530
+ }
526
531
  $.log.isInfoEnabled() && $.log.info('Could not resolve display text for value: ' + value);
532
+ })
533
+ .always(() => {
534
+ this._updateDisplayTextPending = false;
527
535
  });
528
536
  } else {
529
537
  this.setDisplayText(returned);
538
+ this._updateDisplayTextPending = false;
530
539
  }
531
540
  }
532
541
 
@@ -0,0 +1,20 @@
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
+ * https://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
+
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
  /**