@live-change/vue3-components 0.8.78 → 0.8.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/form/DefinedForm.vue +3 -7
- package/logic/data.js +2 -2
- package/package.json +3 -3
package/form/DefinedForm.vue
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component v-if="tag" :is="tag" v-on:submit="ev => handleSubmitEvent(ev)" :class="class" :style="style">
|
|
3
|
-
<slot v-bind="{ data }"></slot>
|
|
3
|
+
<slot v-bind="{ data, definition }"></slot>
|
|
4
4
|
</component>
|
|
5
|
-
<slot v-else v-bind="{ data }"></slot>
|
|
5
|
+
<slot v-else v-bind="{ data, definition }"></slot>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
return Promise.all(promises).then(results => {
|
|
112
112
|
for(let error of results) {
|
|
113
113
|
if(error) {
|
|
114
|
-
if(this.data[this.property+errorSufix] === error) return error
|
|
114
|
+
if(this.data[this.property + errorSufix] === error) return error
|
|
115
115
|
this.setError(error)
|
|
116
116
|
return error
|
|
117
117
|
}
|
|
@@ -190,13 +190,9 @@
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
if(this.object) {
|
|
193
|
-
console.log("PROPS RESET START", this.property)
|
|
194
193
|
for(let propName in this.properties) {
|
|
195
|
-
console.log("PROP RESET", propName, this.object[propName])
|
|
196
194
|
this.properties[propName].reset(initialValue && initialValue[propName])
|
|
197
|
-
console.log("PROP RESET", propName, this.object[propName])
|
|
198
195
|
}
|
|
199
|
-
console.log("PROPS RESET", this.object)
|
|
200
196
|
}
|
|
201
197
|
}
|
|
202
198
|
afterError(initialValue) {
|
package/logic/data.js
CHANGED
|
@@ -8,7 +8,7 @@ export function defaultData(definition, otherSrc) {
|
|
|
8
8
|
for(let name in definition.properties) {
|
|
9
9
|
result[name] = defaultData(definition.properties[name], result?.[name])
|
|
10
10
|
}
|
|
11
|
-
} else if(definition.type
|
|
11
|
+
} else if(definition.type === 'Array') {
|
|
12
12
|
result = result || []
|
|
13
13
|
for(let i = 0; i < result.length; i++) {
|
|
14
14
|
result[i] = defaultData(definition.of, result[i])
|
|
@@ -32,7 +32,7 @@ export function validateData(definition, data, validationType = 'validation',
|
|
|
32
32
|
for(const validation of validations) {
|
|
33
33
|
const validator = typeof validation == 'string'
|
|
34
34
|
? validators[validation]({}, validationContext)
|
|
35
|
-
: validators[validation.name](validation
|
|
35
|
+
: validators[validation.name](validation, validationContext)
|
|
36
36
|
if(!validator) throw new Error(`Validator ${validation.name || validation} not found`)
|
|
37
37
|
const error = validator(data, context)
|
|
38
38
|
if(error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/vue3-components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.79",
|
|
4
4
|
"description": "Live Change Framework - vue components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
24
|
+
"@live-change/vue3-ssr": "^0.8.79",
|
|
25
25
|
"debug": "^4.3.4",
|
|
26
26
|
"mitt": "3.0.1",
|
|
27
27
|
"vue": "^3.4.29"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "35dc736fb78a7ce3c6bb380ee8a99ce07b79d4de"
|
|
30
30
|
}
|