@vcmap/ui 5.1.0-rc.4 → 5.1.1
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/build/buildHelpers.js +1 -1
- package/build/getPluginProxies.js +16 -2
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.2274d8.js → core.8ecfba.js} +3592 -3536
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-c87f843d.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.21bb56.js → ui.186a84.js} +795 -771
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.145dc5.js → vuetify.10881a.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.d.ts +2 -2
- package/index.js +4 -1
- package/package.json +2 -2
- package/plugins/package.json +2 -2
- package/src/components/flight/VcsFlightComponent.vue +1 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +2 -3
- package/src/manager/collectionManager/categoryManager.d.ts +17 -0
- package/src/manager/collectionManager/categoryManager.js +41 -3
- package/src/manager/collectionManager/collectionComponentClass.d.ts +7 -0
- package/src/manager/collectionManager/collectionComponentClass.js +25 -0
- package/src/pluginHelper.js +4 -2
- package/dist/assets/index-564248ae.js +0 -1
- /package/dist/assets/{cesium.1bcede.js → cesium.c1accb.js} +0 -0
- /package/dist/assets/{ol.d39205.js → ol.b751cb.js} +0 -0
- /package/dist/assets/{ui.21bb56.css → ui.186a84.css} +0 -0
- /package/dist/assets/{vue.403631.js → vue.3f80ec.js} +0 -0
- /package/dist/assets/{vuetify.145dc5.css → vuetify.10881a.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui.
|
1
|
+
export * from "./ui.186a84.js";
|
package/dist/assets/vue.js
CHANGED
@@ -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.
|
16
|
+
} await loadCss('./assets/vuetify.10881a.css');import v from "./vue.3f80ec.js";
|
17
17
|
const Ne = v.extend().extend({
|
18
18
|
name: "themeable",
|
19
19
|
provide() {
|
package/dist/assets/vuetify.js
CHANGED
package/dist/index.html
CHANGED
package/index.d.ts
CHANGED
@@ -52,8 +52,6 @@ export { default as CollectionManagerComponent } from "./src/manager/collectionM
|
|
52
52
|
export type * from "./src/manager/collectionManager/CollectionManager.vue.d.ts";
|
53
53
|
export { default as CollectionComponentProvider } from "./src/manager/collectionManager/CollectionComponentProvider.vue";
|
54
54
|
export type * from "./src/manager/collectionManager/CollectionComponentProvider.vue.d.ts";
|
55
|
-
export { default as CollectionComponentClass } from "./src/manager/collectionManager/collectionComponentClass.js";
|
56
|
-
export type * from "./src/manager/collectionManager/collectionComponentClass.d.ts";
|
57
55
|
export { default as CollectionComponent } from "./src/manager/collectionManager/CollectionComponent.vue";
|
58
56
|
export type * from "./src/manager/collectionManager/CollectionComponent.vue.d.ts";
|
59
57
|
export { default as CollectionComponentList } from "./src/manager/collectionManager/CollectionComponentList.vue";
|
@@ -218,6 +216,8 @@ export { default as NavbarManager, ButtonLocation, getActionsByLocation } from "
|
|
218
216
|
export type * from "./src/manager/navbarManager.d.ts";
|
219
217
|
export { default as ToolboxManager, ToolboxType, defaultToolboxName } from "./src/manager/toolbox/toolboxManager.js";
|
220
218
|
export type * from "./src/manager/toolbox/toolboxManager.d.ts";
|
219
|
+
export { default as CollectionComponentClass, createSupportedMapMappingFunction } from "./src/manager/collectionManager/collectionComponentClass.js";
|
220
|
+
export type * from "./src/manager/collectionManager/collectionComponentClass.d.ts";
|
221
221
|
export { makeEditorCollectionComponentClass, isEditorCollectionComponentClass } from "./src/manager/collectionManager/editorCollectionComponentClass.js";
|
222
222
|
export type * from "./src/manager/collectionManager/editorCollectionComponentClass.d.ts";
|
223
223
|
export { applyKeyMapping, applyValueMapping, default as AbstractFeatureInfoView } from "./src/featureInfo/abstractFeatureInfoView.js";
|
package/index.js
CHANGED
@@ -111,7 +111,10 @@ export { default as CategoryManager } from './src/manager/collectionManager/cate
|
|
111
111
|
export { default as CollectionManager } from './src/manager/collectionManager/collectionManager.js';
|
112
112
|
export { default as CollectionManagerComponent } from './src/manager/collectionManager/CollectionManager.vue';
|
113
113
|
export { default as CollectionComponentProvider } from './src/manager/collectionManager/CollectionComponentProvider.vue';
|
114
|
-
export {
|
114
|
+
export {
|
115
|
+
default as CollectionComponentClass,
|
116
|
+
createSupportedMapMappingFunction,
|
117
|
+
} from './src/manager/collectionManager/collectionComponentClass.js';
|
115
118
|
export {
|
116
119
|
makeEditorCollectionComponentClass,
|
117
120
|
isEditorCollectionComponentClass,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.1.
|
3
|
+
"version": "5.1.1",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -53,7 +53,7 @@
|
|
53
53
|
},
|
54
54
|
"peerDependencies": {
|
55
55
|
"@vcmap-cesium/engine": "^4.0.3",
|
56
|
-
"@vcmap/core": "^5.1.0
|
56
|
+
"@vcmap/core": "^5.1.0",
|
57
57
|
"ol": "^7.5.2",
|
58
58
|
"vue": "~2.7.3",
|
59
59
|
"vuetify": "~2.6.7"
|
package/plugins/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"@vcmap/print": "^1.0.2",
|
4
4
|
"@vcmap/swipe-tool": "^1.0.3",
|
5
5
|
"@vcmap/export": "^1.0.1",
|
6
|
-
"@vcmap/shadow": "^
|
6
|
+
"@vcmap/shadow": "^2.0.0",
|
7
7
|
"@vcmap/draw": "^2.0.0",
|
8
8
|
"@vcmap/create-link": "^1.0.1",
|
9
9
|
"@vcmap/search-nominatim": "^1.0.1",
|
@@ -14,6 +14,6 @@
|
|
14
14
|
"@vcmap/flight": "^1.0.1"
|
15
15
|
},
|
16
16
|
"optionalDependencies": {
|
17
|
-
"@vcmap/planning": "^
|
17
|
+
"@vcmap/planning": "^5.0.1"
|
18
18
|
}
|
19
19
|
}
|
@@ -47,13 +47,12 @@
|
|
47
47
|
v-if="animate"
|
48
48
|
id="duration"
|
49
49
|
dense
|
50
|
+
clearable
|
50
51
|
type="number"
|
51
|
-
:min="
|
52
|
+
:min="1"
|
52
53
|
unit="s"
|
53
54
|
:title="$t('components.viewpoint.duration')"
|
54
|
-
placeholder="0 s"
|
55
55
|
v-model.number="duration"
|
56
|
-
:rules="[isPositiveNumber]"
|
57
56
|
/>
|
58
57
|
</v-col>
|
59
58
|
</v-row>
|
@@ -6,6 +6,8 @@ export type ICategoryManager = import("../../vcsUiApp.js").VcsComponentManager<i
|
|
6
6
|
/**
|
7
7
|
* Manages all requested category collections.
|
8
8
|
* Provides an API to add/remove collectionsComponents.
|
9
|
+
* Per default only items of the defaultDynamicModuleId are shown in the CategoryManager.
|
10
|
+
* Further modules can be supported using the addModuleId API.
|
9
11
|
* @implements {ICategoryManager}
|
10
12
|
* @extends CollectionManager
|
11
13
|
*/
|
@@ -27,6 +29,11 @@ declare class CategoryManager extends CollectionManager implements ICategoryMana
|
|
27
29
|
* @private
|
28
30
|
*/
|
29
31
|
private _dynamicModuleId;
|
32
|
+
/**
|
33
|
+
* @type {string[]}
|
34
|
+
* @private
|
35
|
+
*/
|
36
|
+
private _moduleIds;
|
30
37
|
/**
|
31
38
|
* @param {Object} item
|
32
39
|
* @return {boolean}
|
@@ -52,5 +59,15 @@ declare class CategoryManager extends CollectionManager implements ICategoryMana
|
|
52
59
|
collectionComponent: import("./collectionComponentClass.js").default<T>;
|
53
60
|
category: import("@vcmap/core/dist/src/category/category.js").default<T>;
|
54
61
|
}>;
|
62
|
+
/**
|
63
|
+
* Updates the filterFunction for added moduleIds.
|
64
|
+
* Items of added moduleIds, are shown in the CategoryManager
|
65
|
+
* @param {string} id
|
66
|
+
*/
|
67
|
+
addModuleId(id: string): void;
|
68
|
+
/**
|
69
|
+
* @param {string} id
|
70
|
+
*/
|
71
|
+
removeModuleId(id: string): void;
|
55
72
|
}
|
56
73
|
import CollectionManager from './collectionManager.js';
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { moduleIdSymbol } from '@vcmap/core';
|
1
|
+
import { defaultDynamicModuleId, moduleIdSymbol } from '@vcmap/core';
|
2
|
+
import { check } from '@vcsuite/check';
|
2
3
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
3
4
|
import CollectionManager from './collectionManager.js';
|
4
5
|
|
@@ -9,6 +10,8 @@ import CollectionManager from './collectionManager.js';
|
|
9
10
|
/**
|
10
11
|
* Manages all requested category collections.
|
11
12
|
* Provides an API to add/remove collectionsComponents.
|
13
|
+
* Per default only items of the defaultDynamicModuleId are shown in the CategoryManager.
|
14
|
+
* Further modules can be supported using the addModuleId API.
|
12
15
|
* @implements {ICategoryManager}
|
13
16
|
* @extends CollectionManager
|
14
17
|
*/
|
@@ -31,7 +34,12 @@ class CategoryManager extends CollectionManager {
|
|
31
34
|
* @type {string}
|
32
35
|
* @private
|
33
36
|
*/
|
34
|
-
this._dynamicModuleId =
|
37
|
+
this._dynamicModuleId = defaultDynamicModuleId;
|
38
|
+
/**
|
39
|
+
* @type {string[]}
|
40
|
+
* @private
|
41
|
+
*/
|
42
|
+
this._moduleIds = [];
|
35
43
|
|
36
44
|
/**
|
37
45
|
* @param {Object} item
|
@@ -49,7 +57,9 @@ class CategoryManager extends CollectionManager {
|
|
49
57
|
*/
|
50
58
|
this._categoryListeners = [
|
51
59
|
this._app.dynamicModuleIdChanged.addEventListener((id) => {
|
52
|
-
this.
|
60
|
+
if (id === defaultDynamicModuleId || this._moduleIds.includes(id)) {
|
61
|
+
this._dynamicModuleId = id;
|
62
|
+
}
|
53
63
|
this.reset();
|
54
64
|
}),
|
55
65
|
this._app.categories.removed.addEventListener((category) => {
|
@@ -88,6 +98,34 @@ class CategoryManager extends CollectionManager {
|
|
88
98
|
return { collectionComponent, category };
|
89
99
|
}
|
90
100
|
|
101
|
+
/**
|
102
|
+
* Updates the filterFunction for added moduleIds.
|
103
|
+
* Items of added moduleIds, are shown in the CategoryManager
|
104
|
+
* @param {string} id
|
105
|
+
*/
|
106
|
+
addModuleId(id) {
|
107
|
+
check(id, String);
|
108
|
+
if (!this._moduleIds.includes(id)) {
|
109
|
+
this._moduleIds.push(id);
|
110
|
+
}
|
111
|
+
if (id === this._app.dynamicModuleId) {
|
112
|
+
this.reset();
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
/**
|
117
|
+
* @param {string} id
|
118
|
+
*/
|
119
|
+
removeModuleId(id) {
|
120
|
+
const idx = this._moduleIds.indexOf(id);
|
121
|
+
if (idx > -1) {
|
122
|
+
this._moduleIds.splice(idx, 1);
|
123
|
+
}
|
124
|
+
if (id === this._app.dynamicModuleId) {
|
125
|
+
this.reset();
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
91
129
|
destroy() {
|
92
130
|
super.destroy();
|
93
131
|
this._categoryListeners.forEach((cb) => cb());
|
@@ -1,3 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* @param {string[]|function(T):string[]} supportedMaps
|
3
|
+
* @param {import("@vcmap/core").MapCollection} mapCollection
|
4
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
5
|
+
* @returns {import("./collectionManager.js").MappingFunction<T>}
|
6
|
+
*/
|
7
|
+
export function createSupportedMapMappingFunction<T extends Object | import("@vcmap/core/dist/src/vcsObject.js").default>(supportedMaps: string[] | ((arg0: T) => string[]), mapCollection: import("@vcmap/core").MapCollection): import("./collectionManager.js").MappingFunction<T>;
|
1
8
|
export default CollectionComponentClass;
|
2
9
|
export type CollectionComponentUiOptions = {
|
3
10
|
id?: string | undefined;
|
@@ -3,6 +3,7 @@ import { getLogger } from '@vcsuite/logger';
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
4
4
|
import { computed, ref, watch } from 'vue';
|
5
5
|
import { parseBoolean, parseNumber } from '@vcsuite/parsers';
|
6
|
+
import { check } from '@vcsuite/check';
|
6
7
|
import { validateAction } from '../../components/lists/VcsActionList.vue';
|
7
8
|
import { sortByWeight } from '../buttonManager.js';
|
8
9
|
import {
|
@@ -63,6 +64,30 @@ function titleChanged(item, listItem, newTitle) {
|
|
63
64
|
listItem.title = newTitle;
|
64
65
|
}
|
65
66
|
|
67
|
+
/**
|
68
|
+
* @param {string[]|function(T):string[]} supportedMaps
|
69
|
+
* @param {import("@vcmap/core").MapCollection} mapCollection
|
70
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
71
|
+
* @returns {import("./collectionManager.js").MappingFunction<T>}
|
72
|
+
*/
|
73
|
+
export function createSupportedMapMappingFunction(
|
74
|
+
supportedMaps,
|
75
|
+
mapCollection,
|
76
|
+
) {
|
77
|
+
check(supportedMaps, [[String], Function]);
|
78
|
+
|
79
|
+
return (item, _c, listItem) => {
|
80
|
+
const mapNames =
|
81
|
+
typeof supportedMaps === 'function' ? supportedMaps(item) : supportedMaps;
|
82
|
+
listItem.disabled = !mapNames.includes(mapCollection.activeMap.className);
|
83
|
+
listItem.destroyFunctions.push(
|
84
|
+
mapCollection.mapActivated.addEventListener((map) => {
|
85
|
+
listItem.disabled = !mapNames.includes(map.className);
|
86
|
+
}),
|
87
|
+
);
|
88
|
+
};
|
89
|
+
}
|
90
|
+
|
66
91
|
/**
|
67
92
|
* Manages one collection and creates a mirrored items array with ListItems.
|
68
93
|
* Listens to all collection events and synchronizes changes to the items array.
|
package/src/pluginHelper.js
CHANGED
@@ -103,11 +103,13 @@ export async function loadPlugin(name, config) {
|
|
103
103
|
// early escape to bypass module loading for testing, see import("@src/vcsUiApp.js").default.spec.js
|
104
104
|
return null;
|
105
105
|
}
|
106
|
+
const moduleUrl = new URL(module, window.location.href);
|
106
107
|
if (config.version) {
|
107
|
-
const moduleUrl = new URL(module, window.location.href);
|
108
108
|
moduleUrl.searchParams.set('version', config.version);
|
109
|
-
module = moduleUrl.toString();
|
110
109
|
}
|
110
|
+
moduleUrl.searchParams.set('mapVersion', version);
|
111
|
+
module = moduleUrl.toString();
|
112
|
+
|
111
113
|
// if (!context.security.isTrustedUrl(module)) { XXX missing pipeline security
|
112
114
|
// getLogger().warning(`suppressed loading of insecure plugin ${module}`);
|
113
115
|
// return Promise.resolve();
|
@@ -1 +0,0 @@
|
|
1
|
-
import{initAppFromAppConfig as p}from"./ui.21bb56.js";p("#app","app.config.json");
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|