@eclipse-scout/core 22.0.1 → 22.0.2
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-c98fb5230e71dcec75ce.min.js +2 -0
- package/dist/eclipse-scout-core-c98fb5230e71dcec75ce.min.js.map +1 -0
- package/dist/eclipse-scout-core-theme-6b2fef56e9e49231a49c.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark-d2bb274dd42f132bfca0.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark.css +367 -312
- package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
- package/dist/eclipse-scout-core-theme.css +150 -95
- package/dist/eclipse-scout-core-theme.css.map +1 -1
- package/dist/eclipse-scout-core.js +371 -204
- package/dist/eclipse-scout-core.js.map +1 -1
- package/dist/file-list +7 -0
- package/dist/locales.json +47126 -0
- package/dist/texts.json +1153 -0
- package/package.json +2 -2
- package/src/action/Button.less +1 -0
- package/src/calendar/Calendar.js +40 -58
- package/src/calendar/Calendar.less +10 -10
- package/src/calendar/CalendarLayout.js +3 -1
- package/src/datepicker/DatePicker.less +1 -0
- package/src/desktop/desktoptab/DesktopTab.less +5 -2
- package/src/desktop/desktoptab/DesktopTabArea.less +7 -3
- package/src/desktop/navigation/DesktopNavigation.less +4 -0
- package/src/desktop/notification/DesktopNotification.js +11 -4
- package/src/desktop/notification/DesktopNotification.less +5 -3
- package/src/desktop/outline/Outline.less +4 -4
- package/src/desktop/viewbutton/ViewButton.less +13 -9
- package/src/desktop/viewbutton/ViewMenuTab.less +3 -2
- package/src/filechooser/FileChooser.less +1 -1
- package/src/form/Form.less +1 -0
- package/src/form/fields/LookupBox.js +2 -1
- package/src/form/fields/breadcrumbbarfield/BreadcrumbBarField.less +14 -0
- package/src/form/fields/groupbox/GroupBox.js +13 -9
- package/src/form/fields/groupbox/GroupBox.less +1 -0
- package/src/form/fields/htmlfield/HtmlField.less +0 -1
- package/src/form/fields/listbox/ListBox.js +8 -3
- package/src/form/fields/tabbox/TabAreaLayout.js +63 -66
- package/src/form/fields/tabbox/TabBox.js +4 -7
- package/src/form/fields/tabbox/TabBox.less +2 -1
- package/src/form/fields/tabbox/TabBoxHeaderLayout.js +5 -5
- package/src/glasspane/GlassPane.js +3 -3
- package/src/group/Group.less +1 -1
- package/src/index.less +1 -0
- package/src/jquery/jquery-scout.js +5 -4
- package/src/menu/ContextMenuPopup.less +9 -2
- package/src/menu/Menu.less +1 -0
- package/src/modeselector/Mode.less +15 -37
- package/src/modeselector/ModeSelector.js +1 -1
- package/src/modeselector/ModeSelector.less +2 -1
- package/src/planner/PlannerHeader.less +2 -1
- package/src/popup/Popup.js +24 -8
- package/src/popup/PopupLayout.js +2 -8
- package/src/scrollbar/Scrollbar.less +8 -1
- package/src/scrollbar/scrollbars.js +26 -4
- package/src/style/colors-dark.less +17 -10
- package/src/style/colors.less +11 -3
- package/src/style/fonts.less +5 -0
- package/src/style/mixins.less +16 -12
- package/src/style/sizes-dark.less +4 -1
- package/src/style/sizes.less +3 -4
- package/src/table/Table.js +37 -29
- package/src/table/Table.less +36 -13
- package/src/table/TableHeader.js +10 -8
- package/src/table/TableHeader.less +1 -0
- package/src/table/TableHeaderMenu.js +3 -1
- package/src/table/TableHeaderMenu.less +7 -2
- package/src/table/columns/BooleanColumn.js +2 -2
- package/src/table/columns/Column.js +3 -3
- package/src/table/editor/CellEditorPopup.js +8 -1
- package/src/tile/TileGrid.js +1 -1
- package/src/tile/TileGridLayout.js +2 -2
- package/src/tile/accordion/TileAccordion.js +16 -1
- package/src/tile/fields/FormFieldTile.less +18 -11
- package/src/tree/CompactTree.less +1 -1
- package/src/tree/Tree.less +1 -3
- package/src/util/arrays.js +24 -2
- package/src/util/objects.js +4 -1
- package/src/widget/Widget.js +11 -3
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
@@ -43,7 +43,6 @@ export default class Column {
|
|
|
43
43
|
this.type = 'text';
|
|
44
44
|
this.width = 60;
|
|
45
45
|
this.initialWidth = undefined; // the width the column initially has
|
|
46
|
-
this.prefMinWidth = null;
|
|
47
46
|
this.minWidth = Column.DEFAULT_MIN_WIDTH; // the minimal width the column can have
|
|
48
47
|
this.showSeparator = true;
|
|
49
48
|
this.table = null;
|
|
@@ -71,7 +70,8 @@ export default class Column {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
static DEFAULT_MIN_WIDTH = 60;
|
|
74
|
-
static
|
|
73
|
+
static SMALL_MIN_WIDTH = 38;
|
|
74
|
+
static NARROW_MIN_WIDTH = 32;
|
|
75
75
|
|
|
76
76
|
init(model) {
|
|
77
77
|
this.session = model.session;
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
@@ -63,6 +63,13 @@ export default class CellEditorPopup extends Popup {
|
|
|
63
63
|
this.pack();
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @override
|
|
68
|
+
*/
|
|
69
|
+
_getDefaultOpen$Parent() {
|
|
70
|
+
return this.table.$data;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
_render() {
|
|
67
74
|
super._render();
|
|
68
75
|
|
package/src/tile/TileGrid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
@@ -151,7 +151,7 @@ export default class TileGridLayout extends LogicalGridLayout {
|
|
|
151
151
|
*/
|
|
152
152
|
_layoutCellBounds(containerSize, containerInsets) {
|
|
153
153
|
// Since the tiles are positioned absolutely it is necessary to add the height of the filler to the top insets
|
|
154
|
-
if (this.widget.virtual) {
|
|
154
|
+
if (this.widget.virtual && this.widget.$fillBefore) {
|
|
155
155
|
containerInsets.top += this.widget.$fillBefore.outerHeight(true);
|
|
156
156
|
}
|
|
157
157
|
return super._layoutCellBounds(containerSize, containerInsets);
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
@@ -352,6 +352,21 @@ export default class TileAccordion extends Accordion {
|
|
|
352
352
|
_filter() {
|
|
353
353
|
this.groups.forEach(group => {
|
|
354
354
|
group.body.filter();
|
|
355
|
+
|
|
356
|
+
// If the layout has not been invalidated as part of the filtering above, it even though must be validated here.
|
|
357
|
+
// This is because groups above might have fewer visible Tiles now which makes room for this group.
|
|
358
|
+
// The revalidateLayout() with scrolling=true here ensures TileGrid._renderViewPort() is called to ensure these Tiles become visible as there is space available now.
|
|
359
|
+
// It is executed as postValidateFunction because the groups above must have completed their layouting so that
|
|
360
|
+
// TileGrid._renderViewPort() knows that there is more space available now.
|
|
361
|
+
if (group.body.htmlComp && group.body.htmlComp.valid && !group.body._accordionLayoutHandler /* skip if already registered */) {
|
|
362
|
+
group.body._accordionLayoutHandler = () => {
|
|
363
|
+
group.body.scrolling = true;
|
|
364
|
+
group.body.revalidateLayout();
|
|
365
|
+
group.body.scrolling = false;
|
|
366
|
+
group.body._accordionLayoutHandler = null;
|
|
367
|
+
};
|
|
368
|
+
this.session.layoutValidator.schedulePostValidateFunction(group.body._accordionLayoutHandler);
|
|
369
|
+
}
|
|
355
370
|
});
|
|
356
371
|
}
|
|
357
372
|
|
|
@@ -222,8 +222,16 @@
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
&.has-error > .status
|
|
226
|
-
|
|
225
|
+
&.has-error > .status {
|
|
226
|
+
&::before {
|
|
227
|
+
color: @tile-default-inverted-error-status-color;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&:hover::before,
|
|
231
|
+
&:active::before,
|
|
232
|
+
&.selected::before {
|
|
233
|
+
color: @tile-default-inverted-error-status-hover-color;
|
|
234
|
+
}
|
|
227
235
|
}
|
|
228
236
|
|
|
229
237
|
.scrollbar-thumb-handle {
|
|
@@ -315,11 +323,11 @@
|
|
|
315
323
|
}
|
|
316
324
|
|
|
317
325
|
&.selected {
|
|
318
|
-
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-selected-border-color, @y2: 0px, @blur2: 0px);
|
|
326
|
+
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @y2: 0px, @blur2: 0px);
|
|
319
327
|
|
|
320
328
|
&.inverted {
|
|
321
|
-
--tile-background-color:
|
|
322
|
-
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @y2: 0px, @blur2: 0px);
|
|
329
|
+
--tile-background-color: @dashboard-tile-default-inverted-background-color;
|
|
330
|
+
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-inverted-selected-border-color, @y2: 0px, @blur2: 0px);
|
|
323
331
|
}
|
|
324
332
|
|
|
325
333
|
&.color-alternative {
|
|
@@ -327,16 +335,15 @@
|
|
|
327
335
|
}
|
|
328
336
|
|
|
329
337
|
&.inverted.color-alternative {
|
|
330
|
-
--tile-background-color:
|
|
331
|
-
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-selected-border-color, @y2: 0px, @blur2: 0px);
|
|
338
|
+
--tile-background-color: @dashboard-tile-alternative-inverted-background-color;
|
|
339
|
+
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-inverted-selected-border-color, @y2: 0px, @blur2: 0px);
|
|
332
340
|
}
|
|
333
341
|
|
|
334
|
-
|
|
335
342
|
.dimmed-background & {
|
|
336
|
-
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-light-alpha);
|
|
343
|
+
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-light-alpha);
|
|
337
344
|
|
|
338
345
|
&.inverted {
|
|
339
|
-
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
|
|
346
|
+
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-default-inverted-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
|
|
340
347
|
}
|
|
341
348
|
|
|
342
349
|
&.color-alternative {
|
|
@@ -344,7 +351,7 @@
|
|
|
344
351
|
}
|
|
345
352
|
|
|
346
353
|
&.inverted.color-alternative {
|
|
347
|
-
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
|
|
354
|
+
#scout.double-drop-shadow(@spread1: 2px, @color1: @dashboard-tile-alternative-inverted-selected-border-color, @alpha2: @dashboard-tile-drop-shadow-dark-alpha);
|
|
348
355
|
}
|
|
349
356
|
}
|
|
350
357
|
}
|
package/src/tree/Tree.less
CHANGED
|
@@ -216,18 +216,16 @@
|
|
|
216
216
|
|
|
217
217
|
.tree-node.lazy > & {
|
|
218
218
|
font-family: @font-default-family;
|
|
219
|
-
font-size: @font-size-normal;
|
|
220
219
|
content: '+';
|
|
221
220
|
/* Move to left because '+' sign is not as wide as 'arrow-down' */
|
|
222
221
|
margin-left: -2px;
|
|
223
222
|
}
|
|
224
223
|
|
|
225
224
|
.tree-node.expanded > & {
|
|
226
|
-
/* This "imprecise" angle is a
|
|
225
|
+
/* This "imprecise" angle is a workaround for firefox to prevent shifting the div a little when the animation finishes. */
|
|
227
226
|
/* See https://bugzilla.mozilla.org/show_bug.cgi?id=739176 */
|
|
228
227
|
#scout.transform(rotate(89.99deg));
|
|
229
228
|
}
|
|
230
|
-
|
|
231
229
|
}
|
|
232
230
|
|
|
233
231
|
&:hover {
|
package/src/util/arrays.js
CHANGED
|
@@ -206,6 +206,11 @@ export function containsAll(haystack, needles) {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* @template T
|
|
211
|
+
* @param {T[]} arr
|
|
212
|
+
* @return {T}
|
|
213
|
+
*/
|
|
209
214
|
export function first(arr) {
|
|
210
215
|
if (Array.isArray(arr)) {
|
|
211
216
|
return arr[0];
|
|
@@ -213,6 +218,11 @@ export function first(arr) {
|
|
|
213
218
|
return arr;
|
|
214
219
|
}
|
|
215
220
|
|
|
221
|
+
/**
|
|
222
|
+
* @template T
|
|
223
|
+
* @param {T[]} arr
|
|
224
|
+
* @return {T}
|
|
225
|
+
*/
|
|
216
226
|
export function last(arr) {
|
|
217
227
|
if (Array.isArray(arr)) {
|
|
218
228
|
return arr[arr.length - 1];
|
|
@@ -285,8 +295,8 @@ export function union(array1, array2) {
|
|
|
285
295
|
return result;
|
|
286
296
|
}
|
|
287
297
|
|
|
288
|
-
// noinspection DuplicatedCode
|
|
289
298
|
export function equalsIgnoreOrder(arr, arr2) {
|
|
299
|
+
// noinspection DuplicatedCode
|
|
290
300
|
if (arr === arr2) {
|
|
291
301
|
return true;
|
|
292
302
|
}
|
|
@@ -302,8 +312,8 @@ export function equalsIgnoreOrder(arr, arr2) {
|
|
|
302
312
|
return containsAll(arr, arr2);
|
|
303
313
|
}
|
|
304
314
|
|
|
305
|
-
// noinspection DuplicatedCode
|
|
306
315
|
export function equals(arr, arr2) {
|
|
316
|
+
// noinspection DuplicatedCode
|
|
307
317
|
if (arr === arr2) {
|
|
308
318
|
return true;
|
|
309
319
|
}
|
|
@@ -600,6 +610,17 @@ export function toMap(array, keyMapper = (el => el), valueMapper = (el => el)) {
|
|
|
600
610
|
}, {}));
|
|
601
611
|
}
|
|
602
612
|
|
|
613
|
+
/**
|
|
614
|
+
* If the argument is an empty array, null is returned. Otherwise, the argument is returned unchanged.
|
|
615
|
+
*
|
|
616
|
+
* @template T
|
|
617
|
+
* @param {T[]} array
|
|
618
|
+
* @return {T[]|null}
|
|
619
|
+
*/
|
|
620
|
+
export function nullIfEmpty(array) {
|
|
621
|
+
return empty(array) ? null : array;
|
|
622
|
+
}
|
|
623
|
+
|
|
603
624
|
export default {
|
|
604
625
|
$indexOf,
|
|
605
626
|
$remove,
|
|
@@ -638,6 +659,7 @@ export default {
|
|
|
638
659
|
max,
|
|
639
660
|
min,
|
|
640
661
|
move,
|
|
662
|
+
nullIfEmpty,
|
|
641
663
|
pushAll,
|
|
642
664
|
pushIfDefined,
|
|
643
665
|
pushSet,
|
package/src/util/objects.js
CHANGED
|
@@ -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
|
}
|
package/src/widget/Widget.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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() {
|