JSPM

bv-react-data-report

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q29007F
  • License GPL-3.0

ReactJS component to preview data and export it as PDF file.

Package Exports

  • bv-react-data-report

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bv-react-data-report) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bv-react-data-report

This is a ReactJS Component that generate a preview of data to be exported as PDF file.

The user will be able to choose the items per page, the page format (portrait / landscape) and the page size (a4 / letter / legal).

The package expose the libs to be overwritten if you want to customize any behavior.

Dependencies:

Example:

To run the test:

  1. Clone the repository
  2. Execute in console:
yarn
yarn start

General Usage

import Report from 'bv-react-data-report';
import 'bv-react-data-report/dist/index.css';

Then, in the render method we can just call it like:

<Report data={[{ id: 1, value: 'Some value' }, { id: 2, value: 'Some other value' }]}/>

Where data is an array of objects as you can see in this example file.

Installation

Install this component is easy, just use npm as:

npm install bv-react-data-report html2canvas i18n-react jspdf

Or yarn

yarn add bv-react-data-report html2canvas i18n-react jspdf