@ditojs/admin 1.7.0 → 1.9.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 +8077 -5
- package/dist/dito-admin.umd.js +5 -5
- package/package.json +13 -13
- package/src/components/DitoDialog.vue +11 -16
- package/src/types/TypeLabel.vue +1 -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": "1.
|
|
3
|
+
"version": "1.9.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",
|
|
@@ -35,35 +35,35 @@
|
|
|
35
35
|
"not ie_mob > 0"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ditojs/ui": "^1.
|
|
39
|
-
"@ditojs/utils": "^1.
|
|
38
|
+
"@ditojs/ui": "^1.9.1",
|
|
39
|
+
"@ditojs/utils": "^1.9.0",
|
|
40
40
|
"axios": "^0.27.2",
|
|
41
41
|
"codeflask": "^1.4.1",
|
|
42
|
-
"filesize": "^
|
|
42
|
+
"filesize": "^9.0.11",
|
|
43
43
|
"filesize-parser": "^1.5.0",
|
|
44
|
-
"nanoid": "^
|
|
44
|
+
"nanoid": "^4.0.0",
|
|
45
45
|
"tinycolor2": "^1.4.2",
|
|
46
46
|
"tiptap": "^1.32.2",
|
|
47
47
|
"tiptap-commands": "^1.17.1",
|
|
48
48
|
"tiptap-extensions": "^1.35.2",
|
|
49
49
|
"to-pascal-case": "^1.0.0",
|
|
50
|
-
"vue": "^2.
|
|
50
|
+
"vue": "^2.7.8",
|
|
51
51
|
"vue-color": "^2.8.1",
|
|
52
52
|
"vue-js-modal": "^1.3.35",
|
|
53
53
|
"vue-multiselect": "^2.1.6",
|
|
54
54
|
"vue-notification": "^1.3.20",
|
|
55
|
-
"vue-router": "^3.5.
|
|
55
|
+
"vue-router": "^3.5.4",
|
|
56
56
|
"vue-spinner": "^1.0.4",
|
|
57
|
-
"vue-template-compiler": "^2.
|
|
57
|
+
"vue-template-compiler": "^2.7.8",
|
|
58
58
|
"vue-upload-component": "^2.8.22",
|
|
59
59
|
"vuedraggable": "^2.24.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@ditojs/build": "^1.
|
|
62
|
+
"@ditojs/build": "^1.8.0",
|
|
63
63
|
"pug": "^3.0.2",
|
|
64
|
-
"sass": "1.
|
|
65
|
-
"vite": "^
|
|
66
|
-
"vite-plugin-vue2": "^2.0.
|
|
64
|
+
"sass": "1.53.0",
|
|
65
|
+
"vite": "^3.0.2",
|
|
66
|
+
"vite-plugin-vue2": "^2.0.2"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "36ad7c74fedaf7ea7c94eb5bb7ecb4b2dca3a0ba"
|
|
69
69
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
form.dito-dialog(@submit.prevent="")
|
|
2
|
+
form.dito-dialog(@submit.prevent="submit")
|
|
3
3
|
dito-schema.dito-scroll(
|
|
4
4
|
:schema="schema"
|
|
5
5
|
:data="dialogData"
|
|
@@ -71,15 +71,12 @@ export default DitoComponent.component('dito-dialog', {
|
|
|
71
71
|
// Process the button schemas to add default click events
|
|
72
72
|
// for both 'submit' and 'cancel' buttons:
|
|
73
73
|
(schemas, [key, schema]) => {
|
|
74
|
-
const {
|
|
75
|
-
if (!events) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:
|
|
79
|
-
|
|
80
|
-
schema = {
|
|
81
|
-
...schema,
|
|
82
|
-
events: { click }
|
|
74
|
+
const { events } = schema
|
|
75
|
+
if (key === 'cancel' && !events) {
|
|
76
|
+
schema = {
|
|
77
|
+
...schema,
|
|
78
|
+
events: {
|
|
79
|
+
click: () => this.cancel()
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
}
|
|
@@ -91,14 +88,14 @@ export default DitoComponent.component('dito-dialog', {
|
|
|
91
88
|
},
|
|
92
89
|
|
|
93
90
|
hasCancel() {
|
|
94
|
-
return
|
|
91
|
+
return !!this.buttonSchemas.cancel
|
|
95
92
|
}
|
|
96
93
|
},
|
|
97
94
|
|
|
98
95
|
mounted() {
|
|
99
96
|
this.windowEvents = addEvents(window, {
|
|
100
97
|
keyup: () => {
|
|
101
|
-
if (event.keyCode === 27) {
|
|
98
|
+
if (this.hasCancel && event.keyCode === 27) {
|
|
102
99
|
this.cancel()
|
|
103
100
|
}
|
|
104
101
|
}
|
|
@@ -124,14 +121,12 @@ export default DitoComponent.component('dito-dialog', {
|
|
|
124
121
|
this.hide()
|
|
125
122
|
},
|
|
126
123
|
|
|
127
|
-
|
|
124
|
+
submit() {
|
|
128
125
|
this.resolve(this.dialogData)
|
|
129
126
|
},
|
|
130
127
|
|
|
131
128
|
cancel() {
|
|
132
|
-
|
|
133
|
-
this.resolve(null)
|
|
134
|
-
}
|
|
129
|
+
this.resolve(null)
|
|
135
130
|
}
|
|
136
131
|
}
|
|
137
132
|
})
|
package/src/types/TypeLabel.vue
CHANGED
package/src/utils/schema.js
CHANGED