@live-change/vue3-components 0.9.204 → 0.9.206

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.
Files changed (2) hide show
  1. package/logic/data.js +13 -0
  2. package/package.json +3 -3
package/logic/data.js CHANGED
@@ -40,6 +40,19 @@ export function validateData(definition, data, validationType = 'validation',
40
40
  const validators = context.config.globalProperties.$validators
41
41
  const validationContext = { source: data, props, propName, definition, validators }
42
42
  if(!definition) return undefined
43
+ if(definition.if) {
44
+ if(definition.if.function) {
45
+ const condition = eval(`(${definition.if.function})`)
46
+ const visible = condition({
47
+ source: definition,
48
+ props,
49
+ propName
50
+ })
51
+ if(!visible) return undefined
52
+ } else {
53
+ throw new Error('Unknown if type ' + JSON.stringify(definition.if))
54
+ }
55
+ }
43
56
  const validations = definition[validationType]
44
57
  //console.log("VALIDATIONS!", validations)
45
58
  if(validations) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/vue3-components",
3
- "version": "0.9.204",
3
+ "version": "0.9.206",
4
4
  "description": "Live Change Framework - vue components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "homepage": "https://github.com/live-change/live-change-stack",
23
23
  "dependencies": {
24
- "@live-change/vue3-ssr": "^0.9.204",
24
+ "@live-change/vue3-ssr": "^0.9.206",
25
25
  "@vueuse/core": "^12.3.0",
26
26
  "debug": "^4.3.4",
27
27
  "mitt": "3.0.1",
28
28
  "vue": "^3.5.12",
29
29
  "vue3-scroll-border": "0.1.7"
30
30
  },
31
- "gitHead": "6ac17ccf3c184ca4d7ef920f63827dbfd8749f96"
31
+ "gitHead": "550ec614c03ed33fbb8a094d23a63dd2d20d5de3"
32
32
  }