@live-change/vue3-components 0.8.27 → 0.8.29

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.
@@ -11,7 +11,7 @@
11
11
  :class="class"
12
12
  :style="style"
13
13
  v-slot="{ data }">
14
- <slot v-bind="{ data, submit }"></slot>
14
+ <slot v-bind="{ data, submit, definition: actionDefinition }"></slot>
15
15
  </defined-form>
16
16
  <slot v-if="state === 'error'" name="error">
17
17
  <div class="alert alert-danger" role="alert">error</div>
@@ -165,19 +165,28 @@
165
165
 
166
166
  reset(initialValue) {
167
167
  if(this.definition.type === 'Object') {
168
- this.data[this.property] = JSON.parse(JSON.stringify(initialValue ||
169
- (this.definition.hasOwnProperty('defaultValue') ? this.definition.defaultValue : {} )))
168
+ this.data[this.property] = JSON.parse(JSON.stringify(initialValue
169
+ || (this.definition.hasOwnProperty('defaultValue') ? this.definition.defaultValue : {} )
170
+ || (this.definition.hasOwnProperty('default') ? this.definition.default : {} )
171
+ ))
170
172
  this.object = this.data[this.property]
171
173
  if(this.object) {
172
174
  for(const key in this.object) {
173
175
  if(!this.object[key]) delete this.object[key]
174
176
  }
175
177
  }
178
+ for(let propName in this.properties) {
179
+ this.properties[propName].data = this.object
180
+ }
176
181
  }
177
182
  if(this.object) {
183
+ console.log("PROPS RESET START", this.property)
178
184
  for(let propName in this.properties) {
185
+ console.log("PROP RESET", propName, this.object[propName])
179
186
  this.properties[propName].reset(initialValue && initialValue[propName])
187
+ console.log("PROP RESET", propName, this.object[propName])
180
188
  }
189
+ console.log("PROPS RESET", this.object)
181
190
  }
182
191
  }
183
192
  afterError(initialValue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/vue3-components",
3
- "version": "0.8.27",
3
+ "version": "0.8.29",
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.27",
24
+ "@live-change/vue3-ssr": "^0.8.29",
25
25
  "debug": "^4.3.4",
26
26
  "mitt": "3.0.1",
27
27
  "vue": "^3.4.19"
28
28
  },
29
- "gitHead": "9a84f91121fb5fc2c9fd2acb9a7e5a0a952d611e"
29
+ "gitHead": "9bc23973964b33f2e837db9fbf8dfb51916752a8"
30
30
  }