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 🙏

© 2026 – Pkg Stats / Ryan Hefner

jctk-table-form

v0.1.11

Published

A simple excel liked form on Vue2.

Readme

Table Form

A simple excel liked form on Vue2.

Interactive Online Demo

Quick Demo Video

Installation

npm install -D jctk-table-form

Quick Start

Initial library in main.js

// main.js
import 'jctk-table-form'
import 'jctk-table-form/dist/jctk-table-form.css'

Use component in template

<TableForm v-model="data" :options="options" />

Define data

import FormSettings from 'jctk-table-form/src/components/ShareVar'

let options = {
    head:[{
            title: "Learning Time",
            relatedKey: "learningTime",
            cellType: FormSettings.cellTypes.number,
            style:{
                width: "80px",
                "min-width": "80px",
            },
            options:{
                step: 0.5,
                min: 0,
                max: 8,
            },
        },{
            title: "Language",
            relatedKey: "language",
            cellType: FormSettings.cellTypes.singleSelect,
            options: [{
                value: 0, name: '' },{
                value: 1, name: 'Python' },{
                value: 2, name: 'Javascript' },{
                value: 3, name: 'Java' },{
                value: 4, name: 'C#'
                }],
        },{
            title: "Description",
            relatedKey: "description",
            cellType: FormSettings.cellTypes.textarea,
            options:{
                maxLength: 20,
                isSuggestions: true,
                throttle: 250,
                suggestions: [ "learning refactoring" ]
            },
    }]
}

let data = [{
        learningTime: 1.5,
        language: 1,
        description: "learning lession 3+4",
    },{
        learningTime: 2.0,
        language: 2,
        description: "learning 'this'",
    },
],

Props

v-model

form data

  • type: Array of Object

options

form options

  • type: Object

options.head

form header options

define column order of form

  • type: Array of Object(Head column options)

Head column options

define column options

  • type: Object

  • keys:

    • style: Object, // { styleName: styleValue }

    • title: String, // display on head

    • cellType: String, one of the following value

      • FormSettings.cellTypes.number: "number",

      • FormSettings.cellTypes.singleSelect: "singleSelect",

      • FormSettings.cellTypes.textarea: "textarea",

    • option: Object,

      • FormSettings.cellTypes.number: { step, min, max }

      • FormSettings.cellTypes.singleSelect: [{ name, value }]

      • FormSettings.cellTypes.textarea: { maxLength, isSuggestions, throttle, suggestions }

isReadonly

Set form readonly

  • type: Boolean

showSelection

Force table to show selection

  • type: Boolean

Events

  • @addRows

    • emit timing: Add new row by

      • copy Paste to create new row

      • add new row

      • add new row from other table

    • emit data format: [{ newIndex }]

  • @removeRows

    • emit timing: Delete Selected row(s) by

      • drag out row

      • shift + delete selected row(s)

    • emit data format: [{ oldIndex, value }]

      • drag out row wil get [{ oldIndex, value: {} }]
  • @moveRows

    • emit timing: Move row by

      • Same Table

        • move row

        • shift + delete selected row(s)

      • Cross Table

        • drag out row

        • add new row from other table

    • emit data format: [{ oldIndex, newIndex }]

  • @emptyCells

    • emit timing: Empty cell(s) by

      • press delete to empty cell
    • emit data format: [{ rowIndex, relatedKey, oldValue, newValue }]

  • @modifyCells

    • emit timing: Modify cell(s) by

      • Copy Paste to modify cell(s)

      • direct modify cell

    • emit data format: [{ rowIndex, relatedKey, oldValue, newValue }]

Features

<Resize>
    1. [O] resize column head
    2. [O] resize row head
    3. [-] double click to max size of width/height

<cell>
    <General Function>
        1. [O] is readonly
        2. [O] Display Mode
        3. [O] Edit Mode
        4. [-] Alignment(center, left, right)
    <Type>
        1. [O] Double
        2. [O] Single Select
        3. [O] Free Text
            [O] text autocomplete

<Selection>+
    1. [0] show selections when focus table 
    2. [O] cell select
    3. [O] multiple cell select
    4. [O] keyboard arrow button, change selected cell
    5. [O] click row TH to select row
    6. [O] show selected cell border after table Focus
    7. [O] shift + left click to range set end selected cell
    8. [O] shift + arrow button to add new range set end selected cell

<dragable row>
    1. [O] cross-table row drag
    2. [O] Handle case: index of row in currentCell >= number of row in data
    3. [O] drag new row when no row                

<Copy Paste>
    1. [O] copy selected cell(s)
    2. [O] paste copied cell(s)
    3. [-] copy value of selected cell by clicking/dragging corner

<right click to show helping menu>
    1. [O] copy selected cell(s)
    2. [-] paste selected cell(s)
    3. [-] cut selected cell(s)
    4. [O] delete selected cell(s)

<others>
    1. [O] add new line
    2. [O] allow no rows
    3. [-] column sorting
    4. [O] keyboard delete => set default value to selected cells
    5. [O] keyboard shift+delete => remove row(s) of selected cells
    6. [-] export csv format

<History>
    1. [-] undo ctrl + z
    2. [-] todo ctrl + shift + z