@ditojs/admin 2.6.3 → 2.6.5
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 +45 -43
- package/dist/dito-admin.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/DitoContainer.vue +32 -9
- package/src/components/DitoPane.vue +16 -7
- package/src/components/DitoPanels.vue +0 -2
- package/src/components/DitoRoot.vue +2 -0
- package/src/components/DitoSidebar.vue +2 -0
- package/src/types/DitoTypeButton.vue +0 -2
- package/src/types/DitoTypeMultiselect.vue +1 -2
- package/src/types/DitoTypeObject.vue +1 -0
- package/src/types/DitoTypeUpload.vue +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.5",
|
|
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": "01511e6f5082c5f63c6fb17959559b3e28a111b2",
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "vite build",
|
|
89
89
|
"watch": "yarn build --mode 'development' --watch",
|
|
@@ -167,13 +167,9 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
167
167
|
|
|
168
168
|
containerStyle() {
|
|
169
169
|
return {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.flexShrink ? 1 : 0
|
|
174
|
-
} ${
|
|
175
|
-
this.flexBasis
|
|
176
|
-
}`
|
|
170
|
+
'--grow': this.flexGrow ? 1 : 0,
|
|
171
|
+
'--shrink': this.flexShrink ? 1 : 0,
|
|
172
|
+
'--basis': this.flexBasis
|
|
177
173
|
}
|
|
178
174
|
},
|
|
179
175
|
|
|
@@ -202,8 +198,13 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
202
198
|
@import '../styles/_imports';
|
|
203
199
|
|
|
204
200
|
.dito-container {
|
|
201
|
+
--grow: 0;
|
|
202
|
+
--shrink: 1;
|
|
203
|
+
--basis: auto;
|
|
204
|
+
|
|
205
205
|
position: relative;
|
|
206
206
|
display: flex;
|
|
207
|
+
flex: var(--grow) var(--shrink) var(--basis);
|
|
207
208
|
flex-flow: column;
|
|
208
209
|
align-items: flex-start;
|
|
209
210
|
// Needed for better vertical alignment:
|
|
@@ -215,9 +216,31 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
215
216
|
// percentages in flex-basis to work.
|
|
216
217
|
padding: $form-spacing $form-spacing-half;
|
|
217
218
|
|
|
219
|
+
.dito-page & {
|
|
220
|
+
@container (width < #{$content-width}) {
|
|
221
|
+
flex-grow: 1;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@container (width < #{calc($content-width * 0.8)}) {
|
|
225
|
+
&:not(:has(> .dito-list, > .dito-object)) {
|
|
226
|
+
flex-basis: calc(var(--basis) * 1.5);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@container (width < #{calc($content-width * 0.6)}) {
|
|
231
|
+
&:not(:has(> .dito-list, > .dito-object)) {
|
|
232
|
+
flex-basis: calc(var(--basis) * 2);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
218
237
|
.dito-sidebar & {
|
|
219
|
-
@container (width < #{$sidebar-max-width
|
|
220
|
-
flex-grow: 1
|
|
238
|
+
@container (width < #{$sidebar-max-width}) {
|
|
239
|
+
flex-grow: 1;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@container (width < #{calc($sidebar-max-width * 0.6)}) {
|
|
243
|
+
flex-basis: calc(var(--basis) * 2);
|
|
221
244
|
}
|
|
222
245
|
}
|
|
223
246
|
|
|
@@ -228,6 +228,8 @@ export default DitoComponent.component('DitoPane', {
|
|
|
228
228
|
@import '../styles/_imports';
|
|
229
229
|
|
|
230
230
|
.dito-pane {
|
|
231
|
+
$self: &;
|
|
232
|
+
|
|
231
233
|
display: flex;
|
|
232
234
|
position: relative;
|
|
233
235
|
flex-flow: row wrap;
|
|
@@ -246,13 +248,20 @@ export default DitoComponent.component('DitoPane', {
|
|
|
246
248
|
margin: 0;
|
|
247
249
|
}
|
|
248
250
|
|
|
249
|
-
.dito-scroll >
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
251
|
+
.dito-scroll > & {
|
|
252
|
+
&,
|
|
253
|
+
.dito-container {
|
|
254
|
+
min-width: min-content;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:not(#{$self}--single) {
|
|
258
|
+
// Root-level panes inside scroll views need to move the negative margin
|
|
259
|
+
// used to remove the padding added by `.dito-container` inside
|
|
260
|
+
// `.dito-pane` to the padding:
|
|
261
|
+
padding: ($content-padding - $form-spacing)
|
|
262
|
+
($content-padding - $form-spacing-half);
|
|
263
|
+
margin: 0;
|
|
264
|
+
}
|
|
256
265
|
}
|
|
257
266
|
|
|
258
267
|
&.dito-pane-main {
|
|
@@ -477,6 +477,8 @@ function addRoutes(router, routes) {
|
|
|
477
477
|
flex: 1 1 var(--max-content-width);
|
|
478
478
|
background: $content-color-background;
|
|
479
479
|
max-width: calc(var(--max-content-width) + 2 * #{$content-padding});
|
|
480
|
+
// For the `@container` rule in `.dito-container` to work:
|
|
481
|
+
container-type: inline-size;
|
|
480
482
|
|
|
481
483
|
&--wide {
|
|
482
484
|
--max-content-width: #{$content-width-wide};
|
|
@@ -18,5 +18,7 @@ export default DitoComponent.component('DitoSidebar', {})
|
|
|
18
18
|
flex: 0 4 $sidebar-max-width;
|
|
19
19
|
max-width: $sidebar-max-width;
|
|
20
20
|
min-width: $sidebar-min-width;
|
|
21
|
+
// For the `@container` rule in `.dito-container` to work:
|
|
22
|
+
container-type: inline-size;
|
|
21
23
|
}
|
|
22
24
|
</style>
|
|
@@ -343,6 +343,7 @@ $tag-line-height: 1em;
|
|
|
343
343
|
&__input {
|
|
344
344
|
font-size: inherit;
|
|
345
345
|
line-height: inherit;
|
|
346
|
+
white-space: nowrap;
|
|
346
347
|
min-height: 0;
|
|
347
348
|
margin: 0 0 1px 0;
|
|
348
349
|
// Sadly, vue-select sets style="padding: ...;" in addition to using
|
|
@@ -360,8 +361,6 @@ $tag-line-height: 1em;
|
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
&__placeholder {
|
|
363
|
-
white-space: nowrap;
|
|
364
|
-
|
|
365
364
|
&::after {
|
|
366
365
|
// Enforce actual line-height for positioning.
|
|
367
366
|
content: '\200b';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
//- on whether they handle single or multiple uploads, render the upload
|
|
5
5
|
//- component invisibly at the root, and delegate the click events to it from
|
|
6
6
|
//- the buttons rendered further below. Luckily this works surprisingly well.
|
|
7
|
-
VueUpload.dito-
|
|
7
|
+
VueUpload.dito-upload__input(
|
|
8
8
|
ref="upload"
|
|
9
9
|
v-model="uploads"
|
|
10
10
|
:inputId="dataPath"
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
:thumbnail="thumbnails"
|
|
72
72
|
:thumbnailUrl="thumbnailUrls[index]"
|
|
73
73
|
)
|
|
74
|
-
td {{ formatFileSize(file.size) }}
|
|
75
|
-
td
|
|
74
|
+
td.dito-upload__size {{ formatFileSize(file.size) }}
|
|
75
|
+
td.dito-upload__status
|
|
76
76
|
template(
|
|
77
77
|
v-if="file.upload"
|
|
78
78
|
)
|
|
@@ -476,13 +476,18 @@ function asFiles(value) {
|
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
|
|
479
|
+
&__size,
|
|
480
|
+
&__status {
|
|
481
|
+
white-space: nowrap;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
&__input {
|
|
480
485
|
// See `onClickUpload()` method for details.
|
|
481
486
|
position: absolute;
|
|
482
487
|
pointer-events: none;
|
|
483
488
|
}
|
|
484
489
|
|
|
485
|
-
|
|
490
|
+
&__footer {
|
|
486
491
|
display: flex;
|
|
487
492
|
justify-content: flex-end;
|
|
488
493
|
align-items: center;
|