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

@blanderbit/vue3-table-grid

v0.0.1

Published

## Project setup ``` npm install ```

Downloads

2

Readme

table-grid-library

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Library installment

1. In the project where you want to install the library. In command line type - npm i <...path to the folder with library>.

2. In vue.config.js file in your project, you will need to add the fallowing code:
  const path = require('path')

  chainWebpack: config => {
    config.resolve.symlinks(false)
    config.resolve.alias.set( 'vue', path.resolve('./node_modules/vue'))  
  }

3. To start using the library, import it in your file:
  import { VTable } from 'table-grid-library'

4. Register component:
  components: {
    VTable
  }

How to customize heder cell

The name of template should consist of the words - header-...-content,
and the name of the value of the header cell - #header-calories-content
Put the value of the cell that you want to change between, and put
your content inside template tag:

<template #header-calories-content >
  Your custom content
</template>

If you want to customize your current data into cell, receive the data
in props "{header}". Then take the value of the cell from displayName
property:

<template #header-calories-content="{header}" >
  {{ header.displayName }}
</template>

How to customize table body cell

The name of template consist of the number of the line - line-<number>
(first line of the table starts from 0) and number of the call - 
cell-<number> (first cell in line starts from 0). The numbers of
line and cell must be linked with _ .
In this example we transmit our custom content to the first cell of
the first line:

<template #line-0_cell-0>
  Your custom content
</template>

If you want to customize your current data into cell, receive the data
in props "{bodyCell}":

<template #line-0_cell-3="{bodyCell}">
  {{ bodyCell }}
</template>

How to add your color on row hover

In order to apply your custom color to row hover, you need to pass to the
component backgroundColor prop a string with the color you need.
Example:

:backgroundColor ="'#f0f'"

How to make a fixed height of the table

Use tableHeight prop to transmit a string value into the component, the size 
of height of the table you want in pixels.
Example:

:tableHeight ="'200'"

It means that the table will have 200px height

How to fix header of the table

Use isHeaderSticky prop. To make header sticky transmit boolean value true to
the prop. To make it not sticky, transmit false or just skip this prop.
Example:

:isHeaderSticky ="true"

How to apply custom arrows for sorting columns

Apply two templates with names: #arrow-top, #arrow-bottom. In each template put
img tag of the arrow. Receiving "active" prop, you can apply your own class
to your img tag.
Example:

<template #arrow-top="{active}">
  <img src="arrow.svg"
    alt=""
    :class="{ arrowStyle : active }"
  >
</template>

How to make a column sortable

To make column sortable you need to add a key 'sortable' with a boolean value
to the object of a column.
Example:
{
  displayName: 'column N',
  displayValue: 'fat',
  sortable: true
}

How to change a background for sorting arrows

You need to add a key 'sortArrowBackground' to the object of needed column, with
the value of the color.
Example:
{
  displayName: 'column N',
  displayValue: 'fat',
  sortArrowBackground: '#f0f'
}

How to show sortable window

On the sort button can be called a window with options, to choose wich kind of
sorting method you need. To activate this window you need to pass a boolean
value into a 'isShownSortableWindow' key in the object of a column.
Example:
{
  displayName: 'column N',
  displayValue: 'fat',
  isShownSortableWindow: true
}

How to make arrow selection

There are three types of arrow selection. To choose the slection mode you need
to add 'showSelect' prop and pass one of three string values:
'default' - without any selection.
'single' - selecting checkbox will appear in the beginning of each line.
'multiple' - in adition to checkboxes in the beginning of each line, one checkbox
will appear in the left top corner, which will give the possibility to mark all lines.
Example:

:showSelect ="'multiple'"

To receive the result of chosen items, you need to apply to props an event 
listener select-result.
Example:

@select-result="<name of your function>"

Customize configuration

See Configuration Reference.