@ditojs/admin 2.96.0 → 2.98.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/dist/dito-admin.es.js +1350 -1350
- package/dist/dito-admin.umd.js +2 -2
- package/package.json +5 -5
- package/src/DitoContext.js +1 -1
- package/src/mixins/ItemMixin.js +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.98.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/main/packages/admin",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"not ie_mob > 0"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@ditojs/ui": "^2.
|
|
44
|
-
"@ditojs/utils": "^2.
|
|
43
|
+
"@ditojs/ui": "^2.98.0",
|
|
44
|
+
"@ditojs/utils": "^2.98.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@kyvg/vue3-notification": "^3.4.2",
|
|
@@ -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.98.0",
|
|
93
93
|
"typescript": "^6.0.3",
|
|
94
94
|
"vite": "^8.0.10"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "70d0c1d3aa16844959e3c06d71d8253f21abad3f"
|
|
97
97
|
}
|
package/src/DitoContext.js
CHANGED
|
@@ -24,7 +24,7 @@ const contexts = new WeakMap()
|
|
|
24
24
|
function toObject(context) {
|
|
25
25
|
const rawStart = toRaw(context)
|
|
26
26
|
let raw = rawStart
|
|
27
|
-
let object
|
|
27
|
+
let object
|
|
28
28
|
// In case `DitoContext.extend()` was used, we need to find the actual context
|
|
29
29
|
// object from the object's the inheritance chain:
|
|
30
30
|
do {
|
package/src/mixins/ItemMixin.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
isListSource
|
|
7
7
|
} from '../utils/schema.js'
|
|
8
8
|
import { appendDataPath } from '../utils/data.js'
|
|
9
|
-
import { isObject, isString, isFunction } from '@ditojs/utils'
|
|
9
|
+
import { isObject, isString, isNumber, isFunction } from '@ditojs/utils'
|
|
10
10
|
|
|
11
11
|
// @vue/component
|
|
12
12
|
export default {
|
|
@@ -114,7 +114,10 @@ export default {
|
|
|
114
114
|
isListSource(sourceSchema) && columns && Object.keys(columns)[0] ||
|
|
115
115
|
'name'
|
|
116
116
|
)
|
|
117
|
-
|
|
117
|
+
const value = item[key]
|
|
118
|
+
// Only primitives display as a label. If the property holds an array
|
|
119
|
+
// or object, fall through to the auto-generated label.
|
|
120
|
+
text = isString(value) || isNumber(value) ? value : null
|
|
118
121
|
}
|
|
119
122
|
const hadLabel = !!text
|
|
120
123
|
// If no label was found so far, try to produce one from the index.
|
|
@@ -122,9 +125,7 @@ export default {
|
|
|
122
125
|
// Always use extended style when auto-generating labels from index/id:
|
|
123
126
|
extended = true
|
|
124
127
|
text =
|
|
125
|
-
isListSource(sourceSchema) && index !== null
|
|
126
|
-
? (text = `${index + 1}`)
|
|
127
|
-
: ''
|
|
128
|
+
isListSource(sourceSchema) && index !== null ? `${index + 1}` : ''
|
|
128
129
|
}
|
|
129
130
|
if (extended) {
|
|
130
131
|
const formLabel = getFormLabel()
|