Socket
Socket
Sign inDemoInstall

@ag-grid-community/csv-export

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-community/csv-export - npm Package Compare versions

Comparing version 28.2.1 to 29.0.0

dist/cjs/es5/version.d.ts

1

dist/cjs/es5/csvExport/baseCreator.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseCreator = void 0;
var BaseCreator = /** @class */ (function () {

@@ -4,0 +5,0 @@ function BaseCreator() {

4

dist/cjs/es5/csvExport/csvCreator.d.ts

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

import { CsvCustomContent, CsvExportParams, GridOptionsWrapper, ICsvCreator } from "@ag-grid-community/core";
import { CsvCustomContent, CsvExportParams, GridOptionsService, ICsvCreator } from "@ag-grid-community/core";
import { BaseCreator } from "./baseCreator";

@@ -8,3 +8,3 @@ import { CsvSerializingSession } from "./sessions/csvSerializingSession";

private gridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
postConstruct(): void;

@@ -11,0 +11,0 @@ protected getMergedParams(params?: CsvExportParams): CsvExportParams;

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -23,2 +23,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
exports.CsvCreator = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -36,7 +37,7 @@ var baseCreator_1 = require("./baseCreator");

gridSerializer: this.gridSerializer,
gridOptionsWrapper: this.gridOptionsWrapper
gridOptionsService: this.gridOptionsService
});
};
CsvCreator.prototype.getMergedParams = function (params) {
var baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');
var baseParams = this.gridOptionsService.get('defaultCsvExportParams');
return Object.assign({}, baseParams, params);

@@ -72,3 +73,3 @@ };

CsvCreator.prototype.createSerializingSession = function (params) {
var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;
var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsService = _a.gridOptionsService;
var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;

@@ -78,3 +79,3 @@ return new csvSerializingSession_1.CsvSerializingSession({

valueService: valueService,
gridOptionsWrapper: gridOptionsWrapper,
gridOptionsService: gridOptionsService,
processCellCallback: processCellCallback || undefined,

@@ -89,3 +90,3 @@ processHeaderCallback: processHeaderCallback || undefined,

CsvCreator.prototype.isExportSuppressed = function () {
return this.gridOptionsWrapper.isSuppressCsvExport();
return this.gridOptionsService.is('suppressCsvExport');
};

@@ -102,4 +103,4 @@ __decorate([

__decorate([
core_1.Autowired('gridOptionsWrapper')
], CsvCreator.prototype, "gridOptionsWrapper", void 0);
core_1.Autowired('gridOptionsService')
], CsvCreator.prototype, "gridOptionsService", void 0);
__decorate([

@@ -106,0 +107,0 @@ core_1.PostConstruct

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Downloader = void 0;
var Downloader = /** @class */ (function () {

@@ -4,0 +5,0 @@ function Downloader() {

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -23,2 +23,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
exports.GridSerializer = exports.RowType = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -46,8 +47,7 @@ var RowType;

var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });
var gridOptionsWrapper = this.gridOptionsWrapper;
var context = gridOptionsWrapper.getContext();
var api = gridOptionsWrapper.getApi();
var columnApi = gridOptionsWrapper.getColumnApi();
var skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();
var skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
var context = this.gridOptionsService.get('context');
var api = this.gridOptionsService.get('api');
var columnApi = this.gridOptionsService.get('columnApi');
var skipSingleChildrenGroup = this.gridOptionsService.is('groupRemoveSingleChildren');
var skipLowestSingleChildrenGroup = this.gridOptionsService.is('groupRemoveLowestSingleChildren');
// if onlySelected, we ignore groupHideOpenParents as the user has explicitly selected the rows they wish to export.

@@ -57,3 +57,3 @@ // similarly, if specific rowNodes are provided we do the same. (the clipboard service uses rowNodes to define which rows to export)

var isExplicitExportSelection = isClipboardExport || !!params.onlySelected;
var hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents() && !isExplicitExportSelection;
var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents') && !isExplicitExportSelection;
var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;

@@ -75,3 +75,3 @@ var skipRowGroups = params.skipGroups || params.skipRowGroups;

var nodeIsRootNode = node.level === -1;
if (nodeIsRootNode && !node.leafGroup && (!node.footer || !isClipboardExport)) {
if (nodeIsRootNode && !node.leafGroup && !node.footer) {
return;

@@ -176,4 +176,4 @@ }

var rowModelType = rowModel.getType();
var usingCsrm = rowModelType === core_1.Constants.ROW_MODEL_TYPE_CLIENT_SIDE;
var usingSsrm = rowModelType === core_1.Constants.ROW_MODEL_TYPE_SERVER_SIDE;
var usingCsrm = rowModelType === 'clientSide';
var usingSsrm = rowModelType === 'serverSide';
var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;

@@ -192,3 +192,3 @@ var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);

if (usingCsrm) {
rowModel.forEachPivotNode(processRow);
rowModel.forEachPivotNode(processRow, true);
}

@@ -218,3 +218,3 @@ else {

else if (usingCsrm) {
rowModel.forEachNodeAfterFilterAndSort(processRow);
rowModel.forEachNodeAfterFilterAndSort(processRow, true);
}

@@ -258,4 +258,4 @@ else if (usingSsrm) {

// add auto group column for tree data
var columns = this.gridOptionsWrapper.isTreeData()
? this.columnModel.getGridColumns([core_1.Constants.GROUP_AUTO_COLUMN_ID])
var columns = this.gridOptionsService.isTreeData()
? this.columnModel.getGridColumns([core_1.GROUP_AUTO_COLUMN_ID])
: [];

@@ -292,5 +292,5 @@ return columns.concat(this.columnModel.getAllPrimaryColumns() || []);

columnGroup: columnGroup,
api: _this.gridOptionsWrapper.getApi(),
columnApi: _this.gridOptionsWrapper.getColumnApi(),
context: _this.gridOptionsWrapper.getContext()
api: _this.gridOptionsService.get('api'),
columnApi: _this.gridOptionsService.get('columnApi'),
context: _this.gridOptionsService.get('context')
});

@@ -297,0 +297,0 @@ }

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

import { Column, ColumnGroup, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnGroup, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializer } from "../gridSerializer";
export interface BaseCreatorBeans {
gridSerializer: GridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
}

@@ -16,3 +16,3 @@ export interface RowAccumulator {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -19,0 +19,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

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

import { Column, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializingParams, GridSerializingSession, RowAccumulator, RowSpanningAccumulator } from "../interfaces";

@@ -6,3 +6,3 @@ export declare abstract class BaseGridSerializingSession<T> implements GridSerializingSession<T> {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -9,0 +9,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseGridSerializingSession = void 0;
var BaseGridSerializingSession = /** @class */ (function () {
function BaseGridSerializingSession(config) {
this.groupColumns = [];
var columnModel = config.columnModel, valueService = config.valueService, gridOptionsWrapper = config.gridOptionsWrapper, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
var columnModel = config.columnModel, valueService = config.valueService, gridOptionsService = config.gridOptionsService, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
this.columnModel = columnModel;
this.valueService = valueService;
this.gridOptionsWrapper = gridOptionsWrapper;
this.gridOptionsService = gridOptionsService;
this.processCellCallback = processCellCallback;

@@ -24,3 +25,3 @@ this.processHeaderCallback = processHeaderCallback;

// we render the group summary text e.g. "-> Parent -> Child"...
var hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();
var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
var value = (!hideOpenParents && this.shouldRenderGroupSummaryCell(node, column, index))

@@ -47,6 +48,14 @@ ? this.createValueForGroupNode(node)

var currentColumnGroupIndex = this.groupColumns.indexOf(column);
if (currentColumnGroupIndex !== -1 && ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()])) {
return true;
if (currentColumnGroupIndex !== -1) {
if ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()]) {
return true;
}
// if this is a top level footer, always render`Total` in the left-most cell
if (node.footer && node.level === -1) {
var colDef = column.getColDef();
var isFullWidth = colDef == null || colDef.showRowGroup === true;
return isFullWidth || colDef.showRowGroup === this.columnModel.getRowGroupColumns()[0].getId();
}
}
var isGroupUseEntireRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());
var isGroupUseEntireRow = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());
return currentColumnIndex === 0 && isGroupUseEntireRow;

@@ -58,5 +67,5 @@ };

column: column,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -70,9 +79,10 @@ }

node: node,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
});
}
var isFooter = node.footer;
var keys = [node.key];
if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {
if (!this.gridOptionsService.isGroupMultiAutoColumn()) {
while (node.parent) {

@@ -83,3 +93,4 @@ node = node.parent;

}
return keys.reverse().join(' -> ');
var groupValue = keys.reverse().join(' -> ');
return isFooter ? "Total " + groupValue : groupValue;
};

@@ -94,5 +105,5 @@ BaseGridSerializingSession.prototype.processCell = function (params) {

value: value,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
type: type

@@ -99,0 +110,0 @@ });

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -17,3 +17,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@ag-grid-community/core");
exports.CsvSerializingSession = void 0;
var baseGridSerializingSession_1 = require("./baseGridSerializingSession");

@@ -100,3 +100,3 @@ var LINE_SEPARATOR = '\r\n';

}
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, core_1.Constants.EXPORT_TYPE_CSV, node));
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, 'csv', node));
};

@@ -103,0 +103,0 @@ CsvSerializingSession.prototype.putInQuotes = function (value) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.XmlFactory = void 0;
var LINE_SEPARATOR = '\r\n';

