@eclipse-scout/core 22.0.1 → 22.0.11

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 (156) 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 +517 -361
  6. package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
  7. package/dist/eclipse-scout-core-theme.css +300 -144
  8. package/dist/eclipse-scout-core-theme.css.map +1 -1
  9. package/dist/eclipse-scout-core.js +1150 -766
  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/ErrorHandler.js +66 -28
  16. package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
  17. package/src/action/Button.less +1 -0
  18. package/src/box/Box.less +10 -6
  19. package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
  20. package/src/calendar/Calendar.js +40 -58
  21. package/src/calendar/Calendar.less +10 -10
  22. package/src/calendar/CalendarLayout.js +3 -1
  23. package/src/checkbox/CheckBox.less +3 -1
  24. package/src/datepicker/DatePicker.less +1 -0
  25. package/src/datepicker/DatePickerTouchPopup.js +8 -0
  26. package/src/desktop/DisableBrowserF5ReloadKeyStroke.js +1 -0
  27. package/src/desktop/bench/DesktopTabSelectKeyStroke.js +2 -1
  28. package/src/desktop/desktoptab/DesktopTab.less +5 -2
  29. package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
  30. package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
  31. package/src/desktop/navigation/DesktopNavigation.less +4 -0
  32. package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
  33. package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
  34. package/src/desktop/notification/DesktopNotification.js +11 -4
  35. package/src/desktop/notification/DesktopNotification.less +5 -3
  36. package/src/desktop/outline/Outline.less +4 -4
  37. package/src/desktop/viewbutton/ViewButton.less +13 -9
  38. package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
  39. package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
  40. package/src/filechooser/FileChooser.js +1 -1
  41. package/src/filechooser/FileChooser.less +16 -11
  42. package/src/focus/FocusContext.js +11 -8
  43. package/src/focus/FocusManager.js +24 -5
  44. package/src/form/Form.less +1 -0
  45. package/src/form/fields/LookupBox.js +5 -2
  46. package/src/form/fields/LookupBox.less +28 -2
  47. package/src/form/fields/TextFieldIcon.less +2 -2
  48. package/src/form/fields/ValueField.js +11 -2
  49. package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +20 -0
  50. package/src/form/fields/button/ButtonKeyStroke.js +0 -3
  51. package/src/form/fields/datefield/DateField.js +31 -47
  52. package/src/form/fields/filechooserfield/FileChooserFieldBrowseKeyStroke.js +1 -3
  53. package/src/form/fields/filechooserfield/FileChooserFieldDeleteKeyStroke.js +1 -3
  54. package/src/form/fields/groupbox/GroupBox.js +14 -9
  55. package/src/form/fields/groupbox/GroupBox.less +1 -0
  56. package/src/form/fields/htmlfield/HtmlField.less +0 -1
  57. package/src/form/fields/listbox/ListBox.js +13 -7
  58. package/src/form/fields/lookupfield/lookupField.js +6 -5
  59. package/src/form/fields/smartfield/ProposalField.js +2 -1
  60. package/src/form/fields/smartfield/ProposalTreeNode.js +4 -8
  61. package/src/form/fields/smartfield/SmartField.js +4 -20
  62. package/src/form/fields/smartfield/SmartField.less +24 -11
  63. package/src/form/fields/splitbox/SplitBoxCollapseKeyStroke.js +1 -0
  64. package/src/form/fields/splitbox/SplitBoxFirstCollapseKeyStroke.js +1 -0
  65. package/src/form/fields/splitbox/SplitBoxSecondCollapseKeyStroke.js +1 -0
  66. package/src/form/fields/tabbox/TabAreaLayout.js +63 -66
  67. package/src/form/fields/tabbox/TabAreaLeftKeyStroke.js +2 -0
  68. package/src/form/fields/tabbox/TabAreaRightKeyStroke.js +2 -0
  69. package/src/form/fields/tabbox/TabBox.js +8 -7
  70. package/src/form/fields/tabbox/TabBox.less +2 -1
  71. package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
  72. package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
  73. package/src/form/fields/tabbox/TabItem.js +4 -0
  74. package/src/form/fields/treebox/TreeBox.js +6 -5
  75. package/src/glasspane/GlassPane.js +3 -3
  76. package/src/group/Group.less +1 -1
  77. package/src/index.js +1 -1
  78. package/src/index.less +1 -0
  79. package/src/jquery/jquery-scout.js +17 -4
  80. package/src/keystroke/CloseKeyStroke.js +1 -0
  81. package/src/keystroke/ContextMenuKeyStroke.js +1 -0
  82. package/src/keystroke/FocusFilterFieldKeyStroke.js +1 -0
  83. package/src/keystroke/KeyStroke.js +11 -3
  84. package/src/keystroke/TabItemKeyStroke.js +8 -5
  85. package/src/logging/logging.js +16 -8
  86. package/src/login/LoginBox.js +3 -2
  87. package/src/login/LoginBox.less +18 -1
  88. package/src/menu/ContextMenuPopup.less +9 -2
  89. package/src/menu/Menu.less +1 -0
  90. package/src/menu/MenuExecKeyStroke.js +3 -17
  91. package/src/menu/MenuNavigationKeyStroke.js +1 -0
  92. package/src/menu/menubar/MenuBarLeftKeyStroke.js +2 -0
  93. package/src/menu/menubar/MenuBarRightKeyStroke.js +2 -0
  94. package/src/messagebox/MessageBox.less +17 -17
  95. package/src/modeselector/Mode.less +15 -37
  96. package/src/modeselector/ModeSelector.js +1 -1
  97. package/src/modeselector/ModeSelector.less +2 -1
  98. package/src/planner/Planner.js +2 -0
  99. package/src/planner/PlannerHeader.less +2 -1
  100. package/src/popup/Popup.js +24 -8
  101. package/src/popup/PopupLayout.js +2 -8
  102. package/src/scrollbar/Scrollbar.less +8 -1
  103. package/src/scrollbar/scrollbars.js +26 -4
  104. package/src/session/Session.js +8 -5
  105. package/src/style/colors-dark.less +17 -10
  106. package/src/style/colors.less +11 -3
  107. package/src/style/fonts.less +10 -1
  108. package/src/style/mixins.less +16 -12
  109. package/src/style/sizes-dark.less +4 -1
  110. package/src/style/sizes.less +17 -9
  111. package/src/table/Table.js +62 -48
  112. package/src/table/Table.less +50 -20
  113. package/src/table/TableAdapter.js +9 -12
  114. package/src/table/TableHeader.js +10 -8
  115. package/src/table/TableHeader.less +1 -0
  116. package/src/table/TableHeaderMenu.js +3 -1
  117. package/src/table/TableHeaderMenu.less +7 -2
  118. package/src/table/TableHeaderMenuButton.js +2 -2
  119. package/src/table/TableLayout.js +6 -0
  120. package/src/table/columns/BooleanColumn.js +2 -2
  121. package/src/table/columns/Column.js +10 -7
  122. package/src/table/editor/CellEditorPopup.js +29 -15
  123. package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -0
  124. package/src/table/keystrokes/TableCopyKeyStroke.js +1 -0
  125. package/src/table/keystrokes/TableNavigationCollapseKeyStroke.js +2 -2
  126. package/src/table/keystrokes/TableNavigationEndKeyStroke.js +2 -2
  127. package/src/table/keystrokes/TableNavigationExpandKeyStroke.js +2 -2
  128. package/src/table/keystrokes/TableNavigationHomeKeyStroke.js +2 -2
  129. package/src/table/keystrokes/TableNavigationPageDownKeyStroke.js +2 -2
  130. package/src/table/keystrokes/TableNavigationPageUpKeyStroke.js +2 -2
  131. package/src/table/keystrokes/TableNavigationUpKeyStroke.js +2 -2
  132. package/src/table/keystrokes/TableRefreshKeyStroke.js +2 -2
  133. package/src/table/keystrokes/TableSelectAllKeyStroke.js +3 -2
  134. package/src/table/keystrokes/TableStartCellEditKeyStroke.js +2 -2
  135. package/src/testing/index.js +1 -0
  136. package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
  137. package/src/tile/TileGrid.js +10 -12
  138. package/src/tile/TileGridLayout.js +2 -2
  139. package/src/tile/accordion/TileAccordion.js +16 -1
  140. package/src/tile/fields/FormFieldTile.less +18 -11
  141. package/src/tile/fields/tablefield/TileTableField.less +19 -2
  142. package/src/tile/keystrokes/TileGridSelectKeyStroke.js +3 -2
  143. package/src/timepicker/TimePickerTouchPopup.js +8 -0
  144. package/src/tree/CompactTree.less +1 -1
  145. package/src/tree/Tree.js +4 -4
  146. package/src/tree/Tree.less +13 -5
  147. package/src/tree/keystrokes/AbstractTreeNavigationKeyStroke.js +1 -0
  148. package/src/tree/keystrokes/TreeCollapseAllKeyStroke.js +2 -2
  149. package/src/tree/keystrokes/TreeExpandOrDrillDownKeyStroke.js +2 -2
  150. package/src/tree/keystrokes/TreeNavigationDownKeyStroke.js +2 -2
  151. package/src/tree/keystrokes/TreeNavigationEndKeyStroke.js +2 -2
  152. package/src/tree/keystrokes/TreeNavigationUpKeyStroke.js +2 -2
  153. package/src/util/Device.js +4 -4
  154. package/src/util/arrays.js +44 -2
  155. package/src/util/objects.js +4 -1
  156. package/src/widget/Widget.js +17 -7
@@ -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
@@ -70,14 +70,12 @@
70
70
 
71
71
  &.left {
72
72
  visibility: hidden;
73
- left: 0;
74
- 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;
75
74
  }
76
75
 
77
76
  &.right {
78
77
  visibility: hidden;
79
- right: 0;
80
- 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;
81
79
  }
82
80
  }
83
81
  }
@@ -132,15 +130,21 @@
132
130
  }
133
131
 
134
132
  @keyframes show-view-tab-left-edge {
135
- to {
133
+ 0% {
136
134
  visibility: visible;
137
- transform: translateX(-24px);
135
+ left: -5px;
136
+ }
137
+ 100% {
138
+ left: -12px;
138
139
  }
139
140
  }
140
141
 
141
142
  @keyframes show-view-tab-right-edge {
142
- to {
143
+ 0% {
143
144
  visibility: visible;
144
- transform: translateX(24px);
145
+ right: -5px;
146
+ }
147
+ 100% {
148
+ right: -12px;
145
149
  }
146
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
  /**
@@ -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
  /**