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

making-table

v0.1.7

Published

[![npm version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=js&r=r&ts=1683906897&type=6e&v=17.3.0&x2=0)](https://badge.fury.io/js/ngx-easy-table) [![last commit](https://badgen.net/github/last-commit/vikasdhiman0635/autoTable)](https://badgen.net/g

Downloads

4

Readme

npm version last commit total downloads license

Making Table

With this library, you can effortlessly construct table structures by simply providing JSON data.

From 6.0.0, there is no other JS dependency anymore. Just Angular.

It works with angular version 2.0.0 and up

Dependency

  • You can utilize version 0.0.3 of the "making-table" library with any Angular version higher than 8.

Installation

You can get it on npm.

  npm install making-table
  • Open your module file e.g app.module.ts and update imports array

  • If you're using Angular 16 or 17, please navigate to the component.ts file and ensure to update the imports array accordingly.

   import { MakingTable } from 'making-table';
   ...
   imports: [
   ...
       MakingTable,
   ...
   ]

Usage

Copy source

This library support multiple kinds of copy source.

  • Setting tableData attribute
  • open component.html file
<makingTable [table]="table" (exportEditingArray)="exportData($event)"></makingTable>
  • open component.ts file
  • make the tableData array
    tableData: any = {
    headerName: [
      { displayName: "Name", sort: true, id: 'name', editable: true, type: 'text' },
      { displayName: "Age", sort: true, id: 'age', editable: true, type: 'number' },
      { displayName: "Gender", sort: false, id: 'gender', editable: true, type: 'select', selectFieldValues: ['male', 'female', 'others'] },
      { displayName: "Email", sort: false, id: 'email', editable: false, type: 'email' },
      { displayName: "Phone Number", sort: false, id: 'phoneNo', editable: true, type: 'tel' },
      { displayName: "Flat No", sort: false, id: 'flatNo', editable: false, type: 'number' },
      { displayName: "Tower Number", sort: false, id: 'towerNo', editable: false, type: 'number' },
      { displayName: "Socity", sort: false, id: 'socity', editable: false, type: 'text' },
      { displayName: "Sector", sort: false, id: 'sector', editable: false, type: 'text' },
      { displayName: "State", sort: false, id: 'state', editable: false, type: 'text' },
      { displayName: "Country", sort: false, id: 'country', editable: false, type: 'text' }
    ],
    data: [
      { name: 'Ram', age: '23', gender: 'male', email: '[email protected]', phoneNo: '+91 0000000000' },
      { name: 'Vivek', age: '24', gender: 'male', email: '[email protected]', phoneNo: '+91 0000000000' },
      { name: 'Mohan', age: '22', gender: 'male', email: '[email protected]', phoneNo: '+91 0000000000' }
    ],
    manageDisplayData: false,
    makeTableData: [],
    allbtn: {
      alldownload_btn: true,
      alldownload_btnValue: 'All Download',
      alldownload_btnStyle: { 'background-color': 'skyblue', 'width': '200px', 'height': '40px', 'margin-top': '50px' },
      download_as_pagination: true,
      download_as_pagination_btnValue: 'Download Excel by Page',
      download_as_pagination_btnStyle: { 'background-color': 'skyblue', 'width': '200px', 'height': '40px', 'margin-top': '50px' },
      savebtn: true,
      savebtnValue: 'Save data',
      save_btnstyle: { 'background-color': 'skyblue', 'width': '100px', 'height': '40px', 'margin-top': '50px' },
    },
    allbtnStyle: { 'display': 'flex', 'justify-content': 'space-evenly' },
    paginationNoS: [5, 10, 15, 20, 30, 50],
    paginationSelected: 10,
    table_style: {},
    th_style: { 'background-color': 'gray' },
    td_style: {}
  }

Note

  • In headerName columns Id will be match with data keys

Ex.

{ displayName: "Name", sort: true, id: 'name', editable: true, type: 'text' }
  • The identifier name(id: 'name') corresponds to the key data name (data: [ { name(Key): 'Ram'(Value) } ]).

Export Table

  • Within the makingTable tag, there's an event called exportEditingArray that allows you to export table data.
  • You have the flexibility to choose any name for the function exportData($event) and include it in your component.ts file.
<makingTable [table]="tableData" (exportEditingArray)="exportData($event)"></makingTable>

Usage/Examples

Build Project

  npm i && npm run build

To run demo code locally