@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
@@ -1,5 +1,5 @@
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
@@ -34,14 +34,14 @@ export default class TabBoxHeaderLayout extends AbstractLayout {
34
34
  this.tabBoxHeader.invalidateLayoutTree();
35
35
  }
36
36
 
37
- layout($container) { //
37
+ layout($container) {
38
38
  let htmlContainer = HtmlComponent.get($container),
39
39
  tabArea = this.tabBoxHeader.tabArea,
40
40
  tabAreaMargins = tabArea.htmlComp.margins(),
41
41
  tabAreaPrefSize,
42
42
  menuBar = this.tabBoxHeader.menuBar,
43
43
  menuBarMargins = menuBar.htmlComp.margins(),
44
- menuBarMinumumSize,
44
+ menuBarMinimumSize,
45
45
  $status = this.tabBoxHeader.tabBox.$status,
46
46
  statusSizeLarge = new Dimension(),
47
47
  insets = htmlContainer.insets(),
@@ -49,7 +49,7 @@ export default class TabBoxHeaderLayout extends AbstractLayout {
49
49
  exact: true
50
50
  }).subtract(htmlContainer.insets());
51
51
 
52
- menuBarMinumumSize = menuBar.htmlComp.prefSize({
52
+ menuBarMinimumSize = menuBar.htmlComp.prefSize({
53
53
  widthHint: 0
54
54
  });
55
55
 
@@ -59,7 +59,7 @@ export default class TabBoxHeaderLayout extends AbstractLayout {
59
59
  }
60
60
 
61
61
  tabAreaPrefSize = tabArea.htmlComp.prefSize({
62
- widthHint: containerSize.width - menuBarMinumumSize.width - menuBarMargins.horizontal() - statusSizeLarge.width,
62
+ widthHint: containerSize.width - menuBarMinimumSize.width - menuBarMargins.horizontal() - statusSizeLarge.width,
63
63
  exact: false
64
64
  });
65
65
 
@@ -74,4 +74,8 @@ export default class TabItem extends GroupBox {
74
74
  this.parent.setSelectedTab(this);
75
75
  }
76
76
  }
77
+
78
+ getTab() {
79
+ return this.parent.getTabForItem(this);
80
+ }
77
81
  }
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
6
+ * https://www.eclipse.org/legal/epl-v10.html
7
7
  *
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
@@ -193,12 +193,13 @@ export default class TreeBox extends LookupBox {
193
193
  if (lookupRow.enabled === false) {
194
194
  node.enabled = false;
195
195
  }
196
- if (lookupRow.active === false) {
197
- node.active = false;
198
- }
199
196
  if (lookupRow.cssClass) {
200
197
  node.cssClass = lookupRow.cssClass;
201
198
  }
199
+ if (lookupRow.active === false) {
200
+ node.active = false;
201
+ node.cssClass = (node.cssClass ? (node.cssClass + ' ') : '') + 'inactive';
202
+ }
202
203
 
203
204
  return node;
204
205
  }
@@ -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
@@ -8,7 +8,7 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
- import {scout, Widget} from '../index';
11
+ import {Widget} from '../index';
12
12
  import $ from 'jquery';
13
13
 
14
14
  export default class GlassPane extends Widget {
@@ -24,7 +24,7 @@ export default class GlassPane extends Widget {
24
24
 
25
25
  this.$parent.addClass('glasspane-parent');
26
26
  let cssPosition = this.$parent.css('position');
27
- if (!scout.isOneOf(cssPosition, 'relative', 'absolute')) {
27
+ if (cssPosition === 'static') {
28
28
  this.$parent.css('position', 'relative');
29
29
  }
30
30
 
@@ -44,7 +44,7 @@
44
44
  #scout.overflow-ellipsis-nowrap();
45
45
 
46
46
  .group-header:focus > & {
47
- color: @active-color;
47
+ color: @focus-color;
48
48
  text-decoration: underline;
49
49
  }
50
50
  }
package/src/index.js CHANGED
@@ -181,6 +181,7 @@ export {default as tooltips} from './tooltip/tooltips';
181
181
  export {default as WidgetTooltip} from './tooltip/WidgetTooltip';
182
182
  export {default as Action} from './action/Action';
183
183
  export {default as ActionAdapter} from './action/ActionAdapter';
184
+ export {default as ActionExecKeyStroke} from './action/ActionExecKeyStroke';
184
185
  export {default as ActionKeyStroke} from './action/ActionKeyStroke';
185
186
  export {default as Box} from './box/Box';
186
187
  export {default as Label} from './label/Label';
@@ -308,7 +309,6 @@ export {default as TableHeaderMenu} from './table/TableHeaderMenu';
308
309
  export {default as TableHeaderMenuLayout} from './table/TableHeaderMenuLayout';
309
310
  export {default as TableHeaderMenuGroup} from './table/TableHeaderMenuGroup';
310
311
  export {default as TableHeaderMenuButton} from './table/TableHeaderMenuButton';
311
- export {default as TableHeaderMenuButtonKeyStroke} from './table/TableHeaderMenuButtonKeyStroke';
312
312
  export {default as TableLayout} from './table/TableLayout';
313
313
  export {default as TableSelectionHandler} from './table/TableSelectionHandler';
314
314
  export {default as TableTileGridMediator} from './table/TableTileGridMediator';
package/src/index.less CHANGED
@@ -144,5 +144,6 @@
144
144
  @import "tile/fields/tablefield/TileTableField";
145
145
  @import "widget/FilterSupport";
146
146
  @import "login/LoginBox";
147
+ @import "form/fields/breadcrumbbarfield/BreadcrumbBarField";
147
148
  @import "breadcrumbbar/BreadcrumbBar";
148
149
  @import "breadcrumbbar/BreadcrumbItem";
@@ -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
@@ -834,10 +834,22 @@ $.fn.isDisplayNone = function() {
834
834
  return this.css('display') === 'none';
835
835
  };
836
836
 
837
+ /**
838
+ * @param {boolean} tabbable true, to make the component tabbable. False, to make it neither tabbable nor focusable.
839
+ * @returns {$}
840
+ */
837
841
  $.fn.setTabbable = function(tabbable) {
838
842
  return this.attr('tabIndex', tabbable ? 0 : null);
839
843
  };
840
844
 
845
+ /**
846
+ * @param {boolean} tabbable true, to make the component tabbable. False, to make it not tabbable but focusable, so the user can focus it with the mouse but not with the keyboard.
847
+ * @returns {$}
848
+ */
849
+ $.fn.setTabbableOrFocusable = function(tabbable) {
850
+ return this.attr('tabIndex', tabbable ? 0 : -1);
851
+ };
852
+
841
853
  $.fn.isTabbable = function() {
842
854
  return this.attr('tabIndex') >= 0;
843
855
  };
@@ -1049,16 +1061,17 @@ $.fn.oneAnimationEnd = function(handler) {
1049
1061
  if (!handler) {
1050
1062
  return this;
1051
1063
  }
1052
- return this.on('animationend webkitAnimationEnd', event => {
1064
+ let oneHandler = event => {
1053
1065
  if (event.target !== this[0]) {
1054
1066
  // Ignore events that bubble up from child elements
1055
1067
  return;
1056
1068
  }
1057
1069
  // Unregister listener to implement "one" semantics
1058
- this.off(event);
1070
+ this.off('animationend webkitAnimationEnd', oneHandler);
1059
1071
  // Notify actual event handler
1060
1072
  handler(event);
1061
- });
1073
+ };
1074
+ return this.on('animationend webkitAnimationEnd', oneHandler);
1062
1075
  };
1063
1076
 
1064
1077
  $.fn.hasAnimationClass = function() {
@@ -22,6 +22,7 @@ export default class CloseKeyStroke extends KeyStroke {
22
22
  render: !!$drawingArea,
23
23
  $drawingArea: $drawingArea
24
24
  };
25
+ this.inheritAccessibility = false;
25
26
  }
26
27
 
27
28
  handle(event) {
@@ -24,6 +24,7 @@ export default class ContextMenuKeyStroke extends KeyStroke {
24
24
  this.ctrl = false;
25
25
  this.shift = false;
26
26
  this.stopPropagation = true;
27
+ this.inheritAccessibility = false;
27
28
  }
28
29
 
29
30
  /**
@@ -30,6 +30,7 @@ export default class FocusFilterFieldKeyStroke extends KeyStroke {
30
30
  this.preventDefault = false; // false so that the key is inserted into the search field.
31
31
  this.keyStrokeMode = KeyStroke.Mode.DOWN;
32
32
  this.stopPropagation = true;
33
+ this.inheritAccessibility = false;
33
34
  }
34
35
 
35
36
  /**
@@ -18,6 +18,7 @@ export default class KeyStroke {
18
18
 
19
19
  this.which = []; // keys which this keystroke is bound to. Typically, this is a single key, but may be multiple keys if handling the same action (e.g. ENTER and SPACE on a button).
20
20
  this.ctrl = false;
21
+ this.inheritAccessibility = true;
21
22
  this.alt = false;
22
23
  this.shift = false;
23
24
  this.preventDefault = true;
@@ -138,9 +139,16 @@ export default class KeyStroke {
138
139
  if (this.field.visible !== undefined && !this.field.visible) {
139
140
  return false;
140
141
  }
141
- // Check enabled state
142
- if (this.field.enabled !== undefined && !this.field.enabled) {
143
- return false;
142
+ // Check enabled state (if inheritAccessibility is true)
143
+ if (!this.inheritAccessibility) {
144
+ return true;
145
+ }
146
+ if (this.field.enabledComputed !== undefined) {
147
+ return this.field.enabledComputed;
148
+ }
149
+ if (this.field.enabled !== undefined) {
150
+ // This should actually not happen because this.field should always be a hypothetical case if this.field is not a widget
151
+ return this.field.enabled;
144
152
  }
145
153
  }
146
154
  return true;
@@ -19,15 +19,18 @@ export default class TabItemKeyStroke extends KeyStroke {
19
19
 
20
20
  this.renderingHints.offset = 16;
21
21
  this.renderingHints.hAlign = HAlign.RIGHT;
22
- this.renderingHints.$drawingArea = function($drawingArea, event) {
23
- return this.field.$tabContainer;
24
- }.bind(this);
22
+ this.renderingHints.render = () => {
23
+ let tab = this.field.getTab();
24
+ return tab && tab.rendered;
25
+ };
26
+ this.renderingHints.$drawingArea = ($drawingArea, event) => this.field.getTab().$container;
27
+ this.inheritAccessibility = false;
25
28
  }
26
29
 
27
30
  /**
28
- * @override KeyStroke.js
31
+ * @override
29
32
  */
30
33
  handle(event) {
31
- this.field.parent.setSelectedTab(this.field);
34
+ this.field.select();
32
35
  }
33
36
  }
@@ -12,9 +12,16 @@ import {NullLogger, scout, URL} from '../index';
12
12
  import $ from 'jquery';
13
13
  import strings from '../util/strings';
14
14
 
15
- /* global log4javascript */
15
+ const Level = {
16
+ TRACE: 'trace',
17
+ DEBUG: 'debug',
18
+ INFO: 'info',
19
+ WARN: 'warn',
20
+ ERROR: 'error',
21
+ FATAL: 'fatal'
22
+ };
16
23
 
17
- const DEFAULT_LEVEL = 'trace';
24
+ const DEFAULT_LEVEL = Level.TRACE;
18
25
  let initialized = false;
19
26
  let _appendersToAdd = [];
20
27
  let showStackTraces = true;
@@ -85,17 +92,17 @@ export function parseLevel(level) {
85
92
  }
86
93
  level = level.toLowerCase();
87
94
  switch (level) {
88
- case 'trace':
95
+ case Level.TRACE:
89
96
  return log4javascript.Level.TRACE;
90
- case 'debug':
97
+ case Level.DEBUG:
91
98
  return log4javascript.Level.DEBUG;
92
- case 'info':
99
+ case Level.INFO:
93
100
  return log4javascript.Level.INFO;
94
- case 'warn':
101
+ case Level.WARN:
95
102
  return log4javascript.Level.WARN;
96
- case 'error':
103
+ case Level.ERROR:
97
104
  return log4javascript.Level.ERROR;
98
- case 'fatal':
105
+ case Level.FATAL:
99
106
  return log4javascript.Level.FATAL;
100
107
  }
101
108
  }
@@ -115,6 +122,7 @@ export function addAppender(factoryName, options) {
115
122
 
116
123
  export default {
117
124
  DEFAULT_LEVEL,
125
+ Level,
118
126
  addAppender,
119
127
  bootstrap,
120
128
  initLog4Javascript,
@@ -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
@@ -56,6 +56,7 @@ export default class LoginBox extends Box {
56
56
  if (this.messageKey) {
57
57
  this.$message = $('<div>')
58
58
  .attr('id', 'message-box')
59
+ .addClass('message-box')
59
60
  .html(strings.nl2br(this.texts.get(this.messageKey)))
60
61
  .appendTo(this.$form);
61
62
  }
@@ -3,7 +3,7 @@
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
6
+ * https://www.eclipse.org/legal/epl-v10.html
7
7
  *
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
@@ -19,6 +19,11 @@
19
19
 
20
20
  & > .button {
21
21
  margin-top: 16px;
22
+ margin-bottom: 0;
23
+ }
24
+
25
+ & > .message-box {
26
+ margin: 0 20px 12px 20px;
22
27
  }
23
28
 
24
29
  & > input.alternative:-webkit-autofill {
@@ -93,3 +98,15 @@
93
98
  #scout.animation(nop 0.05s);
94
99
  }
95
100
  }
101
+
102
+ @media (max-width: @box-responsive-width) {
103
+ .login-box-content > form {
104
+ & > .message-box,
105
+ & > input,
106
+ & > .button {
107
+ width: 100%;
108
+ margin-left: 0;
109
+ margin-right: 0;
110
+ }
111
+ }
112
+ }
@@ -53,14 +53,21 @@
53
53
  &.selected {
54
54
  background-color: @item-selection-background-color;
55
55
 
56
+ &.has-popup {
57
+ color: @context-menu-item-color;
58
+
59
+ &.disabled {
60
+ color: @menu-item-disabled-color;
61
+ background-color: @item-selection-background-color;
62
+ }
63
+ }
64
+
56
65
  & > .submenu-icon {
57
66
  transform: none;
58
67
  }
59
68
  }
60
69
 
61
70
  &.expanded {
62
- color: @active-color;
63
-
64
71
  & > .submenu-icon {
65
72
  #scout.submenu-icon-open();
66
73
  }
@@ -86,6 +86,7 @@
86
86
 
87
87
  & > .text {
88
88
  #scout.overflow-ellipsis-nowrap();
89
+ margin-top: @text-margin-top;
89
90
  }
90
91
 
91
92
  & > .font-icon {
@@ -8,26 +8,12 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
- import {keys, KeyStroke} from '../index';
11
+ import {ActionExecKeyStroke} from '../index';
12
12
 
13
- export default class MenuExecKeyStroke extends KeyStroke {
13
+ export default class MenuExecKeyStroke extends ActionExecKeyStroke {
14
14
 
15
15
  constructor(menu) {
16
- super();
17
- this.field = menu;
18
- this.which = [keys.SPACE, keys.ENTER];
19
- this.stopPropagation = true;
20
-
16
+ super(menu);
21
17
  this.renderingHints.offset = 16;
22
- this.renderingHints.$drawingArea = function($drawingArea, event) {
23
- return this.field.$container;
24
- }.bind(this);
25
- }
26
-
27
- /**
28
- * @override KeyStroke.js
29
- */
30
- handle(event) {
31
- this.field.doAction();
32
18
  }
33
19
  }
@@ -15,6 +15,7 @@ export default class MenuNavigationKeyStroke extends KeyStroke {
15
15
  constructor(popup) {
16
16
  super();
17
17
  this.field = popup;
18
+ this.inheritAccessibility = false;
18
19
  }
19
20
 
20
21
  _accept(event) {
@@ -12,6 +12,7 @@ import {keys, KeyStroke} from '../../index';
12
12
 
13
13
  export default class MenuBarLeftKeyStroke extends KeyStroke {
14
14
 
15
+ // noinspection DuplicatedCode
15
16
  constructor(menuBar) {
16
17
  super();
17
18
  this.field = menuBar;
@@ -19,6 +20,7 @@ export default class MenuBarLeftKeyStroke extends KeyStroke {
19
20
  this.renderingHints.render = false;
20
21
  this.stopPropagation = true;
21
22
  this.keyStrokeMode = KeyStroke.Mode.DOWN;
23
+ this.inheritAccessibility = false;
22
24
  }
23
25
 
24
26
  handle(event) {
@@ -12,6 +12,7 @@ import {keys, KeyStroke} from '../../index';
12
12
 
13
13
  export default class MenuBarRightKeyStroke extends KeyStroke {
14
14
 
15
+ // noinspection DuplicatedCode
15
16
  constructor(menuBar) {
16
17
  super();
17
18
  this.field = menuBar;
@@ -19,6 +20,7 @@ export default class MenuBarRightKeyStroke extends KeyStroke {
19
20
  this.renderingHints.render = false;
20
21
  this.stopPropagation = true;
21
22
  this.keyStrokeMode = KeyStroke.Mode.DOWN;
23
+ this.inheritAccessibility = false;
22
24
  }
23
25
 
24
26
  handle(event) {
@@ -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
@@ -22,6 +22,22 @@
22
22
  border-radius: 0;
23
23
  }
24
24
 
25
+ &.full-width {
26
+ & > .messagebox-buttons {
27
+ padding-left: 10px;
28
+ padding-right: 10px;
29
+
30
+ & > .box-button {
31
+ min-width: 70px; /* less min width for buttons on small screens */
32
+ margin-right: 8px;
33
+
34
+ &:last-child {
35
+ margin-right: 0;
36
+ }
37
+ }
38
+ }
39
+ }
40
+
25
41
  .severity-button(@color, @hover-color: darken(@color, 6%), @active-color: darken(@color, 13%), @focus-color: @focus-box-shadow-color) {
26
42
  & > .box-buttons > .box-button {
27
43
  border-color: @color;
@@ -225,23 +241,7 @@
225
241
 
226
242
  @media (max-width: @messagebox-max-width) {
227
243
  .messagebox {
228
- /* reduce message box width on small screens */
229
- max-width: 330px;
230
244
  /* no need to have a margin on small screens */
231
245
  margin: 0;
232
-
233
- & > .messagebox-buttons {
234
- padding-left: 10px;
235
- padding-right: 10px;
236
-
237
- & > .box-button {
238
- min-width: 70px; /* less min width for buttons on small screens */
239
- margin-right: 8px;
240
-
241
- &:last-child {
242
- margin-right: 0;
243
- }
244
- }
245
- }
246
246
  }
247
247
  }
@@ -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
@@ -9,10 +9,14 @@
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
11
  .mode {
12
- border: @mode-border-width solid @control-border-color;
12
+ --padding-x: @mode-padding-x;
13
+ --padding-y: @mode-padding-y;
14
+ --border-width: @mode-border-width;
15
+
16
+ border: var(--border-width) solid @control-border-color;
13
17
  border-radius: 0;
14
18
  flex: 1 1 0;
15
- padding: @mode-padding-y @mode-padding-x;
19
+ padding: var(--padding-y) var(--padding-x);
16
20
  #scout.overflow-ellipsis();
17
21
 
18
22
  &.first {
@@ -29,12 +33,12 @@
29
33
 
30
34
  &:not(.last):not(.selected) {
31
35
  border-right: none;
32
- padding-right: @mode-padding-x + @mode-border-width; /* account for the missing border, so that text does not jump */
36
+ padding-right: calc(var(--padding-x) + var(--border-width)); /* account for the missing border, so that text does not jump */
33
37
  }
34
38
 
35
39
  &.after-selected {
36
40
  border-left: none;
37
- padding-left: @mode-padding-x + @mode-border-width; /* account for the missing border, so that text does not jump */
41
+ padding-left: calc(var(--padding-x) + var(--border-width)); /* account for the missing border, so that text does not jump */
38
42
  }
39
43
 
40
44
  // override button (the selected mode cannot be clicked. therefore do not show hover and active colors)
@@ -68,28 +72,20 @@
68
72
  }
69
73
 
70
74
  .mode-selector.alternative {
71
- border: @mode-alternative-border-width solid transparent;
72
75
 
73
76
  & > .mode {
77
+ --border-width: 0px;
78
+
74
79
  color: @mode-color;
75
- border: none;
76
80
  background-color: transparent;
77
81
  border-radius: @button-border-radius;
78
82
 
79
- &:not(.last):not(.selected) {
80
- padding-right: @mode-padding-x;
81
- }
82
-
83
- &.after-selected {
84
- padding-left: @mode-padding-x;
85
- }
86
-
87
83
  &:hover {
88
- background-color: rgba(0, 0, 0, 0.05);
84
+ background-color: @mode-alternative-hover-background-color;
89
85
  }
90
86
 
91
87
  &:active {
92
- background-color: rgba(0, 0, 0, 0.1);
88
+ background-color: @mode-alternative-active-background-color;
93
89
  }
94
90
 
95
91
  &.selected {
@@ -120,26 +116,8 @@
120
116
  }
121
117
 
122
118
  .dense .mode-selector {
123
-
124
119
  & > .mode {
125
- padding: @mode-padding-dense;
126
-
127
- &:not(.last):not(.selected) {
128
- padding-right: @mode-padding-dense-x + @mode-border-width; /* account for the missing border, so that text does not jump */
129
- }
130
-
131
- &.after-selected {
132
- padding-left: @mode-padding-dense-x + @mode-border-width; /* account for the missing border, so that text does not jump */
133
- }
134
- }
135
-
136
- &.alternative > .mode {
137
- &:not(.last):not(.selected) {
138
- padding-right: @mode-padding-dense-x;
139
- }
140
-
141
- &.after-selected {
142
- padding-left: @mode-padding-dense-x;
143
- }
120
+ --padding-x: @mode-padding-dense-x;
121
+ --padding-y: @mode-padding-dense-y;
144
122
  }
145
123
  }
@@ -133,7 +133,7 @@ export default class ModeSelector extends Widget {
133
133
  let selectedModePosX = 0, selectedModeWidth = 0;
134
134
  if (this.selectedMode && this.selectedMode.$container) {
135
135
  selectedModePosX = graphics.position(this.selectedMode.$container).x;
136
- selectedModeWidth = graphics.size(this.selectedMode.$container).width;
136
+ selectedModeWidth = graphics.size(this.selectedMode.$container, {exact: true}).width;
137
137
  }
138
138
  this.$slider.cssLeft(selectedModePosX);
139
139
  this.$slider.cssWidth(selectedModeWidth);
@@ -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
@@ -22,6 +22,7 @@
22
22
  &.alternative {
23
23
  background-color: @mode-alternative-background-color;
24
24
  border-radius: @button-border-radius;
25
+ border: @mode-selector-alternative-border-width solid transparent;
25
26
 
26
27
  &:not(.disabled) > .mode-slider {
27
28
  display: block;