@vcmap/ui 5.0.0-rc.14 → 5.0.0-rc.16
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 +33 -31
- package/build/build.js +9 -0
- package/build/buildHelpers.js +12 -10
- package/build/commonViteConfig.js +3 -10
- package/config/base.config.json +30 -24
- package/config/dev.config.json +13 -1
- package/config/www.config.json +104 -17
- package/dist/assets/cesium.430460.js +137226 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.5089ba.js +16024 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/index.854f8e2b.js +1 -0
- package/dist/assets/ol.9be53a.js +44279 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.15ef6a.css → ui.49010a.css} +1 -1
- package/dist/assets/ui.49010a.js +16776 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.247c1c.js +4675 -0
- package/dist/assets/vue.js +5 -2
- package/dist/assets/{vuetify.202322.css → vuetify.735e58.css} +1 -1
- package/dist/assets/vuetify.735e58.js +21019 -0
- package/dist/assets/vuetify.js +5 -2
- package/dist/index.html +1 -1
- package/index.html +77 -0
- package/index.js +8 -1
- package/package.json +12 -10
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +4 -1
- package/plugins/@vcmap/create-link/index.js +4 -1
- package/plugins/@vcmap/pluginExample/exampleActions.js +45 -0
- package/plugins/@vcmap/pluginExample/index.js +38 -1
- package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +152 -98
- package/plugins/@vcmap/project-selector/ContextsListComponent.vue +8 -1
- package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +27 -1
- package/plugins/@vcmap/search-nominatim/LICENSE.md +14 -0
- package/plugins/@vcmap/search-nominatim/README.md +2 -0
- package/plugins/@vcmap/search-nominatim/config.json +4 -0
- package/plugins/@vcmap/search-nominatim/index.js +26 -0
- package/plugins/@vcmap/search-nominatim/nominatim.js +170 -0
- package/plugins/@vcmap/search-nominatim/package.json +43 -0
- package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +26 -0
- package/plugins/buttonExamples/ButtonExamples.vue +28 -1
- package/plugins/categoryTest/Categories.vue +16 -0
- package/plugins/categoryTest/Category.vue +30 -4
- package/plugins/example/mySuperComponent.vue +12 -1
- package/plugins/notifier/index.js +31 -0
- package/plugins/notifier/notifierTester.vue +88 -0
- package/plugins/package.json +2 -1
- package/plugins/simple-graph/SimpleGraphComponent.vue +5 -11
- package/plugins/test/allIconsComponent.vue +16 -0
- package/plugins/test/editor.vue +3 -0
- package/plugins/test/emptyComponent.vue +3 -0
- package/plugins/test/index.js +22 -0
- package/plugins/test/myCustomHeader.vue +9 -1
- package/plugins/test/testList.vue +287 -0
- package/plugins/test/vcsContent.vue +3 -0
- package/plugins/test/windowManagerExample.vue +3 -0
- package/plugins/wizardExample/index.js +41 -0
- package/plugins/wizardExample/wizardExample.vue +77 -0
- package/src/actions/actionHelper.js +103 -2
- package/src/actions/styleSelector.vue +9 -0
- package/src/application/VcsApp.vue +95 -17
- package/src/application/VcsAttributions.vue +63 -0
- package/src/application/VcsAttributionsFooter.vue +87 -0
- package/src/application/{Navbar.vue → VcsNavbar.vue} +35 -2
- package/src/application/VcsSettings.vue +4 -0
- package/src/application/attributionsHelper.js +150 -0
- package/src/application/vcsAppWrapper.vue +5 -1
- package/src/components/buttons/VcsActionButtonList.vue +8 -1
- package/src/components/buttons/VcsButton.vue +7 -1
- package/src/components/form-inputs-controls/VcsCheckbox.vue +7 -2
- package/src/components/form-inputs-controls/VcsColorPicker.vue +4 -0
- package/src/components/form-inputs-controls/VcsFormSection.vue +55 -9
- package/src/components/form-inputs-controls/VcsRadio.vue +7 -1
- package/src/components/form-inputs-controls/VcsSelect.vue +38 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +16 -4
- package/src/components/form-inputs-controls/VcsWizard.vue +133 -0
- package/src/components/imageElementInjector.vue +22 -0
- package/src/components/lists/VcsActionList.vue +12 -1
- package/src/components/lists/VcsList.vue +466 -0
- package/src/components/lists/VcsTreeview.vue +7 -3
- package/src/components/lists/VcsTreeviewLeaf.vue +23 -51
- package/src/components/lists/VcsTreeviewSearchbar.vue +6 -23
- package/src/components/notification/VcsTooltip.vue +14 -9
- package/src/components/tables/VcsTable.vue +129 -38
- package/src/contentTree/LayerTree.vue +1 -1
- package/src/contentTree/contentTreeItem.js +13 -13
- package/src/contentTree/subContentTreeItem.js +1 -1
- package/src/contentTree/vcsObjectContentTreeItem.js +1 -1
- package/src/featureInfo/AddressBalloonComponent.vue +17 -1
- package/src/featureInfo/BalloonComponent.vue +63 -27
- package/src/featureInfo/balloonFeatureInfoView.js +14 -14
- package/src/featureInfo/balloonHelper.js +4 -0
- package/src/featureInfo/featureInfo.js +23 -2
- package/src/featureInfo/featureInfoInteraction.js +1 -1
- package/src/i18n/de.js +22 -0
- package/src/i18n/en.js +22 -0
- package/src/icons/+all.js +4 -0
- package/src/icons/WandIcon.vue +63 -0
- package/src/legend/legendHelper.js +18 -12
- package/src/legend/styleLegendItem.vue +20 -1
- package/src/legend/vcsLegend.vue +29 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +13 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue +13 -1
- package/src/manager/toolbox/ToolboxManager.vue +3 -0
- package/src/manager/window/WindowComponent.vue +15 -2
- package/src/manager/window/WindowComponentHeader.vue +38 -7
- package/src/manager/window/WindowManager.vue +1 -0
- package/src/manager/window/windowManager.js +11 -1
- package/src/navigation/mapNavigation.vue +15 -36
- package/src/navigation/orientationToolsButton.vue +6 -1
- package/src/navigation/overviewMap.js +19 -47
- package/src/navigation/tiltSlider.vue +3 -0
- package/src/navigation/vcsCompass.vue +2 -0
- package/src/notifier/notifier.js +121 -0
- package/src/notifier/notifierComponent.vue +84 -0
- package/src/search/resultItem.vue +89 -0
- package/src/search/resultsComponent.vue +98 -0
- package/src/search/search.js +326 -0
- package/src/search/searchComponent.vue +90 -0
- package/src/styles/_typography.scss +3 -0
- package/src/styles/utils/_cursor.scss +4 -0
- package/src/styles/variables.scss +23 -4
- package/src/vcsUiApp.js +35 -1
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/cesium.9489f8.js +0 -8699
- package/dist/assets/core.aa346a.js +0 -4
- package/dist/assets/index.3cd4fffa.js +0 -1
- package/dist/assets/ol.39651b.js +0 -439
- package/dist/assets/ui.15ef6a.js +0 -71
- package/dist/assets/vue.cbe9d8.js +0 -9
- package/dist/assets/vuetify.202322.js +0 -148
package/dist/assets/vuetify.js
CHANGED
package/dist/index.html
CHANGED
@@ -3,7 +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
|
-
<script type="module" crossorigin src="./assets/index.
|
6
|
+
<script type="module" crossorigin src="./assets/index.854f8e2b.js"></script>
|
7
7
|
</head>
|
8
8
|
<body style="height: 100vH;">
|
9
9
|
<noscript>
|
package/index.html
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="vcs-ui" lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
6
|
+
</head>
|
7
|
+
<body style="height: 100vH;">
|
8
|
+
<noscript>
|
9
|
+
<strong>...</strong>
|
10
|
+
</noscript>
|
11
|
+
<div id="app">
|
12
|
+
<div id="loading-wrapper">
|
13
|
+
<div id="loading-text">LOADING</div>
|
14
|
+
<div id="loading-content"></div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<style>
|
18
|
+
#loading-wrapper {
|
19
|
+
position: fixed;
|
20
|
+
width: 100%;
|
21
|
+
height: 100%;
|
22
|
+
left: 0;
|
23
|
+
top: 0;
|
24
|
+
}
|
25
|
+
|
26
|
+
#loading-text {
|
27
|
+
display: block;
|
28
|
+
position: absolute;
|
29
|
+
top: 50%;
|
30
|
+
left: 50%;
|
31
|
+
color: #409d76;
|
32
|
+
width: 100px;
|
33
|
+
height: 30px;
|
34
|
+
margin: -7px 0 0 -45px;
|
35
|
+
text-align: center;
|
36
|
+
font-family: 'PT Sans Narrow', sans-serif;
|
37
|
+
font-size: 20px;
|
38
|
+
}
|
39
|
+
|
40
|
+
#loading-content {
|
41
|
+
display: block;
|
42
|
+
position: relative;
|
43
|
+
left: 50%;
|
44
|
+
top: 50%;
|
45
|
+
width: 170px;
|
46
|
+
height: 170px;
|
47
|
+
margin: -85px 0 0 -85px;
|
48
|
+
}
|
49
|
+
|
50
|
+
#loading-content {
|
51
|
+
border: 3px solid transparent;
|
52
|
+
border-top-color: #409d76;
|
53
|
+
border-bottom-color: #409d76;
|
54
|
+
border-radius: 50%;
|
55
|
+
-webkit-animation: loader 2s linear infinite;
|
56
|
+
-moz-animation: loader 2s linear infinite;
|
57
|
+
-o-animation: loader 2s linear infinite;
|
58
|
+
animation: loader 2s linear infinite;
|
59
|
+
}
|
60
|
+
|
61
|
+
@keyframes loader {
|
62
|
+
0% {
|
63
|
+
-webkit-transform: rotate(0deg);
|
64
|
+
-ms-transform: rotate(0deg);
|
65
|
+
transform: rotate(0deg);
|
66
|
+
}
|
67
|
+
|
68
|
+
100% {
|
69
|
+
-webkit-transform: rotate(360deg);
|
70
|
+
-ms-transform: rotate(360deg);
|
71
|
+
transform: rotate(360deg);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
</style>
|
75
|
+
<script type="module" src="./start.js"></script>
|
76
|
+
</body>
|
77
|
+
</html>
|
package/index.js
CHANGED
@@ -9,12 +9,14 @@ export {
|
|
9
9
|
createModalAction,
|
10
10
|
createLinkAction,
|
11
11
|
createGoToViewpointAction,
|
12
|
+
createZoomToFeatureAction,
|
12
13
|
} from './src/actions/actionHelper.js';
|
13
14
|
export {
|
14
15
|
createStateRefAction,
|
16
|
+
StateActionState,
|
15
17
|
} from './src/actions/stateRefAction.js';
|
16
18
|
|
17
|
-
export { default as
|
19
|
+
export { default as VcsNavbar } from './src/application/VcsNavbar.vue';
|
18
20
|
export {
|
19
21
|
default as VcsApp,
|
20
22
|
setupMapNavbar,
|
@@ -68,11 +70,13 @@ export { default as ContextMenuInteraction } from './src/manager/contextMenu/con
|
|
68
70
|
|
69
71
|
export { applyKeyMapping, applyValueMapping, default as AbstractFeatureInfoView } from './src/featureInfo/abstractFeatureInfoView.js';
|
70
72
|
export { extractNestedKey, default as BalloonFeatureInfoView } from './src/featureInfo/balloonFeatureInfoView.js';
|
73
|
+
export { default as AddressBalloonFeatureInfoView } from './src/featureInfo/addressBalloonFeatureInfoView.js';
|
71
74
|
export { getBalloonPosition, setBalloonPosition, setupBalloonPositionListener } from './src/featureInfo/balloonHelper.js';
|
72
75
|
export { default as BalloonComponent } from './src/featureInfo/BalloonComponent.vue';
|
73
76
|
export { default as AddressBalloonComponent } from './src/featureInfo/AddressBalloonComponent.vue';
|
74
77
|
export { default as IframeFeatureInfoView } from './src/featureInfo/iframeFeatureInfoView.js';
|
75
78
|
export { default as TableFeatureInfoView } from './src/featureInfo/tableFeatureInfoView.js';
|
79
|
+
export { getHighlightStyle, featureInfoViewSymbol } from './src/featureInfo/featureInfo.js';
|
76
80
|
|
77
81
|
export { default as MapNavCompass } from './src/navigation/mapNavCompass.vue';
|
78
82
|
export { default as MapNavigation } from './src/navigation/mapNavigation.vue';
|
@@ -99,6 +103,7 @@ export {
|
|
99
103
|
} from './src/pluginHelper.js';
|
100
104
|
export { getStateFromURL, createEmptyState, setStateToUrl } from './src/state.js';
|
101
105
|
export { default as VcsUiApp } from './src/vcsUiApp.js';
|
106
|
+
export { default as Notifier, NotificationType } from './src/notifier/notifier.js';
|
102
107
|
export { default as Icons } from './src/icons/+all.js';
|
103
108
|
|
104
109
|
export { default as VcsButton } from './src/components/buttons/VcsButton.vue';
|
@@ -120,11 +125,13 @@ export { default as VcsFormSection } from './src/components/form-inputs-controls
|
|
120
125
|
export { default as VcsSelect } from './src/components/form-inputs-controls/VcsSelect.vue';
|
121
126
|
export { default as VcsTextField } from './src/components/form-inputs-controls/VcsTextField.vue';
|
122
127
|
export { default as VcsTextArea } from './src/components/form-inputs-controls/VcsTextArea.vue';
|
128
|
+
export { default as VcsWizard } from './src/components/form-inputs-controls/VcsWizard.vue';
|
123
129
|
|
124
130
|
export { default as VcsFormattedNumber } from './src/components/form-output/VcsFormattedNumber.vue';
|
125
131
|
|
126
132
|
export { default as VcsActionList, validateAction, validateActions } from './src/components/lists/VcsActionList.vue';
|
127
133
|
// export { default as VcsEndlessList } from './src/components/lists/VcsEndlessList.vue';
|
134
|
+
export { default as VcsList } from './src/components/lists/VcsList.vue';
|
128
135
|
export { default as VcsTreeview } from './src/components/lists/VcsTreeview.vue';
|
129
136
|
export { default as VcsTreeviewLeaf } from './src/components/lists/VcsTreeviewLeaf.vue';
|
130
137
|
// export { default as VcsTreeviewSearchbar } from './src/components/lists/VcsTreeviewSearchbar.vue';
|
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.16",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -22,6 +22,7 @@
|
|
22
22
|
"files": [
|
23
23
|
"index.js",
|
24
24
|
"start.js",
|
25
|
+
"index.html",
|
25
26
|
"map.config.json",
|
26
27
|
"dist/",
|
27
28
|
"src/",
|
@@ -42,29 +43,29 @@
|
|
42
43
|
},
|
43
44
|
"peerDependencies": {
|
44
45
|
"@vcmap/cesium": "~1.97.1",
|
45
|
-
"@vcmap/core": "~5.0.0-rc.
|
46
|
+
"@vcmap/core": "~5.0.0-rc.24",
|
46
47
|
"ol": "~7.1.0",
|
47
48
|
"vue": "~2.7.3",
|
48
49
|
"vuetify": "~2.6.7"
|
49
50
|
},
|
50
51
|
"devDependencies": {
|
51
|
-
"@vcmap/rollup-plugin-vcs-ol": "^1.0.
|
52
|
+
"@vcmap/rollup-plugin-vcs-ol": "^1.0.2",
|
52
53
|
"@vcsuite/eslint-config": "^2.1.1",
|
53
|
-
"c8": "^
|
54
|
+
"@vitest/coverage-c8": "^0.24.3",
|
55
|
+
"@vue/test-utils": "^1.3.3",
|
54
56
|
"eslint": "^8.9.0",
|
55
57
|
"eslint-import-resolver-alias": "^1.1.2",
|
56
|
-
"jest-canvas-mock": "^2.
|
58
|
+
"jest-canvas-mock": "^2.4.0",
|
57
59
|
"jsdoc": "^3.6.7",
|
58
|
-
"jsdoc-plugin-typescript": "^2.0.6",
|
59
60
|
"jsdoc-plugin-intersection": "^1.0.4",
|
61
|
+
"jsdoc-plugin-typescript": "^2.0.6",
|
60
62
|
"jsdom": "^19.0.0",
|
61
63
|
"rollup-plugin-strip-pragma": "^1.0.0",
|
62
64
|
"sass": "1.32.13",
|
63
65
|
"typescript": "^4.2.4",
|
64
|
-
"
|
65
|
-
"vite": "^2.
|
66
|
-
"
|
67
|
-
"vitest": "^0.14.2"
|
66
|
+
"vite": "^3.2.0",
|
67
|
+
"vite-plugin-vue2": "^2.0.2",
|
68
|
+
"vitest": "^0.24.3"
|
68
69
|
},
|
69
70
|
"stylelint": {
|
70
71
|
"extends": "stylelint-config-standard",
|
@@ -128,6 +129,7 @@
|
|
128
129
|
"./config/*.json": "./config/*.json",
|
129
130
|
"./src/assets/logo.svg": "./src/assets/logo.svg",
|
130
131
|
"./src/assets/logo-mobile.svg": "./src/assets/logo-mobile.svg",
|
132
|
+
"./build/commonViteConfig.js": "./build/commonViteConfig.js",
|
131
133
|
"./build/buildHelpers.js": "./build/buildHelpers.js",
|
132
134
|
"./build/getPluginProxies.js": "./build/getPluginProxies.js",
|
133
135
|
"./build/determineHost.js": "./build/determineHost.js",
|
@@ -24,7 +24,8 @@
|
|
24
24
|
</template>
|
25
25
|
|
26
26
|
<script>
|
27
|
-
import {
|
27
|
+
import { VSheet } from 'vuetify/lib';
|
28
|
+
import { VcsTextField, VcsButton, setStateToUrl, NotificationType } from '@vcmap/ui';
|
28
29
|
import { getCurrentInstance, inject, ref } from 'vue';
|
29
30
|
|
30
31
|
export default {
|
@@ -38,6 +39,7 @@
|
|
38
39
|
components: {
|
39
40
|
VcsTextField,
|
40
41
|
VcsButton,
|
42
|
+
VSheet,
|
41
43
|
},
|
42
44
|
setup(props) {
|
43
45
|
const localLink = ref(props.link);
|
@@ -48,6 +50,7 @@
|
|
48
50
|
const element = proxy.$el.querySelector('input');
|
49
51
|
element.select();
|
50
52
|
document.execCommand('copy');
|
53
|
+
app.notifier.add({ title: 'createLink.title', message: 'createLink.copied', type: NotificationType.SUCCESS });
|
51
54
|
};
|
52
55
|
|
53
56
|
const refresh = async () => {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonLocation, setStateToUrl, WindowSlot } from '@vcmap/ui';
|
1
|
+
import { ButtonLocation, NotificationType, setStateToUrl, WindowSlot } from '@vcmap/ui';
|
2
2
|
import FallbackCreateLink from './fallbackCreateLink.vue';
|
3
3
|
|
4
4
|
const name = '@vcmap/create-link';
|
@@ -34,6 +34,7 @@ export default function createLink() {
|
|
34
34
|
tooltip: 'Dialog zum kopieren des Applikationslinks anzeigen.',
|
35
35
|
copyToClipboard: 'Applikationslink in Zwischenablage kopieren',
|
36
36
|
refreshTooltip: 'Applikationslink aktualisieren',
|
37
|
+
copied: 'Applikationslink in Zwischenablage kopiert.'
|
37
38
|
},
|
38
39
|
},
|
39
40
|
en: {
|
@@ -43,6 +44,7 @@ export default function createLink() {
|
|
43
44
|
tooltip: 'Open dialog to copy application link to clipboard',
|
44
45
|
copyToClipboard: 'Copy application link to clipboard',
|
45
46
|
refreshTooltip: 'Refresh application link',
|
47
|
+
copied: 'Application link copied to clipboard.',
|
46
48
|
},
|
47
49
|
},
|
48
50
|
},
|
@@ -69,6 +71,7 @@ export default function createLink() {
|
|
69
71
|
setStateToUrl(state, url);
|
70
72
|
if (navigator.clipboard) {
|
71
73
|
await navigator.clipboard.writeText(url.toString());
|
74
|
+
app.notifier.add({ title: 'createLink.title', message: 'createLink.copied', type: NotificationType.SUCCESS });
|
72
75
|
} else {
|
73
76
|
createFallbackWindow(app, url.toString());
|
74
77
|
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { reactive, ref } from 'vue';
|
2
|
+
|
3
|
+
export default function createExampleActions() {
|
4
|
+
const dense = ref(false);
|
5
|
+
const showSection = ref(true);
|
6
|
+
|
7
|
+
const actions = [
|
8
|
+
reactive({
|
9
|
+
name: 'denseSelection',
|
10
|
+
title: 'change row height',
|
11
|
+
icon: dense.value ? 'mdi-arrow-split-horizontal' : 'mdi-arrow-collapse-vertical',
|
12
|
+
callback() {
|
13
|
+
dense.value = !dense.value;
|
14
|
+
this.icon = dense.value ? 'mdi-arrow-split-horizontal' : 'mdi-arrow-collapse-vertical';
|
15
|
+
},
|
16
|
+
}),
|
17
|
+
{ name: 'noIcon', title: 'another action without icon', callback: () => {} },
|
18
|
+
reactive({
|
19
|
+
name: 'toggleSection',
|
20
|
+
title: 'toggle section',
|
21
|
+
icon: showSection.value ? '$vcsMinus' : '$vcsPlus',
|
22
|
+
callback() {
|
23
|
+
showSection.value = !showSection.value;
|
24
|
+
this.icon = showSection.value ? '$vcsMinus' : '$vcsPlus';
|
25
|
+
},
|
26
|
+
}),
|
27
|
+
reactive({
|
28
|
+
name: 'toggleIcon',
|
29
|
+
title: 'toggle switch example',
|
30
|
+
icon: showSection.value ? 'mdi-toggle-switch' : 'mdi-toggle-switch-off',
|
31
|
+
active: showSection.value,
|
32
|
+
callback() {
|
33
|
+
showSection.value = !showSection.value;
|
34
|
+
this.active = showSection.value;
|
35
|
+
},
|
36
|
+
}),
|
37
|
+
{
|
38
|
+
name: 'alert',
|
39
|
+
icon: 'mdi-message-text',
|
40
|
+
callback() { alert('alert'); },
|
41
|
+
},
|
42
|
+
];
|
43
|
+
|
44
|
+
return { actions, dense, showSection };
|
45
|
+
}
|
@@ -7,6 +7,7 @@ import packageJSON from './package.json';
|
|
7
7
|
import defaultConfig from './config.json';
|
8
8
|
import { conditionalTest, isValidEmail, isValidText } from './validation.js';
|
9
9
|
import pluginExampleComponent from './pluginExampleComponent.vue';
|
10
|
+
import createExampleActions from './exampleActions.js';
|
10
11
|
|
11
12
|
/**
|
12
13
|
* @returns {Logger}
|
@@ -25,6 +26,7 @@ function getLogger() {
|
|
25
26
|
/**
|
26
27
|
* @typedef PluginExampleState
|
27
28
|
* @property {string} selected
|
29
|
+
* @property {Array<string>} selectedMultiple
|
28
30
|
* @property {string} conditionalInput
|
29
31
|
* @property {string} initialTextInput
|
30
32
|
* @property {number} numberInput
|
@@ -74,11 +76,14 @@ export default function (config) {
|
|
74
76
|
*/
|
75
77
|
const pluginState = reactive({
|
76
78
|
selected: pluginConfig.selectOptions.value[0],
|
79
|
+
selectedMultiple: [],
|
77
80
|
conditionalInput: '',
|
78
81
|
initialTextInput: pluginConfig.initialTextInput.value,
|
79
82
|
numberInput: 100.156,
|
80
83
|
checkboxInput: false,
|
81
84
|
email: '',
|
85
|
+
prependedInput: '',
|
86
|
+
files: [],
|
82
87
|
});
|
83
88
|
|
84
89
|
|
@@ -148,6 +153,8 @@ export default function (config) {
|
|
148
153
|
getSerializedState,
|
149
154
|
setSerializedState,
|
150
155
|
onVcsAppMounted(app) {
|
156
|
+
const { actions, showSection, dense } = createExampleActions();
|
157
|
+
|
151
158
|
const { action, destroy } = createToggleAction(
|
152
159
|
{
|
153
160
|
name: 'Plugin Example',
|
@@ -159,8 +166,14 @@ export default function (config) {
|
|
159
166
|
component: pluginExampleComponent,
|
160
167
|
slot: WindowSlot.DYNAMIC_LEFT,
|
161
168
|
state: {
|
162
|
-
headerTitle: 'pluginExample.
|
169
|
+
headerTitle: 'pluginExample.title',
|
163
170
|
headerIcon: '$vcsCircle',
|
171
|
+
headerActions: actions,
|
172
|
+
},
|
173
|
+
props: {
|
174
|
+
actions,
|
175
|
+
showSection,
|
176
|
+
dense,
|
164
177
|
},
|
165
178
|
},
|
166
179
|
app.windowManager,
|
@@ -187,6 +200,18 @@ export default function (config) {
|
|
187
200
|
title: 'Plugin Beispiel',
|
188
201
|
select: 'Select Feld',
|
189
202
|
tooltip: 'Beispiel Plugin Map Button Tooltip',
|
203
|
+
help: 'Geben Sie eine Zahl in das Feld NumberInput ein. VcsFormattedNumber rundet auf eine Dezimalstelle.',
|
204
|
+
help1: 'Wählen Sie eine Option',
|
205
|
+
help1desc: 'Wenn \'Option A\' gewählt ist, muss der bedingte Input \'test\' sein.',
|
206
|
+
help2: 'Ändern Sie den Wert von \'myInitialText\'',
|
207
|
+
help2desc: 'InitialTextInput bleibt solange im Lade-Status, bis sich der Wert \'myInitialText\' ändert.',
|
208
|
+
help3: 'Geben Sie eine Email Adresse ein',
|
209
|
+
help3desc: 'Email Adressen werden validiert.',
|
210
|
+
numbers: {
|
211
|
+
one: 'eins',
|
212
|
+
two: 'zwei',
|
213
|
+
three: 'drei',
|
214
|
+
},
|
190
215
|
},
|
191
216
|
},
|
192
217
|
en: {
|
@@ -194,6 +219,18 @@ export default function (config) {
|
|
194
219
|
title: 'Plugin Example',
|
195
220
|
select: 'Select field',
|
196
221
|
tooltip: 'Example Plugin Map Button Tooltip',
|
222
|
+
help: 'Enter a number to the NumberInput field. VcsFormattedNumber rounds to one decimal digit.',
|
223
|
+
help1: 'Select an option',
|
224
|
+
help1desc: 'If \'Option A\' is chosen, conditional input must be \'test\'.',
|
225
|
+
help2: 'Change \'myInitialText\' to some other value',
|
226
|
+
help2desc: 'InitialTextInput text field stays in loading state, as long as \'myInitialText\' is not changed.',
|
227
|
+
help3: 'Enter an email address.',
|
228
|
+
help3desc: 'Emails get validated.',
|
229
|
+
numbers: {
|
230
|
+
one: 'one',
|
231
|
+
two: 'two',
|
232
|
+
three: 'three',
|
233
|
+
},
|
197
234
|
},
|
198
235
|
},
|
199
236
|
},
|