@ditojs/admin 2.61.0 → 2.62.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 +2137 -2076
- package/dist/dito-admin.umd.js +5 -5
- package/package.json +38 -38
- package/src/components/DitoDraggable.vue +3 -3
- package/src/components/DitoElement.vue +2 -2
- package/src/components/DitoLabel.vue +4 -4
- package/src/types/DitoTypeList.vue +1 -1
- package/src/types/DitoTypeUpload.vue +1 -1
- package/src/utils/schema.js +2 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.62.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",
|
|
@@ -43,55 +43,55 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ditojs/tiptap-footnotes": "^3.0.0",
|
|
46
|
-
"@ditojs/ui": "^2.
|
|
47
|
-
"@ditojs/utils": "^2.
|
|
48
|
-
"@kyvg/vue3-notification": "^3.4.
|
|
46
|
+
"@ditojs/ui": "^2.62.0",
|
|
47
|
+
"@ditojs/utils": "^2.62.0",
|
|
48
|
+
"@kyvg/vue3-notification": "^3.4.2",
|
|
49
49
|
"@lk77/vue3-color": "^3.0.6",
|
|
50
|
-
"@tiptap/core": "^3.
|
|
51
|
-
"@tiptap/extension-blockquote": "^3.
|
|
52
|
-
"@tiptap/extension-bold": "^3.
|
|
53
|
-
"@tiptap/extension-bullet-list": "^3.
|
|
54
|
-
"@tiptap/extension-code": "^3.
|
|
55
|
-
"@tiptap/extension-code-block": "^3.
|
|
56
|
-
"@tiptap/extension-document": "^3.
|
|
57
|
-
"@tiptap/extension-hard-break": "^3.
|
|
58
|
-
"@tiptap/extension-heading": "^3.
|
|
59
|
-
"@tiptap/extension-history": "^3.
|
|
60
|
-
"@tiptap/extension-horizontal-rule": "^3.
|
|
61
|
-
"@tiptap/extension-italic": "^3.
|
|
62
|
-
"@tiptap/extension-link": "^3.
|
|
63
|
-
"@tiptap/extension-list": "^3.
|
|
64
|
-
"@tiptap/extension-list-item": "^3.
|
|
65
|
-
"@tiptap/extension-ordered-list": "^3.
|
|
66
|
-
"@tiptap/extension-paragraph": "^3.
|
|
67
|
-
"@tiptap/extension-strike": "^3.
|
|
68
|
-
"@tiptap/extension-subscript": "^3.
|
|
69
|
-
"@tiptap/extension-superscript": "^3.
|
|
70
|
-
"@tiptap/extension-text": "^3.
|
|
71
|
-
"@tiptap/extension-text-style": "^3.
|
|
72
|
-
"@tiptap/extension-underline": "^3.
|
|
73
|
-
"@tiptap/extensions": "^3.
|
|
74
|
-
"@tiptap/pm": "^3.
|
|
75
|
-
"@tiptap/vue-3": "^3.
|
|
76
|
-
"@vueuse/integrations": "^
|
|
50
|
+
"@tiptap/core": "^3.10.3",
|
|
51
|
+
"@tiptap/extension-blockquote": "^3.10.3",
|
|
52
|
+
"@tiptap/extension-bold": "^3.10.3",
|
|
53
|
+
"@tiptap/extension-bullet-list": "^3.10.3",
|
|
54
|
+
"@tiptap/extension-code": "^3.10.3",
|
|
55
|
+
"@tiptap/extension-code-block": "^3.10.3",
|
|
56
|
+
"@tiptap/extension-document": "^3.10.3",
|
|
57
|
+
"@tiptap/extension-hard-break": "^3.10.3",
|
|
58
|
+
"@tiptap/extension-heading": "^3.10.3",
|
|
59
|
+
"@tiptap/extension-history": "^3.10.3",
|
|
60
|
+
"@tiptap/extension-horizontal-rule": "^3.10.3",
|
|
61
|
+
"@tiptap/extension-italic": "^3.10.3",
|
|
62
|
+
"@tiptap/extension-link": "^3.10.3",
|
|
63
|
+
"@tiptap/extension-list": "^3.10.3",
|
|
64
|
+
"@tiptap/extension-list-item": "^3.10.3",
|
|
65
|
+
"@tiptap/extension-ordered-list": "^3.10.3",
|
|
66
|
+
"@tiptap/extension-paragraph": "^3.10.3",
|
|
67
|
+
"@tiptap/extension-strike": "^3.10.3",
|
|
68
|
+
"@tiptap/extension-subscript": "^3.10.3",
|
|
69
|
+
"@tiptap/extension-superscript": "^3.10.3",
|
|
70
|
+
"@tiptap/extension-text": "^3.10.3",
|
|
71
|
+
"@tiptap/extension-text-style": "^3.10.3",
|
|
72
|
+
"@tiptap/extension-underline": "^3.10.3",
|
|
73
|
+
"@tiptap/extensions": "^3.10.3",
|
|
74
|
+
"@tiptap/pm": "^3.10.3",
|
|
75
|
+
"@tiptap/vue-3": "^3.10.3",
|
|
76
|
+
"@vueuse/integrations": "^14.0.0",
|
|
77
77
|
"codeflask": "^1.4.1",
|
|
78
78
|
"filesize": "^11.0.13",
|
|
79
79
|
"filesize-parser": "^1.5.1",
|
|
80
|
-
"focus-trap": "^7.6.
|
|
80
|
+
"focus-trap": "^7.6.6",
|
|
81
81
|
"nanoid": "^5.1.6",
|
|
82
82
|
"sortablejs": "^1.15.6",
|
|
83
83
|
"tinycolor2": "^1.6.0",
|
|
84
84
|
"tippy.js": "^6.3.7",
|
|
85
|
-
"type-fest": "^5.
|
|
86
|
-
"vue": "^3.5.
|
|
85
|
+
"type-fest": "^5.2.0",
|
|
86
|
+
"vue": "^3.5.24",
|
|
87
87
|
"vue-multiselect": "^3.4.0",
|
|
88
|
-
"vue-router": "^4.6.
|
|
88
|
+
"vue-router": "^4.6.3",
|
|
89
89
|
"vue-upload-component": "^3.1.17"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@ditojs/build": "^2.
|
|
92
|
+
"@ditojs/build": "^2.62.0",
|
|
93
93
|
"typescript": "^5.9.3",
|
|
94
|
-
"vite": "^7.
|
|
94
|
+
"vite": "^7.2.2"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "4b9d07116e6ecbcd3b1103fb075c936fc5aa7f90"
|
|
97
97
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
UseSortable.dito-draggable(
|
|
3
3
|
v-if="draggable"
|
|
4
4
|
:class="{ 'dito-draggable--dragging': isDragging }"
|
|
5
|
-
:
|
|
5
|
+
:as="as"
|
|
6
6
|
:modelValue="modelValue"
|
|
7
7
|
:options="{ ...options, onStart, onEnd }"
|
|
8
8
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -10,7 +10,7 @@ UseSortable.dito-draggable(
|
|
|
10
10
|
slot
|
|
11
11
|
component(
|
|
12
12
|
v-else
|
|
13
|
-
:is="
|
|
13
|
+
:is="as"
|
|
14
14
|
)
|
|
15
15
|
slot
|
|
16
16
|
</template>
|
|
@@ -31,7 +31,7 @@ export default DitoComponent.component('DitoDraggable', {
|
|
|
31
31
|
type: Array,
|
|
32
32
|
required: true
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
as: {
|
|
35
35
|
type: String,
|
|
36
36
|
default: 'div'
|
|
37
37
|
},
|
|
@@ -21,7 +21,7 @@ import { isObject, isString, asArray } from '@ditojs/utils'
|
|
|
21
21
|
// @vue/component
|
|
22
22
|
export default DitoComponent.component('DitoElement', {
|
|
23
23
|
props: {
|
|
24
|
-
|
|
24
|
+
as: { type: String, default: 'span' },
|
|
25
25
|
content: { type: [String, Object], default: null }
|
|
26
26
|
},
|
|
27
27
|
|
|
@@ -36,7 +36,7 @@ export default DitoComponent.component('DitoElement', {
|
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
tagName() {
|
|
39
|
-
return this.options.
|
|
39
|
+
return this.options.as || this.as
|
|
40
40
|
},
|
|
41
41
|
|
|
42
42
|
classes() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
component.dito-label(
|
|
3
3
|
v-if="text || collapsible"
|
|
4
|
-
:is="
|
|
4
|
+
:is="as"
|
|
5
5
|
v-bind="attributes"
|
|
6
6
|
:class="{ 'dito-active': isActive }"
|
|
7
7
|
)
|
|
@@ -18,7 +18,7 @@ component.dito-label(
|
|
|
18
18
|
DitoElement(
|
|
19
19
|
v-for="(prefix, index) of prefixes"
|
|
20
20
|
:key="`prefix-${index}`"
|
|
21
|
-
|
|
21
|
+
as="span"
|
|
22
22
|
:content="prefix"
|
|
23
23
|
)
|
|
24
24
|
label(
|
|
@@ -32,7 +32,7 @@ component.dito-label(
|
|
|
32
32
|
DitoElement(
|
|
33
33
|
v-for="(suffix, index) of suffixes"
|
|
34
34
|
:key="`suffix-${index}`"
|
|
35
|
-
|
|
35
|
+
as="span"
|
|
36
36
|
:content="suffix"
|
|
37
37
|
)
|
|
38
38
|
.dito-info(
|
|
@@ -58,7 +58,7 @@ export default DitoComponent.component('DitoLabel', {
|
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
computed: {
|
|
61
|
-
|
|
61
|
+
as() {
|
|
62
62
|
return this.collapsible ? 'a' : 'div'
|
|
63
63
|
},
|
|
64
64
|
|
package/src/utils/schema.js
CHANGED
|
@@ -3,7 +3,7 @@ import DitoMixin from '../mixins/DitoMixin.js'
|
|
|
3
3
|
import TypeMixin from '../mixins/TypeMixin.js'
|
|
4
4
|
import { getUid } from './uid.js'
|
|
5
5
|
import { SchemaGraph } from './SchemaGraph.js'
|
|
6
|
-
import { appendDataPath
|
|
6
|
+
import { appendDataPath } from './data.js'
|
|
7
7
|
import { isMatchingType, convertType } from './type.js'
|
|
8
8
|
import {
|
|
9
9
|
isObject,
|
|
@@ -771,7 +771,7 @@ export function processData(schema, sourceSchema, data, dataPath, {
|
|
|
771
771
|
// The schema expects the `wrapPrimitives` transformations to be present on
|
|
772
772
|
// the data that it is applied on, so warp before and unwrap after.
|
|
773
773
|
if (isArray(value)) {
|
|
774
|
-
const { wrapPrimitives
|
|
774
|
+
const { wrapPrimitives } = schema
|
|
775
775
|
if (wrapPrimitives) {
|
|
776
776
|
value = value.map(entry => ({
|
|
777
777
|
[wrapPrimitives]: entry
|
|
@@ -780,20 +780,6 @@ export function processData(schema, sourceSchema, data, dataPath, {
|
|
|
780
780
|
// Always shallow-clone array values:
|
|
781
781
|
value = [...value]
|
|
782
782
|
}
|
|
783
|
-
if (orderKey && target === 'clipboard') {
|
|
784
|
-
// Sort the data back into the natural sequence as defined by their ids,
|
|
785
|
-
// so copy-pasting between servers (e.g. nested font-cuts on Lineto)
|
|
786
|
-
// naturally gets mapped to the same entries in the graph.
|
|
787
|
-
value.sort((a, b) => {
|
|
788
|
-
const id1 = a?.[idKey]
|
|
789
|
-
const id2 = b?.[idKey]
|
|
790
|
-
return id1 == null || isTemporaryId(id1)
|
|
791
|
-
? 1
|
|
792
|
-
: id2 == null || isTemporaryId(id2)
|
|
793
|
-
? -1
|
|
794
|
-
: id1 - id2
|
|
795
|
-
})
|
|
796
|
-
}
|
|
797
783
|
}
|
|
798
784
|
processedData[name] = value
|
|
799
785
|
}
|