@ditojs/admin 2.6.4 → 2.6.6
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 +6 -7
- package/dist/dito-admin.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/DitoContainer.vue +15 -5
- package/src/components/DitoPane.vue +4 -5
- package/src/components/DitoRoot.vue +3 -2
- package/src/components/DitoSidebar.vue +1 -1
- package/src/types/DitoTypeMultiselect.vue +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.6",
|
|
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",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"vite": "^4.3.4"
|
|
84
84
|
},
|
|
85
85
|
"types": "types",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "cc88d57c87cb03764f8ea351a9447f5911e64a80",
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "vite build",
|
|
89
89
|
"watch": "yarn build --mode 'development' --watch",
|
|
@@ -207,8 +207,6 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
207
207
|
flex: var(--grow) var(--shrink) var(--basis);
|
|
208
208
|
flex-flow: column;
|
|
209
209
|
align-items: flex-start;
|
|
210
|
-
// Needed for better vertical alignment:
|
|
211
|
-
align-self: stretch;
|
|
212
210
|
box-sizing: border-box;
|
|
213
211
|
// To prevent list tables from blowing out of their flex box containers.
|
|
214
212
|
max-width: 100%;
|
|
@@ -216,18 +214,30 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
216
214
|
// percentages in flex-basis to work.
|
|
217
215
|
padding: $form-spacing $form-spacing-half;
|
|
218
216
|
|
|
219
|
-
.dito-page & {
|
|
217
|
+
.dito-page .dito-pane > & {
|
|
220
218
|
@container (width < #{$content-width}) {
|
|
221
219
|
flex-grow: 1;
|
|
222
220
|
}
|
|
221
|
+
|
|
222
|
+
@container (width < #{calc($content-width * 0.8)}) {
|
|
223
|
+
&:not(:has(> .dito-list, > .dito-object)) {
|
|
224
|
+
flex-basis: calc(var(--basis) * 1.5);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@container (width < #{calc($content-width * 0.6)}) {
|
|
229
|
+
&:not(:has(> .dito-list, > .dito-object)) {
|
|
230
|
+
flex-basis: calc(var(--basis) * 2);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
223
233
|
}
|
|
224
234
|
|
|
225
|
-
.dito-sidebar & {
|
|
235
|
+
.dito-sidebar .dito-pane > & {
|
|
226
236
|
@container (width < #{$sidebar-max-width}) {
|
|
227
237
|
flex-grow: 1;
|
|
228
238
|
}
|
|
229
239
|
|
|
230
|
-
@container (width < #{calc($sidebar-max-width
|
|
240
|
+
@container (width < #{calc($sidebar-max-width * 0.6)}) {
|
|
231
241
|
flex-basis: calc(var(--basis) * 2);
|
|
232
242
|
}
|
|
233
243
|
}
|
|
@@ -162,7 +162,7 @@ export default DitoComponent.component('DitoPane', {
|
|
|
162
162
|
for (const index of row) {
|
|
163
163
|
const position = this.positions[index]
|
|
164
164
|
if (
|
|
165
|
-
position?.height >
|
|
165
|
+
position?.height > 3 &&
|
|
166
166
|
position.node.querySelector(':scope > .dito-label')
|
|
167
167
|
) {
|
|
168
168
|
// TODO: Handle nested schemas, e.g. 'section' or 'object' and
|
|
@@ -205,12 +205,11 @@ export default DitoComponent.component('DitoPane', {
|
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
207
|
|
|
208
|
-
onResizeContainer(index, { target }) {
|
|
209
|
-
const { y, width, height } = target.getBoundingClientRect()
|
|
208
|
+
onResizeContainer(index, { target, contentRect: { width, height } }) {
|
|
210
209
|
this.positions[index] =
|
|
211
210
|
width > 0 && height > 0
|
|
212
211
|
? {
|
|
213
|
-
top: y,
|
|
212
|
+
top: target.getBoundingClientRect().y,
|
|
214
213
|
height: height / parseFloat(getComputedStyle(target).fontSize),
|
|
215
214
|
node: target
|
|
216
215
|
}
|
|
@@ -233,8 +232,8 @@ export default DitoComponent.component('DitoPane', {
|
|
|
233
232
|
display: flex;
|
|
234
233
|
position: relative;
|
|
235
234
|
flex-flow: row wrap;
|
|
235
|
+
align-items: flex-start;
|
|
236
236
|
align-content: flex-start;
|
|
237
|
-
align-items: baseline;
|
|
238
237
|
padding: $content-padding;
|
|
239
238
|
// Remove the padding added by `.dito-container` inside `.dito-pane`:
|
|
240
239
|
margin: (-$form-spacing) (-$form-spacing-half);
|
|
@@ -473,10 +473,11 @@ function addRoutes(router, routes) {
|
|
|
473
473
|
|
|
474
474
|
.dito-page {
|
|
475
475
|
--max-content-width: #{$content-width};
|
|
476
|
+
--max-page-width: calc(var(--max-content-width) + 2 * #{$content-padding});
|
|
476
477
|
|
|
477
|
-
flex:
|
|
478
|
+
flex: 0 1 var(--max-page-width);
|
|
478
479
|
background: $content-color-background;
|
|
479
|
-
max-width:
|
|
480
|
+
max-width: var(--max-page-width);
|
|
480
481
|
// For the `@container` rule in `.dito-container` to work:
|
|
481
482
|
container-type: inline-size;
|
|
482
483
|
|
|
@@ -15,7 +15,7 @@ export default DitoComponent.component('DitoSidebar', {})
|
|
|
15
15
|
@import '../styles/_imports';
|
|
16
16
|
|
|
17
17
|
.dito-sidebar {
|
|
18
|
-
flex: 0
|
|
18
|
+
flex: 0 1 $sidebar-max-width;
|
|
19
19
|
max-width: $sidebar-max-width;
|
|
20
20
|
min-width: $sidebar-min-width;
|
|
21
21
|
// For the `@container` rule in `.dito-container` to work:
|
|
@@ -316,9 +316,10 @@ $tag-line-height: 1em;
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
&__tags {
|
|
319
|
+
display: flex;
|
|
319
320
|
font-size: inherit;
|
|
320
|
-
overflow: auto;
|
|
321
321
|
min-height: inherit;
|
|
322
|
+
overflow: auto;
|
|
322
323
|
padding: 0 $spinner-width 0 0;
|
|
323
324
|
// So tags can float on multiple lines and have proper margins:
|
|
324
325
|
padding-bottom: $tag-margin;
|
|
@@ -341,11 +342,14 @@ $tag-line-height: 1em;
|
|
|
341
342
|
&__single,
|
|
342
343
|
&__placeholder,
|
|
343
344
|
&__input {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
@include ellipsis;
|
|
346
|
+
|
|
347
|
+
flex: 1 0 0%;
|
|
348
|
+
width: 0;
|
|
347
349
|
min-height: 0;
|
|
348
350
|
margin: 0 0 1px 0;
|
|
351
|
+
font-size: inherit;
|
|
352
|
+
line-height: inherit;
|
|
349
353
|
// Sadly, vue-select sets style="padding: ...;" in addition to using
|
|
350
354
|
// classes, so `!important` is necessary:
|
|
351
355
|
padding: $input-padding !important;
|