@ditojs/admin 2.84.1 → 2.85.1

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.84.1",
3
+ "version": "2.85.1",
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",
@@ -42,36 +42,36 @@
42
42
  "not ie_mob > 0"
43
43
  ],
44
44
  "dependencies": {
45
- "@ditojs/ui": "^2.84.0",
46
- "@ditojs/utils": "^2.84.0",
45
+ "@ditojs/ui": "^2.85.0",
46
+ "@ditojs/utils": "^2.85.0",
47
47
  "@kyvg/vue3-notification": "^3.4.2",
48
48
  "@lk77/vue3-color": "^3.0.6",
49
- "@tiptap/core": "^3.20.0",
50
- "@tiptap/extension-blockquote": "^3.20.0",
51
- "@tiptap/extension-bold": "^3.20.0",
52
- "@tiptap/extension-bullet-list": "^3.20.0",
53
- "@tiptap/extension-code": "^3.20.0",
54
- "@tiptap/extension-code-block": "^3.20.0",
55
- "@tiptap/extension-document": "^3.20.0",
56
- "@tiptap/extension-hard-break": "^3.20.0",
57
- "@tiptap/extension-heading": "^3.20.0",
58
- "@tiptap/extension-history": "^3.20.0",
59
- "@tiptap/extension-horizontal-rule": "^3.20.0",
60
- "@tiptap/extension-italic": "^3.20.0",
61
- "@tiptap/extension-link": "^3.20.0",
62
- "@tiptap/extension-list": "^3.20.0",
63
- "@tiptap/extension-list-item": "^3.20.0",
64
- "@tiptap/extension-ordered-list": "^3.20.0",
65
- "@tiptap/extension-paragraph": "^3.20.0",
66
- "@tiptap/extension-strike": "^3.20.0",
67
- "@tiptap/extension-subscript": "^3.20.0",
68
- "@tiptap/extension-superscript": "^3.20.0",
69
- "@tiptap/extension-text": "^3.20.0",
70
- "@tiptap/extension-text-style": "^3.20.0",
71
- "@tiptap/extension-underline": "^3.20.0",
72
- "@tiptap/extensions": "^3.20.0",
73
- "@tiptap/pm": "^3.20.0",
74
- "@tiptap/vue-3": "^3.20.0",
49
+ "@tiptap/core": "^3.20.1",
50
+ "@tiptap/extension-blockquote": "^3.20.1",
51
+ "@tiptap/extension-bold": "^3.20.1",
52
+ "@tiptap/extension-bullet-list": "^3.20.1",
53
+ "@tiptap/extension-code": "^3.20.1",
54
+ "@tiptap/extension-code-block": "^3.20.1",
55
+ "@tiptap/extension-document": "^3.20.1",
56
+ "@tiptap/extension-hard-break": "^3.20.1",
57
+ "@tiptap/extension-heading": "^3.20.1",
58
+ "@tiptap/extension-history": "^3.20.1",
59
+ "@tiptap/extension-horizontal-rule": "^3.20.1",
60
+ "@tiptap/extension-italic": "^3.20.1",
61
+ "@tiptap/extension-link": "^3.20.1",
62
+ "@tiptap/extension-list": "^3.20.1",
63
+ "@tiptap/extension-list-item": "^3.20.1",
64
+ "@tiptap/extension-ordered-list": "^3.20.1",
65
+ "@tiptap/extension-paragraph": "^3.20.1",
66
+ "@tiptap/extension-strike": "^3.20.1",
67
+ "@tiptap/extension-subscript": "^3.20.1",
68
+ "@tiptap/extension-superscript": "^3.20.1",
69
+ "@tiptap/extension-text": "^3.20.1",
70
+ "@tiptap/extension-text-style": "^3.20.1",
71
+ "@tiptap/extension-underline": "^3.20.1",
72
+ "@tiptap/extensions": "^3.20.1",
73
+ "@tiptap/pm": "^3.20.1",
74
+ "@tiptap/vue-3": "^3.20.1",
75
75
  "@vueuse/integrations": "^14.2.1",
76
76
  "codeflask": "^1.4.1",
77
77
  "filesize": "^11.0.13",
@@ -83,15 +83,15 @@
83
83
  "tippy.js": "^6.3.7",
84
84
  "tiptap-footnotes": "^3.0.1",
85
85
  "type-fest": "^5.4.4",
86
- "vue": "^3.5.29",
86
+ "vue": "^3.5.30",
87
87
  "vue-multiselect": "^3.4.0",
88
88
  "vue-router": "^5.0.3",
89
89
  "vue-upload-component": "^3.1.17"
90
90
  },
