@ditojs/admin 2.35.0 → 2.36.1

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.
@@ -0,0 +1,32 @@
1
+ import DitoContext from '../DitoContext.js'
2
+ import { computeValue } from '../utils/schema.js'
3
+
4
+ export default {
5
+ computed: {
6
+ value: {
7
+ get() {
8
+ const value = computeValue(
9
+ this.schema,
10
+ this.data,
11
+ this.name,
12
+ this.dataPath,
13
+ { component: this }
14
+ )
15
+ const { format } = this.schema
16
+ return format
17
+ ? format(new DitoContext(this, { value }))
18
+ : value
19
+ },
20
+
21
+ set(value) {
22
+ const { parse } = this.schema
23
+ if (parse) {
24
+ value = parse(new DitoContext(this, { value }))
25
+ }
26
+ this.parsedValue = value
27
+ // eslint-disable-next-line vue/no-mutating-props
28
+ this.data[this.name] = value
29
+ }
30
+ }
31
+ }
32
+ }
@@ -14,7 +14,7 @@ input.dito-text.dito-input(
14
14
 
15
15
  <script>
16
16
  import DitoTypeComponent from '../DitoTypeComponent.js'
17
- import TypeMixin from '../mixins/TypeMixin.js'
17
+ import ValueMixin from '../mixins/ValueMixin.js'
18
18
  import DataMixin from '../mixins/DataMixin.js'
19
19
 
20
20
  export default DitoTypeComponent.register(
@@ -37,11 +37,11 @@ export default DitoTypeComponent.register(
37
37
  // eslint-disable-next-line vue/no-side-effects-in-computed-properties
38
38
  this.data[this.name] = value
39
39
  }
40
- return TypeMixin.computed.value.get.call(this)
40
+ return ValueMixin.computed.value.get.call(this)
41
41
  },
42
42
 
43
43
  set(value) {
44
- TypeMixin.computed.value.set.call(this, value)
44
+ ValueMixin.computed.value.set.call(this, value)
45
45
  }
46
46
  }
47
47
  }
@@ -132,6 +132,7 @@
132
132
  :data="listData"
133
133
  :meta="meta"
134
134
  :store="store"
135
+ :nested="nested"
135
136
  :disabled="disabled || isLoading"
136
137
  :creatable="creatable"
137
138
  :createPath="path"