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 23.0.2 to 23.1.0

.hash

1

dist/cjs/viewportRowModel/viewportRowModel.d.ts

@@ -16,2 +16,3 @@ import { IRowModel, RowNode, IViewportDatasource, RowBounds } from "@ag-grid-community/core";

private viewportDatasource;
private events;
ensureRowHeightsValid(startPixel: number, endPixel: number, startLimitIndex: number, endLimitIndex: number): boolean;

@@ -18,0 +19,0 @@ private init;

57

dist/cjs/viewportRowModel/viewportRowModel.js

@@ -18,2 +18,3 @@ "use strict";

this.rowNodesByIndex = {};
this.events = [];
}

@@ -24,3 +25,5 @@ // we don't implement as lazy row heights is not supported in this row model

this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();
this.eventService.addEventListener(core_1.Events.EVENT_VIEWPORT_CHANGED, this.onViewportChanged.bind(this));
this.events = [
this.eventService.addEventListener(core_1.Events.EVENT_VIEWPORT_CHANGED, this.onViewportChanged.bind(this))
];
};

@@ -36,10 +39,15 @@ ViewportRowModel.prototype.start = function () {

ViewportRowModel.prototype.destroyDatasource = function () {
if (this.viewportDatasource) {
if (this.viewportDatasource.destroy) {
this.viewportDatasource.destroy();
}
this.rowRenderer.datasourceChanged();
this.firstRow = -1;
this.lastRow = -1;
if (!this.viewportDatasource) {
return;
}
if (this.viewportDatasource.destroy) {
this.viewportDatasource.destroy();
}
this.rowRenderer.datasourceChanged();
this.firstRow = -1;
this.lastRow = -1;
if (this.events.length) {
this.events.forEach(function (func) { return func(); });
this.events = [];
}
};

@@ -53,5 +61,3 @@ ViewportRowModel.prototype.calculateFirstRow = function (firstRenderedRow) {

}
else {
return Math.floor(afterBuffer / pageSize) * pageSize;
}
return Math.floor(afterBuffer / pageSize) * pageSize;
};

@@ -130,5 +136,3 @@ ViewportRowModel.prototype.calculateLastRow = function (lastRenderedRow) {

}
else {
return 0;
}
return 0;
};

@@ -214,15 +218,16 @@ ViewportRowModel.prototype.getRowBounds = function (index) {

if (keepRenderedRows === void 0) { keepRenderedRows = false; }
if (rowCount !== this.rowCount) {
this.rowCount = rowCount;
var event_1 = {
type: core_1.Events.EVENT_MODEL_UPDATED,
api: this.gridApi,
columnApi: this.columnApi,
newData: false,
newPage: false,
keepRenderedRows: keepRenderedRows,
animate: false
};
this.eventService.dispatchEvent(event_1);
if (rowCount === this.rowCount) {
return;
}
this.rowCount = rowCount;
var event = {
type: core_1.Events.EVENT_MODEL_UPDATED,
api: this.gridApi,
columnApi: this.columnApi,
newData: false,
newPage: false,
keepRenderedRows: keepRenderedRows,
animate: false
};
this.eventService.dispatchEvent(event);
};

@@ -229,0 +234,0 @@ ViewportRowModel.prototype.isRowPresent = function (rowNode) {

@@ -16,2 +16,3 @@ import { IRowModel, RowNode, IViewportDatasource, RowBounds } from "@ag-grid-community/core";

private viewportDatasource;
private events;
ensureRowHeightsValid(startPixel: number, endPixel: number, startLimitIndex: number, endLimitIndex: number): boolean;

@@ -18,0 +19,0 @@ private init;

@@ -16,2 +16,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

this.rowNodesByIndex = {};
this.events = [];
}

@@ -22,3 +23,5 @@ // we don't implement as lazy row heights is not supported in this row model

this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();
this.eventService.addEventListener(Events.EVENT_VIEWPORT_CHANGED, this.onViewportChanged.bind(this));
this.events = [
this.eventService.addEventListener(Events.EVENT_VIEWPORT_CHANGED, this.onViewportChanged.bind(this))
];
};

@@ -34,10 +37,15 @@ ViewportRowModel.prototype.start = function () {

ViewportRowModel.prototype.destroyDatasource = function () {
if (this.viewportDatasource) {
if (this.viewportDatasource.destroy) {
this.viewportDatasource.destroy();
}
this.rowRenderer.datasourceChanged();
this.firstRow = -1;
this.lastRow = -1;
if (!this.viewportDatasource) {
return;
}
if (this.viewportDatasource.destroy) {
this.viewportDatasource.destroy();
}
this.rowRenderer.datasourceChanged();
this.firstRow = -1;
this.lastRow = -1;
if (this.events.length) {
this.events.forEach(function (func) { return func(); });
this.events = [];
}
};

@@ -51,5 +59,3 @@ ViewportRowModel.prototype.calculateFirstRow = function (firstRenderedRow) {

}
else {
return Math.floor(afterBuffer / pageSize) * pageSize;
}
return Math.floor(afterBuffer / pageSize) * pageSize;
};

@@ -128,5 +134,3 @@ ViewportRowModel.prototype.calculateLastRow = function (lastRenderedRow) {

}
else {
return 0;
}
return 0;
};

@@ -212,15 +216,16 @@ ViewportRowModel.prototype.getRowBounds = function (index) {

if (keepRenderedRows === void 0) { keepRenderedRows = false; }
if (rowCount !== this.rowCount) {
this.rowCount = rowCount;
var event_1 = {
type: Events.EVENT_MODEL_UPDATED,
api: this.gridApi,
columnApi: this.columnApi,
newData: false,
newPage: false,
keepRenderedRows: keepRenderedRows,
animate: false
};
this.eventService.dispatchEvent(event_1);
if (rowCount === this.rowCount) {
return;
}
this.rowCount = rowCount;
var event = {
type: Events.EVENT_MODEL_UPDATED,
api: this.gridApi,
columnApi: this.columnApi,
newData: false,
newPage: false,
keepRenderedRows: keepRenderedRows,
animate: false
};
this.eventService.dispatchEvent(event);
};

@@ -227,0 +232,0 @@ ViewportRowModel.prototype.isRowPresent = function (rowNode) {

{
"name": "@ag-grid-enterprise/viewport-row-model",
"version": "23.0.2",
"version": "23.1.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components",

@@ -12,3 +12,4 @@ "main": "./dist/cjs/main.js",

"package": "node ../../module-build/rollup/build.js",
"build": "npm run build-cjs && npm run build-es6"
"build": "npm run build-cjs && npm run build-es6 && npm run hash",
"hash": "sh ../../scripts/hashDirectory.sh > .hash"
},

@@ -45,7 +46,7 @@ "repository": {

"dependencies": {
"@ag-grid-community/core": "~23.0.0",
"@ag-grid-enterprise/core": "~23.0.0"
"@ag-grid-community/core": "~23.1.0",
"@ag-grid-enterprise/core": "~23.1.0"
},
"devDependencies": {
"typescript": "^3.6.3"
"typescript": "~3.6.5"
},

@@ -52,0 +53,0 @@ "publishConfig": {

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

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

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

Sorry, the diff of this file is not supported yet

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