@ditojs/admin 2.60.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/admin",
3
- "version": "2.60.0",
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.60.0",
47
- "@ditojs/utils": "^2.60.0",
48
- "@kyvg/vue3-notification": "^3.4.1",
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.4.1",
51
- "@tiptap/extension-blockquote": "^3.4.1",
52
- "@tiptap/extension-bold": "^3.4.1",
53
- "@tiptap/extension-bullet-list": "^3.4.1",
54
- "@tiptap/extension-code": "^3.4.1",
55
- "@tiptap/extension-code-block": "^3.4.1",
56
- "@tiptap/extension-document": "^3.4.1",
57
- "@tiptap/extension-hard-break": "^3.4.1",
58
- "@tiptap/extension-heading": "^3.4.1",
59
- "@tiptap/extension-history": "^3.4.1",
60
- "@tiptap/extension-horizontal-rule": "^3.4.1",
61
- "@tiptap/extension-italic": "^3.4.1",
62
- "@tiptap/extension-link": "^3.4.1",
63
- "@tiptap/extension-list": "^3.4.1",
64
- "@tiptap/extension-list-item": "^3.4.1",
65
- "@tiptap/extension-ordered-list": "^3.4.1",
66
- "@tiptap/extension-paragraph": "^3.4.1",
67
- "@tiptap/extension-strike": "^3.4.1",
68
- "@tiptap/extension-subscript": "^3.4.1",
69
- "@tiptap/extension-superscript": "^3.4.1",
70
- "@tiptap/extension-text": "^3.4.1",
71
- "@tiptap/extension-text-style": "^3.4.1",
72
- "@tiptap/extension-underline": "^3.4.1",
73
- "@tiptap/extensions": "^3.4.1",
74
- "@tiptap/pm": "^3.4.1",
75
- "@tiptap/vue-3": "^3.4.1",
76
- "@vueuse/integrations": "^13.9.0",
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
- "filesize": "^11.0.2",
78
+ "filesize": "^11.0.13",
79
79
  "filesize-parser": "^1.5.1",
80
- "focus-trap": "^7.6.5",
81
- "nanoid": "^5.1.5",
80
+ "focus-trap": "^7.6.6",
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": "^4.41.0",
86
- "vue": "^3.5.21",
87
- "vue-multiselect": "^3.3.1",
88
- "vue-router": "^4.5.1",
85
+ "type-fest": "^5.2.0",
86
+ "vue": "^3.5.24",
87
+ "vue-multiselect": "^3.4.0",
88
+ "vue-router": "^4.6.3",
89
89
  "vue-upload-component": "^3.1.17"
90
90
  },
91
91
  "devDependencies": {
92
- "@ditojs/build": "^2.60.0",
93
- "typescript": "^5.9.2",
94
- "vite": "^7.1.5"
92
+ "@ditojs/build": "^2.62.0",
93
+ "typescript": "^5.9.3",
94
+ "vite": "^7.2.2"
95
95
  },
96
- "gitHead": "c7231f64d4106e875c1a3a86e8adbfed2305ca54"
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
- :tag="tag"
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="tag"
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
- tag: {
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
- tag: { type: String, default: 'span' },
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.tag || this.tag
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="tag"
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
- tag="span"
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
- tag="span"
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
- tag() {
61
+ as() {
62
62
  return this.collapsible ? 'a' : 'div'
63
63
  },
64
64
 
@@ -662,6 +662,7 @@ export default DitoComponent.component('DitoSchema', {
662
662
  // We can't set `this.data = ...` because it's a property, but we can set
663
663
  // all known properties on it to the values returned by
664
664
  // `setDefaultValues()`, as they are all reactive already from the starts:
665
+ // eslint-disable-next-line vue/no-mutating-props
665
666
  Object.assign(this.data, setDefaultValues(this.dataSchema, {}, this))
666
667
  this.clearErrors()
667
668
  },
@@ -132,12 +132,10 @@ table.dito-table {
132
132
  @include table-border;
133
133
  }
134
134
 
135
- & {
136
- @include table-border-top;
137
- @include table-border-bottom;
138
- @include table-border-left;
139
- @include table-border-right;
140
- }
135
+ @include table-border-top;
136
+ @include table-border-bottom;
137
+ @include table-border-left;
138
+ @include table-border-right;
141
139
  }
142
140
 
143
141
  &:first-child > * {
@@ -37,7 +37,7 @@
37
37
  :hasEditButtons="hasEditButtons"
38
38
  )
39
39
  DitoDraggable(
40
- tag="tbody"
40
+ as="tbody"
41
41
  :options="getDraggableOptions()"
42
42
  :draggable="draggable"
43
43
  :modelValue="updateOrder(sourceSchema, listData, paginationRange)"
@@ -34,7 +34,7 @@
34
34
  span
35
35
  DitoDraggable(
36
36
  v-model="files"
37
- tag="tbody"
37
+ as="tbody"
38
38
  :options="getDraggableOptions()"
39
39
  :draggable="draggable"
40
40
  )
@@ -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, isTemporaryId } from './data.js'
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, orderKey, idKey = 'id' } = schema
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
  }