@@ -4,0 +5,0 @@ var XmlFactory = /** @class */ (function () {

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.ZipContainer = void 0;
var core_1 = require("@ag-grid-community/core");

@@ -16,0 +17,0 @@ // table for crc calculation

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CsvExportModule = void 0;
var core_1 = require("@ag-grid-community/core");
var csvCreator_1 = require("./csvExport/csvCreator");
var gridSerializer_1 = require("./csvExport/gridSerializer");
var version_1 = require("./version");
exports.CsvExportModule = {
version: version_1.VERSION,
moduleName: core_1.ModuleNames.CsvExportModule,
beans: [csvCreator_1.CsvCreator, gridSerializer_1.GridSerializer]
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZipContainer = exports.XmlFactory = exports.RowType = exports.GridSerializer = exports.Downloader = exports.CsvExportModule = exports.CsvCreator = exports.BaseGridSerializingSession = exports.BaseCreator = void 0;
var baseCreator_1 = require("./csvExport/baseCreator");
exports.BaseCreator = baseCreator_1.BaseCreator;
Object.defineProperty(exports, "BaseCreator", { enumerable: true, get: function () { return baseCreator_1.BaseCreator; } });
var baseGridSerializingSession_1 = require("./csvExport/sessions/baseGridSerializingSession");
exports.BaseGridSerializingSession = baseGridSerializingSession_1.BaseGridSerializingSession;
Object.defineProperty(exports, "BaseGridSerializingSession", { enumerable: true, get: function () { return baseGridSerializingSession_1.BaseGridSerializingSession; } });
var csvCreator_1 = require("./csvExport/csvCreator");
exports.CsvCreator = csvCreator_1.CsvCreator;
Object.defineProperty(exports, "CsvCreator", { enumerable: true, get: function () { return csvCreator_1.CsvCreator; } });
var csvExportModule_1 = require("./csvExportModule");
exports.CsvExportModule = csvExportModule_1.CsvExportModule;
Object.defineProperty(exports, "CsvExportModule", { enumerable: true, get: function () { return csvExportModule_1.CsvExportModule; } });
var downloader_1 = require("./csvExport/downloader");
exports.Downloader = downloader_1.Downloader;
Object.defineProperty(exports, "Downloader", { enumerable: true, get: function () { return downloader_1.Downloader; } });
var gridSerializer_1 = require("./csvExport/gridSerializer");
exports.GridSerializer = gridSerializer_1.GridSerializer;
exports.RowType = gridSerializer_1.RowType;
Object.defineProperty(exports, "GridSerializer", { enumerable: true, get: function () { return gridSerializer_1.GridSerializer; } });
Object.defineProperty(exports, "RowType", { enumerable: true, get: function () { return gridSerializer_1.RowType; } });
var xmlFactory_1 = require("./csvExport/xmlFactory");
exports.XmlFactory = xmlFactory_1.XmlFactory;
Object.defineProperty(exports, "XmlFactory", { enumerable: true, get: function () { return xmlFactory_1.XmlFactory; } });
var zipContainer_1 = require("./csvExport/zipContainer");
exports.ZipContainer = zipContainer_1.ZipContainer;
Object.defineProperty(exports, "ZipContainer", { enumerable: true, get: function () { return zipContainer_1.ZipContainer; } });
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseCreator = void 0;
class BaseCreator {

@@ -4,0 +5,0 @@ setBeans(beans) {

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

import { CsvCustomContent, CsvExportParams, GridOptionsWrapper, ICsvCreator } from "@ag-grid-community/core";
import { CsvCustomContent, CsvExportParams, GridOptionsService, ICsvCreator } from "@ag-grid-community/core";
import { BaseCreator } from "./baseCreator";

@@ -8,3 +8,3 @@ import { CsvSerializingSession } from "./sessions/csvSerializingSession";

private gridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
postConstruct(): void;

@@ -11,0 +11,0 @@ protected getMergedParams(params?: CsvExportParams): CsvExportParams;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.CsvCreator = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -18,7 +19,7 @@ const baseCreator_1 = require("./baseCreator");

gridSerializer: this.gridSerializer,
gridOptionsWrapper: this.gridOptionsWrapper
gridOptionsService: this.gridOptionsService
});
}
getMergedParams(params) {
const baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');
const baseParams = this.gridOptionsService.get('defaultCsvExportParams');
return Object.assign({}, baseParams, params);

@@ -53,3 +54,3 @@ }

createSerializingSession(params) {
const { columnModel, valueService, gridOptionsWrapper } = this;
const { columnModel, valueService, gridOptionsService } = this;
const { processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback, suppressQuotes, columnSeparator } = params;

@@ -59,3 +60,3 @@ return new csvSerializingSession_1.CsvSerializingSession({

valueService,
gridOptionsWrapper,
gridOptionsService,
processCellCallback: processCellCallback || undefined,

@@ -70,3 +71,3 @@ processHeaderCallback: processHeaderCallback || undefined,

isExportSuppressed() {
return this.gridOptionsWrapper.isSuppressCsvExport();
return this.gridOptionsService.is('suppressCsvExport');
}

@@ -84,4 +85,4 @@ };

__decorate([
core_1.Autowired('gridOptionsWrapper')
], CsvCreator.prototype, "gridOptionsWrapper", void 0);
core_1.Autowired('gridOptionsService')
], CsvCreator.prototype, "gridOptionsService", void 0);
__decorate([

@@ -88,0 +89,0 @@ core_1.PostConstruct

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Downloader = void 0;
class Downloader {

@@ -4,0 +5,0 @@ static download(fileName, content) {

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.GridSerializer = exports.RowType = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -27,8 +28,7 @@ var RowType;

const rowSkipper = params.shouldRowBeSkipped || (() => false);
const gridOptionsWrapper = this.gridOptionsWrapper;
const context = gridOptionsWrapper.getContext();
const api = gridOptionsWrapper.getApi();
const columnApi = gridOptionsWrapper.getColumnApi();
const skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();
const skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
const context = this.gridOptionsService.get('context');
const api = this.gridOptionsService.get('api');
const columnApi = this.gridOptionsService.get('columnApi');
const skipSingleChildrenGroup = this.gridOptionsService.is('groupRemoveSingleChildren');
const skipLowestSingleChildrenGroup = this.gridOptionsService.is('groupRemoveLowestSingleChildren');
// if onlySelected, we ignore groupHideOpenParents as the user has explicitly selected the rows they wish to export.

@@ -38,3 +38,3 @@ // similarly, if specific rowNodes are provided we do the same. (the clipboard service uses rowNodes to define which rows to export)

const isExplicitExportSelection = isClipboardExport || !!params.onlySelected;
const hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents() && !isExplicitExportSelection;
const hideOpenParents = this.gridOptionsService.is('groupHideOpenParents') && !isExplicitExportSelection;
const isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;

@@ -56,3 +56,3 @@ const skipRowGroups = params.skipGroups || params.skipRowGroups;

const nodeIsRootNode = node.level === -1;
if (nodeIsRootNode && !node.leafGroup && (!node.footer || !isClipboardExport)) {
if (nodeIsRootNode && !node.leafGroup && !node.footer) {
return;

@@ -154,4 +154,4 @@ }

const rowModelType = rowModel.getType();
const usingCsrm = rowModelType === core_1.Constants.ROW_MODEL_TYPE_CLIENT_SIDE;
const usingSsrm = rowModelType === core_1.Constants.ROW_MODEL_TYPE_SERVER_SIDE;
const usingCsrm = rowModelType === 'clientSide';
const usingSsrm = rowModelType === 'serverSide';
const onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;

@@ -170,3 +170,3 @@ const processRow = this.processRow.bind(this, gridSerializingSession, params, columnsToExport);

if (usingCsrm) {
rowModel.forEachPivotNode(processRow);
rowModel.forEachPivotNode(processRow, true);
}

@@ -196,3 +196,3 @@ else {

else if (usingCsrm) {
rowModel.forEachNodeAfterFilterAndSort(processRow);
rowModel.forEachNodeAfterFilterAndSort(processRow, true);
}

@@ -234,4 +234,4 @@ else if (usingSsrm) {

// add auto group column for tree data
const columns = this.gridOptionsWrapper.isTreeData()
? this.columnModel.getGridColumns([core_1.Constants.GROUP_AUTO_COLUMN_ID])
const columns = this.gridOptionsService.isTreeData()
? this.columnModel.getGridColumns([core_1.GROUP_AUTO_COLUMN_ID])
: [];

@@ -267,5 +267,5 @@ return columns.concat(this.columnModel.getAllPrimaryColumns() || []);

columnGroup: columnGroup,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -272,0 +272,0 @@ }

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

import { Column, ColumnGroup, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnGroup, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializer } from "../gridSerializer";
export interface BaseCreatorBeans {
gridSerializer: GridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
}

@@ -16,3 +16,3 @@ export interface RowAccumulator {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -19,0 +19,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

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

import { Column, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializingParams, GridSerializingSession, RowAccumulator, RowSpanningAccumulator } from "../interfaces";

@@ -6,3 +6,3 @@ export declare abstract class BaseGridSerializingSession<T> implements GridSerializingSession<T> {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -9,0 +9,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseGridSerializingSession = void 0;
class BaseGridSerializingSession {
constructor(config) {
this.groupColumns = [];
const { columnModel, valueService, gridOptionsWrapper, processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback } = config;
const { columnModel, valueService, gridOptionsService, processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback } = config;
this.columnModel = columnModel;
this.valueService = valueService;
this.gridOptionsWrapper = gridOptionsWrapper;
this.gridOptionsService = gridOptionsService;
this.processCellCallback = processCellCallback;

@@ -24,3 +25,3 @@ this.processHeaderCallback = processHeaderCallback;

// we render the group summary text e.g. "-> Parent -> Child"...
const hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();
const hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
const value = (!hideOpenParents && this.shouldRenderGroupSummaryCell(node, column, index))

@@ -47,6 +48,14 @@ ? this.createValueForGroupNode(node)

const currentColumnGroupIndex = this.groupColumns.indexOf(column);
if (currentColumnGroupIndex !== -1 && ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()])) {
return true;
if (currentColumnGroupIndex !== -1) {
if ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()]) {
return true;
}
// if this is a top level footer, always render`Total` in the left-most cell
if (node.footer && node.level === -1) {
const colDef = column.getColDef();
const isFullWidth = colDef == null || colDef.showRowGroup === true;
return isFullWidth || colDef.showRowGroup === this.columnModel.getRowGroupColumns()[0].getId();
}
}
const isGroupUseEntireRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());
const isGroupUseEntireRow = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());
return currentColumnIndex === 0 && isGroupUseEntireRow;

@@ -58,5 +67,5 @@ }

column: column,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -70,9 +79,10 @@ }

node: node,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
});
}
const isFooter = node.footer;
const keys = [node.key];
if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {
if (!this.gridOptionsService.isGroupMultiAutoColumn()) {
while (node.parent) {

@@ -83,3 +93,4 @@ node = node.parent;

}
return keys.reverse().join(' -> ');
const groupValue = keys.reverse().join(' -> ');
return isFooter ? `Total ${groupValue}` : groupValue;
}

@@ -94,5 +105,5 @@ processCell(params) {

value: value,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
type: type

@@ -99,0 +110,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@ag-grid-community/core");
exports.CsvSerializingSession = void 0;
const baseGridSerializingSession_1 = require("./baseGridSerializingSession");

@@ -82,3 +82,3 @@ const LINE_SEPARATOR = '\r\n';

}
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, core_1.Constants.EXPORT_TYPE_CSV, node));
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, 'csv', node));
}

