@eclipse-scout/core 22.0.11 → 22.0.19

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 (36) hide show
  1. package/dist/eclipse-scout-core-d110a434bcc809661ce5.min.js +2 -0
  2. package/dist/eclipse-scout-core-d110a434bcc809661ce5.min.js.map +1 -0
  3. package/dist/eclipse-scout-core-theme-dark-fd0e080c10f65e67b68b.min.css +1 -0
  4. package/dist/eclipse-scout-core-theme-dark.css +20 -5
  5. package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
  6. package/dist/eclipse-scout-core-theme-f3a61fbc12acf8e27fcc.min.css +1 -0
  7. package/dist/eclipse-scout-core-theme.css +20 -5
  8. package/dist/eclipse-scout-core-theme.css.map +1 -1
  9. package/dist/eclipse-scout-core.js +184 -105
  10. package/dist/eclipse-scout-core.js.map +1 -1
  11. package/dist/file-list +4 -4
  12. package/package.json +2 -2
  13. package/src/App.js +1 -0
  14. package/src/desktop/DesktopDense.less +24 -6
  15. package/src/desktop/OpenUriHandler.js +5 -5
  16. package/src/form/fields/FormField.js +1 -1
  17. package/src/form/fields/datefield/DateField.js +2 -0
  18. package/src/form/fields/sequencebox/SequenceBox.js +20 -3
  19. package/src/form/fields/stringfield/StringField.js +9 -1
  20. package/src/session/Session.js +21 -18
  21. package/src/table/Table.js +2 -3
  22. package/src/table/columns/ColumnOptimalWidthMeasurer.js +1 -1
  23. package/src/testing/JasmineScoutUtil.js +127 -0
  24. package/src/testing/index.js +7 -3
  25. package/src/tile/TileGrid.js +5 -15
  26. package/src/tile/TileGridLayout.js +21 -11
  27. package/src/tile/accordion/TileAccordion.js +4 -23
  28. package/src/tile/accordion/TileAccordionLayout.js +39 -2
  29. package/src/tree/Tree.js +4 -0
  30. package/src/util/arrays.js +4 -0
  31. package/src/util/objects.js +4 -1
  32. package/src/widget/FilterSupport.js +19 -8
  33. package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.min.js +0 -2
  34. package/dist/eclipse-scout-core-e5e8740e3649f5b9f279.min.js.map +0 -1
  35. package/dist/eclipse-scout-core-theme-74b63e0d57bed407a729.min.css +0 -1
  36. package/dist/eclipse-scout-core-theme-dark-b82aea152f416e38ce7f.min.css +0 -1
