@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.
Files changed (37) hide show
  1. package/dist/dito-admin.es.js +652 -676
  2. package/dist/dito-admin.umd.js +4 -4
  3. package/dist/style.css +1 -1
  4. package/package.json +2 -2
  5. package/src/DitoTypeComponent.js +0 -1
  6. package/src/components/DitoButtons.vue +0 -1
  7. package/src/components/DitoContainer.vue +28 -13
  8. package/src/components/DitoDialog.vue +2 -1
  9. package/src/components/DitoForm.vue +4 -2
  10. package/src/components/DitoHeader.vue +2 -0
  11. package/src/components/DitoLabel.vue +0 -1
  12. package/src/components/DitoPane.vue +16 -3
  13. package/src/components/DitoPanel.vue +9 -4
  14. package/src/components/DitoRoot.vue +0 -9
  15. package/src/components/DitoSchema.vue +42 -48
  16. package/src/components/DitoSchemaInlined.vue +4 -7
  17. package/src/components/{DitoMenu.vue → DitoSidebar.vue} +2 -2
  18. package/src/components/DitoView.vue +3 -3
  19. package/src/components/index.js +1 -1
  20. package/src/mixins/DitoMixin.js +16 -8
  21. package/src/mixins/SourceMixin.js +1 -9
  22. package/src/mixins/TypeMixin.js +3 -6
  23. package/src/styles/_button.scss +1 -1
  24. package/src/types/DitoTypeCode.vue +0 -1
  25. package/src/types/DitoTypeComponent.vue +0 -1
  26. package/src/types/DitoTypeLabel.vue +1 -2
  27. package/src/types/DitoTypeList.vue +20 -8
  28. package/src/types/DitoTypeMarkup.vue +0 -2
  29. package/src/types/DitoTypeObject.vue +0 -2
  30. package/src/types/DitoTypePanel.vue +0 -1
  31. package/src/types/DitoTypeSection.vue +5 -2
  32. package/src/types/DitoTypeTextarea.vue +0 -1
  33. package/src/types/DitoTypeTreeList.vue +0 -2
  34. package/src/types/DitoTypeUpload.vue +0 -2
  35. package/src/utils/filter.js +0 -17
  36. package/src/utils/options.js +0 -1
  37. package/src/utils/schema.js +0 -4
@@ -130,7 +130,7 @@
130
130
  }
131
131
  }
132
132
 
133
- &.dito-buttons-main {
133
+ &.dito-buttons-main:not(:empty) {
134
134
  position: sticky;
135
135
  bottom: 0;
136
136
  width: 100%;
@@ -14,7 +14,6 @@ import CodeFlask from 'codeflask'
14
14
  // @vue/component
15
15
  export default DitoTypeComponent.register('code', {
16
16
  mixins: [DomMixin],
17
- alignBottom: false,
18
17
 
19
18
  computed: {
20
19
  lines() {
@@ -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) {
@@ -11,8 +11,7 @@ import DitoTypeComponent from '../DitoTypeComponent.js'
11
11
  // @vue/component
12
12
  export default DitoTypeComponent.register('label', {
13
13
  excludeValue: true,
14
- generateLabel: false,
15
- alignBottom: false
14
+ generateLabel: false
16
15
  })
17
16
  </script>
18
17
 
@@ -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>
@@ -83,8 +83,6 @@ export default DitoTypeComponent.register('markup', {
83
83
  Icon
84
84
  },
85
85
 
86
- alignBottom: false,
87
-
88
86
  data() {
89
87
  return {
90
88
  editor: null,
@@ -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
@@ -6,7 +6,6 @@ export default DitoTypeComponent.register('panel', {
6
6
  defaultValue: () => undefined, // Callback to override `defaultValue: null`
7
7
  excludeValue: true,
8
8
  generateLabel: false,
9
- alignBottom: false,
10
9
  omitPadding: true,
11
10
 
12
11
  getPanelSchema(api, schema) {
@@ -1,6 +1,6 @@
1
1
  <template lang="pug">
2
2
  .dito-section(:class="{ 'dito-section-labelled': !!schema.label }")
3
- DitoPane.dito-section-pane(
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>
@@ -17,7 +17,6 @@ import { getSchemaAccessor } from '../utils/accessor.js'
17
17
  export default DitoTypeComponent.register('textarea', {
18
18
  nativeField: true,
19
19
  textField: true,
20
- alignBottom: false,
21
20
 
22
21
  computed: {
23
22
  lines() {
@@ -35,8 +35,6 @@ export default DitoTypeComponent.register(
35
35
  {
36
36
  mixins: [SourceMixin],
37
37
 
38
- alignBottom: false,
39
-
40
38
  provide() {
41
39
  return { container: this }
42
40
  },
@@ -112,8 +112,6 @@ export default DitoTypeComponent.register('upload', {
112
112
  mixins: [SortableMixin],
113
113
  components: { VueUpload },
114
114
 
115
- alignBottom: false,
116
-
117
115
  data() {
118
116
  return {
119
117
  uploads: []
@@ -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
 
@@ -36,7 +36,6 @@ const ditoOptionKeys = [
36
36
  'generateLabel',
37
37
  'excludeValue',
38
38
  'ignoreMissingValue',
39
- 'alignBottom',
40
39
  'omitPadding',
41
40
  'processValue',
42
41
  'processSchema',
@@ -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