@vcmap/ui 5.0.0-rc.27 → 5.0.0-rc.28

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/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui.3ed7ff.js";
1
+ export * from "./ui.bd7a9a.js";
@@ -1,5 +1,5 @@
1
- export * from "./vue.537ff3.js";
2
- import { default as f } from "./vue.537ff3.js";
1
+ export * from "./vue.d4be99.js";
2
+ import { default as f } from "./vue.d4be99.js";
3
3
  export {
4
4
  f as default
5
5
  };
@@ -13,7 +13,7 @@ function loadCss(href) {
13
13
  elem.onerror = reject;
14
14
  document.head.appendChild(elem);
15
15
  });
16
- } await loadCss('./assets/vuetify.614278.css');import v from "./vue.537ff3.js";
16
+ } await loadCss('./assets/vuetify.95f6c3.css');import v from "./vue.d4be99.js";
17
17
  const Ne = v.extend().extend({
18
18
  name: "themeable",
19
19
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.614278.js";
2
- import { default as f } from "./vuetify.614278.js";
1
+ export * from "./vuetify.95f6c3.js";
2
+ import { default as f } from "./vuetify.95f6c3.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/dist/index.html CHANGED
@@ -29,7 +29,7 @@
29
29
  />
30
30
  <link rel="icon" type="image/svg+xml" href="./assets/favicon.d5ec97.svg" />
31
31
 
32
- <script type="module" crossorigin src="./assets/index-1cff371d.js"></script>
32
+ <script type="module" crossorigin src="./assets/index-1b09f88d.js"></script>
33
33
  </head>
34
34
  <body style="height: 100vh">
35
35
  <noscript>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.0.0-rc.27",
3
+ "version": "5.0.0-rc.28",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -44,8 +44,8 @@
44
44
  "vue-i18n": "^8.24.1"
45
45
  },
46
46
  "peerDependencies": {
47
- "@vcmap-cesium/engine": "~2.4.1",
48
- "@vcmap/core": "^5.0.0-rc.35",
47
+ "@vcmap-cesium/engine": "~2.4.3",
48
+ "@vcmap/core": "^5.0.0-rc.36",
49
49
  "ol": "~7.4.0",
50
50
  "vue": "~2.7.3",
51
51
  "vuetify": "~2.6.7"
@@ -4,7 +4,6 @@ import {
4
4
  makeOverrideCollection,
5
5
  getObjectFromClassRegistry,
6
6
  } from '@vcmap/core';
7
- import { v4 as uuid } from 'uuid';
8
7
  import { computed, ref } from 'vue';
9
8
  import ContentTreeItem from './contentTreeItem.js';
10
9
  import { vcsAppSymbol } from '../pluginHelper.js';
@@ -71,6 +70,11 @@ class ContentTreeCollection extends IndexedCollection {
71
70
  this._weightListeners.get(child.name)();
72
71
  this._weightListeners.delete(child.name);
73
72
  }
73
+ if (this._subTreeListeners.has(child.name)) {
74
+ this._subTreeListeners.get(child.name)();
75
+ this._subTreeListeners.delete(child.name);
76
+ this._subTreeViewItems.value.delete(child.name);
77
+ }
74
78
  }),
75
79
  this.moved.addEventListener(recreateTree),
76
80
  ];
