devexpress-aspnetcore-spreadsheet 19.1.10 → 19.1.14

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * DevExpress AspNetCore Spreadsheet (dx-aspnetcore-spreadsheet.js)
3
- * Version: 19.1.10
4
- * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
3
+ * Version: 19.1.14
4
+ * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
7
7
  /*# namespace DevExpress.Web.Scripts #*/
@@ -10084,7 +10084,7 @@ var AccessibilityPronouncer = ASPx.CreateClass(null, {
10084
10084
  this.focusableMessageElement = focusableMessageElement;
10085
10085
  },
10086
10086
  prepareFocusableMessageElement: function() {
10087
- this.focusableMessageElement.className = "dxAIFFE";
10087
+ this.focusableMessageElement.className = "dxAIFME";
10088
10088
  },
10089
10089
  setAttributesForKeyboardNavigation: function() {
10090
10090
  ASPx.Attr.Aria.SetApplicationRole(this.focusableMessageElement);
@@ -11144,6 +11144,18 @@ var BeforeInitCallbackEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
11144
11144
  this.callbackOwnerID = callbackOwnerID;
11145
11145
  }
11146
11146
  });
11147
+ var ASPxClientBrowserWindowResizedInternalEventArgs = ASPx.CreateClass(ASPxClientEventArgs, {
11148
+ constructor: function(eventInfo) {
11149
+ this.constructor.prototype.constructor.call(this);
11150
+
11151
+ this.htmlEvent = eventInfo.htmlEvent;
11152
+ this.windowClientWidth = eventInfo.wndWidth;
11153
+ this.windowClientHeigth = eventInfo.wndHeight;
11154
+ this.previousWindowClientWidth = eventInfo.prevWndWidth;
11155
+ this.previousWindowClientHeight = eventInfo.prevWndHeight;
11156
+ this.virtualKeyboardShownOnAndroid = eventInfo.virtualKeyboardShownOnAndroid;
11157
+ }
11158
+ });
11147
11159
 
