@slickgrid-universal/excel-export 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/cjs/excelExport.service.js +8 -44
- package/dist/cjs/excelExport.service.js.map +1 -1
- package/dist/cjs/excelUtils.js.map +1 -1
- package/dist/esm/excelExport.service.js +10 -46
- package/dist/esm/excelExport.service.js.map +1 -1
- package/dist/esm/excelUtils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/excelExport.service.d.ts +11 -22
- package/dist/types/excelExport.service.d.ts.map +1 -1
- package/dist/types/excelUtils.d.ts +4 -3
- package/dist/types/excelUtils.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/excelExport.service.ts +32 -68
- package/src/excelUtils.ts +3 -3
- package/dist/cjs/interfaces/excelCellFormat.interface.js +0 -3
- package/dist/cjs/interfaces/excelCellFormat.interface.js.map +0 -1
- package/dist/cjs/interfaces/excelMetadata.interface.js +0 -3
- package/dist/cjs/interfaces/excelMetadata.interface.js.map +0 -1
- package/dist/cjs/interfaces/excelStylesheet.interface.js +0 -3
- package/dist/cjs/interfaces/excelStylesheet.interface.js.map +0 -1
- package/dist/cjs/interfaces/index.js +0 -20
- package/dist/cjs/interfaces/index.js.map +0 -1
- package/dist/esm/interfaces/excelCellFormat.interface.js +0 -2
- package/dist/esm/interfaces/excelCellFormat.interface.js.map +0 -1
- package/dist/esm/interfaces/excelMetadata.interface.js +0 -2
- package/dist/esm/interfaces/excelMetadata.interface.js.map +0 -1
- package/dist/esm/interfaces/excelStylesheet.interface.js +0 -2
- package/dist/esm/interfaces/excelStylesheet.interface.js.map +0 -1
- package/dist/esm/interfaces/index.js +0 -4
- package/dist/esm/interfaces/index.js.map +0 -1
- package/dist/types/interfaces/excelCellFormat.interface.d.ts +0 -6
- package/dist/types/interfaces/excelCellFormat.interface.d.ts.map +0 -1
- package/dist/types/interfaces/excelMetadata.interface.d.ts +0 -10
- package/dist/types/interfaces/excelMetadata.interface.d.ts.map +0 -1
- package/dist/types/interfaces/excelStylesheet.interface.d.ts +0 -34
- package/dist/types/interfaces/excelStylesheet.interface.d.ts.map +0 -1
- package/dist/types/interfaces/index.d.ts +0 -4
- package/dist/types/interfaces/index.d.ts.map +0 -1
- package/src/interfaces/excelCellFormat.interface.ts +0 -6
- package/src/interfaces/excelMetadata.interface.ts +0 -9
- package/src/interfaces/excelStylesheet.interface.ts +0 -34
- package/src/interfaces/index.ts +0 -3
- package/src/typings/excel-builder-webpacker/index.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ExcelColumnMetadata, type ExcelMetadata, type StyleSheet, Workbook, Worksheet } from 'excel-builder-vanilla';
|
|
2
|
+
import type { Column, ContainerService, ExcelExportService as BaseExcelExportService, ExcelExportOption, ExternalResource, GetDataValueCallback, GetGroupTotalValueCallback, GridOption, KeyTitlePair, Locale, PubSubService, SlickDataView, SlickGrid, TranslaterService } from '@slickgrid-universal/common';
|
|
2
3
|
import { FileType } from '@slickgrid-universal/common';
|
|
3
|
-
import { ExcelCellFormat, ExcelMetadata, ExcelStylesheet } from './interfaces/index';
|
|
4
4
|
import { ExcelFormatter } from './excelUtils';
|
|
5
5
|
export declare class ExcelExportService implements ExternalResource, BaseExcelExportService {
|
|
6
6
|
protected _fileFormat: FileType;
|
|
@@ -11,12 +11,12 @@ export declare class ExcelExportService implements ExternalResource, BaseExcelEx
|
|
|
11
11
|
protected _hasColumnTitlePreHeader: boolean;
|
|
12
12
|
protected _hasGroupedItems: boolean;
|
|
13
13
|
protected _excelExportOptions: ExcelExportOption;
|
|
14
|
-
protected _sheet:
|
|
15
|
-
protected _stylesheet:
|
|
14
|
+
protected _sheet: Worksheet;
|
|
15
|
+
protected _stylesheet: StyleSheet;
|
|
16
16
|
protected _stylesheetFormats: any;
|
|
17
17
|
protected _pubSubService: PubSubService | null;
|
|
18
18
|
protected _translaterService: TranslaterService | undefined;
|
|
19
|
-
protected _workbook:
|
|
19
|
+
protected _workbook: Workbook;
|
|
20
20
|
protected _regularCellExcelFormats: {
|
|
21
21
|
[fieldId: string]: {
|
|
22
22
|
stylesheetFormatterId?: number;
|
|
@@ -37,7 +37,7 @@ export declare class ExcelExportService implements ExternalResource, BaseExcelEx
|
|
|
37
37
|
get _dataView(): SlickDataView;
|
|
38
38
|
/** Getter for the Grid Options pulled through the Grid Object */
|
|
39
39
|
protected get _gridOptions(): GridOption;
|
|
40
|
-
get stylesheet():
|
|
40
|
+
get stylesheet(): StyleSheet;
|
|
41
41
|
get stylesheetFormats(): any;
|
|
42
42
|
get groupTotalExcelFormats(): {
|
|
43
43
|
[fieldId: string]: {
|
|
@@ -78,18 +78,7 @@ export declare class ExcelExportService implements ExternalResource, BaseExcelEx
|
|
|
78
78
|
* @return {string} The column name.
|
|
79
79
|
*/
|
|
80
80
|
getExcelColumnNameByIndex(colIndex: number): string;
|
|
81
|
-
|
|
82
|
-
* Triggers download file with file format.
|
|
83
|
-
* IE(6-10) are not supported
|
|
84
|
-
* All other browsers will use plain javascript on client side to produce a file download.
|
|
85
|
-
* @param options
|
|
86
|
-
*/
|
|
87
|
-
startDownloadFile(options: {
|
|
88
|
-
filename: string;
|
|
89
|
-
blob: Blob;
|
|
90
|
-
data: any[];
|
|
91
|
-
}): void;
|
|
92
|
-
protected getDataOutput(): Array<string[] | ExcelCellFormat[]>;
|
|
81
|
+
protected getDataOutput(): Array<string[] | ExcelColumnMetadata[]>;
|
|
93
82
|
/** Get each column style including a style for the width of each column */
|
|
94
83
|
protected getColumnStyles(columns: Column[]): any[];
|
|
95
84
|
/**
|
|
@@ -98,9 +87,9 @@ export declare class ExcelExportService implements ExternalResource, BaseExcelEx
|
|
|
98
87
|
* @param {Object} metadata - Excel metadata
|
|
99
88
|
* @returns {Object} array of Excel cell format
|
|
100
89
|
*/
|
|
101
|
-
protected getColumnGroupedHeaderTitlesData(columns: Column[], metadata: ExcelMetadata): Array<
|
|
90
|
+
protected getColumnGroupedHeaderTitlesData(columns: Column[], metadata: ExcelMetadata): Array<ExcelColumnMetadata>;
|
|
102
91
|
/** Get all column headers and format them in Bold */
|
|
103
|
-
protected getColumnHeaderData(columns: Column[], metadata: ExcelMetadata): Array<
|
|
92
|
+
protected getColumnHeaderData(columns: Column[], metadata: ExcelMetadata): Array<ExcelColumnMetadata>;
|
|
104
93
|
protected getGroupColumnTitle(): string | null;
|
|
105
94
|
/**
|
|
106
95
|
* Get all Grouped Header Titles and their keys, translate the title when required.
|
|
@@ -115,7 +104,7 @@ export declare class ExcelExportService implements ExternalResource, BaseExcelEx
|
|
|
115
104
|
/**
|
|
116
105
|
* Get all the grid row data and return that as an output string
|
|
117
106
|
*/
|
|
118
|
-
protected pushAllGridRowDataToArray(originalDaraArray: Array<Array<string |
|
|
107
|
+
protected pushAllGridRowDataToArray(originalDaraArray: Array<Array<string | ExcelColumnMetadata | number>>, columns: Column[]): Array<Array<string | ExcelColumnMetadata | number>>;
|
|
119
108
|
/**
|
|
120
109
|
* Get the data of a regular row (a row without grouping)
|
|
121
110
|
* @param {Array<Object>} columns - column definitions
|
|
@@ -133,6 +122,6 @@ export declare class ExcelExportService implements ExternalResource, BaseExcelEx
|
|
|
133
122
|
* For example if we grouped by "salesRep" and we have a Sum Aggregator on "sales", then the returned output would be:: ["Sum 123$"]
|
|
134
123
|
* @param itemObj
|
|
135
124
|
*/
|
|
136
|
-
protected readGroupedTotalRows(columns: Column[], itemObj: any): Array<
|
|
125
|
+
protected readGroupedTotalRows(columns: Column[], itemObj: any): Array<ExcelColumnMetadata | string | number>;
|
|
137
126
|
}
|
|
138
127
|
//# sourceMappingURL=excelExport.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"excelExport.service.d.ts","sourceRoot":"","sources":["../../src/excelExport.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"excelExport.service.d.ts","sourceRoot":"","sources":["../../src/excelEx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ACrD,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,aAAa,GAAG,KAAK,CAAC,mBAAmB,CAAC;IAmBrG,SAAS,CAAC,mBAAmB,IAAI,MAAM,GAAG,IAAI;IAqB9C;;;KAGC;IACD,SAAS,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC;IA0B9E;;;OAGG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI;IA0BzE;;OAEG;IACH,SAAS,CAAC,yBAAyB,CAAC,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAC,CAAC;IA0BnL;;;;;OAKG;IACH,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,MAAM,EAAE;IA6GpF;;;OAGG;IACH,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM;IAYnD;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,GAAG,KAAK,CAAC,mBAAmB,GAAG,MAAM,GAAG,MAAM,CAAC;CAqD9G"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StyleSheet } from 'excel-builder-vanilla';
|
|
2
|
+
import type { Column, Formatter, FormatterType, GetDataValueCallback, GridOption, SlickGrid } from '@slickgrid-universal/common';
|
|
2
3
|
export type ExcelFormatter = object & {
|
|
3
4
|
id: number;
|
|
4
5
|
};
|
|
@@ -7,7 +8,7 @@ export declare const getExcelNumberCallback: GetDataValueCallback;
|
|
|
7
8
|
/** Parse a number which the user might have provided formatter options (for example a user might have provided { decimalSeparator: ',', thousandSeparator: ' '}) */
|
|
8
9
|
export declare function parseNumberWithFormatterOptions(value: any, column: Column, gridOptions: GridOption): any;
|
|
9
10
|
/** use different Excel Stylesheet Format as per the Field Type */
|
|
10
|
-
export declare function useCellFormatByFieldType(stylesheet:
|
|
11
|
+
export declare function useCellFormatByFieldType(stylesheet: StyleSheet, stylesheetFormatters: any, columnDef: Column, grid: SlickGrid, autoDetect?: boolean): {
|
|
11
12
|
stylesheetFormatterId: number | undefined;
|
|
12
13
|
getDataValueParser: GetDataValueCallback;
|
|
13
14
|
};
|
|
@@ -25,7 +26,7 @@ export declare function getNumericFormatterOptions(columnDef: Column, grid: Slic
|
|
|
25
26
|
numberSuffix: string;
|
|
26
27
|
};
|
|
27
28
|
export declare function getFormatterNumericDataType(formatter?: Formatter): "currency" | "decimal" | "percent";
|
|
28
|
-
export declare function getExcelFormatFromGridFormatter(stylesheet:
|
|
29
|
+
export declare function getExcelFormatFromGridFormatter(stylesheet: StyleSheet, stylesheetFormatters: any, columnDef: Column, grid: SlickGrid, formatterType: FormatterType): {
|
|
29
30
|
stylesheetFormatter: ExcelFormatter;
|
|
30
31
|
groupType: string;
|
|
31
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"excelUtils.d.ts","sourceRoot":"","sources":["../../src/excelUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"excelUtils.d.ts","sourceRoot":"","sources":["../../src/excelUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,SAAS,EACV,MAAM,6BAA6B,CAAC;AAYrC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;CAAE,CAAC;AAGtD,eAAO,MAAM,6BAA6B,EAAE,oBAAqC,CAAC;AAClF,eAAO,MAAM,sBAAsB,EAAE,oBAGnC,CAAC;AAEH,oKAAoK;AACpK,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,OAUlG;AAED,kEAAkE;AAClE,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,UAAO;;;EAUhJ;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAEnF;AAED,yJAAyJ;AACzJ,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa;;;;;;;;;;EA6C1G;AAED,wBAAgB,2BAA2B,CAAC,SAAS,CAAC,EAAE,SAAS,sCAwBhE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa;;;EAkFlK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/excel-export",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Excel Export (xls/xlsx) Service.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"not dead"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@slickgrid-universal/common": "~4.
|
|
49
|
-
"@slickgrid-universal/utils": "~4.
|
|
50
|
-
"excel-builder-
|
|
48
|
+
"@slickgrid-universal/common": "~4.4.0",
|
|
49
|
+
"@slickgrid-universal/utils": "~4.4.0",
|
|
50
|
+
"excel-builder-vanilla": "^3.0.1",
|
|
51
51
|
"moment-mini": "^2.29.4"
|
|
52
52
|
},
|
|
53
53
|
"funding": {
|
|
54
54
|
"type": "ko_fi",
|
|
55
55
|
"url": "https://ko-fi.com/ghiscoding"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "492dd06578a78ecbf9492e55a4dcf2bc97fdcf32"
|
|
58
58
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
downloadExcelFile,
|
|
3
|
+
type ExcelColumnMetadata,
|
|
4
|
+
type ExcelMetadata,
|
|
5
|
+
type StyleSheet,
|
|
6
|
+
Workbook,
|
|
7
|
+
Worksheet,
|
|
8
|
+
} from 'excel-builder-vanilla';
|
|
2
9
|
import type {
|
|
3
10
|
Column,
|
|
4
11
|
ContainerService,
|
|
5
12
|
ExcelExportService as BaseExcelExportService,
|
|
6
13
|
ExcelExportOption,
|
|
7
14
|
ExternalResource,
|
|
8
|
-
ExcelWorkbook,
|
|
9
|
-
ExcelWorksheet,
|
|
10
15
|
|
|
11
16
|
GetDataValueCallback,
|
|
12
17
|
GetGroupTotalValueCallback,
|
|
@@ -20,17 +25,16 @@ import type {
|
|
|
20
25
|
} from '@slickgrid-universal/common';
|
|
21
26
|
import {
|
|
22
27
|
Constants,
|
|
23
|
-
FieldType,
|
|
24
|
-
FileType,
|
|
25
28
|
// utility functions
|
|
26
29
|
exportWithFormatterWhenDefined,
|
|
30
|
+
FieldType,
|
|
31
|
+
FileType,
|
|
27
32
|
getColumnFieldType,
|
|
28
33
|
getTranslationPrefix,
|
|
29
34
|
isColumnDateType,
|
|
30
35
|
} from '@slickgrid-universal/common';
|
|
31
36
|
import { addWhiteSpaces, deepCopy, getHtmlStringOutput, stripTags, titleCase } from '@slickgrid-universal/utils';
|
|
32
37
|
|
|
33
|
-
import { ExcelCellFormat, ExcelMetadata, ExcelStylesheet, } from './interfaces/index';
|
|
34
38
|
import {
|
|
35
39
|
ExcelFormatter,
|
|
36
40
|
getGroupTotalValue,
|
|
@@ -52,12 +56,12 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
52
56
|
protected _hasColumnTitlePreHeader = false;
|
|
53
57
|
protected _hasGroupedItems = false;
|
|
54
58
|
protected _excelExportOptions!: ExcelExportOption;
|
|
55
|
-
protected _sheet!:
|
|
56
|
-
protected _stylesheet!:
|
|
59
|
+
protected _sheet!: Worksheet;
|
|
60
|
+
protected _stylesheet!: StyleSheet;
|
|
57
61
|
protected _stylesheetFormats: any;
|
|
58
62
|
protected _pubSubService: PubSubService | null = null;
|
|
59
63
|
protected _translaterService: TranslaterService | undefined;
|
|
60
|
-
protected _workbook!:
|
|
64
|
+
protected _workbook!: Workbook;
|
|
61
65
|
|
|
62
66
|
// references of each detected cell and/or group total formats
|
|
63
67
|
protected _regularCellExcelFormats: { [fieldId: string]: { stylesheetFormatterId?: number; getDataValueParser: GetDataValueCallback; }; } = {};
|
|
@@ -144,8 +148,8 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
144
148
|
// prepare the Excel Workbook & Sheet
|
|
145
149
|
// we can use ExcelBuilder constructor with WebPack but we need to use function calls with RequireJS/SystemJS
|
|
146
150
|
const worksheetOptions = { name: this._excelExportOptions.sheetName || 'Sheet1' };
|
|
147
|
-
this._workbook =
|
|
148
|
-
this._sheet =
|
|
151
|
+
this._workbook = new Workbook();
|
|
152
|
+
this._sheet = this._workbook.createWorksheet(worksheetOptions);
|
|
149
153
|
|
|
150
154
|
// add any Excel Format/Stylesheet to current Workbook
|
|
151
155
|
this._stylesheet = this._workbook.getStyleSheet();
|
|
@@ -183,26 +187,18 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
183
187
|
this._sheet.setData(finalOutput);
|
|
184
188
|
this._workbook.addWorksheet(this._sheet);
|
|
185
189
|
|
|
186
|
-
// using ExcelBuilder.Builder.createFile with WebPack but ExcelBuilder.createFile with RequireJS/SystemJS
|
|
187
|
-
const createFileFn = ExcelBuilder.Builder?.createFile ?? ExcelBuilder.createFile;
|
|
188
|
-
|
|
189
190
|
// MIME type could be undefined, if that's the case we'll detect the type by its file extension
|
|
190
191
|
// user could also provide its own mime type, if however an empty string is provided we will consider to be without any MIME type)
|
|
191
192
|
let mimeType = this._excelExportOptions?.mimeType;
|
|
192
193
|
if (mimeType === undefined) {
|
|
193
194
|
mimeType = this._fileFormat === FileType.xls ? 'application/vnd.ms-excel' : 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
|
194
195
|
}
|
|
195
|
-
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
// start downloading but add the Blob property only on the start download not on the event itself
|
|
203
|
-
this.startDownloadFile({ ...downloadOptions, blob: excelBlob, data: this._sheet.data });
|
|
204
|
-
this._pubSubService?.publish(`onAfterExportToExcel`, downloadOptions);
|
|
205
|
-
resolve(true);
|
|
196
|
+
|
|
197
|
+
const filename = `${this._excelExportOptions.filename}.${this._fileFormat}`;
|
|
198
|
+
downloadExcelFile(this._workbook, filename, { mimeType }).then(() => {
|
|
199
|
+
this._pubSubService?.publish(`onAfterExportToExcel`, { filename, mimeType });
|
|
200
|
+
resolve(true);
|
|
201
|
+
});
|
|
206
202
|
});
|
|
207
203
|
});
|
|
208
204
|
}
|
|
@@ -231,47 +227,15 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
231
227
|
return letters[lastPos] + '';
|
|
232
228
|
}
|
|
233
229
|
|
|
234
|
-
/**
|
|
235
|
-
* Triggers download file with file format.
|
|
236
|
-
* IE(6-10) are not supported
|
|
237
|
-
* All other browsers will use plain javascript on client side to produce a file download.
|
|
238
|
-
* @param options
|
|
239
|
-
*/
|
|
240
|
-
startDownloadFile(options: { filename: string, blob: Blob, data: any[]; }) {
|
|
241
|
-
// when using IE/Edge, then use different download call
|
|
242
|
-
if (typeof (navigator as any).msSaveOrOpenBlob === 'function') {
|
|
243
|
-
(navigator as any).msSaveOrOpenBlob(options.blob, options.filename);
|
|
244
|
-
} else {
|
|
245
|
-
// this trick will generate a temp <a /> tag
|
|
246
|
-
// the code will then trigger a hidden click for it to start downloading
|
|
247
|
-
const link = document.createElement('a');
|
|
248
|
-
const url = URL.createObjectURL(options.blob);
|
|
249
|
-
|
|
250
|
-
if (link && document) {
|
|
251
|
-
link.textContent = 'download';
|
|
252
|
-
link.href = url;
|
|
253
|
-
link.setAttribute('download', options.filename);
|
|
254
|
-
|
|
255
|
-
// set the visibility to hidden so there is no effect on your web-layout
|
|
256
|
-
link.style.visibility = 'hidden';
|
|
257
|
-
|
|
258
|
-
// this part will append the anchor tag, trigger a click (for download to start) and finally remove the tag once completed
|
|
259
|
-
document.body.appendChild(link);
|
|
260
|
-
link.click();
|
|
261
|
-
document.body.removeChild(link);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
230
|
// -----------------------
|
|
267
231
|
// protected functions
|
|
268
232
|
// -----------------------
|
|
269
233
|
|
|
270
|
-
protected getDataOutput(): Array<string[] |
|
|
234
|
+
protected getDataOutput(): Array<string[] | ExcelColumnMetadata[]> {
|
|
271
235
|
const columns = this._grid?.getColumns() || [];
|
|
272
236
|
|
|
273
237
|
// data variable which will hold all the fields data of a row
|
|
274
|
-
const outputData: Array<string[] |
|
|
238
|
+
const outputData: Array<string[] | ExcelColumnMetadata[]> = [];
|
|
275
239
|
const gridExportOptions = this._gridOptions?.excelExportOptions;
|
|
276
240
|
const columnHeaderStyle = gridExportOptions?.columnHeaderStyle;
|
|
277
241
|
let columnHeaderStyleId = this._stylesheetFormats.boldFormatter.id;
|
|
@@ -327,8 +291,8 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
327
291
|
* @param {Object} metadata - Excel metadata
|
|
328
292
|
* @returns {Object} array of Excel cell format
|
|
329
293
|
*/
|
|
330
|
-
protected getColumnGroupedHeaderTitlesData(columns: Column[], metadata: ExcelMetadata): Array<
|
|
331
|
-
let outputGroupedHeaderTitles: Array<
|
|
294
|
+
protected getColumnGroupedHeaderTitlesData(columns: Column[], metadata: ExcelMetadata): Array<ExcelColumnMetadata> {
|
|
295
|
+
let outputGroupedHeaderTitles: Array<ExcelColumnMetadata> = [];
|
|
332
296
|
|
|
333
297
|
// get all Column Header Titles
|
|
334
298
|
this._groupedColumnHeaders = this.getColumnGroupedHeaderTitles(columns) || [];
|
|
@@ -355,8 +319,8 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
355
319
|
}
|
|
356
320
|
|
|
357
321
|
/** Get all column headers and format them in Bold */
|
|
358
|
-
protected getColumnHeaderData(columns: Column[], metadata: ExcelMetadata): Array<
|
|
359
|
-
let outputHeaderTitles: Array<
|
|
322
|
+
protected getColumnHeaderData(columns: Column[], metadata: ExcelMetadata): Array<ExcelColumnMetadata> {
|
|
323
|
+
let outputHeaderTitles: Array<ExcelColumnMetadata> = [];
|
|
360
324
|
|
|
361
325
|
// get all Column Header Titles
|
|
362
326
|
this._columnHeaders = this.getColumnHeaders(columns) || [];
|
|
@@ -458,7 +422,7 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
458
422
|
/**
|
|
459
423
|
* Get all the grid row data and return that as an output string
|
|
460
424
|
*/
|
|
461
|
-
protected pushAllGridRowDataToArray(originalDaraArray: Array<Array<string |
|
|
425
|
+
protected pushAllGridRowDataToArray(originalDaraArray: Array<Array<string | ExcelColumnMetadata | number>>, columns: Column[]): Array<Array<string | ExcelColumnMetadata | number>> {
|
|
462
426
|
const lineCount = this._dataView.getLength();
|
|
463
427
|
|
|
464
428
|
// loop through all the grid rows of data
|
|
@@ -555,7 +519,7 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
555
519
|
colspan = prevColspan--;
|
|
556
520
|
}
|
|
557
521
|
} else {
|
|
558
|
-
let itemData: Date | number | string |
|
|
522
|
+
let itemData: Date | number | string | ExcelColumnMetadata = '';
|
|
559
523
|
const fieldType = getColumnFieldType(columnDef);
|
|
560
524
|
|
|
561
525
|
// -- Read Data & Push to Data Array
|
|
@@ -620,12 +584,12 @@ export class ExcelExportService implements ExternalResource, BaseExcelExportServ
|
|
|
620
584
|
* For example if we grouped by "salesRep" and we have a Sum Aggregator on "sales", then the returned output would be:: ["Sum 123$"]
|
|
621
585
|
* @param itemObj
|
|
622
586
|
*/
|
|
623
|
-
protected readGroupedTotalRows(columns: Column[], itemObj: any): Array<
|
|
587
|
+
protected readGroupedTotalRows(columns: Column[], itemObj: any): Array<ExcelColumnMetadata | string | number> {
|
|
624
588
|
const groupingAggregatorRowText = this._excelExportOptions.groupingAggregatorRowText || '';
|
|
625
|
-
const outputStrings: Array<
|
|
589
|
+
const outputStrings: Array<ExcelColumnMetadata | string | number> = [groupingAggregatorRowText];
|
|
626
590
|
|
|
627
591
|
columns.forEach((columnDef) => {
|
|
628
|
-
let itemData: number | string |
|
|
592
|
+
let itemData: number | string | ExcelColumnMetadata = '';
|
|
629
593
|
const fieldType = getColumnFieldType(columnDef);
|
|
630
594
|
const skippedField = columnDef.excludeFromExport || false;
|
|
631
595
|
|
package/src/excelUtils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { StyleSheet } from 'excel-builder-vanilla';
|
|
1
2
|
import type {
|
|
2
3
|
Column,
|
|
3
|
-
ExcelStylesheet,
|
|
4
4
|
Formatter,
|
|
5
5
|
FormatterType,
|
|
6
6
|
GetDataValueCallback,
|
|
@@ -41,7 +41,7 @@ export function parseNumberWithFormatterOptions(value: any, column: Column, grid
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/** use different Excel Stylesheet Format as per the Field Type */
|
|
44
|
-
export function useCellFormatByFieldType(stylesheet:
|
|
44
|
+
export function useCellFormatByFieldType(stylesheet: StyleSheet, stylesheetFormatters: any, columnDef: Column, grid: SlickGrid, autoDetect = true) {
|
|
45
45
|
const fieldType = getColumnFieldType(columnDef);
|
|
46
46
|
let stylesheetFormatterId: number | undefined;
|
|
47
47
|
let callback: GetDataValueCallback = getExcelSameInputDataCallback;
|
|
@@ -131,7 +131,7 @@ export function getFormatterNumericDataType(formatter?: Formatter) {
|
|
|
131
131
|
return dataType;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
export function getExcelFormatFromGridFormatter(stylesheet:
|
|
134
|
+
export function getExcelFormatFromGridFormatter(stylesheet: StyleSheet, stylesheetFormatters: any, columnDef: Column, grid: SlickGrid, formatterType: FormatterType) {
|
|
135
135
|
let format = '';
|
|
136
136
|
let groupType = '';
|
|
137
137
|
let stylesheetFormatter: undefined | ExcelFormatter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelCellFormat.interface.js","sourceRoot":"","sources":["../../../src/interfaces/excelCellFormat.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelMetadata.interface.js","sourceRoot":"","sources":["../../../src/interfaces/excelMetadata.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelStylesheet.interface.js","sourceRoot":"","sources":["../../../src/interfaces/excelStylesheet.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./excelCellFormat.interface"), exports);
|
|
18
|
-
__exportStar(require("./excelMetadata.interface"), exports);
|
|
19
|
-
__exportStar(require("./excelStylesheet.interface"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelCellFormat.interface.js","sourceRoot":"","sources":["../../../src/interfaces/excelCellFormat.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelMetadata.interface.js","sourceRoot":"","sources":["../../../src/interfaces/excelMetadata.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelStylesheet.interface.js","sourceRoot":"","sources":["../../../src/interfaces/excelStylesheet.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelCellFormat.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/excelCellFormat.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,aAAa,CAAC;CACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelMetadata.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/excelMetadata.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ExcelAlignmentStyle, ExcelBorderStyle, ExcelColorStyle, ExcelCustomStyling, ExcelFillStyle, ExcelFontStyle } from '@slickgrid-universal/common';
|
|
2
|
-
export interface ExcelStylesheet {
|
|
3
|
-
createBorderFormatter: (border: ExcelBorderStyle) => any;
|
|
4
|
-
createDifferentialStyle: (instructions: ExcelCustomStyling) => any;
|
|
5
|
-
createFill: (instructions: ExcelFillStyle) => any;
|
|
6
|
-
createFontStyle: (instructions: ExcelFontStyle) => any;
|
|
7
|
-
createFormat: (instructions: ExcelCustomStyling) => any;
|
|
8
|
-
createNumberFormatter: (format: string) => any;
|
|
9
|
-
createSimpleFormatter: (type: any) => any;
|
|
10
|
-
createTableStyle: (instructions: any) => any;
|
|
11
|
-
exportAlignment: (doc: any, alignmentData: ExcelAlignmentStyle) => any;
|
|
12
|
-
exportBorder: (doc: any, data: any[]) => ExcelBorderStyle;
|
|
13
|
-
exportBorders: (doc: any) => any;
|
|
14
|
-
exportCellFormatElement: (doc: any, instructions: ExcelCustomStyling) => any;
|
|
15
|
-
exportCellStyles: (doc: any) => any;
|
|
16
|
-
exportColor: (doc: any, color: ExcelColorStyle) => any;
|
|
17
|
-
exportDifferentialStyles: (doc: any) => any;
|
|
18
|
-
exportDFX: (doc: any, style: any) => any;
|
|
19
|
-
exportFill: (doc: any, fd: any) => any;
|
|
20
|
-
exportFills: (doc: any) => any;
|
|
21
|
-
exportFont: (doc: any, fd: any) => any;
|
|
22
|
-
exportFonts: (doc: any) => any;
|
|
23
|
-
exportGradientFill: (doc: any, data: any[]) => any;
|
|
24
|
-
exportNumberFormatter: (doc: any, fd: any) => any;
|
|
25
|
-
exportNumberFormatters: (doc: any) => any;
|
|
26
|
-
exportMasterCellFormats: (doc: any) => any;
|
|
27
|
-
exportMasterCellStyles: (doc: any) => any;
|
|
28
|
-
exportPatternFill: (doc: any, data: any[]) => any;
|
|
29
|
-
exportProtection: (doc: any, protectionData: any) => any;
|
|
30
|
-
exportTableStyle: (doc: any, style: any) => any;
|
|
31
|
-
exportTableStyles: (doc: any) => any;
|
|
32
|
-
toXML: () => any;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=excelStylesheet.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excelStylesheet.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/excelStylesheet.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEzJ,MAAM,WAAW,eAAe;IAC9B,qBAAqB,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,GAAG,CAAC;IACzD,uBAAuB,EAAE,CAAC,YAAY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,EAAE,GAAG,KAAK,GAAG,CAAC;IACvC,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IAC/B,kBAAkB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IACnD,qBAAqB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,CAAC;IAClD,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IAC1C,uBAAuB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3C,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IAC1C,iBAAiB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IAClD,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,KAAK,GAAG,CAAC;IACzD,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAChD,iBAAiB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;IACrC,KAAK,EAAE,MAAM,GAAG,CAAC;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ExcelAlignmentStyle, ExcelBorderStyle, ExcelColorStyle, ExcelCustomStyling, ExcelFillStyle, ExcelFontStyle } from '@slickgrid-universal/common';
|
|
2
|
-
|
|
3
|
-
export interface ExcelStylesheet {
|
|
4
|
-
createBorderFormatter: (border: ExcelBorderStyle) => any;
|
|
5
|
-
createDifferentialStyle: (instructions: ExcelCustomStyling) => any;
|
|
6
|
-
createFill: (instructions: ExcelFillStyle) => any;
|
|
7
|
-
createFontStyle: (instructions: ExcelFontStyle) => any;
|
|
8
|
-
createFormat: (instructions: ExcelCustomStyling) => any;
|
|
9
|
-
createNumberFormatter: (format: string) => any;
|
|
10
|
-
createSimpleFormatter: (type: any) => any;
|
|
11
|
-
createTableStyle: (instructions: any) => any;
|
|
12
|
-
exportAlignment: (doc: any, alignmentData: ExcelAlignmentStyle) => any;
|
|
13
|
-
exportBorder: (doc: any, data: any[]) => ExcelBorderStyle;
|
|
14
|
-
exportBorders: (doc: any) => any;
|
|
15
|
-
exportCellFormatElement: (doc: any, instructions: ExcelCustomStyling) => any;
|
|
16
|
-
exportCellStyles: (doc: any) => any;
|
|
17
|
-
exportColor: (doc: any, color: ExcelColorStyle) => any;
|
|
18
|
-
exportDifferentialStyles: (doc: any) => any;
|
|
19
|
-
exportDFX: (doc: any, style: any) => any;
|
|
20
|
-
exportFill: (doc: any, fd: any) => any;
|
|
21
|
-
exportFills: (doc: any) => any;
|
|
22
|
-
exportFont: (doc: any, fd: any) => any;
|
|
23
|
-
exportFonts: (doc: any) => any;
|
|
24
|
-
exportGradientFill: (doc: any, data: any[]) => any;
|
|
25
|
-
exportNumberFormatter: (doc: any, fd: any) => any;
|
|
26
|
-
exportNumberFormatters: (doc: any) => any;
|
|
27
|
-
exportMasterCellFormats: (doc: any) => any;
|
|
28
|
-
exportMasterCellStyles: (doc: any) => any;
|
|
29
|
-
exportPatternFill: (doc: any, data: any[]) => any;
|
|
30
|
-
exportProtection: (doc: any, protectionData: any) => any;
|
|
31
|
-
exportTableStyle: (doc: any, style: any) => any;
|
|
32
|
-
exportTableStyles: (doc: any) => any;
|
|
33
|
-
toXML: () => any;
|
|
34
|
-
}
|
package/src/interfaces/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'excel-builder-webpacker';
|