@@ -90,10 +94,10 @@ class ContentTreeCollection extends IndexedCollection {
90
94
  this._subTreeViewItems = ref(new Map());
91
95
  /**
92
96
  * The subtree content action button destroy handlers
93
- * @type {Array<function():void>}
97
+ * @type {Map<string, function():void>}
94
98
  * @private
95
99
  */
96
- this._subTreeListeners = [];
100
+ this._subTreeListeners = new Map();
97
101
  /**
98
102
  * @type {boolean}
99
103
  * @private
@@ -106,7 +110,7 @@ class ContentTreeCollection extends IndexedCollection {
106
110
  */
107
111
  _clearSubTrees() {
108
112
  this._subTreeViewItems.value.clear();
109
- this._subTreeListeners.forEach((cb) => {
113
+ [...this._subTreeListeners.values()].forEach((cb) => {
110
114
  cb();
111
115
  });
112
116
  }
@@ -119,7 +123,7 @@ class ContentTreeCollection extends IndexedCollection {
119
123
  */
120
124
  _createSubtreeActionButton(subTreeViewItem, slot = WindowSlot.STATIC) {
121
125
  // TODO make configurable?
122
- const id = uuid();
126
+ const id = subTreeViewItem.name;
123
127
  const app = this._app;
124
128
  const { action, destroy } = createToggleAction(
125
129
  // TODO icon & title are not reactive
@@ -158,7 +162,6 @@ class ContentTreeCollection extends IndexedCollection {
158
162
  * @private
159
163
  */
160
164
  _setTreeView() {
161
- this._clearSubTrees();
162
165
  /** @type {Map<string, ParentTreeViewItem>} */
163
166
  const baseTreeMap = new Map();
164
167
  [...this._array]
@@ -210,9 +213,14 @@ class ContentTreeCollection extends IndexedCollection {
210
213
  ...topLevelItems.filter((i) => i[subTreeSymbol]),
211
214
  ];
212
215
 
213
- this._subTreeListeners = subTrees.map((subTree) =>
214
- this._createSubtreeActionButton(subTree),
215
- );
216
+ subTrees.forEach((subTree) => {
217
+ if (!this._app.navbarManager.has(subTree.name)) {
218
+ this._subTreeListeners.set(
219
+ subTree.name,
220
+ this._createSubtreeActionButton(subTree),
221
+ );
222
+ }
223
+ });
216
224
  }
217
225
 
218
226
  /**
@@ -225,8 +233,8 @@ class ContentTreeCollection extends IndexedCollection {
225
233
  }
226
234
 
227
235
  /**
228
- * All ids of the currently managed subtrees. Ids are not persisted and will change if
229
- * the trees get recalculated. The first ID is always the default tree. Other ids are subtree ids.
236
+ * All ids of the currently managed subtrees.
237
+ * The first ID is always the default tree. Other ids are subtree ids.
230
238
  * Order of ids is dependent on their position in the collection and weight.
231
239
  * @type {Array<string>}
232
240
  * @readonly
@@ -9,7 +9,11 @@
9
9
  </v-icon>
10
10
  {{ $t(title) }}
11
11
  </div>
12
- <VcsActionButtonList v-if="actions?.length > 0" :actions="actions" />
12
+ <VcsActionButtonList
13
+ v-if="actions?.length > 0"
14
+ :actions="actions"
15
+ :overflow-count="overflowCount"
16
+ />
13
17
  </div>
14
18
  </template>
15
19
  </v-expansion-panel-header>
@@ -85,6 +89,7 @@
85
89
  draggable: collectionComponent.draggable,
86
90
  selectable: collectionComponent.selectable,
87
91
  singleSelect: collectionComponent.singleSelect,
92
+ overflowCount: collectionComponent.overflowCount,
88
93
  limit: collectionComponent.limit,
89
94
  actions: collectionComponent.getActions(),
90
95
  move({ item, targetIndex }) {
@@ -13,6 +13,7 @@ import { sortByWeight } from '../buttonManager.js';
13
13
  * @property {boolean} [draggable] - only supported for IndexedCollections
14
14
  * @property {boolean} [selectable]
15
15
  * @property {boolean} [singleSelect]
16
+ * @property {number} [overflowCount=2] - number of header action buttons rendered until overflow
16
17
  * @property {number} [limit=10] - limit number of items in rendered list (more items are rendered in extra window)
17
18
  */
18
19
 
@@ -59,6 +60,11 @@ class CollectionComponent {
59
60
  * @type {import("vue").Ref<boolean>}
60
61
  */
61
62
  this.open = ref(false);
63
+ /**
64
+ *
65
+ * @type {import("vue").Ref<number>}
66
+ */
67
+ this.overflowCount = ref(parseNumber(options.overflowCount, 2));
62
68
  /**
63
69
  *
64
70
  * @type {import("vue").Ref<number>}
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.3ed7ff.js";p("#app","app.config.json");
File without changes
File without changes