11148
11160
  ASPx.createControl = function(type, name, windowName, properties, events, setupMethod, data){
11149
11161
  var globalName = windowName && windowName.length > 0 ? windowName : name;
@@ -11222,6 +11234,8 @@ var ASPxClientControlBase = ASPx.CreateClass(null, {
11222
11234
  this.callbackCommand = {};
11223
11235
  this.currentCallbackID = -1;
11224
11236
 
11237
+ this.InitializeIntersectionObserversManager();
11238
+
11225
11239
  /*# public event ASPxClientEventHandler Init{ add{} remove{}}#*/
11226
11240
  this.Init = new ASPxClientEvent();
11227
11241
  this.BeginCallback = new ASPxClientEvent();
@@ -12246,6 +12260,7 @@ var ASPxClientControlBase = ASPx.CreateClass(null, {
12246
12260
 
12247
12261
  var command = this.GetCallbackCommand();
12248
12262
  this.RaiseEndCallback(command);
12263
+ this.InitializeIntersectionObserversManager();
12249
12264
  this.currentCallbackID = -1;
12250
12265
  },
12251
12266
  DoFinalizeCallback: function() {
@@ -12510,7 +12525,18 @@ var ASPxClientControlBase = ASPx.CreateClass(null, {
12510
12525
  },
12511
12526
  AdjustControl: function(nestedCall) { },
12512
12527
  OnBrowserWindowResizeInternal: function(e) { },
12513
- RegisterInControlTree: function(tree) { }
12528
+ RegisterInControlTree: function(tree) { },
12529
+
12530
+ InitializeIntersectionObserversManager: function () {
12531
+ var elementToObserve = this.getElementToObserveVisibilityChange();
12532
+ if(elementToObserve) {
12533
+ ASPx.IntersectionObserversManager.SubscribeElemensVisibilityChangeInBrowserWindow(elementToObserve, this.processVisibilityChanged.bind(this));
12534
+ }
12535
+ },
12536
+ //virtual
12537
+ getElementToObserveVisibilityChange: function () { },
12538
+ //virtual
12539
+ processVisibilityChanged: function (visible) { }
12514
12540
  });
12515
12541
 
12516
12542
  /*# public static ASPxClientControlBase Cast(object obj){ return null; } #*/
@@ -13058,6 +13084,8 @@ var ASPxClientControlCollection = ASPx.CreateClass(ASPx.CollectionBase, {
13058
13084
  this.ControlsInitialized = new ASPxClientEvent();
13059
13085
  /*# public event ASPxClientEventHandler BrowserWindowResized { add{} remove{} } #*/
13060
13086
  this.BrowserWindowResized = new ASPxClientEvent();
13087
+ this.BrowserWindowResizedInternal = new ASPxClientEvent();
13088
+
13061
13089
  /*# public event ASPxClientGlobalBeginCallbackEventHandler BeginCallback { add{} remove{} }#*/
13062
13090
  this.BeginCallback = new ASPxClientEvent();
13063
13091
  /*# public event ASPxClientGlobalEndCallbackEventHandler EndCallback { add{} remove{} }#*/
@@ -13281,6 +13309,11 @@ var ASPxClientControlCollection = ASPx.CreateClass(ASPx.CollectionBase, {
13281
13309
  control.OnGlobalBrowserWindowResized(args);
13282
13310
  });
13283
13311
  },
13312
+ RaiseBrowserWindowResizedInternal: function(eventInfo) {
13313
+ var args = new ASPxClientBrowserWindowResizedInternalEventArgs(eventInfo);
13314
+ if(!this.BrowserWindowResizedInternal.IsEmpty())
13315
+ this.BrowserWindowResizedInternal.FireEvent(this, args);
13316
+ },
13284
13317
  RaiseBeginCallback: function (control, command) {
13285
13318
  var args = new ASPxClientGlobalBeginCallbackEventArgs(control, command);
13286
13319
  if(!this.BeginCallback.IsEmpty())
@@ -13350,6 +13383,7 @@ var ASPxClientControlCollection = ASPx.CreateClass(ASPx.CollectionBase, {
13350
13383
  OnBrowserWindowResizeCore: function(htmlEvent){
13351
13384
  var args = this.CreateOnBrowserWindowResizeEventArgs(htmlEvent);
13352
13385
  if(this.CalculateIsBrowserWindowSizeChanged()) {
13386
+ this.RaiseBrowserWindowResizedInternal(args);
13353
13387
  this.adjustControlsInternal(null, this, true, function(control) {
13354
13388
  if(control.IsDOMInitialized())
13355
13389
  control.OnBrowserWindowResizeInternal(args);
@@ -13357,15 +13391,34 @@ var ASPxClientControlCollection = ASPx.CreateClass(ASPx.CollectionBase, {
13357
13391
  this.RaiseBrowserWindowResized();
13358
13392
  }
13359
13393
  },
13360
- CreateOnBrowserWindowResizeEventArgs: function(htmlEvent){
13394
+ CreateOnBrowserWindowResizeEventArgs: function(htmlEvent) {
13395
+
13361
13396
  return {
13362
13397
  htmlEvent: htmlEvent,
13363
13398
  wndWidth: ASPx.GetDocumentClientWidth(),
13364
13399
  wndHeight: ASPx.GetDocumentClientHeight(),
13365
13400
  prevWndWidth: this.prevWndWidth,
13366
- prevWndHeight: this.prevWndHeight
13401
+ prevWndHeight: this.prevWndHeight,
13402
+ virtualKeyboardShownOnAndroid: this.IsVirtualKeyboardShownOnAndroid()
13367
13403
  };
13368
13404
  },
13405
+ IsVirtualKeyboardShownOnAndroid: function() {
13406
+ if(!ASPx.Browser.AndroidMobilePlatform)
13407
+ return false;
13408
+
13409
+ var documentClientWidth = ASPx.GetDocumentClientWidth();
13410
+ var documentClientHeight = ASPx.GetDocumentClientHeight();
13411
+
13412
+ var isDocumentClientHeightChangedOnly = documentClientWidth === this.prevWndWidth && documentClientHeight !== this.prevWndHeight;
13413
+ return isDocumentClientHeightChangedOnly && this.IsElementSupportKeyboardInput(document.activeElement);
13414
+ },
13415
+ IsElementSupportKeyboardInput: function(element) {
13416
+ if(!element || !element.tagName)
13417
+ return false;
13418
+
13419
+ var supportedKeyboardInputTagNames = ["INPUT", "TEXTAREA"];
13420
+ return supportedKeyboardInputTagNames.indexOf(element.tagName) !== -1;
13421
+ },
13369
13422
  CalculateIsBrowserWindowSizeChanged: function(){
13370
13423
  var wndWidth = ASPx.GetDocumentClientWidth();
13371
13424
  var wndHeight = ASPx.GetDocumentClientHeight();
@@ -15870,7 +15923,14 @@ var ASPxClientSpreadsheet = ASPx.CreateClass(ASPxClientControl, {
15870
15923
  this.tileSize = { col: 0, row: 0 };
15871
15924
  this.defaultCellSize = { width: 0, height: 0 };
15872
15925
  this.visibleRangePadding = { col: 0, row: 0 };
15873
- this.lastFilledCell = { col: 0, row: 0 };
15926
+ this.lastFilledCell = {
15927
+ cellModelPosition: {
15928
+ col: 0, row: 0
15929
+ },
15930
+ cellVisiblePosition: {
15931
+ col: 0, row: 0
15932
+ }
15933
+ };
15874
15934
  this.currentActiveCell = {col:-1, row:-1}; // TODO rename to this.currentActiveCellForSelection
15875
15935
  this.stateController = null;
15876
15936
  this.sheetLoaded = false;
@@ -17359,13 +17419,13 @@ var ASPxClientSpreadsheet = ASPx.CreateClass(ASPxClientControl, {
17359
17419
  var hasModelIndicesScrollAnchor = scrollAnchor.col >= 0 && scrollAnchor.row >= 0;
17360
17420
 
17361
17421
  if(hasModelIndicesScrollAnchor) {
17362
- args.push("scrollAnchor.col=" + scrollAnchor.col);
17363
- args.push("scrollAnchor.row=" + scrollAnchor.row);
17422
+ args.push("scrollAnchor.modelColumn=" + scrollAnchor.col);
17423
+ args.push("scrollAnchor.modelRow=" + scrollAnchor.row);
17364
17424
  } else {
17365
17425
  scrollAnchor = paneManager.getScrollHelper().getTopLeftCellByScrollPosition();
17366
17426
  if(scrollAnchor.IsValid() && (scrollAnchor.Column > 0 || scrollAnchor.Row > 0)) {
17367
- args.push("scrollAnchor.col=" + scrollAnchor.Column);
17368
- args.push("scrollAnchor.row=" + scrollAnchor.Row);
17427
+ args.push("scrollAnchor.visibleColumn=" + scrollAnchor.Column);
17428
+ args.push("scrollAnchor.visibleRow=" + scrollAnchor.Row);
17369
17429
  } else {
17370
17430
  var scrollContainer = this.getRenderHelper().getScrollContainer();
17371
17431
  args.push("scrollTop=" + scrollContainer.scrollTop);
@@ -17669,8 +17729,7 @@ var ASPxClientSpreadsheet = ASPx.CreateClass(ASPxClientControl, {
17669
17729
  },
17670
17730
  setLastFilledCell: function(lastFilledCell) {
17671
17731
  if(lastFilledCell) {
17672
- this.lastFilledCell.col = lastFilledCell[ASPxClientSpreadsheet.DocumentModel.CellStringKeys.Column];
17673
- this.lastFilledCell.row = lastFilledCell[ASPxClientSpreadsheet.DocumentModel.CellStringKeys.Row];
17732
+ this.lastFilledCell = lastFilledCell;
17674
17733
  }
17675
17734
  },
17676
17735
  isNewSheetLoaded: function(response) {
@@ -20777,8 +20836,13 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
20777
20836
  this.loadTilesRequestId = 1;
20778
20837
  },
20779
20838
  getHeaderOffsetSize: function() {
20780
- var rowIndex = (this.getLastVisibleHeaderRowTileIndex() + 1) * this.getTileSize().row,
20781
- textLength = rowIndex.toString().length;
20839
+ var lastVisibleRowTileIndex = this.getTileHelper().getLastVisibleHeaderRowTileIndex();
20840
+ var lastTileHeaderInfo = this.getHeaderInfo(lastVisibleRowTileIndex);
20841
+ var lastRowModelIndex = lastTileHeaderInfo && lastTileHeaderInfo.modelIndices ? lastTileHeaderInfo.modelIndices[lastTileHeaderInfo.modelIndices.length - 1] : 0;
20842
+ var endOfDocumentCellInfo = this.getTileHelper().getEndOfDocumentCellInfo(false);
20843
+ if(endOfDocumentCellInfo)
20844
+ lastRowModelIndex = Math.min(endOfDocumentCellInfo.modelIndex, lastRowModelIndex);
20845
+ var textLength = lastRowModelIndex.toString().length;
20782
20846
  var width = this.headerOffsetWidths.length >= textLength ? this.headerOffsetWidths[textLength - 1] : this.headerOffsetWidths[this.headerOffsetWidths.length - 1];
20783
20847
  return {
20784
20848
  width: width,
@@ -22276,7 +22340,14 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22276
22340
 
22277
22341
  this.spacer = 50000 + 1; // header border
22278
22342
 
22279
- this.lastVisibleCell = { col: 0, row: 0 };
22343
+ this.lastVisibleCell = {
22344
+ cellModelPosition: {
22345
+ col: 0, row: 0
22346
+ },
22347
+ cellVisiblePosition: {
22348
+ col: 0, row: 0
22349
+ }
22350
+ };
22280
22351
 
22281
22352
  this.loadTilesTimerID = -1;
22282
22353
  this.loadTilesTimeout = 50;
@@ -22347,8 +22418,14 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22347
22418
  getLastVisibleCell: function() {
22348
22419
  var lastFilledCell = this.paneManager.getLastFilledCell();
22349
22420
  return {
22350
- col: Math.max(this.lastVisibleCell.col, lastFilledCell.col),
22351
- row: Math.max(this.lastVisibleCell.row, lastFilledCell.row)
22421
+ cellModelPosition: {
22422
+ col: Math.max(this.lastVisibleCell.cellModelPosition.col, lastFilledCell.cellModelPosition.col),
22423
+ row: Math.max(this.lastVisibleCell.cellModelPosition.row, lastFilledCell.cellModelPosition.row)
22424
+ },
22425
+ cellVisiblePosition: {
22426
+ col: Math.max(this.lastVisibleCell.cellVisiblePosition.col, lastFilledCell.cellVisiblePosition.col),
22427
+ row: Math.max(this.lastVisibleCell.cellVisiblePosition.row, lastFilledCell.cellVisiblePosition.row)
22428
+ }
22352
22429
  };
22353
22430
  },
22354
22431
  getIsEditingCellVisible: function(rect, cellLayoutInfo) {
@@ -22593,20 +22670,28 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22593
22670
  if(hasNoMoreScrollSpace && this.hasAnyCellsForward(isHorz)) {
22594
22671
  var lastVisibleCell = this.getLastVisibleCell();
22595
22672
 
22596
- if(isHorz)
22597
- lastVisibleCell.col += colOrRowSize;
22598
- else
22599
- lastVisibleCell.row += colOrRowSize;
22673
+ if(isHorz) {
22674
+ lastVisibleCell.cellModelPosition.col += colOrRowSize;
22675
+ lastVisibleCell.cellVisiblePosition.col += colOrRowSize;
22676
+ }
22677
+ else {
22678
+ lastVisibleCell.cellModelPosition.row += colOrRowSize;
22679
+ lastVisibleCell.cellVisiblePosition.row += colOrRowSize;
22680
+ }
22600
22681
  this.lastVisibleCell = lastVisibleCell;
22601
22682
 
22602
22683
  this.updateScrollSize();
22603
22684
  }
22604
22685
  },
22605
22686
  changeScrollableArea: function(isHorz, lastVisibleCell) {
22606
- if(isHorz)
22607
- lastVisibleCell.col += this.tileSize.col;
22608
- else
22609
- lastVisibleCell.row += this.tileSize.row;
22687
+ if(isHorz) {
22688
+ lastVisibleCell.cellModelPosition.col += this.tileSize.col;
22689
+ lastVisibleCell.cellVisiblePosition.col += this.tileSize.col;
22690
+ }
22691
+ else {
22692
+ lastVisibleCell.cellModelPosition.row += this.tileSize.row;
22693
+ lastVisibleCell.cellVisiblePosition.row += this.tileSize.row;
22694
+ }
22610
22695
  this.lastVisibleCell = lastVisibleCell;
22611
22696
  this.updateScrollSize();
22612
22697
  },
@@ -22722,8 +22807,8 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22722
22807
 
22723
22808
  getScrollContentAreaWidthSize: function() {
22724
22809
  var lastVisibleCell = this.getLastVisibleCell();
22725
- var colIndex = lastVisibleCell.col;
22726
- var tileIndex = Math.floor(colIndex / this.tileSize.col);
22810
+ var colIndex = lastVisibleCell.cellVisiblePosition.col;
22811
+ var tileIndex = Math.floor((colIndex + 1) / this.tileSize.col);
22727
22812
 
22728
22813
  var size = 0;
22729
22814
  var counterIndex = 0;
@@ -22755,8 +22840,8 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22755
22840
  },
22756
22841
  getScrollContentAreaHeightSize: function() {
22757
22842
  var lastVisibleCell = this.getLastVisibleCell();
22758
- var rowIndex = lastVisibleCell.row;
22759
- var tileIndex = Math.floor(rowIndex / this.tileSize.row);
22843
+ var rowIndex = lastVisibleCell.cellVisiblePosition.row;
22844
+ var tileIndex = Math.floor((rowIndex + 1) / this.tileSize.row);
22760
22845
 
22761
22846
  var size = 0;
22762
22847
  var counterIndex = 0;
@@ -22886,6 +22971,9 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22886
22971
  }
22887
22972
  if(width - summarySize > 0)
22888
22973
  colIndex += Math.floor(width / this.getDefaultCellSize().width);
22974
+ var maxColumnIndex = (this.getTileHelper().getEndOfDocumentCellInfo(true)) ? this.getTileHelper().getEndOfDocumentCellInfo(true).visibleIndex + 1 : colIndex + 1;
22975
+ if(colIndex > maxColumnIndex)
22976
+ colIndex = maxColumnIndex;
22889
22977
  return colIndex;
22890
22978
  },
22891
22979
  getRowCountByHeight: function(height) {
@@ -22912,6 +23000,9 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22912
23000
  }
22913
23001
  if(height - summarySize > 0)
22914
23002
  colIndex += Math.floor(height / this.getDefaultCellSize().height);
23003
+ var maxRowIndex = (this.getTileHelper().getEndOfDocumentCellInfo(false)) ? this.getTileHelper().getEndOfDocumentCellInfo(false).visibleIndex + 1 : colIndex + 1;
23004
+ if(colIndex > maxRowIndex)
23005
+ colIndex = maxRowIndex;
22915
23006
  return colIndex;
22916
23007
  },
22917
23008
 
@@ -22950,7 +23041,7 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
22950
23041
  var minHeight = scrollDiv.offsetHeight + this.getDefaultCellSize().height;
22951
23042
 
22952
23043
  var lastVisibleCell = this.getLastVisibleCell();
22953
- if(this.getLastScrollingCell().col == lastVisibleCell.col && this.getLastScrollingCell().row == lastVisibleCell.row && !recalculate)
23044
+ if(this.getLastScrollingCell().col == lastVisibleCell.cellModelPosition.col && this.getLastScrollingCell().row == lastVisibleCell.cellModelPosition.row && !recalculate)
22954
23045
  return;
22955
23046
 
22956
23047
  var calcWidth = this.getScrollContentAreaWidthSize() - this.getMinimumScrollLeftPosition();
@@ -23002,7 +23093,7 @@ window.ASPxClientSpreadsheetCustomCommandExecutedEventArgs = ASPxClientSpreadshe
23002
23093
  },
23003
23094
 
23004
23095
  setLastScrollingCell: function(cell) {
23005
- this.lastScrollingCell = cell;
23096
+ this.lastScrollingCell = cell.cellModelPosition;
23006
23097
  },
23007
23098
  getLastScrollingCell: function() {
23008
23099
  return this.lastScrollingCell;
@@ -36599,9 +36690,12 @@ ASPxClientSpreadsheet.ServerCommands = (function() {
36599
36690
 
36600
36691
  if(colIndex < 0)
36601
36692
  colIndex = 0;
36602
- else if(colIndex >= ASPxClientSpreadsheet.Range.MAX_COL_COUNT)
36603
- colIndex = ASPxClientSpreadsheet.Range.MAX_COL_COUNT - 1;
36604
-
36693
+ else {
36694
+ var endOfDocumentCellInfo = spreadsheetControl.getPaneManager().getTileHelper().getEndOfDocumentCellInfo(true);
36695
+ var maxVisibleColumnIndex = (endOfDocumentCellInfo) ? endOfDocumentCellInfo.visibleIndex : -1;
36696
+ if(maxVisibleColumnIndex !== -1 && colIndex >= maxVisibleColumnIndex)
36697
+ colIndex = maxVisibleColumnIndex - 1;
36698
+ }
36605
36699
  return getNextCellInfo(colIndex, rowIndex);
36606
36700
  }
36607
36701
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devexpress-aspnetcore-spreadsheet",
3
- "version": "19.1.10",
3
+ "version": "19.1.14",
4
4
  "homepage": "https://www.devexpress.com/",
5
5
  "bugs": "https://www.devexpress.com/support/",
6
6
  "author": "Developer Express Inc.",
@@ -11,7 +11,7 @@
11
11
  "localization": "node bin/localization-builder.js localization-source localization"
12
12
  },
13
13
  "peerDependencies": {
14
- "devextreme": "19.1.10"
14
+ "devextreme": "19.1.14"
15
15
  },
16
16
  "keywords": [
17
17
  "spreadsheet",