@ditojs/admin 2.2.7-debug.4 → 2.2.7-debug.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/admin",
3
- "version": "2.2.7-debug.4",
3
+ "version": "2.2.7-debug.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",
@@ -82,7 +82,7 @@
82
82
  "vite": "^4.3.1"
83
83
  },
84
84
  "types": "types",
85
- "gitHead": "3950959411aefbd9ea2ab5a13f7c6aacfcb60018",
85
+ "gitHead": "a7d0c07bd2b065bbd103e9bcd73ecaa91a1f58e8",
86
86
  "scripts": {
87
87
  "build": "vite build",
88
88
  "watch": "yarn build --mode 'development' --watch",
@@ -330,6 +330,16 @@ export default DitoComponent.component('DitoSchema', {
330
330
  }
331
331
  },
332
332
 
333
+ watch: {
334
+ schema() {
335
+ console.log('DitoSchema: schema changed', this.dataPath)
336
+ },
337
+
338
+ data() {
339
+ console.log('DitoSchema: data changed', this.dataPath)
340
+ }
341
+ },
342
+
333
343
  created() {
334
344
  this._register(true)
335
345
  this.setupSchemaFields()
@@ -25,6 +25,7 @@ import {
25
25
  parseDataPath,
26
26
  normalizeDataPath
27
27
  } from '@ditojs/utils'
28
+ import { replaceRoute } from '../utils/route.js'
28
29
 
29
30
  // @vue/component
30
31
  export default {
@@ -178,11 +179,11 @@ export default {
178
179
  }
179
180
  if (!equals(query, this.$route.query)) {
180
181
  // Tell the `$route` watcher to ignore the changed triggered here:
181
- this.ignoreRouteChange = true
182
- this.$router.replace({ query, hash: this.$route.hash })
182
+ // this.ignoreRouteChange = true
183
+ // this.$router.replace({ query, hash: this.$route.hash })
183
184
  // Change the route query parameters, but don't trigger a route
184
185
  // change, as that would cause the list to reload.
185
- // replaceRoute({ query })
186
+ replaceRoute({ query })
186
187
  }
187
188
  return query // Let getStoreAccessor() do the actual setting
188
189
  }
@@ -67,6 +67,7 @@ export const filterComponents = {
67
67
  }
68
68
 
69
69
  export function createFiltersPanel(api, filters, dataPath, proxy) {
70
+ console.log('createFiltersPanel()', dataPath)
70
71
  const { sticky, ...filterSchemas } = filters
71
72
  const panel = {
72
73
  type: 'panel',
@@ -112,8 +113,8 @@ export function createFiltersPanel(api, filters, dataPath, proxy) {
112
113
  console.log(
113
114
  'applyFilters()',
114
115
  JSON.stringify({
115
- data: this.data,
116
- filters: this.filters
116
+ filters: this.filters,
117
+ data: this.data
117
118
  })
118
119
  )
119
120
  proxy.query = {
@@ -214,8 +215,8 @@ function formatFiltersData(schema, data) {
214
215
  console.log(
215
216
  'formatFiltersData()',
216
217
  JSON.stringify({
217
- data,
218
- schema: Object.keys(schema?.components || {})
218
+ data: data ?? null,
219
+ schema: schema ? Object.keys(schema.components) : null
219
220
  })
220
221
  )
221
222
  const filters = []
@@ -232,6 +233,7 @@ function formatFiltersData(schema, data) {
232
233
  }
233
234
  }
234
235
  }
236
+ console.log('formatFiltersData() =>', filters)
235
237
  return filters
236
238
  }
237
239