New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 26.2.0 to 27.0.0

dist/cjs/es5/main.d.ts

4

dist/viewport-row-model.cjs.js
/**
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.2.0
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.0.0
* @link http://www.ag-grid.com/

@@ -136,3 +136,3 @@ ' * @license Commercial

ViewportRowModel.prototype.getRowNode = function (id) {
var result = undefined;
var result;
this.forEachNode(function (rowNode) {

@@ -139,0 +139,0 @@ if (rowNode.id === id) {

/**
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.2.0
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.0.0
* @link http://www.ag-grid.com/

@@ -8,6 +8,6 @@ ' * @license Commercial

/**
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.2.0
* @ag-grid-enterprise/viewport-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.0.0
* @link http://www.ag-grid.com/
' * @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,o=require("@ag-grid-community/core"),e=require("@ag-grid-enterprise/core"),r=(t=function(o,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e])})(o,e)},function(o,e){function r(){this.constructor=o}t(o,e),o.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=function(t,o,e,r){var i,n=arguments.length,s=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,o,e,r);else for(var p=t.length-1;p>=0;p--)(i=t[p])&&(s=(n<3?i(s):n>3?i(o,e,s):i(o,e))||s);return n>3&&s&&Object.defineProperty(o,e,s),s},n=function(t){function e(){var o=null!==t&&t.apply(this,arguments)||this;return o.firstRow=-1,o.lastRow=-1,o.rowCount=-1,o.rowNodesByIndex={},o}return r(e,t),e.prototype.ensureRowHeightsValid=function(t,o,e,r){return!1},e.prototype.init=function(){this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.addManagedListener(this.eventService,o.Events.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this))},e.prototype.start=function(){this.gridOptionsWrapper.getViewportDatasource()&&this.setViewportDatasource(this.gridOptionsWrapper.getViewportDatasource())},e.prototype.isLastRowIndexKnown=function(){return!0},e.prototype.destroyDatasource=function(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)},e.prototype.calculateFirstRow=function(t){var o=this.gridOptionsWrapper.getViewportRowModelBufferSize(),e=this.gridOptionsWrapper.getViewportRowModelPageSize(),r=t-o;return r<0?0:Math.floor(r/e)*e},e.prototype.calculateLastRow=function(t){if(-1===t)return t;var o=this.gridOptionsWrapper.getViewportRowModelBufferSize(),e=this.gridOptionsWrapper.getViewportRowModelPageSize(),r=t+o,i=Math.ceil(r/e)*e,n=this.rowCount-1;return Math.min(i,n)},e.prototype.onViewportChanged=function(t){var o=this.calculateFirstRow(t.firstRow),e=this.calculateLastRow(t.lastRow);this.firstRow===o&&this.lastRow===e||(this.firstRow=o,this.lastRow=e,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))},e.prototype.purgeRowsNotInViewport=function(){var t=this;Object.keys(this.rowNodesByIndex).forEach((function(o){var e=parseInt(o,10);(e<t.firstRow||e>t.lastRow)&&delete t.rowNodesByIndex[e]}))},e.prototype.setViewportDatasource=function(t){this.destroyDatasource(),this.viewportDatasource=t,this.rowCount=0,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.")},e.prototype.getType=function(){return o.Constants.ROW_MODEL_TYPE_VIEWPORT},e.prototype.getRow=function(t){return this.rowNodesByIndex[t]||(this.rowNodesByIndex[t]=this.createBlankRowNode(t)),this.rowNodesByIndex[t]},e.prototype.getRowNode=function(t){var o=void 0;return this.forEachNode((function(e){e.id===t&&(o=e)})),o},e.prototype.getRowCount=function(){return this.rowCount},e.prototype.getRowIndexAtPixel=function(t){return 0!==this.rowHeight?Math.floor(t/this.rowHeight):0},e.prototype.getRowBounds=function(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}},e.prototype.getTopLevelRowCount=function(){return this.getRowCount()},e.prototype.getTopLevelRowDisplayedIndex=function(t){return t},e.prototype.isEmpty=function(){return this.rowCount>0},e.prototype.isRowsToRender=function(){return this.rowCount>0},e.prototype.getNodesInRangeForSelection=function(t,e){var r=o._.missing(t)?0:t.rowIndex,i=e.rowIndex,n=r<this.firstRow||r>this.lastRow,s=i<this.firstRow||i>this.lastRow;if(n||s)return[];for(var p=[],a=r<=i?i:r,w=r<=i?r:i;w<=a;w++)p.push(this.rowNodesByIndex[w]);return p},e.prototype.forEachNode=function(t){var o=this,e=0;Object.keys(this.rowNodesByIndex).forEach((function(r){var i=parseInt(r,10),n=o.rowNodesByIndex[i];t(n,e),e++}))},e.prototype.setRowData=function(t){var e=this;o._.iterateObject(t,(function(t,r){var i=parseInt(t,10);if(i>=e.firstRow&&i<=e.lastRow){var n=e.rowNodesByIndex[i];o._.missing(n)&&(n=e.createBlankRowNode(i),e.rowNodesByIndex[i]=n),n.setDataAndId(r,i.toString())}}))},e.prototype.createBlankRowNode=function(t){var e=new o.RowNode(this.beans);return e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*t),e.setRowIndex(t),e},e.prototype.setRowCount=function(t,e){if(void 0===e&&(e=!1),t!==this.rowCount){this.rowCount=t;var r={type:o.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,newData:!1,newPage:!1,keepRenderedRows:e,animate:!1};this.eventService.dispatchEvent(r)}},e.prototype.isRowPresent=function(t){return!1},i([o.Autowired("gridApi")],e.prototype,"gridApi",void 0),i([o.Autowired("columnApi")],e.prototype,"columnApi",void 0),i([o.Autowired("rowRenderer")],e.prototype,"rowRenderer",void 0),i([o.Autowired("beans")],e.prototype,"beans",void 0),i([o.PostConstruct],e.prototype,"init",null),i([o.PreDestroy],e.prototype,"destroyDatasource",null),e=i([o.Bean("rowModel")],e)}(o.BeanStub),s={moduleName:o.ModuleNames.ViewportRowModelModule,rowModels:{viewport:n},dependantModules:[e.EnterpriseCoreModule]};exports.ViewportRowModelModule=s;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,o=require("@ag-grid-community/core"),e=require("@ag-grid-enterprise/core"),r=(t=function(o,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e])})(o,e)},function(o,e){function r(){this.constructor=o}t(o,e),o.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=function(t,o,e,r){var i,n=arguments.length,s=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,o,e,r);else for(var p=t.length-1;p>=0;p--)(i=t[p])&&(s=(n<3?i(s):n>3?i(o,e,s):i(o,e))||s);return n>3&&s&&Object.defineProperty(o,e,s),s},n=function(t){function e(){var o=null!==t&&t.apply(this,arguments)||this;return o.firstRow=-1,o.lastRow=-1,o.rowCount=-1,o.rowNodesByIndex={},o}return r(e,t),e.prototype.ensureRowHeightsValid=function(t,o,e,r){return!1},e.prototype.init=function(){this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.addManagedListener(this.eventService,o.Events.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this))},e.prototype.start=function(){this.gridOptionsWrapper.getViewportDatasource()&&this.setViewportDatasource(this.gridOptionsWrapper.getViewportDatasource())},e.prototype.isLastRowIndexKnown=function(){return!0},e.prototype.destroyDatasource=function(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)},e.prototype.calculateFirstRow=function(t){var o=this.gridOptionsWrapper.getViewportRowModelBufferSize(),e=this.gridOptionsWrapper.getViewportRowModelPageSize(),r=t-o;return r<0?0:Math.floor(r/e)*e},e.prototype.calculateLastRow=function(t){if(-1===t)return t;var o=this.gridOptionsWrapper.getViewportRowModelBufferSize(),e=this.gridOptionsWrapper.getViewportRowModelPageSize(),r=t+o,i=Math.ceil(r/e)*e,n=this.rowCount-1;return Math.min(i,n)},e.prototype.onViewportChanged=function(t){var o=this.calculateFirstRow(t.firstRow),e=this.calculateLastRow(t.lastRow);this.firstRow===o&&this.lastRow===e||(this.firstRow=o,this.lastRow=e,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))},e.prototype.purgeRowsNotInViewport=function(){var t=this;Object.keys(this.rowNodesByIndex).forEach((function(o){var e=parseInt(o,10);(e<t.firstRow||e>t.lastRow)&&delete t.rowNodesByIndex[e]}))},e.prototype.setViewportDatasource=function(t){this.destroyDatasource(),this.viewportDatasource=t,this.rowCount=0,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.")},e.prototype.getType=function(){return o.Constants.ROW_MODEL_TYPE_VIEWPORT},e.prototype.getRow=function(t){return this.rowNodesByIndex[t]||(this.rowNodesByIndex[t]=this.createBlankRowNode(t)),this.rowNodesByIndex[t]},e.prototype.getRowNode=function(t){var o;return this.forEachNode((function(e){e.id===t&&(o=e)})),o},e.prototype.getRowCount=function(){return this.rowCount},e.prototype.getRowIndexAtPixel=function(t){return 0!==this.rowHeight?Math.floor(t/this.rowHeight):0},e.prototype.getRowBounds=function(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}},e.prototype.getTopLevelRowCount=function(){return this.getRowCount()},e.prototype.getTopLevelRowDisplayedIndex=function(t){return t},e.prototype.isEmpty=function(){return this.rowCount>0},e.prototype.isRowsToRender=function(){return this.rowCount>0},e.prototype.getNodesInRangeForSelection=function(t,e){var r=o._.missing(t)?0:t.rowIndex,i=e.rowIndex,n=r<this.firstRow||r>this.lastRow,s=i<this.firstRow||i>this.lastRow;if(n||s)return[];for(var p=[],a=r<=i?i:r,w=r<=i?r:i;w<=a;w++)p.push(this.rowNodesByIndex[w]);return p},e.prototype.forEachNode=function(t){var o=this,e=0;Object.keys(this.rowNodesByIndex).forEach((function(r){var i=parseInt(r,10),n=o.rowNodesByIndex[i];t(n,e),e++}))},e.prototype.setRowData=function(t){var e=this;o._.iterateObject(t,(function(t,r){var i=parseInt(t,10);if(i>=e.firstRow&&i<=e.lastRow){var n=e.rowNodesByIndex[i];o._.missing(n)&&(n=e.createBlankRowNode(i),e.rowNodesByIndex[i]=n),n.setDataAndId(r,i.toString())}}))},e.prototype.createBlankRowNode=function(t){var e=new o.RowNode(this.beans);return e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*t),e.setRowIndex(t),e},e.prototype.setRowCount=function(t,e){if(void 0===e&&(e=!1),t!==this.rowCount){this.rowCount=t;var r={type:o.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,newData:!1,newPage:!1,keepRenderedRows:e,animate:!1};this.eventService.dispatchEvent(r)}},e.prototype.isRowPresent=function(t){return!1},i([o.Autowired("gridApi")],e.prototype,"gridApi",void 0),i([o.Autowired("columnApi")],e.prototype,"columnApi",void 0),i([o.Autowired("rowRenderer")],e.prototype,"rowRenderer",void 0),i([o.Autowired("beans")],e.prototype,"beans",void 0),i([o.PostConstruct],e.prototype,"init",null),i([o.PreDestroy],e.prototype,"destroyDatasource",null),e=i([o.Bean("rowModel")],e)}(o.BeanStub),s={moduleName:o.ModuleNames.ViewportRowModelModule,rowModels:{viewport:n},dependantModules:[e.EnterpriseCoreModule]};exports.ViewportRowModelModule=s;
{
"name": "@ag-grid-enterprise/viewport-row-model",
"version": "26.2.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components",
"main": "./dist/cjs/main.js",
"module": "./dist/es6/main.js",
"types": "./dist/cjs/main.d.ts",
"version": "27.0.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"main": "./dist/cjs/es5/main.js",
"module": "./dist/esm/es5/main.js",
"types": "./dist/cjs/es5/main.d.ts",
"scripts": {
"build-cjs": "npx tsc -p tsconfig.json",
"build-es6": "npx tsc -p tsconfig.es6.json",
"build-cjs": "npx tsc -p tsconfig.cjs.es5.json && npx tsc -p tsconfig.cjs.es6.json",
"build-esm": "npx tsc -p tsconfig.esm.es5.json && npx tsc -p tsconfig.esm.es6.json",
"package": "node ../../module-build/rollup/build.js",
"build": "npm run build-cjs && npm run build-es6 && npm run hash",
"build": "npm run build-cjs && npm run build-esm && npm run hash",
"hash": "sh ../../scripts/hashDirectory.sh > .hash"

@@ -28,4 +28,5 @@ },

"react-component",
"angularjs",
"reactjs"
"reactjs",
"vue",
"vuejs"
],

@@ -40,4 +41,4 @@ "author": "Sean Landsman <sean@thelandsmans.com>",

"last 2 versions",
"not ie <= 10",
"not ie_mob <= 11",
"not ie >= 0",
"not ie_mob >= 0",
"not blackberry > 0"

@@ -47,7 +48,7 @@ ],

"dependencies": {
"@ag-grid-community/core": "~26.2.0",
"@ag-grid-enterprise/core": "~26.2.0"
"@ag-grid-community/core": "~27.0.0",
"@ag-grid-enterprise/core": "~27.0.0"
},
"devDependencies": {
"typescript": "~3.6.5"
"typescript": "~3.7.7"
},

@@ -54,0 +55,0 @@ "publishConfig": {

@@ -12,3 +12,3 @@ AG Grid Enterprise

[Angular 1](https://www.ag-grid.com/angular-grid/angularjs/) | [Angular 2](https://www.ag-grid.com/angular-grid/getting-started/) | [Javascript](https://www.ag-grid.com/javascript-grid/getting-started/) | [Polymer](https://www.ag-grid.com/javascript-grid/polymer-getting-started/) | [React](https://www.ag-grid.com/react-grid/getting-started/) | [TypeScript](https://www.ag-grid.com/javascript-grid/building-typescript/) | [VueJS](https://www.ag-grid.com/vue-grid/getting-started/)
[Angular](https://www.ag-grid.com/angular-grid/getting-started/) | [Javascript](https://www.ag-grid.com/javascript-grid/getting-started/) | [React](https://www.ag-grid.com/react-grid/getting-started/) | [TypeScript](https://www.ag-grid.com/javascript-grid/building-typescript/) | [VueJS](https://www.ag-grid.com/vue-grid/getting-started/)

@@ -15,0 +15,0 @@ This is not free software, this software is covered by copyright and to use you need a commercial license.

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