@ditojs/admin 2.2.7-debug.5 → 2.2.8
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 +652 -676
- 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 +2 -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 +16 -3
- package/src/components/DitoPanel.vue +9 -4
- package/src/components/DitoRoot.vue +0 -9
- package/src/components/DitoSchema.vue +42 -48
- 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 +16 -8
- package/src/mixins/SourceMixin.js +1 -9
- package/src/mixins/TypeMixin.js +3 -6
- package/src/styles/_button.scss +1 -1
- 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 -8
- 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/filter.js +0 -17
- package/src/utils/options.js +0 -1
- package/src/utils/schema.js +0 -4
package/src/styles/_button.scss
CHANGED
|
@@ -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.
|
|
@@ -195,17 +194,10 @@ export default DitoTypeComponent.register('list', {
|
|
|
195
194
|
},
|
|
196
195
|
set query(query) {
|
|
197
196
|
const component = getListComponent()
|
|
198
|
-
console.log('set query', !!component)
|
|
199
197
|
if (component) {
|
|
200
198
|
// Filter out undefined values for comparing with equals()
|
|
201
199
|
const filter = obj => pickBy(obj, value => value !== undefined)
|
|
202
|
-
console.log(
|
|
203
|
-
'set query',
|
|
204
|
-
JSON.stringify(filter(query)),
|
|
205
|
-
JSON.stringify(filter(component.query))
|
|
206
|
-
)
|
|
207
200
|
if (!equals(filter(query), filter(component.query))) {
|
|
208
|
-
console.log('load data')
|
|
209
201
|
component.query = query
|
|
210
202
|
component.loadData(false)
|
|
211
203
|
}
|
|
@@ -345,6 +337,26 @@ export default DitoTypeComponent.register('list', {
|
|
|
345
337
|
display: grid;
|
|
346
338
|
grid-template-rows: min-content;
|
|
347
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
|
+
}
|
|
348
360
|
}
|
|
349
361
|
}
|
|
350
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.dito-section(:class="{ 'dito-section-labelled': !!schema.label }")
|
|
3
|
-
DitoPane.dito-
|
|
3
|
+
DitoPane.dito-section__pane(
|
|
4
4
|
:schema="getItemFormSchema(schema, item, context)"
|
|
5
5
|
:dataPath="dataPath"
|
|
6
6
|
:data="item"
|
|
@@ -20,7 +20,6 @@ export default DitoTypeComponent.register('section', {
|
|
|
20
20
|
ignoreMissingValue: schema => !schema.nested && !('default' in schema),
|
|
21
21
|
defaultNested: false,
|
|
22
22
|
generateLabel: false,
|
|
23
|
-
alignBottom: false,
|
|
24
23
|
|
|
25
24
|
computed: {
|
|
26
25
|
item() {
|
|
@@ -49,5 +48,9 @@ export default DitoTypeComponent.register('section', {
|
|
|
49
48
|
padding: $form-spacing;
|
|
50
49
|
box-sizing: border-box;
|
|
51
50
|
}
|
|
51
|
+
|
|
52
|
+
.dito-section__pane {
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
52
55
|
}
|
|
53
56
|
</style>
|
package/src/utils/filter.js
CHANGED
|
@@ -67,7 +67,6 @@ export const filterComponents = {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export function createFiltersPanel(api, filters, dataPath, proxy) {
|
|
70
|
-
console.log('createFiltersPanel()', dataPath)
|
|
71
70
|
const { sticky, ...filterSchemas } = filters
|
|
72
71
|
const panel = {
|
|
73
72
|
type: 'panel',
|
|
@@ -110,13 +109,6 @@ export function createFiltersPanel(api, filters, dataPath, proxy) {
|
|
|
110
109
|
|
|
111
110
|
methods: {
|
|
112
111
|
applyFilters() {
|
|
113
|
-
console.log(
|
|
114
|
-
'applyFilters()',
|
|
115
|
-
JSON.stringify({
|
|
116
|
-
filters: this.filters,
|
|
117
|
-
data: this.data
|
|
118
|
-
})
|
|
119
|
-
)
|
|
120
112
|
proxy.query = {
|
|
121
113
|
...proxy.query,
|
|
122
114
|
filter: this.filters,
|
|
@@ -126,7 +118,6 @@ export function createFiltersPanel(api, filters, dataPath, proxy) {
|
|
|
126
118
|
},
|
|
127
119
|
|
|
128
120
|
clearFilters() {
|
|
129
|
-
console.log('clearFilters()')
|
|
130
121
|
this.resetData()
|
|
131
122
|
this.applyFilters()
|
|
132
123
|
}
|
|
@@ -212,13 +203,6 @@ function getComponentsForFilter(schema, name) {
|
|
|
212
203
|
}
|
|
213
204
|
|
|
214
205
|
function formatFiltersData(schema, data) {
|
|
215
|
-
console.log(
|
|
216
|
-
'formatFiltersData()',
|
|
217
|
-
JSON.stringify({
|
|
218
|
-
data: data ?? null,
|
|
219
|
-
schema: schema ? Object.keys(schema.components) : null
|
|
220
|
-
})
|
|
221
|
-
)
|
|
222
206
|
const filters = []
|
|
223
207
|
for (const name in data) {
|
|
224
208
|
const entry = data[name]
|
|
@@ -233,7 +217,6 @@ function formatFiltersData(schema, data) {
|
|
|
233
217
|
}
|
|
234
218
|
}
|
|
235
219
|
}
|
|
236
|
-
console.log('formatFiltersData() =>', filters)
|
|
237
220
|
return filters
|
|
238
221
|
}
|
|
239
222
|
|
package/src/utils/options.js
CHANGED
package/src/utils/schema.js
CHANGED
|
@@ -474,10 +474,6 @@ export function omitPadding(schema) {
|
|
|
474
474
|
return !!getTypeOptions(schema)?.omitPadding
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
export function alignBottom(schema) {
|
|
478
|
-
return !!getTypeOptions(schema)?.alignBottom
|
|
479
|
-
}
|
|
480
|
-
|
|
481
477
|
export function getDefaultValue(schema) {
|
|
482
478
|
// Support default values both on schema and on component level.
|
|
483
479
|
// NOTE: At the time of creation, components may not be instantiated, (e.g. if
|