@ditojs/admin 2.67.0 → 2.68.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.
|
|
3
|
+
"version": "2.68.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.
|
|
46
|
-
"@ditojs/utils": "^2.
|
|
45
|
+
"@ditojs/ui": "^2.68.0",
|
|
46
|
+
"@ditojs/utils": "^2.68.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.
|
|
92
|
+
"@ditojs/build": "^2.68.0",
|
|
93
93
|
"typescript": "^5.9.3",
|
|
94
94
|
"vite": "^7.2.6"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "8dbd4ce3ff84d83e8e4ebd8e90772ae51b25b8ce"
|
|
97
97
|
}
|
package/src/DitoTypeComponent.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import DitoContext from '../DitoContext.js'
|
|
2
2
|
import DataMixin from './DataMixin.js'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
hasViewSchema,
|
|
5
|
+
getViewEditPath,
|
|
6
|
+
getMultipleValue
|
|
7
|
+
} from '../utils/schema.js'
|
|
4
8
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
5
9
|
import { setTemporaryId, isReference } from '../utils/data.js'
|
|
6
10
|
import {
|
|
@@ -20,7 +24,7 @@ export default {
|
|
|
20
24
|
computed: {
|
|
21
25
|
// @overridable
|
|
22
26
|
multiple() {
|
|
23
|
-
return
|
|
27
|
+
return getMultipleValue(this.schema)
|
|
24
28
|
},
|
|
25
29
|
|
|
26
30
|
selectedValue: {
|
|
@@ -281,7 +285,7 @@ export default {
|
|
|
281
285
|
const processRelate = value => (value ? { id: value.id } : value)
|
|
282
286
|
// Selected options can be both objects & arrays, e.g. 'checkboxes':
|
|
283
287
|
value =
|
|
284
|
-
|
|
288
|
+
getMultipleValue(schema) && isArray(value)
|
|
285
289
|
? value.map(processRelate)
|
|
286
290
|
: processRelate(value)
|
|
287
291
|
}
|
package/src/utils/schema.js
CHANGED
|
@@ -670,6 +670,10 @@ export function shouldIgnoreMissingValue(schema, context) {
|
|
|
670
670
|
return !!getTypeOptions(schema)?.ignoreMissingValue?.(getContext(context))
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
+
export function getMultipleValue(schema) {
|
|
674
|
+
return schema.multiple ?? !!getTypeOptions(schema)?.defaultMultiple
|
|
675
|
+
}
|
|
676
|
+
|
|
673
677
|
export function setDefaultValues(schema, data = {}, component) {
|
|
674
678
|
const options = { component, rootData: data }
|
|
675
679
|
|