Skip to content

Commit

Permalink
feat(package): add new Excel Export package
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Apr 21, 2020
1 parent d6adc5c commit 808785e
Show file tree
Hide file tree
Showing 24 changed files with 2,172 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"trace": true,
"sourceMapPathOverrides": {
"webpack:///../common/*": "${webRoot}/packages/common/*",
"webpack:///../excel-export/*": "${webRoot}/packages/excel-export/*",
"webpack:///../export/*": "${webRoot}/packages/export/*",
"webpack:///../vanilla-bundle/*": "${webRoot}/packages/vanilla-bundle/*",
"webpack:///./src/*": "${webRoot}/packages/web-demo-vanilla-bundle/src/*"
}
Expand Down
26 changes: 13 additions & 13 deletions packages/common/src/global-grid-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@ export const GlobalGridOptions: GridOption = {
enableColumnPicker: true,
enableColumnReorder: true,
enableContextMenu: true,
// enableExcelExport: true, // Excel Export is the new default,
enableExport: true, // CSV/Text with Tab Delimited
enableExcelExport: false,
enableExport: false,
enableGridMenu: true,
enableHeaderMenu: true,
enableMouseHoverHighlightRow: true,
enableSorting: true,
enableTextSelectionOnCells: true,
explicitInitialization: true,
// // excelExportOptions: {
// // addGroupIndentation: true,
// // exportWithFormatter: false,
// // filename: 'export',
// // format: FileType.xlsx,
// // groupingColumnHeaderTitle: 'Group By',
// // groupCollapsedSymbol: '\u25B9',
// // groupExpandedSymbol: '\u25BF',
// // groupingAggregatorRowText: '',
// // sanitizeDataExport: false,
// // },
excelExportOptions: {
addGroupIndentation: true,
exportWithFormatter: false,
filename: 'export',
format: FileType.xlsx,
groupingColumnHeaderTitle: 'Group By',
groupCollapsedSymbol: '\u25B9',
groupExpandedSymbol: '\u25BF',
groupingAggregatorRowText: '',
sanitizeDataExport: false,
},
exportOptions: {
delimiter: DelimiterType.comma,
exportWithFormatter: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const pubSubServiceStub = {
publish: jest.fn(),
subscribe: jest.fn(),
unsubscribe: jest.fn(),
unsubscribeAll: jest.fn(),
} as PubSubService;

describe('FilterService', () => {
Expand Down
7 changes: 7 additions & 0 deletions packages/excel-export/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Vanilla Bundle
#### @slickgrid-universal/export

Simple Export to Excel Service that allows to exporting as ".xls" or ".xlsx".

### Installation
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 CSV" from the Grid Menu (aka hamburger menu).
47 changes: 47 additions & 0 deletions packages/excel-export/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "@slickgrid-universal/excel-export",
"version": "0.0.2",
"description": "Excel Export (xls/xlsx) Service.",
"browser": "src/index.ts",
"main": "dist/es2020/index.js",
"typings": "dist/es2020/index.d.ts",
"files": [
"src",
"dist"
],
"scripts": {
"build": "cross-env tsc --build",
"build:watch": "cross-env tsc --incremental --watch",
"dev": "run-s build sass:build sass:copy",
"dev:watch": "run-p build:watch",
"bundle:commonjs": "tsc --project tsconfig.build.json --outDir dist/commonjs --module commonjs",
"bundle:es2020": "cross-env tsc --project tsconfig.build.json --outDir dist/es2020 --module es2015 --target es2020",
"bundle": "npm-run-all bundle:commonjs bundle:es2020",
"prebundle": "npm-run-all delete:dist",
"delete:dist": "cross-env rimraf dist"
},
"author": "Ghislain B.",
"license": "MIT",
"engines": {
"node": ">=12.13.1",
"npm": ">=6.12.1"
},
"browserslist": [
"last 2 version",
"> 1%",
"maintained node versions",
"not dead",
"IE 11"
],
"dependencies": {
"@slickgrid-universal/common": "^0.0.2",
"excel-builder-webpacker": "^1.0.5",
"moment-mini": "^2.24.0"
},
"devDependencies": {
"cross-env": "^7.0.2",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"typescript": "^3.8.3"
}
}
Loading

0 comments on commit 808785e

Please sign in to comment.