91
91
  "devDependencies": {
92
- "@ditojs/build": "^2.84.0",
92
+ "@ditojs/build": "^2.85.0",
93
93
  "typescript": "^5.9.3",
94
94
  "vite": "^7.3.1"
95
95
  },
96
- "gitHead": "2087c12d2af181bf72af0d2e525788fa6d460c47"
96
+ "gitHead": "2a442c0da86355cf67fa5e2077d121c2a62342d7"
97
97
  }
@@ -10,6 +10,7 @@
10
10
  UseFocusTrap.dito-dialog__focus-trap(:options="focusTrapOptions")
11
11
  form.dito-scroll-parent(
12
12
  @submit.prevent="submit"
13
+ @keydown.enter="onEnter"
13
14
  )
14
15
  // Add an invisible button that prevents the clearable buttons from being
15
16
  // pressed when the user presses the Enter key:
@@ -150,6 +151,15 @@ export default DitoComponent.component('DitoDialog', {
150
151
  this.remove()
151
152
  },
152
153
 
154
+ onEnter(event) {
155
+ // Handle Enter key on input fields to submit the form. This also handles
156
+ // password managers (e.g. 1Password) that simulate an untrusted Enter
157
+ // keypress to submit, which browsers ignore.
158
+ if (event.target instanceof HTMLInputElement) {
159
+ this.submit()
160
+ }
161
+ },
162
+
153
163
  submit() {
154
164
  this.resolve(this.dialogData)
155
165
  },
@@ -193,6 +203,12 @@ export default DitoComponent.component('DitoDialog', {
193
203
  max-height: 100%;
194
204
  }
195
205
 
206
+ // Place cancel button visually first even though submit comes first in DOM,
207
+ // so that password managers (e.g. 1Password) find the submit button first.
208
+ .dito-container:has(.dito-button--cancel) {
209
+ order: -1;
210
+ }
211
+
196
212
  // TODO: `&__inner`
197
213
  form {
198
214
  position: relative;
@@ -295,16 +295,19 @@ export default DitoComponent.component('DitoRoot', {
295
295
  },
296
296
  ...additionalComponents
297
297
  },
298
+ // NOTE: Login must come before cancel in DOM order so that password
299
+ // managers (e.g. 1Password) target the submit button instead of cancel.
300
+ // DitoDialog uses CSS order to visually place cancel first.
298
301
  buttons: {
302
+ login: {
303
+ type: 'submit',
304
+ text: 'Login'
305
+ },
306
+
299
307
  cancel: {
300
308
  type: 'button',
301
309
  text: 'Cancel'
302
310
  // NOTE: The click event is added in DitoDialog.buttonSchemas()
303
- },
304
-
305
- login: {
306
- type: 'submit',
307
- text: 'Login'
308
311
  }
309
312
  }
310
313
  })
@@ -310,6 +310,8 @@ export default DitoComponent.component('DitoTreeItem', {
310
310
  .dito-tree-item {
311
311
  --chevron-indent: #{$chevron-indent};
312
312
 
313
+ overflow: hidden;
314
+
313
315
  > .dito-tree-header {
314
316
  > .dito-tree-branch,
315
317
  > .dito-tree-leaf {
@@ -333,12 +335,20 @@ export default DitoComponent.component('DitoTreeItem', {
333
335
  .dito-tree-leaf {
334
336
  display: flex;
335
337
  flex: auto;
338
+ overflow: hidden;
339
+ min-width: 0;
336
340
  position: relative;
337
341
  margin: 1px 0;
338
342
  @include user-select(none);
339
343
  }
340
344
 
341
- .dito-tree-label,
345
+ .dito-tree-label {
346
+ display: flex;
347
+ align-items: baseline;
348
+ overflow: hidden;
349
+ white-space: nowrap;
350
+ }
351
+
342
352
  .dito-tree-info {
343
353
  white-space: nowrap;
344
354
  }
@@ -349,10 +359,12 @@ export default DitoComponent.component('DitoTreeItem', {
349
359
  }
350
360
 
351
361
  .dito-buttons {
362
+ flex: auto;
352
363
  display: flex;
353
364
  visibility: hidden;
354
365
  height: 100%;
355
- margin: 1px 0 1px 1em;
366
+ margin: 1px;
367
+ margin-right: 0;
356
368
  }
357
369
 
358
370
  .dito-tree-header:hover {