@ditojs/admin 2.5.0 → 2.5.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.
- package/dist/dito-admin.es.js +887 -902
- package/dist/dito-admin.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +8 -8
- package/src/mixins/SourceMixin.js +7 -1
- package/src/styles/_button.scss +2 -6
- package/src/types/DitoTypeDate.vue +6 -11
- package/src/utils/filter.js +14 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"not ie_mob > 0"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ditojs/ui": "^2.5.
|
|
36
|
+
"@ditojs/ui": "^2.5.1",
|
|
37
37
|
"@ditojs/utils": "^2.5.0",
|
|
38
38
|
"@kyvg/vue3-notification": "^2.9.0",
|
|
39
39
|
"@lk77/vue3-color": "^3.0.6",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@tiptap/extension-underline": "^2.0.3",
|
|
59
59
|
"@tiptap/pm": "^2.0.3",
|
|
60
60
|
"@tiptap/vue-3": "^2.0.3",
|
|
61
|
-
"@vueuse/integrations": "^10.
|
|
61
|
+
"@vueuse/integrations": "^10.1.2",
|
|
62
62
|
"codeflask": "^1.4.1",
|
|
63
63
|
"filesize": "^10.0.7",
|
|
64
64
|
"filesize-parser": "^1.5.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"sortablejs": "^1.15.0",
|
|
68
68
|
"tinycolor2": "^1.6.0",
|
|
69
69
|
"tippy.js": "^6.3.7",
|
|
70
|
-
"type-fest": "^3.
|
|
70
|
+
"type-fest": "^3.9.0",
|
|
71
71
|
"vue": "^3.2.47",
|
|
72
72
|
"vue-multiselect": "^3.0.0-beta.1",
|
|
73
73
|
"vue-router": "^4.1.6",
|
|
@@ -75,15 +75,15 @@
|
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@ditojs/build": "^2.5.0",
|
|
78
|
-
"@vitejs/plugin-vue": "^4.1
|
|
78
|
+
"@vitejs/plugin-vue": "^4.2.1",
|
|
79
79
|
"@vue/compiler-sfc": "^3.2.47",
|
|
80
80
|
"pug": "^3.0.2",
|
|
81
|
-
"sass": "1.62.
|
|
81
|
+
"sass": "1.62.1",
|
|
82
82
|
"typescript": "^5.0.4",
|
|
83
|
-
"vite": "^4.3.
|
|
83
|
+
"vite": "^4.3.4"
|
|
84
84
|
},
|
|
85
85
|
"types": "types",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "18658b99dbb5f508c9d76811194831fb243f66ad",
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "vite build",
|
|
89
89
|
"watch": "yarn build --mode 'development' --watch",
|
|
@@ -559,7 +559,13 @@ export default {
|
|
|
559
559
|
const inlined = isInlined(schema)
|
|
560
560
|
if (inlined && schema.resource) {
|
|
561
561
|
throw new Error(
|
|
562
|
-
|
|
562
|
+
`Nested ${
|
|
563
|
+
this.isListSource
|
|
564
|
+
? 'lists'
|
|
565
|
+
: this.isObjectSource
|
|
566
|
+
? 'objects'
|
|
567
|
+
: 'schema'
|
|
568
|
+
} cannot load data from their own resources`
|
|
563
569
|
)
|
|
564
570
|
}
|
|
565
571
|
// Use differently named url parameters on each nested level for id as
|
package/src/styles/_button.scss
CHANGED
|
@@ -191,17 +191,13 @@
|
|
|
191
191
|
cursor: pointer;
|
|
192
192
|
|
|
193
193
|
&.dito-button-clear {
|
|
194
|
-
$self: &;
|
|
195
|
-
|
|
196
194
|
width: 2em;
|
|
197
195
|
z-index: 1;
|
|
198
196
|
background: $color-white;
|
|
199
197
|
display: none;
|
|
200
198
|
|
|
201
|
-
@at-root .dito-component:hover {
|
|
202
|
-
|
|
203
|
-
display: block;
|
|
204
|
-
}
|
|
199
|
+
@at-root .dito-component:hover:not(:has(.dito-component)) & {
|
|
200
|
+
display: block;
|
|
205
201
|
}
|
|
206
202
|
|
|
207
203
|
&::before {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import DitoTypeComponent from '../DitoTypeComponent.js'
|
|
23
23
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
24
24
|
import { DatePicker, TimePicker, DateTimePicker } from '@ditojs/ui/src'
|
|
25
|
-
import { isDate } from '@ditojs/utils'
|
|
25
|
+
import { isDate, merge } from '@ditojs/utils'
|
|
26
26
|
|
|
27
27
|
export default DitoTypeComponent.register(
|
|
28
28
|
['date', 'datetime', 'time'],
|
|
@@ -53,16 +53,11 @@ export default DitoTypeComponent.register(
|
|
|
53
53
|
type: Object,
|
|
54
54
|
default: null,
|
|
55
55
|
get(formats) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
time: ['time', 'datetime'].includes(this.type)
|
|
62
|
-
? formats.time
|
|
63
|
-
: null
|
|
64
|
-
}
|
|
65
|
-
: undefined
|
|
56
|
+
const { date, time } = merge({}, this.api.formats, formats)
|
|
57
|
+
return {
|
|
58
|
+
date: ['date', 'datetime'].includes(this.type) ? date : null,
|
|
59
|
+
time: ['time', 'datetime'].includes(this.type) ? time : null
|
|
60
|
+
}
|
|
66
61
|
}
|
|
67
62
|
})
|
|
68
63
|
},
|
package/src/utils/filter.js
CHANGED
|
@@ -43,25 +43,22 @@ export const filterComponents = {
|
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
'date-range'() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
const datetime = {
|
|
47
|
+
type: 'datetime',
|
|
48
|
+
width: '1/2',
|
|
49
|
+
formats: {
|
|
50
|
+
// Use shorter date format in date-range filters:
|
|
51
|
+
date: {
|
|
52
|
+
day: '2-digit',
|
|
53
|
+
month: '2-digit',
|
|
54
|
+
year: 'numeric'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
clearable: true
|
|
51
58
|
}
|
|
52
59
|
return {
|
|
53
|
-
from:
|
|
54
|
-
|
|
55
|
-
width: '1/2',
|
|
56
|
-
dateFormat,
|
|
57
|
-
clearable: true
|
|
58
|
-
},
|
|
59
|
-
to: {
|
|
60
|
-
type: 'datetime',
|
|
61
|
-
width: '1/2',
|
|
62
|
-
dateFormat,
|
|
63
|
-
clearable: true
|
|
64
|
-
}
|
|
60
|
+
from: datetime,
|
|
61
|
+
to: datetime
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
}
|