@@ -85,0 +85,0 @@ putInQuotes(value) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.XmlFactory = void 0;
const LINE_SEPARATOR = '\r\n';

@@ -4,0 +5,0 @@ class XmlFactory {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZipContainer = void 0;
const core_1 = require("@ag-grid-community/core");

@@ -4,0 +5,0 @@ // table for crc calculation

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CsvExportModule = void 0;
const core_1 = require("@ag-grid-community/core");
const csvCreator_1 = require("./csvExport/csvCreator");
const gridSerializer_1 = require("./csvExport/gridSerializer");
const version_1 = require("./version");
exports.CsvExportModule = {
version: version_1.VERSION,
moduleName: core_1.ModuleNames.CsvExportModule,
beans: [csvCreator_1.CsvCreator, gridSerializer_1.GridSerializer]
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZipContainer = exports.XmlFactory = exports.RowType = exports.GridSerializer = exports.Downloader = exports.CsvExportModule = exports.CsvCreator = exports.BaseGridSerializingSession = exports.BaseCreator = void 0;
var baseCreator_1 = require("./csvExport/baseCreator");
exports.BaseCreator = baseCreator_1.BaseCreator;
Object.defineProperty(exports, "BaseCreator", { enumerable: true, get: function () { return baseCreator_1.BaseCreator; } });
var baseGridSerializingSession_1 = require("./csvExport/sessions/baseGridSerializingSession");
exports.BaseGridSerializingSession = baseGridSerializingSession_1.BaseGridSerializingSession;
Object.defineProperty(exports, "BaseGridSerializingSession", { enumerable: true, get: function () { return baseGridSerializingSession_1.BaseGridSerializingSession; } });
var csvCreator_1 = require("./csvExport/csvCreator");
exports.CsvCreator = csvCreator_1.CsvCreator;
Object.defineProperty(exports, "CsvCreator", { enumerable: true, get: function () { return csvCreator_1.CsvCreator; } });
var csvExportModule_1 = require("./csvExportModule");
exports.CsvExportModule = csvExportModule_1.CsvExportModule;
Object.defineProperty(exports, "CsvExportModule", { enumerable: true, get: function () { return csvExportModule_1.CsvExportModule; } });
var downloader_1 = require("./csvExport/downloader");
exports.Downloader = downloader_1.Downloader;
Object.defineProperty(exports, "Downloader", { enumerable: true, get: function () { return downloader_1.Downloader; } });
var gridSerializer_1 = require("./csvExport/gridSerializer");
exports.GridSerializer = gridSerializer_1.GridSerializer;
exports.RowType = gridSerializer_1.RowType;
Object.defineProperty(exports, "GridSerializer", { enumerable: true, get: function () { return gridSerializer_1.GridSerializer; } });
Object.defineProperty(exports, "RowType", { enumerable: true, get: function () { return gridSerializer_1.RowType; } });
var xmlFactory_1 = require("./csvExport/xmlFactory");
exports.XmlFactory = xmlFactory_1.XmlFactory;
Object.defineProperty(exports, "XmlFactory", { enumerable: true, get: function () { return xmlFactory_1.XmlFactory; } });
var zipContainer_1 = require("./csvExport/zipContainer");
exports.ZipContainer = zipContainer_1.ZipContainer;
Object.defineProperty(exports, "ZipContainer", { enumerable: true, get: function () { return zipContainer_1.ZipContainer; } });
/**
* @ag-grid-community/csv-export - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
* @ag-grid-community/csv-export - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0
* @link https://www.ag-grid.com/

@@ -36,6 +36,6 @@ * @license MIT

this.groupColumns = [];
var columnModel = config.columnModel, valueService = config.valueService, gridOptionsWrapper = config.gridOptionsWrapper, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
var columnModel = config.columnModel, valueService = config.valueService, gridOptionsService = config.gridOptionsService, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
this.columnModel = columnModel;
this.valueService = valueService;
this.gridOptionsWrapper = gridOptionsWrapper;
this.gridOptionsService = gridOptionsService;
this.processCellCallback = processCellCallback;

@@ -55,3 +55,3 @@ this.processHeaderCallback = processHeaderCallback;

// we render the group summary text e.g. "-> Parent -> Child"...
var hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();
var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
var value = (!hideOpenParents && this.shouldRenderGroupSummaryCell(node, column, index))

@@ -78,6 +78,14 @@ ? this.createValueForGroupNode(node)

var currentColumnGroupIndex = this.groupColumns.indexOf(column);
if (currentColumnGroupIndex !== -1 && ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()])) {
return true;
if (currentColumnGroupIndex !== -1) {
if ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()]) {
return true;
}
// if this is a top level footer, always render`Total` in the left-most cell
if (node.footer && node.level === -1) {
var colDef = column.getColDef();
var isFullWidth = colDef == null || colDef.showRowGroup === true;
return isFullWidth || colDef.showRowGroup === this.columnModel.getRowGroupColumns()[0].getId();
}
}
var isGroupUseEntireRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());
var isGroupUseEntireRow = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());
return currentColumnIndex === 0 && isGroupUseEntireRow;

@@ -89,5 +97,5 @@ };

column: column,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -101,9 +109,10 @@ }

node: node,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
});
}
var isFooter = node.footer;
var keys = [node.key];
if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {
if (!this.gridOptionsService.isGroupMultiAutoColumn()) {
while (node.parent) {

@@ -114,3 +123,4 @@ node = node.parent;

}
return keys.reverse().join(' -> ');
var groupValue = keys.reverse().join(' -> ');
return isFooter ? "Total " + groupValue : groupValue;
};

@@ -125,5 +135,5 @@ BaseGridSerializingSession.prototype.processCell = function (params) {

value: value,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
type: type

@@ -171,3 +181,3 @@ });

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -261,3 +271,3 @@ };

}
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, core.Constants.EXPORT_TYPE_CSV, node));
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, 'csv', node));
};

@@ -302,3 +312,3 @@ CsvSerializingSession.prototype.putInQuotes = function (value) {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -326,7 +336,7 @@ };

gridSerializer: this.gridSerializer,
gridOptionsWrapper: this.gridOptionsWrapper
gridOptionsService: this.gridOptionsService
});
};
CsvCreator.prototype.getMergedParams = function (params) {
var baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');
var baseParams = this.gridOptionsService.get('defaultCsvExportParams');
return Object.assign({}, baseParams, params);

@@ -362,3 +372,3 @@ };

CsvCreator.prototype.createSerializingSession = function (params) {
var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;
var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsService = _a.gridOptionsService;
var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;

@@ -368,3 +378,3 @@ return new CsvSerializingSession({

valueService: valueService,
gridOptionsWrapper: gridOptionsWrapper,
gridOptionsService: gridOptionsService,
processCellCallback: processCellCallback || undefined,

@@ -379,3 +389,3 @@ processHeaderCallback: processHeaderCallback || undefined,

CsvCreator.prototype.isExportSuppressed = function () {
return this.gridOptionsWrapper.isSuppressCsvExport();
return this.gridOptionsService.is('suppressCsvExport');
};

@@ -392,4 +402,4 @@ __decorate$1([

__decorate$1([
core.Autowired('gridOptionsWrapper')
], CsvCreator.prototype, "gridOptionsWrapper", void 0);
core.Autowired('gridOptionsService')
], CsvCreator.prototype, "gridOptionsService", void 0);
__decorate$1([

@@ -408,3 +418,3 @@ core.PostConstruct

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -445,8 +455,7 @@ };

var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });
var gridOptionsWrapper = this.gridOptionsWrapper;
var context = gridOptionsWrapper.getContext();
var api = gridOptionsWrapper.getApi();
var columnApi = gridOptionsWrapper.getColumnApi();
var skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();
var skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
var context = this.gridOptionsService.get('context');
var api = this.gridOptionsService.get('api');
var columnApi = this.gridOptionsService.get('columnApi');
var skipSingleChildrenGroup = this.gridOptionsService.is('groupRemoveSingleChildren');
var skipLowestSingleChildrenGroup = this.gridOptionsService.is('groupRemoveLowestSingleChildren');
// if onlySelected, we ignore groupHideOpenParents as the user has explicitly selected the rows they wish to export.

@@ -456,3 +465,3 @@ // similarly, if specific rowNodes are provided we do the same. (the clipboard service uses rowNodes to define which rows to export)

var isExplicitExportSelection = isClipboardExport || !!params.onlySelected;
var hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents() && !isExplicitExportSelection;
var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents') && !isExplicitExportSelection;
var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;

@@ -474,3 +483,3 @@ var skipRowGroups = params.skipGroups || params.skipRowGroups;

var nodeIsRootNode = node.level === -1;
if (nodeIsRootNode && !node.leafGroup && (!node.footer || !isClipboardExport)) {
if (nodeIsRootNode && !node.leafGroup && !node.footer) {
return;

@@ -575,4 +584,4 @@ }

var rowModelType = rowModel.getType();
var usingCsrm = rowModelType === core.Constants.ROW_MODEL_TYPE_CLIENT_SIDE;
var usingSsrm = rowModelType === core.Constants.ROW_MODEL_TYPE_SERVER_SIDE;
var usingCsrm = rowModelType === 'clientSide';
var usingSsrm = rowModelType === 'serverSide';
var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;

@@ -591,3 +600,3 @@ var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);

if (usingCsrm) {
rowModel.forEachPivotNode(processRow);
rowModel.forEachPivotNode(processRow, true);
}

@@ -617,3 +626,3 @@ else {

else if (usingCsrm) {
rowModel.forEachNodeAfterFilterAndSort(processRow);
rowModel.forEachNodeAfterFilterAndSort(processRow, true);
}

@@ -657,4 +666,4 @@ else if (usingSsrm) {

// add auto group column for tree data
var columns = this.gridOptionsWrapper.isTreeData()
? this.columnModel.getGridColumns([core.Constants.GROUP_AUTO_COLUMN_ID])
var columns = this.gridOptionsService.isTreeData()
? this.columnModel.getGridColumns([core.GROUP_AUTO_COLUMN_ID])
: [];

@@ -691,5 +700,5 @@ return columns.concat(this.columnModel.getAllPrimaryColumns() || []);

columnGroup: columnGroup,
api: _this.gridOptionsWrapper.getApi(),
columnApi: _this.gridOptionsWrapper.getColumnApi(),
context: _this.gridOptionsWrapper.getContext()
api: _this.gridOptionsService.get('api'),
columnApi: _this.gridOptionsService.get('columnApi'),
context: _this.gridOptionsService.get('context')
});

@@ -744,3 +753,7 @@ }

// DO NOT UPDATE MANUALLY: Generated from script during build time
var VERSION = '29.0.0';
var CsvExportModule = {
version: VERSION,
moduleName: core.ModuleNames.CsvExportModule,

@@ -747,0 +760,0 @@ beans: [CsvCreator, GridSerializer]

/**
* @ag-grid-community/csv-export - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
* @ag-grid-community/csv-export - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0
* @link https://www.ag-grid.com/

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

/**
* @ag-grid-community/csv-export - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
* @ag-grid-community/csv-export - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v29.0.0
* @link https://www.ag-grid.com/
* @license MIT
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,o=require("@ag-grid-community/core"),r=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.getFileName=function(e){var t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?e+"."+t:e},e.prototype.getData=function(e){var t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)},e}(),n=function(){function e(e){this.groupColumns=[];var t=e.columnModel,o=e.valueService,r=e.gridOptionsWrapper,n=e.processCellCallback,i=e.processHeaderCallback,s=e.processGroupHeaderCallback,u=e.processRowGroupCallback;this.columnModel=t,this.valueService=o,this.gridOptionsWrapper=r,this.processCellCallback=n,this.processHeaderCallback=i,this.processGroupHeaderCallback=s,this.processRowGroupCallback=u}return e.prototype.prepare=function(e){this.groupColumns=e.filter((function(e){return!!e.getColDef().showRowGroup}))},e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""},e.prototype.extractRowCellValue=function(e,t,o,r,n){var i=!this.gridOptionsWrapper.isGroupHideOpenParents()&&this.shouldRenderGroupSummaryCell(n,e,t)?this.createValueForGroupNode(n):this.valueService.getValue(e,n),s=this.processCell({accumulatedRowIndex:o,rowNode:n,column:e,value:i,processCellCallback:this.processCellCallback,type:r});return null!=s?s:""},e.prototype.shouldRenderGroupSummaryCell=function(e,t,o){var r;if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)&&(null===(r=e.groupData)||void 0===r?void 0:r[t.getId()]))return!0;var n=this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===o&&n},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}):this.columnModel.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()});var t=[e.key];if(!this.gridOptionsWrapper.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,t.push(e.key);return t.reverse().join(" -> ")},e.prototype.processCell=function(e){var t=e.accumulatedRowIndex,o=e.rowNode,r=e.column,n=e.value,i=e.processCellCallback,s=e.type;return i?i({accumulatedRowIndex:t,column:r,node:o,value:n,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),type:s}):null!=n?n:""},e}(),i=function(){function e(){}return e.download=function(e,t){var o=document.defaultView||window;if(o){var r=document.createElement("a"),n=o.URL.createObjectURL(t);r.setAttribute("href",n),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),document.body.removeChild(r),o.setTimeout((function(){o.URL.revokeObjectURL(n)}),0)}else console.warn("AG Grid: There is no `window` associated with the current `document`")},e}(),s=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)},function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),u=function(e){function t(t){var o=e.call(this,t)||this;o.isFirstLine=!0,o.result="";var r=t.suppressQuotes,n=t.columnSeparator;return o.suppressQuotes=r,o.columnSeparator=n,o}return s(t,e),t.prototype.addCustomContent=function(e){var t=this;e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((function(e){t.beginNewLine(),e.forEach((function(e,o){0!==o&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(e.data.value||""),e.mergeAcross&&t.appendEmptyCells(e.mergeAcross)}))})))},t.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,o,r){0!=o&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)},t.prototype.appendEmptyCells=function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")},t.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},t.prototype.onNewBodyRow=function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,t,r){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractRowCellValue(e,t,t,o.Constants.EXPORT_TYPE_CSV,r))},t.prototype.putInQuotes=function(e){return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"');var t},t.prototype.parse=function(){return this.result},t.prototype.beginNewLine=function(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1},t}(n),p=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),a=function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var u=e.length-1;u>=0;u--)(n=e[u])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsWrapper:this.gridOptionsWrapper})},t.prototype.getMergedParams=function(e){var t=this.gridOptionsWrapper.getDefaultExportParams("csv");return Object.assign({},t,e)},t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParams(e),o=this.getData(t),r=new Blob(["\ufeff",o],{type:"text/plain"});return i.download(this.getFileName(t.fileName),r),o},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e,t){void 0===t&&(t=!1);var o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)},t.prototype.getDefaultFileName=function(){return"export.csv"},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this.columnModel,o=this.valueService,r=this.gridOptionsWrapper,n=e,i=n.processCellCallback,s=n.processHeaderCallback,p=n.processGroupHeaderCallback,a=n.processRowGroupCallback,l=n.suppressQuotes,c=n.columnSeparator;return new u({columnModel:t,valueService:o,gridOptionsWrapper:r,processCellCallback:i||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:p||void 0,processRowGroupCallback:a||void 0,suppressQuotes:l||!1,columnSeparator:c||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsWrapper.isSuppressCsvExport()},a([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),a([o.Autowired("valueService")],t.prototype,"valueService",void 0),a([o.Autowired("gridSerializer")],t.prototype,"gridSerializer",void 0),a([o.Autowired("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),a([o.PostConstruct],t.prototype,"postConstruct",null),t=a([o.Bean("csvCreator")],t)}(r),c=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),d=function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var u=e.length-1;u>=0;u--)(n=e[u])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};exports.RowType=void 0,(t=exports.RowType||(exports.RowType={}))[t.HEADER_GROUPING=0]="HEADER_GROUPING",t[t.HEADER=1]="HEADER",t[t.BODY=2]="BODY";var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.serialize=function(e,t){void 0===t&&(t={});var r=this.getColumnsToExport(t.allColumns,t.columnKeys);return o._.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()},t.prototype.processRow=function(e,t,r,n){var i=t.shouldRowBeSkipped||function(){return!1},s=this.gridOptionsWrapper,u=s.getContext(),p=s.getApi(),a=s.getColumnApi(),l=s.isGroupRemoveSingleChildren(),c=s.isGroupRemoveLowestSingleChildren(),d=null!=t.rowPositions,f=d||!!t.onlySelected,h=s.isGroupHideOpenParents()&&!f,m=this.columnModel.isPivotMode()?n.leafGroup:!n.group,g=t.skipGroups||t.skipRowGroups,v=c&&n.leafGroup,w=1===n.allChildrenCount&&(l||v);if((g&&t.skipGroups&&o._.doOnce((function(){return console.warn("AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.")}),"gridSerializer-skipGroups"),!(!m&&(t.skipRowGroups||w||h)||t.onlySelected&&!n.isSelected()||t.skipPinnedTop&&"top"===n.rowPinned||t.skipPinnedBottom&&"bottom"===n.rowPinned))&&((!(-1===n.level)||n.leafGroup||n.footer&&d)&&!i({node:n,api:p,columnApi:a,context:u}))){var y=e.onNewBodyRow();if(r.forEach((function(e,t){y.onColumn(e,t,n)})),t.getCustomContentBelowRow){var C=t.getCustomContentBelowRow({node:n,api:p,columnApi:a,context:u});C&&e.addCustomContent(C)}}},t.prototype.appendContent=function(e){return function(t){var r=e.customFooter||e.appendContent;return r&&(e.customFooter&&o._.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.")}),"gridSerializer-customFooter"),t.addCustomContent(r)),t}},t.prototype.prependContent=function(e){return function(t){var r=e.customHeader||e.prependContent;return r&&(e.customHeader&&o._.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.")}),"gridSerializer-customHeader"),t.addCustomContent(r)),t}},t.prototype.prepareSession=function(e){return function(t){return t.prepare(e),t}},t.prototype.exportColumnGroups=function(e,t){var r=this;return function(n){if(e.skipColumnGroupHeaders)e.columnGroups&&o._.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.")}),"gridSerializer-columnGroups");else{var i=new o.GroupInstanceIdCreator,s=r.displayedGroupCreator.createDisplayedGroups(t,r.columnModel.getGridBalancedTree(),i,null);r.recursivelyAddHeaderGroups(s,n,e.processGroupHeaderCallback)}return n}},t.prototype.exportHeaders=function(e,t){return function(r){if(e.skipHeader||e.skipColumnHeaders)e.skipHeader&&o._.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.")}),"gridSerializer-skipHeader");else{var n=r.onNewHeaderRow();t.forEach((function(e,t){n.onColumn(e,t,void 0)}))}return r}},t.prototype.processPinnedTopRows=function(e,t){var o=this;return function(r){var n=o.processRow.bind(o,r,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"top"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.pinnedRowModel.getPinnedTopRow(e.rowIndex)})).forEach(n):o.pinnedRowModel.forEachPinnedTopRow(n),r}},t.prototype.processRows=function(e,t){var r=this;return function(n){var i=r.rowModel,s=i.getType(),u=s===o.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,p=s===o.Constants.ROW_MODEL_TYPE_SERVER_SIDE,a=!u&&e.onlySelected,l=r.processRow.bind(r,n,e,t),c=e.exportedRows,d=void 0===c?"filteredAndSorted":c;if(e.rowPositions)e.rowPositions.filter((function(e){return null==e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return i.getRow(e.rowIndex)})).forEach(l);else if(r.columnModel.isPivotMode())u?i.forEachPivotNode(l):i.forEachNode(l);else{if(e.onlySelectedAllPages||a)r.selectionService.getSelectedNodes().forEach(l);else"all"===d?i.forEachNode(l):u||p?i.forEachNodeAfterFilterAndSort(l):i.forEachNode(l)}return n}},t.prototype.processPinnedBottomRows=function(e,t){var o=this;return function(r){var n=o.processRow.bind(o,r,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"bottom"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.pinnedRowModel.getPinnedBottomRow(e.rowIndex)})).forEach(n):o.pinnedRowModel.forEachPinnedBottomRow(n),r}},t.prototype.getColumnsToExport=function(e,t){void 0===e&&(e=!1);var r=this.columnModel.isPivotMode();return t&&t.length?this.columnModel.getGridColumns(t):e&&!r?(this.gridOptionsWrapper.isTreeData()?this.columnModel.getGridColumns([o.Constants.GROUP_AUTO_COLUMN_ID]):[]).concat(this.columnModel.getAllPrimaryColumns()||[]):this.columnModel.getAllDisplayedColumns()},t.prototype.recursivelyAddHeaderGroups=function(e,t,r){var n=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return n.push(e)}))})),e.length>0&&e[0]instanceof o.ColumnGroup&&this.doAddHeaderHeader(t,e,r),n&&n.length>0&&this.recursivelyAddHeaderGroups(n,t,r)},t.prototype.doAddHeaderHeader=function(e,t,r){var n=this,i=e.onNewHeaderGroupingRow(),s=0;t.forEach((function(e){var t,u=e;t=r?r({columnGroup:u,api:n.gridOptionsWrapper.getApi(),columnApi:n.gridOptionsWrapper.getColumnApi(),context:n.gridOptionsWrapper.getContext()}):n.columnModel.getDisplayNameForColumnGroup(u,"header");var p=u.getLeafColumns().reduce((function(e,t,r,n){var i=o._.last(e);return"open"===t.getColumnGroupShow()?i&&null==i[1]||(i=[r],e.push(i)):i&&null==i[1]&&(i[1]=r-1),r===n.length-1&&i&&null==i[1]&&(i[1]=r),e}),[]);i.onColumn(u,t||"",s++,u.getLeafColumns().length-1,p)}))},d([o.Autowired("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),d([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),d([o.Autowired("rowModel")],t.prototype,"rowModel",void 0),d([o.Autowired("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),d([o.Autowired("selectionService")],t.prototype,"selectionService",void 0),d([o.Autowired("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),t=d([o.Bean("gridSerializer")],t)}(o.BeanStub),h={moduleName:o.ModuleNames.CsvExportModule,beans:[l,f]},m=function(){function e(){}return e.createHeader=function(e){void 0===e&&(e={});var t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),"<?xml "+t.map((function(t){return t+'="'+e[t]+'"'})).join(" ")+" ?>"},e.createXml=function(e,t){var o=this,r="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((function(e){Object.keys(e.map).forEach((function(n){r+=o.returnAttributeIfPopulated(e.prefix+n,e.map[n],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(n){r+=o.returnAttributeIfPopulated(n,e.properties.rawMap[n],t)})));var n="<"+e.name+r;return e.children||null!=e.textNode?null!=e.textNode?n+">"+e.textNode+"</"+e.name+">\r\n":(n+=">\r\n",e.children&&e.children.forEach((function(e){n+=o.createXml(e,t)})),n+"</"+e.name+">\r\n"):n+"/>\r\n"},e.returnAttributeIfPopulated=function(e,t,o){if(!t&&""!==t&&0!==t)return"";var r=t;return"boolean"==typeof t&&o&&(r=o(t))," "+e+'="'+r+'"'},e}(),g=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),w=function(){function e(){}return e.addFolders=function(e){e.forEach(this.addFolder.bind(this))},e.addFolder=function(e){this.folders.push({path:e,created:new Date,isBase64:!1})},e.addFile=function(e,t,o){void 0===o&&(o=!1),this.files.push({path:e,created:new Date,content:t,isBase64:o})},e.getContent=function(e){void 0===e&&(e="application/zip");var t=this.buildFileStream(),o=this.buildUint8Array(t);return this.clearStream(),new Blob([o],{type:e})},e.clearStream=function(){this.folders=[],this.files=[]},e.buildFileStream=function(e){var t,o;void 0===e&&(e="");var r=this.folders.concat(this.files),n=r.length,i="",s=0,u=0;try{for(var p=g(r),a=p.next();!a.done;a=p.next()){var l=a.value,c=this.getHeader(l,s),d=c.fileHeader,f=c.folderHeader,h=c.content;s+=d.length+h.length,u+=f.length,e+=d+h,i+=f}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=p.return)&&o.call(p)}finally{if(t)throw t.error}}return e+i+this.buildFolderEnd(n,u,s)},e.getHeader=function(e,t){var r=e.content,n=e.path,i=e.created,s=e.isBase64,u=o._.utf8_encode,p=o._.decToHex,a=u(n),l=a!==n,c=this.convertTime(i),d=this.convertDate(i),f="";if(l){var h=p(1,1)+p(this.getFromCrc32Table(a),4)+a;f="up"+p(h.length,2)+h}var m=r?this.getConvertedContent(r,s):{size:0,content:""},g=m.size,v=m.content,w="\n\0"+(l?"\0\b":"\0\0")+"\0\0"+p(c,2)+p(d,2)+p(g?this.getFromCrc32Table(v):0,4)+p(g,4)+p(g,4)+p(a.length,2)+p(f.length,2);return{fileHeader:"PK\x03\x04"+w+a+f,folderHeader:"PK\x01\x02\x14\0"+w+"\0\0\0\0\0\0"+(r?"\0\0\0\0":"\x10\0\0\0")+p(t,4)+a+f,content:v||""}},e.getConvertedContent=function(e,t){return void 0===t&&(t=!1),t&&(e=e.split(";base64,")[1]),{size:(e=t?atob(e):e).length,content:e}},e.buildFolderEnd=function(e,t,r){var n=o._.decToHex;return"PK\x05\x06\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+"\0\0"},e.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),o=0;o<t.length;o++)t[o]=e.charCodeAt(o);return t},e.getFromCrc32Table=function(e){if(!e.length)return 0;for(var t=e.length,o=new Uint8Array(t),r=0;r<t;r++)o[r]=e.charCodeAt(r);var n=-1,i=0;for(r=0;r<t;r++)i=o[r],n=n>>>8^v[255&(n^i)];return-1^n},e.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2},e.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate()},e.folders=[],e.files=[],e}();exports.BaseCreator=r,exports.BaseGridSerializingSession=n,exports.CsvCreator=l,exports.CsvExportModule=h,exports.Downloader=i,exports.GridSerializer=f,exports.XmlFactory=m,exports.ZipContainer=w;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,o=require("@ag-grid-community/core"),r=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.getFileName=function(e){var t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?e+"."+t:e},e.prototype.getData=function(e){var t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)},e}(),n=function(){function e(e){this.groupColumns=[];var t=e.columnModel,o=e.valueService,r=e.gridOptionsService,n=e.processCellCallback,i=e.processHeaderCallback,s=e.processGroupHeaderCallback,u=e.processRowGroupCallback;this.columnModel=t,this.valueService=o,this.gridOptionsService=r,this.processCellCallback=n,this.processHeaderCallback=i,this.processGroupHeaderCallback=s,this.processRowGroupCallback=u}return e.prototype.prepare=function(e){this.groupColumns=e.filter((function(e){return!!e.getColDef().showRowGroup}))},e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""},e.prototype.extractRowCellValue=function(e,t,o,r,n){var i=!this.gridOptionsService.is("groupHideOpenParents")&&this.shouldRenderGroupSummaryCell(n,e,t)?this.createValueForGroupNode(n):this.valueService.getValue(e,n),s=this.processCell({accumulatedRowIndex:o,rowNode:n,column:e,value:i,processCellCallback:this.processCellCallback,type:r});return null!=s?s:""},e.prototype.shouldRenderGroupSummaryCell=function(e,t,o){var r;if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)){if(null===(r=e.groupData)||void 0===r?void 0:r[t.getId()])return!0;if(e.footer&&-1===e.level){var n=t.getColDef();return null==n||!0===n.showRowGroup||n.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}var i=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===o&&i},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsService.get("api"),columnApi:this.gridOptionsService.get("columnApi"),context:this.gridOptionsService.get("context")}):this.columnModel.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:e,api:this.gridOptionsService.get("api"),columnApi:this.gridOptionsService.get("columnApi"),context:this.gridOptionsService.get("context")});var t=e.footer,o=[e.key];if(!this.gridOptionsService.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,o.push(e.key);var r=o.reverse().join(" -> ");return t?"Total "+r:r},e.prototype.processCell=function(e){var t=e.accumulatedRowIndex,o=e.rowNode,r=e.column,n=e.value,i=e.processCellCallback,s=e.type;return i?i({accumulatedRowIndex:t,column:r,node:o,value:n,api:this.gridOptionsService.get("api"),columnApi:this.gridOptionsService.get("columnApi"),context:this.gridOptionsService.get("context"),type:s}):null!=n?n:""},e}(),i=function(){function e(){}return e.download=function(e,t){var o=document.defaultView||window;if(o){var r=document.createElement("a"),n=o.URL.createObjectURL(t);r.setAttribute("href",n),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),document.body.removeChild(r),o.setTimeout((function(){o.URL.revokeObjectURL(n)}),0)}else console.warn("AG Grid: There is no `window` associated with the current `document`")},e}(),s=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)},function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}),u=function(e){function t(t){var o=e.call(this,t)||this;o.isFirstLine=!0,o.result="";var r=t.suppressQuotes,n=t.columnSeparator;return o.suppressQuotes=r,o.columnSeparator=n,o}return s(t,e),t.prototype.addCustomContent=function(e){var t=this;e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((function(e){t.beginNewLine(),e.forEach((function(e,o){0!==o&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(e.data.value||""),e.mergeAcross&&t.appendEmptyCells(e.mergeAcross)}))})))},t.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,o,r){0!=o&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)},t.prototype.appendEmptyCells=function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")},t.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},t.prototype.onNewBodyRow=function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractRowCellValue(e,t,t,"csv",o))},t.prototype.putInQuotes=function(e){return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"');var t},t.prototype.parse=function(){return this.result},t.prototype.beginNewLine=function(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1},t}(n),a=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),p=function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var u=e.length-1;u>=0;u--)(n=e[u])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})},t.prototype.getMergedParams=function(e){var t=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},t,e)},t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParams(e),o=this.getData(t),r=new Blob(["\ufeff",o],{type:"text/plain"});return i.download(this.getFileName(t.fileName),r),o},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e,t){void 0===t&&(t=!1);var o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)},t.prototype.getDefaultFileName=function(){return"export.csv"},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this.columnModel,o=this.valueService,r=this.gridOptionsService,n=e,i=n.processCellCallback,s=n.processHeaderCallback,a=n.processGroupHeaderCallback,p=n.processRowGroupCallback,l=n.suppressQuotes,c=n.columnSeparator;return new u({columnModel:t,valueService:o,gridOptionsService:r,processCellCallback:i||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:p||void 0,suppressQuotes:l||!1,columnSeparator:c||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsService.is("suppressCsvExport")},p([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),p([o.Autowired("valueService")],t.prototype,"valueService",void 0),p([o.Autowired("gridSerializer")],t.prototype,"gridSerializer",void 0),p([o.Autowired("gridOptionsService")],t.prototype,"gridOptionsService",void 0),p([o.PostConstruct],t.prototype,"postConstruct",null),t=p([o.Bean("csvCreator")],t)}(r),c=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),d=function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var u=e.length-1;u>=0;u--)(n=e[u])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};exports.RowType=void 0,(t=exports.RowType||(exports.RowType={}))[t.HEADER_GROUPING=0]="HEADER_GROUPING",t[t.HEADER=1]="HEADER",t[t.BODY=2]="BODY";var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.serialize=function(e,t){void 0===t&&(t={});var r=this.getColumnsToExport(t.allColumns,t.columnKeys);return o._.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()},t.prototype.processRow=function(e,t,r,n){var i=t.shouldRowBeSkipped||function(){return!1},s=this.gridOptionsService.get("context"),u=this.gridOptionsService.get("api"),a=this.gridOptionsService.get("columnApi"),p=this.gridOptionsService.is("groupRemoveSingleChildren"),l=this.gridOptionsService.is("groupRemoveLowestSingleChildren"),c=null!=t.rowPositions||!!t.onlySelected,d=this.gridOptionsService.is("groupHideOpenParents")&&!c,f=this.columnModel.isPivotMode()?n.leafGroup:!n.group,h=t.skipGroups||t.skipRowGroups,v=l&&n.leafGroup,g=1===n.allChildrenCount&&(p||v);if((h&&t.skipGroups&&o._.doOnce((function(){return console.warn("AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.")}),"gridSerializer-skipGroups"),!(!f&&(t.skipRowGroups||g||d)||t.onlySelected&&!n.isSelected()||t.skipPinnedTop&&"top"===n.rowPinned||t.skipPinnedBottom&&"bottom"===n.rowPinned))&&((!(-1===n.level)||n.leafGroup||n.footer)&&!i({node:n,api:u,columnApi:a,context:s}))){var m=e.onNewBodyRow();if(r.forEach((function(e,t){m.onColumn(e,t,n)})),t.getCustomContentBelowRow){var w=t.getCustomContentBelowRow({node:n,api:u,columnApi:a,context:s});w&&e.addCustomContent(w)}}},t.prototype.appendContent=function(e){return function(t){var r=e.customFooter||e.appendContent;return r&&(e.customFooter&&o._.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.")}),"gridSerializer-customFooter"),t.addCustomContent(r)),t}},t.prototype.prependContent=function(e){return function(t){var r=e.customHeader||e.prependContent;return r&&(e.customHeader&&o._.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.")}),"gridSerializer-customHeader"),t.addCustomContent(r)),t}},t.prototype.prepareSession=function(e){return function(t){return t.prepare(e),t}},t.prototype.exportColumnGroups=function(e,t){var r=this;return function(n){if(e.skipColumnGroupHeaders)e.columnGroups&&o._.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.")}),"gridSerializer-columnGroups");else{var i=new o.GroupInstanceIdCreator,s=r.displayedGroupCreator.createDisplayedGroups(t,r.columnModel.getGridBalancedTree(),i,null);r.recursivelyAddHeaderGroups(s,n,e.processGroupHeaderCallback)}return n}},t.prototype.exportHeaders=function(e,t){return function(r){if(e.skipHeader||e.skipColumnHeaders)e.skipHeader&&o._.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.")}),"gridSerializer-skipHeader");else{var n=r.onNewHeaderRow();t.forEach((function(e,t){n.onColumn(e,t,void 0)}))}return r}},t.prototype.processPinnedTopRows=function(e,t){var o=this;return function(r){var n=o.processRow.bind(o,r,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"top"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.pinnedRowModel.getPinnedTopRow(e.rowIndex)})).forEach(n):o.pinnedRowModel.forEachPinnedTopRow(n),r}},t.prototype.processRows=function(e,t){var o=this;return function(r){var n=o.rowModel,i=n.getType(),s="clientSide"===i,u="serverSide"===i,a=!s&&e.onlySelected,p=o.processRow.bind(o,r,e,t),l=e.exportedRows,c=void 0===l?"filteredAndSorted":l;if(e.rowPositions)e.rowPositions.filter((function(e){return null==e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return n.getRow(e.rowIndex)})).forEach(p);else if(o.columnModel.isPivotMode())s?n.forEachPivotNode(p,!0):n.forEachNode(p);else{if(e.onlySelectedAllPages||a)o.selectionService.getSelectedNodes().forEach(p);else"all"===c?n.forEachNode(p):s?n.forEachNodeAfterFilterAndSort(p,!0):u?n.forEachNodeAfterFilterAndSort(p):n.forEachNode(p)}return r}},t.prototype.processPinnedBottomRows=function(e,t){var o=this;return function(r){var n=o.processRow.bind(o,r,e,t);return e.rowPositions?e.rowPositions.filter((function(e){return"bottom"===e.rowPinned})).sort((function(e,t){return e.rowIndex-t.rowIndex})).map((function(e){return o.pinnedRowModel.getPinnedBottomRow(e.rowIndex)})).forEach(n):o.pinnedRowModel.forEachPinnedBottomRow(n),r}},t.prototype.getColumnsToExport=function(e,t){void 0===e&&(e=!1);var r=this.columnModel.isPivotMode();return t&&t.length?this.columnModel.getGridColumns(t):e&&!r?(this.gridOptionsService.isTreeData()?this.columnModel.getGridColumns([o.GROUP_AUTO_COLUMN_ID]):[]).concat(this.columnModel.getAllPrimaryColumns()||[]):this.columnModel.getAllDisplayedColumns()},t.prototype.recursivelyAddHeaderGroups=function(e,t,r){var n=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return n.push(e)}))})),e.length>0&&e[0]instanceof o.ColumnGroup&&this.doAddHeaderHeader(t,e,r),n&&n.length>0&&this.recursivelyAddHeaderGroups(n,t,r)},t.prototype.doAddHeaderHeader=function(e,t,r){var n=this,i=e.onNewHeaderGroupingRow(),s=0;t.forEach((function(e){var t,u=e;t=r?r({columnGroup:u,api:n.gridOptionsService.get("api"),columnApi:n.gridOptionsService.get("columnApi"),context:n.gridOptionsService.get("context")}):n.columnModel.getDisplayNameForColumnGroup(u,"header");var a=u.getLeafColumns().reduce((function(e,t,r,n){var i=o._.last(e);return"open"===t.getColumnGroupShow()?i&&null==i[1]||(i=[r],e.push(i)):i&&null==i[1]&&(i[1]=r-1),r===n.length-1&&i&&null==i[1]&&(i[1]=r),e}),[]);i.onColumn(u,t||"",s++,u.getLeafColumns().length-1,a)}))},d([o.Autowired("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),d([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),d([o.Autowired("rowModel")],t.prototype,"rowModel",void 0),d([o.Autowired("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),d([o.Autowired("selectionService")],t.prototype,"selectionService",void 0),d([o.Autowired("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),t=d([o.Bean("gridSerializer")],t)}(o.BeanStub),h={version:"29.0.0",moduleName:o.ModuleNames.CsvExportModule,beans:[l,f]},v=function(){function e(){}return e.createHeader=function(e){void 0===e&&(e={});var t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),"<?xml "+t.map((function(t){return t+'="'+e[t]+'"'})).join(" ")+" ?>"},e.createXml=function(e,t){var o=this,r="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((function(e){Object.keys(e.map).forEach((function(n){r+=o.returnAttributeIfPopulated(e.prefix+n,e.map[n],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(n){r+=o.returnAttributeIfPopulated(n,e.properties.rawMap[n],t)})));var n="<"+e.name+r;return e.children||null!=e.textNode?null!=e.textNode?n+">"+e.textNode+"</"+e.name+">\r\n":(n+=">\r\n",e.children&&e.children.forEach((function(e){n+=o.createXml(e,t)})),n+"</"+e.name+">\r\n"):n+"/>\r\n"},e.returnAttributeIfPopulated=function(e,t,o){if(!t&&""!==t&&0!==t)return"";var r=t;return"boolean"==typeof t&&o&&(r=o(t))," "+e+'="'+r+'"'},e}(),g=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),w=function(){function e(){}return e.addFolders=function(e){e.forEach(this.addFolder.bind(this))},e.addFolder=function(e){this.folders.push({path:e,created:new Date,isBase64:!1})},e.addFile=function(e,t,o){void 0===o&&(o=!1),this.files.push({path:e,created:new Date,content:t,isBase64:o})},e.getContent=function(e){void 0===e&&(e="application/zip");var t=this.buildFileStream(),o=this.buildUint8Array(t);return this.clearStream(),new Blob([o],{type:e})},e.clearStream=function(){this.folders=[],this.files=[]},e.buildFileStream=function(e){var t,o;void 0===e&&(e="");var r=this.folders.concat(this.files),n=r.length,i="",s=0,u=0;try{for(var a=g(r),p=a.next();!p.done;p=a.next()){var l=p.value,c=this.getHeader(l,s),d=c.fileHeader,f=c.folderHeader,h=c.content;s+=d.length+h.length,u+=f.length,e+=d+h,i+=f}}catch(e){t={error:e}}finally{try{p&&!p.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}return e+i+this.buildFolderEnd(n,u,s)},e.getHeader=function(e,t){var r=e.content,n=e.path,i=e.created,s=e.isBase64,u=o._.utf8_encode,a=o._.decToHex,p=u(n),l=p!==n,c=this.convertTime(i),d=this.convertDate(i),f="";if(l){var h=a(1,1)+a(this.getFromCrc32Table(p),4)+p;f="up"+a(h.length,2)+h}var v=r?this.getConvertedContent(r,s):{size:0,content:""},g=v.size,m=v.content,w="\n\0"+(l?"\0\b":"\0\0")+"\0\0"+a(c,2)+a(d,2)+a(g?this.getFromCrc32Table(m):0,4)+a(g,4)+a(g,4)+a(p.length,2)+a(f.length,2);return{fileHeader:"PK\x03\x04"+w+p+f,folderHeader:"PK\x01\x02\x14\0"+w+"\0\0\0\0\0\0"+(r?"\0\0\0\0":"\x10\0\0\0")+a(t,4)+p+f,content:m||""}},e.getConvertedContent=function(e,t){return void 0===t&&(t=!1),t&&(e=e.split(";base64,")[1]),{size:(e=t?atob(e):e).length,content:e}},e.buildFolderEnd=function(e,t,r){var n=o._.decToHex;return"PK\x05\x06\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+"\0\0"},e.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),o=0;o<t.length;o++)t[o]=e.charCodeAt(o);return t},e.getFromCrc32Table=function(e){if(!e.length)return 0;for(var t=e.length,o=new Uint8Array(t),r=0;r<t;r++)o[r]=e.charCodeAt(r);var n=-1,i=0;for(r=0;r<t;r++)i=o[r],n=n>>>8^m[255&(n^i)];return-1^n},e.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2},e.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate()},e.folders=[],e.files=[],e}();exports.BaseCreator=r,exports.BaseGridSerializingSession=n,exports.CsvCreator=l,exports.CsvExportModule=h,exports.Downloader=i,exports.GridSerializer=f,exports.XmlFactory=v,exports.ZipContainer=w;

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

import { CsvCustomContent, CsvExportParams, GridOptionsWrapper, ICsvCreator } from "@ag-grid-community/core";
import { CsvCustomContent, CsvExportParams, GridOptionsService, ICsvCreator } from "@ag-grid-community/core";
import { BaseCreator } from "./baseCreator";

@@ -8,3 +8,3 @@ import { CsvSerializingSession } from "./sessions/csvSerializingSession";

private gridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
postConstruct(): void;

@@ -11,0 +11,0 @@ protected getMergedParams(params?: CsvExportParams): CsvExportParams;

@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -33,7 +33,7 @@ };

gridSerializer: this.gridSerializer,
gridOptionsWrapper: this.gridOptionsWrapper
gridOptionsService: this.gridOptionsService
});
};
CsvCreator.prototype.getMergedParams = function (params) {
var baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');
var baseParams = this.gridOptionsService.get('defaultCsvExportParams');
return Object.assign({}, baseParams, params);

@@ -69,3 +69,3 @@ };

CsvCreator.prototype.createSerializingSession = function (params) {
var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;
var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsService = _a.gridOptionsService;
var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;

@@ -75,3 +75,3 @@ return new CsvSerializingSession({

valueService: valueService,
gridOptionsWrapper: gridOptionsWrapper,
gridOptionsService: gridOptionsService,
processCellCallback: processCellCallback || undefined,

@@ -86,3 +86,3 @@ processHeaderCallback: processHeaderCallback || undefined,

CsvCreator.prototype.isExportSuppressed = function () {
return this.gridOptionsWrapper.isSuppressCsvExport();
return this.gridOptionsService.is('suppressCsvExport');
};

@@ -99,4 +99,4 @@ __decorate([

__decorate([
Autowired('gridOptionsWrapper')
], CsvCreator.prototype, "gridOptionsWrapper", void 0);
Autowired('gridOptionsService')
], CsvCreator.prototype, "gridOptionsService", void 0);
__decorate([

@@ -103,0 +103,0 @@ PostConstruct

@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -21,3 +21,3 @@ };

};
import { _, Autowired, Bean, BeanStub, ColumnGroup, Constants, GroupInstanceIdCreator } from "@ag-grid-community/core";
import { _, Autowired, Bean, BeanStub, ColumnGroup, GROUP_AUTO_COLUMN_ID, GroupInstanceIdCreator } from "@ag-grid-community/core";
export var RowType;

@@ -44,8 +44,7 @@ (function (RowType) {

var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });
var gridOptionsWrapper = this.gridOptionsWrapper;
var context = gridOptionsWrapper.getContext();
var api = gridOptionsWrapper.getApi();
var columnApi = gridOptionsWrapper.getColumnApi();
var skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();
var skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
var context = this.gridOptionsService.get('context');
var api = this.gridOptionsService.get('api');
var columnApi = this.gridOptionsService.get('columnApi');
var skipSingleChildrenGroup = this.gridOptionsService.is('groupRemoveSingleChildren');
var skipLowestSingleChildrenGroup = this.gridOptionsService.is('groupRemoveLowestSingleChildren');
// if onlySelected, we ignore groupHideOpenParents as the user has explicitly selected the rows they wish to export.

@@ -55,3 +54,3 @@ // similarly, if specific rowNodes are provided we do the same. (the clipboard service uses rowNodes to define which rows to export)

var isExplicitExportSelection = isClipboardExport || !!params.onlySelected;
var hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents() && !isExplicitExportSelection;
var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents') && !isExplicitExportSelection;
var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;

@@ -73,3 +72,3 @@ var skipRowGroups = params.skipGroups || params.skipRowGroups;

var nodeIsRootNode = node.level === -1;
if (nodeIsRootNode && !node.leafGroup && (!node.footer || !isClipboardExport)) {
if (nodeIsRootNode && !node.leafGroup && !node.footer) {
return;

@@ -174,4 +173,4 @@ }

var rowModelType = rowModel.getType();
var usingCsrm = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;
var usingSsrm = rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;
var usingCsrm = rowModelType === 'clientSide';
var usingSsrm = rowModelType === 'serverSide';
var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;

@@ -190,3 +189,3 @@ var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);

if (usingCsrm) {
rowModel.forEachPivotNode(processRow);
rowModel.forEachPivotNode(processRow, true);
}

@@ -216,3 +215,3 @@ else {

else if (usingCsrm) {
rowModel.forEachNodeAfterFilterAndSort(processRow);
rowModel.forEachNodeAfterFilterAndSort(processRow, true);
}

@@ -256,4 +255,4 @@ else if (usingSsrm) {

// add auto group column for tree data
var columns = this.gridOptionsWrapper.isTreeData()
? this.columnModel.getGridColumns([Constants.GROUP_AUTO_COLUMN_ID])
var columns = this.gridOptionsService.isTreeData()
? this.columnModel.getGridColumns([GROUP_AUTO_COLUMN_ID])
: [];

@@ -290,5 +289,5 @@ return columns.concat(this.columnModel.getAllPrimaryColumns() || []);

columnGroup: columnGroup,
api: _this.gridOptionsWrapper.getApi(),
columnApi: _this.gridOptionsWrapper.getColumnApi(),
context: _this.gridOptionsWrapper.getContext()
api: _this.gridOptionsService.get('api'),
columnApi: _this.gridOptionsService.get('columnApi'),
context: _this.gridOptionsService.get('context')
});

@@ -295,0 +294,0 @@ }

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

import { Column, ColumnGroup, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnGroup, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializer } from "../gridSerializer";
export interface BaseCreatorBeans {
gridSerializer: GridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
}

@@ -16,3 +16,3 @@ export interface RowAccumulator {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -19,0 +19,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

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

import { Column, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializingParams, GridSerializingSession, RowAccumulator, RowSpanningAccumulator } from "../interfaces";

@@ -6,3 +6,3 @@ export declare abstract class BaseGridSerializingSession<T> implements GridSerializingSession<T> {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -9,0 +9,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

var BaseGridSerializingSession = /** @class */ (function () {
function BaseGridSerializingSession(config) {
this.groupColumns = [];
var columnModel = config.columnModel, valueService = config.valueService, gridOptionsWrapper = config.gridOptionsWrapper, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
var columnModel = config.columnModel, valueService = config.valueService, gridOptionsService = config.gridOptionsService, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;
this.columnModel = columnModel;
this.valueService = valueService;
this.gridOptionsWrapper = gridOptionsWrapper;
this.gridOptionsService = gridOptionsService;
this.processCellCallback = processCellCallback;

@@ -22,3 +22,3 @@ this.processHeaderCallback = processHeaderCallback;

// we render the group summary text e.g. "-> Parent -> Child"...
var hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();
var hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
var value = (!hideOpenParents && this.shouldRenderGroupSummaryCell(node, column, index))

@@ -45,6 +45,14 @@ ? this.createValueForGroupNode(node)

var currentColumnGroupIndex = this.groupColumns.indexOf(column);
if (currentColumnGroupIndex !== -1 && ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()])) {
return true;
if (currentColumnGroupIndex !== -1) {
if ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()]) {
return true;
}
// if this is a top level footer, always render`Total` in the left-most cell
if (node.footer && node.level === -1) {
var colDef = column.getColDef();
var isFullWidth = colDef == null || colDef.showRowGroup === true;
return isFullWidth || colDef.showRowGroup === this.columnModel.getRowGroupColumns()[0].getId();
}
}
var isGroupUseEntireRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());
var isGroupUseEntireRow = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());
return currentColumnIndex === 0 && isGroupUseEntireRow;

