@ditojs/admin 2.66.0 → 2.67.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/admin",
3
- "version": "2.66.0",
3
+ "version": "2.67.0",
4
4
  "type": "module",
5
5
  "description": "Dito.js Admin is a schema based admin interface for Dito.js Server, featuring auto-generated views and forms and built with Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/admin",
@@ -42,8 +42,8 @@
42
42
  "not ie_mob > 0"
43
43
  ],
44
44
  "dependencies": {
45
- "@ditojs/ui": "^2.66.0",
46
- "@ditojs/utils": "^2.66.0",
45
+ "@ditojs/ui": "^2.67.0",
46
+ "@ditojs/utils": "^2.67.0",
47
47
  "@kyvg/vue3-notification": "^3.4.2",
48
48
  "@lk77/vue3-color": "^3.0.6",
49
49
  "@tiptap/core": "^3.13.0",
@@ -89,9 +89,9 @@
89
89
  "vue-upload-component": "^3.1.17"
90
90
  },
91
91
  "devDependencies": {
92
- "@ditojs/build": "^2.66.0",
92
+ "@ditojs/build": "^2.67.0",
93
93
  "typescript": "^5.9.3",
94
94
  "vite": "^7.2.6"
95
95
  },
96
- "gitHead": "f4c1f6cf632c396e160a701d90fbcafe0cdf8478"
96
+ "gitHead": "893f5c0dc46ab7a84a2161a3635405dceb650dad"
97
97
  }
@@ -18,6 +18,11 @@ export default {
18
18
  mixins: [DataMixin],
19
19
 
20
20
  computed: {
21
+ // @overridable
22
+ multiple() {
23
+ return false
24
+ },
25
+
21
26
  selectedValue: {
22
27
  get() {
23
28
  const convertValue = value => {
@@ -33,7 +38,7 @@ export default {
33
38
  }
34
39
 
35
40
  const value =
36
- this.relate && isArray(this.value)
41
+ this.multiple && isArray(this.value)
37
42
  ? this.value.map(convertValue).filter(value => value !== null)
38
43
  : convertValue(this.value)
39
44
 
@@ -61,7 +66,7 @@ export default {
61
66
  : value
62
67
 
63
68
  this.value =
64
- this.relate && isArray(value)
69
+ this.multiple && isArray(value)
65
70
  ? value.map(convertValue)
66
71
  : convertValue(value)
67
72
  }
@@ -275,9 +280,10 @@ export default {
275
280
  // TODO: Convert to using `relateBy`:
276
281
  const processRelate = value => (value ? { id: value.id } : value)
277
282
  // Selected options can be both objects & arrays, e.g. 'checkboxes':
278
- value = isArray(value)
279
- ? value.map(processRelate)
280
- : processRelate(value)
283
+ value =
284
+ this.multiple && isArray(value)
285
+ ? value.map(processRelate)
286
+ : processRelate(value)
281
287
  }
282
288
  return value
283
289
  }
@@ -31,6 +31,11 @@ export default DitoTypeComponent.register('checkboxes', {
31
31
  defaultWidth: 'auto',
32
32
 
33
33
  computed: {
34
+ // @override
35
+ multiple() {
36
+ return true
37
+ },
38
+
34
39
  selectedOptions: {
35
40
  get() {
36
41
  return (this.selectedValue || []).filter(value => value)
@@ -104,6 +104,7 @@ export default DitoTypeComponent.register('multiselect', {
104
104
  return this.searchedOptions || this.options
105
105
  },
106
106
 
107
+ // @override
107
108
  multiple: getSchemaAccessor('multiple', {
108
109
  type: Boolean,
109
110
  default: false