@eclipse-scout/core 22.0.0 → 22.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.min.js +2 -0
  2. package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.min.js.map +1 -0
  3. package/dist/eclipse-scout-core-theme-74b63e0d57bed407a729.min.css +1 -0
  4. package/dist/eclipse-scout-core-theme-dark-b82aea152f416e38ce7f.min.css +1 -0
  5. package/dist/eclipse-scout-core-theme-dark.css +597 -422
  6. package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
  7. package/dist/eclipse-scout-core-theme.css +333 -158
  8. package/dist/eclipse-scout-core-theme.css.map +1 -1
  9. package/dist/eclipse-scout-core.js +1196 -811
  10. package/dist/eclipse-scout-core.js.map +1 -1
  11. package/dist/file-list +7 -0
  12. package/dist/locales.json +47126 -0
  13. package/dist/texts.json +1153 -0
  14. package/package.json +2 -2
  15. package/src/App.js +1 -1
  16. package/src/ErrorHandler.js +66 -28
  17. package/src/{table/TableHeaderMenuButtonKeyStroke.js → action/ActionExecKeyStroke.js} +4 -5
  18. package/src/action/Button.less +1 -0
  19. package/src/box/Box.less +12 -8
  20. package/src/breadcrumbbar/BreadcrumbBarLayout.js +2 -2
  21. package/src/breadcrumbbar/BreadcrumbItem.less +3 -6
  22. package/src/calendar/Calendar.js +40 -58
  23. package/src/calendar/Calendar.less +10 -10
  24. package/src/calendar/CalendarLayout.js +3 -1
  25. package/src/checkbox/CheckBox.less +3 -1
  26. package/src/datepicker/DatePicker.less +1 -0
  27. package/src/datepicker/DatePickerTouchPopup.js +8 -0
  28. package/src/desktop/DisableBrowserF5ReloadKeyStroke.js +1 -0
  29. package/src/desktop/bench/DesktopTabSelectKeyStroke.js +2 -1
  30. package/src/desktop/desktoptab/DesktopTab.less +5 -2
  31. package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
  32. package/src/desktop/desktoptab/DesktopTabAreaLayout.js +1 -1
  33. package/src/desktop/desktoptab/DisableBrowserTabSwitchingKeyStroke.js +1 -0
  34. package/src/desktop/navigation/DesktopNavigation.less +4 -0
  35. package/src/desktop/navigation/EnlargeNavigationKeyStroke.js +1 -0
  36. package/src/desktop/navigation/ShrinkNavigationKeyStroke.js +1 -0
  37. package/src/desktop/notification/DesktopNotification.js +11 -4
  38. package/src/desktop/notification/DesktopNotification.less +5 -3
  39. package/src/desktop/outline/Outline.less +4 -4
  40. package/src/desktop/viewbutton/ViewButton.less +18 -9
  41. package/src/desktop/viewbutton/ViewMenuPopupEnterKeyStroke.js +2 -1
  42. package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
  43. package/src/filechooser/FileChooser.js +1 -1
  44. package/src/filechooser/FileChooser.less +16 -11
  45. package/src/focus/FocusContext.js +11 -8
  46. package/src/focus/FocusManager.js +24 -5
  47. package/src/form/Form.less +1 -0
  48. package/src/form/fields/LookupBox.js +5 -2
  49. package/src/form/fields/LookupBox.less +28 -2
  50. package/src/form/fields/TextFieldIcon.less +2 -2
  51. package/src/form/fields/ValueField.js +11 -2
  52. package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +20 -0
  53. package/src/form/fields/button/ButtonKeyStroke.js +0 -3
  54. package/src/form/fields/datefield/DateField.js +31 -47
  55. package/src/form/fields/filechooserfield/FileChooserFieldBrowseKeyStroke.js +1 -3
  56. package/src/form/fields/filechooserfield/FileChooserFieldDeleteKeyStroke.js +1 -3
  57. package/src/form/fields/groupbox/GroupBox.js +14 -9
  58. package/src/form/fields/groupbox/GroupBox.less +1 -0
  59. package/src/form/fields/htmlfield/HtmlField.less +0 -1
  60. package/src/form/fields/listbox/ListBox.js +13 -7
  61. package/src/form/fields/lookupfield/lookupField.js +6 -5
  62. package/src/form/fields/smartfield/ProposalField.js +2 -1
  63. package/src/form/fields/smartfield/ProposalTreeNode.js +4 -8
  64. package/src/form/fields/smartfield/SmartField.js +4 -20
  65. package/src/form/fields/smartfield/SmartField.less +24 -11
  66. package/src/form/fields/splitbox/SplitBoxCollapseKeyStroke.js +1 -0
  67. package/src/form/fields/splitbox/SplitBoxFirstCollapseKeyStroke.js +1 -0
  68. package/src/form/fields/splitbox/SplitBoxSecondCollapseKeyStroke.js +1 -0
  69. package/src/form/fields/tabbox/TabAreaLayout.js +63 -66
  70. package/src/form/fields/tabbox/TabAreaLeftKeyStroke.js +2 -0
  71. package/src/form/fields/tabbox/TabAreaRightKeyStroke.js +2 -0
  72. package/src/form/fields/tabbox/TabBox.js +8 -7
  73. package/src/form/fields/tabbox/TabBox.less +2 -1
  74. package/src/form/fields/tabbox/TabBoxHeader.js +4 -0
  75. package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
  76. package/src/form/fields/tabbox/TabItem.js +4 -0
  77. package/src/form/fields/treebox/TreeBox.js +6 -5
  78. package/src/glasspane/GlassPane.js +3 -3
  79. package/src/group/Group.less +1 -1
  80. package/src/index.js +1 -1
  81. package/src/index.less +1 -0
  82. package/src/jquery/jquery-scout.js +17 -4
  83. package/src/keystroke/CloseKeyStroke.js +1 -0
  84. package/src/keystroke/ContextMenuKeyStroke.js +1 -0
  85. package/src/keystroke/FocusFilterFieldKeyStroke.js +1 -0
  86. package/src/keystroke/KeyStroke.js +11 -3
  87. package/src/keystroke/TabItemKeyStroke.js +8 -5
  88. package/src/logging/logging.js +16 -8
  89. package/src/login/LoginBox.js +3 -2
  90. package/src/login/LoginBox.less +27 -8
  91. package/src/menu/ContextMenuPopup.less +9 -2
  92. package/src/menu/Menu.less +1 -0
  93. package/src/menu/MenuExecKeyStroke.js +3 -17
  94. package/src/menu/MenuNavigationKeyStroke.js +1 -0
  95. package/src/menu/menubar/MenuBarLeftKeyStroke.js +2 -0
  96. package/src/menu/menubar/MenuBarRightKeyStroke.js +2 -0
  97. package/src/messagebox/MessageBox.less +20 -20
  98. package/src/modeselector/Mode.less +15 -37
  99. package/src/modeselector/ModeSelector.js +1 -1
  100. package/src/modeselector/ModeSelector.less +2 -1
  101. package/src/planner/Planner.js +2 -0
  102. package/src/planner/PlannerHeader.less +2 -1
  103. package/src/popup/Popup.js +24 -8
  104. package/src/popup/PopupLayout.js +2 -8
  105. package/src/scrollbar/Scrollbar.less +8 -1
  106. package/src/scrollbar/scrollbars.js +26 -4
  107. package/src/session/Session.js +8 -5
  108. package/src/style/colors-dark.less +25 -11
  109. package/src/style/colors.less +17 -3
  110. package/src/style/fonts.less +10 -1
  111. package/src/style/mixins.less +21 -14
  112. package/src/style/sizes-dark.less +4 -1
  113. package/src/style/sizes.less +17 -9
  114. package/src/table/Table.js +63 -49
  115. package/src/table/Table.less +50 -20
  116. package/src/table/TableAdapter.js +9 -12
  117. package/src/table/TableHeader.js +10 -8
  118. package/src/table/TableHeader.less +1 -0
  119. package/src/table/TableHeaderMenu.js +3 -1
  120. package/src/table/TableHeaderMenu.less +7 -2
  121. package/src/table/TableHeaderMenuButton.js +2 -2
  122. package/src/table/TableLayout.js +6 -0
  123. package/src/table/columns/BooleanColumn.js +2 -2
  124. package/src/table/columns/Column.js +10 -7
  125. package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
  126. package/src/table/editor/CellEditorPopup.js +29 -15
  127. package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -0
  128. package/src/table/keystrokes/TableCopyKeyStroke.js +1 -0
  129. package/src/table/keystrokes/TableNavigationCollapseKeyStroke.js +2 -2
  130. package/src/table/keystrokes/TableNavigationEndKeyStroke.js +2 -2
  131. package/src/table/keystrokes/TableNavigationExpandKeyStroke.js +2 -2
  132. package/src/table/keystrokes/TableNavigationHomeKeyStroke.js +2 -2
  133. package/src/table/keystrokes/TableNavigationPageDownKeyStroke.js +2 -2
  134. package/src/table/keystrokes/TableNavigationPageUpKeyStroke.js +2 -2
  135. package/src/table/keystrokes/TableNavigationUpKeyStroke.js +2 -2
  136. package/src/table/keystrokes/TableRefreshKeyStroke.js +2 -2
  137. package/src/table/keystrokes/TableSelectAllKeyStroke.js +3 -2
  138. package/src/table/keystrokes/TableStartCellEditKeyStroke.js +2 -2
  139. package/src/tagbar/TagBarOverflowPopupLayout.js +1 -1
  140. package/src/testing/index.js +1 -0
  141. package/src/testing/lookup/AbortableMicrotaskStaticLookupCall.js +50 -0
  142. package/src/tile/TileGrid.js +10 -12
  143. package/src/tile/TileGridLayout.js +2 -2
  144. package/src/tile/accordion/TileAccordion.js +16 -1
  145. package/src/tile/fields/FormFieldTile.less +18 -11
  146. package/src/tile/fields/button/ButtonTile.js +1 -1
  147. package/src/tile/fields/tablefield/TileTableField.less +19 -2
  148. package/src/tile/keystrokes/TileGridSelectKeyStroke.js +3 -2
  149. package/src/timepicker/TimePickerTouchPopup.js +8 -0
  150. package/src/tree/CompactTree.less +1 -1
  151. package/src/tree/LazyNodeFilter.js +4 -2
  152. package/src/tree/Tree.js +7 -5
  153. package/src/tree/Tree.less +13 -5
  154. package/src/tree/keystrokes/AbstractTreeNavigationKeyStroke.js +1 -0
  155. package/src/tree/keystrokes/TreeCollapseAllKeyStroke.js +2 -2
  156. package/src/tree/keystrokes/TreeExpandOrDrillDownKeyStroke.js +2 -2
  157. package/src/tree/keystrokes/TreeNavigationDownKeyStroke.js +2 -2
  158. package/src/tree/keystrokes/TreeNavigationEndKeyStroke.js +2 -2
  159. package/src/tree/keystrokes/TreeNavigationUpKeyStroke.js +2 -2
  160. package/src/util/Device.js +4 -4
  161. package/src/util/arrays.js +44 -2
  162. package/src/util/dragAndDrop.js +5 -4
  163. package/src/util/events.js +1 -1
  164. package/src/util/objects.js +4 -1
  165. package/src/widget/FilterSupport.js +1 -1
  166. package/src/widget/Widget.js +17 -7
