@slickgrid-universal/excel-export 1.1.1 → 1.2.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/CHANGELOG.md +8 -0
- package/README.md +71 -71
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.2.0](https://github.com/ghiscoding/slickgrid-universal/compare/v1.1.1...v1.2.0) (2022-01-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @slickgrid-universal/excel-export
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.1.1](https://github.com/ghiscoding/slickgrid-universal/compare/v1.1.0...v1.1.1) (2021-12-11)
|
|
7
15
|
|
|
8
16
|
|
package/README.md
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
[](https://opensource.org/licenses/MIT)
|
|
2
|
-
[](http://www.typescriptlang.org/)
|
|
3
|
-
[](https://lerna.js.org/)
|
|
4
|
-
[](https://www.npmjs.com/package/@slickgrid-universal/excel-export)
|
|
5
|
-
[](https://www.npmjs.com/package/@slickgrid-universal/excel-export)
|
|
6
|
-
|
|
7
|
-
[](https://github.com/ghiscoding/slickgrid-universal/actions)
|
|
8
|
-
[](https://www.cypress.io/)
|
|
9
|
-
[](https://github.com/facebook/jest)
|
|
10
|
-
[](https://codecov.io/gh/ghiscoding/slickgrid-universal)
|
|
11
|
-
|
|
12
|
-
## Excel Export Service
|
|
13
|
-
#### @slickgrid-universal/excel-export
|
|
14
|
-
|
|
15
|
-
Simple Export to Excel Service that allows to exporting as
|
|
16
|
-
|
|
17
|
-
### Internal Dependencies
|
|
18
|
-
- [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common)
|
|
19
|
-
|
|
20
|
-
### External Dependencies
|
|
21
|
-
This package requires [excel-builder-webpacker](https://www.npmjs.com/package/excel-builder-webpacker) which itself requires [jszip](https://www.npmjs.com/package/jszip) and [lodash](https://www.npmjs.com/package/lodash), the later not being a small lib, so make sure that you are fine with the bundle size. For our use case, the extra bundle size is totally worth the feature.
|
|
22
|
-
|
|
23
|
-
### Installation
|
|
24
|
-
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation), you can see a demo by looking at the [GitHub Demo](https://ghiscoding.github.io/slickgrid-universal) page and click on "Export to
|
|
25
|
-
|
|
26
|
-
### Usage
|
|
27
|
-
In order to use the Service, you will need to register it in your grid options via the `registerExternalResources` as shown below.
|
|
28
|
-
|
|
29
|
-
##### ViewModel
|
|
30
|
-
```ts
|
|
31
|
-
import { ExcelExportService } from '@slickgrid-universal/excel-export';
|
|
32
|
-
|
|
33
|
-
export class MyExample {
|
|
34
|
-
initializeGrid {
|
|
35
|
-
this.gridOptions = {
|
|
36
|
-
enableExcelExport: true,
|
|
37
|
-
excelExportOptions: {
|
|
38
|
-
sanitizeDataExport: true
|
|
39
|
-
},
|
|
40
|
-
registerExternalResources: [new ExcelExportService()],
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
If you wish to reference the service to use it with external export button, then simply create a reference while instantiating it.
|
|
47
|
-
```ts
|
|
48
|
-
import { ExcelExportService } from '@slickgrid-universal/excel-export';
|
|
49
|
-
|
|
50
|
-
export class MyExample {
|
|
51
|
-
excelExportService: ExcelExportService;
|
|
52
|
-
|
|
53
|
-
constructor() {
|
|
54
|
-
this.excelExportService = new ExcelExportService();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
initializeGrid {
|
|
58
|
-
this.gridOptions = {
|
|
59
|
-
enableExcelExport: true,
|
|
60
|
-
excelExportOptions: {
|
|
61
|
-
sanitizeDataExport: true
|
|
62
|
-
},
|
|
63
|
-
registerExternalResources: [this.excelExportService],
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
exportToExcel() {
|
|
68
|
-
this.excelExportService.exportToExcel({ filename: 'export', format: FileType.xlsx });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
1
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
|
+
[](http://www.typescriptlang.org/)
|
|
3
|
+
[](https://lerna.js.org/)
|
|
4
|
+
[](https://www.npmjs.com/package/@slickgrid-universal/excel-export)
|
|
5
|
+
[](https://www.npmjs.com/package/@slickgrid-universal/excel-export)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/ghiscoding/slickgrid-universal/actions)
|
|
8
|
+
[](https://www.cypress.io/)
|
|
9
|
+
[](https://github.com/facebook/jest)
|
|
10
|
+
[](https://codecov.io/gh/ghiscoding/slickgrid-universal)
|
|
11
|
+
|
|
12
|
+
## Excel Export Service
|
|
13
|
+
#### @slickgrid-universal/excel-export
|
|
14
|
+
|
|
15
|
+
Simple Export to Excel Service that allows to exporting as `.xls` or `.xlsx`.
|
|
16
|
+
|
|
17
|
+
### Internal Dependencies
|
|
18
|
+
- [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common)
|
|
19
|
+
|
|
20
|
+
### External Dependencies
|
|
21
|
+
This package requires [excel-builder-webpacker](https://www.npmjs.com/package/excel-builder-webpacker) which itself requires [jszip](https://www.npmjs.com/package/jszip) and [lodash](https://www.npmjs.com/package/lodash), the later not being a small lib, so make sure that you are fine with the bundle size. For our use case, the extra bundle size is totally worth the feature.
|
|
22
|
+
|
|
23
|
+
### Installation
|
|
24
|
+
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation), you can see a demo by looking at the [GitHub Demo](https://ghiscoding.github.io/slickgrid-universal) page and click on "Export to Excel" from the Grid Menu (aka hamburger menu).
|
|
25
|
+
|
|
26
|
+
### Usage
|
|
27
|
+
In order to use the Service, you will need to register it in your grid options via the `registerExternalResources` as shown below.
|
|
28
|
+
|
|
29
|
+
##### ViewModel
|
|
30
|
+
```ts
|
|
31
|
+
import { ExcelExportService } from '@slickgrid-universal/excel-export';
|
|
32
|
+
|
|
33
|
+
export class MyExample {
|
|
34
|
+
initializeGrid {
|
|
35
|
+
this.gridOptions = {
|
|
36
|
+
enableExcelExport: true,
|
|
37
|
+
excelExportOptions: {
|
|
38
|
+
sanitizeDataExport: true
|
|
39
|
+
},
|
|
40
|
+
registerExternalResources: [new ExcelExportService()],
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If you wish to reference the service to use it with external export button, then simply create a reference while instantiating it.
|
|
47
|
+
```ts
|
|
48
|
+
import { ExcelExportService } from '@slickgrid-universal/excel-export';
|
|
49
|
+
|
|
50
|
+
export class MyExample {
|
|
51
|
+
excelExportService: ExcelExportService;
|
|
52
|
+
|
|
53
|
+
constructor() {
|
|
54
|
+
this.excelExportService = new ExcelExportService();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
initializeGrid {
|
|
58
|
+
this.gridOptions = {
|
|
59
|
+
enableExcelExport: true,
|
|
60
|
+
excelExportOptions: {
|
|
61
|
+
sanitizeDataExport: true
|
|
62
|
+
},
|
|
63
|
+
registerExternalResources: [this.excelExportService],
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exportToExcel() {
|
|
68
|
+
this.excelExportService.exportToExcel({ filename: 'export', format: FileType.xlsx });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/excel-export",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Excel Export (xls/xlsx) Service.",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"not dead"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@slickgrid-universal/common": "^1.
|
|
50
|
+
"@slickgrid-universal/common": "^1.2.0",
|
|
51
51
|
"excel-builder-webpacker": "^2.1.6",
|
|
52
52
|
"moment-mini": "^2.24.0"
|
|
53
53
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"npm-run-all": "^4.1.5",
|
|
57
57
|
"rimraf": "^3.0.2"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "af25eecf8994d5b6ec9eb13bfd266cba71c1cfcb"
|
|
60
60
|
}
|