@ditojs/admin 0.270.0 → 0.273.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.common.js +3001 -693
- package/dist/dito-admin.common.js.map +1 -1
- package/dist/dito-admin.umd.js +3001 -693
- package/dist/dito-admin.umd.js.map +1 -1
- package/dist/dito-admin.umd.min.js +2 -2
- package/dist/dito-admin.umd.min.js.map +1 -1
- package/package.json +18 -19
- package/src/components/DitoForm.vue +9 -0
- package/src/components/DitoRoot.vue +12 -3
- package/src/components/DitoTableHead.vue +1 -0
- package/src/mixins/ResourceMixin.js +2 -2
- package/src/types/TypeColor.vue +1 -0
- package/src/types/TypeList.vue +1 -0
- package/src/types/TypeMultiselect.vue +1 -0
- package/src/types/TypeUpload.vue +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.273.0",
|
|
4
4
|
"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",
|
|
5
5
|
"main": "dist/dito-admin.umd.min.js",
|
|
6
6
|
"repository": "https://github.com/ditojs/dito/tree/master/packages/admin",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/runtime": "^7.
|
|
37
|
-
"@ditojs/ui": "^0.
|
|
38
|
-
"@ditojs/utils": "^0.
|
|
39
|
-
"axios": "^0.
|
|
36
|
+
"@babel/runtime": "^7.17.2",
|
|
37
|
+
"@ditojs/ui": "^0.273.0",
|
|
38
|
+
"@ditojs/utils": "^0.273.0",
|
|
39
|
+
"axios": "^0.26.0",
|
|
40
40
|
"codeflask": "^1.4.1",
|
|
41
|
-
"core-js": "^3.
|
|
42
|
-
"filesize": "^8.0.
|
|
41
|
+
"core-js": "^3.21.1",
|
|
42
|
+
"filesize": "^8.0.7",
|
|
43
43
|
"filesize-parser": "^1.5.0",
|
|
44
|
-
"nanoid": "^3.1
|
|
44
|
+
"nanoid": "^3.3.1",
|
|
45
45
|
"postcss-inset": "^1.0.0",
|
|
46
46
|
"tinycolor2": "^1.4.2",
|
|
47
47
|
"tiptap": "^1.32.2",
|
|
@@ -53,29 +53,28 @@
|
|
|
53
53
|
"vue-js-modal": "^1.3.35",
|
|
54
54
|
"vue-multiselect": "^2.1.6",
|
|
55
55
|
"vue-notification": "^1.3.20",
|
|
56
|
-
"vue-router": "^3.5.
|
|
56
|
+
"vue-router": "^3.5.3",
|
|
57
57
|
"vue-spinner": "^1.0.4",
|
|
58
58
|
"vue-template-compiler": "^2.6.14",
|
|
59
59
|
"vue-upload-component": "^2.8.22",
|
|
60
60
|
"vuedraggable": "^2.24.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@babel/core": "^7.
|
|
64
|
-
"@babel/preset-env": "^7.
|
|
65
|
-
"@ditojs/babel-preset": "^0.
|
|
66
|
-
"@ditojs/build": "^0.
|
|
63
|
+
"@babel/core": "^7.17.5",
|
|
64
|
+
"@babel/preset-env": "^7.16.11",
|
|
65
|
+
"@ditojs/babel-preset": "^0.273.0",
|
|
66
|
+
"@ditojs/build": "^0.273.0",
|
|
67
67
|
"@vue/cli-plugin-babel": "^4.5.13",
|
|
68
|
-
"@vue/cli-service": "^4.5.
|
|
69
|
-
"autoprefixer": "^9.8.
|
|
68
|
+
"@vue/cli-service": "^4.5.15",
|
|
69
|
+
"autoprefixer": "^9.8.8",
|
|
70
70
|
"babel-loader": "^8.2.2",
|
|
71
|
-
"
|
|
72
|
-
"postcss": "^8.3.8",
|
|
71
|
+
"postcss": "^8.4.7",
|
|
73
72
|
"postcss-loader": "^4.3.0",
|
|
74
73
|
"pug": "^3.0.2",
|
|
75
74
|
"pug-plain-loader": "^1.1.0",
|
|
76
75
|
"sass": "1.32.13",
|
|
77
|
-
"sass-loader": "^10.2.
|
|
76
|
+
"sass-loader": "^10.2.1",
|
|
78
77
|
"webpack": "^4.46.0"
|
|
79
78
|
},
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "ecdd9eee04947c3362c449623b8a685b3e02e0ab"
|
|
81
80
|
}
|
|
@@ -16,6 +16,15 @@
|
|
|
16
16
|
:is="isNestedRoute ? 'div' : 'form'"
|
|
17
17
|
@submit.prevent
|
|
18
18
|
)
|
|
19
|
+
// Prevent implicit submission of the form, for example when typing enter
|
|
20
|
+
// in an input field.
|
|
21
|
+
// https://stackoverflow.com/a/51507806
|
|
22
|
+
button(
|
|
23
|
+
v-show="false"
|
|
24
|
+
type="submit"
|
|
25
|
+
disabled="true"
|
|
26
|
+
aria-hidden="true"
|
|
27
|
+
)
|
|
19
28
|
dito-schema(
|
|
20
29
|
:schema="schema"
|
|
21
30
|
:dataPath="dataPath"
|
|
@@ -158,6 +158,10 @@ export default DitoComponent.component('dito-root', {
|
|
|
158
158
|
|
|
159
159
|
async login() {
|
|
160
160
|
this.allowLogin = true
|
|
161
|
+
const {
|
|
162
|
+
additionalComponents,
|
|
163
|
+
redirectAfterLogin
|
|
164
|
+
} = this.options.login || {}
|
|
161
165
|
const loginData = await this.showDialog({
|
|
162
166
|
components: {
|
|
163
167
|
username: {
|
|
@@ -166,7 +170,8 @@ export default DitoComponent.component('dito-root', {
|
|
|
166
170
|
},
|
|
167
171
|
password: {
|
|
168
172
|
type: 'password'
|
|
169
|
-
}
|
|
173
|
+
},
|
|
174
|
+
...additionalComponents
|
|
170
175
|
},
|
|
171
176
|
buttons: {
|
|
172
177
|
cancel: {},
|
|
@@ -180,8 +185,12 @@ export default DitoComponent.component('dito-root', {
|
|
|
180
185
|
data: loginData,
|
|
181
186
|
internal: true
|
|
182
187
|
})
|
|
183
|
-
|
|
184
|
-
|
|
188
|
+
if (redirectAfterLogin) {
|
|
189
|
+
location.replace(redirectAfterLogin)
|
|
190
|
+
} else {
|
|
191
|
+
this.setUser(response.data.user)
|
|
192
|
+
await this.resolveViews()
|
|
193
|
+
}
|
|
185
194
|
} catch (err) {
|
|
186
195
|
const error = err.response?.data?.error
|
|
187
196
|
this.notify({
|
|
@@ -264,9 +264,9 @@ export default {
|
|
|
264
264
|
},
|
|
265
265
|
|
|
266
266
|
getPayloadData(button, method) {
|
|
267
|
-
// Convention: only post and patch requests pass the data as payload.
|
|
267
|
+
// Convention: only post, put and patch requests pass the data as payload.
|
|
268
268
|
return (
|
|
269
|
-
['post', 'patch'].includes(method) && (
|
|
269
|
+
['post', 'put', 'patch'].includes(method) && (
|
|
270
270
|
// TODO: Use `handleDataSchema()` asynchronously here instead, to
|
|
271
271
|
// offer the same amount of possibilities for data loading.
|
|
272
272
|
button.getSchemaValue(['resource', 'data']) ||
|
package/src/types/TypeColor.vue
CHANGED
package/src/types/TypeList.vue
CHANGED
package/src/types/TypeUpload.vue
CHANGED