@vcmap/ui 5.0.0-rc.10 → 5.0.0-rc.13
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 +12 -5
- package/build/build.js +6 -3
- package/build/buildHelpers.js +12 -4
- package/build/buildPreview.js +7 -0
- package/build/getPluginProxies.js +4 -0
- package/config/aerowest.config.json +13 -3
- package/config/base.config.json +398 -219
- package/config/codes.config.json +397 -0
- package/config/dev.config.json +375 -1
- package/config/graphFeatureInfo.config.json +100 -0
- package/config/www.config.json +1232 -0
- package/dist/assets/{cesium.eb5667.js → cesium.21663e.js} +0 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.63242d.js +4 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/font/OFL.txt +93 -0
- package/dist/assets/font/TitilliumWeb-Regular.woff2 +0 -0
- package/dist/assets/{index.4ccd4433.js → index.44b91cfe.js} +1 -1
- package/dist/assets/{ol.ef03b1.js → ol.88ba9d.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.3c2933.css +1 -0
- package/dist/assets/ui.3c2933.js +71 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.c897fc.js +9 -0
- package/dist/assets/vue.js +2 -1
- package/dist/assets/{vuetify.401a29.css → vuetify.147c3a.css} +1 -1
- package/dist/assets/{vuetify.401a29.js → vuetify.147c3a.js} +72 -72
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -5
- package/index.js +39 -5
- package/lib/vue.js +1 -0
- package/map.config.json +15 -6
- package/package.json +17 -8
- 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 +2 -2
- 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/example/index.js +10 -23
- 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 +76 -9
- package/plugins/test/toolbox-data.js +82 -57
- 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 +301 -116
- package/src/application/VcsMap.vue +1 -1
- package/src/application/VcsSettings.vue +1 -1
- package/src/application/vcsAppWrapper.vue +1 -0
- package/src/assets/font/OFL.txt +93 -0
- package/src/assets/font/TitilliumWeb-Regular.woff2 +0 -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 +22 -7
- package/src/components/lists/VcsTreeview.vue +4 -4
- package/src/components/lists/VcsTreeviewLeaf.vue +10 -3
- 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 +140 -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 +457 -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 +26 -0
- package/src/i18n/en.js +26 -0
- package/src/i18n/i18nCollection.js +17 -0
- package/src/icons/+all.js +80 -0
- package/src/icons/ClippingHorizontalIcon.vue +7 -0
- package/src/icons/ClippingIcon.vue +7 -0
- package/src/icons/ClippingVerticalIcon.vue +7 -0
- package/src/icons/ColorPickerIcon.vue +7 -0
- package/src/icons/ComponentsIcon.vue +2 -2
- package/src/icons/DimensionsHouseIcon.vue +11 -9
- package/src/icons/EditIcon.vue +7 -0
- package/src/icons/GlobalTerrainIcon.vue +9 -0
- package/src/icons/GroundIcon.vue +18 -0
- package/src/icons/HideIcon.vue +12 -0
- package/src/icons/LogoutIcon.vue +7 -0
- package/src/icons/ObjectAttributeIcon.vue +2 -13
- package/src/icons/PedestrianIcon.vue +2 -3
- package/src/icons/PenIcon.vue +2 -9
- package/src/icons/PoiIcon.vue +5 -2
- package/src/icons/PointSelectIcon.vue +4 -2
- package/src/icons/QueryIcon.vue +6 -7
- package/src/icons/ScreenshotIcon.vue +16 -0
- package/src/icons/ShareIcon.vue +4 -16
- package/src/icons/SkipNextIcon.vue +3 -1
- package/src/icons/TerrainBoxIcon.vue +9 -0
- package/src/icons/ToolsIcon.vue +4 -30
- package/src/icons/UploadIcon.vue +2 -9
- package/src/icons/UserProfileIcon.vue +7 -0
- package/src/icons/UserShareIcon.vue +7 -0
- package/src/icons/VideoRecorderIcon.vue +5 -9
- package/src/icons/ViewpointFlightIcon.vue +11 -0
- package/src/icons/ViewpointIcon.vue +11 -0
- package/src/icons/Viewshed360Icon.vue +7 -0
- package/src/icons/ViewshedConeIcon.vue +7 -0
- package/src/icons/ViewshedIcon.vue +7 -0
- package/src/icons/WallIcon.vue +4 -9
- package/src/legend/legendHelper.js +193 -0
- package/src/legend/styleLegendItem.vue +129 -0
- package/src/legend/vcsLegend.vue +92 -0
- package/src/manager/buttonManager.js +7 -12
- 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 +9 -9
- package/src/manager/toolbox/GroupToolboxComponent.vue +118 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +128 -0
- package/src/manager/toolbox/ToolboxManager.vue +116 -98
- package/src/manager/toolbox/toolboxManager.js +235 -86
- 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/pluginHelper.js +42 -10
- package/src/setup.js +0 -2
- package/src/state.js +256 -0
- package/src/styles/_theming.scss +0 -5
- package/src/styles/variables.scss +7 -0
- package/src/styles/vcsFont.scss +17 -0
- package/src/uiConfig.js +79 -0
- package/src/vcsUiApp.js +213 -22
- 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
- package/src/manager/toolbox/ToolboxGroupComponent.vue +0 -128
package/dist/assets/vuetify.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./vuetify.
|
2
|
-
export { default } from "./vuetify.
|
1
|
+
export * from "./vuetify.147c3a.js";
|
2
|
+
export { default } from "./vuetify.147c3a.js";
|
package/dist/index.html
CHANGED
@@ -3,11 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
6
|
-
<
|
7
|
-
rel="stylesheet"
|
8
|
-
href="https://fonts.googleapis.com/css?family=Titillium+Web"
|
9
|
-
/>
|
10
|
-
<script type="module" crossorigin src="./assets/index.4ccd4433.js"></script>
|
6
|
+
<script type="module" crossorigin src="./assets/index.44b91cfe.js"></script>
|
11
7
|
</head>
|
12
8
|
<body style="height: 100vH;">
|
13
9
|
<noscript>
|
package/index.js
CHANGED
@@ -15,7 +15,12 @@ export {
|
|
15
15
|
} from './src/actions/stateRefAction.js';
|
16
16
|
|
17
17
|
export { default as Navbar } from './src/application/Navbar.vue';
|
18
|
-
export {
|
18
|
+
export {
|
19
|
+
default as VcsApp,
|
20
|
+
setupMapNavbar,
|
21
|
+
setupPluginMountedListeners,
|
22
|
+
setupComponentsWindow,
|
23
|
+
} from './src/application/VcsApp.vue';
|
19
24
|
export { default as VcsAppWrapper } from './src/application/vcsAppWrapper.vue';
|
20
25
|
export { default as VcsMap } from './src/application/VcsMap.vue';
|
21
26
|
|
@@ -41,10 +46,33 @@ export { default as ViewPointContentTreeItem } from './src/contentTree/viewPoint
|
|
41
46
|
export { default as WindowComponent } from './src/manager/window/WindowComponent.vue';
|
42
47
|
export { default as WindowComponentHeader } from './src/manager/window/WindowComponentHeader.vue';
|
43
48
|
export { default as VcsWindowManager } from './src/manager/window/WindowManager.vue';
|
44
|
-
export {
|
45
|
-
|
46
|
-
|
49
|
+
export {
|
50
|
+
WindowManager,
|
51
|
+
WindowSlot,
|
52
|
+
WindowPositions,
|
53
|
+
WindowAlignment,
|
54
|
+
getFittedWindowPositionOptions,
|
55
|
+
getFittedWindowPositionOptionsFromMapEvent,
|
56
|
+
getWindowPositionOptions,
|
57
|
+
getWindowPositionOptionsFromMapEvent,
|
58
|
+
} from './src/manager/window/windowManager.js';
|
59
|
+
|
60
|
+
export { default as ButtonManager } from './src/manager/buttonManager.js';
|
47
61
|
export { NavbarManager, ButtonLocation, getActionsByLocation } from './src/manager/navbarManager.js';
|
62
|
+
export { default as ToolboxManager, ToolboxType } from './src/manager/toolbox/toolboxManager.js';
|
63
|
+
export { default as CategoryManager } from './src/manager/categoryManager/categoryManager.js';
|
64
|
+
export { default as ComponentsManager } from './src/manager/categoryManager/ComponentsManager.vue';
|
65
|
+
export { default as ContextMenuManager } from './src/manager/contextMenu/contextMenuManager.js';
|
66
|
+
export { default as ContextMenuComponent } from './src/manager/contextMenu/contextMenuComponent.vue';
|
67
|
+
export { default as ContextMenuInteraction } from './src/manager/contextMenu/contextMenuInteraction.js';
|
68
|
+
|
69
|
+
export { applyKeyMapping, applyValueMapping, default as AbstractFeatureInfoView } from './src/featureInfo/abstractFeatureInfoView.js';
|
70
|
+
export { extractNestedKey, default as BalloonFeatureInfoView } from './src/featureInfo/balloonFeatureInfoView.js';
|
71
|
+
export { getBalloonPosition, setBalloonPosition, setupBalloonPositionListener } from './src/featureInfo/balloonHelper.js';
|
72
|
+
export { default as BalloonComponent } from './src/featureInfo/BalloonComponent.vue';
|
73
|
+
export { default as AddressBalloonComponent } from './src/featureInfo/AddressBalloonComponent.vue';
|
74
|
+
export { default as IframeFeatureInfoView } from './src/featureInfo/iframeFeatureInfoView.js';
|
75
|
+
export { default as TableFeatureInfoView } from './src/featureInfo/tableFeatureInfoView.js';
|
48
76
|
|
49
77
|
export { default as MapNavCompass } from './src/navigation/mapNavCompass.vue';
|
50
78
|
export { default as MapNavigation } from './src/navigation/mapNavigation.vue';
|
@@ -62,11 +90,14 @@ export { default as initApp } from './src/init.js';
|
|
62
90
|
export {
|
63
91
|
vcsAppSymbol,
|
64
92
|
pluginFactorySymbol,
|
93
|
+
pluginBaseUrlSymbol,
|
94
|
+
getPluginAssetUrl,
|
65
95
|
isValidPackageName,
|
66
96
|
loadPlugin,
|
67
97
|
serializePlugin,
|
68
98
|
deserializePlugin,
|
69
99
|
} from './src/pluginHelper.js';
|
100
|
+
export { getStateFromURL, createEmptyState, setStateToUrl } from './src/state.js';
|
70
101
|
export { default as VcsUiApp } from './src/vcsUiApp.js';
|
71
102
|
export { default as Icons } from './src/icons/+all.js';
|
72
103
|
|
@@ -74,10 +105,13 @@ export { default as VcsButton } from './src/components/buttons/VcsButton.vue';
|
|
74
105
|
export { default as VcsActionButtonList } from './src/components/buttons/VcsActionButtonList.vue';
|
75
106
|
export { default as VcsTooltip } from './src/components/notification/VcsTooltip.vue';
|
76
107
|
|
108
|
+
export { default as VcsTable } from './src/components/tables/VcsTable.vue';
|
109
|
+
|
77
110
|
// export { default as VcsConfirmationDialog } from './src/components/dialogs/VcsConfirmationDialog.vue';
|
78
111
|
|
79
112
|
export { default as VcsLabel } from './src/components/form-inputs-controls/VcsLabel.vue';
|
80
113
|
export { default as VcsCheckbox } from './src/components/form-inputs-controls/VcsCheckbox.vue';
|
114
|
+
export { default as VcsRadio } from './src/components/form-inputs-controls/VcsRadio.vue';
|
81
115
|
// export { default as VcsColorPicker } from './src/components/form-inputs-controls/VcsColorPicker.vue';
|
82
116
|
export { default as VcsFormSection } from './src/components/form-inputs-controls/VcsFormSection.vue';
|
83
117
|
// export { default as VcsInputColumnCoordinates } from './src/components/form-inputs-controls/VcsInputColumnCoordinates.vue';
|
@@ -89,7 +123,7 @@ export { default as VcsTextArea } from './src/components/form-inputs-controls/Vc
|
|
89
123
|
|
90
124
|
export { default as VcsFormattedNumber } from './src/components/form-output/VcsFormattedNumber.vue';
|
91
125
|
|
92
|
-
export { default as VcsActionList, validateActions } from './src/components/lists/VcsActionList.vue';
|
126
|
+
export { default as VcsActionList, validateAction, validateActions } from './src/components/lists/VcsActionList.vue';
|
93
127
|
// export { default as VcsEndlessList } from './src/components/lists/VcsEndlessList.vue';
|
94
128
|
export { default as VcsTreeview } from './src/components/lists/VcsTreeview.vue';
|
95
129
|
export { default as VcsTreeviewLeaf } from './src/components/lists/VcsTreeviewLeaf.vue';
|
package/lib/vue.js
CHANGED
package/map.config.json
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
{
|
4
4
|
"name": "@vcmap/project-selector",
|
5
5
|
"entry": "plugins/@vcmap/project-selector/index.js",
|
6
|
-
"selected": "
|
7
|
-
"selectedContexts": ["development"],
|
6
|
+
"selected": "",
|
7
|
+
"selectedContexts": ["development", "codeLists"],
|
8
8
|
"open": true,
|
9
9
|
"projects": [
|
10
10
|
{
|
@@ -15,11 +15,10 @@
|
|
15
15
|
]
|
16
16
|
},
|
17
17
|
{
|
18
|
-
"name": "VC Map
|
19
|
-
"description": "
|
18
|
+
"name": "VC Map Demo",
|
19
|
+
"description": "VC Map Demo www.virtualcitymap.de",
|
20
20
|
"contexts": [
|
21
|
-
{ "configUrl": "config/
|
22
|
-
{ "configUrl": "config/berlin.config.json" }
|
21
|
+
{ "configUrl": "config/www.config.json" }
|
23
22
|
]
|
24
23
|
}
|
25
24
|
],
|
@@ -28,6 +27,16 @@
|
|
28
27
|
"name": "development",
|
29
28
|
"description": "context containing examples, showcases and other stuff",
|
30
29
|
"configUrl": "config/dev.config.json"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"name": "codeLists",
|
33
|
+
"description": "context containing code lists for key and attribute mapping",
|
34
|
+
"configUrl": "config/codes.config.json"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "graphFeatureInfo",
|
38
|
+
"description": "context adding a graph Feature Info view",
|
39
|
+
"configUrl": "config/graphFeatureInfo.config.json"
|
31
40
|
}
|
32
41
|
]
|
33
42
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.13",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -42,11 +42,10 @@
|
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
44
|
"@vcmap/cesium": "~1.93.1",
|
45
|
-
"@vcmap/core": "^5.0.0-rc.
|
46
|
-
"@vue/composition-api": "~1.4.5",
|
45
|
+
"@vcmap/core": "^5.0.0-rc.20",
|
47
46
|
"ol": "~6.13.0",
|
48
|
-
"vue": "~2.
|
49
|
-
"vuetify": "~2.6.
|
47
|
+
"vue": "~2.7.3",
|
48
|
+
"vuetify": "~2.6.7"
|
50
49
|
},
|
51
50
|
"devDependencies": {
|
52
51
|
"@vcmap/rollup-plugin-vcs-ol": "^1.0.1",
|
@@ -61,8 +60,8 @@
|
|
61
60
|
"rollup-plugin-strip-pragma": "^1.0.0",
|
62
61
|
"sass": "1.32.13",
|
63
62
|
"typescript": "^4.2.4",
|
64
|
-
"unplugin-vue-components": "^0.
|
65
|
-
"vite": "^2.9.
|
63
|
+
"unplugin-vue-components": "^0.21.1",
|
64
|
+
"vite": "^2.9.13",
|
66
65
|
"vite-plugin-vue2": "^2.0.1",
|
67
66
|
"vitest": "^0.14.2"
|
68
67
|
},
|
@@ -122,5 +121,15 @@
|
|
122
121
|
"node": "^16.14.0",
|
123
122
|
"npm": "^8.3.1"
|
124
123
|
},
|
125
|
-
"type": "module"
|
124
|
+
"type": "module",
|
125
|
+
"exports": {
|
126
|
+
".": "./index.js",
|
127
|
+
"./config/*.json": "./config/*.json",
|
128
|
+
"./src/assets/logo.svg": "./src/assets/logo.svg",
|
129
|
+
"./src/assets/logo-mobile.svg": "./src/assets/logo-mobile.svg",
|
130
|
+
"./build/buildHelpers.js": "./build/buildHelpers.js",
|
131
|
+
"./build/getPluginProxies.js": "./build/getPluginProxies.js",
|
132
|
+
"./build/determineHost.js": "./build/determineHost.js",
|
133
|
+
"./src/styles/variables.scss": "./src/styles/variables.scss"
|
134
|
+
}
|
126
135
|
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<template>
|
2
|
+
<v-sheet class="d-flex flew-row align-center pl-2 pr-2">
|
3
|
+
<VcsTextField
|
4
|
+
:value="localLink"
|
5
|
+
class="d-flex col-10 pa-0 mr-2"
|
6
|
+
/>
|
7
|
+
<div class="d-flex col-2 justify-end pa-0">
|
8
|
+
<VcsButton
|
9
|
+
small
|
10
|
+
icon="mdi-content-copy"
|
11
|
+
class="mr-2"
|
12
|
+
@click="copy"
|
13
|
+
:title="$t('createLink.copyToClipboard')"
|
14
|
+
/>
|
15
|
+
<VcsButton
|
16
|
+
small
|
17
|
+
icon="mdi-refresh"
|
18
|
+
class="mr-2"
|
19
|
+
@click="refresh"
|
20
|
+
:title="$t('createLink.refreshTooltip')"
|
21
|
+
/>
|
22
|
+
</div>
|
23
|
+
</v-sheet>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
<script>
|
27
|
+
import { VcsTextField, VcsButton, setStateToUrl } from '@vcmap/ui';
|
28
|
+
import { getCurrentInstance, inject, ref } from 'vue';
|
29
|
+
|
30
|
+
export default {
|
31
|
+
name: 'FallbackCreateLink',
|
32
|
+
props: {
|
33
|
+
link: {
|
34
|
+
type: String,
|
35
|
+
required: true,
|
36
|
+
},
|
37
|
+
},
|
38
|
+
components: {
|
39
|
+
VcsTextField,
|
40
|
+
VcsButton,
|
41
|
+
},
|
42
|
+
setup(props) {
|
43
|
+
const localLink = ref(props.link);
|
44
|
+
const app = inject('vcsApp');
|
45
|
+
|
46
|
+
const { proxy } = getCurrentInstance();
|
47
|
+
const copy = () => {
|
48
|
+
const element = proxy.$el.querySelector('input');
|
49
|
+
element.select();
|
50
|
+
document.execCommand('copy');
|
51
|
+
};
|
52
|
+
|
53
|
+
const refresh = async () => {
|
54
|
+
const state = await app.getState(true);
|
55
|
+
const url = new URL(window.location.href);
|
56
|
+
setStateToUrl(state, url);
|
57
|
+
localLink.value = url.toString();
|
58
|
+
};
|
59
|
+
|
60
|
+
return {
|
61
|
+
copy,
|
62
|
+
refresh,
|
63
|
+
localLink,
|
64
|
+
};
|
65
|
+
},
|
66
|
+
};
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<style scoped>
|
70
|
+
|
71
|
+
</style>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { ButtonLocation, setStateToUrl, WindowSlot } from '@vcmap/ui';
|
2
|
+
import FallbackCreateLink from './fallbackCreateLink.vue';
|
3
|
+
|
4
|
+
const name = '@vcmap/create-link';
|
5
|
+
const fallBackWindowId = 'create-link-fallback-window';
|
6
|
+
function createFallbackWindow(app, link) {
|
7
|
+
app.windowManager.remove(fallBackWindowId);
|
8
|
+
app.windowManager.add(
|
9
|
+
{
|
10
|
+
id: fallBackWindowId,
|
11
|
+
component: FallbackCreateLink,
|
12
|
+
slot: WindowSlot.DYNAMIC_RIGHT,
|
13
|
+
state: {
|
14
|
+
headerTitle: 'createLink.windowTitle',
|
15
|
+
headerIcon: 'mdi-share-variant',
|
16
|
+
},
|
17
|
+
props: {
|
18
|
+
link,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
name,
|
22
|
+
);
|
23
|
+
}
|
24
|
+
|
25
|
+
export default function createLink() {
|
26
|
+
return {
|
27
|
+
name,
|
28
|
+
version: '1.0.0',
|
29
|
+
i18n: {
|
30
|
+
de: {
|
31
|
+
createLink: {
|
32
|
+
title: 'Link Kopieren',
|
33
|
+
windowTitle: 'Applikationslink',
|
34
|
+
tooltip: 'Dialog zum kopieren des Applikationslinks anzeigen.',
|
35
|
+
copyToClipboard: 'Applikationslink in Zwischenablage kopieren',
|
36
|
+
refreshTooltip: 'Applikationslink aktualisieren',
|
37
|
+
},
|
38
|
+
},
|
39
|
+
en: {
|
40
|
+
createLink: {
|
41
|
+
title: 'Copy Link',
|
42
|
+
windowTitle: 'Application Link',
|
43
|
+
tooltip: 'Open dialog to copy application link to clipboard',
|
44
|
+
copyToClipboard: 'Copy application link to clipboard',
|
45
|
+
refreshTooltip: 'Refresh application link',
|
46
|
+
},
|
47
|
+
},
|
48
|
+
},
|
49
|
+
/**
|
50
|
+
* @param {VcsUiApp} app
|
51
|
+
*/
|
52
|
+
initialize(app) {
|
53
|
+
const title = navigator.clipboard ?
|
54
|
+
'createLink.copyToClipboard' :
|
55
|
+
'createLink.tooltip';
|
56
|
+
|
57
|
+
app.navbarManager.add(
|
58
|
+
{
|
59
|
+
action: {
|
60
|
+
name: 'createLink.title',
|
61
|
+
title,
|
62
|
+
icon: 'mdi-share-variant',
|
63
|
+
/**
|
64
|
+
* @returns {Promise<void>}
|
65
|
+
*/
|
66
|
+
async callback() {
|
67
|
+
const state = await app.getState(true);
|
68
|
+
const url = new URL(window.location.href);
|
69
|
+
setStateToUrl(state, url);
|
70
|
+
if (navigator.clipboard) {
|
71
|
+
await navigator.clipboard.writeText(url.toString());
|
72
|
+
} else {
|
73
|
+
createFallbackWindow(app, url.toString());
|
74
|
+
}
|
75
|
+
},
|
76
|
+
},
|
77
|
+
},
|
78
|
+
name,
|
79
|
+
ButtonLocation.SHARE,
|
80
|
+
);
|
81
|
+
},
|
82
|
+
};
|
83
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref, reactive, watch } from '
|
1
|
+
import { ref, reactive, watch } from 'vue';
|
2
2
|
import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
3
3
|
|
4
4
|
|
@@ -157,7 +157,7 @@ export default function (config) {
|
|
157
157
|
{
|
158
158
|
id: 'pluginExample',
|
159
159
|
component: pluginExampleComponent,
|
160
|
-
slot: WindowSlot.
|
160
|
+
slot: WindowSlot.DYNAMIC_LEFT,
|
161
161
|
state: {
|
162
162
|
headerTitle: 'pluginExample.select',
|
163
163
|
headerIcon: '$vcsCircle',
|
@@ -251,6 +251,20 @@
|
|
251
251
|
/>
|
252
252
|
</v-col>
|
253
253
|
</v-row>
|
254
|
+
<v-row
|
255
|
+
:dense="dense"
|
256
|
+
no-gutters
|
257
|
+
align="center"
|
258
|
+
>
|
259
|
+
<v-col>
|
260
|
+
<VcsRadio
|
261
|
+
:dense="dense"
|
262
|
+
:items="[...selectOptions, { label: 'Radio Option E colored', color: 'primary', value: 'E' }]"
|
263
|
+
v-model="state.selected"
|
264
|
+
row
|
265
|
+
/>
|
266
|
+
</v-col>
|
267
|
+
</v-row>
|
254
268
|
<v-row
|
255
269
|
:dense="dense"
|
256
270
|
no-gutters
|
@@ -287,6 +301,7 @@
|
|
287
301
|
:disabled="!isValid"
|
288
302
|
:tooltip="'Log current state in console'"
|
289
303
|
:has-update="isValid && newUpdate"
|
304
|
+
class="mx-2 mb-2"
|
290
305
|
>
|
291
306
|
Log State
|
292
307
|
</VcsButton>
|
@@ -299,10 +314,11 @@
|
|
299
314
|
</v-form>
|
300
315
|
</template>
|
301
316
|
<script>
|
302
|
-
import { inject, ref, watch } from '
|
317
|
+
import { inject, ref, watch } from 'vue';
|
303
318
|
import {
|
304
319
|
VcsSelect,
|
305
320
|
VcsCheckbox,
|
321
|
+
VcsRadio,
|
306
322
|
VcsButton,
|
307
323
|
VcsTextField,
|
308
324
|
VcsFormattedNumber,
|
@@ -318,6 +334,7 @@
|
|
318
334
|
VcsSelect,
|
319
335
|
VcsTextField,
|
320
336
|
VcsCheckbox,
|
337
|
+
VcsRadio,
|
321
338
|
VcsFormattedNumber,
|
322
339
|
VcsFormSection,
|
323
340
|
VcsLabel,
|
@@ -342,8 +359,8 @@
|
|
342
359
|
].join('\n');
|
343
360
|
|
344
361
|
return {
|
345
|
-
showSection: true,
|
346
|
-
dense: true,
|
362
|
+
showSection: ref(true),
|
363
|
+
dense: ref(true),
|
347
364
|
helpExample,
|
348
365
|
// no object-destruction of reactive objects! or use toRef()
|
349
366
|
state: plugin.state,
|
@@ -13,6 +13,7 @@
|
|
13
13
|
<span>
|
14
14
|
<VcsButton icon="$vcsPlus" @click="newDialog = true" />
|
15
15
|
<VcsButton icon="$vcsExport" @click="uploadDialog = true" />
|
16
|
+
<VcsButton @click="addManagedCategories"> Add Categories To Manager </VcsButton>
|
16
17
|
</span>
|
17
18
|
|
18
19
|
<v-dialog
|
@@ -56,8 +57,9 @@
|
|
56
57
|
</template>
|
57
58
|
|
58
59
|
<script>
|
59
|
-
import { inject, ref, onUnmounted } from '
|
60
|
+
import { inject, ref, onUnmounted } from 'vue';
|
60
61
|
import { VcsButton } from '@vcmap/ui';
|
62
|
+
import { GeoJSONLayer } from '@vcmap/core';
|
61
63
|
import Category from './Category.vue';
|
62
64
|
|
63
65
|
export default {
|
@@ -133,6 +135,92 @@
|
|
133
135
|
console.error('not a valid JSON');
|
134
136
|
}
|
135
137
|
},
|
138
|
+
async addManagedCategories() {
|
139
|
+
if (!app.categories.hasKey('layers')) {
|
140
|
+
const layersCat = await app.categories.requestCategory({
|
141
|
+
name: 'layers',
|
142
|
+
type: 'AppBackedCategory',
|
143
|
+
collectionName: 'layers',
|
144
|
+
title: 'categories.layers',
|
145
|
+
});
|
146
|
+
const actions = [{
|
147
|
+
name: 'mySuperAction',
|
148
|
+
icon: 'mdi-plus',
|
149
|
+
callback: () => {
|
150
|
+
layersCat.collection.add(new GeoJSONLayer({
|
151
|
+
features: [
|
152
|
+
{
|
153
|
+
type: 'Feature',
|
154
|
+
properties: {},
|
155
|
+
geometry: {
|
156
|
+
type: 'Polygon',
|
157
|
+
coordinates: [
|
158
|
+
[
|
159
|
+
[
|
160
|
+
13.376044753386196,
|
161
|
+
52.51700747314845,
|
162
|
+
34.434221826595746,
|
163
|
+
],
|
164
|
+
[
|
165
|
+
13.375890137534464,
|
166
|
+
52.51683412207231,
|
167
|
+
34.43535288837092,
|
168
|
+
],
|
169
|
+
[
|
170
|
+
13.376141126603242,
|
171
|
+
52.51641627693124,
|
172
|
+
34.66410424636929,
|
173
|
+
],
|
174
|
+
[
|
175
|
+
13.376773170085109,
|
176
|
+
52.516279904694215,
|
177
|
+
34.73478984011562,
|
178
|
+
],
|
179
|
+
[
|
180
|
+
13.376887028670879,
|
181
|
+
52.51695485856382,
|
182
|
+
34.72412287410914,
|
183
|
+
],
|
184
|
+
[
|
185
|
+
13.376044753386196,
|
186
|
+
52.51700747314845,
|
187
|
+
34.434221826595746,
|
188
|
+
],
|
189
|
+
],
|
190
|
+
],
|
191
|
+
},
|
192
|
+
}],
|
193
|
+
}));
|
194
|
+
},
|
195
|
+
}];
|
196
|
+
app.categoryManager.addCategory(layersCat.name, '@vcmap/categoryTest', actions);
|
197
|
+
app.categoryManager.addMappingFunction((item, category) => {
|
198
|
+
return category.name === 'layers';
|
199
|
+
}, (item, category, treeViewItem) => {
|
200
|
+
// eslint-disable-next-line no-console
|
201
|
+
const action = {
|
202
|
+
name: 'mySuperAction',
|
203
|
+
icon: '$vcsSimpleCircleFilled',
|
204
|
+
callback: () => {
|
205
|
+
console.log(item, category, treeViewItem);
|
206
|
+
},
|
207
|
+
};
|
208
|
+
treeViewItem.actions.push(action);
|
209
|
+
treeViewItem.clickable = true;
|
210
|
+
treeViewItem.clicked = () => {
|
211
|
+
if (!item.active) item.activate(); else item.deactivate();
|
212
|
+
};
|
213
|
+
const action2 = {
|
214
|
+
name: 'mySuperAction3',
|
215
|
+
icon: 'mdi-minus',
|
216
|
+
callback: () => {
|
217
|
+
category.collection.remove(item);
|
218
|
+
},
|
219
|
+
};
|
220
|
+
treeViewItem.actions.push(action2);
|
221
|
+
}, ['layers'], '@vcmap/categoryTest');
|
222
|
+
}
|
223
|
+
},
|
136
224
|
};
|
137
225
|
},
|
138
226
|
};
|
package/plugins/example/index.js
CHANGED
@@ -40,30 +40,17 @@ export default async function (config) {
|
|
40
40
|
'@vcmap/example',
|
41
41
|
ButtonLocation.TOOL,
|
42
42
|
);
|
43
|
-
const
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
},
|
53
|
-
},
|
54
|
-
{
|
55
|
-
id: 'area3D',
|
56
|
-
action: {
|
57
|
-
name: 'area3D',
|
58
|
-
title: '3D area',
|
59
|
-
icon: '$vcs3dArea',
|
60
|
-
active: false,
|
61
|
-
callback() { this.active = !this.active; },
|
62
|
-
},
|
43
|
+
const miscGroup = app.toolboxManager.get('miscellaneous');
|
44
|
+
miscGroup.buttonManager.add({
|
45
|
+
id: 'example',
|
46
|
+
action: {
|
47
|
+
name: 'example',
|
48
|
+
title: 'example',
|
49
|
+
icon: 'mdi-circle-small',
|
50
|
+
active: false,
|
51
|
+
callback() { this.active = !this.active; },
|
63
52
|
},
|
64
|
-
|
65
|
-
const measurementGroup = app.toolboxManager.requestGroup('measurement');
|
66
|
-
buttonComponents.forEach(c => measurementGroup.buttonManager.add(c, '@vcmap/example'));
|
53
|
+
}, '@vcmap/example');
|
67
54
|
},
|
68
55
|
destroy() {
|
69
56
|
if (this._destroyAction) {
|