@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,70 @@
|
|
1
|
+
<template>
|
2
|
+
<v-sparkline
|
3
|
+
padding="24"
|
4
|
+
stroke-linecap="round"
|
5
|
+
:show-labels="labels.length > 0"
|
6
|
+
:labels="labels"
|
7
|
+
:type="graph"
|
8
|
+
:color="color"
|
9
|
+
:gradient="gradient"
|
10
|
+
:fill="fill"
|
11
|
+
:smooth="smooth"
|
12
|
+
:value="values"
|
13
|
+
/>
|
14
|
+
</template>
|
15
|
+
<script>
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @description A simple table view for feature attributes using {@link https://vuetifyjs.com/en/api/v-sparkline/#props|vuetify v-sparkline }
|
19
|
+
* @vue-prop {Object} attributes - the feature's attributes
|
20
|
+
* @vue-prop {string[]} [labels] - optional array of strings labeling all data points
|
21
|
+
* @vue-prop {string} [graph='trend'] - Choose between a trendline or bars
|
22
|
+
* @vue-prop {string} [color='primary'] - optional color of the sparkline of the graph
|
23
|
+
* @vue-prop {string[]} [gradient] - optional array of colors to use as a linear-gradient
|
24
|
+
* @vue-prop {boolean} [fill=false] - if true, filled area below sparkline
|
25
|
+
* @vue-prop {boolean|number|string} [smooth=true] - optional number of px to use as a corner radius. true defaults to 8, false is 0
|
26
|
+
* @vue-computed {number[]} values - numeric values for the graph derived from the attributeKeys
|
27
|
+
*/
|
28
|
+
export default {
|
29
|
+
name: 'SimpleGraphComponent',
|
30
|
+
props: {
|
31
|
+
attributes: {
|
32
|
+
type: Object,
|
33
|
+
required: true,
|
34
|
+
},
|
35
|
+
labels: {
|
36
|
+
type: Array,
|
37
|
+
default: () => [],
|
38
|
+
},
|
39
|
+
graph: {
|
40
|
+
type: String,
|
41
|
+
default: 'trend',
|
42
|
+
},
|
43
|
+
color: {
|
44
|
+
type: String,
|
45
|
+
default: 'primary',
|
46
|
+
},
|
47
|
+
gradient: {
|
48
|
+
type: Array,
|
49
|
+
default: () => [],
|
50
|
+
},
|
51
|
+
fill: {
|
52
|
+
type: Boolean,
|
53
|
+
default: false,
|
54
|
+
},
|
55
|
+
smooth: {
|
56
|
+
type: Number,
|
57
|
+
default: 8,
|
58
|
+
},
|
59
|
+
},
|
60
|
+
computed: {
|
61
|
+
values() {
|
62
|
+
return Object.values(this.attributes);
|
63
|
+
},
|
64
|
+
},
|
65
|
+
};
|
66
|
+
</script>
|
67
|
+
|
68
|
+
<style scoped>
|
69
|
+
|
70
|
+
</style>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import SimpleGraphView from './simpleGraphView.js';
|
2
|
+
/**
|
3
|
+
* @returns {VcsPlugin}
|
4
|
+
*/
|
5
|
+
export default async function () {
|
6
|
+
return {
|
7
|
+
name: '@vcmap/simpleGraph',
|
8
|
+
onVcsAppMounted(app) {
|
9
|
+
/** Example for registering custom component on FeatureInfo */
|
10
|
+
app.featureInfo.classRegistry.registerClass(
|
11
|
+
app.dynamicContextId,
|
12
|
+
SimpleGraphView.className,
|
13
|
+
SimpleGraphView,
|
14
|
+
);
|
15
|
+
},
|
16
|
+
};
|
17
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { parseBoolean } from '@vcsuite/parsers';
|
2
|
+
import { AbstractFeatureInfoView } from '@vcmap/ui';
|
3
|
+
import SimpleGraphComponent from './SimpleGraphComponent.vue';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @typedef {FeatureInfoViewOptions} SimpleGraphFeatureInfoViewOptions
|
7
|
+
* @property {string[]|number[]} [labels] - optional array of strings labeling all data points
|
8
|
+
* @property {string} [graph='trend'] - Choose between a trendline or bars
|
9
|
+
* @property {string} [color='primary'] - optional color of the sparkline of the graph
|
10
|
+
* @property {string[]} [gradient] - optional array of colors to use as a linear-gradient
|
11
|
+
* @property {boolean} [fill=false] - if true, filled area below sparkline
|
12
|
+
* @property {number|string} [smooth=8] - optional number of px to use as a corner radius
|
13
|
+
*/
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @class
|
17
|
+
* @description A graph view.
|
18
|
+
*/
|
19
|
+
class SimpleGraphView extends AbstractFeatureInfoView {
|
20
|
+
/**
|
21
|
+
* @type {string}
|
22
|
+
*/
|
23
|
+
static get className() { return 'SimpleGraphView'; }
|
24
|
+
|
25
|
+
/**
|
26
|
+
* @param {SimpleGraphFeatureInfoViewOptions} options
|
27
|
+
*/
|
28
|
+
constructor(options) {
|
29
|
+
super(options, SimpleGraphComponent);
|
30
|
+
/**
|
31
|
+
* @type {string[]|number[]}
|
32
|
+
*/
|
33
|
+
this.labels = options.labels || [];
|
34
|
+
/**
|
35
|
+
* @type {string}
|
36
|
+
*/
|
37
|
+
this.graph = options.graph || 'trend';
|
38
|
+
/**
|
39
|
+
* @type {string}
|
40
|
+
*/
|
41
|
+
this.color = options.color || 'primary';
|
42
|
+
/**
|
43
|
+
* @type {string[]}
|
44
|
+
*/
|
45
|
+
this.gradient = options.gradient || [];
|
46
|
+
/**
|
47
|
+
* @type {boolean}
|
48
|
+
*/
|
49
|
+
this.fill = parseBoolean(options.fill, false);
|
50
|
+
/**
|
51
|
+
* @type {number|string}
|
52
|
+
*/
|
53
|
+
this.smooth = options.smooth ?? 8;
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @param {FeatureInfoEvent} featureInfo
|
58
|
+
* @param {import("@vcmap/core").Layer} layer
|
59
|
+
* @returns {FeatureInfoProps}
|
60
|
+
*/
|
61
|
+
getProperties({ feature }, layer) {
|
62
|
+
return {
|
63
|
+
featureId: feature.getId(),
|
64
|
+
layerName: layer.name,
|
65
|
+
attributes: this.getAttributes(feature),
|
66
|
+
labels: this.labels,
|
67
|
+
graph: this.graph,
|
68
|
+
color: this.color,
|
69
|
+
gradient: this.gradient,
|
70
|
+
fill: this.fill,
|
71
|
+
smooth: this.smooth,
|
72
|
+
};
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
export default SimpleGraphView;
|
package/plugins/test/editor.vue
CHANGED
package/plugins/test/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import VectorSource from 'ol/source/Vector.js';
|
2
2
|
import { Feature } from 'ol';
|
3
|
-
import { ButtonLocation, createToggleAction, WindowSlot } from '@vcmap/ui';
|
3
|
+
import { ButtonLocation, createModalAction, createToggleAction, setStateToUrl, WindowSlot } from '@vcmap/ui';
|
4
4
|
import { toolboxData } from './toolbox-data.js';
|
5
5
|
import editor from './editor.vue';
|
6
6
|
import windowManagerExample from './windowManagerExample.vue';
|
@@ -73,7 +73,37 @@ export default async function () {
|
|
73
73
|
app.windowManager,
|
74
74
|
'@vcmap/test',
|
75
75
|
);
|
76
|
-
|
76
|
+
const { action: clipboardDialogAction, destroy: destroryClipboardDialogAction } = createModalAction(
|
77
|
+
{
|
78
|
+
name: 'Create Link',
|
79
|
+
},
|
80
|
+
{
|
81
|
+
component: {
|
82
|
+
template: '<div>{{url}}</div>',
|
83
|
+
data() {
|
84
|
+
return {
|
85
|
+
url: '',
|
86
|
+
};
|
87
|
+
},
|
88
|
+
async created() {
|
89
|
+
this.url = setStateToUrl(await app.getState(true)).toString();
|
90
|
+
},
|
91
|
+
},
|
92
|
+
position: {
|
93
|
+
top: '50px',
|
94
|
+
left: '8%',
|
95
|
+
right: '8%',
|
96
|
+
},
|
97
|
+
},
|
98
|
+
app.windowManager,
|
99
|
+
'@vcmap/test',
|
100
|
+
);
|
101
|
+
this._destroyActions = [
|
102
|
+
destroyConfigEditorAction,
|
103
|
+
destroyWindowAction,
|
104
|
+
destroyIconAction,
|
105
|
+
destroryClipboardDialogAction,
|
106
|
+
];
|
77
107
|
const alertAction = {
|
78
108
|
name: 'VC Systems',
|
79
109
|
callback() {
|
@@ -101,10 +131,41 @@ export default async function () {
|
|
101
131
|
'@vcmap/test',
|
102
132
|
ButtonLocation.TOOL,
|
103
133
|
);
|
134
|
+
app.navbarManager.add(
|
135
|
+
{
|
136
|
+
id: 'createLink',
|
137
|
+
action: clipboardDialogAction,
|
138
|
+
},
|
139
|
+
'@vcmap/test',
|
140
|
+
ButtonLocation.TOOL,
|
141
|
+
);
|
104
142
|
toolboxData.forEach(([{ id, icon, title, buttonComponents }, owner]) => {
|
105
143
|
const group = app.toolboxManager.requestGroup(id, icon, title);
|
106
144
|
buttonComponents.forEach(c => group.buttonManager.add(c, owner));
|
107
145
|
});
|
146
|
+
|
147
|
+
app.contextMenuManager.addEventHandler(async (event) => {
|
148
|
+
const actions = [{
|
149
|
+
id: 'foo2',
|
150
|
+
name: 'Log Position',
|
151
|
+
icon: '$vcsInfo',
|
152
|
+
callback() {
|
153
|
+
console.log(event.positionOrPixel);
|
154
|
+
},
|
155
|
+
}];
|
156
|
+
if (event.feature) {
|
157
|
+
actions.push({
|
158
|
+
id: 'foo',
|
159
|
+
name: 'Log Feature',
|
160
|
+
icon: '$vcsInfo',
|
161
|
+
callback() {
|
162
|
+
console.log('feature right clicked');
|
163
|
+
console.log(event.feature);
|
164
|
+
},
|
165
|
+
});
|
166
|
+
}
|
167
|
+
return actions;
|
168
|
+
}, '@vcmap/test');
|
108
169
|
},
|
109
170
|
destroy() {
|
110
171
|
if (this._destroyActions) {
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
</style>
|
16
16
|
<script>
|
17
|
-
import { inject, onUnmounted, ref, computed } from '
|
17
|
+
import { inject, onUnmounted, ref, computed } from 'vue';
|
18
18
|
import { getLogger } from '@vcsuite/logger';
|
19
19
|
|
20
20
|
import { WindowSlot, VcsButton } from '@vcmap/ui';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { watch } from '
|
1
|
+
import { watch } from 'vue';
|
2
2
|
import { check } from '@vcsuite/check';
|
3
3
|
|
4
4
|
/**
|
@@ -30,7 +30,7 @@ const stateI18nMap = {
|
|
30
30
|
/**
|
31
31
|
* Creates an action
|
32
32
|
* @param {string} name
|
33
|
-
* @param {import("
|
33
|
+
* @param {import("vue").Ref<StateActionState>} stateRef
|
34
34
|
* @param {function():void} callback
|
35
35
|
* @returns {{ action: VcsAction, destroy: function():void }}
|
36
36
|
*/
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</template>
|
20
20
|
|
21
21
|
<script>
|
22
|
-
import { computed, inject, onUnmounted, ref } from '
|
22
|
+
import { computed, inject, onUnmounted, ref } from 'vue';
|
23
23
|
import VcsSelect from '../components/form-inputs-controls/VcsSelect.vue';
|
24
24
|
|
25
25
|
export default {
|
@@ -44,7 +44,13 @@
|
|
44
44
|
</v-toolbar-items>
|
45
45
|
</v-col>
|
46
46
|
<v-col class="align-center d-flex justify-center">
|
47
|
-
<div v-if="$vuetify.breakpoint.mdAndUp" class="
|
47
|
+
<div v-if="$vuetify.breakpoint.mdAndUp" class="d-flex">
|
48
|
+
<img v-if="config.logo" class="logo" :src="config.logo" alt="Logo">
|
49
|
+
<div v-else class="company-logo logo" />
|
50
|
+
<div v-if="config.appTitle" class="ml-4">
|
51
|
+
{{ $t(config.appTitle) }}
|
52
|
+
</div>
|
53
|
+
</div>
|
48
54
|
</v-col>
|
49
55
|
<v-col class="align-content-end d-flex justify-end">
|
50
56
|
<v-toolbar-items v-if="$vuetify.breakpoint.mdAndUp">
|
@@ -109,10 +115,14 @@
|
|
109
115
|
.v-toolbar__items > div{
|
110
116
|
gap: 8px;
|
111
117
|
}
|
118
|
+
.logo {
|
119
|
+
max-height: 36px;
|
120
|
+
margin: 0 auto;
|
121
|
+
}
|
112
122
|
</style>
|
113
123
|
|
114
124
|
<script>
|
115
|
-
import { inject, ref, computed } from '
|
125
|
+
import { inject, ref, computed } from 'vue';
|
116
126
|
import { ButtonLocation, getActionsByLocation } from '../manager/navbarManager.js';
|
117
127
|
import VcsActionButtonList from '../components/buttons/VcsActionButtonList.vue';
|
118
128
|
import VcsActionList from '../components/lists/VcsActionList.vue';
|
@@ -137,6 +147,7 @@
|
|
137
147
|
projectActions: getActions(ButtonLocation.PROJECT),
|
138
148
|
shareActions: getActions(ButtonLocation.SHARE),
|
139
149
|
menuActions: getActions(ButtonLocation.MENU),
|
150
|
+
config: app.uiConfig.config,
|
140
151
|
};
|
141
152
|
},
|
142
153
|
};
|