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

@mel-zedeks/coordy-vue

v3.0.5

Published

Coordy is a smart Datatable | this is the Vue version supports REST APIs / Inertia.js (Laravel - VILT) as backend

Downloads

84

Readme

Coordy - Vue

Coordy is a smart Datatable that supports REST APIs / Inertia.js (Laravel - VILT) as backends

This package to help you build Vue Or VILT (Vue, Inertia, Laravel Tailwind css) applications faster without having to worry about things like

  • Re-creating tables and styling each table
  • Dealing with manual pagination.
  • Table search
  • Table Exports [print, csv, xlxs, pdf]
  • Table filters
  • add new buttons or links
  • table actions like [edit, view, etc], supports string or object route construction
  • Use Text, Links, Html or Vue Components in the table with slots.
  • and more

Installation

install using NPM

npm i @mel-zedeks/coordy-vue

import into your vue 3 "main.js" or "resources/js/app.js"

import CoordyDataTable from '@mel-zedeks/coordy-vue'

use as component

 app.use(Coordy)

full code for vue 3 "resources/js/app.js" should look like this.

import {createApp, h} from 'vue'
import {createInertiaApp} from '@inertiajs/inertia-vue3'

import Coordy from '@mel-zedeks/coordy-vue' // this place
// @ is an alias for ./scr directory
import store from "./store/index"

createInertiaApp({
    resolve: name => import(`./Pages/${name}`),
    setup({el, App, props, plugin}) {
        createApp({render: () => h(App, props)})
            .mixin({
                methods: {
                    route,
                }
            })
            .use(plugin)
            .use(store)
            .use(Coordy) // this place
            .mount(el)
    },
})

Usage

Coordy expects a props that need to be passed

  • data

the data prop has 3 attributes

  • content - responsible for the table content, pagination, entries
  • settings - use to configure the table to enable features like
    • checkbox
    • limit
    • search
    • sort and more
  • headers - use to customize the table header content

examples

basic use:

const backend = reactive({
    // show only the data you want in the table, even when there are other data available in the records
    headers: ['name', 'age'], 
    content: {
        data: [
          // data from api
          {id:1, name:"John", age:20} 
        ]
    }
    settings: {
        tableTitle: "Table Name",
    }
}}

CSS

add the following tailwind css classes to you main css file

.z-table-wrapper{
    @apply w-3/4 rounded-sm bg-white  p-6 shadow
}
.z-btn{
    @apply bg-blue-600 text-white text-sm font-medium py-3 px-4 rounded-sm ml-1
}
.z-btn-sm{
    @apply bg-blue-600 text-white text-xs font-medium py-1 px-2 rounded-sm ml-1
}
.z-btn-pg{
    @apply bg-blue-600 text-white text-xs font-medium py-1 px-2 ml-0.5
}
.z-input{
    @apply rounded-sm w-full p-2 focus:ring-blue-600 focus:outline-none focus:ring focus:ring-opacity-25 bg-gray-50 ring ring-opacity-25 ring-gray-300
}
.z-select{
    @apply rounded-sm  p-2 focus:ring-blue-600 focus:outline-none focus:ring focus:ring-opacity-25 bg-gray-50 ring ring-opacity-25 ring-gray-300
}