Socket
Socket
Sign inDemoInstall

@ag-grid-enterprise/clipboard

Package Overview
Dependencies
3
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 25.1.0 to 25.2.0

tsconfig.test.json

6

dist/cjs/clipboard/clipboardService.d.ts

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

import { BeanStub, CellPositionUtils, Column, GridCore, IClipboardService, RowPositionUtils } from "@ag-grid-community/core";
import { BeanStub, CellPositionUtils, Column, GridCompController, IClipboardService, RowPositionUtils } from "@ag-grid-community/core";
export declare class ClipboardService extends BeanStub implements IClipboardService {

@@ -19,4 +19,4 @@ private csvCreator;

private logger;
private gridCore;
registerGridCore(gridCore: GridCore): void;
private gridCompController;
registerGridCompController(gridCompController: GridCompController): void;
private init;

@@ -23,0 +23,0 @@ pasteFromClipboard(): void;

@@ -28,4 +28,4 @@ "use strict";

}
ClipboardService.prototype.registerGridCore = function (gridCore) {
this.gridCore = gridCore;
ClipboardService.prototype.registerGridCompController = function (gridCompController) {
this.gridCompController = gridCompController;
};

@@ -205,3 +205,3 @@ ClipboardService.prototype.init = function () {

columns.forEach(function (column) {
return _this.updateCellValue(rowNode, column, value, currentRow, cellsToFlash, core_1.Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
return _this.updateCellValue(rowNode, column, value, cellsToFlash, core_1.Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
});

@@ -284,22 +284,39 @@ };

var rowPointer = currentRow;
// if doing CSRM and NOT tree data, then it means groups are aggregates, which are read only,
// so we should skip them when doing paste operations.
var skipGroupRows = this.clientSideRowModel != null && !this.gridOptionsWrapper.isTreeData();
var getNextGoodRowNode = function () {
while (true) {
if (!rowPointer) {
return null;
}
var res = _this.rowPositionUtils.getRowNode(rowPointer);
// move to next row down for next set of values
rowPointer = _this.cellNavigationService.getRowBelow({ rowPinned: rowPointer.rowPinned, rowIndex: rowPointer.rowIndex });
// if no more rows, return null
if (res == null) {
return null;
}
// skip details rows and footer rows, never paste into them as they don't hold data
var skipRow = res.detail || res.footer || (skipGroupRows && res.group);
// skipping row means we go into the next iteration of the while loop
if (!skipRow) {
return res;
}
}
};
clipboardGridData.forEach(function (clipboardRowData) {
var rowNode = getNextGoodRowNode();
// if we have come to end of rows in grid, then skip
if (!rowPointer) {
if (!rowNode) {
return;
}
var rowNode = _this.rowPositionUtils.getRowNode(rowPointer);
if (rowNode) {
updatedRowNodes.push(rowNode);
clipboardRowData.forEach(function (value, index) {
return _this.updateCellValue(rowNode, columnsToPasteInto[index], value, rowPointer, cellsToFlash, type, changedPath);
});
// move to next row down for next set of values
rowPointer = _this.cellNavigationService.getRowBelow({ rowPinned: rowPointer.rowPinned, rowIndex: rowPointer.rowIndex });
}
clipboardRowData.forEach(function (value, index) {
return _this.updateCellValue(rowNode, columnsToPasteInto[index], value, cellsToFlash, type, changedPath);
});
updatedRowNodes.push(rowNode);
});
return rowPointer;
};
ClipboardService.prototype.updateCellValue = function (rowNode, column, value, currentRow, cellsToFlash, type, changedPath) {
ClipboardService.prototype.updateCellValue = function (rowNode, column, value, cellsToFlash, type, changedPath) {
if (!rowNode ||
!currentRow ||
!column ||

@@ -312,3 +329,3 @@ !column.isCellEditable(rowNode) ||

this.valueService.setValue(rowNode, column, processedValue, core_1.Constants.SOURCE_PASTE);
var cellId = this.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);
var cellId = this.cellPositionUtils.createIdFromValues(rowNode.rowIndex, column, rowNode.rowPinned);
cellsToFlash[cellId] = true;

@@ -493,4 +510,3 @@ if (changedPath) {

columnKeys: columnKeys,
skipHeader: !includeHeaders,
skipFooters: true,
skipColumnHeaders: !includeHeaders,
suppressQuotes: true,

@@ -562,3 +578,3 @@ columnSeparator: this.gridOptionsWrapper.getClipboardDeliminator(),

eTempInput.style.opacity = '0';
var guiRoot = this.gridCore.getRootGui();
var guiRoot = this.gridCompController.getGui();
guiRoot.appendChild(eTempInput);

@@ -565,0 +581,0 @@ try {

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

import { BeanStub, CellPositionUtils, Column, GridCore, IClipboardService, RowPositionUtils } from "@ag-grid-community/core";
import { BeanStub, CellPositionUtils, Column, GridCompController, IClipboardService, RowPositionUtils } from "@ag-grid-community/core";
export declare class ClipboardService extends BeanStub implements IClipboardService {

@@ -19,4 +19,4 @@ private csvCreator;

private logger;
private gridCore;
registerGridCore(gridCore: GridCore): void;
private gridCompController;
registerGridCompController(gridCompController: GridCompController): void;
private init;

@@ -23,0 +23,0 @@ pasteFromClipboard(): void;

@@ -26,4 +26,4 @@ var __extends = (this && this.__extends) || (function () {

}
ClipboardService.prototype.registerGridCore = function (gridCore) {
this.gridCore = gridCore;
ClipboardService.prototype.registerGridCompController = function (gridCompController) {
this.gridCompController = gridCompController;
};

@@ -203,3 +203,3 @@ ClipboardService.prototype.init = function () {

columns.forEach(function (column) {
return _this.updateCellValue(rowNode, column, value, currentRow, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
return _this.updateCellValue(rowNode, column, value, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
});

@@ -282,22 +282,39 @@ };

var rowPointer = currentRow;
// if doing CSRM and NOT tree data, then it means groups are aggregates, which are read only,
// so we should skip them when doing paste operations.
var skipGroupRows = this.clientSideRowModel != null && !this.gridOptionsWrapper.isTreeData();
var getNextGoodRowNode = function () {
while (true) {
if (!rowPointer) {
return null;
}
var res = _this.rowPositionUtils.getRowNode(rowPointer);
// move to next row down for next set of values
rowPointer = _this.cellNavigationService.getRowBelow({ rowPinned: rowPointer.rowPinned, rowIndex: rowPointer.rowIndex });
// if no more rows, return null
if (res == null) {
return null;
}
// skip details rows and footer rows, never paste into them as they don't hold data
var skipRow = res.detail || res.footer || (skipGroupRows && res.group);
// skipping row means we go into the next iteration of the while loop
if (!skipRow) {
return res;
}
}
};
clipboardGridData.forEach(function (clipboardRowData) {
var rowNode = getNextGoodRowNode();
// if we have come to end of rows in grid, then skip
if (!rowPointer) {
if (!rowNode) {
return;
}
var rowNode = _this.rowPositionUtils.getRowNode(rowPointer);
if (rowNode) {
updatedRowNodes.push(rowNode);
clipboardRowData.forEach(function (value, index) {
return _this.updateCellValue(rowNode, columnsToPasteInto[index], value, rowPointer, cellsToFlash, type, changedPath);
});
// move to next row down for next set of values
rowPointer = _this.cellNavigationService.getRowBelow({ rowPinned: rowPointer.rowPinned, rowIndex: rowPointer.rowIndex });
}
clipboardRowData.forEach(function (value, index) {
return _this.updateCellValue(rowNode, columnsToPasteInto[index], value, cellsToFlash, type, changedPath);
});
updatedRowNodes.push(rowNode);
});
return rowPointer;
};
ClipboardService.prototype.updateCellValue = function (rowNode, column, value, currentRow, cellsToFlash, type, changedPath) {
ClipboardService.prototype.updateCellValue = function (rowNode, column, value, cellsToFlash, type, changedPath) {
if (!rowNode ||
!currentRow ||
!column ||

@@ -310,3 +327,3 @@ !column.isCellEditable(rowNode) ||

this.valueService.setValue(rowNode, column, processedValue, Constants.SOURCE_PASTE);
var cellId = this.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);
var cellId = this.cellPositionUtils.createIdFromValues(rowNode.rowIndex, column, rowNode.rowPinned);
cellsToFlash[cellId] = true;

@@ -491,4 +508,3 @@ if (changedPath) {

columnKeys: columnKeys,
skipHeader: !includeHeaders,
skipFooters: true,
skipColumnHeaders: !includeHeaders,
suppressQuotes: true,

@@ -560,3 +576,3 @@ columnSeparator: this.gridOptionsWrapper.getClipboardDeliminator(),

eTempInput.style.opacity = '0';
var guiRoot = this.gridCore.getRootGui();
var guiRoot = this.gridCompController.getGui();
guiRoot.appendChild(eTempInput);

@@ -563,0 +579,0 @@ try {

module.exports = {
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json'
}
},
roots: [

@@ -17,2 +22,2 @@ "<rootDir>/src"

],
};
};
{
"name": "@ag-grid-enterprise/clipboard",
"version": "25.1.0",
"version": "25.2.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components",

@@ -46,5 +46,5 @@ "main": "./dist/cjs/main.js",

"dependencies": {
"@ag-grid-community/core": "~25.1.0",
"@ag-grid-community/csv-export": "~25.1.0",
"@ag-grid-enterprise/core": "~25.1.0"
"@ag-grid-community/core": "~25.2.0",
"@ag-grid-community/csv-export": "~25.2.0",
"@ag-grid-enterprise/core": "~25.2.0"
},

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

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

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

@@ -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 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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc