@ditojs/admin 2.17.0 → 2.18.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.17.0",
3
+ "version": "2.18.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",
@@ -33,57 +33,57 @@
33
33
  "not ie_mob > 0"
34
34
  ],
35
35
  "dependencies": {
36
- "@ditojs/ui": "^2.17.0",
37
- "@ditojs/utils": "^2.17.0",
38
- "@kyvg/vue3-notification": "^3.0.2",
36
+ "@ditojs/ui": "^2.18.0",
37
+ "@ditojs/utils": "^2.18.0",
38
+ "@kyvg/vue3-notification": "^3.1.0",
39
39
  "@lk77/vue3-color": "^3.0.6",
40
- "@tiptap/core": "^2.1.12",
41
- "@tiptap/extension-blockquote": "^2.1.12",
42
- "@tiptap/extension-bold": "^2.1.12",
43
- "@tiptap/extension-bullet-list": "^2.1.12",
44
- "@tiptap/extension-code": "^2.1.12",
45
- "@tiptap/extension-code-block": "^2.1.12",
46
- "@tiptap/extension-document": "^2.1.12",
47
- "@tiptap/extension-hard-break": "^2.1.12",
48
- "@tiptap/extension-heading": "^2.1.12",
49
- "@tiptap/extension-history": "^2.1.12",
50
- "@tiptap/extension-horizontal-rule": "^2.1.12",
51
- "@tiptap/extension-italic": "^2.1.12",
52
- "@tiptap/extension-link": "^2.1.12",
53
- "@tiptap/extension-list-item": "^2.1.12",
54
- "@tiptap/extension-ordered-list": "^2.1.12",
55
- "@tiptap/extension-paragraph": "^2.1.12",
56
- "@tiptap/extension-strike": "^2.1.12",
57
- "@tiptap/extension-text": "^2.1.12",
58
- "@tiptap/extension-underline": "^2.1.12",
59
- "@tiptap/pm": "^2.1.12",
60
- "@tiptap/vue-3": "^2.1.12",
61
- "@vueuse/integrations": "^10.6.1",
40
+ "@tiptap/core": "^2.1.13",
41
+ "@tiptap/extension-blockquote": "^2.1.13",
42
+ "@tiptap/extension-bold": "^2.1.13",
43
+ "@tiptap/extension-bullet-list": "^2.1.13",
44
+ "@tiptap/extension-code": "^2.1.13",
45
+ "@tiptap/extension-code-block": "^2.1.13",
46
+ "@tiptap/extension-document": "^2.1.13",
47
+ "@tiptap/extension-hard-break": "^2.1.13",
48
+ "@tiptap/extension-heading": "^2.1.13",
49
+ "@tiptap/extension-history": "^2.1.13",
50
+ "@tiptap/extension-horizontal-rule": "^2.1.13",
51
+ "@tiptap/extension-italic": "^2.1.13",
52
+ "@tiptap/extension-link": "^2.1.13",
53
+ "@tiptap/extension-list-item": "^2.1.13",
54
+ "@tiptap/extension-ordered-list": "^2.1.13",
55
+ "@tiptap/extension-paragraph": "^2.1.13",
56
+ "@tiptap/extension-strike": "^2.1.13",
57
+ "@tiptap/extension-text": "^2.1.13",
58
+ "@tiptap/extension-underline": "^2.1.13",
59
+ "@tiptap/pm": "^2.1.13",
60
+ "@tiptap/vue-3": "^2.1.13",
61
+ "@vueuse/integrations": "^10.7.0",
62
62
  "codeflask": "^1.4.1",
63
63
  "filesize": "^10.1.0",
64
64
  "filesize-parser": "^1.5.0",
65
65
  "focus-trap": "^7.5.4",
66
- "nanoid": "^5.0.3",
67
- "sortablejs": "^1.15.0",
66
+ "nanoid": "^5.0.4",
67
+ "sortablejs": "^1.15.1",
68
68
  "tinycolor2": "^1.6.0",
69
69
  "tippy.js": "^6.3.7",
70
- "type-fest": "^4.8.2",
71
- "vue": "^3.3.9",
70
+ "type-fest": "^4.8.3",
71
+ "vue": "^3.3.11",
72
72
  "vue-multiselect": "^3.0.0-beta.3",
73
73
  "vue-router": "^4.2.5",
74
74
  "vue-upload-component": "^3.1.8"
75
75
  },
76
76
  "devDependencies": {
77
- "@ditojs/build": "^2.17.0",
78
- "@vitejs/plugin-vue": "^4.5.0",
79
- "@vue/compiler-sfc": "^3.3.9",
77
+ "@ditojs/build": "^2.18.0",
78
+ "@vitejs/plugin-vue": "^4.5.2",
79
+ "@vue/compiler-sfc": "^3.3.11",
80
80
  "pug": "^3.0.2",
81
81
  "sass": "1.69.5",
82
- "typescript": "^5.3.2",
83
- "vite": "^5.0.4"
82
+ "typescript": "^5.3.3",
83
+ "vite": "^5.0.8"
84
84
  },
85
85
  "types": "types",
86
- "gitHead": "e0609d98891263c136320e65480c42ad7a289b4b",
86
+ "gitHead": "a19a3a9b1378a2da1edd05e88d383f48b2932f75",
87
87
  "scripts": {
88
88
  "build": "vite build",
89
89
  "watch": "yarn build --mode 'development' --watch",
@@ -12,23 +12,29 @@ component.dito-label(
12
12
  .dito-label__inner(
13
13
  v-if="text || prefixes.length > 0 || suffixes.length > 0"
14
14
  )
15
- DitoElement.dito-label__prefix(
16
- v-for="(prefix, index) of prefixes"
17
- :key="`prefix-${index}`"
18
- tag="span"
19
- :content="prefix"
15
+ .dito-label__prefix(
16
+ v-if="prefixes.length > 0"
20
17
  )
18
+ DitoElement(
19
+ v-for="(prefix, index) of prefixes"
20
+ :key="`prefix-${index}`"
21
+ tag="span"
22
+ :content="prefix"
23
+ )
21
24
  label(
22
25
  v-if="text"
23
26
  :for="dataPath"
24
27
  v-html="text"
25
28
  )
26
- DitoElement.dito-label__suffix(
27
- v-for="(suffix, index) of suffixes"
28
- :key="`suffix-${index}`"
29
- tag="span"
30
- :content="suffix"
29
+ .dito-label__suffix(
30
+ v-if="suffixes.length > 0"
31
31
  )
32
+ DitoElement(
33
+ v-for="(suffix, index) of suffixes"
34
+ :key="`suffix-${index}`"
35
+ tag="span"
36
+ :content="suffix"
37
+ )
32
38
  .dito-info(
33
39
  v-if="info"
34
40
  :data-info="info"
@@ -124,22 +130,44 @@ export default DitoComponent.component('DitoLabel', {
124
130
  label {
125
131
  cursor: inherit;
126
132
  font-weight: bold;
133
+ line-height: $input-height;
127
134
  }
128
135
 
129
- label,
130
136
  &__prefix,
131
137
  &__suffix {
138
+ flex: 1;
139
+ position: relative;
140
+ line-height: $input-height;
141
+
142
+ // For ellipsis to work on prefix and suffix with flex layout, we need to
143
+ // use a nested absolutely positioned span.
144
+
145
+ &::before {
146
+ content: '\200b'; // zero-width space to keep container from collapsing.
147
+ }
148
+
149
+ span {
150
+ position: absolute;
151
+ inset: 0;
152
+ }
153
+ }
154
+
155
+ label,
156
+ &__prefix span,
157
+ &__suffix span {
132
158
  @include user-select(none);
133
159
  @include ellipsis;
134
160
 
135
161
  white-space: nowrap;
136
- line-height: $input-height;
137
162
  }
138
163
 
139
164
  &__prefix + label,
140
165
  label + &__suffix {
141
- &::before {
142
- content: '\a0'; //  
166
+ &,
167
+ span {
168
+ &::before {
169
+ content: '\a0'; //  
170
+ }
143
171
  }
144
172
  }
145
173
 
@@ -144,7 +144,11 @@ export default {
144
144
  // To be used for selects and inputs only?
145
145
  clearable: getSchemaAccessor('clearable', {
146
146
  type: Boolean,
147
- default: false
147
+ default: false,
148
+
149
+ get(clearable) {
150
+ return clearable && !this.readonly
151
+ }
148
152
  }),
149
153
 
150
154
  placeholder: getSchemaAccessor('placeholder', {