@ditojs/admin 2.11.2 → 2.11.3
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 +709 -713
- package/dist/dito-admin.umd.js +5 -5
- package/package.json +4 -4
- package/src/components/DitoClipboard.vue +1 -3
- package/src/components/DitoForm.vue +2 -2
- package/src/components/DitoSchema.vue +1 -3
- package/src/mixins/ItemMixin.js +2 -2
- package/src/types/DitoTypeList.vue +1 -1
- package/src/types/DitoTypeMarkup.vue +1 -1
- package/src/utils/schema.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.3",
|
|
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.11.
|
|
36
|
+
"@ditojs/ui": "^2.11.3",
|
|
37
37
|
"@ditojs/utils": "^2.11.1",
|
|
38
38
|
"@kyvg/vue3-notification": "^2.9.1",
|
|
39
39
|
"@lk77/vue3-color": "^3.0.6",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"pug": "^3.0.2",
|
|
81
81
|
"sass": "1.64.2",
|
|
82
82
|
"typescript": "^5.1.6",
|
|
83
|
-
"vite": "^4.4.
|
|
83
|
+
"vite": "^4.4.9"
|
|
84
84
|
},
|
|
85
85
|
"types": "types",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "9a5406b3ce9575128e9432dfbe6a6d3177d96c3d",
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "vite build",
|
|
89
89
|
"watch": "yarn build --mode 'development' --watch",
|
|
@@ -29,9 +29,7 @@ export default DitoComponent.component('DitoClipboard', {
|
|
|
29
29
|
|
|
30
30
|
props: {
|
|
31
31
|
clipboard: { type: [Boolean, Object], required: true },
|
|
32
|
-
schema: { type: Object, required: true }
|
|
33
|
-
dataPath: { type: String, required: true },
|
|
34
|
-
data: { type: [Object, Array], default: null }
|
|
32
|
+
schema: { type: Object, required: true }
|
|
35
33
|
},
|
|
36
34
|
|
|
37
35
|
data() {
|
|
@@ -318,12 +318,12 @@ export default DitoComponent.component('DitoForm', {
|
|
|
318
318
|
return this.mainSchemaComponent.emitEvent(event, params)
|
|
319
319
|
},
|
|
320
320
|
|
|
321
|
-
getDataPathFrom(
|
|
321
|
+
getDataPathFrom(routeComponent) {
|
|
322
322
|
// Get the data path by denormalizePath the relative route path
|
|
323
323
|
return this.api.denormalizePath(
|
|
324
324
|
this.path
|
|
325
325
|
// DitoViews have nested routes, so don't remove their path.
|
|
326
|
-
.slice((
|
|
326
|
+
.slice((routeComponent.isView ? 0 : routeComponent.path.length) + 1)
|
|
327
327
|
)
|
|
328
328
|
},
|
|
329
329
|
|
|
@@ -42,8 +42,6 @@ slot(name="before")
|
|
|
42
42
|
v-if="clipboard"
|
|
43
43
|
:clipboard="clipboard"
|
|
44
44
|
:schema="schema"
|
|
45
|
-
:dataPath="dataPath"
|
|
46
|
-
:data="data"
|
|
47
45
|
)
|
|
48
46
|
slot(name="edit-buttons")
|
|
49
47
|
TransitionHeight(:enabled="inlined")
|
|
@@ -189,7 +187,7 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
189
187
|
},
|
|
190
188
|
|
|
191
189
|
panelEntries() {
|
|
192
|
-
return getPanelEntries(this.schema.panels,
|
|
190
|
+
return getPanelEntries(this.schema.panels, this.dataPath)
|
|
193
191
|
},
|
|
194
192
|
|
|
195
193
|
tabs() {
|
package/src/mixins/ItemMixin.js
CHANGED
|
@@ -64,11 +64,11 @@ export default {
|
|
|
64
64
|
|
|
65
65
|
let dataPath
|
|
66
66
|
const getDataPath = () =>
|
|
67
|
-
(dataPath
|
|
67
|
+
(dataPath ??= this.getItemDataPath(sourceSchema, index))
|
|
68
68
|
|
|
69
69
|
let formLabel
|
|
70
70
|
const getFormLabel = () =>
|
|
71
|
-
(formLabel
|
|
71
|
+
(formLabel ??= this.getLabel(
|
|
72
72
|
getItemFormSchema(sourceSchema, item, this.context)
|
|
73
73
|
))
|
|
74
74
|
|
|
@@ -229,7 +229,7 @@ export default DitoTypeComponent.register('markup', {
|
|
|
229
229
|
if (ignoreWatch) {
|
|
230
230
|
ignoreWatch = false
|
|
231
231
|
} else {
|
|
232
|
-
this.editor.setContent(value, false, this.parseOptions)
|
|
232
|
+
this.editor.commands.setContent(value, false, this.parseOptions)
|
|
233
233
|
}
|
|
234
234
|
})
|
|
235
235
|
|
package/src/utils/schema.js
CHANGED
|
@@ -1007,7 +1007,7 @@ export function getPanelEntry(schema, dataPath = null, tabComponent = null) {
|
|
|
1007
1007
|
|
|
1008
1008
|
export function getPanelEntries(
|
|
1009
1009
|
panelSchemas,
|
|
1010
|
-
dataPath
|
|
1010
|
+
dataPath,
|
|
1011
1011
|
tabComponent = null,
|
|
1012
1012
|
panelEntries = []
|
|
1013
1013
|
) {
|
|
@@ -1015,7 +1015,7 @@ export function getPanelEntries(
|
|
|
1015
1015
|
for (const [key, schema] of Object.entries(panelSchemas)) {
|
|
1016
1016
|
const entry = getPanelEntry(
|
|
1017
1017
|
schema,
|
|
1018
|
-
|
|
1018
|
+
appendDataPath(dataPath, key),
|
|
1019
1019
|
tabComponent
|
|
1020
1020
|
)
|
|
1021
1021
|
if (entry) {
|
|
@@ -1037,7 +1037,7 @@ export function getPanelSchemas(schema) {
|
|
|
1037
1037
|
export function getAllPanelEntries(
|
|
1038
1038
|
api,
|
|
1039
1039
|
schema,
|
|
1040
|
-
dataPath
|
|
1040
|
+
dataPath,
|
|
1041
1041
|
component = null,
|
|
1042
1042
|
tabComponent = null
|
|
1043
1043
|
) {
|