@@ -56,5 +64,5 @@ };

column: column,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -68,9 +76,10 @@ }

node: node,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
});
}
var isFooter = node.footer;
var keys = [node.key];
if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {
if (!this.gridOptionsService.isGroupMultiAutoColumn()) {
while (node.parent) {

@@ -81,3 +90,4 @@ node = node.parent;

}
return keys.reverse().join(' -> ');
var groupValue = keys.reverse().join(' -> ');
return isFooter ? "Total " + groupValue : groupValue;
};

@@ -92,5 +102,5 @@ BaseGridSerializingSession.prototype.processCell = function (params) {

value: value,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
type: type

@@ -97,0 +107,0 @@ });

@@ -5,3 +5,3 @@ var __extends = (this && this.__extends) || (function () {

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -15,3 +15,2 @@ };

})();
import { Constants } from "@ag-grid-community/core";
import { BaseGridSerializingSession } from "./baseGridSerializingSession";

@@ -98,3 +97,3 @@ var LINE_SEPARATOR = '\r\n';

}
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, Constants.EXPORT_TYPE_CSV, node));
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, 'csv', node));
};

@@ -101,0 +100,0 @@ CsvSerializingSession.prototype.putInQuotes = function (value) {

import { ModuleNames } from "@ag-grid-community/core";
import { CsvCreator } from "./csvExport/csvCreator";
import { GridSerializer } from "./csvExport/gridSerializer";
import { VERSION } from "./version";
export var CsvExportModule = {
version: VERSION,
moduleName: ModuleNames.CsvExportModule,
beans: [CsvCreator, GridSerializer]
};

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

import { CsvCustomContent, CsvExportParams, GridOptionsWrapper, ICsvCreator } from "@ag-grid-community/core";
import { CsvCustomContent, CsvExportParams, GridOptionsService, ICsvCreator } from "@ag-grid-community/core";
import { BaseCreator } from "./baseCreator";

@@ -8,3 +8,3 @@ import { CsvSerializingSession } from "./sessions/csvSerializingSession";

private gridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
postConstruct(): void;

@@ -11,0 +11,0 @@ protected getMergedParams(params?: CsvExportParams): CsvExportParams;

@@ -15,7 +15,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

gridSerializer: this.gridSerializer,
gridOptionsWrapper: this.gridOptionsWrapper
gridOptionsService: this.gridOptionsService
});
}
getMergedParams(params) {
const baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');
const baseParams = this.gridOptionsService.get('defaultCsvExportParams');
return Object.assign({}, baseParams, params);

@@ -50,3 +50,3 @@ }

