Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vuetable-2

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuetable-2 - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

yarn.lock

0

build/build.js

@@ -0,0 +0,0 @@ // https://github.com/shelljs/shelljs

@@ -0,0 +0,0 @@ /* eslint-disable */

@@ -0,0 +0,0 @@ var path = require('path')

@@ -0,0 +0,0 @@ var path = require('path')

@@ -0,0 +0,0 @@ var config = require('../config')

@@ -0,0 +0,0 @@ var path = require('path')

2

changes.md

@@ -1,2 +0,2 @@

# What Changes
# What's Changed
- `vuetable-pagination` is no longer part of `vuetable` by default.

@@ -3,0 +3,0 @@ + better customization

@@ -0,0 +0,0 @@ var merge = require('webpack-merge')

@@ -0,0 +0,0 @@ // see http://vuejs-templates.github.io/webpack for documentation.

module.exports = {
NODE_ENV: '"production"'
}

@@ -0,0 +0,0 @@ var merge = require('webpack-merge')

{
"name": "vuetable-2",
"version": "0.9.0",
"version": "0.9.1",
"description": "A Vue.js 2.0 component for data table",

@@ -5,0 +5,0 @@ "author": "Rati Wannapanop <rati.wannapanop@gmail.com>",

@@ -0,0 +0,0 @@ # vuetable-2

@@ -12,5 +12,5 @@ import Vue from 'vue'

'<div>',
'<button class="ui red button" @click="itemAction(\'view-item\', rowData)"><i class="zoom icon"></i></button>',
'<button class="ui blue button" @click="itemAction(\'edit-item\', rowData)"><i class="edit icon"></i></button>',
'<button class="ui green button" @click="itemAction(\'delete-item\', rowData)"><i class="delete icon"></i></button>',
'<button class="ui red button" @click="onClick(\'view-item\', rowData)"><i class="zoom icon"></i></button>',
'<button class="ui blue button" @click="onClick(\'edit-item\', rowData)"><i class="edit icon"></i></button>',
'<button class="ui green button" @click="onClick(\'delete-item\', rowData)"><i class="delete icon"></i></button>',
'</div>'

@@ -25,8 +25,6 @@ ].join(''),

methods: {
onClick: function(event) {
console.log('actions: on-click', event.target)
onClick: function(action, data) {
console.log('actions: on-click', data.name)
sweetAlert(action, data.name)
},
onDoubleClick: function(event) {
console.log('actions: on-dblclick', event.target)
}
}

@@ -150,5 +148,18 @@ })

transform: function(data) {
let transformed = []
let transformed = {}
transformed.pagination = {
total: data.total,
per_page: data.per_page,
current_page: data.current_page,
last_page: data.last_page,
next_page_url: data.next_page_url,
prev_page_url: data.prev_page_url,
from: data.from,
to: data.to
}
transformed.data = []
data = data.data
for (let i = 0; i < data.length; i++) {
transformed.push({
transformed['data'].push({
id: data[i].id,

@@ -255,13 +266,2 @@ name: data[i].name,

},
onActions (action, data) {
console.log('actions: ', action, data.name)
if (action === 'view-item') {
sweetAlert(action, data.name)
} else if (action === 'edit-item') {
sweetAlert(action, data.name)
} else if (action === 'delete-item') {
sweetAlert(action, data.name)
}
},
onLoadSuccess (response) {

@@ -268,0 +268,0 @@ // set pagination data to pagination-info component

@@ -0,0 +0,0 @@ // A custom Nightwatch assertion.

@@ -0,0 +0,0 @@ require('babel-register')

@@ -0,0 +0,0 @@ // 1. start the dev server using production config

@@ -0,0 +0,0 @@ // For authoring Nightwatch tests, see

@@ -0,0 +0,0 @@ // Polyfill fn.bind() for PhantomJS

# Upgrade Guide
- Pagination and Pagination Info
Pagination and pagination info are still in the package but no longer part of `vuetable`. That means you will have to explicitly include them in your template and wire them up to `vuetable` using availble events.
Pagination and pagination info are still in the package but no longer part of `vuetable`. That means you will have to explicitly include them in your template and wire them up to `vuetable` using availble events.
This is very easy though. Basically, you just need to listen to `vuetable:pagination-data` event to get the pagination information, then call `setPaginationData()` on both `Pagination` and `PaginationInfo` components.
Please see the provided example.
This is very easy though. Basically, you just need to listen to `vuetable:pagination-data` event to get the pagination information, then call `setPaginationData()` on both `Pagination` and `PaginationInfo` components.
Please see the provided example.
The reason behind this is that uncoupling the pagination and pagination info components from `vuetable` makes it more flexible and light weight. If you do not need pagination component, you don't have to use it. Or if you want to use your own pagination component or put it somewhere else, you can easily do that.
The reason behind this is that uncoupling the pagination and pagination info components from `vuetable` makes it more flexible and light weight. If you do not need pagination component, you don't have to use it. Or if you want to use your own pagination component or put it somewhere else, you can easily do that.
- Vuetable Events
Due to the change in Vue 2.0 the deprecates `$broadcast` and `$dispatch` the events and encourages the use of centralized event hub, you can no longer send an event to `vuetable` to perform the task (e.g. `vuetable:reload`, `vuetable:refresh`) as before.
Due to the change in Vue 2.0 the deprecates `$broadcast` and `$dispatch` the events and encourages the use of centralized event hub, you can no longer send an event to `vuetable` to perform the task (e.g. `vuetable:reload`, `vuetable:refresh`) as before.
In earlier version of `vuetable`, it usually uses and provides those events for communications between its internal components (e.g. Vuetable, VuetablePagination, etc). In this case, moving all those events to `vuex` seems over-kill and inappropriate since `vuex` is intended to be use as an centralized state management for an application.
In earlier version of `vuetable`, it usually uses and provides those events for communications between its internal components (e.g. Vuetable, VuetablePagination, etc). In this case, moving all those events to `vuex` seems over-kill and inappropriate since `vuex` is intended to be use as an centralized state management for an application.
Although, those events were removed in this version, but almost all the functionality are still there in the methods inside `vuetable`. You can easily call it by referencing `vuetable` component in your code using [`ref`](http://vuejs.org/api/#ref) attribute.
Although, those events were removed in this version, but almost all the functionality are still there in the methods inside `vuetable`. You can easily call it by referencing `vuetable` component in your code using [`ref`](http://vuejs.org/api/#ref) attribute.
For the list of availble and removed events, please see the [What's Change] section.
For the list of availble and removed events, please see the [What's Change] section.
- `__actions` field
The `__actions` special field was deprecated and can easily be replaced by the `__component` special field, which is more useful and shouldn't have any limitation since you can now use the full power of Vue.js.
The `__actions` special field was deprecated and can easily be replaced by the `__component` special field, which is more useful and shouldn't have any limitation since you can now use the full power of Vue.js.
Please see the provided example for the replacing action component.
Please see the provided example for the replacing action component.
- `append-params`
The type of `append-params` has been changed from `Array` to `Object` type.
The type of `append-params` has been changed from `Array` to `Object` type.
- CSS styling
All the related CSS classes has been moved into `css` prop, which is an `Object` type. This should make the template shorter and cleaner to look.
All the related CSS classes has been moved into `css` prop, which is an `Object` type. This should make the template shorter and cleaner to look.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc