@ditojs/admin 2.9.3 → 2.9.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 +30 -16
- package/dist/dito-admin.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/DitoClipboard.vue +11 -5
- package/src/components/DitoCreateButton.vue +7 -0
- package/src/components/DitoDialog.vue +2 -1
- package/src/components/DitoForm.vue +1 -0
- package/src/components/DitoFormNested.vue +3 -6
- package/src/components/DitoPane.vue +34 -20
- package/src/components/DitoPanel.vue +1 -16
- package/src/components/DitoPanels.vue +1 -1
- package/src/components/DitoSchema.vue +3 -0
- package/src/components/DitoView.vue +1 -0
- package/src/utils/options.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.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.7"
|
|
84
84
|
},
|
|
85
85
|
"types": "types",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "e3e70442d05a10fd6a82c4ed58f9580b3643d4ab",
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "vite build",
|
|
89
89
|
"watch": "yarn build --mode 'development' --watch",
|
|
@@ -64,14 +64,16 @@ export default DitoComponent.component('DitoClipboard', {
|
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
watch: {
|
|
67
|
+
// Check right away also in case there's already data (e.g. create form):
|
|
67
68
|
'parentComponent.hasData': {
|
|
68
|
-
// Check right away also in case there's already data (e.g. create form).
|
|
69
69
|
immediate: true,
|
|
70
|
-
handler
|
|
71
|
-
this.copyEnabled = hasData
|
|
72
|
-
}
|
|
70
|
+
handler: 'updateCopy'
|
|
73
71
|
},
|
|
74
|
-
|
|
72
|
+
|
|
73
|
+
'appState.clipboardData': {
|
|
74
|
+
immediate: true,
|
|
75
|
+
handler: 'updatePaste'
|
|
76
|
+
}
|
|
75
77
|
},
|
|
76
78
|
|
|
77
79
|
mounted() {
|
|
@@ -109,6 +111,10 @@ export default DitoComponent.component('DitoClipboard', {
|
|
|
109
111
|
return this.checkClipboardData(clipboardData)
|
|
110
112
|
},
|
|
111
113
|
|
|
114
|
+
updateCopy() {
|
|
115
|
+
this.copyEnabled = this.parentComponent.hasData
|
|
116
|
+
},
|
|
117
|
+
|
|
112
118
|
async updatePaste() {
|
|
113
119
|
this.pasteEnabled = !!this.checkClipboardData(this.appState.clipboardData)
|
|
114
120
|
if (!this.pasteEnabled && this.appState.agent.chrome) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
role="dialog"
|
|
5
5
|
aria-expanded="true"
|
|
6
6
|
aria-modal="true"
|
|
7
|
-
:style="{ '--width': `${settings.width}px` }"
|
|
7
|
+
:style="{ '--width': settings.width ? `${settings.width}px` : null }"
|
|
8
8
|
@mouseup="onMouseUp"
|
|
9
9
|
)
|
|
10
10
|
UseFocusTrap.dito-dialog__focus-trap(:options="focusTrapOptions")
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
DitoSchema(
|
|
20
20
|
:schema="schema"
|
|
21
21
|
:data="dialogData"
|
|
22
|
+
padding="root"
|
|
22
23
|
scrollable
|
|
23
24
|
generateLabels
|
|
24
25
|
)
|
|
@@ -10,11 +10,8 @@ export default DitoComponent.component('DitoFormNested', {
|
|
|
10
10
|
|
|
11
11
|
<style lang="scss">
|
|
12
12
|
.dito-form-nested {
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
// being cropped.
|
|
17
|
-
overflow: visible;
|
|
18
|
-
}
|
|
13
|
+
// No scrolling inside nested forms, and prevent open .multiselect from
|
|
14
|
+
// being cropped.
|
|
15
|
+
overflow: visible;
|
|
19
16
|
}
|
|
20
17
|
</style>
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
.dito-pane(
|
|
4
4
|
v-if="isPopulated && componentSchemas.length > 0"
|
|
5
5
|
v-resize="onResizePane"
|
|
6
|
-
:class
|
|
7
|
-
'dito-pane--single': isSingleComponent
|
|
8
|
-
}`
|
|
6
|
+
:class="classes"
|
|
9
7
|
)
|
|
10
8
|
template(
|
|
11
9
|
v-for=`{
|
|
@@ -63,6 +61,7 @@ export default DitoComponent.component('DitoPane', {
|
|
|
63
61
|
meta: { type: Object, required: true },
|
|
64
62
|
store: { type: Object, required: true },
|
|
65
63
|
tab: { type: String, default: null },
|
|
64
|
+
padding: { type: String, default: null },
|
|
66
65
|
single: { type: Boolean, default: false },
|
|
67
66
|
disabled: { type: Boolean, default: false },
|
|
68
67
|
generateLabels: { type: Boolean, default: false },
|
|
@@ -76,6 +75,13 @@ export default DitoComponent.component('DitoPane', {
|
|
|
76
75
|
},
|
|
77
76
|
|
|
78
77
|
computed: {
|
|
78
|
+
classes() {
|
|
79
|
+
return {
|
|
80
|
+
'dito-pane--single': this.isSingleComponent,
|
|
81
|
+
[`dito-pane--padding-${this.padding}`]: !!this.padding
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
79
85
|
tabComponent() {
|
|
80
86
|
return this.tab ? this : this.$tabComponent()
|
|
81
87
|
},
|
|
@@ -249,7 +255,7 @@ export default DitoComponent.component('DitoPane', {
|
|
|
249
255
|
flex: 100%;
|
|
250
256
|
}
|
|
251
257
|
|
|
252
|
-
|
|
258
|
+
&--padding-root {
|
|
253
259
|
// A root-level pane inside a scroll view. Clear negative margin from above.
|
|
254
260
|
margin: 0;
|
|
255
261
|
// Move the negative margin used to remove the padding added by
|
|
@@ -264,26 +270,34 @@ export default DitoComponent.component('DitoPane', {
|
|
|
264
270
|
// Reduce top spacing when the first row has labels.
|
|
265
271
|
margin-top: -$form-spacing-half;
|
|
266
272
|
}
|
|
267
|
-
}
|
|
268
273
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
// Display a ruler between tabbed components and towards the .dito-buttons
|
|
275
|
+
&__tab + &__main {
|
|
276
|
+
&::before {
|
|
277
|
+
// Use a pseudo element to display a ruler with proper margins
|
|
278
|
+
display: block;
|
|
279
|
+
content: '';
|
|
280
|
+
width: 100%;
|
|
281
|
+
border-bottom: $border-style;
|
|
282
|
+
// Shift ruler up by $root-padding to exclude removed $form-spacing-half
|
|
283
|
+
margin: (-$root-padding) $form-spacing-half $root-padding;
|
|
284
|
+
padding: $form-spacing-half;
|
|
285
|
+
}
|
|
280
286
|
}
|
|
287
|
+
|
|
288
|
+
&__main + .dito-buttons-main {
|
|
289
|
+
// Needed forms with sticky main buttons.
|
|
290
|
+
margin: $content-padding;
|
|
291
|
+
margin-bottom: 0;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&--padding-nested {
|
|
296
|
+
padding: $form-spacing;
|
|
281
297
|
}
|
|
282
298
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
margin: $content-padding;
|
|
286
|
-
margin-bottom: 0;
|
|
299
|
+
&--padding-panel {
|
|
300
|
+
padding: $form-spacing;
|
|
287
301
|
}
|
|
288
302
|
|
|
289
303
|
.dito-break {
|
|
@@ -12,6 +12,7 @@ component.dito-panel(
|
|
|
12
12
|
:data="panelData"
|
|
13
13
|
:meta="meta"
|
|
14
14
|
:store="store"
|
|
15
|
+
padding="panel"
|
|
15
16
|
:disabled="disabled"
|
|
16
17
|
:hasOwnData="hasOwnData"
|
|
17
18
|
generateLabels
|
|
@@ -222,22 +223,6 @@ export default DitoComponent.component('DitoPanel', {
|
|
|
222
223
|
border-bottom-right-radius: $border-radius;
|
|
223
224
|
|
|
224
225
|
> .dito-schema-content {
|
|
225
|
-
> .dito-pane {
|
|
226
|
-
padding: $form-spacing;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.dito-pane {
|
|
230
|
-
margin: -$form-spacing-half;
|
|
231
|
-
|
|
232
|
-
&.dito-pane--single {
|
|
233
|
-
margin: 0;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
> .dito-container:not(.dito-container--single) {
|
|
237
|
-
padding: $form-spacing-half;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
226
|
.dito-object {
|
|
242
227
|
border: none;
|
|
243
228
|
padding: 0;
|
|
@@ -68,6 +68,7 @@ slot(name="before")
|
|
|
68
68
|
:data="data"
|
|
69
69
|
:meta="meta"
|
|
70
70
|
:store="store"
|
|
71
|
+
:padding="padding"
|
|
71
72
|
:single="!inlined && !hasMainPane"
|
|
72
73
|
:disabled="disabled"
|
|
73
74
|
:generateLabels="generateLabels"
|
|
@@ -81,6 +82,7 @@ slot(name="before")
|
|
|
81
82
|
:data="data"
|
|
82
83
|
:meta="meta"
|
|
83
84
|
:store="store"
|
|
85
|
+
:padding="padding"
|
|
84
86
|
:single="!inlined && !hasTabs"
|
|
85
87
|
:disabled="disabled"
|
|
86
88
|
:generateLabels="generateLabels"
|
|
@@ -143,6 +145,7 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
143
145
|
meta: { type: Object, default: () => ({}) },
|
|
144
146
|
store: { type: Object, default: () => ({}) },
|
|
145
147
|
label: { type: [String, Object], default: null },
|
|
148
|
+
padding: { type: String, default: null },
|
|
146
149
|
inlined: { type: Boolean, default: false },
|
|
147
150
|
disabled: { type: Boolean, default: false },
|
|
148
151
|
collapsed: { type: Boolean, default: false },
|