jenesius-vue-form
Advanced tools
Comparing version 2.0.18 to 2.0.19
@@ -93,2 +93,3 @@ import EventEmitter from "jenesius-event-emitter"; | ||
depend(item: any): () => void; | ||
static proxyEvent(from: any, to: any, eventName: string): void; | ||
unsubscribe(item: any): void; | ||
@@ -95,0 +96,0 @@ dependInput(name: string, i: any): () => void; |
@@ -13,2 +13,3 @@ export interface Values { | ||
name?: string; | ||
changed?: boolean; | ||
disable: (name?: string | string[]) => void; | ||
@@ -15,0 +16,0 @@ enable: (name?: string | string[]) => void; |
/*! | ||
* jenesius-vue-form v2.0.18 | ||
* jenesius-vue-form v2.0.19 | ||
* (c) 2022 Jenesius | ||
@@ -327,3 +327,3 @@ * @license MIT | ||
get changed() { | ||
return !!Object.keys(__classPrivateFieldGet(this, _Form_changes, "f")).length; | ||
return !!Object.keys(__classPrivateFieldGet(this, _Form_changes, "f")).length || !!this.dependencies.find(d => d.changed); | ||
} | ||
@@ -449,4 +449,9 @@ get values() { | ||
this.emit(Form.EVENT_SUBSCRIBE, item); | ||
Form.proxyEvent(item, this, Form.EVENT_CHANGED); | ||
return () => this.unsubscribe(item); | ||
} | ||
static proxyEvent(from, to, eventName) { | ||
if (from.on && to.emit) | ||
from.on(eventName, (...arg) => to.emit(eventName, ...arg)); | ||
} | ||
unsubscribe(item) { | ||
@@ -453,0 +458,0 @@ const index = this.dependencies.indexOf(item); |
{ | ||
"name": "jenesius-vue-form", | ||
"version": "2.0.18", | ||
"version": "2.0.19", | ||
"description": "Heavy form system for Vue.js", | ||
@@ -5,0 +5,0 @@ "author": "Jenesius", |
92314
2022