@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.
- package/dist/eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js +2 -0
- package/dist/eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js.map +1 -0
- package/dist/eclipse-scout-core-theme-74b63e0d57bed407a729.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark-b82aea152f416e38ce7f.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark.css +153 -52
- package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
- package/dist/eclipse-scout-core-theme.css +153 -52
- package/dist/eclipse-scout-core-theme.css.map +1 -1
- package/dist/eclipse-scout-core.js +785 -564
- package/dist/eclipse-scout-core.js.map +1 -1
- package/dist/file-list +4 -4
- package/package.json +2 -2
- package/src/ErrorHandler.js +66 -28
- package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
- package/src/box/Box.less +10 -6
- package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
- package/src/checkbox/CheckBox.less +3 -1
- package/src/datepicker/DatePickerTouchPopup.js +8 -0
- package/src/desktop/DisableBrowserF5ReloadKeyStroke.js +1 -0
- package/src/desktop/bench/DesktopTabSelectKeyStroke.js +2 -1
- package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
- package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
- package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
- package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
- package/src/filechooser/FileChooser.js +1 -1
- package/src/filechooser/FileChooser.less +15 -10
- package/src/focus/FocusContext.js +11 -8
- package/src/focus/FocusManager.js +24 -5
- package/src/form/fields/LookupBox.js +3 -1
- package/src/form/fields/LookupBox.less +28 -2
- package/src/form/fields/TextFieldIcon.less +2 -2
- package/src/form/fields/ValueField.js +11 -2
- package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +10 -4
- package/src/form/fields/button/ButtonKeyStroke.js +0 -3
- package/src/form/fields/datefield/DateField.js +31 -47
- package/src/form/fields/filechooserfield/FileChooserFieldBrowseKeyStroke.js +1 -3
- package/src/form/fields/filechooserfield/FileChooserFieldDeleteKeyStroke.js +1 -3
- package/src/form/fields/groupbox/GroupBox.js +1 -0
- package/src/form/fields/listbox/ListBox.js +5 -4
- package/src/form/fields/lookupfield/lookupField.js +6 -5
- package/src/form/fields/smartfield/ProposalField.js +2 -1
- package/src/form/fields/smartfield/ProposalTreeNode.js +4 -8
- package/src/form/fields/smartfield/SmartField.js +4 -20
- package/src/form/fields/smartfield/SmartField.less +24 -11
- package/src/form/fields/splitbox/SplitBoxCollapseKeyStroke.js +1 -0
- package/src/form/fields/splitbox/SplitBoxFirstCollapseKeyStroke.js +1 -0
- package/src/form/fields/splitbox/SplitBoxSecondCollapseKeyStroke.js +1 -0
- package/src/form/fields/tabbox/TabAreaLeftKeyStroke.js +2 -0
- package/src/form/fields/tabbox/TabAreaRightKeyStroke.js +2 -0
- package/src/form/fields/tabbox/TabBox.js +4 -0
- package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
- package/src/form/fields/tabbox/TabItem.js +4 -0
- package/src/form/fields/treebox/TreeBox.js +6 -5
- package/src/index.js +1 -1
- package/src/jquery/jquery-scout.js +12 -0
- package/src/keystroke/CloseKeyStroke.js +1 -0
- package/src/keystroke/ContextMenuKeyStroke.js +1 -0
- package/src/keystroke/FocusFilterFieldKeyStroke.js +1 -0
- package/src/keystroke/KeyStroke.js +11 -3
- package/src/keystroke/TabItemKeyStroke.js +8 -5
- package/src/logging/logging.js +16 -8
- package/src/login/LoginBox.js +3 -2
- package/src/login/LoginBox.less +18 -1
- package/src/menu/MenuExecKeyStroke.js +3 -17
- package/src/menu/MenuNavigationKeyStroke.js +1 -0
- package/src/menu/menubar/MenuBarLeftKeyStroke.js +2 -0
- package/src/menu/menubar/MenuBarRightKeyStroke.js +2 -0
- package/src/messagebox/MessageBox.less +17 -17
- package/src/planner/Planner.js +2 -0
- package/src/session/Session.js +8 -5
- package/src/style/fonts.less +5 -1
- package/src/style/sizes.less +14 -5
- package/src/table/Table.js +25 -19
- package/src/table/Table.less +14 -7
- package/src/table/TableAdapter.js +9 -12
- package/src/table/TableHeaderMenuButton.js +2 -2
- package/src/table/TableLayout.js +6 -0
- package/src/table/columns/Column.js +8 -5
- package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
- package/src/table/editor/CellEditorPopup.js +21 -14
- package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -0
- package/src/table/keystrokes/TableCopyKeyStroke.js +1 -0
- package/src/table/keystrokes/TableNavigationCollapseKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationEndKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationExpandKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationHomeKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationPageDownKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationPageUpKeyStroke.js +2 -2
- package/src/table/keystrokes/TableNavigationUpKeyStroke.js +2 -2
- package/src/table/keystrokes/TableRefreshKeyStroke.js +2 -2
- package/src/table/keystrokes/TableSelectAllKeyStroke.js +3 -2
- package/src/table/keystrokes/TableStartCellEditKeyStroke.js +2 -2
- package/src/testing/index.js +1 -0
- package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
- package/src/tile/TileGrid.js +9 -11
- package/src/tile/fields/tablefield/TileTableField.less +19 -2
- package/src/tile/keystrokes/TileGridSelectKeyStroke.js +3 -2
- package/src/timepicker/TimePickerTouchPopup.js +8 -0
- package/src/tree/Tree.js +8 -4
- package/src/tree/Tree.less +12 -2
- package/src/tree/keystrokes/AbstractTreeNavigationKeyStroke.js +1 -0
- package/src/tree/keystrokes/TreeCollapseAllKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeExpandOrDrillDownKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeNavigationDownKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeNavigationEndKeyStroke.js +2 -2
- package/src/tree/keystrokes/TreeNavigationUpKeyStroke.js +2 -2
- package/src/util/Device.js +4 -4
- package/src/util/arrays.js +20 -0
- package/src/widget/Widget.js +6 -4
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js +0 -2
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js.map +0 -1
- package/dist/eclipse-scout-core-theme-6b2fef56e9e49231a49c.min.css +0 -1
- package/dist/eclipse-scout-core-theme-dark-d2bb274dd42f132bfca0.min.css +0 -1
package/dist/file-list
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
eclipse-scout-core-
|
|
2
|
-
eclipse-scout-core-
|
|
3
|
-
eclipse-scout-core-theme-
|
|
4
|
-
eclipse-scout-core-theme-dark-
|
|
1
|
+
eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js
|
|
2
|
+
eclipse-scout-core-af5ff6abad5f1ff9fd18.min.js.map
|
|
3
|
+
eclipse-scout-core-theme-74b63e0d57bed407a729.min.css
|
|
4
|
+
eclipse-scout-core-theme-dark-b82aea152f416e38ce7f.min.css
|
|
5
5
|
eclipse-scout-core-theme-dark.css
|
|
6
6
|
eclipse-scout-core-theme-dark.css.map
|
|
7
7
|
eclipse-scout-core-theme.css
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-scout/core",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.12",
|
|
4
4
|
"description": "Eclipse Scout runtime",
|
|
5
5
|
"author": "BSI Business Systems Integration AG",
|
|
6
6
|
"homepage": "https://www.eclipse.org/scout",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"src"
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@eclipse-scout/cli": "22.0.
|
|
29
|
+
"@eclipse-scout/cli": "22.0.12",
|
|
30
30
|
"@eclipse-scout/releng": "^22.0.0",
|
|
31
31
|
"jasmine-core": "3.10.1",
|
|
32
32
|
"jasmine-ajax": "4.0.0",
|
package/src/ErrorHandler.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {AjaxError, App, arrays, icons, NullLogger, scout, strings} from './index';
|
|
11
|
+
import {AjaxError, App, arrays, icons, logging, NullLogger, scout, strings} from './index';
|
|
12
12
|
import $ from 'jquery';
|
|
13
13
|
import sourcemappedStacktrace from 'sourcemapped-stacktrace';
|
|
14
14
|
|
|
@@ -37,25 +37,41 @@ export default class ErrorHandler {
|
|
|
37
37
|
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
|
|
38
38
|
_onWindowError(errorMessage, fileName, lineNumber, columnNumber, error) {
|
|
39
39
|
try {
|
|
40
|
+
if (this._isIgnorableScriptError(errorMessage, fileName, lineNumber, columnNumber, error)) {
|
|
41
|
+
this.handleErrorInfo({
|
|
42
|
+
log: `Ignoring error. Message: ${errorMessage}`,
|
|
43
|
+
level: logging.Level.INFO
|
|
44
|
+
});
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
40
47
|
if (error instanceof Error) {
|
|
41
48
|
this.handle(error)
|
|
42
49
|
.catch(error => {
|
|
43
50
|
console.error('Error in global JavaScript error handler', error);
|
|
44
51
|
});
|
|
45
|
-
|
|
46
|
-
let code = 'J00';
|
|
47
|
-
let log = errorMessage + ' at ' + fileName + ':' + lineNumber + '\n(' + 'Code ' + code + ')';
|
|
48
|
-
this.handleErrorInfo({
|
|
49
|
-
code: code,
|
|
50
|
-
message: errorMessage,
|
|
51
|
-
log: log
|
|
52
|
-
});
|
|
52
|
+
return;
|
|
53
53
|
}
|
|
54
|
+
let code = 'J00';
|
|
55
|
+
let log = errorMessage + ' at ' + fileName + ':' + lineNumber + '\n(' + 'Code ' + code + ')';
|
|
56
|
+
this.handleErrorInfo({
|
|
57
|
+
code: code,
|
|
58
|
+
message: errorMessage,
|
|
59
|
+
log: log
|
|
60
|
+
});
|
|
54
61
|
} catch (err) {
|
|
55
62
|
throw new Error('Error in global JavaScript error handler: ' + err.message + ' (original error: ' + errorMessage + ' at ' + fileName + ':' + lineNumber + ')');
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
_isIgnorableScriptError(message, fileName, lineNumber, columnNumber, error) {
|
|
67
|
+
// Ignore errors caused by scripts from a different origin.
|
|
68
|
+
// Example: Firefox on iOS throws an error, probably caused by an internal Firefox script.
|
|
69
|
+
// The error does not affect the application and cannot be prevented by the app either since we don't know what script it is and what it does.
|
|
70
|
+
// In that case the error must no be shown to the user, instead just log it silently.
|
|
71
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
|
|
72
|
+
return message && message.toLowerCase().indexOf('script error') > -1 && !fileName && !lineNumber && !columnNumber && !error;
|
|
73
|
+
}
|
|
74
|
+
|
|
59
75
|
/**
|
|
60
76
|
* Handles unexpected JavaScript errors. The arguments are first analyzed and then handled.
|
|
61
77
|
*
|
|
@@ -240,22 +256,9 @@ export default class ErrorHandler {
|
|
|
240
256
|
* - If there is a scout session and the flag "sendError" is set, the error is sent to the UI server.
|
|
241
257
|
*/
|
|
242
258
|
handleErrorInfo(errorInfo) {
|
|
259
|
+
errorInfo.level = scout.nvl(errorInfo.level, logging.Level.ERROR);
|
|
243
260
|
if (this.logError && errorInfo.log) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
// Note: when the null-logger is active it has already written the error to the console
|
|
247
|
-
// when the $.log.error function has been called above, so we don't have to log again here.
|
|
248
|
-
let writeToConsole = ErrorHandler.CONSOLE_OUTPUT;
|
|
249
|
-
if ($.log instanceof NullLogger) {
|
|
250
|
-
writeToConsole = false;
|
|
251
|
-
}
|
|
252
|
-
if (writeToConsole && window && window.console) {
|
|
253
|
-
if (window.console.error) {
|
|
254
|
-
window.console.error(errorInfo.log);
|
|
255
|
-
} else if (window.console.log) {
|
|
256
|
-
window.console.log(errorInfo.log);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
261
|
+
this._logErrorInfo(errorInfo);
|
|
259
262
|
}
|
|
260
263
|
|
|
261
264
|
// Note: The error handler is installed globally and we cannot tell in which scout session the error happened.
|
|
@@ -263,16 +266,51 @@ export default class ErrorHandler {
|
|
|
263
266
|
// multi-session-case (portlet), but currently there is no other way. Besides, this feature is not in use yet.
|
|
264
267
|
if (App.get().sessions.length > 0) {
|
|
265
268
|
let session = App.get().sessions[0];
|
|
266
|
-
if (this.displayError) {
|
|
269
|
+
if (this.displayError && errorInfo.level === logging.Level.ERROR) {
|
|
267
270
|
this._showMessageBox(session, errorInfo.message, errorInfo.code, errorInfo.log);
|
|
268
271
|
}
|
|
269
272
|
if (this.sendError) {
|
|
270
|
-
this._sendErrorMessage(session, errorInfo.log);
|
|
273
|
+
this._sendErrorMessage(session, errorInfo.log, errorInfo.level);
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
276
|
return errorInfo;
|
|
274
277
|
}
|
|
275
278
|
|
|
279
|
+
_logErrorInfo(errorInfo) {
|
|
280
|
+
switch (errorInfo.level) {
|
|
281
|
+
case logging.Level.TRACE:
|
|
282
|
+
$.log.trace(errorInfo.log);
|
|
283
|
+
break;
|
|
284
|
+
case logging.Level.DEBUG:
|
|
285
|
+
$.log.debug(errorInfo.log);
|
|
286
|
+
break;
|
|
287
|
+
case logging.Level.INFO:
|
|
288
|
+
$.log.info(errorInfo.log);
|
|
289
|
+
break;
|
|
290
|
+
case logging.Level.WARN:
|
|
291
|
+
$.log.warn(errorInfo.log);
|
|
292
|
+
break;
|
|
293
|
+
default:
|
|
294
|
+
$.log.error(errorInfo.log);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Note: when the null-logger is active it has already written the error to the console
|
|
298
|
+
// when the $.log.error function has been called above, so we don't have to log again here.
|
|
299
|
+
let writeToConsole = ErrorHandler.CONSOLE_OUTPUT;
|
|
300
|
+
if ($.log instanceof NullLogger) {
|
|
301
|
+
writeToConsole = false;
|
|
302
|
+
}
|
|
303
|
+
if (writeToConsole && window && window.console) {
|
|
304
|
+
if (errorInfo.level === logging.Level.ERROR && window.console.error) {
|
|
305
|
+
window.console.error(errorInfo.log);
|
|
306
|
+
} else if (errorInfo.level === logging.Level.WARN && window.console.warn) {
|
|
307
|
+
window.console.warn(errorInfo.log);
|
|
308
|
+
} else if (window.console.log) {
|
|
309
|
+
window.console.log(errorInfo.log);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
276
314
|
/**
|
|
277
315
|
* Generate a "cool looking" error code from the JS error object, that
|
|
278
316
|
* does not reveal too much technical information, but at least indicates
|
|
@@ -325,7 +363,7 @@ export default class ErrorHandler {
|
|
|
325
363
|
session.showFatalMessage(options, errorCode);
|
|
326
364
|
}
|
|
327
365
|
|
|
328
|
-
_sendErrorMessage(session, logMessage) {
|
|
329
|
-
session.sendLogRequest(logMessage);
|
|
366
|
+
_sendErrorMessage(session, logMessage, logLevel) {
|
|
367
|
+
session.sendLogRequest(logMessage, logLevel);
|
|
330
368
|
}
|
|
331
369
|
}
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import {keys, KeyStroke} from '../index';
|
|
12
12
|
|
|
13
|
-
export default class
|
|
13
|
+
export default class ActionExecKeyStroke extends KeyStroke {
|
|
14
14
|
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(menu) {
|
|
16
16
|
super();
|
|
17
|
-
this.field =
|
|
18
|
-
this.which = [keys.
|
|
19
|
-
this.renderingHints.render = true;
|
|
17
|
+
this.field = menu;
|
|
18
|
+
this.which = [keys.SPACE, keys.ENTER];
|
|
20
19
|
this.stopPropagation = true;
|
|
21
20
|
}
|
|
22
21
|
|
package/src/box/Box.less
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* Used for static pages like login, logout, unsupported-browser and noscript section.
|
|
13
13
|
* Note: This box must not depend on javascript because it is used for the noscript section as well.
|
|
14
14
|
*/
|
|
15
|
+
@box-responsive-width: @box-width + 40px;
|
|
16
|
+
|
|
15
17
|
.box {
|
|
16
18
|
display: table;
|
|
17
19
|
position: absolute;
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
text-align: center;
|
|
40
42
|
|
|
41
43
|
& > .logo {
|
|
42
|
-
margin-top:
|
|
44
|
+
margin-top: 4px;
|
|
43
45
|
margin-bottom: 40px;
|
|
44
46
|
max-height: 30px;
|
|
45
47
|
}
|
|
@@ -64,13 +66,14 @@
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
@media (max-width:
|
|
69
|
+
@media (max-width: @box-responsive-width) {
|
|
68
70
|
.box-content {
|
|
69
71
|
& > .header > .logo {
|
|
70
|
-
margin-bottom:
|
|
72
|
+
margin-bottom: 30px;
|
|
73
|
+
margin-top: 0;
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
padding:
|
|
76
|
+
padding: 40px;
|
|
74
77
|
margin-left: 10px;
|
|
75
78
|
margin-right: 10px;
|
|
76
79
|
}
|
|
@@ -80,10 +83,11 @@
|
|
|
80
83
|
.box-content {
|
|
81
84
|
& > .header > .logo {
|
|
82
85
|
margin-bottom: 20px;
|
|
86
|
+
margin-top: 0;
|
|
83
87
|
}
|
|
84
88
|
|
|
85
|
-
padding-top:
|
|
86
|
-
padding-bottom:
|
|
89
|
+
padding-top: 25px;
|
|
90
|
+
padding-bottom: 25px;
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2010-
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
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
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
height: 100%;
|
|
16
16
|
color: @link-color;
|
|
17
17
|
font-size: @font-size-plus;
|
|
18
|
+
vertical-align: top;
|
|
18
19
|
|
|
19
20
|
&.last {
|
|
20
21
|
font-weight: bold;
|
|
@@ -24,10 +25,6 @@
|
|
|
24
25
|
color: @link-hover-color;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
&.first {
|
|
28
|
-
vertical-align: top;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
28
|
&:not(.first)::before {
|
|
32
29
|
#scout.font-icon();
|
|
33
30
|
content: @icon-angle-right-bold;
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
#scout {
|
|
40
40
|
|
|
41
41
|
.checkbox() {
|
|
42
|
+
cursor: pointer;
|
|
42
43
|
position: relative;
|
|
43
44
|
display: inline-block;
|
|
44
45
|
text-align: center;
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
.checkbox-disabled() {
|
|
70
|
+
cursor: default;
|
|
69
71
|
border-color: @check-box-disabled-border-color;
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -94,4 +96,4 @@
|
|
|
94
96
|
background-color: @check-box-checked-disabled-background-color;
|
|
95
97
|
border-color: @check-box-checked-disabled-background-color;
|
|
96
98
|
}
|
|
97
|
-
}
|
|
99
|
+
}
|
|
@@ -33,6 +33,7 @@ export default class DisableBrowserF5ReloadKeyStroke extends KeyStroke {
|
|
|
33
33
|
this.preventDefault = true;
|
|
34
34
|
this.keyStrokeFirePolicy = Action.KeyStrokeFirePolicy.ALWAYS; // ignore glass panes
|
|
35
35
|
this.renderingHints.render = false;
|
|
36
|
+
this.inheritAccessibility = false;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import {keys, RangeKeyStroke} from '../../index';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Composite keystroke to provide a numeric keystroke to select view tabs.
|
|
@@ -35,6 +35,7 @@ export default class DesktopTabSelectKeyStroke extends RangeKeyStroke {
|
|
|
35
35
|
let viewIndex = event.which - keys['1'];
|
|
36
36
|
return this._viewTabs()[viewIndex].$container;
|
|
37
37
|
};
|
|
38
|
+
this.inheritAccessibility = false;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
/**
|
|
@@ -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) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import {
|
|
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) {
|
|
@@ -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
|
|
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-
|
|
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
|
-
*
|
|
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
|
|
@@ -100,14 +100,19 @@
|
|
|
100
100
|
|
|
101
101
|
@media (max-width: @filechooser-max-width) {
|
|
102
102
|
.file-chooser {
|
|
103
|
-
/*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
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
|
|
171
|
-
* @param filter
|
|
172
|
-
* filter
|
|
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]
|
|
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]
|
|
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
|
|
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,
|
|
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,
|
|
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);
|
|
@@ -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
|
-
*
|
|
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
|
|
@@ -67,6 +67,8 @@ export default class LookupBox extends ValueField {
|
|
|
67
67
|
this.$field.addDeviceClass();
|
|
68
68
|
this.$field.addClass('structure');
|
|
69
69
|
this._renderFilterBox();
|
|
70
|
+
|
|
71
|
+
this.$container.css('--inactive-lookup-row-suffix-text', `'${this.session.text('InactiveState')}'`);
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
_renderFilterBox() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
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:
|
|
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 (
|
|
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
|
-
|
|
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
|
|