@@ -74,6 +74,7 @@ class App {
74
74
  * @param {string|string[]} [options.bootstrap.textsUrl] URL or multiple URLs pointing to a json resource containing texts that will be available through texts.js.
75
75
  * @param {string} [options.bootstrap.localesUrl] URL pointing to a json resource containing locale information processed by locales.js
76
76
  * @param {string} [options.bootstrap.codesUrl] URL pointing to a json resources containing codes that will be available through codes.js
77
+ * @param {object} [options.session] Object to configure the session, see {@link Session.init} for the available options.
77
78
  */
78
79
 
79
80
 
@@ -11096,11 +11097,11 @@ __webpack_require__.r(__webpack_exports__);
11096
11097
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */ "jquery");
11097
11098
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__);
11098
11099
  /*
11099
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
11100
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
11100
11101
  * All rights reserved. This program and the accompanying materials
11101
11102
  * are made available under the terms of the Eclipse Public License v1.0
11102
11103
  * which accompanies this distribution, and is available at
11103
- * http://www.eclipse.org/legal/epl-v10.html
11104
+ * https://www.eclipse.org/legal/epl-v10.html
11104
11105
  *
11105
11106
  * Contributors:
11106
11107
  * BSI Business Systems Integration AG - initial API and implementation
@@ -11147,7 +11148,7 @@ class OpenUriHandler {
11147
11148
  } else {
11148
11149
  this.openUriAsNewWindow(uri);
11149
11150
  }
11150
- } else if (_index__WEBPACK_IMPORTED_MODULE_0__.Device.get().browser === _index__WEBPACK_IMPORTED_MODULE_0__.Device.Browser.CHROME) {
11151
+ } else if (_index__WEBPACK_IMPORTED_MODULE_0__.Device.get().browser === _index__WEBPACK_IMPORTED_MODULE_0__.Device.Browser.CHROME && this.isUriWithExternallyHandledProtocol(uri)) {
11151
11152
  // "Hidden iframe"-solution is not working in Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=663325)
11152
11153
  this.openUriInSameWindow(uri);
11153
11154
  } else {
@@ -11156,7 +11157,7 @@ class OpenUriHandler {
11156
11157
  }
11157
11158
 
11158
11159
  isUriWithExternallyHandledProtocol(uri) {
11159
- return /^(callto|facetime|fax|geo|mailto|maps|notes|sip|skype|tel|google.navigation):/.test(uri);
11160
+ return /^(callto|facetime|fax|geo|mailto|maps|notes|sip|skype|tel|google.navigation|sms|msteams):/.test(uri);
11160
11161
  }
11161
11162
 
11162
11163
  handleUriActionOpen(uri) {
@@ -11166,7 +11167,7 @@ class OpenUriHandler {
11166
11167
  // Additionally, some url types require to be opened in the same window like tel or mailto, at least on mobile devices
11167
11168
  this.openUriInSameWindow(uri);
11168
11169
  } else if (this.isUriWithExternallyHandledProtocol(uri)) {
11169
- if (_index__WEBPACK_IMPORTED_MODULE_0__.Device.get().browser === _index__WEBPACK_IMPORTED_MODULE_0__.Device.Browser.CHROME) {
11170
+ if (_index__WEBPACK_IMPORTED_MODULE_0__.Device.get().browser === _index__WEBPACK_IMPORTED_MODULE_0__.Device.Browser.CHROME || _index__WEBPACK_IMPORTED_MODULE_0__.Device.get().isAndroid()) {
11170
11171
  // "Hidden iframe"-solution is not working in Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=663325)
11171
11172
  this.openUriInSameWindow(uri);
11172
11173
  } else {
@@ -28052,7 +28053,7 @@ class FormField extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
28052
28053
  return;
28053
28054
  }
28054
28055
 
28055
- this.fieldStatus.remove();
28056
+ this.fieldStatus.destroy();
28056
28057
  this.$status = null;
28057
28058
  this.fieldStatus = null;
28058
28059
  }
@@ -33358,6 +33359,8 @@ class DateField extends _index__WEBPACK_IMPORTED_MODULE_0__.ValueField {
33358
33359
  }
33359
33360
 
33360
33361
  this._renderDateClearable();
33362
+
33363
+ this.$container.toggleClass('has-date', this.hasDate);
33361
33364
  }
33362
33365
 
33363
33366
  setHasTime(hasTime) {
@@ -33410,6 +33413,8 @@ class DateField extends _index__WEBPACK_IMPORTED_MODULE_0__.ValueField {
33410
33413
  }
33411
33414
 
33412
33415
  this._renderTimeClearable();
33416
+
33417
+ this.$container.toggleClass('has-time', this.hasTime);
33413
33418
  }
33414
33419
 
33415
33420
  setTimePickerResolution(timePickerResolution) {
@@ -41043,11 +41048,11 @@ __webpack_require__.r(__webpack_exports__);
41043
41048
  /* harmony export */ });
41044
41049
  /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../index */ "./src/index.js");
41045
41050
  /*
41046
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
41051
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
41047
41052
  * All rights reserved. This program and the accompanying materials
41048
41053
  * are made available under the terms of the Eclipse Public License v1.0
41049
41054
  * which accompanies this distribution, and is available at
41050
- * http://www.eclipse.org/legal/epl-v10.html
41055
+ * https://www.eclipse.org/legal/epl-v10.html
41051
41056
  *
41052
41057
  * Contributors:
41053
41058
  * BSI Business Systems Integration AG - initial API and implementation
@@ -41064,6 +41069,8 @@ class SequenceBox extends _index__WEBPACK_IMPORTED_MODULE_0__.CompositeField {
41064
41069
  this.logicalGrid = _index__WEBPACK_IMPORTED_MODULE_0__.scout.create('scout.HorizontalGrid');
41065
41070
  this.layoutConfig = null;
41066
41071
  this.fields = [];
41072
+ this._fieldPropertyChangeHandler = this._onFieldPropertyChange.bind(this);
41073
+ this._lastVisibleFieldSuppressStatusHandler = this._onLastVisibleFieldSuppressStatusChange.bind(this);
41067
41074
  }
41068
41075
 
41069
41076
  _init(model) {
@@ -41119,7 +41126,7 @@ class SequenceBox extends _index__WEBPACK_IMPORTED_MODULE_0__.CompositeField {
41119
41126
  for (i = 0; i < this.fields.length; i++) {
41120
41127
  field = this.fields[i];
41121
41128
  field.labelUseUiWidth = true;
41122
- field.on('propertyChange', this._onFieldPropertyChange.bind(this));
41129
+ field.on('propertyChange', this._fieldPropertyChangeHandler);
41123
41130
  field.render(this.$field);
41124
41131
 
41125
41132
  this._modifyLabel(field); // set each children layout data to logical grid data
@@ -41138,6 +41145,16 @@ class SequenceBox extends _index__WEBPACK_IMPORTED_MODULE_0__.CompositeField {
41138
41145
  _createBodyLayout() {
41139
41146
  return new _index__WEBPACK_IMPORTED_MODULE_0__.SequenceBoxLayout(this, this.layoutConfig);
41140
41147
  }
41148
+
41149
+ _remove() {
41150
+ this.fields.forEach(f => f.off('propertyChange', this._fieldPropertyChangeHandler));
41151
+
41152
+ if (this._lastVisibleField) {
41153
+ this._lastVisibleField.off('propertyChange:suppressStatus', this._lastVisibleFieldSuppressStatusHandler);
41154
+ }
41155
+
41156
+ super._remove();
41157
+ }
41141
41158
  /**
41142
41159
  * @override
41143
41160
  */