createSerializingSession(params) {
const { columnModel, valueService, gridOptionsWrapper } = this;
const { columnModel, valueService, gridOptionsService } = this;
const { processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback, suppressQuotes, columnSeparator } = params;

@@ -56,3 +56,3 @@ return new CsvSerializingSession({

valueService,
gridOptionsWrapper,
gridOptionsService,
processCellCallback: processCellCallback || undefined,

@@ -67,3 +67,3 @@ processHeaderCallback: processHeaderCallback || undefined,

isExportSuppressed() {
return this.gridOptionsWrapper.isSuppressCsvExport();
return this.gridOptionsService.is('suppressCsvExport');
}

@@ -81,4 +81,4 @@ };

__decorate([
Autowired('gridOptionsWrapper')
], CsvCreator.prototype, "gridOptionsWrapper", void 0);
Autowired('gridOptionsService')
], CsvCreator.prototype, "gridOptionsService", void 0);
__decorate([

@@ -85,0 +85,0 @@ PostConstruct

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

};
import { _, Autowired, Bean, BeanStub, ColumnGroup, Constants, GroupInstanceIdCreator } from "@ag-grid-community/core";
import { _, Autowired, Bean, BeanStub, ColumnGroup, GROUP_AUTO_COLUMN_ID, GroupInstanceIdCreator } from "@ag-grid-community/core";
export var RowType;

@@ -25,8 +25,7 @@ (function (RowType) {

const rowSkipper = params.shouldRowBeSkipped || (() => false);
const gridOptionsWrapper = this.gridOptionsWrapper;
const context = gridOptionsWrapper.getContext();
const api = gridOptionsWrapper.getApi();
const columnApi = gridOptionsWrapper.getColumnApi();
const skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();
const skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();
const context = this.gridOptionsService.get('context');
const api = this.gridOptionsService.get('api');
const columnApi = this.gridOptionsService.get('columnApi');
const skipSingleChildrenGroup = this.gridOptionsService.is('groupRemoveSingleChildren');
const skipLowestSingleChildrenGroup = this.gridOptionsService.is('groupRemoveLowestSingleChildren');
// if onlySelected, we ignore groupHideOpenParents as the user has explicitly selected the rows they wish to export.

@@ -36,3 +35,3 @@ // similarly, if specific rowNodes are provided we do the same. (the clipboard service uses rowNodes to define which rows to export)

const isExplicitExportSelection = isClipboardExport || !!params.onlySelected;
const hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents() && !isExplicitExportSelection;
const hideOpenParents = this.gridOptionsService.is('groupHideOpenParents') && !isExplicitExportSelection;
const isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;

@@ -54,3 +53,3 @@ const skipRowGroups = params.skipGroups || params.skipRowGroups;

const nodeIsRootNode = node.level === -1;
if (nodeIsRootNode && !node.leafGroup && (!node.footer || !isClipboardExport)) {
if (nodeIsRootNode && !node.leafGroup && !node.footer) {
return;

@@ -152,4 +151,4 @@ }

const rowModelType = rowModel.getType();
const usingCsrm = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;
const usingSsrm = rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;
const usingCsrm = rowModelType === 'clientSide';
const usingSsrm = rowModelType === 'serverSide';
const onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;

@@ -168,3 +167,3 @@ const processRow = this.processRow.bind(this, gridSerializingSession, params, columnsToExport);

if (usingCsrm) {
rowModel.forEachPivotNode(processRow);
rowModel.forEachPivotNode(processRow, true);
}

@@ -194,3 +193,3 @@ else {

else if (usingCsrm) {
rowModel.forEachNodeAfterFilterAndSort(processRow);
rowModel.forEachNodeAfterFilterAndSort(processRow, true);
}

@@ -232,4 +231,4 @@ else if (usingSsrm) {

// add auto group column for tree data
const columns = this.gridOptionsWrapper.isTreeData()
? this.columnModel.getGridColumns([Constants.GROUP_AUTO_COLUMN_ID])
const columns = this.gridOptionsService.isTreeData()
? this.columnModel.getGridColumns([GROUP_AUTO_COLUMN_ID])
: [];

@@ -265,5 +264,5 @@ return columns.concat(this.columnModel.getAllPrimaryColumns() || []);

columnGroup: columnGroup,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -270,0 +269,0 @@ }

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

import { Column, ColumnGroup, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnGroup, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializer } from "../gridSerializer";
export interface BaseCreatorBeans {
gridSerializer: GridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
}

@@ -16,3 +16,3 @@ export interface RowAccumulator {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -19,0 +19,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

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

import { Column, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializingParams, GridSerializingSession, RowAccumulator, RowSpanningAccumulator } from "../interfaces";

@@ -6,3 +6,3 @@ export declare abstract class BaseGridSerializingSession<T> implements GridSerializingSession<T> {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -9,0 +9,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

export class BaseGridSerializingSession {
constructor(config) {
this.groupColumns = [];
const { columnModel, valueService, gridOptionsWrapper, processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback } = config;
const { columnModel, valueService, gridOptionsService, processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback } = config;
this.columnModel = columnModel;
this.valueService = valueService;
this.gridOptionsWrapper = gridOptionsWrapper;
this.gridOptionsService = gridOptionsService;
this.processCellCallback = processCellCallback;

@@ -22,3 +22,3 @@ this.processHeaderCallback = processHeaderCallback;

// we render the group summary text e.g. "-> Parent -> Child"...
const hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();
const hideOpenParents = this.gridOptionsService.is('groupHideOpenParents');
const value = (!hideOpenParents && this.shouldRenderGroupSummaryCell(node, column, index))

@@ -45,6 +45,14 @@ ? this.createValueForGroupNode(node)

const currentColumnGroupIndex = this.groupColumns.indexOf(column);
if (currentColumnGroupIndex !== -1 && ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()])) {
return true;
if (currentColumnGroupIndex !== -1) {
if ((_a = node.groupData) === null || _a === void 0 ? void 0 : _a[column.getId()]) {
return true;
}
// if this is a top level footer, always render`Total` in the left-most cell
if (node.footer && node.level === -1) {
const colDef = column.getColDef();
const isFullWidth = colDef == null || colDef.showRowGroup === true;
return isFullWidth || colDef.showRowGroup === this.columnModel.getRowGroupColumns()[0].getId();
}
}
const isGroupUseEntireRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode());
const isGroupUseEntireRow = this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());
return currentColumnIndex === 0 && isGroupUseEntireRow;

@@ -56,5 +64,5 @@ }

column: column,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context')
});

@@ -68,9 +76,10 @@ }

node: node,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
});
}
const isFooter = node.footer;
const keys = [node.key];
if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {
if (!this.gridOptionsService.isGroupMultiAutoColumn()) {
while (node.parent) {

@@ -81,3 +90,4 @@ node = node.parent;

}
return keys.reverse().join(' -> ');
const groupValue = keys.reverse().join(' -> ');
return isFooter ? `Total ${groupValue}` : groupValue;
}

@@ -92,5 +102,5 @@ processCell(params) {

value: value,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext(),
api: this.gridOptionsService.get('api'),
columnApi: this.gridOptionsService.get('columnApi'),
context: this.gridOptionsService.get('context'),
type: type

@@ -97,0 +107,0 @@ });

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

