@vcmap/ui 5.0.0-rc.10 → 5.0.0-rc.11
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/README.md +11 -4
- package/build/build.js +0 -3
- package/build/buildHelpers.js +0 -1
- package/build/buildPreview.js +7 -0
- package/config/aerowest.config.json +13 -3
- package/config/base.config.json +89 -64
- package/config/codes.config.json +397 -0
- package/config/dev.config.json +169 -0
- package/config/graphFeatureInfo.config.json +100 -0
- package/config/www.config.json +1232 -0
- package/dist/assets/{cesium.eb5667.js → cesium.e67536.js} +0 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.ebf665.js +4 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.4ccd4433.js → index.9b213929.js} +1 -1
- package/dist/assets/{ol.ef03b1.js → ol.8bbd50.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.fdfe0d.css +1 -0
- package/dist/assets/ui.fdfe0d.js +68 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.0bb7c6.js +9 -0
- package/dist/assets/vue.js +2 -1
- package/dist/assets/{vuetify.401a29.css → vuetify.53300f.css} +1 -1
- package/dist/assets/{vuetify.401a29.js → vuetify.53300f.js} +71 -71
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +36 -5
- package/lib/vue.js +1 -0
- package/map.config.json +15 -6
- package/package.json +6 -7
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +71 -0
- package/plugins/@vcmap/create-link/index.js +83 -0
- package/plugins/@vcmap/create-link/package.json +6 -0
- package/plugins/@vcmap/pluginExample/index.js +1 -1
- package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +20 -3
- package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/index.js +1 -1
- package/plugins/@vcmap/project-selector/package.json +1 -2
- package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +1 -1
- package/plugins/@vcmap/theme-changer/index.js +1 -1
- package/plugins/@vcmap/theme-changer/package.json +1 -2
- package/plugins/categoryTest/Categories.vue +89 -1
- package/plugins/categoryTest/Category.vue +1 -1
- package/plugins/simple-graph/README.md +51 -0
- package/plugins/simple-graph/SimpleGraphComponent.vue +70 -0
- package/plugins/simple-graph/index.js +17 -0
- package/plugins/simple-graph/package.json +11 -0
- package/plugins/simple-graph/simpleGraphView.js +76 -0
- package/plugins/test/editor.vue +1 -1
- package/plugins/test/index.js +63 -2
- package/plugins/test/windowManagerExample.vue +1 -1
- package/src/actions/stateRefAction.js +2 -2
- package/src/actions/styleSelector.vue +1 -1
- package/src/application/Navbar.vue +13 -2
- package/src/application/VcsApp.vue +201 -92
- package/src/application/VcsMap.vue +1 -1
- package/src/application/VcsSettings.vue +1 -1
- package/src/application/vcsAppWrapper.vue +1 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +13 -0
- package/src/components/form-inputs-controls/VcsColorPicker.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +123 -0
- package/src/components/form-output/VcsFormattedNumber.vue +1 -1
- package/src/components/lists/VcsActionList.vue +13 -4
- package/src/components/lists/VcsTreeview.vue +4 -4
- package/src/components/lists/VcsTreeviewLeaf.vue +9 -2
- package/src/components/lists/VcsTreeviewSearchbar.vue +1 -2
- package/src/components/tables/VcsTable.vue +245 -0
- package/src/contentTree/LayerTree.vue +1 -1
- package/src/contentTree/contentTreeCollection.js +4 -4
- package/src/contentTree/contentTreeItem.js +9 -9
- package/src/contentTree/groupContentTreeItem.js +1 -1
- package/src/contentTree/layerContentTreeItem.js +15 -1
- package/src/contentTree/layerGroupContentTreeItem.js +21 -1
- package/src/contentTree/nodeContentTreeItem.js +1 -1
- package/src/featureInfo/AddressBalloonComponent.vue +47 -0
- package/src/featureInfo/BalloonComponent.vue +138 -0
- package/src/featureInfo/abstractFeatureInfoView.js +313 -0
- package/src/featureInfo/addressBalloonFeatureInfoView.js +118 -0
- package/src/featureInfo/balloonFeatureInfoView.js +151 -0
- package/src/featureInfo/balloonHelper.js +132 -0
- package/src/featureInfo/featureInfo.js +455 -0
- package/src/featureInfo/featureInfoInteraction.js +42 -0
- package/src/featureInfo/iframeFeatureInfoView.js +95 -0
- package/src/featureInfo/tableFeatureInfoView.js +106 -0
- package/src/i18n/de.js +16 -0
- package/src/i18n/en.js +16 -0
- package/src/i18n/i18nCollection.js +17 -0
- package/src/manager/buttonManager.js +5 -5
- package/src/manager/categoryManager/ComponentsManager.vue +30 -0
- package/src/manager/categoryManager/categoryManager.js +500 -0
- package/src/manager/contextMenu/contextMenuComponent.vue +43 -0
- package/src/manager/contextMenu/contextMenuInteraction.js +42 -0
- package/src/manager/contextMenu/contextMenuManager.js +197 -0
- package/src/manager/navbarManager.js +8 -8
- package/src/manager/toolbox/ToolboxManager.vue +2 -2
- package/src/manager/toolbox/toolboxManager.js +7 -3
- package/src/manager/window/WindowComponent.vue +1 -1
- package/src/manager/window/WindowManager.vue +5 -3
- package/src/manager/window/windowManager.js +118 -14
- package/src/navigation/mapNavigation.vue +3 -5
- package/src/navigation/overviewMap.js +28 -5
- package/src/navigation/vcsCompass.vue +1 -1
- package/src/setup.js +0 -2
- package/src/state.js +256 -0
- package/src/styles/_theming.scss +0 -5
- package/src/uiConfig.js +79 -0
- package/src/vcsUiApp.js +210 -20
- package/src/vuePlugins/vuetify.js +14 -4
- package/config/berlin.config.json +0 -510
- package/dist/assets/core.216494.js +0 -4
- package/dist/assets/ui.99a1a7.css +0 -1
- package/dist/assets/ui.99a1a7.js +0 -70
- package/dist/assets/vue-composition-api.c5aca1.js +0 -14
- package/dist/assets/vue-composition-api.js +0 -2
- package/dist/assets/vue.762edd.js +0 -9
- package/lib/vue-composition-api.js +0 -2
@@ -0,0 +1,95 @@
|
|
1
|
+
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description An iframe component
|
5
|
+
* @vue-prop {string} src - Specifies the address of the document to embed in the <iframe>
|
6
|
+
* @vue-prop {string} [title] - optional title for the <iframe>
|
7
|
+
*/
|
8
|
+
const IframeComponent = {
|
9
|
+
name: 'IframeComponent',
|
10
|
+
props: {
|
11
|
+
src: {
|
12
|
+
type: String,
|
13
|
+
required: true,
|
14
|
+
},
|
15
|
+
title: {
|
16
|
+
type: String,
|
17
|
+
default: undefined,
|
18
|
+
},
|
19
|
+
},
|
20
|
+
template: '<iframe :src="src" :title="title" />',
|
21
|
+
};
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @typedef {FeatureInfoViewOptions} IframeFeatureInfoViewOptions
|
25
|
+
* @property {string} src - Specifies the address of the document to embed in the <iframe>. Variables wrapped in `${}` are replaced by their values, e.g. `${featureId}` or `${attributes.gml:name}`
|
26
|
+
* @property {string} [title] - optional title for the <iframe>
|
27
|
+
*/
|
28
|
+
|
29
|
+
/**
|
30
|
+
* @typedef {FeatureInfoProps} IframeFeatureInfoViewProps
|
31
|
+
* @property {string} src
|
32
|
+
* @property {string|undefined} title
|
33
|
+
*/
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @class
|
37
|
+
* @description An iframe view.
|
38
|
+
* @extends {AbstractFeatureInfoView}
|
39
|
+
*/
|
40
|
+
class IframeFeatureInfoView extends AbstractFeatureInfoView {
|
41
|
+
/**
|
42
|
+
* @type {string}
|
43
|
+
*/
|
44
|
+
static get className() { return 'IframeFeatureInfoView'; }
|
45
|
+
|
46
|
+
/**
|
47
|
+
* @param {IframeFeatureInfoViewOptions} options
|
48
|
+
*/
|
49
|
+
constructor(options) {
|
50
|
+
super(options, IframeComponent);
|
51
|
+
|
52
|
+
/**
|
53
|
+
* @type {string}
|
54
|
+
*/
|
55
|
+
this.src = options.src;
|
56
|
+
/**
|
57
|
+
* @type {string|undefined}
|
58
|
+
*/
|
59
|
+
this.title = options.title || undefined;
|
60
|
+
}
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Variables wrapped in `${}` within `src` are replaced by their values, e.g. `${featureId}` or `${attributes.gml:name}`
|
64
|
+
* @param {FeatureInfoEvent} featureInfo
|
65
|
+
* @param {import("@vcmap/core").Layer} layer
|
66
|
+
* @returns {IframeFeatureInfoViewProps}
|
67
|
+
*/
|
68
|
+
getProperties(featureInfo, layer) {
|
69
|
+
const properties = super.getProperties(featureInfo, layer);
|
70
|
+
return {
|
71
|
+
...properties,
|
72
|
+
src: this.src.replace(/\$\{(.*?)}/g, (match, token) => {
|
73
|
+
const variable = token.split('.');
|
74
|
+
return variable.reduce((obj, prop) => obj?.[prop], properties);
|
75
|
+
}),
|
76
|
+
title: this.title,
|
77
|
+
};
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* @returns {IframeFeatureInfoViewOptions}
|
82
|
+
*/
|
83
|
+
toJSON() {
|
84
|
+
const config = super.toJSON();
|
85
|
+
if (this.src) {
|
86
|
+
config.src = this.src;
|
87
|
+
}
|
88
|
+
if (this.title) {
|
89
|
+
config.title = this.title;
|
90
|
+
}
|
91
|
+
return config;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
export default IframeFeatureInfoView;
|
@@ -0,0 +1,106 @@
|
|
1
|
+
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
2
|
+
import VcsTable from '../components/tables/VcsTable.vue';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @typedef {FeatureInfoViewOptions} TableFeatureInfoViewOptions
|
6
|
+
* @property {number} [itemsPerPage=10] - default has to be one of itemsPerPageArray
|
7
|
+
* @property {number[]} [itemsPerPageArray=[5, 10, 15]]
|
8
|
+
* @property {boolean} [showSearchbar]
|
9
|
+
* @property {string} [searchbarPlaceholder]
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* @typedef {FeatureInfoProps} TableFeatureInfoViewProps
|
14
|
+
* @property {number} [itemsPerPage=10]
|
15
|
+
* @property {number[]} [itemsPerPageArray=[5, 10, 15]]
|
16
|
+
* @property {boolean} [showGroupBtn]
|
17
|
+
* @property {boolean} [showSearchbar]
|
18
|
+
* @property {string} [searchbarPlaceholder]
|
19
|
+
*/
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @class
|
23
|
+
* @description A table view for feature attributes
|
24
|
+
* @extends {AbstractFeatureInfoView}
|
25
|
+
*/
|
26
|
+
class TableFeatureInfoView extends AbstractFeatureInfoView {
|
27
|
+
/**
|
28
|
+
* @type {string}
|
29
|
+
*/
|
30
|
+
static get className() { return 'TableFeatureInfoView'; }
|
31
|
+
|
32
|
+
/** @returns {TableFeatureInfoViewOptions} */
|
33
|
+
static getDefaultOptions() {
|
34
|
+
return {
|
35
|
+
itemsPerPageArray: [5, 10, 15],
|
36
|
+
itemsPerPage: 10,
|
37
|
+
showSearchbar: true,
|
38
|
+
};
|
39
|
+
}
|
40
|
+
|
41
|
+
/**
|
42
|
+
* @param {TableFeatureInfoViewOptions} options
|
43
|
+
*/
|
44
|
+
constructor(options) {
|
45
|
+
super(options, VcsTable);
|
46
|
+
const defaultOptions = TableFeatureInfoView.getDefaultOptions();
|
47
|
+
/**
|
48
|
+
* @type {number[]}
|
49
|
+
*/
|
50
|
+
this.itemsPerPageArray = options.itemsPerPageArray || defaultOptions.itemsPerPageArray;
|
51
|
+
|
52
|
+
const itemsPerPage = options.itemsPerPage || defaultOptions.itemsPerPage;
|
53
|
+
/**
|
54
|
+
* @type {number}
|
55
|
+
*/
|
56
|
+
this.itemsPerPage = this.itemsPerPageArray.includes(itemsPerPage) ? itemsPerPage : this.itemsPerPageArray[0];
|
57
|
+
/**
|
58
|
+
* @type {boolean}
|
59
|
+
*/
|
60
|
+
this.showSearchbar = options.showSearchbar || defaultOptions.showSearchbar;
|
61
|
+
/**
|
62
|
+
* @type {string}
|
63
|
+
*/
|
64
|
+
this.searchbarPlaceholder = options.searchbarPlaceholder;
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* @param {FeatureInfoEvent} featureInfo
|
69
|
+
* @param {import("@vcmap/core").Layer} layer
|
70
|
+
* @returns {TableFeatureInfoViewProps}
|
71
|
+
*/
|
72
|
+
getProperties(featureInfo, layer) {
|
73
|
+
const properties = super.getProperties(featureInfo, layer);
|
74
|
+
return {
|
75
|
+
...properties,
|
76
|
+
itemsPerPage: this.itemsPerPage,
|
77
|
+
itemsPerPageArray: this.itemsPerPageArray,
|
78
|
+
showSearchbar: this.showSearchbar,
|
79
|
+
searchbarPlaceholder: this.searchbarPlaceholder,
|
80
|
+
};
|
81
|
+
}
|
82
|
+
|
83
|
+
/**
|
84
|
+
* @returns {TableFeatureInfoViewOptions}
|
85
|
+
*/
|
86
|
+
toJSON() {
|
87
|
+
const config = super.toJSON();
|
88
|
+
const defaultOptions = TableFeatureInfoView.getDefaultOptions();
|
89
|
+
if (this.itemsPerPageArray.length !== defaultOptions.itemsPerPageArray.length ||
|
90
|
+
this.itemsPerPageArray.some((e, idx) => e !== defaultOptions.itemsPerPageArray[idx])) {
|
91
|
+
config.itemsPerPageArray = this.itemsPerPageArray;
|
92
|
+
}
|
93
|
+
if (this.itemsPerPage !== defaultOptions.itemsPerPage) {
|
94
|
+
config.itemsPerPage = this.itemsPerPage;
|
95
|
+
}
|
96
|
+
if (this.showSearchbar !== defaultOptions.showSearchbar) {
|
97
|
+
config.showSearchbar = this.showSearchbar;
|
98
|
+
}
|
99
|
+
if (this.searchbarPlaceholder) {
|
100
|
+
config.searchbarPlaceholder = this.searchbarPlaceholder;
|
101
|
+
}
|
102
|
+
return config;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
export default TableFeatureInfoView;
|
package/src/i18n/de.js
CHANGED
@@ -41,12 +41,28 @@ const messages = {
|
|
41
41
|
pitchTooltip: 'Kamera pitch: {0}°',
|
42
42
|
overviewMapTooltip: 'Übersichtskarte',
|
43
43
|
},
|
44
|
+
components: {
|
45
|
+
title: 'Komponenten',
|
46
|
+
tooltip: 'Komponenten',
|
47
|
+
vcsTable: {
|
48
|
+
key: 'Name',
|
49
|
+
value: 'Wert',
|
50
|
+
searchbarPlaceholder: 'Name, Wert, ...',
|
51
|
+
itemsPerPage: 'pro Seite',
|
52
|
+
nextPage: 'Nächste Seite',
|
53
|
+
formerPage: 'Vorherige Seite',
|
54
|
+
},
|
55
|
+
},
|
44
56
|
settings: {
|
45
57
|
title: 'Einstellungen',
|
46
58
|
tooltip: 'Einstellungen',
|
47
59
|
languageTitle: 'Spracheinstellungen',
|
48
60
|
languageSelector: 'Sprache',
|
49
61
|
},
|
62
|
+
featureInfo: {
|
63
|
+
activateToolTitle: 'Informationstool aktivieren',
|
64
|
+
deactivateToolTitle: 'Informationstool deaktivieren',
|
65
|
+
},
|
50
66
|
footer: {
|
51
67
|
title: 'Fußzeile',
|
52
68
|
},
|
package/src/i18n/en.js
CHANGED
@@ -41,12 +41,28 @@ const messages = {
|
|
41
41
|
pitchTooltip: 'Camera pitch: {0}°',
|
42
42
|
overviewMapTooltip: 'Overview Map',
|
43
43
|
},
|
44
|
+
components: {
|
45
|
+
title: 'Components',
|
46
|
+
tooltip: 'Components',
|
47
|
+
vcsTable: {
|
48
|
+
key: 'Name',
|
49
|
+
value: 'Value',
|
50
|
+
searchbarPlaceholder: 'Name, Value, ...',
|
51
|
+
itemsPerPage: 'per page',
|
52
|
+
nextPage: 'Next page',
|
53
|
+
formerPage: 'Former page',
|
54
|
+
},
|
55
|
+
},
|
44
56
|
settings: {
|
45
57
|
title: 'Settings',
|
46
58
|
tooltip: 'Settings',
|
47
59
|
languageTitle: 'Language settings',
|
48
60
|
languageSelector: 'Language',
|
49
61
|
},
|
62
|
+
featureInfo: {
|
63
|
+
activateToolTitle: 'Activate Infotool',
|
64
|
+
deactivateToolTitle: 'Deactivate Infotool',
|
65
|
+
},
|
50
66
|
footer: {
|
51
67
|
title: 'Footer',
|
52
68
|
},
|
@@ -109,15 +109,32 @@ class I18nCollection extends IndexedCollection {
|
|
109
109
|
}
|
110
110
|
|
111
111
|
/**
|
112
|
+
* This method adds plugin messages to the collection. It is no necessary to call this function
|
113
|
+
* from within a plugin. Use the i18n property on your plugin.
|
112
114
|
* @param {string} plugin Name of the plugin
|
113
115
|
* @param {string} contextId
|
114
116
|
* @param {Object} messages
|
115
117
|
*/
|
116
118
|
addPluginMessages(plugin, contextId, messages) {
|
117
119
|
messages[i18nPluginSymbol] = plugin;
|
120
|
+
messages[contextIdSymbol] = contextId;
|
118
121
|
this.add(messages);
|
119
122
|
}
|
120
123
|
|
124
|
+
/**
|
125
|
+
* This method removes plugin messages from the collection. It is no necessary to call this function
|
126
|
+
* from within a plugin. Once your plugin is removed, the VcsUiApp will call this for you.
|
127
|
+
* @param {string} pluginName
|
128
|
+
* @param {string} contextId
|
129
|
+
*/
|
130
|
+
removePluginMessages(pluginName, contextId) {
|
131
|
+
[...this]
|
132
|
+
.filter(item => item[i18nPluginSymbol] === pluginName && item[contextIdSymbol] === contextId)
|
133
|
+
.forEach((item) => {
|
134
|
+
this.remove(item);
|
135
|
+
});
|
136
|
+
}
|
137
|
+
|
121
138
|
/**
|
122
139
|
* returns a merged Message Object with the locale as a key and an Object with all the translated keys
|
123
140
|
* @returns {Object}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
import { reactive } from '@vue/composition-api';
|
1
|
+
import { reactive } from 'vue';
|
3
2
|
import { VcsEvent } from '@vcmap/core';
|
4
3
|
import { v4 as uuidv4 } from 'uuid';
|
5
4
|
import { check, checkMaybe } from '@vcsuite/check';
|
@@ -23,7 +22,7 @@ import { vcsAppSymbol } from '../pluginHelper.js';
|
|
23
22
|
* @description Manages a set of Map Buttons
|
24
23
|
* @implements VcsComponentManager<ButtonComponent,ButtonComponentOptions>
|
25
24
|
*/
|
26
|
-
|
25
|
+
class ButtonManager {
|
27
26
|
constructor() {
|
28
27
|
/**
|
29
28
|
* @type {import("@vcmap/core").VcsEvent<ButtonComponent>}
|
@@ -37,8 +36,7 @@ export class ButtonManager {
|
|
37
36
|
* reactive ordered array of ids,
|
38
37
|
* @type {Array<string>}
|
39
38
|
*/
|
40
|
-
this.componentIds =
|
41
|
-
|
39
|
+
this.componentIds = [];
|
42
40
|
/**
|
43
41
|
* @type {Map<string, ButtonComponent>}
|
44
42
|
* @private
|
@@ -154,3 +152,5 @@ export class ButtonManager {
|
|
154
152
|
this._buttonComponents.clear();
|
155
153
|
}
|
156
154
|
}
|
155
|
+
|
156
|
+
export default ButtonManager;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<VcsTreeview
|
4
|
+
v-if="tree && tree.length"
|
5
|
+
:items="tree"
|
6
|
+
:has-searchbar="true"
|
7
|
+
/>
|
8
|
+
</div>
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
import { inject } from 'vue';
|
13
|
+
import VcsTreeview from '../../components/lists/VcsTreeview.vue';
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @description
|
17
|
+
* uses a VcsTreeview and shows 'a components Window' based on the "categoryManager"
|
18
|
+
* Uses the provided 'vcsApp'
|
19
|
+
*/
|
20
|
+
export default {
|
21
|
+
name: 'VcsComponentsManager',
|
22
|
+
components: { VcsTreeview },
|
23
|
+
setup() {
|
24
|
+
const app = inject('vcsApp');
|
25
|
+
return {
|
26
|
+
tree: app.categoryManager.items,
|
27
|
+
};
|
28
|
+
},
|
29
|
+
};
|
30
|
+
</script>
|