npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lestetelecom/showrelatorio

v1.0.57

Published

virtualized material table whith filters, sort and pieGraph for columns

Downloads

90

Readme

Relatorios Props

| Props | Required | Default value | type | Note | | ------------- |:-------------:| :-------------:|:-----------:|:--------:| | customColumns | yes | none | Array | Array de objetos. | data | yes | none | Array | Array de objetos. | noFilters | no | false | boolean | render/no render filter row. | renderGraphBtn| no | true | boolean | render/no render graph and graph button. | rowHeight | no | 60 | number | height of grid rows ( only numbers, not dynamic). | tableHeight | no | 400 | number or string | Table Container height. | noBottomTotal | no | false | boolean | render/no render total in bottom of the table. | tableType | no | table | string | render a responsive table or a grid whith overflow x and y. | noFilterIcon | no | false | bool | render/no render filter icons. | noPaper | no | true | bool | display border and boz shadow around table. | noDataMessage | no | Sem relatorio, contate o administrador do sistema. | string or React Component | display message when data.length == 0

Exemplos

customColumns: [
  {
    dataKey: 'nome_cli',
    label: 'Nome do Cliente',
    type: 'string'
  }
]

data: [
  {
    nome_cli: 'clodoaldo alves',
    idade: 20,
    data_nasc: '2020-06-04',
    ...
  }
]

<ShowRelatorio customColumns={customColumns} data={data} rowHeight={50}/>

customColumns Props

| Props | Required | Default value | type | Note | | --------|:---------| :-------------:|:-----------:|:-----------:| | dataKey | yes | none | object | object key. | | label | yes | none | object | Column label. | | type | no | string | enum | object type: string, bool, number, date... | | dateType| no | none | enum | 'dd/mm/yyyy', 'yyyy-mm-dd', 'iso'. (to prevent date format erros), all dates are formated in momen(date).format(date or date time + dateType). | | inputFilterSelect | no | none | array | render a select input over a text input. value, label pair for render data. | | render | no | none | func | func for custom rendering, receive {row, KEY}. | | renderGraph| no | true | boolean | render/no render graph for the column. | noFilter | no | false | boolean | render/no render filter input for the column. | noSort | no | false | boolean | remove Sort function and icon. | width | no | 200 | number | column width.

Exemplos

customColumns: [
  {
    dataKey: 'hora_ligacao',
    label: 'Hora da ligação',
    type: 'datetime',
    dateType: 'iso',
    renderGraph: false,
    width: 220,
  },
  {
    dataKey: 'gender',
    label: 'Gênero',
    width: 150,
    //render exemple
    render: ({ row, KEY }) => <div>
      {row[KEY] == 'm' ? 'Male' : 'Female'}
    </div>
  },
  {
    dataKey: 'periodo',
    label: 'Período',
    //inputFilterSelect example
    inputFilterSelect: [
      { value: 'Tarde', label: 'Tarde label' },
      { value: 'Manhã', label: 'Manhã label' },
    ],
    renderGraph: true,
    width: 180,
  },
  {
    ...
  }
]