@ditojs/admin 2.12.3 → 2.13.0

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.12.3",
3
+ "version": "2.13.0",
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",
@@ -33,57 +33,57 @@
33
33
  "not ie_mob > 0"
34
34
  ],
35
35
  "dependencies": {
36
- "@ditojs/ui": "^2.12.2",
37
- "@ditojs/utils": "^2.12.0",
38
- "@kyvg/vue3-notification": "https://github.com/ditojs/vue3-notification#dito",
36
+ "@ditojs/ui": "^2.13.0",
37
+ "@ditojs/utils": "^2.13.0",
38
+ "@kyvg/vue3-notification": "^3.0.2",
39
39
  "@lk77/vue3-color": "^3.0.6",
40
- "@tiptap/core": "^2.1.10",
41
- "@tiptap/extension-blockquote": "^2.1.10",
42
- "@tiptap/extension-bold": "^2.1.10",
43
- "@tiptap/extension-bullet-list": "^2.1.10",
44
- "@tiptap/extension-code": "^2.1.10",
45
- "@tiptap/extension-code-block": "^2.1.10",
46
- "@tiptap/extension-document": "^2.1.10",
47
- "@tiptap/extension-hard-break": "^2.1.10",
48
- "@tiptap/extension-heading": "^2.1.10",
49
- "@tiptap/extension-history": "^2.1.10",
50
- "@tiptap/extension-horizontal-rule": "^2.1.10",
51
- "@tiptap/extension-italic": "^2.1.10",
52
- "@tiptap/extension-link": "^2.1.10",
53
- "@tiptap/extension-list-item": "^2.1.10",
54
- "@tiptap/extension-ordered-list": "^2.1.10",
55
- "@tiptap/extension-paragraph": "^2.1.10",
56
- "@tiptap/extension-strike": "^2.1.10",
57
- "@tiptap/extension-text": "^2.1.10",
58
- "@tiptap/extension-underline": "^2.1.10",
59
- "@tiptap/pm": "^2.1.10",
60
- "@tiptap/vue-3": "^2.1.10",
40
+ "@tiptap/core": "^2.1.11",
41
+ "@tiptap/extension-blockquote": "^2.1.11",
42
+ "@tiptap/extension-bold": "^2.1.11",
43
+ "@tiptap/extension-bullet-list": "^2.1.11",
44
+ "@tiptap/extension-code": "^2.1.11",
45
+ "@tiptap/extension-code-block": "^2.1.11",
46
+ "@tiptap/extension-document": "^2.1.11",
47
+ "@tiptap/extension-hard-break": "^2.1.11",
48
+ "@tiptap/extension-heading": "^2.1.11",
49
+ "@tiptap/extension-history": "^2.1.11",
50
+ "@tiptap/extension-horizontal-rule": "^2.1.11",
51
+ "@tiptap/extension-italic": "^2.1.11",
52
+ "@tiptap/extension-link": "^2.1.11",
53
+ "@tiptap/extension-list-item": "^2.1.11",
54
+ "@tiptap/extension-ordered-list": "^2.1.11",
55
+ "@tiptap/extension-paragraph": "^2.1.11",
56
+ "@tiptap/extension-strike": "^2.1.11",
57
+ "@tiptap/extension-text": "^2.1.11",
58
+ "@tiptap/extension-underline": "^2.1.11",
59
+ "@tiptap/pm": "^2.1.11",
60
+ "@tiptap/vue-3": "^2.1.11",
61
61
  "@vueuse/integrations": "^10.4.1",
62
62
  "codeflask": "^1.4.1",
63
63
  "filesize": "^10.0.12",
64
64
  "filesize-parser": "^1.5.0",
65
- "focus-trap": "^7.5.2",
65
+ "focus-trap": "^7.5.3",
66
66
  "nanoid": "^5.0.1",
67
67
  "sortablejs": "^1.15.0",
68
68
  "tinycolor2": "^1.6.0",
69
69
  "tippy.js": "^6.3.7",
70
- "type-fest": "^4.3.1",
70
+ "type-fest": "^4.3.2",
71
71
  "vue": "^3.3.4",
72
72
  "vue-multiselect": "^3.0.0-beta.2",
73
- "vue-router": "^4.2.4",
73
+ "vue-router": "^4.2.5",
74
74
  "vue-upload-component": "^3.1.8"
75
75
  },
76
76
  "devDependencies": {
77
- "@ditojs/build": "^2.12.0",
77
+ "@ditojs/build": "^2.13.0",
78
78
  "@vitejs/plugin-vue": "^4.3.4",
79
79
  "@vue/compiler-sfc": "^3.3.4",
80
80
  "pug": "^3.0.2",
81
- "sass": "1.67.0",
81
+ "sass": "1.68.0",
82
82
  "typescript": "^5.2.2",
83
83
  "vite": "^4.4.9"
84
84
  },
85
85
  "types": "types",
86
- "gitHead": "c518cec4dd603d15ff3093355426c8295a5769d4",
86
+ "gitHead": "ab9a98856440d8f0f24ae7b2e2e7f840ac956cce",
87
87
  "scripts": {
88
88
  "build": "vite build",
89
89
  "watch": "yarn build --mode 'development' --watch",
@@ -169,7 +169,8 @@ export default DitoComponent.component('DitoSchema', {
169
169
  currentTab: null,
170
170
  componentsRegistry: {},
171
171
  panesRegistry: {},
172
- panelsRegistry: {}
172
+ panelsRegistry: {},
173
+ scrollPositions: {}
173
174
  }
174
175
  },
175
176
 
@@ -320,7 +321,7 @@ export default DitoComponent.component('DitoSchema', {
320
321
  return !!this.tabs
321
322
  },
322
323
 
323
- hasMainTabs() {
324
+ hasRootTabs() {
324
325
  return this.hasTabs && this.isRootSchema
325
326
  },
326
327
 
@@ -374,16 +375,23 @@ export default DitoComponent.component('DitoSchema', {
374
375
  // Remember the current path to know if tab changes should still be
375
376
  // handled, but remove the trailing `/create` or `/:id` from it so that
376
377
  // tabs informs that stay open after creation still work.
377
- if (this.hasMainTabs) {
378
+ if (this.hasRootTabs) {
378
379
  this.currentTab = hash?.slice(1) || null
379
380
  }
380
381
  }
381
382
  },
382
383
 
383
- 'selectedTab'(selectedTab) {
384
- if (this.hasMainTabs) {
385
- const tab = this.shouldRenderSchema(this.tabs[selectedTab])
386
- ? selectedTab
384
+ 'selectedTab'(newTab, oldTab) {
385
+ if (this.scrollable) {
386
+ const { content } = this.$refs
387
+ this.scrollPositions[oldTab] = content.scrollTop
388
+ this.$nextTick(() => {
389
+ content.scrollTop = this.scrollPositions[newTab] ?? 0
390
+ })
391
+ }
392
+ if (this.hasRootTabs) {
393
+ const tab = this.shouldRenderSchema(this.tabs[newTab])
394
+ ? newTab
387
395
  : this.defaultTab
388
396
  this.$router.replace({ hash: tab ? `#${tab}` : null })
389
397
  }