@ditojs/admin 2.21.0 → 2.23.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 +149 -147
- package/dist/dito-admin.umd.js +2 -2
- package/package.json +35 -35
- package/src/components/DitoSchema.vue +6 -12
- package/src/mixins/TypeMixin.js +5 -0
- 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.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",
|
|
@@ -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.
|
|
61
|
-
"@vueuse/integrations": "^10.7.
|
|
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
|
+
"@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.
|
|
67
|
-
"sortablejs": "^1.15.
|
|
66
|
+
"nanoid": "^5.0.5",
|
|
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.
|
|
78
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
79
|
-
"@vue/compiler-sfc": "
|
|
77
|
+
"@ditojs/build": "^2.23.0",
|
|
78
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
|
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": "6aee1fd0e7569c8eb21f46138012c532b9ac8db7",
|
|
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
|
+
selectedTab: null,
|
|
170
170
|
componentsRegistry: {},
|
|
171
171
|
panesRegistry: {},
|
|
172
172
|
panelsRegistry: {},
|
|
@@ -195,16 +195,6 @@ 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
|
-
|
|
208
198
|
defaultTab() {
|
|
209
199
|
let first = null
|
|
210
200
|
if (this.tabs) {
|
|
@@ -376,7 +366,7 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
376
366
|
// handled, but remove the trailing `/create` or `/:id` from it so that
|
|
377
367
|
// tabs informs that stay open after creation still work.
|
|
378
368
|
if (this.hasRootTabs) {
|
|
379
|
-
this.
|
|
369
|
+
this.selectedTab = hash?.slice(1) || null
|
|
380
370
|
}
|
|
381
371
|
}
|
|
382
372
|
},
|
|
@@ -412,6 +402,10 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
412
402
|
}
|
|
413
403
|
},
|
|
414
404
|
|
|
405
|
+
mounted() {
|
|
406
|
+
this.selectedTab = this.defaultTab
|
|
407
|
+
},
|
|
408
|
+
|
|
415
409
|
unmounted() {
|
|
416
410
|
this.emitEvent('destroy')
|
|
417
411
|
this._register(false)
|
package/src/mixins/TypeMixin.js
CHANGED
|
@@ -151,6 +151,10 @@ export default {
|
|
|
151
151
|
}
|
|
152
152
|
}),
|
|
153
153
|
|
|
154
|
+
maxLength: getSchemaAccessor('maxLength', {
|
|
155
|
+
type: Number
|
|
156
|
+
}),
|
|
157
|
+
|
|
154
158
|
placeholder: getSchemaAccessor('placeholder', {
|
|
155
159
|
type: String
|
|
156
160
|
}),
|
|
@@ -189,6 +193,7 @@ export default {
|
|
|
189
193
|
attributes.readonly = this.readonly
|
|
190
194
|
attributes.autofocus = this.autofocus
|
|
191
195
|
if (textField) {
|
|
196
|
+
attributes.maxlength = this.maxLength
|
|
192
197
|
attributes.placeholder = this.placeholder
|
|
193
198
|
attributes.autocomplete = this.autocomplete
|
|
194
199
|
}
|
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
|
|