@globalbrain/sefirot
Advanced tools
Comparing version 0.7.1 to 0.7.2
export function state () { | ||
return { | ||
id: 0, | ||
name: null, | ||
@@ -9,3 +10,3 @@ data: {} | ||
export const actions = { | ||
open ({ commit }, { name, data }) { | ||
open ({ commit }, { name, data = {} }) { | ||
commit('set', { name, data }) | ||
@@ -15,10 +16,7 @@ }, | ||
update ({ commit }, data) { | ||
commit('updateData', data) | ||
commit('update', data) | ||
}, | ||
close ({ commit }) { | ||
commit('set', { | ||
name: null, | ||
data: {} | ||
}) | ||
commit('delete') | ||
} | ||
@@ -28,3 +26,4 @@ } | ||
export const mutations = { | ||
set (state, { name, data = {} }) { | ||
set (state, { name, data }) { | ||
state.id++ | ||
state.name = name | ||
@@ -34,4 +33,10 @@ state.data = data | ||
updateData (state, data) { | ||
update (state, data) { | ||
state.data = { ...state.data, ...data } | ||
}, | ||
delete (state) { | ||
state.id = 0 | ||
state.name = null | ||
state.data = {} | ||
} | ||
@@ -38,0 +43,0 @@ } |
{ | ||
"name": "@globalbrain/sefirot", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "Vue Components for Global Brain Design System.", | ||
@@ -32,6 +32,6 @@ "files": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.6.2", | ||
"@babel/core": "^7.6.4", | ||
"@nuxtjs/dotenv": "^1.4.1", | ||
"@nuxtjs/google-analytics": "^2.2.0", | ||
"@nuxtjs/markdownit": "^1.2.6", | ||
"@nuxtjs/markdownit": "^1.2.7", | ||
"@vue/test-utils": "^1.0.0-beta.29", | ||
@@ -50,4 +50,5 @@ "babel-core": "^6.26.3", | ||
"markdown-it-highlight": "^0.2.0", | ||
"mutation-observer": "^1.0.3", | ||
"normalize.css": "^8.0.1", | ||
"nuxt": "^2.9.2", | ||
"nuxt": "^2.10.1", | ||
"portal-vue": "^2.1.6", | ||
@@ -57,2 +58,3 @@ "postcss-css-variables": "^0.13.0", | ||
"push-dir": "^0.4.1", | ||
"simplebar-vue": "^1.3.4", | ||
"v-calendar": "^0.9.7", | ||
@@ -66,3 +68,3 @@ "vue": "^2.6.10", | ||
"vuelidate": "^0.7.4", | ||
"webpack": "^4.39.3" | ||
"webpack": "^4.41.2" | ||
}, | ||
@@ -69,0 +71,0 @@ "jest": { |
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
Sorry, the diff of this file is not supported yet
112188
34
76
620