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

syara-ui-vue

v0.4.2

Published

UI tools for Vue.js (2.x)

Downloads

4

Readme

npm npm NPM

Syara UI Tools

User interface tools for web applications

Requirements

  • vue 2.x

Installation

npm install syara-ui-vue

Usage

Register components with Vue.use()

// main.js
import Vue from 'vue'

import SyaraUi from 'syara-ui-vue'
import 'syara-ui-vue/dist/syara-ui.css'

Vue.use(SyaraUi)
new Vue({
    render: h => h(App),
}).$mount('#app')

<!-- VuePage.vue -->

<!-- template  -->
<SyTable 
:header="tHeader" 
:body="tBody" 
:pageLimit="40" 
:bodyHeight="600" 
:selectionField="true" 
:bodyLoading="loading"
@selectedLines="selectedItens=$event" 
@callbackFunctions="manageCallbackFunctions($event)" />
// VuePage.vue
// script

// Using axios to fetch data from API
import axios from 'axios'

export default {
  name: 'App',
    data() {
        return {

        // Define table's structure
        tHeader: [
            {
                text: 'Id', // Text presented at header's column
                field: 'id', // Map to this specific key from every object at data list 
                filter: true, // define whether filter field is presented or not for this specific column
                asc: true // Define how to order lines based on this column data
            },
            {text: 'Album Id', field: 'albumId', filter: true },
            {text: 'Title', field: 'title', filter: true },
            {text: 'Url', field: 'url', filter: true},
            {text: 'Thumb', field: 'thumbnailUrl', filter: true},
            {
                text: 'Actions', // Text presented at header's column
                actions:[
                    {
                        callback:'testReturnFunction', // action called whenever the icon is clicked (must be mapped with method manageCallbackFunctions)
                        info: 'id', // field value presented besides icon
                        mdIcon: 'attach_file' // material design icon font reference.
                        // it's possible to use a svg code as icon -> just replace the key materialIcon by icon and write/paste svg code as a string
                    },
                    {
                        callback:'testReturnFunction2', 
                        info: 'albumId', 
                        mdIcon: 'forum', 
                        mdIconSize: 18 // Optional. Define icon size according material design guidelines. Accepted values: [16,18,24,36,48] 
                    }
                ] 
            }

        ],

        // Actual table data
        tBody: [],
        // Receive list objects containing each line selected 
        selectedItens: [],
        // Control whether loading message is presented ro not
        loading: false,
        


        }
    },
    created(){

        this.getDataAxios()

    },
    methods: {

        async getDataAxios(){
            this.loading = true
            // Testing with API provide by JSONPlaceholder - awesome!
            let response = await axios.get('https://jsonplaceholder.typicode.com/photos')
            this.tBody = response.data
            this.loading = false
        },

        // Setup this function to deal with actions - i.e.: Click at table icon
        manageCallbackFunctions(event) {
            console.log('manageCallbackFunctions')
            console.log(event)
            this[event[0]](event[1])
        },

        testReturnFunction(e){
            console.log('testReturnFunction')
            console.log(e)

        },

        testReturnFunction2(e) {
            console.log('testReturnFunction2')
            console.log(e)
        }


    }
}

Components

Click on component's name to see the documentation (if available)

| Name | Type | Status | | ------- | ----- | :-------: | | SyTable | table | Ok | | SyForm | form | X | | SyButton | button | X | | SyChart | charts | X | | SyIcon | svg icons | X |

More information

SyaraUI Docs