@ag-grid-enterprise/clipboard
Advanced tools
Comparing version 23.0.2 to 23.1.0
@@ -30,2 +30,3 @@ import { CellPositionUtils, Column, GridCore, IClipboardService, RowPositionUtils } from "@ag-grid-community/core"; | ||
copyRangeDown(): void; | ||
private removeLastLineIfBlank; | ||
private fireRowChanged; | ||
@@ -32,0 +33,0 @@ private pasteMultipleValues; |
@@ -30,3 +30,3 @@ "use strict"; | ||
} | ||
var parsedData = core_1.CsvUtils.stringToArray(data, _this.gridOptionsWrapper.getClipboardDeliminator()); | ||
var parsedData = core_1._.stringToArray(data, _this.gridOptionsWrapper.getClipboardDeliminator()); | ||
var userFunc = _this.gridOptionsWrapper.getProcessDataFromClipboardFunc(); | ||
@@ -39,2 +39,5 @@ if (userFunc) { | ||
} | ||
if (_this.gridOptionsWrapper.isSuppressLastEmptyLineOnPaste()) { | ||
_this.removeLastLineIfBlank(parsedData); | ||
} | ||
var pasteOperation = function (cellsToFlash, updatedRowNodes, focusedCell, changedPath) { | ||
@@ -184,2 +187,10 @@ var rangeActive = _this.rangeController && _this.rangeController.isMoreThanOneCell(); | ||
}; | ||
ClipboardService.prototype.removeLastLineIfBlank = function (parsedData) { | ||
// remove last row if empty, excel puts empty last row in | ||
var lastLine = core_1._.last(parsedData); | ||
var lastLineIsBlank = lastLine && lastLine.length === 1 && lastLine[0] === ''; | ||
if (lastLineIsBlank) { | ||
core_1._.removeFromArray(parsedData, lastLine); | ||
} | ||
}; | ||
ClipboardService.prototype.fireRowChanged = function (rowNodes) { | ||
@@ -186,0 +197,0 @@ var _this = this; |
@@ -30,2 +30,3 @@ import { CellPositionUtils, Column, GridCore, IClipboardService, RowPositionUtils } from "@ag-grid-community/core"; | ||
copyRangeDown(): void; | ||
private removeLastLineIfBlank; | ||
private fireRowChanged; | ||
@@ -32,0 +33,0 @@ private pasteMultipleValues; |
@@ -7,3 +7,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
import { _, Autowired, Bean, ChangedPath, Constants, CsvUtils, Events, PostConstruct, Optional } from "@ag-grid-community/core"; | ||
import { _, Autowired, Bean, ChangedPath, Constants, Events, PostConstruct, Optional } from "@ag-grid-community/core"; | ||
var ClipboardService = /** @class */ (function () { | ||
@@ -29,3 +29,3 @@ function ClipboardService() { | ||
} | ||
var parsedData = CsvUtils.stringToArray(data, _this.gridOptionsWrapper.getClipboardDeliminator()); | ||
var parsedData = _.stringToArray(data, _this.gridOptionsWrapper.getClipboardDeliminator()); | ||
var userFunc = _this.gridOptionsWrapper.getProcessDataFromClipboardFunc(); | ||
@@ -38,2 +38,5 @@ if (userFunc) { | ||
} | ||
if (_this.gridOptionsWrapper.isSuppressLastEmptyLineOnPaste()) { | ||
_this.removeLastLineIfBlank(parsedData); | ||
} | ||
var pasteOperation = function (cellsToFlash, updatedRowNodes, focusedCell, changedPath) { | ||
@@ -183,2 +186,10 @@ var rangeActive = _this.rangeController && _this.rangeController.isMoreThanOneCell(); | ||
}; | ||
ClipboardService.prototype.removeLastLineIfBlank = function (parsedData) { | ||
// remove last row if empty, excel puts empty last row in | ||
var lastLine = _.last(parsedData); | ||
var lastLineIsBlank = lastLine && lastLine.length === 1 && lastLine[0] === ''; | ||
if (lastLineIsBlank) { | ||
_.removeFromArray(parsedData, lastLine); | ||
} | ||
}; | ||
ClipboardService.prototype.fireRowChanged = function (rowNodes) { | ||
@@ -185,0 +196,0 @@ var _this = this; |
{ | ||
"name": "@ag-grid-enterprise/clipboard", | ||
"version": "23.0.2", | ||
"version": "23.1.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components", | ||
@@ -45,11 +45,11 @@ "main": "./dist/cjs/main.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~23.0.0", | ||
"@ag-grid-community/csv-export": "~23.0.0", | ||
"@ag-grid-enterprise/core": "~23.0.0" | ||
"@ag-grid-community/core": "~23.1.0", | ||
"@ag-grid-community/csv-export": "~23.1.0", | ||
"@ag-grid-enterprise/core": "~23.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^25.1.3", | ||
"jest": "^25.1.0", | ||
"ts-jest": "^25.2.1", | ||
"typescript": "^3.6.3" | ||
"@types/jest": "^25.2.1", | ||
"jest": "^25.4.0", | ||
"ts-jest": "^25.4.0", | ||
"typescript": "~3.6.5" | ||
}, | ||
@@ -56,0 +56,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5430800
86070
+ Added@ag-grid-community/core@23.1.1(transitive)
+ Added@ag-grid-community/csv-export@23.1.1(transitive)
+ Added@ag-grid-enterprise/core@23.1.1(transitive)
- Removed@ag-grid-community/core@23.0.2(transitive)
- Removed@ag-grid-community/csv-export@23.0.2(transitive)
- Removed@ag-grid-enterprise/core@23.0.2(transitive)