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

syn-grids

v0.0.7

Published

Data grid components.

Downloads

10

Readme

syn-grids

Data grid components.

Components

syn-grid

Shows a grid base on inline json config.

options

| Name | Type | Description | |------|------|-------------| | cells | {Object} | Options of grid's cells | | cells.foo | {Object} | Options options of the cells of foo property | | cells.foo.filter | {Function} | A filter for the view. The function will be called and its result will be placed in the cell, instead of original value | cells.foo.classes | {Array} | List of css classes to add to each cell of foo property | | cells.foo.buttons | {Object} | List of buttons to add inside each cell of foo property | | cells.foo.buttons[bar] | {Object} | Config for a button | | cells.foo.buttons[bar].* | {Object} | Any of the mentioned options of cells.foo | | cells.foo.on | {Object} | List of callbacks for events | | cells.foo.on[eventName] | {Array, Function} | Call to call on event's triggering | | head.foo | {Object} | Options options of the column | | head.foo.label | {String} | Name of the column | | head.foo.sort | {Boolean} | Wether column is sortable or not ( default: false ) | | head.foo.* | {*} | Any option available in cells | | [pagination] | {Object} | Pagination config. Set to false to hide pagination | | [pagination].buttons | {Number} | Number of page buttons to display ( default: 10 ) | | [pagination].rowsPerPage | {Number} | Rows to display per page. ( default: 20 ) | | [pagination].startPage | {Number} | First page to display ( default: 0 ) | | [data] | {Object[]} | Data rows to display |

Example of use:

<script>
$scope.gridConfig = {
  head: {
    name: { label: 'Name', sort: true },
    surname: { label: 'Last Name' }
  },
  cells: {
    name:
      filter: function(key, value, item) {
        return value + " (" + item.age + ")"
      }
  },
  pagination: false,
  data: [
    { name: 'David', surname: 'Smith', age: 46 }
    { name: 'Susan', surname: 'Collins', age: 34 }
    { name: 'Joe', surname: 'Johnson', age: 34, email: '[email protected]' }
  ]
}
</script>
<syn-grid options="gridConfig">

Output:

| Name | Last Name | |-------|:---------:| | David (46) | Smith | | Susan (34) | Collins | | Joe (34) | Johnson |

To see a demo of components, execute gulp serve command and open this url in >a browser: http://localhost:3000/docs/