@live-change/vue3-components 0.8.66 → 0.8.67

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.
@@ -22,8 +22,18 @@
22
22
  this.validators = []
23
23
  this.barriers = []
24
24
 
25
- if(definition.validation) {
26
- let validations = Array.isArray(definition.validation) ? definition.validation : [definition.validation]
25
+ const validations = [
26
+ ...(definition.validation ? (
27
+ Array.isArray(definition.validation) ? definition.validation : [definition.validation])
28
+ : []
29
+ ),
30
+ ...(definition.softValidation ? (
31
+ Array.isArray(definition.softValidation) ? definition.softValidation : [definition.softValidation])
32
+ : []
33
+ )
34
+ ]
35
+
36
+ if(validations.length > 0) {
27
37
  const context = {
28
38
  service: this.serviceDefinition,
29
39
  action: this.actionDefinition,
@@ -1,4 +1,4 @@
1
- import { computed, ref, watch } from "vue"
1
+ import { computed, ref, watch, unref } from "vue"
2
2
  import { useThrottleFn, useDebounceFn } from "@vueuse/core"
3
3
 
4
4
  function copy(value) {
@@ -57,7 +57,7 @@ function synchronized(options) {
57
57
  // console.log("SOURCE JSON", JSON.stringify(source.value))
58
58
  // console.log("SYNCHRONIZED JSON", JSON.stringify(synchronizedValue.value))
59
59
  try {
60
- await update({ ...data, [timeField]: lastLocalUpdate.value, ...identifiers })
60
+ await update({ ...data, [timeField]: lastLocalUpdate.value, ...unref(identifiers) })
61
61
  try { onSave() } catch(e) { console.error("ON SAVE HANDLER ERROR", e) }
62
62
  } catch(e) {
63
63
  if(resetOnError) synchronizedValue.value = copy(source.value)
@@ -103,7 +103,7 @@ function synchronized(options) {
103
103
  <= ((source.value && source.value[timeField]) ?? ''))) return false // identical, no need to save
104
104
  const data = JSON.parse(JSON.stringify(local.value))
105
105
  try {
106
- await update({...data, ...identifiers})
106
+ await update({...data, ...unref(identifiers)})
107
107
  try { onSave() } catch(e) { console.error("ON SAVE HANDLER ERROR", e) }
108
108
  } catch(e) {
109
109
  if(resetOnError) synchronizedValue.value = source.value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/vue3-components",
3
- "version": "0.8.66",
3
+ "version": "0.8.67",
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.66",
24
+ "@live-change/vue3-ssr": "^0.8.67",
25
25
  "debug": "^4.3.4",
26
26
  "mitt": "3.0.1",
27
27
  "vue": "^3.4.29"
28
28
  },
29
- "gitHead": "33fa71ec087690903b109e2c0a2cf1de886449f7"
29
+ "gitHead": "ff74842a56f547052f0a5af26788475ca8f064e4"
30
30
  }