@vcmap/ui 6.1.13 → 6.2.0-rc.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/build.js +2 -2
- package/build/buildHelpers.js +2 -3
- package/build/buildTypes.js +1 -1
- package/build/commonViteConfig.js +0 -1
- package/build/lintTypes.js +1 -1
- package/config/dev.config.json +4 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-171d1d84.js → core-de8e51b5.js} +2 -2
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-4f308e45.css +1 -0
- package/dist/assets/{ui-78b0084c.js → ui-4f308e45.js} +9084 -8706
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-d26d8a53.js → vuetify-99195777.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +4 -0
- package/index.js +5 -0
- package/package.json +4 -46
- package/plugins/@vcmap-show-case/category-tester/src/CategoriesExample.vue +2 -3
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +0 -1
- package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +3 -3
- package/plugins/@vcmap-show-case/hello-world/src/helloWorld.vue +6 -6
- package/plugins/@vcmap-show-case/hello-world/src/index.js +0 -6
- package/plugins/@vcmap-show-case/hello-world/tests/helloWorld.spec.js +1 -1
- package/plugins/@vcmap-show-case/panel-tester/src/IframePanelExample.vue +1 -1
- package/plugins/@vcmap-show-case/panel-tester/src/ImgPanelExample.vue +1 -1
- package/plugins/@vcmap-show-case/panel-tester/src/PanelExample.vue +1 -1
- package/plugins/@vcmap-show-case/panel-tester/src/TextPanelExample.vue +1 -1
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +1 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/TriStateExampleWindow.vue +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/EmptyComponent.vue +5 -5
- package/plugins/@vcmap-show-case/window-tester/src/MyCustomHeader.vue +1 -0
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExampleContent.vue +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +1 -1
- package/src/application/MapsGroupMobileMenu.vue +6 -5
- package/src/application/MapsGroupMobileMenu.vue.d.ts +3 -1
- package/src/application/VcsApp.vue +36 -46
- package/src/application/VcsApp.vue.d.ts +19 -45
- package/src/application/VcsAppWrapper.vue +4 -4
- package/src/application/VcsAttributions.vue +12 -12
- package/src/application/VcsAttributionsFooter.vue +27 -27
- package/src/application/VcsContainer.vue +50 -51
- package/src/application/VcsContainer.vue.d.ts +14 -2
- package/src/application/VcsMainMap.vue +2 -2
- package/src/application/VcsMap.vue +16 -16
- package/src/application/VcsNavbar.vue +17 -15
- package/src/application/VcsNavbarMobile.vue +15 -15
- package/src/application/VcsObliqueFooter.vue +10 -9
- package/src/application/VcsPositionDisplay.vue +8 -8
- package/src/application/VcsTextPage.vue +10 -10
- package/src/application/VcsTextPageFooter.vue +9 -9
- package/src/application/uiConfigHelper.d.ts +6 -0
- package/src/application/uiConfigHelper.js +19 -0
- package/src/callback/stopRotationCallback.js +0 -1
- package/src/callback/toggleToolbarButtonCallback.d.ts +48 -0
- package/src/callback/toggleToolbarButtonCallback.js +115 -0
- package/src/components/attrsHelpers.js +1 -1
- package/src/components/buttons/VcsActionButtonList.vue +5 -5
- package/src/components/buttons/VcsButton.vue +26 -26
- package/src/components/buttons/VcsFormButton.vue +31 -31
- package/src/components/buttons/VcsToolButton.vue +29 -29
- package/src/components/extent/VcsExtent.vue +1 -1
- package/src/components/extent/VcsExtentEditor.vue +1 -1
- package/src/components/flight/VcsFlightAnchorsComponent.vue +2 -2
- package/src/components/flight/VcsFlightAnchorsComponent.vue.d.ts +1 -4
- package/src/components/flight/VcsFlightEditor.vue +1 -0
- package/src/components/flight/VcsFlightEditor.vue.d.ts +4 -2
- package/src/components/flight/VcsFlightPlayer.vue +1 -1
- package/src/components/form-inputs-controls/VcsCheckbox.vue +23 -23
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +20 -20
- package/src/components/form-inputs-controls/VcsCoordinate.vue +3 -3
- package/src/components/form-inputs-controls/VcsDatePicker.vue +7 -7
- package/src/components/form-inputs-controls/VcsFileInput.vue +14 -14
- package/src/components/form-inputs-controls/VcsLabel.vue +26 -26
- package/src/components/form-inputs-controls/VcsRadio.vue +27 -27
- package/src/components/form-inputs-controls/VcsSelect.vue +78 -78
- package/src/components/form-inputs-controls/VcsSlider.vue +43 -43
- package/src/components/form-inputs-controls/VcsTextArea.vue +47 -47
- package/src/components/form-inputs-controls/VcsTextField.vue +4 -4
- package/src/components/form-inputs-controls/VcsWizard.vue +4 -4
- package/src/components/form-output/VcsFormattedNumber.vue +11 -11
- package/src/components/form-output/VcsMarkdown.vue +23 -22
- package/src/components/form-output/markdownHelper.js +1 -1
- package/src/components/import/VcsImportComponent.vue +1 -0
- package/src/components/import/VcsImportComponent.vue.d.ts +4 -2
- package/src/components/lists/VcsActionList.vue +14 -14
- package/src/components/lists/VcsList.vue +24 -20
- package/src/components/lists/VcsList.vue.d.ts +4 -6
- package/src/components/lists/VcsListItemComponent.vue +28 -8
- package/src/components/lists/VcsTreeNode.vue +138 -38
- package/src/components/lists/VcsTreeview.vue +65 -23
- package/src/components/lists/VcsTreeview.vue.d.ts +34 -9
- package/src/components/lists/VcsTreeviewSearchbar.vue +50 -50
- package/src/components/lists/VcsTreeviewTitle.vue +13 -13
- package/src/components/lists/dragHelper.d.ts +118 -0
- package/src/components/lists/dragHelper.js +325 -0
- package/src/components/lists/listHelper.d.ts +3 -2
- package/src/components/lists/listHelper.js +8 -1
- package/src/components/notification/VcsBadge.vue +12 -12
- package/src/components/notification/VcsHelp.vue +9 -9
- package/src/components/notification/VcsHelpTooltip.vue +1 -1
- package/src/components/style/StyleMenuWrapper.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +3 -2
- package/src/components/tables/VcsDataTable.vue.d.ts +4 -2
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +1 -1
- package/src/components/vector-properties/VcsFeatureTransforms.vue +1 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +1 -1
- package/src/components/viewpoint/VcsViewpointEditor.vue +1 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue.d.ts +4 -2
- package/src/contentTree/LayerSwap.vue +149 -0
- package/src/contentTree/LayerSwap.vue.d.ts +27 -0
- package/src/contentTree/LayerTree.vue +53 -3
- package/src/contentTree/LayerTree.vue.d.ts +3 -0
- package/src/contentTree/contentTreeCollection.js +0 -1
- package/src/i18n/de.d.ts +63 -55
- package/src/i18n/de.js +5 -0
- package/src/i18n/en.d.ts +63 -55
- package/src/i18n/en.js +5 -0
- package/src/init.js +1 -1
- package/src/manager/collectionManager/CollectionComponent.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentContent.vue +2 -2
- package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +1 -4
- package/src/manager/collectionManager/CollectionComponentList.vue +14 -13
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +3 -7
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +2 -2
- package/src/manager/collectionManager/CollectionManager.vue +2 -2
- package/src/manager/panel/PanelComponent.vue +40 -39
- package/src/manager/panel/PanelComponent.vue.d.ts +4 -2
- package/src/manager/panel/PanelManagerComponent.vue +13 -13
- package/src/manager/panel/PanelManagerComponent.vue.d.ts +4 -2
- package/src/manager/panel/panelHelper.js +19 -21
- package/src/manager/toolbox/GroupToolboxComponent.vue +9 -8
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +5 -2
- package/src/manager/toolbox/SelectToolboxComponent.vue +9 -8
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +5 -2
- package/src/manager/toolbox/ToolboxManagerComponent.vue +23 -23
- package/src/manager/window/WindowComponent.vue +12 -12
- package/src/manager/window/WindowComponent.vue.d.ts +7 -4
- package/src/manager/window/WindowComponentHeader.vue +24 -24
- package/src/manager/window/WindowComponentHeader.vue.d.ts +7 -4
- package/src/manager/window/WindowManager.vue +41 -41
- package/src/navigation/MapNavCompass.vue +4 -3
- package/src/navigation/MapNavCompass.vue.d.ts +4 -2
- package/src/navigation/ObliqueRotation.vue +1 -0
- package/src/navigation/ObliqueRotation.vue.d.ts +4 -2
- package/src/navigation/OrientationToolsButton.vue +1 -1
- package/src/navigation/TiltSlider.vue +35 -35
- package/src/navigation/VcsCompass.vue +18 -13
- package/src/navigation/VcsCompass.vue.d.ts +6 -2
- package/src/navigation/VcsZoomButton.vue +1 -0
- package/src/navigation/VcsZoomButton.vue.d.ts +5 -2
- package/src/navigation/locatorHelper.js +1 -1
- package/src/notifier/NotifierComponent.vue +1 -1
- package/src/pluginHelper.js +2 -1
- package/src/search/ResultItem.vue +1 -0
- package/src/search/SearchComponent.vue +35 -35
- package/src/search/markText.js +2 -2
- package/src/state.d.ts +12 -1
- package/src/state.js +59 -4
- package/src/uiConfig.d.ts +30 -3
- package/src/uiConfig.js +4 -1
- package/src/vcsUiApp.js +20 -0
- package/dist/assets/ui-78b0084c.css +0 -1
- /package/dist/assets/{cesium-76fff1d7.js → cesium-ac6c193a.js} +0 -0
- /package/dist/assets/{ol-76b9c9e3.js → ol-94c57f2e.js} +0 -0
- /package/dist/assets/{vue-859ae1f4.js → vue-62303c82.js} +0 -0
- /package/dist/assets/{vuetify-d26d8a53.css → vuetify-99195777.css} +0 -0
|
@@ -13,11 +13,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
required: false;
|
|
14
14
|
};
|
|
15
15
|
}, {
|
|
16
|
+
xs: import("vue").Ref<boolean>;
|
|
16
17
|
rotationValue: import("vue").Ref<number>;
|
|
17
18
|
compassRotation: import("vue").ComputedRef<number>;
|
|
18
19
|
height: import("vue").ComputedRef<number>;
|
|
19
20
|
width: import("vue").ComputedRef<number>;
|
|
20
|
-
|
|
21
|
+
alignNorth(): void;
|
|
22
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
23
|
viewMode: {
|
|
22
24
|
type: StringConstructor;
|
|
23
25
|
required: true;
|
|
@@ -31,7 +33,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
33
|
default: boolean;
|
|
32
34
|
required: false;
|
|
33
35
|
};
|
|
34
|
-
}
|
|
36
|
+
}>> & {
|
|
37
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
}, {
|
|
35
39
|
disabled: boolean;
|
|
36
40
|
modelValue: number;
|
|
37
41
|
}, {}>;
|
|
@@ -4,13 +4,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
type: BooleanConstructor;
|
|
5
5
|
default: boolean;
|
|
6
6
|
};
|
|
7
|
-
}, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
7
|
+
}, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("zoom-in" | "zoom-out")[], "zoom-in" | "zoom-out", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
8
|
disabled: {
|
|
9
9
|
required: false;
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
}>> & {
|
|
14
|
+
"onZoom-in"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
"onZoom-out"?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
}, {
|
|
14
17
|
disabled: boolean;
|
|
15
18
|
}, {}>;
|
|
16
19
|
export default _default;
|
|
@@ -165,7 +165,7 @@ const geolocationOptions = {
|
|
|
165
165
|
* @param {import("../vcsUiApp.js").default} app
|
|
166
166
|
* @returns {{ action: import("../actions/actionHelper.js").VcsAction, destroy: Function }}
|
|
167
167
|
*/
|
|
168
|
-
|
|
168
|
+
|
|
169
169
|
export function createLocatorAction(app) {
|
|
170
170
|
let primary = getColor(0.4, app);
|
|
171
171
|
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
* @description Renders notifications of different types
|
|
37
37
|
*/
|
|
38
38
|
export default {
|
|
39
|
+
name: 'NotifierComponent',
|
|
39
40
|
components: {
|
|
40
41
|
VSnackbar,
|
|
41
42
|
VcsButton,
|
|
42
43
|
VIcon,
|
|
43
44
|
},
|
|
44
|
-
name: 'NotifierComponent',
|
|
45
45
|
setup() {
|
|
46
46
|
const app = inject('vcsApp');
|
|
47
47
|
|
package/src/pluginHelper.js
CHANGED
|
@@ -73,7 +73,7 @@ export function getPluginAssetUrl(app, pluginName, asset) {
|
|
|
73
73
|
* @param {string} name
|
|
74
74
|
* @returns {boolean}
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
export function isValidPackageName(name) {
|
|
78
78
|
check(name, String);
|
|
79
79
|
|
|
@@ -133,6 +133,7 @@ export async function loadPlugin(name, config) {
|
|
|
133
133
|
let plugin;
|
|
134
134
|
if (window.VcsPluginLoaderFunction) {
|
|
135
135
|
// TODO PluginLoaderfunction needs to be documented.
|
|
136
|
+
// eslint-disable-next-line new-cap
|
|
136
137
|
plugin = await window.VcsPluginLoaderFunction(name, module);
|
|
137
138
|
} else {
|
|
138
139
|
plugin = await import(/* @vite-ignore */ module);
|
|
@@ -60,41 +60,6 @@
|
|
|
60
60
|
</v-sheet>
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
|
-
<style lang="scss" scoped>
|
|
64
|
-
:deep(.v-field .v-field__outline *) {
|
|
65
|
-
border-color: transparent !important;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.user-select-none {
|
|
69
|
-
user-select: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.suggestions {
|
|
73
|
-
font-style: italic;
|
|
74
|
-
}
|
|
75
|
-
.mobile-style .vcs-text-field.py-1 {
|
|
76
|
-
padding-bottom: 0 !important;
|
|
77
|
-
padding-right: 1px !important;
|
|
78
|
-
}
|
|
79
|
-
.button-container {
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: space-between;
|
|
83
|
-
gap: 8px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.fixed-button {
|
|
87
|
-
flex-shrink: 0;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.ellipsis-button {
|
|
91
|
-
flex-shrink: 1;
|
|
92
|
-
white-space: nowrap;
|
|
93
|
-
overflow: hidden;
|
|
94
|
-
text-overflow: ellipsis;
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
97
|
-
|
|
98
63
|
<script>
|
|
99
64
|
import { inject, onUnmounted, ref, computed } from 'vue';
|
|
100
65
|
import { getLogger } from '@vcsuite/logger';
|
|
@@ -246,3 +211,38 @@
|
|
|
246
211
|
},
|
|
247
212
|
};
|
|
248
213
|
</script>
|
|
214
|
+
|
|
215
|
+
<style lang="scss" scoped>
|
|
216
|
+
:deep(.v-field .v-field__outline *) {
|
|
217
|
+
border-color: transparent !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.user-select-none {
|
|
221
|
+
user-select: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.suggestions {
|
|
225
|
+
font-style: italic;
|
|
226
|
+
}
|
|
227
|
+
.mobile-style .vcs-text-field.py-1 {
|
|
228
|
+
padding-bottom: 0 !important;
|
|
229
|
+
padding-right: 1px !important;
|
|
230
|
+
}
|
|
231
|
+
.button-container {
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
justify-content: space-between;
|
|
235
|
+
gap: 8px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.fixed-button {
|
|
239
|
+
flex-shrink: 0;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ellipsis-button {
|
|
243
|
+
flex-shrink: 1;
|
|
244
|
+
white-space: nowrap;
|
|
245
|
+
overflow: hidden;
|
|
246
|
+
text-overflow: ellipsis;
|
|
247
|
+
}
|
|
248
|
+
</style>
|
package/src/search/markText.js
CHANGED
|
@@ -22,7 +22,7 @@ function isBlockWithinBlocks(blocks, candidate) {
|
|
|
22
22
|
*/
|
|
23
23
|
function addPartialBlocks(text, partial, blocks) {
|
|
24
24
|
let match;
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
while ((match = partial.exec(text))) {
|
|
27
27
|
const block = {
|
|
28
28
|
start: match.index,
|
|
@@ -39,7 +39,7 @@ function addPartialBlocks(text, partial, blocks) {
|
|
|
39
39
|
* @param {string} query
|
|
40
40
|
* @returns {string}
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
export function markText(text, query) {
|
|
44
44
|
let replacement = text;
|
|
45
45
|
if (query) {
|
package/src/state.d.ts
CHANGED
|
@@ -44,6 +44,15 @@ export type PluginState<T> = {
|
|
|
44
44
|
* an encoded object, which is the plugins state.
|
|
45
45
|
*/
|
|
46
46
|
export type UrlPluginState = [string, unknown];
|
|
47
|
+
export type ClippingPolygonState = {
|
|
48
|
+
name: string;
|
|
49
|
+
active: boolean;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The URL state of a ClippingPolygon is an array. The first entry is the ClippingPolygon name,
|
|
53
|
+
* the second its active state encoded in an integer (1 active, 0 inactive).
|
|
54
|
+
*/
|
|
55
|
+
export type UrlClippingPolygonState = [string, number];
|
|
47
56
|
/**
|
|
48
57
|
* The URL state of a viewpoint is an array, the first entry is the camera position (or 0)
|
|
49
58
|
* the second is the ground position (or 0), the third is the distance, the last three are
|
|
@@ -62,6 +71,7 @@ export type AppState = {
|
|
|
62
71
|
layers: Array<LayerState>;
|
|
63
72
|
plugins: Array<PluginState<unknown>>;
|
|
64
73
|
activeObliqueCollection?: string | undefined;
|
|
74
|
+
clippingPolygons: Array<ClippingPolygonState>;
|
|
65
75
|
};
|
|
66
76
|
export type CachedAppState = AppState;
|
|
67
77
|
/**
|
|
@@ -72,5 +82,6 @@ export type CachedAppState = AppState;
|
|
|
72
82
|
* the fourth is an array of layer states
|
|
73
83
|
* the fifth is an array of plugin states
|
|
74
84
|
* the sixth is the currently active oblique collection or 0 if not applicable
|
|
85
|
+
* the seventh is an array of ClippingPolygons states
|
|
75
86
|
*/
|
|
76
|
-
export type UrlAppState = [[0 | number[], 0 | number[], number, number, number, number, (number | undefined)?] | [import("ol/extent").Extent, number], string, Array<string>, Array<[string, number, string | 0]>, Array<[string, unknown]>, (string | 0)];
|
|
87
|
+
export type UrlAppState = [[0 | number[], 0 | number[], number, number, number, number, (number | undefined)?] | [import("ol/extent").Extent, number], string, Array<string>, Array<[string, number, string | 0]>, Array<[string, unknown]>, (string | 0), Array<[string, number]>];
|
package/src/state.js
CHANGED
|
@@ -36,6 +36,18 @@ import {
|
|
|
36
36
|
* @typedef {[string, unknown]} UrlPluginState
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* @typedef {Object} ClippingPolygonState
|
|
41
|
+
* @property {string} name
|
|
42
|
+
* @property {boolean} active
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The URL state of a ClippingPolygon is an array. The first entry is the ClippingPolygon name,
|
|
47
|
+
* the second its active state encoded in an integer (1 active, 0 inactive).
|
|
48
|
+
* @typedef {[string,number]} UrlClippingPolygonState
|
|
49
|
+
*/
|
|
50
|
+
|
|
39
51
|
/**
|
|
40
52
|
* The URL state of a viewpoint is an array, the first entry is the camera position (or 0)
|
|
41
53
|
* the second is the ground position (or 0), the third is the distance, the last three are
|
|
@@ -57,6 +69,7 @@ import {
|
|
|
57
69
|
* @property {Array<LayerState>} layers
|
|
58
70
|
* @property {Array<PluginState<unknown>>} plugins
|
|
59
71
|
* @property {string} [activeObliqueCollection]
|
|
72
|
+
* @property {Array<ClippingPolygonState>} clippingPolygons
|
|
60
73
|
*/
|
|
61
74
|
|
|
62
75
|
/**
|
|
@@ -72,7 +85,8 @@ import {
|
|
|
72
85
|
* the fourth is an array of layer states
|
|
73
86
|
* the fifth is an array of plugin states
|
|
74
87
|
* the sixth is the currently active oblique collection or 0 if not applicable
|
|
75
|
-
*
|
|
88
|
+
* the seventh is an array of ClippingPolygons states
|
|
89
|
+
* @typedef {[UrlViewpointState|UrlExtentState,string,Array<string>,Array<UrlLayerState>,Array<UrlPluginState>,(string|0), Array<UrlClippingPolygonState>]} UrlAppState
|
|
76
90
|
*/
|
|
77
91
|
|
|
78
92
|
/**
|
|
@@ -88,6 +102,7 @@ export function createEmptyState() {
|
|
|
88
102
|
moduleIds: [],
|
|
89
103
|
layers: [],
|
|
90
104
|
plugins: [],
|
|
105
|
+
clippingPolygons: [],
|
|
91
106
|
};
|
|
92
107
|
}
|
|
93
108
|
|
|
@@ -230,6 +245,22 @@ function writeUrlPluginState(state) {
|
|
|
230
245
|
return [state.name, state.state];
|
|
231
246
|
}
|
|
232
247
|
|
|
248
|
+
/**
|
|
249
|
+
* @param {UrlClippingPolygonState} state
|
|
250
|
+
* @returns {ClippingPolygonState}
|
|
251
|
+
*/
|
|
252
|
+
function parseUrlClippingPolygonState(state) {
|
|
253
|
+
return { name: state[0], active: !!state[1] };
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @param {ClippingPolygonState} state
|
|
258
|
+
* @returns {UrlClippingPolygonState}
|
|
259
|
+
*/
|
|
260
|
+
function writeUrlClippingPolygonState(state) {
|
|
261
|
+
return [state.name, state.active ? 1 : 0];
|
|
262
|
+
}
|
|
263
|
+
|
|
233
264
|
/**
|
|
234
265
|
* @param {UrlAppState} urlState
|
|
235
266
|
* @returns {AppState}
|
|
@@ -270,6 +301,15 @@ function parseUrlAppState(urlState) {
|
|
|
270
301
|
if (typeof urlState[5] === 'string') {
|
|
271
302
|
state.activeObliqueCollection = urlState[5];
|
|
272
303
|
}
|
|
304
|
+
if (Array.isArray(urlState[6])) {
|
|
305
|
+
urlState[6].forEach((urlClippingPolygonState) => {
|
|
306
|
+
if (Array.isArray(urlClippingPolygonState)) {
|
|
307
|
+
state.clippingPolygons.push(
|
|
308
|
+
parseUrlClippingPolygonState(urlClippingPolygonState),
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
273
313
|
return state;
|
|
274
314
|
}
|
|
275
315
|
|
|
@@ -282,7 +322,7 @@ function writeUrlAppState(state, maxLength) {
|
|
|
282
322
|
/**
|
|
283
323
|
* @type {UrlAppState}
|
|
284
324
|
*/
|
|
285
|
-
const urlState = new Array(
|
|
325
|
+
const urlState = new Array(7).fill(0);
|
|
286
326
|
if (state.activeViewpoint) {
|
|
287
327
|
urlState[0] = [
|
|
288
328
|
state.activeViewpoint.cameraPosition?.slice() ?? 0,
|
|
@@ -301,6 +341,7 @@ function writeUrlAppState(state, maxLength) {
|
|
|
301
341
|
urlState[2] = state.moduleIds.slice();
|
|
302
342
|
urlState[3] = [];
|
|
303
343
|
urlState[4] = [];
|
|
344
|
+
urlState[6] = [];
|
|
304
345
|
|
|
305
346
|
if (state.activeObliqueCollection) {
|
|
306
347
|
urlState[5] = state.activeObliqueCollection;
|
|
@@ -316,6 +357,18 @@ function writeUrlAppState(state, maxLength) {
|
|
|
316
357
|
}
|
|
317
358
|
});
|
|
318
359
|
|
|
360
|
+
state.clippingPolygons.forEach((clippingPolygonState) => {
|
|
361
|
+
const clippingPolygonUrlState =
|
|
362
|
+
writeUrlClippingPolygonState(clippingPolygonState);
|
|
363
|
+
if (
|
|
364
|
+
JSON.stringify(urlState).length +
|
|
365
|
+
JSON.stringify(clippingPolygonUrlState).length <
|
|
366
|
+
maxLength
|
|
367
|
+
) {
|
|
368
|
+
urlState[6].push(clippingPolygonUrlState);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
|
|
319
372
|
state.plugins.forEach((pluginState) => {
|
|
320
373
|
const urlPluginState = writeUrlPluginState(pluginState);
|
|
321
374
|
if (
|
|
@@ -328,10 +381,11 @@ function writeUrlAppState(state, maxLength) {
|
|
|
328
381
|
|
|
329
382
|
if (
|
|
330
383
|
urlState[3].length !== state.layers.length ||
|
|
331
|
-
urlState[4].length !== state.plugins.length
|
|
384
|
+
urlState[4].length !== state.plugins.length ||
|
|
385
|
+
urlState[6].length !== state.clippingPolygons.length
|
|
332
386
|
) {
|
|
333
387
|
getLogger('StateManagement').warning(
|
|
334
|
-
'State too large for URL: Not all layers and plugins are represented',
|
|
388
|
+
'State too large for URL: Not all layers, clipping polygons and plugins are represented',
|
|
335
389
|
);
|
|
336
390
|
}
|
|
337
391
|
|
|
@@ -368,6 +422,7 @@ export function setStateToUrl(state, url) {
|
|
|
368
422
|
activeObliqueCollection: optional(String),
|
|
369
423
|
layers: Array,
|
|
370
424
|
plugins: Array,
|
|
425
|
+
clippingPolygons: Array,
|
|
371
426
|
moduleIds: [String],
|
|
372
427
|
});
|
|
373
428
|
check(url, URL);
|
package/src/uiConfig.d.ts
CHANGED
|
@@ -47,10 +47,18 @@ export type UiConfigObject = {
|
|
|
47
47
|
* - the company logo to display. this will override any and all css overrides.
|
|
48
48
|
*/
|
|
49
49
|
logo?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* - the company logo to display in dark mode. this will override any and all css overrides. if not set, the `logo` will be used
|
|
52
|
+
*/
|
|
53
|
+
logoDark?: string | undefined;
|
|
50
54
|
/**
|
|
51
55
|
* - an alternative logo to display in mobile view
|
|
52
56
|
*/
|
|
53
57
|
mobileLogo?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* - an alternative logo to display in mobile view and dark mode. if not set, the `mobileLogo` will be used
|
|
60
|
+
*/
|
|
61
|
+
mobileLogoDark?: string | undefined;
|
|
54
62
|
/**
|
|
55
63
|
* - an optional title to display next to the company logo
|
|
56
64
|
*/
|
|
@@ -155,6 +163,10 @@ export type UiConfigObject = {
|
|
|
155
163
|
* - can be used to hide the contentTree
|
|
156
164
|
*/
|
|
157
165
|
hideContentTree?: boolean | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* - can be used to hide the rendering order action in the contentTree, which allows for temporary changes of rendering order
|
|
168
|
+
*/
|
|
169
|
+
hideContentTreeRenderingOrder?: boolean | undefined;
|
|
158
170
|
/**
|
|
159
171
|
* - can be used to hide the legend
|
|
160
172
|
*/
|
|
@@ -188,7 +200,7 @@ export type UiConfigObject = {
|
|
|
188
200
|
*/
|
|
189
201
|
openLegendOnAdd?: boolean | undefined;
|
|
190
202
|
/**
|
|
191
|
-
* - can be used to apply a scale factor
|
|
203
|
+
* - can be used to apply a scale factor to the overviewMap
|
|
192
204
|
*/
|
|
193
205
|
overviewMapScaleFactor?: number | undefined;
|
|
194
206
|
};
|
|
@@ -237,7 +249,9 @@ export type UiConfigObject = {
|
|
|
237
249
|
/**
|
|
238
250
|
* @typedef {Object} UiConfigObject
|
|
239
251
|
* @property {string} [logo] - the company logo to display. this will override any and all css overrides.
|
|
252
|
+
* @property {string} [logoDark] - the company logo to display in dark mode. this will override any and all css overrides. if not set, the `logo` will be used
|
|
240
253
|
* @property {string} [mobileLogo] - an alternative logo to display in mobile view
|
|
254
|
+
* @property {string} [mobileLogoDark] - an alternative logo to display in mobile view and dark mode. if not set, the `mobileLogo` will be used
|
|
241
255
|
* @property {string} [appTitle] - an optional title to display next to the company logo
|
|
242
256
|
* @property {string} [primaryColor] - an optional primary color to use in all themes, can be overwritten by `vuetifyTheme`
|
|
243
257
|
* @property {boolean} [startingFeatureInfo] - an optional flag whether to activate feature info on startup (default active)
|
|
@@ -264,6 +278,7 @@ export type UiConfigObject = {
|
|
|
264
278
|
* @property {boolean} [hideFooter] - can be used to hide the footer
|
|
265
279
|
* @property {boolean} [hideMyWorkspace] - can be used to hide the myWorkspace button
|
|
266
280
|
* @property {boolean} [hideContentTree] - can be used to hide the contentTree
|
|
281
|
+
* @property {boolean} [hideContentTreeRenderingOrder] - can be used to hide the rendering order action in the contentTree, which allows for temporary changes of rendering order
|
|
267
282
|
* @property {boolean} [hideLegend] - can be used to hide the legend
|
|
268
283
|
* @property {boolean} [hideSettings] - can be used to hide the settings Window
|
|
269
284
|
* @property {boolean} [hideObliqueFooter] - can be used to hide the oblique name in the footer
|
|
@@ -272,7 +287,7 @@ export type UiConfigObject = {
|
|
|
272
287
|
* @property {import("@vcmap/core").DisplayQualityOptions} [displayQuality] - the display quality settings
|
|
273
288
|
* @property {import("./vuetifyPlugins/vuetify.js").VcsThemes} [vuetifyTheme] - Vuetify Theming, also see vuetify configuraton https://vuetifyjs.com/en/features/theme/
|
|
274
289
|
* @property {boolean} [openLegendOnAdd] - open the legend window, if new layer has a config
|
|
275
|
-
* @property {number} [overviewMapScaleFactor] - can be used to apply a scale factor
|
|
290
|
+
* @property {number} [overviewMapScaleFactor] - can be used to apply a scale factor to the overviewMap
|
|
276
291
|
*/
|
|
277
292
|
/**
|
|
278
293
|
* @extends {Collection<UiConfigurationItem<unknown>>}
|
|
@@ -312,10 +327,18 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
|
|
|
312
327
|
* - the company logo to display. this will override any and all css overrides.
|
|
313
328
|
*/
|
|
314
329
|
readonly logo?: string | undefined;
|
|
330
|
+
/**
|
|
331
|
+
* - the company logo to display in dark mode. this will override any and all css overrides. if not set, the `logo` will be used
|
|
332
|
+
*/
|
|
333
|
+
readonly logoDark?: string | undefined;
|
|
315
334
|
/**
|
|
316
335
|
* - an alternative logo to display in mobile view
|
|
317
336
|
*/
|
|
318
337
|
readonly mobileLogo?: string | undefined;
|
|
338
|
+
/**
|
|
339
|
+
* - an alternative logo to display in mobile view and dark mode. if not set, the `mobileLogo` will be used
|
|
340
|
+
*/
|
|
341
|
+
readonly mobileLogoDark?: string | undefined;
|
|
319
342
|
/**
|
|
320
343
|
* - an optional title to display next to the company logo
|
|
321
344
|
*/
|
|
@@ -535,6 +558,10 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
|
|
|
535
558
|
* - can be used to hide the contentTree
|
|
536
559
|
*/
|
|
537
560
|
readonly hideContentTree?: boolean | undefined;
|
|
561
|
+
/**
|
|
562
|
+
* - can be used to hide the rendering order action in the contentTree, which allows for temporary changes of rendering order
|
|
563
|
+
*/
|
|
564
|
+
readonly hideContentTreeRenderingOrder?: boolean | undefined;
|
|
538
565
|
/**
|
|
539
566
|
* - can be used to hide the legend
|
|
540
567
|
*/
|
|
@@ -601,7 +628,7 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
|
|
|
601
628
|
*/
|
|
602
629
|
readonly openLegendOnAdd?: boolean | undefined;
|
|
603
630
|
/**
|
|
604
|
-
* - can be used to apply a scale factor
|
|
631
|
+
* - can be used to apply a scale factor to the overviewMap
|
|
605
632
|
*/
|
|
606
633
|
readonly overviewMapScaleFactor?: number | undefined;
|
|
607
634
|
};
|
package/src/uiConfig.js
CHANGED
|
@@ -50,7 +50,9 @@ import { reactive, readonly, ref } from 'vue';
|
|
|
50
50
|
/**
|
|
51
51
|
* @typedef {Object} UiConfigObject
|
|
52
52
|
* @property {string} [logo] - the company logo to display. this will override any and all css overrides.
|
|
53
|
+
* @property {string} [logoDark] - the company logo to display in dark mode. this will override any and all css overrides. if not set, the `logo` will be used
|
|
53
54
|
* @property {string} [mobileLogo] - an alternative logo to display in mobile view
|
|
55
|
+
* @property {string} [mobileLogoDark] - an alternative logo to display in mobile view and dark mode. if not set, the `mobileLogo` will be used
|
|
54
56
|
* @property {string} [appTitle] - an optional title to display next to the company logo
|
|
55
57
|
* @property {string} [primaryColor] - an optional primary color to use in all themes, can be overwritten by `vuetifyTheme`
|
|
56
58
|
* @property {boolean} [startingFeatureInfo] - an optional flag whether to activate feature info on startup (default active)
|
|
@@ -77,6 +79,7 @@ import { reactive, readonly, ref } from 'vue';
|
|
|
77
79
|
* @property {boolean} [hideFooter] - can be used to hide the footer
|
|
78
80
|
* @property {boolean} [hideMyWorkspace] - can be used to hide the myWorkspace button
|
|
79
81
|
* @property {boolean} [hideContentTree] - can be used to hide the contentTree
|
|
82
|
+
* @property {boolean} [hideContentTreeRenderingOrder] - can be used to hide the rendering order action in the contentTree, which allows for temporary changes of rendering order
|
|
80
83
|
* @property {boolean} [hideLegend] - can be used to hide the legend
|
|
81
84
|
* @property {boolean} [hideSettings] - can be used to hide the settings Window
|
|
82
85
|
* @property {boolean} [hideObliqueFooter] - can be used to hide the oblique name in the footer
|
|
@@ -85,7 +88,7 @@ import { reactive, readonly, ref } from 'vue';
|
|
|
85
88
|
* @property {import("@vcmap/core").DisplayQualityOptions} [displayQuality] - the display quality settings
|
|
86
89
|
* @property {import("./vuetifyPlugins/vuetify.js").VcsThemes} [vuetifyTheme] - Vuetify Theming, also see vuetify configuraton https://vuetifyjs.com/en/features/theme/
|
|
87
90
|
* @property {boolean} [openLegendOnAdd] - open the legend window, if new layer has a config
|
|
88
|
-
* @property {number} [overviewMapScaleFactor] - can be used to apply a scale factor
|
|
91
|
+
* @property {number} [overviewMapScaleFactor] - can be used to apply a scale factor to the overviewMap
|
|
89
92
|
*/
|
|
90
93
|
|
|
91
94
|
/**
|
package/src/vcsUiApp.js
CHANGED
|
@@ -595,6 +595,16 @@ class VcsUiApp extends VcsApp {
|
|
|
595
595
|
return layerState;
|
|
596
596
|
});
|
|
597
597
|
|
|
598
|
+
state.clippingPolygons = [...this.clippingPolygons]
|
|
599
|
+
.filter(
|
|
600
|
+
(p) =>
|
|
601
|
+
p[moduleIdSymbol] !== defaultDynamicModuleId &&
|
|
602
|
+
p[moduleIdSymbol] !== volatileModuleId &&
|
|
603
|
+
((p.active && !p.activeOnStartup) ||
|
|
604
|
+
(!p.active && p.activeOnStartup)),
|
|
605
|
+
)
|
|
606
|
+
.map((p) => ({ name: p.name, active: p.active }));
|
|
607
|
+
|
|
598
608
|
const plugins = await Promise.all(
|
|
599
609
|
[...this.plugins]
|
|
600
610
|
.filter(
|
|
@@ -703,6 +713,16 @@ class VcsUiApp extends VcsApp {
|
|
|
703
713
|
new Viewpoint(viewpointOptions),
|
|
704
714
|
);
|
|
705
715
|
}
|
|
716
|
+
this._cachedAppState.clippingPolygons.forEach((cpState) => {
|
|
717
|
+
const clippingPolygon = this.clippingPolygons.getByKey(cpState.name);
|
|
718
|
+
if (clippingPolygon) {
|
|
719
|
+
if (cpState.active) {
|
|
720
|
+
clippingPolygon.activate();
|
|
721
|
+
} else {
|
|
722
|
+
clippingPolygon.deactivate();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
});
|
|
706
726
|
this._cachedAppState.moduleIds.splice(
|
|
707
727
|
this._cachedAppState.moduleIds.indexOf(module._id),
|
|
708
728
|
1,
|