import { Constants } from "@ag-grid-community/core";
import { BaseGridSerializingSession } from "./baseGridSerializingSession";

@@ -80,3 +79,3 @@ const LINE_SEPARATOR = '\r\n';

}
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, Constants.EXPORT_TYPE_CSV, node));
this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, 'csv', node));
}

@@ -83,0 +82,0 @@ putInQuotes(value) {

import { ModuleNames } from "@ag-grid-community/core";
import { CsvCreator } from "./csvExport/csvCreator";
import { GridSerializer } from "./csvExport/gridSerializer";
import { VERSION } from "./version";
export const CsvExportModule = {
version: VERSION,
moduleName: ModuleNames.CsvExportModule,
beans: [CsvCreator, GridSerializer]
};
{
"name": "@ag-grid-community/csv-export",
"version": "28.2.1",
"version": "29.0.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -50,6 +50,6 @@ "main": "./dist/cjs/es5/main.js",

"dependencies": {
"@ag-grid-community/core": "~28.2.1"
"@ag-grid-community/core": "~29.0.0"
},
"devDependencies": {
"typescript": "~3.7.7",
"typescript": "~4.0.8",
"rimraf": "3.0.2"

@@ -56,0 +56,0 @@ },

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

import { CsvCustomContent, CsvExportParams, GridOptionsWrapper, ICsvCreator } from "@ag-grid-community/core";
import { CsvCustomContent, CsvExportParams, GridOptionsService, ICsvCreator } from "@ag-grid-community/core";
import { BaseCreator } from "./baseCreator";

@@ -8,3 +8,3 @@ import { CsvSerializingSession } from "./sessions/csvSerializingSession";

private gridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
postConstruct(): void;

@@ -11,0 +11,0 @@ protected getMergedParams(params?: CsvExportParams): CsvExportParams;

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

import { Column, ColumnGroup, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnGroup, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializer } from "../gridSerializer";
export interface BaseCreatorBeans {
gridSerializer: GridSerializer;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
}

@@ -16,3 +16,3 @@ export interface RowAccumulator {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -19,0 +19,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

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

import { Column, ColumnModel, GridOptionsWrapper, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { Column, ColumnModel, GridOptionsService, ProcessCellForExportParams, ProcessGroupHeaderForExportParams, ProcessHeaderForExportParams, ProcessRowGroupForExportParams, RowNode, ValueService } from "@ag-grid-community/core";
import { GridSerializingParams, GridSerializingSession, RowAccumulator, RowSpanningAccumulator } from "../interfaces";

@@ -6,3 +6,3 @@ export declare abstract class BaseGridSerializingSession<T> implements GridSerializingSession<T> {

valueService: ValueService;
gridOptionsWrapper: GridOptionsWrapper;
gridOptionsService: GridOptionsService;
processCellCallback?: (params: ProcessCellForExportParams) => string;

@@ -9,0 +9,0 @@ processHeaderCallback?: (params: ProcessHeaderForExportParams) => string;

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