@@ -693,11 +693,14 @@ export function resolveConstProperty(object, config) {
693
693
  /**
694
694
  * @param {object} obj
695
695
  * @returns {Boolean|undefined}
696
- * - true if the obj is empty
696
+ * - true if the obj is empty, null or undefined
697
697
  * - false if the obj is not empty
698
698
  * - nothing if the obj is not an object
699
699
  */
700
700
  export function isEmpty(obj) {
701
+ if (isNullOrUndefined(obj)) {
702
+ return true;
703
+ }
701
704
  if (!isPlainObject(obj)) {
702
705
  return;
703
706
  }
@@ -51,7 +51,7 @@ export default class FilterSupport extends WidgetSupport {
51
51
  scout.assertParameter('getElementsForFiltering', options.getElementsForFiltering);
52
52
  this._getElementsForFiltering = options.getElementsForFiltering;
53
53
  }
54
- this._getElementText = options.getElementText || ((element) => $(element).text());
54
+ this._getElementText = options.getElementText || (element => $(element).text());
55
55
 
56
56
  if (options.createTextFilter) {
57
57
  scout.assertParameter('updateTextFilterText', options.updateTextFilterText);
@@ -524,7 +524,8 @@ export default class Widget {
524
524
  * After the animation is executed, the element gets removed using this._removeInternal.
525
525
  */
526
526
  _removeAnimated() {
527
- if (!Device.get().supportsCssAnimation() || !this.$container || this.$container.isDisplayNone()) {
527
+ let animateRemovalWhileRemovingParent = this._animateRemovalWhileRemovingParent();
528
+ if ((this.parent.removing && !animateRemovalWhileRemovingParent) || !Device.get().supportsCssAnimation() || !this.$container || this.$container.isDisplayNone()) {
528
529
  // Cannot remove animated, remove regularly
529
530
  this._removeInternal();
530
531
  return;
@@ -544,7 +545,7 @@ export default class Widget {
544
545
  if (!this.animateRemovalClass) {
545
546
  throw new Error('Missing animate removal class. Cannot remove animated.');
546
547
  }
547
- if (!this.$container.isVisible() || !this.$container.isEveryParentVisible()) {
548
+ if (!this.$container.isVisible() || !this.$container.isEveryParentVisible() || !this.$container.isAttached()) {
548
549
  // If element is not visible, animationEnd would never fire -> remove it immediately
549
550
  this._removeInternal();
550
551
  return;
@@ -557,7 +558,14 @@ export default class Widget {
557
558
 
558
559
  // If the parent is being removed while the animation is running, the animationEnd event will never fire
559
560
  // -> Make sure remove is called nevertheless. Important: remove it before the parent is removed to maintain the regular remove order
560
- this.parent.one('removing', this._parentRemovingWhileAnimatingHandler);
561
+ if (!animateRemovalWhileRemovingParent) {
562
+ this.parent.one('removing', this._parentRemovingWhileAnimatingHandler);
563
+ }
564
+ }
565
+
566
+ _animateRemovalWhileRemovingParent() {
567
+ // By default, remove animation is prevented when parent is being removed
568
+ return false;
561
569
  }
562
570
 
563
571
  _onParentRemovingWhileAnimating() {
@@ -2062,15 +2070,17 @@ export default class Widget {
2062
2070
  * Tries to set the focus on the widget.
2063
2071
  * <p>
2064
2072
  * By default the focus is set on the container but this may vary from widget to widget.
2073
+ *
2074
+ * @param {object} [options]
2075
+ * @param {boolean} [options.preventScroll] prevents scrolling to new focused element (defaults to false)
2065
2076
  * @returns {boolean} true if the element could be focused, false if not
2066
2077
  */
2067
- focus() {
2078
+ focus(options) {
2068
2079
  if (!this.rendered) {
2069
- this.session.layoutValidator.schedulePostValidateFunction(this.focus.bind(this));
2080
+ this.session.layoutValidator.schedulePostValidateFunction(this.focus.bind(this, options));
2070
2081
  return false;
2071
2082
  }
2072
-
2073
- return this.session.focusManager.requestFocus(this.getFocusableElement());
2083
+ return this.session.focusManager.requestFocus(this.getFocusableElement(), null, options);
2074
2084
  }
2075
2085
 
2076
2086
  /**