Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ag-grid-enterprise/viewport-row-model

Package Overview
Dependencies
Maintainers
3
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/viewport-row-model - npm Package Compare versions

Comparing version 31.1.0 to 31.1.1

2

dist/cjs/es5/version.d.ts

@@ -1,1 +0,1 @@

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";

@@ -5,2 +5,2 @@ "use strict";

// DO NOT UPDATE MANUALLY: Generated from script during build time
exports.VERSION = '31.1.0';
exports.VERSION = '31.1.1';

@@ -1,1 +0,1 @@

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";

@@ -5,2 +5,2 @@ "use strict";

// DO NOT UPDATE MANUALLY: Generated from script during build time
exports.VERSION = '31.1.0';
exports.VERSION = '31.1.1';

@@ -1,1 +0,1 @@

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";
// DO NOT UPDATE MANUALLY: Generated from script during build time
export var VERSION = '31.1.0';
export var VERSION = '31.1.1';

@@ -1,1 +0,1 @@

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";
/**
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.0
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1
* @link https://www.ag-grid.com/

@@ -14,3 +14,3 @@ * @license Commercial

// DO NOT UPDATE MANUALLY: Generated from script during build time
var VERSION = '31.1.0';
var VERSION = '31.1.1';

@@ -17,0 +17,0 @@ var __extends = (undefined && undefined.__extends) || (function () {

/**
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.0
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1
* @link https://www.ag-grid.com/

@@ -7,6 +7,6 @@ * @license Commercial

/**
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.0
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1
* @link https://www.ag-grid.com/
* @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("@ag-grid-community/core"),o=require("@ag-grid-enterprise/core"),r=(t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)},function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),i=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},n=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.firstRow=-1,e.lastRow=-1,e.rowCount=-1,e.rowNodesByIndex={},e}return r(o,t),o.prototype.ensureRowHeightsValid=function(t,e,o,r){return!1},o.prototype.init=function(){var t=this;this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addManagedListener(this.eventService,e.Events.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this)),this.addManagedPropertyListener("viewportDatasource",(function(){return t.updateDatasource()})),this.addManagedPropertyListener("rowHeight",(function(){t.rowHeight=t.gridOptionsService.getRowHeightAsNumber(),t.updateRowHeights()}))},o.prototype.start=function(){this.updateDatasource()},o.prototype.isLastRowIndexKnown=function(){return!0},o.prototype.destroyDatasource=function(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)},o.prototype.updateDatasource=function(){var t=this.gridOptionsService.get("viewportDatasource");t&&this.setViewportDatasource(t)},o.prototype.getViewportRowModelPageSize=function(){return this.gridOptionsService.get("viewportRowModelPageSize")},o.prototype.getViewportRowModelBufferSize=function(){return this.gridOptionsService.get("viewportRowModelBufferSize")},o.prototype.calculateFirstRow=function(t){var e=this.getViewportRowModelBufferSize(),o=this.getViewportRowModelPageSize(),r=t-e;return r<0?0:Math.floor(r/o)*o},o.prototype.calculateLastRow=function(t){if(-1===t)return t;var e=this.getViewportRowModelBufferSize(),o=this.getViewportRowModelPageSize(),r=t+e,i=Math.ceil(r/o)*o,n=this.rowCount-1;return Math.min(i,n)},o.prototype.onViewportChanged=function(t){var e=this.calculateFirstRow(t.firstRow),o=this.calculateLastRow(t.lastRow);this.firstRow===e&&this.lastRow===o||(this.firstRow=e,this.lastRow=o,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))},o.prototype.purgeRowsNotInViewport=function(){var t=this;Object.keys(this.rowNodesByIndex).forEach((function(e){var o=parseInt(e,10);if(o<t.firstRow||o>t.lastRow){if(t.isRowFocused(o))return;delete t.rowNodesByIndex[o]}}))},o.prototype.isRowFocused=function(t){var e=this.focusService.getFocusCellToUseAfterRefresh();return!!e&&(null==e.rowPinned&&e.rowIndex===t)},o.prototype.setViewportDatasource=function(t){this.destroyDatasource(),this.viewportDatasource=t,this.rowCount=-1,t.init?t.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):console.warn("AG Grid: viewport is missing init method.")},o.prototype.getType=function(){return"viewport"},o.prototype.getRow=function(t){return this.rowNodesByIndex[t]||(this.rowNodesByIndex[t]=this.createBlankRowNode(t)),this.rowNodesByIndex[t]},o.prototype.getRowNode=function(t){var e;return this.forEachNode((function(o){o.id===t&&(e=o)})),e},o.prototype.getRowCount=function(){return-1===this.rowCount?0:this.rowCount},o.prototype.getRowIndexAtPixel=function(t){return 0!==this.rowHeight?Math.floor(t/this.rowHeight):0},o.prototype.getRowBounds=function(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}},o.prototype.updateRowHeights=function(){var t=this;this.forEachNode((function(e){e.setRowHeight(t.rowHeight),e.setRowTop(t.rowHeight*e.rowIndex)}));var o={type:e.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1};this.eventService.dispatchEvent(o)},o.prototype.getTopLevelRowCount=function(){return this.getRowCount()},o.prototype.getTopLevelRowDisplayedIndex=function(t){return t},o.prototype.isEmpty=function(){return this.rowCount>0},o.prototype.isRowsToRender=function(){return this.rowCount>0},o.prototype.getNodesInRangeForSelection=function(t,o){var r=e._.missing(t)?0:t.rowIndex,i=o.rowIndex,n=r<this.firstRow||r>this.lastRow,s=i<this.firstRow||i>this.lastRow;if(n||s)return[];for(var a=[],u=r<=i?i:r,p=r<=i?r:i;p<=u;p++)a.push(this.rowNodesByIndex[p]);return a},o.prototype.forEachNode=function(t){var e=this,o=0;Object.keys(this.rowNodesByIndex).forEach((function(r){var i=parseInt(r,10),n=e.rowNodesByIndex[i];t(n,o),o++}))},o.prototype.setRowData=function(t){var o=this;e._.iterateObject(t,(function(t,r){var i=parseInt(t,10);if(i>=o.firstRow&&i<=o.lastRow){var n=o.rowNodesByIndex[i];e._.missing(n)&&(n=o.createBlankRowNode(i),o.rowNodesByIndex[i]=n),n.setDataAndId(r,i.toString())}}))},o.prototype.createBlankRowNode=function(t){var o=new e.RowNode(this.beans);return o.setRowHeight(this.rowHeight),o.setRowTop(this.rowHeight*t),o.setRowIndex(t),o},o.prototype.setRowCount=function(t,o){if(void 0===o&&(o=!1),t!==this.rowCount){this.rowCount=t,this.eventService.dispatchEventOnce({type:e.Events.EVENT_ROW_COUNT_READY});var r={type:e.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:o,animate:!1};this.eventService.dispatchEvent(r)}},o.prototype.isRowPresent=function(t){return!!this.getRowNode(t.id)},i([e.Autowired("rowRenderer")],o.prototype,"rowRenderer",void 0),i([e.Autowired("focusService")],o.prototype,"focusService",void 0),i([e.Autowired("beans")],o.prototype,"beans",void 0),i([e.PostConstruct],o.prototype,"init",null),i([e.PreDestroy],o.prototype,"destroyDatasource",null),o=i([e.Bean("rowModel")],o)}(e.BeanStub),s={version:"31.1.0",moduleName:e.ModuleNames.ViewportRowModelModule,rowModel:"viewport",beans:[n],dependantModules:[o.EnterpriseCoreModule]};exports.ViewportRowModelModule=s;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("@ag-grid-community/core"),o=require("@ag-grid-enterprise/core"),r=(t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)},function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),i=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},n=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.firstRow=-1,e.lastRow=-1,e.rowCount=-1,e.rowNodesByIndex={},e}return r(o,t),o.prototype.ensureRowHeightsValid=function(t,e,o,r){return!1},o.prototype.init=function(){var t=this;this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addManagedListener(this.eventService,e.Events.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this)),this.addManagedPropertyListener("viewportDatasource",(function(){return t.updateDatasource()})),this.addManagedPropertyListener("rowHeight",(function(){t.rowHeight=t.gridOptionsService.getRowHeightAsNumber(),t.updateRowHeights()}))},o.prototype.start=function(){this.updateDatasource()},o.prototype.isLastRowIndexKnown=function(){return!0},o.prototype.destroyDatasource=function(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)},o.prototype.updateDatasource=function(){var t=this.gridOptionsService.get("viewportDatasource");t&&this.setViewportDatasource(t)},o.prototype.getViewportRowModelPageSize=function(){return this.gridOptionsService.get("viewportRowModelPageSize")},o.prototype.getViewportRowModelBufferSize=function(){return this.gridOptionsService.get("viewportRowModelBufferSize")},o.prototype.calculateFirstRow=function(t){var e=this.getViewportRowModelBufferSize(),o=this.getViewportRowModelPageSize(),r=t-e;return r<0?0:Math.floor(r/o)*o},o.prototype.calculateLastRow=function(t){if(-1===t)return t;var e=this.getViewportRowModelBufferSize(),o=this.getViewportRowModelPageSize(),r=t+e,i=Math.ceil(r/o)*o,n=this.rowCount-1;return Math.min(i,n)},o.prototype.onViewportChanged=function(t){var e=this.calculateFirstRow(t.firstRow),o=this.calculateLastRow(t.lastRow);this.firstRow===e&&this.lastRow===o||(this.firstRow=e,this.lastRow=o,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))},o.prototype.purgeRowsNotInViewport=function(){var t=this;Object.keys(this.rowNodesByIndex).forEach((function(e){var o=parseInt(e,10);if(o<t.firstRow||o>t.lastRow){if(t.isRowFocused(o))return;delete t.rowNodesByIndex[o]}}))},o.prototype.isRowFocused=function(t){var e=this.focusService.getFocusCellToUseAfterRefresh();return!!e&&(null==e.rowPinned&&e.rowIndex===t)},o.prototype.setViewportDatasource=function(t){this.destroyDatasource(),this.viewportDatasource=t,this.rowCount=-1,t.init?t.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):console.warn("AG Grid: viewport is missing init method.")},o.prototype.getType=function(){return"viewport"},o.prototype.getRow=function(t){return this.rowNodesByIndex[t]||(this.rowNodesByIndex[t]=this.createBlankRowNode(t)),this.rowNodesByIndex[t]},o.prototype.getRowNode=function(t){var e;return this.forEachNode((function(o){o.id===t&&(e=o)})),e},o.prototype.getRowCount=function(){return-1===this.rowCount?0:this.rowCount},o.prototype.getRowIndexAtPixel=function(t){return 0!==this.rowHeight?Math.floor(t/this.rowHeight):0},o.prototype.getRowBounds=function(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}},o.prototype.updateRowHeights=function(){var t=this;this.forEachNode((function(e){e.setRowHeight(t.rowHeight),e.setRowTop(t.rowHeight*e.rowIndex)}));var o={type:e.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1};this.eventService.dispatchEvent(o)},o.prototype.getTopLevelRowCount=function(){return this.getRowCount()},o.prototype.getTopLevelRowDisplayedIndex=function(t){return t},o.prototype.isEmpty=function(){return this.rowCount>0},o.prototype.isRowsToRender=function(){return this.rowCount>0},o.prototype.getNodesInRangeForSelection=function(t,o){var r=e._.missing(t)?0:t.rowIndex,i=o.rowIndex,n=r<this.firstRow||r>this.lastRow,s=i<this.firstRow||i>this.lastRow;if(n||s)return[];for(var a=[],u=r<=i?i:r,p=r<=i?r:i;p<=u;p++)a.push(this.rowNodesByIndex[p]);return a},o.prototype.forEachNode=function(t){var e=this,o=0;Object.keys(this.rowNodesByIndex).forEach((function(r){var i=parseInt(r,10),n=e.rowNodesByIndex[i];t(n,o),o++}))},o.prototype.setRowData=function(t){var o=this;e._.iterateObject(t,(function(t,r){var i=parseInt(t,10);if(i>=o.firstRow&&i<=o.lastRow){var n=o.rowNodesByIndex[i];e._.missing(n)&&(n=o.createBlankRowNode(i),o.rowNodesByIndex[i]=n),n.setDataAndId(r,i.toString())}}))},o.prototype.createBlankRowNode=function(t){var o=new e.RowNode(this.beans);return o.setRowHeight(this.rowHeight),o.setRowTop(this.rowHeight*t),o.setRowIndex(t),o},o.prototype.setRowCount=function(t,o){if(void 0===o&&(o=!1),t!==this.rowCount){this.rowCount=t,this.eventService.dispatchEventOnce({type:e.Events.EVENT_ROW_COUNT_READY});var r={type:e.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:o,animate:!1};this.eventService.dispatchEvent(r)}},o.prototype.isRowPresent=function(t){return!!this.getRowNode(t.id)},i([e.Autowired("rowRenderer")],o.prototype,"rowRenderer",void 0),i([e.Autowired("focusService")],o.prototype,"focusService",void 0),i([e.Autowired("beans")],o.prototype,"beans",void 0),i([e.PostConstruct],o.prototype,"init",null),i([e.PreDestroy],o.prototype,"destroyDatasource",null),o=i([e.Bean("rowModel")],o)}(e.BeanStub),s={version:"31.1.1",moduleName:e.ModuleNames.ViewportRowModelModule,rowModel:"viewport",beans:[n],dependantModules:[o.EnterpriseCoreModule]};exports.ViewportRowModelModule=s;
{
"name": "@ag-grid-enterprise/viewport-row-model",
"version": "31.1.0",
"version": "31.1.1",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -49,4 +49,4 @@ "main": "./dist/esm/es6/main.mjs",

"dependencies": {
"@ag-grid-community/core": "~31.1.0",
"@ag-grid-enterprise/core": "~31.1.0"
"@ag-grid-community/core": "31.1.1",
"@ag-grid-enterprise/core": "31.1.1"
},

@@ -53,0 +53,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc