@ditojs/admin 2.2.7 → 2.2.9
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 +769 -766
- package/dist/dito-admin.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/DitoTypeComponent.js +0 -1
- package/src/components/DitoButtons.vue +0 -1
- package/src/components/DitoContainer.vue +28 -13
- package/src/components/DitoDialog.vue +3 -1
- package/src/components/DitoForm.vue +4 -2
- package/src/components/DitoHeader.vue +2 -0
- package/src/components/DitoLabel.vue +0 -1
- package/src/components/DitoPane.vue +15 -3
- package/src/components/DitoPanel.vue +9 -4
- package/src/components/DitoRoot.vue +0 -9
- package/src/components/DitoSchema.vue +47 -38
- package/src/components/DitoSchemaInlined.vue +4 -7
- package/src/components/{DitoMenu.vue → DitoSidebar.vue} +2 -2
- package/src/components/DitoView.vue +3 -3
- package/src/components/index.js +1 -1
- package/src/mixins/DitoMixin.js +1 -1
- package/src/styles/_button.scss +2 -2
- package/src/types/DitoTypeCode.vue +0 -1
- package/src/types/DitoTypeComponent.vue +0 -1
- package/src/types/DitoTypeLabel.vue +1 -2
- package/src/types/DitoTypeList.vue +20 -1
- package/src/types/DitoTypeMarkup.vue +0 -2
- package/src/types/DitoTypeObject.vue +0 -2
- package/src/types/DitoTypePanel.vue +0 -1
- package/src/types/DitoTypeSection.vue +5 -2
- package/src/types/DitoTypeTextarea.vue +0 -1
- package/src/types/DitoTypeTreeList.vue +0 -2
- package/src/types/DitoTypeUpload.vue +0 -2
- package/src/utils/options.js +0 -1
- package/src/utils/schema.js +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
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",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vite": "^4.3.1"
|
|
83
83
|
},
|
|
84
84
|
"types": "types",
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "f08406eb78e42d4307375602961821982aa815b3",
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "vite build",
|
|
88
88
|
"watch": "yarn build --mode 'development' --watch",
|
package/src/DitoTypeComponent.js
CHANGED
|
@@ -31,7 +31,7 @@ import { isString, isNumber } from '@ditojs/utils'
|
|
|
31
31
|
import DitoComponent from '../DitoComponent.js'
|
|
32
32
|
import DitoContext from '../DitoContext.js'
|
|
33
33
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
34
|
-
import { getTypeComponent,
|
|
34
|
+
import { getTypeComponent, omitPadding } from '../utils/schema.js'
|
|
35
35
|
import { parseFraction } from '../utils/math.js'
|
|
36
36
|
|
|
37
37
|
// @vue/component
|
|
@@ -45,7 +45,7 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
45
45
|
single: { type: Boolean, default: false },
|
|
46
46
|
nested: { type: Boolean, default: true },
|
|
47
47
|
disabled: { type: Boolean, required: true },
|
|
48
|
-
generateLabels: { type: Boolean, default:
|
|
48
|
+
generateLabels: { type: Boolean, default: false }
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
data() {
|
|
@@ -68,13 +68,25 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
68
68
|
return (
|
|
69
69
|
label !== false && (
|
|
70
70
|
!!label ||
|
|
71
|
-
this.generateLabels &&
|
|
71
|
+
this.generateLabels && (
|
|
72
|
+
this.typeComponent?.generateLabel ||
|
|
73
|
+
// If the component has no label but isn't full width, render an
|
|
74
|
+
// empty label for alignment with other components:
|
|
75
|
+
!this.isFullWidth
|
|
76
|
+
)
|
|
72
77
|
)
|
|
73
78
|
)
|
|
74
79
|
},
|
|
75
80
|
|
|
76
81
|
label() {
|
|
77
|
-
return this.hasLabel
|
|
82
|
+
return this.hasLabel
|
|
83
|
+
? this.getLabel(
|
|
84
|
+
this.schema,
|
|
85
|
+
// Pass an empty string in case we need an empty label, see
|
|
86
|
+
// `hasLabel()`:
|
|
87
|
+
this.typeComponent?.generateLabel ? this.schema.name : ''
|
|
88
|
+
) || ''
|
|
89
|
+
: null
|
|
78
90
|
},
|
|
79
91
|
|
|
80
92
|
labelDataPath() {
|
|
@@ -82,6 +94,13 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
82
94
|
return this.nested ? this.dataPath : null
|
|
83
95
|
},
|
|
84
96
|
|
|
97
|
+
isFullWidth() {
|
|
98
|
+
return (
|
|
99
|
+
!this.componentBasis.endsWith('%') ||
|
|
100
|
+
parseFloat(this.componentBasis) === 100
|
|
101
|
+
)
|
|
102
|
+
},
|
|
103
|
+
|
|
85
104
|
componentWidth: getSchemaAccessor('width', {
|
|
86
105
|
type: [String, Number],
|
|
87
106
|
default() {
|
|
@@ -127,7 +146,6 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
127
146
|
return {
|
|
128
147
|
[`${prefix}--single`]: this.single,
|
|
129
148
|
[`${prefix}--has-label`]: this.hasLabel,
|
|
130
|
-
[`${prefix}--align-bottom`]: alignBottom(this.schema),
|
|
131
149
|
[`${prefix}--omit-padding`]: omitPadding(this.schema),
|
|
132
150
|
...(
|
|
133
151
|
isString(containerClass)
|
|
@@ -166,11 +184,10 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
166
184
|
componentClass() {
|
|
167
185
|
const basisIsAuto = this.componentBasis === 'auto'
|
|
168
186
|
return {
|
|
169
|
-
// TODO: BEM
|
|
187
|
+
// TODO: BEM?
|
|
170
188
|
'dito-single': this.single,
|
|
171
189
|
'dito-disabled': this.componentDisabled,
|
|
172
190
|
'dito-width-fill': !basisIsAuto || this.componentWidth === 'fill',
|
|
173
|
-
'dito-width-auto': basisIsAuto,
|
|
174
191
|
'dito-has-errors': !!this.errors
|
|
175
192
|
}
|
|
176
193
|
}
|
|
@@ -204,8 +221,10 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
204
221
|
padding: 0;
|
|
205
222
|
}
|
|
206
223
|
|
|
207
|
-
&--
|
|
208
|
-
|
|
224
|
+
&--single {
|
|
225
|
+
height: 100%; // So that list buttons can be sticky at the bottom;
|
|
226
|
+
// Just like on DitoPane, clear settings from above.
|
|
227
|
+
padding: 0;
|
|
209
228
|
}
|
|
210
229
|
|
|
211
230
|
&--omit-padding {
|
|
@@ -215,10 +234,6 @@ export default DitoComponent.component('DitoContainer', {
|
|
|
215
234
|
margin: $form-spacing $form-spacing-half 0;
|
|
216
235
|
}
|
|
217
236
|
}
|
|
218
|
-
|
|
219
|
-
&--single {
|
|
220
|
-
height: 100%; // So that list buttons can be sticky at the bottom;
|
|
221
|
-
}
|
|
222
237
|
}
|
|
223
238
|
|
|
224
239
|
// NOTE: This is not nested inside `.dito-container` so that other
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
v-show="!isActive"
|
|
13
13
|
)
|
|
14
14
|
//- Use a <div> for inlined forms, as we shouldn't nest actual <form> tags.
|
|
15
|
-
component.dito-scroll(
|
|
15
|
+
component.dito-scroll-parent(
|
|
16
16
|
v-show="isActive"
|
|
17
17
|
:is="isNestedRoute ? 'div' : 'form'"
|
|
18
18
|
@submit.prevent
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
:meta="meta"
|
|
25
25
|
:store="store"
|
|
26
26
|
:disabled="isLoading"
|
|
27
|
-
|
|
27
|
+
scrollable
|
|
28
|
+
headerInMenu
|
|
29
|
+
generateLabels
|
|
28
30
|
)
|
|
29
31
|
template(#buttons)
|
|
30
32
|
DitoButtons.dito-buttons-round.dito-buttons-main.dito-buttons-large(
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
.dito-pane(
|
|
4
4
|
v-if="isPopulated && componentSchemas.length > 0"
|
|
5
5
|
v-show="visible"
|
|
6
|
+
:class=`{
|
|
7
|
+
'dito-pane--single': isSingleComponent
|
|
8
|
+
}`
|
|
6
9
|
)
|
|
7
10
|
template(
|
|
8
11
|
v-for=`{
|
|
@@ -57,7 +60,7 @@ export default DitoComponent.component('DitoPane', {
|
|
|
57
60
|
single: { type: Boolean, default: false },
|
|
58
61
|
visible: { type: Boolean, default: true },
|
|
59
62
|
disabled: { type: Boolean, default: false },
|
|
60
|
-
generateLabels: { type: Boolean, default:
|
|
63
|
+
generateLabels: { type: Boolean, default: false }
|
|
61
64
|
},
|
|
62
65
|
|
|
63
66
|
computed: {
|
|
@@ -141,24 +144,33 @@ export default DitoComponent.component('DitoPane', {
|
|
|
141
144
|
@import '../styles/_imports';
|
|
142
145
|
|
|
143
146
|
.dito-pane {
|
|
147
|
+
$max-width: $content-width + 2 * $content-padding;
|
|
148
|
+
|
|
144
149
|
display: flex;
|
|
145
150
|
position: relative;
|
|
146
151
|
flex-flow: row wrap;
|
|
147
152
|
align-content: flex-start;
|
|
148
153
|
align-items: baseline;
|
|
154
|
+
padding: $content-padding;
|
|
149
155
|
// Remove the padding added by `.dito-container` inside `.dito-pane`:
|
|
150
156
|
margin: (-$form-spacing) (-$form-spacing-half);
|
|
151
157
|
// Add removed horizontal margin again to max-width:
|
|
152
|
-
max-width: $
|
|
158
|
+
max-width: $max-width + 2 * $form-spacing-half;
|
|
153
159
|
// Use `flex: 0%` for all `.dito-pane` except `.dito-pane-main`,
|
|
154
160
|
// so that the `.dito-buttons-main` can be moved all the way to the bottom.
|
|
155
161
|
flex: 0%;
|
|
156
162
|
|
|
163
|
+
&--single {
|
|
164
|
+
// Clear settings from above.
|
|
165
|
+
margin: 0;
|
|
166
|
+
max-width: $max-width;
|
|
167
|
+
}
|
|
168
|
+
|
|
157
169
|
&.dito-pane-main {
|
|
158
170
|
flex: 100%;
|
|
159
171
|
}
|
|
160
172
|
|
|
161
|
-
.dito-schema-header
|
|
173
|
+
.dito-schema-header + & {
|
|
162
174
|
// Clear top-margin if the components are preceded by a schema header.
|
|
163
175
|
margin-top: 0;
|
|
164
176
|
}
|
|
@@ -13,6 +13,7 @@ component.dito-panel(
|
|
|
13
13
|
:store="store"
|
|
14
14
|
:disabled="disabled"
|
|
15
15
|
:hasOwnData="hasOwnData"
|
|
16
|
+
generateLabels
|
|
16
17
|
)
|
|
17
18
|
template(#before)
|
|
18
19
|
h2.dito-panel__header(:class="{ 'dito-panel__header--sticky': sticky }")
|
|
@@ -163,7 +164,9 @@ export default DitoComponent.component('DitoPanel', {
|
|
|
163
164
|
@import '../styles/_imports';
|
|
164
165
|
|
|
165
166
|
.dito-panel {
|
|
166
|
-
|
|
167
|
+
& + & {
|
|
168
|
+
margin-top: $content-padding;
|
|
169
|
+
}
|
|
167
170
|
|
|
168
171
|
&__header {
|
|
169
172
|
display: block;
|
|
@@ -180,7 +183,7 @@ export default DitoComponent.component('DitoPanel', {
|
|
|
180
183
|
$form-spacing;
|
|
181
184
|
|
|
182
185
|
position: sticky;
|
|
183
|
-
top:
|
|
186
|
+
top: 0;
|
|
184
187
|
margin-bottom: $margin;
|
|
185
188
|
z-index: 1;
|
|
186
189
|
|
|
@@ -218,7 +221,9 @@ export default DitoComponent.component('DitoPanel', {
|
|
|
218
221
|
border-bottom-right-radius: $border-radius;
|
|
219
222
|
|
|
220
223
|
> .dito-schema-content {
|
|
221
|
-
|
|
224
|
+
> .dito-pane {
|
|
225
|
+
padding: $form-spacing-half $form-spacing;
|
|
226
|
+
}
|
|
222
227
|
|
|
223
228
|
.dito-container {
|
|
224
229
|
padding: $form-spacing-half;
|
|
@@ -232,7 +237,7 @@ export default DitoComponent.component('DitoPanel', {
|
|
|
232
237
|
> .dito-buttons {
|
|
233
238
|
--button-margin: #{$form-spacing};
|
|
234
239
|
|
|
235
|
-
padding: $form-spacing-
|
|
240
|
+
padding: 0 $form-spacing $form-spacing;
|
|
236
241
|
|
|
237
242
|
.dito-container {
|
|
238
243
|
padding: 0;
|
|
@@ -369,15 +369,6 @@ function addRoutes(router, routes) {
|
|
|
369
369
|
.dito-root {
|
|
370
370
|
.dito-page {
|
|
371
371
|
background: $content-color-background;
|
|
372
|
-
// The root-level views and forms may have a `.dito-schema-header` that
|
|
373
|
-
// should appear layered over `.dito-menu`, while having `overlay: hidden`
|
|
374
|
-
// set by `.dito-scroll-parent` to delegate scrolling to `.dito-scroll`.
|
|
375
|
-
// In order to not have the header clipped, adjust the top here:
|
|
376
|
-
> .dito-form,
|
|
377
|
-
> .dito-view {
|
|
378
|
-
margin-top: -$menu-height;
|
|
379
|
-
padding-top: $menu-height;
|
|
380
|
-
}
|
|
381
372
|
}
|
|
382
373
|
}
|
|
383
374
|
</style>
|
|
@@ -3,35 +3,39 @@ slot(name="before")
|
|
|
3
3
|
.dito-schema(
|
|
4
4
|
v-bind="$attrs"
|
|
5
5
|
)
|
|
6
|
-
.dito-schema-content
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
:
|
|
6
|
+
.dito-schema-content(:class="{ 'dito-scroll': scrollable }")
|
|
7
|
+
Teleport(
|
|
8
|
+
to=".dito-menu"
|
|
9
|
+
:disabled="!headerInMenu"
|
|
10
10
|
)
|
|
11
|
-
|
|
12
|
-
v-if="hasLabel"
|
|
13
|
-
:
|
|
14
|
-
:dataPath="dataPath"
|
|
15
|
-
:collapsible="collapsible"
|
|
16
|
-
:collapsed="!opened"
|
|
17
|
-
@expand="onExpand"
|
|
11
|
+
.dito-schema-header(
|
|
12
|
+
v-if="hasLabel || hasTabs || clipboard"
|
|
13
|
+
:class="{ 'dito-schema-header--menu': headerInMenu }"
|
|
18
14
|
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
DitoLabel(
|
|
16
|
+
v-if="hasLabel"
|
|
17
|
+
:label="label"
|
|
18
|
+
:dataPath="dataPath"
|
|
19
|
+
:collapsible="collapsible"
|
|
20
|
+
:collapsed="!opened"
|
|
21
|
+
@expand="onExpand"
|
|
22
|
+
)
|
|
23
|
+
//- Pass edit-buttons through to dito-label's own edit-buttons slot:
|
|
24
|
+
template(
|
|
25
|
+
v-if="inlined"
|
|
26
|
+
#edit-buttons
|
|
27
|
+
)
|
|
28
|
+
slot(name="edit-buttons")
|
|
29
|
+
DitoTabs(
|
|
30
|
+
v-if="tabs"
|
|
31
|
+
:tabs="tabs"
|
|
32
|
+
:selectedTab="selectedTab"
|
|
33
|
+
)
|
|
34
|
+
DitoClipboard(
|
|
35
|
+
:clipboard="clipboard"
|
|
36
|
+
:dataPath="dataPath"
|
|
37
|
+
:data="data"
|
|
23
38
|
)
|
|
24
|
-
slot(name="edit-buttons")
|
|
25
|
-
DitoTabs(
|
|
26
|
-
v-if="tabs"
|
|
27
|
-
:tabs="tabs"
|
|
28
|
-
:selectedTab="selectedTab"
|
|
29
|
-
)
|
|
30
|
-
DitoClipboard(
|
|
31
|
-
:clipboard="clipboard"
|
|
32
|
-
:dataPath="dataPath"
|
|
33
|
-
:data="data"
|
|
34
|
-
)
|
|
35
39
|
template(
|
|
36
40
|
v-if="hasTabs"
|
|
37
41
|
)
|
|
@@ -78,6 +82,7 @@ slot(name="before")
|
|
|
78
82
|
v-else-if="isPopulated"
|
|
79
83
|
)
|
|
80
84
|
DitoPanels(
|
|
85
|
+
:class="{ 'dito-scroll': scrollable }"
|
|
81
86
|
:panels="panelEntries"
|
|
82
87
|
:data="data"
|
|
83
88
|
:meta="meta"
|
|
@@ -135,9 +140,10 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
135
140
|
disabled: { type: Boolean, default: false },
|
|
136
141
|
collapsed: { type: Boolean, default: false },
|
|
137
142
|
collapsible: { type: Boolean, default: false },
|
|
138
|
-
|
|
143
|
+
scrollable: { type: Boolean, default: false },
|
|
139
144
|
hasOwnData: { type: Boolean, default: false },
|
|
140
|
-
|
|
145
|
+
headerInMenu: { type: Boolean, default: false },
|
|
146
|
+
generateLabels: { type: Boolean, default: false }
|
|
141
147
|
},
|
|
142
148
|
|
|
143
149
|
data() {
|
|
@@ -701,8 +707,12 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
701
707
|
grid-row-end: none;
|
|
702
708
|
}
|
|
703
709
|
|
|
704
|
-
|
|
705
|
-
|
|
710
|
+
&.dito-scroll::after {
|
|
711
|
+
// Eat up negative margin of the last child to prevent overscroll.
|
|
712
|
+
content: '';
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
max-width: $content-width + 2 * $content-padding;
|
|
706
716
|
}
|
|
707
717
|
|
|
708
718
|
> .dito-buttons,
|
|
@@ -730,6 +740,11 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
730
740
|
margin: $content-padding $form-spacing-half $form-spacing-half;
|
|
731
741
|
}
|
|
732
742
|
}
|
|
743
|
+
|
|
744
|
+
.dito-pane-main + .dito-buttons-main {
|
|
745
|
+
// Needed forms with sticky main buttons.
|
|
746
|
+
margin-bottom: 0;
|
|
747
|
+
}
|
|
733
748
|
}
|
|
734
749
|
|
|
735
750
|
.dito-schema-header {
|
|
@@ -752,8 +767,8 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
752
767
|
}
|
|
753
768
|
}
|
|
754
769
|
|
|
755
|
-
|
|
756
|
-
//
|
|
770
|
+
&--menu {
|
|
771
|
+
// Align the tabs on top of to the header menu.
|
|
757
772
|
position: absolute;
|
|
758
773
|
height: $menu-height;
|
|
759
774
|
padding: 0 $menu-padding-hor;
|
|
@@ -773,11 +788,5 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
773
788
|
font-size: $menu-font-size;
|
|
774
789
|
}
|
|
775
790
|
}
|
|
776
|
-
|
|
777
|
-
button.dito-label {
|
|
778
|
-
width: 100%;
|
|
779
|
-
// Catch all clicks, even when it would be partially covered by schema.
|
|
780
|
-
z-index: 1;
|
|
781
|
-
}
|
|
782
791
|
}
|
|
783
792
|
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
DitoSchema.dito-schema-inlined(
|
|
3
|
+
:class="{ 'dito-schema-compact': isCompact }"
|
|
3
4
|
:schema="schema"
|
|
4
5
|
:dataPath="dataPath"
|
|
5
6
|
:data="data"
|
|
@@ -11,7 +12,6 @@ DitoSchema.dito-schema-inlined(
|
|
|
11
12
|
:collapsed="collapsed"
|
|
12
13
|
:collapsible="collapsible"
|
|
13
14
|
:generateLabels="!isCompact"
|
|
14
|
-
:class="{ 'dito-schema-compact': isCompact }"
|
|
15
15
|
)
|
|
16
16
|
//- Render dito-edit-buttons for inlined schemas separately from all
|
|
17
17
|
//- others in `TypeList` as a scope, for better handling of layout.
|
|
@@ -71,8 +71,6 @@ export default DitoComponent.component('DitoSchemaInlined', {
|
|
|
71
71
|
|
|
72
72
|
.dito-schema-inlined {
|
|
73
73
|
> .dito-schema-content {
|
|
74
|
-
padding: 0;
|
|
75
|
-
|
|
76
74
|
> .dito-schema-header {
|
|
77
75
|
// Change spacing so .dito-label covers the full .dito-schema-header.
|
|
78
76
|
margin: -$form-spacing;
|
|
@@ -90,11 +88,10 @@ export default DitoComponent.component('DitoSchemaInlined', {
|
|
|
90
88
|
// .dito-schema-content, due to grid-template-rows: min-content
|
|
91
89
|
min-height: 2em;
|
|
92
90
|
}
|
|
91
|
+
}
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
min-height: $form-spacing;
|
|
97
|
-
}
|
|
93
|
+
> .dito-pane {
|
|
94
|
+
padding: 0;
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
nav.dito-
|
|
2
|
+
nav.dito-sidebar.dito-scroll-parent
|
|
3
3
|
h1 {{ appState.title }}
|
|
4
4
|
ul.dito-scroll
|
|
5
5
|
li(
|
|
@@ -34,7 +34,7 @@ export default DitoComponent.component('DitoMenu', {
|
|
|
34
34
|
<style lang="scss">
|
|
35
35
|
@import '../styles/_imports';
|
|
36
36
|
|
|
37
|
-
.dito-
|
|
37
|
+
.dito-sidebar {
|
|
38
38
|
flex: initial;
|
|
39
39
|
font-size: $menu-font-size;
|
|
40
40
|
white-space: nowrap;
|
|
@@ -14,14 +14,14 @@ template(
|
|
|
14
14
|
v-else-if="shouldRender(viewSchema)"
|
|
15
15
|
:data-resource="sourceSchema.path"
|
|
16
16
|
)
|
|
17
|
-
DitoSchema
|
|
17
|
+
DitoSchema(
|
|
18
18
|
:schema="viewSchema"
|
|
19
19
|
:data="data"
|
|
20
20
|
:meta="meta"
|
|
21
21
|
:store="getChildStore(name)"
|
|
22
22
|
:disabled="isLoading"
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
scrollable
|
|
24
|
+
headerInMenu
|
|
25
25
|
)
|
|
26
26
|
</template>
|
|
27
27
|
|
package/src/components/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// convention is in order of encountered hierarchy in the DOM.
|
|
5
5
|
|
|
6
6
|
export { default as DitoRoot } from './DitoRoot.vue'
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as DitoSidebar } from './DitoSidebar.vue'
|
|
8
8
|
export { default as DitoHeader } from './DitoHeader.vue'
|
|
9
9
|
export { default as DitoAccount } from './DitoAccount.vue'
|
|
10
10
|
export { default as DitoDialog } from './DitoDialog.vue'
|
package/src/mixins/DitoMixin.js
CHANGED
package/src/styles/_button.scss
CHANGED
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
font-size: $menu-font-size;
|
|
119
119
|
flex-flow: row wrap;
|
|
120
120
|
justify-content: center;
|
|
121
|
+
padding-bottom: $content-padding;
|
|
121
122
|
|
|
122
123
|
.dito-container {
|
|
123
124
|
// Do not specify this on .dito-buttons directly as it would break borders
|
|
@@ -130,13 +131,12 @@
|
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
&.dito-buttons-main {
|
|
134
|
+
&.dito-buttons-main:not(:empty) {
|
|
134
135
|
position: sticky;
|
|
135
136
|
bottom: 0;
|
|
136
137
|
width: 100%;
|
|
137
138
|
align-self: flex-end;
|
|
138
139
|
z-index: 500;
|
|
139
|
-
padding-bottom: $content-padding;
|
|
140
140
|
margin-bottom: -$content-padding;
|
|
141
141
|
margin-top: 2 * $content-padding;
|
|
142
142
|
box-shadow: 0 (-$content-padding) $content-padding (-$content-padding)
|
|
@@ -22,7 +22,6 @@ export default DitoTypeComponent.register('component', {
|
|
|
22
22
|
// Override the standard `defaultValue: null` to not set any data for custom
|
|
23
23
|
// components, unless they provide a default value.
|
|
24
24
|
defaultValue: () => undefined, // Callback to override `defaultValue: null`
|
|
25
|
-
alignBottom: false,
|
|
26
25
|
ignoreMissingValue: schema => !('default' in schema),
|
|
27
26
|
|
|
28
27
|
async processSchema(api, schema) {
|
|
@@ -167,7 +167,6 @@ import { pickBy, equals, hyphenate } from '@ditojs/utils'
|
|
|
167
167
|
// @vue/component
|
|
168
168
|
export default DitoTypeComponent.register('list', {
|
|
169
169
|
mixins: [SourceMixin, SortableMixin],
|
|
170
|
-
alignBottom: false,
|
|
171
170
|
|
|
172
171
|
getSourceType(type) {
|
|
173
172
|
// No need for transformation here. See TypeTreeList for details.
|
|
@@ -338,6 +337,26 @@ export default DitoTypeComponent.register('list', {
|
|
|
338
337
|
display: grid;
|
|
339
338
|
grid-template-rows: min-content;
|
|
340
339
|
height: 100%;
|
|
340
|
+
|
|
341
|
+
// Make single list header, navigation and buttons sticky to the top and
|
|
342
|
+
// bottom:
|
|
343
|
+
.dito-navigation {
|
|
344
|
+
position: sticky;
|
|
345
|
+
top: 0;
|
|
346
|
+
margin-top: -$content-padding;
|
|
347
|
+
padding-top: $content-padding;
|
|
348
|
+
background: $content-color-background;
|
|
349
|
+
z-index: 1;
|
|
350
|
+
|
|
351
|
+
+ .dito-table {
|
|
352
|
+
.dito-table-head {
|
|
353
|
+
position: sticky;
|
|
354
|
+
top: calc($input-height + $content-padding + $content-padding-half);
|
|
355
|
+
background: $content-color-background;
|
|
356
|
+
z-index: 1;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
341
360
|
}
|
|
342
361
|
}
|
|
343
362
|
</style>
|
|
@@ -63,8 +63,6 @@ import { resolveSchemaComponent } from '../utils/schema.js'
|
|
|
63
63
|
export default DitoTypeComponent.register('object', {
|
|
64
64
|
mixins: [SourceMixin],
|
|
65
65
|
|
|
66
|
-
alignBottom: false,
|
|
67
|
-
|
|
68
66
|
getSourceType(type) {
|
|
69
67
|
// No need for transformation here. See TypeTreeList for details.
|
|
70
68
|
return type
|