@eclipse-scout/core 22.0.0-beta.5 → 22.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-scout/core",
3
- "version": "22.0.0-beta.5",
3
+ "version": "22.0.0",
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.0-beta.5",
29
+ "@eclipse-scout/cli": "22.0.0",
30
30
  "@eclipse-scout/releng": "^22.0.0",
31
31
  "jasmine-core": "3.10.1",
32
32
  "jasmine-ajax": "4.0.0",
package/src/App.js CHANGED
@@ -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
@@ -196,7 +196,7 @@ export default class App {
196
196
  */
197
197
  _init(options) {
198
198
  options = options || {};
199
- this.setLoading(true)
199
+ this.setLoading(true);
200
200
  let compatibilityPromise = this._checkBrowserCompatibility(options);
201
201
  if (compatibilityPromise) {
202
202
  this.setLoading(false);
@@ -224,7 +224,6 @@ export default class App {
224
224
 
225
225
  _checkBrowserCompatibility(options) {
226
226
  let device = Device.get();
227
- let app = this;
228
227
  $.log.isInfoEnabled() && $.log.info('Detected browser ' + device.browser + ' version ' + device.browserVersion);
229
228
  if (!scout.nvl(options.checkBrowserCompatibility, true) || device.isSupportedBrowser()) {
230
229
  // No check requested or browser is supported
@@ -400,9 +399,7 @@ export default class App {
400
399
 
401
400
  // TODO [7.0] cgu improve this, start must not be executed because it currently does a server request
402
401
  let desktop = this._createDesktop(session.root);
403
- this.trigger('desktopReady', {
404
- desktop: desktop
405
- });
402
+ this._triggerDesktopReady(desktop);
406
403
  session.render(() => {
407
404
  session._renderDesktop();
408
405
 
@@ -411,14 +408,24 @@ export default class App {
411
408
  session.focusManager.validateFocus();
412
409
 
413
410
  session.ready = true;
414
- this.trigger('sessionReady', {
415
- session: session
416
- });
411
+ this._triggerSessionReady(session);
417
412
  $.log.isInfoEnabled() && $.log.info('Session initialized. Detected ' + Device.get());
418
413
  });
419
414
  return $.resolvedPromise();
420
415
  }
421
416
 
417
+ _triggerDesktopReady(desktop) {
418
+ this.trigger('desktopReady', {
419
+ desktop: desktop
420
+ });
421
+ }
422
+
423
+ _triggerSessionReady(session) {
424
+ this.trigger('sessionReady', {
425
+ session: session
426
+ });
427
+ }
428
+
422
429
  _createSession(options) {
423
430
  return scout.create('Session', options, {
424
431
  ensureUniqueId: false
@@ -85,6 +85,20 @@
85
85
  }
86
86
  }
87
87
 
88
+ &.glasspane-parent {
89
+ // Modality highlight does not work with pointer-events: none because mouse down is ignored on the glass pane completely by the browser
90
+ // -> we need to disable the hover effect manually
91
+ pointer-events: unset;
92
+
93
+ &:not(.disabled):not(.selected):hover {
94
+ background-color: @desktop-tab-background-color;
95
+ }
96
+
97
+ &:not(.selected):hover > .closer {
98
+ display: none;
99
+ }
100
+ }
101
+
88
102
  &.disabled {
89
103
  background-color: transparent;
90
104
 
@@ -1076,42 +1076,12 @@ export default class Outline extends Tree {
1076
1076
  if (desktop.navigation) {
1077
1077
  $elements.push(desktop.navigation.$body);
1078
1078
  }
1079
- if (desktop.bench && element instanceof Form && element.displayHint === Form.DisplayHint.VIEW) {
1080
- arrays.pushAll($elements, this._getBenchGlassPaneTargetsForView(element));
1081
- }
1082
1079
  if (desktop.bench && desktop.bench.outlineContent) {
1083
1080
  arrays.pushAll($elements, desktop.bench.outlineContent.glassPaneTargets(element));
1084
1081
  }
1085
1082
  return $elements;
1086
1083
  }
1087
1084
 
1088
- _getBenchGlassPaneTargetsForView(view) {
1089
- let $glassPanes = [];
1090
- $glassPanes = $glassPanes.concat(this._getTabGlassPaneTargetsForView(view, this.session.desktop.header));
1091
- this.session.desktop.bench.visibleTabBoxes().forEach(function(tabBox) {
1092
- if (tabBox.hasView(view)) {
1093
- arrays.pushAll($glassPanes, this._getTabGlassPaneTargetsForView(view, tabBox));
1094
- } else if (tabBox.$container) {
1095
- $glassPanes.push(tabBox.$container);
1096
- }
1097
- }, this);
1098
- return $glassPanes;
1099
- }
1100
-
1101
- _getTabGlassPaneTargetsForView(view, tabBox) {
1102
- let $glassPanes = [];
1103
- tabBox.tabArea.tabs.forEach(tab => {
1104
- if (tab.view !== view && tab.view.displayParent === this) {
1105
- $glassPanes.push(tab.$container);
1106
- // Workaround for javascript not being able to prevent hover event propagation:
1107
- // In case of tabs, the hover selector is defined on the element that is the direct parent
1108
- // of the glass pane. Under these circumstances, the hover style isn't be prevented by the glass pane.
1109
- tab.$container.addClass('glasspane-parent');
1110
- }
1111
- });
1112
- return $glassPanes;
1113
- }
1114
-
1115
1085
  _onGlassPaneMouseDown(glassPaneOwner, $glassPane) {
1116
1086
  let desktop = this.session.desktop;
1117
1087
  if (desktop.navigation) {
@@ -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
@@ -8,7 +8,7 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
- import {Desktop, HtmlComponent, OutlineViewButton, scout, Widget, widgets} from '../../index';
11
+ import {HtmlComponent, OutlineViewButton, scout, Widget, widgets} from '../../index';
12
12
 
13
13
  export default class ViewButtonBox extends Widget {
14
14
 
@@ -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
@@ -119,6 +119,7 @@
119
119
  display: inline-block;
120
120
  vertical-align: middle;
121
121
  padding: @group-box-title-padding-top 0 @group-box-title-padding-bottom 0;
122
+ max-width: 100%;
122
123
 
123
124
  .group-box.has-sub-label > & {
124
125
  padding-bottom: @group-box-title-with-sub-label-padding-bottom;
@@ -135,6 +136,7 @@
135
136
  font-size: @sub-title-font-size;
136
137
  letter-spacing: @sub-title-letter-spacing;
137
138
  color: @sub-title-color;
139
+ #scout.overflow-ellipsis();
138
140
  }
139
141
  }
140
142
 
package/src/index.js CHANGED
@@ -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
@@ -605,6 +605,7 @@ export {default as FormFieldTile} from './tile/fields/FormFieldTile';
605
605
  export {default as FormFieldTileAdapter} from './tile/fields/FormFieldTileAdapter';
606
606
  export {default as ButtonTile} from './tile/fields/button/ButtonTile';
607
607
  export {default as TileButton} from './tile/fields/button/TileButton';
608
+ export {default as TileHtmlField} from './tile/fields/htmlfield/TileHtmlField';
608
609
  export {default as TileTableField} from './tile/fields/tablefield/TileTableField';
609
610
  export {default as SimpleTab} from './tabbox/SimpleTab';
610
611
  export {default as SimpleTabArea} from './tabbox/SimpleTabArea';
@@ -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
@@ -422,6 +422,8 @@ export default class Session {
422
422
  // Extract client session data without creating a model adapter for it. It is (currently) only used to transport the desktop's adapterId.
423
423
  let clientSessionData = this._getAdapterData(data.startupData.clientSession);
424
424
  this.desktop = this.getOrCreateWidget(clientSessionData.desktop, this.rootAdapter.widget);
425
+ App.get()._triggerDesktopReady(this.desktop);
426
+
425
427
  let renderDesktopImpl = function() {
426
428
  this._renderDesktop();
427
429
 
@@ -443,6 +445,7 @@ export default class Session {
443
445
  this._resumeBackgroundJobPolling();
444
446
 
445
447
  this.ready = true;
448
+ App.get()._triggerSessionReady(this);
446
449
 
447
450
  $.log.isInfoEnabled() && $.log.info('Session initialized. Detected ' + Device.get());
448
451
  if ($.log.isDebugEnabled()) {
@@ -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
@@ -26,9 +26,10 @@
26
26
  @drop-shadow-blur: 13px;
27
27
  @drop-shadow-large-y: 8px;
28
28
  @drop-shadow-large-blur: 32px;
29
- @filter-field-bottom: 6px;
30
- @filter-field-right: 6px;
29
+ @filter-field-bottom: 8px;
30
+ @filter-field-right: 8px;
31
31
  @filter-field-height: @logical-grid-row-height;
32
+ @filter-field-height-dense: @logical-grid-row-height-dense;
32
33
  @filter-field-width: 190px;
33
34
  @filter-field-min-width: 75px;
34
35
  @filter-field-max-width: 60%;
@@ -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
@@ -2199,7 +2199,7 @@ export default class Table extends Widget {
2199
2199
  let cell, column, predicate;
2200
2200
 
2201
2201
  predicate = function(column) {
2202
- if (column.guiOnly) {
2202
+ if (!column.isVisible() || column.guiOnly) {
2203
2203
  // does not support tabbing
2204
2204
  return false;
2205
2205
  }
@@ -3056,6 +3056,7 @@ export default class Table extends Widget {
3056
3056
  this.ensureRowRendered(row);
3057
3057
  let popup = column.startCellEdit(row, field);
3058
3058
  this.cellEditorPopup = popup;
3059
+ this.$container.toggleClass('has-cell-editor-popup', !!popup);
3059
3060
  return popup;
3060
3061
  }
3061
3062
 
@@ -3754,7 +3755,7 @@ export default class Table extends Widget {
3754
3755
  addFilter(filter, applyFilter = true) {
3755
3756
  if (filter instanceof TableUserFilter) {
3756
3757
  let previousFilter = this.getFilter(filter.createKey());
3757
- this.filterSupport.removeFilter(previousFilter);
3758
+ this.filterSupport.removeFilter(previousFilter, false);
3758
3759
  }
3759
3760
 
3760
3761
  let added = this.filterSupport.addFilter(filter, applyFilter);
@@ -5384,6 +5385,9 @@ export default class Table extends Widget {
5384
5385
  let destroyEditor = () => {
5385
5386
  this.cellEditorPopup.destroy();
5386
5387
  this.cellEditorPopup = null;
5388
+ if (this.$container) {
5389
+ this.$container.removeClass('has-cell-editor-popup');
5390
+ }
5387
5391
  if (callback) {
5388
5392
  callback();
5389
5393
  }
@@ -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
@@ -121,20 +121,30 @@
121
121
  }
122
122
 
123
123
  & > .filter-field {
124
- --filter-field-max-bottom: calc(~'50% - ' (@filter-field-height + var(--controls-height)) / 2);
124
+ --filter-field-max-bottom: calc(~'50% - ' (var(--filter-field-height) + var(--controls-height)) / 2);
125
125
 
126
126
  &:not(.focused).empty {
127
127
  --filter-field-max-bottom: calc(~'50% - ' (@filter-field-icon-size + var(--controls-height)) / 2);
128
128
  }
129
129
 
130
130
  .has-menubar.menubar-bottom& {
131
- --filter-field-max-bottom: calc(~'50% - ' (@filter-field-height + var(--controls-height)) / 2);
131
+ --filter-field-max-bottom: calc(~'50% - ' (var(--filter-field-height) + var(--controls-height)) / 2);
132
132
  bottom: calc(min(var(--filter-field-bottom), var(--filter-field-max-bottom)) + var(--menubar-height));
133
133
 
134
134
  &:not(.focused).empty {
135
135
  --filter-field-max-bottom: calc(~'50% - ' (@filter-field-icon-size + var(--controls-height)) / 2);
136
136
  }
137
137
  }
138
+
139
+ .has-cell-editor-popup& {
140
+ opacity: 0;
141
+ visibility: hidden;
142
+
143
+ // start the "fade out" transition right away
144
+ --filter-field-opacity-transition-delay: 0s;
145
+ // set visibility to hidden right after the "fade out" transition ends
146
+ --filter-field-visibility-transition-delay: calc(@filter-field-transition-duration + var(--filter-field-opacity-transition-delay));
147
+ }
138
148
  }
139
149
  }
140
150
 
@@ -0,0 +1,28 @@
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
+ * http://www.eclipse.org/legal/epl-v10.html
7
+ *
8
+ * Contributors:
9
+ * BSI Business Systems Integration AG - initial API and implementation
10
+ */
11
+ import {HtmlField} from '../../../index';
12
+
13
+ export default class TileHtmlField extends HtmlField {
14
+
15
+ constructor() {
16
+ super();
17
+ }
18
+
19
+ _render() {
20
+ super._render();
21
+
22
+ this.$container.addClass('scrollbar-y-outside');
23
+ }
24
+
25
+ _installScrollbars(options) {
26
+ return super._installScrollbars($.extend(true, {}, options, {scrollShadow: 'gradient'}));
27
+ }
28
+ }
@@ -17,11 +17,6 @@
17
17
  #scout.drop-shadow(@y: 4px, @blur: 6px, @alpha: 5%);
18
18
  max-width: 300px;
19
19
  white-space: normal;
20
-
21
- &.has-menus {
22
- padding-top: 6px;
23
- padding-bottom: 6px;
24
- }
25
20
  }
26
21
 
27
22
  .tooltip-content {
@@ -37,6 +32,7 @@
37
32
  font-weight: @font-weight-bold;
38
33
  padding-left: @context-menu-item-padding-left;
39
34
  padding-right: @context-menu-item-padding-right;
35
+ padding-top: @tooltip-padding-y + 6px;
40
36
  }
41
37
 
42
38
  & .small {
@@ -53,6 +49,12 @@
53
49
 
54
50
  .tooltip-menus {
55
51
  position: relative;
52
+ background-color: inherit; // Necessary if arrow has a border
53
+ padding-bottom: 6px;
54
+
55
+ .no-text > & {
56
+ padding-top: 6px;
57
+ }
56
58
 
57
59
  & > .menu-item {
58
60
  display: flex;
@@ -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
@@ -8,27 +8,36 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
+
11
12
  export default class LazyNodeFilter {
12
13
 
13
- constructor(tree) { //
14
+ constructor(tree) {
14
15
  this.tree = tree;
15
16
  }
16
17
 
17
18
  accept(node) {
18
- if (!node.expanded && node.parentNode && node.parentNode.expandedLazy && node.parentNode.lazyExpandingEnabled && this.tree.lazyExpandingEnabled) {
19
- // if this node is not expanded and parent is lazyExpanding.
20
- for (let i = 0; i < this.tree.selectedNodes.length; i++) {
21
- let selectedNode = this.tree.selectedNodes[i];
22
- // not initialized selected nodes
23
- if (typeof selectedNode === 'string') {
24
- break;
25
- }
26
- if (selectedNode === node || selectedNode.isDescendantOf(node)) {
27
- return true;
28
- }
19
+ if (node.expanded) {
20
+ return true;
21
+ }
22
+ // not expanded: remove lazy expand marker (forget lazy expanded children)
23
+ node.childNodes.forEach(child => child._lazyNodeFilterAccepted = false);
24
+
25
+ if (!node.parentNode || !node.parentNode.expandedLazy || !node.parentNode.lazyExpandingEnabled || !this.tree.lazyExpandingEnabled) {
26
+ // no lazy expanding supported
27
+ return true;
28
+ }
29
+
30
+ // if this node is not expanded and parent is lazyExpanding.
31
+ for (let i = 0; i < this.tree.selectedNodes.length; i++) {
32
+ let selectedNode = this.tree.selectedNodes[i];
33
+ if (typeof selectedNode === 'string') {
34
+ break;
35
+ }
36
+ if (selectedNode == node) {
37
+ node._lazyNodeFilterAccepted = true;
38
+ return true;
29
39
  }
30
- return false;
31
40
  }
32
- return true;
41
+ return !!node._lazyNodeFilterAccepted;
33
42
  }
34
43
  }