@@ -41202,6 +41219,8 @@ class SequenceBox extends _index__WEBPACK_IMPORTED_MODULE_0__.CompositeField {
41202
41219
  _handleStatus(visibilityChanged) {
41203
41220
  if (visibilityChanged && this._lastVisibleField) {
41204
41221
  // if there is a new last visible field, make sure the status is shown on the previously last one
41222
+ this._lastVisibleField.off('propertyChange:suppressStatus', this._lastVisibleFieldSuppressStatusHandler);
41223
+
41205
41224
  this._lastVisibleField.setSuppressStatus(null);
41206
41225
 
41207
41226
  if (this._lastVisibleField.rendered) {
@@ -41259,6 +41278,8 @@ class SequenceBox extends _index__WEBPACK_IMPORTED_MODULE_0__.CompositeField {
41259
41278
 
41260
41279
  this._lastVisibleField.setSuppressStatus(_index__WEBPACK_IMPORTED_MODULE_0__.FormField.SuppressStatus.ICON);
41261
41280
 
41281
+ this._lastVisibleField.on('propertyChange:suppressStatus', this._lastVisibleFieldSuppressStatusHandler);
41282
+
41262
41283
  if (visibilityChanged) {
41263
41284
  // If the last field got invisible, make sure the new last field does not display a status anymore (now done by the seq box)
41264
41285
  if (this._lastVisibleField.rendered) {
@@ -41271,6 +41292,11 @@ class SequenceBox extends _index__WEBPACK_IMPORTED_MODULE_0__.CompositeField {
41271
41292
  }
41272
41293
  }
41273
41294
 
41295
+ _onLastVisibleFieldSuppressStatusChange(e) {
41296
+ // do not change suppressStatus
41297
+ e.preventDefault();
41298
+ }
41299
+
41274
41300
  setErrorStatus(errorStatus) {
41275
41301
  if (this._isOverwritingStatusFromField && !this._isErrorStatusOverwritten) {
41276
41302
  // was not overwritten, will be overwritten now -> backup old value
@@ -46945,7 +46971,7 @@ __webpack_require__.r(__webpack_exports__);
46945
46971
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
46946
46972
 
46947
46973
  /*
46948
- * Copyright (c) 2014-2018 BSI Business Systems Integration AG.
46974
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
46949
46975
  * All rights reserved. This program and the accompanying materials
46950
46976
  * are made available under the terms of the Eclipse Public License v1.0
46951
46977
  * which accompanies this distribution, and is available at
@@ -47207,6 +47233,16 @@ class StringField extends _index__WEBPACK_IMPORTED_MODULE_0__.BasicField {
47207
47233
 
47208
47234
  this.revalidateLayout();
47209
47235
  }
47236
+ /**
47237
+ * @override
47238
+ */
47239
+
47240
+
47241
+ _renderEnabled() {
47242
+ super._renderEnabled();
47243
+
47244
+ this.revalidateLayout();
47245
+ }
47210
47246
 
47211
47247
  setFormatUpper(formatUpper) {
47212
47248
  if (formatUpper) {
@@ -55622,7 +55658,7 @@ __webpack_require__.r(__webpack_exports__);
55622
55658
  /* harmony import */ var _jquery_jquery_scout__WEBPACK_IMPORTED_MODULE_686__ = __webpack_require__(/*! ./jquery/jquery-scout */ "./src/jquery/jquery-scout.js");
55623
55659
  /* harmony import */ var _jquery_jquery_scout_selectors__WEBPACK_IMPORTED_MODULE_687__ = __webpack_require__(/*! ./jquery/jquery-scout-selectors */ "./src/jquery/jquery-scout-selectors.js");
55624
55660
  /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_688__ = __webpack_require__(/*! ./index.js */ "./src/index.js");
55625
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
55661
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
55626
55662
 
55627
55663
  /*
55628
55664
  * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
@@ -83532,36 +83568,39 @@ class Session {
83532
83568
 
83533
83569
 
83534
83570
  /**
83535
- * $entryPoint is required to create a new session.
83536
- *
83537
- * @param model The 'model' argument holds all optional values that may be used during
83538
- * initialization (it is the same object passed to the scout.init() function).
83539
- * @param [model.portletPartId]
83540
- * Optional, default is 0. Necessary when multiple UI sessions are managed
83541
- * by the same window (portlet support). Each session's partId must be unique.
83542
- * @param model.clientSessionId
83571
+ * @param {$} model.$entryPoint
83572
+ * The HTML element that is used by the {@link Desktop} to render its content.
83573
+ * @param {string} [model.portletPartId]
83574
+ * Necessary when multiple UI sessions are managed by the same window (portlet support).
83575
+ * Each session's partId must be unique. Default is 0.
83576
+ * @param {string} [model.clientSessionId]
83543
83577
  * Identifies the 'client instance' on the UI server. If the property is not set
83544
83578
  * (which is the default case), the clientSessionId is taken from the browser's
83545
83579
  * session storage (per browser window, survives F5 refresh of page). If no
83546
83580
  * clientSessionId can be found, a new one is generated on the server.
83547
- * @param [model.userAgent]
83548
- * Default: DESKTOP
83549
- * @param [model.backgroundJobPollingEnabled]
83581
+ * @param {boolean} [model.forceNewClientSession]
83582
+ * If set to true, the stored or passed clientSessionId will be ignored
83583
+ * and a new one generated by the server.
83584
+ * @param {UserAgent} [model.userAgent]
83585
+ * By default the user agent for the running platform is used. Use this option if you want to set a custom one.
83586
+ * @param {Locale|object} [model.locale]
83587
+ * If not specified, {@link Locale.DEFAULT} is used.
83588
+ * @param {boolean} [model.backgroundJobPollingEnabled]
83550
83589
  * Unless websockets is used, this property turns on (default) or off background
83551
83590
  * polling using an async ajax call together with setTimeout()
83552
- * @param [model.suppressErrors]
83591
+ * @param {boolean} [model.suppressErrors]
83553
83592
  * Basically added because of Jasmine-tests. When working with async tests that
83554
83593
  * use setTimeout(), sometimes the Jasmine-Maven plug-in fails and aborts the
83555
83594
  * build because there were console errors. These errors always happen in this
83556
83595
  * class. That's why we can skip suppress error handling with this flag.
83557
- * @param [model.focusManagerActive]
83596
+ * @param {boolean} [model.focusManagerActive]
83558
83597
  * Forces the focus manager to be active or not. If undefined, the value is
83559
83598
  * auto detected by Device.js.
83560
- * @param [model.reconnectorOptions]
83561
- * Optional, properties of this object are copied to the Session's reconnector
83562
- * instance (see Reconnector.js).
83563
- * @param [model.ajaxCallOptions]
83564
- * Optional, properties of this object are copied to all instances of AjaxCall.js.
83599
+ * @param {object} [model.reconnectorOptions]
83600
+ * Properties of this object are copied to the Session's reconnector
83601
+ * instance (see {@link Reconnector}).
83602
+ * @param {object} [model.ajaxCallOptions]
83603
+ * Properties of this object are copied to all instances of {@link AjaxCall}.
83565
83604
  */
83566
83605
  init(model) {
83567
83606
  let options = model || {};
@@ -93773,7 +93812,7 @@ class Table extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
93773
93812
 
93774
93813
  for (i = 0; i < columns.length; i++) {
93775
93814
  column = columns[i];
93776
- currentPosition = this.columns.indexOf(column);
93815
+ currentPosition = _index__WEBPACK_IMPORTED_MODULE_0__.arrays.findIndex(this.columns, element => element.id === column.id);
93777
93816
 
93778
93817
  if (currentPosition < 0) {
93779
93818
  throw new Error('Column with id ' + column.id + 'not found.');
@@ -93781,8 +93820,7 @@ class Table extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
93781
93820
 
93782
93821
  if (currentPosition !== i) {
93783
93822
  // Update model
93784
- _index__WEBPACK_IMPORTED_MODULE_0__.arrays.remove(this.columns, column);
93785
- _index__WEBPACK_IMPORTED_MODULE_0__.arrays.insert(this.columns, column, i);
93823
+ _index__WEBPACK_IMPORTED_MODULE_0__.arrays.move(this.columns, currentPosition, i);
93786
93824
  }
93787
93825
  }
93788
93826
 
@@ -103125,7 +103163,7 @@ class ColumnOptimalWidthMeasurer {
103125
103163
  let columns = this.table.visibleColumns();
103126
103164
  let colIndex = columns.indexOf(this.column);
103127
103165
 
103128
- let $row = this.table._buildAggregateRowDiv(row);
103166
+ let $row = this.table._build$AggregateRow(row);
103129
103167
 
103130
103168
  $row.appendTo(this.table.$data);
103131
103169
  columns.map(c => c.buildCellForAggregateRow(row)).forEach(c => jquery__WEBPACK_IMPORTED_MODULE_1___default()(c).appendTo($row));
@@ -111760,11 +111798,11 @@ __webpack_require__.r(__webpack_exports__);
111760
111798
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */ "jquery");
111761
111799
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__);
111762
111800
  /*
111763
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
111801
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
111764
111802
  * All rights reserved. This program and the accompanying materials
111765
111803
  * are made available under the terms of the Eclipse Public License v1.0
111766
111804
  * which accompanies this distribution, and is available at
111767
- * http://www.eclipse.org/legal/epl-v10.html
111805
+ * https://www.eclipse.org/legal/epl-v10.html
111768
111806
  *
111769
111807
  * Contributors:
111770
111808
  * BSI Business Systems Integration AG - initial API and implementation
@@ -111802,8 +111840,6 @@ class TileGrid extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
111802
111840
  this.selectedTiles = [];
111803
111841
  this.selectionHandler = new _index__WEBPACK_IMPORTED_MODULE_0__.TileGridSelectionHandler(this);
111804
111842
  this.scrollable = true;
111805
- this.scrolling = false;
111806
- this.scrollTopDirty = false;
111807
111843
  this.startupAnimationDone = false;
111808
111844
  this.startupAnimationEnabled = false;
111809
111845
  this.tiles = [];
@@ -112422,9 +112458,7 @@ class TileGrid extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
112422
112458
  let scrollLeft = this.$container[0].scrollLeft;
112423
112459
 
112424
112460
  if (this.scrollTop !== scrollTop && this.virtual) {
112425
- this.scrolling = true;
112426
- this.revalidateLayout();
112427
- this.scrolling = false;
112461
+ this.htmlComp.layout.updateViewPort();
112428
112462
  }
112429
112463
 
112430
112464
  this.scrollTop = scrollTop;
@@ -112432,9 +112466,7 @@ class TileGrid extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
112432
112466
  }
112433
112467
 
112434
112468
  _onScrollParentScroll(event) {
112435
- this.scrolling = true;
112436
- this.revalidateLayoutTree(false);
112437
- this.scrolling = false;
112469
+ this.htmlComp.layout.updateViewPort();
112438
112470
  }
112439
112471
 
112440
112472
  setWithPlaceholders(withPlaceholders) {
@@ -112828,12 +112860,8 @@ class TileGrid extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
112828
112860
  this.ensureTileRendered(tile); // If tile was not rendered it is not yet positioned correctly -> make sure layout is valid before trying to scroll
112829
112861
  // Layout must not render the viewport because scroll position is not correct yet -> just make sure tiles are at the correct position
112830
112862
 
112831
- this.scrolling = true;
112832
- this.scrollTopDirty = true;
112833
- this.validateLayoutTree();
112834
- this.scrolling = false;
112863
+ this.htmlComp.layout.updateViewPort(true);
112835
112864
  tile.reveal(options);
112836
- this.scrollTopDirty = false;
112837
112865
  }
112838
112866
 
112839
112867
  revealSelection() {
@@ -113638,7 +113666,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
113638
113666
  * All rights reserved. This program and the accompanying materials
113639
113667
  * are made available under the terms of the Eclipse Public License v1.0
113640
113668
  * which accompanies this distribution, and is available at
113641
- * http://www.eclipse.org/legal/epl-v10.html
113669
+ * https://www.eclipse.org/legal/epl-v10.html
113642
113670
  *
113643
113671
  * Contributors:
113644
113672
  * BSI Business Systems Integration AG - initial API and implementation
@@ -113676,23 +113704,33 @@ class TileGridLayout extends _index__WEBPACK_IMPORTED_MODULE_0__.LogicalGridLayo
113676
113704
  this.rowHeight = dim.height;
113677
113705
  this.maxWidth = -1;
113678
113706
  }
113707
+ /**
113708
+ *
113709
+ * @param {boolean} [scrollTopDirty] If the scroll top position should be considered dirty while updating the view port.
113710
+ * If true, the view port is not rendered, as the scroll positions are not reliable anyway. Then only the layout of the TileGrid is updated.
113711
+ */
113679
113712
 
113680
- layout($container) {
113681
- let htmlComp = this.widget.htmlComp;
113682
-
113683
- if (this.widget.scrolling) {
113684
- // Try to layout only as much as needed while scrolling in virtual mode
113685
- // Scroll top may be dirty when layout is validated before scrolling to a specific tile (see tileGrid.scrollTo)
113686
- if (!this.widget.scrollTopDirty) {
113687
- this.widget._renderViewPort();
113688
- }
113689
113713
 
113690
- this._layout($container);
113714
+ updateViewPort(scrollTopDirty) {
113715
+ let tileGrid = this.widget;
113691
113716
 
113692
- this.widget.trigger('layoutAnimationDone');
113717
+ if (!tileGrid.rendered) {
113693
113718
  return;
113694
- } // Animate only once on startup (if enabled) but animate every time on resize
113719
+ } // Try to layout only as much as needed while scrolling in virtual mode
113720
+ // Scroll top may be dirty when layout is validated before scrolling to a specific tile (see tileGrid.scrollTo)
113721
+
113695
113722
 
113723
+ if (!scout.nvl(scrollTopDirty, false)) {
113724
+ tileGrid._renderViewPort();
113725
+ }
113726
+
113727
+ this._layout(tileGrid.$container);
113728
+
113729
+ tileGrid.trigger('layoutAnimationDone');
113730
+ }
113731
+
113732
+ layout($container) {
113733
+ let htmlComp = this.widget.htmlComp; // Animate only once on startup (if enabled) but animate every time on resize
113696
113734
 
113697
113735
  let animated = htmlComp.layouted || this.widget.startupAnimationEnabled && !this.widget.startupAnimationDone || this.widget.renderAnimationEnabled;
113698
113736
  this.tiles = this.widget.renderedTiles(); // Make them invisible otherwise the influence scrollHeight (e.g. if grid is scrolled to the very bottom and tiles are filtered, scrollbar would still increase scroll height)
@@ -114930,7 +114968,7 @@ __webpack_require__.r(__webpack_exports__);
114930
114968
  * All rights reserved. This program and the accompanying materials
114931
114969
  * are made available under the terms of the Eclipse Public License v1.0
114932
114970
  * which accompanies this distribution, and is available at
114933
- * http://www.eclipse.org/legal/epl-v10.html
114971
+ * https://www.eclipse.org/legal/epl-v10.html
114934
114972
  *
114935
114973
  * Contributors:
114936
114974
  * BSI Business Systems Integration AG - initial API and implementation
@@ -115308,26 +115346,7 @@ class TileAccordion extends _index__WEBPACK_IMPORTED_MODULE_0__.Accordion {
115308
115346
  }
115309
115347
 
115310
115348
  _filter() {
115311
- this.groups.forEach(group => {
115312
- group.body.filter(); // If the layout has not been invalidated as part of the filtering above, it even though must be validated here.
115313
- // This is because groups above might have fewer visible Tiles now which makes room for this group.
115314
- // The revalidateLayout() with scrolling=true here ensures TileGrid._renderViewPort() is called to ensure these Tiles become visible as there is space available now.
115315
- // It is executed as postValidateFunction because the groups above must have completed their layouting so that
115316
- // TileGrid._renderViewPort() knows that there is more space available now.
115317
-
115318
- if (group.body.htmlComp && group.body.htmlComp.valid && !group.body._accordionLayoutHandler
115319
- /* skip if already registered */
115320
- ) {
115321
- group.body._accordionLayoutHandler = () => {
115322
- group.body.scrolling = true;
115323
- group.body.revalidateLayout();
115324
- group.body.scrolling = false;
115325
- group.body._accordionLayoutHandler = null;
115326
- };
115327
-
115328
- this.session.layoutValidator.schedulePostValidateFunction(group.body._accordionLayoutHandler);
115329
- }
115330
- });
115349
+ this.groups.forEach(group => group.body.filter());
115331
115350
  }
115332
115351
  /**
115333
115352
  * @returns {FilterSupport}
@@ -115687,10 +115706,8 @@ class TileAccordion extends _index__WEBPACK_IMPORTED_MODULE_0__.Accordion {
115687
115706
  return;
115688
115707
  }
115689
115708
 
115690
- if (group.body.virtual) {
115691
- group.body.scrolling = true;
115692
- group.body.revalidateLayout();
115693
- group.body.scrolling = false;
115709
+ if (group.body.virtual && group.body.htmlComp) {
115710
+ group.body.htmlComp.layout.updateViewPort();
115694
115711
  }
115695
115712
  });
115696
115713
  }
@@ -115771,11 +115788,11 @@ __webpack_require__.r(__webpack_exports__);
115771
115788
  /* harmony export */ });
115772
115789
  /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../index */ "./src/index.js");
115773
115790
  /*
115774
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
115791
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
115775
115792
  * All rights reserved. This program and the accompanying materials
115776
115793
  * are made available under the terms of the Eclipse Public License v1.0
115777
115794
  * which accompanies this distribution, and is available at
115778
- * http://www.eclipse.org/legal/epl-v10.html
115795
+ * https://www.eclipse.org/legal/epl-v10.html
115779
115796
  *
115780
115797
  * Contributors:
115781
115798
  * BSI Business Systems Integration AG - initial API and implementation
@@ -115788,9 +115805,47 @@ class TileAccordionLayout extends _index__WEBPACK_IMPORTED_MODULE_0__.AccordionL
115788
115805
  }
115789
115806
 
115790
115807
  layout($container) {
115808
+ let previousGroupHeights = this.tileAccordion.groups.map(group => group.body).map(tileGrid => this._getTileGridHeight(tileGrid));
115791
115809
  super.layout($container);
115792
115810
 
115793
115811
  this._updateFilterFieldMaxWidth($container);
115812
+
115813
+ this.tileAccordion.groups.map(group => group.body).forEach((tileGrid, index) => this._updateTileGridViewPort(tileGrid, previousGroupHeights[index]));
115814
+ }
115815
+
115816
+ _updateTileGridViewPort(tileGrid, previousHeight) {
115817
+ if (!tileGrid.rendered || !tileGrid.htmlComp || previousHeight <= 0) {
115818
+ return;
115819
+ }
115820
+
115821
+ let newHeight = this._getTileGridHeight(tileGrid);
115822
+
115823
+ if (previousHeight === newHeight && tileGrid.virtual) {
115824
+ // The viewPort of the virtual tileGrid has not been updated as no layout update was done for the grid because its height is unchanged.
115825
+ // But as there might be more space available in the accordion now (its height might have changed), enforce a viewPort update to ensure all necessary tiles are rendered.
115826
+ tileGrid.setViewRangeSize(tileGrid.calculateViewRangeSize(), false);
115827
+ tileGrid.htmlComp.layout.updateViewPort();
115828
+ }
115829
+ }
115830
+
115831
+ _getTileGridHeight(tileGrid) {
115832
+ if (!tileGrid) {
115833
+ return 0;
115834
+ }
115835
+
115836
+ let htmlComp = tileGrid.htmlComp;
115837
+
115838
+ if (!htmlComp) {
115839
+ return 0;
115840
+ }
115841
+
115842
+ let size = tileGrid.htmlComp.sizeCached;
115843
+
115844
+ if (!size) {
115845
+ return 0;
115846
+ }
115847
+
115848
+ return size.height;
115794
115849
  }
115795
115850
 
115796
115851
  _updateFilterFieldMaxWidth($container) {
@@ -121737,6 +121792,10 @@ class Tree extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
121737
121792
  } else if (newWidth > this.maxNodeWidth) {
121738
121793
  this.maxNodeWidth = newWidth;
121739
121794
  this.nodeWidthDirty = true;
121795
+ } else if (newWidth === oldWidth && newWidth === 0) {
121796
+ // newWidth and oldWidth are 0: this might be because the tree is invisible while a node is added:
121797
+ // Mark as dirty to update the width later during layouting (when the tree gets visible and the width is available)
121798
+ this.nodeWidthDirty = true;
121740
121799
  }
121741
121800
 
121742
121801
  node.width = newWidth;
@@ -126462,6 +126521,10 @@ __webpack_require__.r(__webpack_exports__);
126462
126521
 
126463
126522
  /**
126464
126523
  * Ensures the given parameter is an array
126524
+ *
126525
+ * @template T
126526
+ * @param {T[]|T|null} array
126527
+ * @return T[]
126465
126528
  */
126466
126529
 
126467
126530
  function ensure(array) {
@@ -130754,6 +130817,7 @@ __webpack_require__.r(__webpack_exports__);
130754
130817
  /* harmony export */ "someProperties": () => (/* binding */ someProperties),
130755
130818
  /* harmony export */ "valueCopy": () => (/* binding */ valueCopy),
130756
130819
  /* harmony export */ "findChildObjectByKey": () => (/* binding */ findChildObjectByKey),
130820
+ /* harmony export */ "getByPath": () => (/* binding */ getByPath),
130757
130821
  /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
130758
130822
  /* harmony export */ "optProperty": () => (/* binding */ optProperty),
130759
130823
  /* harmony export */ "isNumber": () => (/* binding */ isNumber),
@@ -130916,6 +130980,10 @@ function someProperties(obj, properties) {
130916
130980
  return prop in obj;
130917
130981
  });
130918
130982
  }
130983
+ /**
130984
+ * @return {*}
130985
+ */
130986
+
130919
130987
  function valueCopy(obj) {
130920
130988
  // Nothing to be done for immutable things
130921
130989
  if (obj === undefined || obj === null || typeof obj !== 'object') {
@@ -131093,7 +131161,6 @@ function getByPath(object, path) {
131093
131161
  * Returns true if the given object is an object, _not_ an array and not null or undefined.
131094
131162
  */
131095
131163
 
131096
-
131097
131164
  function isPlainObject(obj) {
131098
131165
  return typeof obj === 'object' && !isNullOrUndefined(obj) && !Array.isArray(obj);
131099
131166
  }
@@ -133121,7 +133188,7 @@ __webpack_require__.r(__webpack_exports__);
133121
133188
  * All rights reserved. This program and the accompanying materials
133122
133189
  * are made available under the terms of the Eclipse Public License v1.0
133123
133190
  * which accompanies this distribution, and is available at
133124
- * http://www.eclipse.org/legal/epl-v10.html
133191
+ * https://www.eclipse.org/legal/epl-v10.html
133125
133192
  *
133126
133193
  * Contributors:
133127
133194
  * BSI Business Systems Integration AG - initial API and implementation
@@ -133246,21 +133313,11 @@ class FilterSupport extends _index__WEBPACK_IMPORTED_MODULE_0__.WidgetSupport {
133246
133313
 
133247
133314
  this._filterField.$field.attr('tabIndex', -1);
133248
133315
 
133249
- let color = _index__WEBPACK_IMPORTED_MODULE_0__.styles.getFirstOpaqueBackgroundColor(this._filterField.$container),
133250
- colorRgba = $.extend(true, {
133251
- red: 0,
133252
- green: 0,
133253
- blue: 0,
133254
- alpha: 1
133255
- }, _index__WEBPACK_IMPORTED_MODULE_0__.styles.rgb(color)),
133256
- transparent50Color = 'rgba(' + colorRgba.red + ', ' + colorRgba.green + ', ' + colorRgba.blue + ', ' + 0.5 + ')',
133257
- transparent80Color = 'rgba(' + colorRgba.red + ', ' + colorRgba.green + ', ' + colorRgba.blue + ', ' + 0.8 + ')';
133258
-
133259
- this._filterField.$container.css('--filter-field-background-color', color);
133260
-
133261
- this._filterField.$container.css('--filter-field-transparent-50-background-color', transparent50Color);
133262
-
133263
- this._filterField.$container.css('--filter-field-transparent-80-background-color', transparent80Color);
133316
+ if (!this.widget.rendered) {
133317
+ this.widget.session.layoutValidator.schedulePostValidateFunction(this._updateFilterFieldBackgroundColor.bind(this));
133318
+ } else {
133319
+ this._updateFilterFieldBackgroundColor();
133320
+ }
133264
133321
 
133265
133322
  this._textFilter = this._createTextFilter();
133266
133323
  this._textFilter.synthetic = true;
@@ -133292,6 +133349,28 @@ class FilterSupport extends _index__WEBPACK_IMPORTED_MODULE_0__.WidgetSupport {
133292
133349
  this._filterField.keyStrokeContext.registerKeyStroke(this._exitFilterFieldKeyStroke);
133293
133350
  }
133294
133351
 
133352
+ _updateFilterFieldBackgroundColor() {
133353
+ if (!this._filterField || !this._filterField.rendered) {
133354
+ return;
133355
+ }
133356
+
133357
+ let color = _index__WEBPACK_IMPORTED_MODULE_0__.styles.getFirstOpaqueBackgroundColor(this._filterField.$container),
133358
+ colorRgba = $.extend(true, {
133359
+ red: 0,
133360
+ green: 0,
133361
+ blue: 0,
133362
+ alpha: 1
133363
+ }, _index__WEBPACK_IMPORTED_MODULE_0__.styles.rgb(color)),
133364
+ transparent50Color = 'rgba(' + colorRgba.red + ', ' + colorRgba.green + ', ' + colorRgba.blue + ', ' + 0.5 + ')',
133365
+ transparent80Color = 'rgba(' + colorRgba.red + ', ' + colorRgba.green + ', ' + colorRgba.blue + ', ' + 0.8 + ')';
133366
+
133367
+ this._filterField.$container.css('--filter-field-background-color', color);
133368
+
133369
+ this._filterField.$container.css('--filter-field-transparent-50-background-color', transparent50Color);
133370
+
133371
+ this._filterField.$container.css('--filter-field-transparent-80-background-color', transparent80Color);
133372
+ }
133373
+
133295
133374
  _onFilterFieldDisplayTextChanged(event) {
133296
133375
  if (this._filterField && this._filterField.rendered) {
133297
133376
  this._filterField.$container.toggleClass('empty', !event.newValue);