@ditojs/admin 2.22.0 → 2.23.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 +16 -7
- package/dist/dito-admin.umd.js +2 -2
- package/package.json +32 -32
- package/src/components/DitoSchema.vue +12 -6
- package/src/utils/schema.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.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,57 +33,57 @@
|
|
|
33
33
|
"not ie_mob > 0"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ditojs/ui": "^2.
|
|
37
|
-
"@ditojs/utils": "^2.
|
|
38
|
-
"@kyvg/vue3-notification": "^3.1.
|
|
36
|
+
"@ditojs/ui": "^2.23.0",
|
|
37
|
+
"@ditojs/utils": "^2.23.0",
|
|
38
|
+
"@kyvg/vue3-notification": "^3.1.4",
|
|
39
39
|
"@lk77/vue3-color": "^3.0.6",
|
|
40
|
-
"@tiptap/core": "^2.
|
|
41
|
-
"@tiptap/extension-blockquote": "^2.
|
|
42
|
-
"@tiptap/extension-bold": "^2.
|
|
43
|
-
"@tiptap/extension-bullet-list": "^2.
|
|
44
|
-
"@tiptap/extension-code": "^2.
|
|
45
|
-
"@tiptap/extension-code-block": "^2.
|
|
46
|
-
"@tiptap/extension-document": "^2.
|
|
47
|
-
"@tiptap/extension-hard-break": "^2.
|
|
48
|
-
"@tiptap/extension-heading": "^2.
|
|
49
|
-
"@tiptap/extension-history": "^2.
|
|
50
|
-
"@tiptap/extension-horizontal-rule": "^2.
|
|
51
|
-
"@tiptap/extension-italic": "^2.
|
|
52
|
-
"@tiptap/extension-link": "^2.
|
|
53
|
-
"@tiptap/extension-list-item": "^2.
|
|
54
|
-
"@tiptap/extension-ordered-list": "^2.
|
|
55
|
-
"@tiptap/extension-paragraph": "^2.
|
|
56
|
-
"@tiptap/extension-strike": "^2.
|
|
57
|
-
"@tiptap/extension-text": "^2.
|
|
58
|
-
"@tiptap/extension-underline": "^2.
|
|
59
|
-
"@tiptap/pm": "^2.
|
|
60
|
-
"@tiptap/vue-3": "^2.
|
|
40
|
+
"@tiptap/core": "^2.2.2",
|
|
41
|
+
"@tiptap/extension-blockquote": "^2.2.2",
|
|
42
|
+
"@tiptap/extension-bold": "^2.2.2",
|
|
43
|
+
"@tiptap/extension-bullet-list": "^2.2.2",
|
|
44
|
+
"@tiptap/extension-code": "^2.2.2",
|
|
45
|
+
"@tiptap/extension-code-block": "^2.2.2",
|
|
46
|
+
"@tiptap/extension-document": "^2.2.2",
|
|
47
|
+
"@tiptap/extension-hard-break": "^2.2.2",
|
|
48
|
+
"@tiptap/extension-heading": "^2.2.2",
|
|
49
|
+
"@tiptap/extension-history": "^2.2.2",
|
|
50
|
+
"@tiptap/extension-horizontal-rule": "^2.2.2",
|
|
51
|
+
"@tiptap/extension-italic": "^2.2.2",
|
|
52
|
+
"@tiptap/extension-link": "^2.2.2",
|
|
53
|
+
"@tiptap/extension-list-item": "^2.2.2",
|
|
54
|
+
"@tiptap/extension-ordered-list": "^2.2.2",
|
|
55
|
+
"@tiptap/extension-paragraph": "^2.2.2",
|
|
56
|
+
"@tiptap/extension-strike": "^2.2.2",
|
|
57
|
+
"@tiptap/extension-text": "^2.2.2",
|
|
58
|
+
"@tiptap/extension-underline": "^2.2.2",
|
|
59
|
+
"@tiptap/pm": "^2.2.2",
|
|
60
|
+
"@tiptap/vue-3": "^2.2.2",
|
|
61
61
|
"@vueuse/integrations": "^10.7.2",
|
|
62
62
|
"codeflask": "^1.4.1",
|
|
63
63
|
"filesize": "^10.1.0",
|
|
64
64
|
"filesize-parser": "^1.5.0",
|
|
65
65
|
"focus-trap": "^7.5.4",
|
|
66
|
-
"nanoid": "^5.0.
|
|
66
|
+
"nanoid": "^5.0.5",
|
|
67
67
|
"sortablejs": "^1.15.2",
|
|
68
68
|
"tinycolor2": "^1.6.0",
|
|
69
69
|
"tippy.js": "^6.3.7",
|
|
70
70
|
"type-fest": "^4.9.0",
|
|
71
|
-
"vue": "
|
|
71
|
+
"vue": "3.4.10",
|
|
72
72
|
"vue-multiselect": "^3.0.0-beta.3",
|
|
73
73
|
"vue-router": "^4.2.5",
|
|
74
74
|
"vue-upload-component": "^3.1.8"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@ditojs/build": "^2.
|
|
77
|
+
"@ditojs/build": "^2.23.0",
|
|
78
78
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
79
|
-
"@vue/compiler-sfc": "
|
|
79
|
+
"@vue/compiler-sfc": "3.4.10",
|
|
80
80
|
"pug": "^3.0.2",
|
|
81
|
-
"sass": "1.
|
|
81
|
+
"sass": "1.70.0",
|
|
82
82
|
"typescript": "^5.3.3",
|
|
83
|
-
"vite": "^5.0
|
|
83
|
+
"vite": "^5.1.0"
|
|
84
84
|
},
|
|
85
85
|
"types": "types",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "b8107fef5ba48a03511d0d0b3e9c77954ee17fcf",
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "vite build",
|
|
89
89
|
"watch": "yarn build --mode 'development' --watch",
|
|
@@ -166,7 +166,7 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
166
166
|
? data(this.context)
|
|
167
167
|
: data
|
|
168
168
|
),
|
|
169
|
-
|
|
169
|
+
currentTab: null,
|
|
170
170
|
componentsRegistry: {},
|
|
171
171
|
panesRegistry: {},
|
|
172
172
|
panelsRegistry: {},
|
|
@@ -195,6 +195,16 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
195
195
|
return getNamedSchemas(this.schema.tabs)
|
|
196
196
|
},
|
|
197
197
|
|
|
198
|
+
selectedTab: {
|
|
199
|
+
get() {
|
|
200
|
+
return this.currentTab || this.defaultTab || null
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
set(selectedTab) {
|
|
204
|
+
this.currentTab = selectedTab
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
|
|
198
208
|
defaultTab() {
|
|
199
209
|
let first = null
|
|
200
210
|
if (this.tabs) {
|
|
@@ -366,7 +376,7 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
366
376
|
// handled, but remove the trailing `/create` or `/:id` from it so that
|
|
367
377
|
// tabs informs that stay open after creation still work.
|
|
368
378
|
if (this.hasRootTabs) {
|
|
369
|
-
this.
|
|
379
|
+
this.currentTab = hash?.slice(1) || null
|
|
370
380
|
}
|
|
371
381
|
}
|
|
372
382
|
},
|
|
@@ -402,10 +412,6 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
402
412
|
}
|
|
403
413
|
},
|
|
404
414
|
|
|
405
|
-
mounted() {
|
|
406
|
-
this.selectedTab = this.defaultTab
|
|
407
|
-
},
|
|
408
|
-
|
|
409
415
|
unmounted() {
|
|
410
416
|
this.emitEvent('destroy')
|
|
411
417
|
this._register(false)
|
package/src/utils/schema.js
CHANGED
|
@@ -616,7 +616,9 @@ export function getDefaultValue(schema) {
|
|
|
616
616
|
? defaultValue
|
|
617
617
|
: getTypeOptions(schema)?.defaultValue
|
|
618
618
|
return isFunction(value)
|
|
619
|
-
?
|
|
619
|
+
? // TODO: Pass `DitoContext` here too, with the (incomplete) item and al
|
|
620
|
+
// the other bits!
|
|
621
|
+
value(schema)
|
|
620
622
|
: clone(value)
|
|
621
623
|
}
|
|
622
624
|
|