New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cdk-table-exporter

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdk-table-exporter - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "cdk-table-exporter",
"version": "0.0.5",
"version": "0.0.6",
"author": "Halit Talha Türe",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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

[![JavaScript Style Guide: Good Parts](https://img.shields.io/badge/code%20style-goodparts-brightgreen.svg?style=flat)](https://github.com/dwyl/goodparts "JavaScript The Good Parts") [![Node version](https://img.shields.io/npm/v/cdk-table-exporter.svg?style=flat)](https://www.npmjs.com/package/cdk-table-exporter)
# Angular Table Exporter (CdkTable Exporter)
[![JavaScript Style Guide: Good Parts](https://img.shields.io/badge/code%20style-goodparts-brightgreen.svg?style=flat)](https://github.com/dwyl/goodparts "JavaScript The Good Parts") [![Node version](https://img.shields.io/npm/v/cdk-table-exporter.svg?style=flat)](https://www.npmjs.com/package/cdk-table-exporter) ![Total Downloads](https://img.shields.io/npm/dw/cdk-table-exporter.svg)
This project is mainly for making CdkTable components exportable as excel files. cdk-table-exporter facilitates the common functionalities for CdkTable implementations abstracting the behavior that can change among different CdkTable implementations, see [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) for angular material table export.
# CdkTable Table Exporter
**!! If you are using angular material please use** [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter)
This project facilitates the common functionalities for CdkTable implementations abstracting the behavior that can change among different CdkTable implementations, see [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) for angular material table export.
## Getting Started

@@ -15,41 +18,13 @@

You can find more detail under the corresponding title of Usage section
## Usage
CdkTableExporter class defines the common functionality that an exporter directive should have.
By extending it an implementing the abstract methods you will have an exporter of your own.
Thus the usage is simply as follows:
1- Generate a directive class
2- Extend CdkTableExporter class implement the abstract methods
Will be updated soon
## API
### CdkTableExporter
| Input/Output | Property | Type | Description |
| --- | --- | --- | --- |
| `@Input` | cdkTable | `any` | Template-referance of CdkTable that's to be exported |
| `@Input` | exporterButton | `any` | Template-referance of the button that's used to trigger the export |
| `@Input` | sheetName | `string` | Template-referance of CdkTable that's to be exported |
| `@Input` | fileName | `string` | Template-referance of CdkTable that's to be exported |
| `@Input` | hiddenColumns | `Array<number>` | The indexes of the columns that are not wanted in the excel file |
| `@Output` | exportStarted | `EventEmitter<void>` | Event that's fired when the export started |
| `@Output` | exportCompleted | `EventEmitter<void>` | Event that's fired when the export completed |
### JsonExporterService
JsonExporterService is published in cdk-table-exporter project. CdkTableExporter employs this service, hence through inheritance MatTableExporterDirective does too.
#### exportExcel Method
Exports excel file by employing xlsx sheetjs
| Parameter | Type | Description |
| --- | --- | --- |
| header | `any` | Any json object that holds the header information of the exported excel file aka the first row of the excel |
| rows | `Array<any>` | Any json array that will be the rows of the exported excel |
| fileName | `string` | Exported excel file's name |
| sheetName | `string` | The name of the sheet that keeps the exported data |
| hiddenColumns | `Array<string>` | Properties that are wanted to be hidden, i.e. id, createdDate, auditable properties etc. |
## Licence
Apache-2.0
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