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

jsql-smarttable-vue

v1.0.14

Published

Vue.js version of jsql-smarttable

Downloads

18

Readme

JSQL-Vue

JSQL Vue is an advanced table component for the vue framework that works with semantics-ui. This component uses JSQL package as its core. This package is under development.

Dependencies

This package requries semantics-ui. Be sure to have semantics-ui installed before using this component.

Installation

Install the jsql smarttable package:

npm install --save jsql-smarttable-vue

Then include jsql in your vue components:

  .
  .
  .
  <script>
    import SmartTable from 'jsql-smarttable-vue';
    export default {
      name: 'HelloWorld',
      components: { SmartTable },
      .
      .
      .
    }
  </script>
  .
  .
  .

After this you should be able to use the jsql component on your template section.

SmartTable Data/Options

All table data is passed to the SmartTable component through the tableArgs prop. This prop must be an object containing the table information. The following example contains all keys that can be included in the tableArgs prop:

<smart-table :tableArgs="{
  name: 'List of People',
  columns: [
    { name: 'First Name', type: 'String' },
    { name: 'Last Name', type: 'String' },
    { name: 'Age', type: 'Number' },
  ],
  rows: [
    [ 'Daniel', 'Rodriguez', '20' ],
    [ 'Raul', 'Rodriguez', '23' ],
    [ 'Benjamin', 'Rodriguez', '23' ],
    [ 'Benjamin Jr.', 'Rodriguez', '23' ],
  ],
  filters: [
    {
      targetColumn: 'First Name',
      filterFunction: 'equals',
      parameters: 'Daniel',
      status: true,
      tag: 'Filter Where Name is Daniel',
    },
    {
      targetColumn: 'Age',
      filterFunction: 'inBetween',
      parameters: [18, 25],
      status: true,
      tag: 'Filter Where Age is In Between 18 and 25',
    },
    options: {
      allowCellEditing: true,
      allowCellAdding: true,
      allowColumnAdding: true,
      allowColumnRemoving: true,
      allowRowAdding: true,
      allowRowRemoving: true,
      allowTableSearching: true,
      allowColumnSearching: true,
      allowFilterCreation: true,
      allowFilterDeletion: true,
      this.options.allowFiltering: true,
      addRowButtonHandler: function() {
        // Choose what happens when user presses the add row menu item.
      },
      removeRowButtonHandler: function() {
        // Choose what happens when user clicks the "Deleted Selected" button to delete rows.
      },
      addColumnButtonHandler: function() {
        // Choose what happens when user clicks on the add column menu item.
      },
      removeColumnButtonHandler: function() {
        // Choose what happens when user clicks the "Deleted Selected" button to delete columns.
      },
    }
  ]
}">

Empty States

You can create empty states of your own to notify a user that the table has no rows or no columns. Here are some very basic examples:

<smart-table>
  <div slot="empty_columns_state"> You have no columns! </div>
  <div slot="empty_rows_state"> You have no rows! </div>
</smart-table>

Note: The empty_columns_state has preference over the empty_rows_state and the later won't show if empty_columns_state is showing.

Roadmap

V1

  • [ ] Adding
    • [x] Adding Columns
    • [x] Adding Rows
    • [x] Adding Filters
  • [ ] Deleting
    • [ ] Deleting Columns
    • [x] Deleting Rows
    • [x] Deleting Filters
  • [ ] Editing
    • [x] Edit Table Title
    • [x] Edit Cells // Have some issues
    • [x] Edit Columns
    • [x] Edit Filters
  • [ ] Filtering // Has some issues
  • [ ] Search
    • [x] Search Table
    • [ ] Search Columns
  • [ ] Custom Empty States
    • [X] Empty Columns State
    • [x] Empty Rows State
    • [ ] Empty Filters State
    • [ ] Empty Search Results State
  • [ ] Sortable Columns
  • [ ] Card View
  • [ ] Data Validation // Need to include custom Regex validation.

V2

  • [ ] Boolean Column Data Type
  • [ ] Link Column Data Type
  • [ ] Row/Column reordering

Future

  • [ ] Image Column Data Type
  • [ ] Data Graph Creation
  • [ ] Table Import/Export Options

Images

Alt text Alt text Alt text Alt text Alt text Alt text Alt text

NOTE

  • This component is in a beta state and is not ready for production. *

JSQL Core

The core of this component is written is pure javascript so that it could be used to write the same component in other frameworks like react or angular. If you are interested check out the core JSQL repo:

https://github.com/db-rdz/JSQL

License

MIT

Examples

Example coming soon...