@vcmap/ui 6.1.0-rc.6 → 6.1.0
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/config/base.config.json +7 -3
- package/config/cluster.config.json +5 -14
- package/config/dev.config.json +175 -56
- package/config/projects.config.json +2 -1
- package/config/splashscreen.config.json +6 -10
- package/config/vectorTile.config.json +42 -1
- package/dist/assets/{cesium-f5e8e354.js → cesium-664ad022.js} +53 -23
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-c134a524.js → core-841b71a4.js} +8458 -5828
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-2752311f.js → ol-2e095c08.js} +87 -37
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-2fd6f47d.css +1 -0
- package/dist/assets/{ui-83514586.js → ui-2fd6f47d.js} +21376 -20063
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-5dbe2644.css → vuetify-4bc77ff7.css} +2 -2
- package/dist/assets/{vuetify-5dbe2644.js → vuetify-4bc77ff7.js} +7520 -7373
- package/dist/assets/vuetify.js +1 -1
- package/dist/index.html +1 -1
- package/index.d.ts +15 -5
- package/index.html +1 -1
- package/index.js +14 -5
- package/package.json +12 -8
- package/plugins/@vcmap-show-case/theming-example/src/index.js +1 -0
- package/plugins/@vcmap-show-case/vector-properties-example/src/LayerSettings.vue +39 -0
- package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +3 -0
- package/plugins/@vcmap-show-case/vector-properties-example/src/lib.js +13 -0
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +9 -0
- package/plugins/package.json +7 -5
- package/src/actions/actionHelper.d.ts +6 -0
- package/src/actions/actionHelper.js +22 -0
- package/src/actions/deepPickingAction.d.ts +23 -0
- package/src/actions/deepPickingAction.js +399 -0
- package/src/application/MapsGroupMobileMenu.vue +105 -0
- package/src/application/MapsGroupMobileMenu.vue.d.ts +7 -0
- package/src/application/VcsApp.vue +51 -24
- package/src/application/VcsApp.vue.d.ts +9 -2
- package/src/application/VcsAttributionsFooter.vue +1 -0
- package/src/application/VcsContainer.vue +36 -13
- package/src/application/VcsContainer.vue.d.ts +7 -0
- package/src/application/VcsMobileMenuList.vue +111 -0
- package/src/application/VcsMobileMenuList.vue.d.ts +2 -0
- package/src/application/VcsNavbar.vue +15 -3
- package/src/application/VcsNavbarMobile.vue +206 -0
- package/src/application/VcsNavbarMobile.vue.d.ts +42 -0
- package/src/application/VcsPositionDisplay.vue +1 -0
- package/src/application/VcsSplashScreen.vue +39 -7
- package/src/application/VcsSplashScreen.vue.d.ts +6 -0
- package/src/application/uiConfigHelper.d.ts +12 -0
- package/src/application/uiConfigHelper.js +37 -0
- package/src/components/buttons/VcsActionButtonList.vue +1 -0
- package/src/components/buttons/VcsToolButton.vue +8 -1
- package/src/components/buttons/VcsToolButton.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +8 -6
- package/src/components/form-output/VcsTemplateMarkdown.vue +43 -0
- package/src/components/form-output/VcsTemplateMarkdown.vue.d.ts +9 -0
- package/src/components/icons/+all.d.ts +5 -0
- package/src/components/icons/+all.js +14 -0
- package/src/components/lists/VcsActionList.vue +1 -0
- package/src/components/lists/VcsGroupedList.vue +2 -1
- package/src/components/lists/VcsListItemComponent.vue +1 -0
- package/src/components/lists/VcsTreeNode.vue +11 -2
- package/src/components/lists/VcsTreeview.vue +40 -3
- package/src/components/lists/VcsTreeview.vue.d.ts +1 -0
- package/src/components/lists/VcsTreeviewTitle.vue +8 -1
- package/src/components/style/{MenuWrapper.vue → StyleMenuWrapper.vue} +2 -1
- package/src/components/style/VcsFillMenu.vue +4 -4
- package/src/components/style/VcsImageMenu.vue +4 -4
- package/src/components/style/VcsStrokeMenu.vue +4 -4
- package/src/components/style/VcsTextMenu.vue +4 -4
- package/src/contentTree/LayerTree.vue +8 -46
- package/src/contentTree/LayerTree.vue.d.ts +1 -3
- package/src/contentTree/contentTreeCollection.d.ts +7 -0
- package/src/contentTree/contentTreeCollection.js +31 -10
- package/src/contentTree/contentTreeItem.d.ts +4 -4
- package/src/contentTree/contentTreeItem.js +2 -2
- package/src/contentTree/flightContentTreeItem.d.ts +8 -1
- package/src/contentTree/flightContentTreeItem.js +26 -3
- package/src/contentTree/groupContentTreeItem.d.ts +21 -0
- package/src/contentTree/groupContentTreeItem.js +32 -2
- package/src/contentTree/layerContentTreeItem.d.ts +8 -1
- package/src/contentTree/layerContentTreeItem.js +26 -4
- package/src/contentTree/layerGroupContentTreeItem.d.ts +6 -0
- package/src/contentTree/layerGroupContentTreeItem.js +27 -3
- package/src/contentTree/nodeContentTreeItem.d.ts +21 -0
- package/src/contentTree/nodeContentTreeItem.js +31 -2
- package/src/contentTree/obliqueCollectionContentTreeItem.d.ts +6 -0
- package/src/contentTree/obliqueCollectionContentTreeItem.js +22 -2
- package/src/contentTree/wmsChildContentTreeItem.d.ts +56 -0
- package/src/contentTree/wmsChildContentTreeItem.js +159 -0
- package/src/contentTree/wmsGroupContentTreeItem.d.ts +171 -0
- package/src/contentTree/wmsGroupContentTreeItem.js +619 -0
- package/src/featureInfo/BalloonComponent.vue +6 -6
- package/src/featureInfo/ClusterFeatureComponent.vue +47 -11
- package/src/featureInfo/ClusterFeatureComponent.vue.d.ts +1 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue +3 -9
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +1 -11
- package/src/featureInfo/balloonFeatureInfoView.d.ts +3 -0
- package/src/featureInfo/balloonFeatureInfoView.js +78 -11
- package/src/featureInfo/balloonHelper.js +9 -13
- package/src/featureInfo/featureInfo.d.ts +32 -7
- package/src/featureInfo/featureInfo.js +192 -93
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +0 -6
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -14
- package/src/featureInfo/markdownFeatureInfoView.d.ts +2 -8
- package/src/featureInfo/markdownFeatureInfoView.js +6 -15
- package/src/i18n/de.d.ts +64 -50
- package/src/i18n/de.js +9 -0
- package/src/i18n/en.d.ts +64 -50
- package/src/i18n/en.js +9 -0
- package/src/legend/VcsLegend.vue +21 -2
- package/src/legend/VcsLegend.vue.d.ts +1 -0
- package/src/legend/legendHelper.d.ts +0 -13
- package/src/legend/legendHelper.js +3 -27
- package/src/manager/navbarManager.d.ts +14 -1
- package/src/manager/navbarManager.js +22 -2
- package/src/manager/toolbox/GroupToolboxComponent.vue +17 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +17 -3
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/ToolboxManagerComponent.vue +45 -14
- package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +9 -0
- package/src/manager/toolbox/toolboxManager.d.ts +2 -1
- package/src/manager/toolbox/toolboxManager.js +13 -1
- package/src/manager/window/WindowComponent.vue +3 -2
- package/src/manager/window/WindowComponentHeader.vue +9 -1
- package/src/manager/window/WindowComponentHeader.vue.d.ts +1 -0
- package/src/manager/window/WindowManager.vue +175 -30
- package/src/manager/window/WindowManager.vue.d.ts +5 -0
- package/src/manager/window/windowManager.d.ts +2 -2
- package/src/manager/window/windowManager.js +12 -10
- package/src/navigation/MapNavigation.vue +29 -19
- package/src/navigation/MapNavigation.vue.d.ts +1 -0
- package/src/notifier/NotifierComponent.vue +1 -0
- package/src/search/ResultsComponent.vue +44 -17
- package/src/search/ResultsComponent.vue.d.ts +11 -1
- package/src/search/SearchComponent.vue +60 -9
- package/src/search/SearchComponent.vue.d.ts +2 -0
- package/src/search/search.js +3 -16
- package/src/state.d.ts +2 -1
- package/src/state.js +2 -1
- package/src/uiConfig.d.ts +9 -0
- package/src/uiConfig.js +1 -0
- package/src/vuePlugins/vuetify.d.ts +4 -0
- package/src/vuePlugins/vuetify.js +49 -3
- package/dist/assets/ui-83514586.css +0 -1
- /package/dist/assets/{vue-f8b1b5f8.js → vue-71fd14e8.js} +0 -0
- /package/src/components/style/{MenuWrapper.vue.d.ts → StyleMenuWrapper.vue.d.ts} +0 -0
@@ -5,7 +5,12 @@
|
|
5
5
|
:placeholder="searchbarPlaceholder"
|
6
6
|
v-model="localSearchValue"
|
7
7
|
/>
|
8
|
-
<div
|
8
|
+
<div
|
9
|
+
v-for="item in items"
|
10
|
+
:key="item.name"
|
11
|
+
class="vcs-treeitem"
|
12
|
+
:class="{ 'mobile-spacing': xs }"
|
13
|
+
>
|
9
14
|
<VcsTreeNode
|
10
15
|
class="root-node"
|
11
16
|
:item="item"
|
@@ -27,6 +32,7 @@
|
|
27
32
|
|
28
33
|
<script>
|
29
34
|
import { watch } from 'vue';
|
35
|
+
import { useDisplay } from 'vuetify';
|
30
36
|
import {
|
31
37
|
useProxiedAtomicModel,
|
32
38
|
useProxiedComplexModel,
|
@@ -108,7 +114,10 @@
|
|
108
114
|
[() => props.items, () => props.openAll],
|
109
115
|
() => {
|
110
116
|
if (props.openAll) {
|
111
|
-
|
117
|
+
const newItems = props.items
|
118
|
+
.map((item) => item.name)
|
119
|
+
.filter((name) => !localOpenedItems.value.includes(name));
|
120
|
+
localOpenedItems.value.push(...newItems);
|
112
121
|
}
|
113
122
|
},
|
114
123
|
{
|
@@ -125,6 +134,8 @@
|
|
125
134
|
}
|
126
135
|
}
|
127
136
|
|
137
|
+
const { xs } = useDisplay();
|
138
|
+
|
128
139
|
return {
|
129
140
|
localSearchValue,
|
130
141
|
localOpenedItems,
|
@@ -135,10 +146,14 @@
|
|
135
146
|
if (item?.clicked && !item?.disabled) {
|
136
147
|
item.clicked(event);
|
137
148
|
}
|
138
|
-
} else if (
|
149
|
+
} else if (
|
150
|
+
(props.openOnClick ?? false) !== false &&
|
151
|
+
!item?.disabled
|
152
|
+
) {
|
139
153
|
itemToggled(item.name);
|
140
154
|
}
|
141
155
|
},
|
156
|
+
xs,
|
142
157
|
};
|
143
158
|
},
|
144
159
|
};
|
@@ -152,6 +167,28 @@
|
|
152
167
|
.vcs-treeitem:not(:last-child) {
|
153
168
|
border-bottom: 1px solid rgb(var(--v-theme-base-lighten-2));
|
154
169
|
}
|
170
|
+
:deep(
|
171
|
+
.mobile-spacing
|
172
|
+
> .vcs-tree-node
|
173
|
+
> .children
|
174
|
+
> .vcs-tree-node
|
175
|
+
> .treenode
|
176
|
+
> .vcs-action-button-list
|
177
|
+
> button:not(:last-child)
|
178
|
+
) {
|
179
|
+
margin-left: 10px !important;
|
180
|
+
margin-right: 10px !important;
|
181
|
+
}
|
182
|
+
:deep(
|
183
|
+
.mobile-spacing
|
184
|
+
> .vcs-tree-node
|
185
|
+
> .treenode
|
186
|
+
> .vcs-action-button-list
|
187
|
+
> button:not(:last-child)
|
188
|
+
) {
|
189
|
+
margin-left: 10px !important;
|
190
|
+
margin-right: 10px !important;
|
191
|
+
}
|
155
192
|
.root-node {
|
156
193
|
:deep(.level-0) {
|
157
194
|
// Root Level Entries should be 40px high
|
@@ -45,6 +45,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
45
45
|
forwardSlots: string[];
|
46
46
|
itemToggled: (itemName: any) => void;
|
47
47
|
itemClicked(item: any, event: any): void;
|
48
|
+
xs: import("vue").Ref<boolean>;
|
48
49
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:opened" | "update:search")[], "update:opened" | "update:search", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
49
50
|
items: {
|
50
51
|
type: ArrayConstructor;
|
@@ -30,11 +30,18 @@
|
|
30
30
|
.cursor-pointer {
|
31
31
|
cursor: pointer;
|
32
32
|
}
|
33
|
+
.disabled {
|
34
|
+
cursor: default;
|
35
|
+
opacity: var(--v-disabled-opacity);
|
36
|
+
}
|
33
37
|
</style>
|
34
38
|
<template>
|
35
39
|
<div
|
36
40
|
class="title-parent pr-2 vcs-treeview-title w-100"
|
37
|
-
:class="{
|
41
|
+
:class="{
|
42
|
+
'cursor-pointer': cursorPointer && !item.disabled,
|
43
|
+
disabled: item.disabled,
|
44
|
+
}"
|
38
45
|
ref="titleParent"
|
39
46
|
>
|
40
47
|
<span class="w-100">
|
@@ -5,6 +5,7 @@
|
|
5
5
|
:model-value="!!modelValue"
|
6
6
|
@update:modelValue="handleCheckbox"
|
7
7
|
:disabled="disabled"
|
8
|
+
class="pr-1"
|
8
9
|
/>
|
9
10
|
<v-menu
|
10
11
|
:close-on-content-click="false"
|
@@ -73,7 +74,7 @@
|
|
73
74
|
* @vue-prop {boolean} [disabled=false] - Disable the input
|
74
75
|
*/
|
75
76
|
export default {
|
76
|
-
name: '
|
77
|
+
name: 'StyleMenuWrapper',
|
77
78
|
components: {
|
78
79
|
VSheet,
|
79
80
|
VMenu,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<StyleMenuWrapper
|
3
3
|
class="vcs-fill-menu"
|
4
4
|
:value-fallback="{ color: [255, 255, 255, 1] }"
|
5
5
|
name="components.style.fill"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<template #content>
|
12
12
|
<VcsFillSelector v-bind="{ ...$attrs, ...$props }" />
|
13
13
|
</template>
|
14
|
-
</
|
14
|
+
</StyleMenuWrapper>
|
15
15
|
</template>
|
16
16
|
|
17
17
|
<script>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
import { VSheet } from 'vuetify/components';
|
20
20
|
import { useProxiedAtomicModel } from '../modelHelper.js';
|
21
21
|
import VcsFillSelector from './VcsFillSelector.vue';
|
22
|
-
import
|
22
|
+
import StyleMenuWrapper from './StyleMenuWrapper.vue';
|
23
23
|
import { useColorObject, rgbaObjectToString } from './composables.js';
|
24
24
|
|
25
25
|
/**
|
@@ -33,7 +33,7 @@
|
|
33
33
|
components: {
|
34
34
|
VSheet,
|
35
35
|
VcsFillSelector,
|
36
|
-
|
36
|
+
StyleMenuWrapper,
|
37
37
|
},
|
38
38
|
props: {
|
39
39
|
modelValue: {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<StyleMenuWrapper
|
3
3
|
class="vcs-image-menu"
|
4
4
|
:value-fallback="{
|
5
5
|
radius: 10,
|
@@ -21,13 +21,13 @@
|
|
21
21
|
class="pb-2"
|
22
22
|
/>
|
23
23
|
</template>
|
24
|
-
</
|
24
|
+
</StyleMenuWrapper>
|
25
25
|
</template>
|
26
26
|
|
27
27
|
<script>
|
28
28
|
import { onMounted, ref, watch } from 'vue';
|
29
29
|
import { useProxiedAtomicModel } from '../modelHelper.js';
|
30
|
-
import
|
30
|
+
import StyleMenuWrapper from './StyleMenuWrapper.vue';
|
31
31
|
import VcsImageSelector, { drawImageStyle } from './VcsImageSelector.vue';
|
32
32
|
|
33
33
|
/**
|
@@ -37,7 +37,7 @@
|
|
37
37
|
export default {
|
38
38
|
name: 'VcsImageMenu',
|
39
39
|
components: {
|
40
|
-
|
40
|
+
StyleMenuWrapper,
|
41
41
|
VcsImageSelector,
|
42
42
|
},
|
43
43
|
props: {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<StyleMenuWrapper
|
3
3
|
class="vcs-stroke-menu"
|
4
4
|
:value-fallback="{ color: [0, 0, 0, 1], width: 1 }"
|
5
5
|
name="components.style.stroke"
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<template #content>
|
19
19
|
<VcsStrokeSelector v-bind="{ ...$attrs, ...$props }" />
|
20
20
|
</template>
|
21
|
-
</
|
21
|
+
</StyleMenuWrapper>
|
22
22
|
</template>
|
23
23
|
|
24
24
|
<script>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
import { VSheet } from 'vuetify/components';
|
27
27
|
import { useProxiedAtomicModel } from '../modelHelper.js';
|
28
28
|
import VcsStrokeSelector from './VcsStrokeSelector.vue';
|
29
|
-
import
|
29
|
+
import StyleMenuWrapper from './StyleMenuWrapper.vue';
|
30
30
|
import { useColorObject, rgbaObjectToString } from './composables.js';
|
31
31
|
|
32
32
|
/**
|
@@ -40,7 +40,7 @@
|
|
40
40
|
components: {
|
41
41
|
VSheet,
|
42
42
|
VcsStrokeSelector,
|
43
|
-
|
43
|
+
StyleMenuWrapper,
|
44
44
|
},
|
45
45
|
props: {
|
46
46
|
modelValue: {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<StyleMenuWrapper
|
3
3
|
class="vcs-text-menu"
|
4
4
|
:value-fallback="fallbackStyle"
|
5
5
|
name="components.style.text"
|
@@ -13,14 +13,14 @@
|
|
13
13
|
<template #content>
|
14
14
|
<VcsTextSelector v-bind="{ ...$attrs, ...$props }" />
|
15
15
|
</template>
|
16
|
-
</
|
16
|
+
</StyleMenuWrapper>
|
17
17
|
</template>
|
18
18
|
|
19
19
|
<script>
|
20
20
|
import { computed } from 'vue';
|
21
21
|
import { useProxiedAtomicModel } from '../modelHelper.js';
|
22
22
|
import VcsTextSelector from './VcsTextSelector.vue';
|
23
|
-
import
|
23
|
+
import StyleMenuWrapper from './StyleMenuWrapper.vue';
|
24
24
|
import { rgbaObjectToString, useColorObject } from './composables.js';
|
25
25
|
|
26
26
|
export const fallbackStyle = {
|
@@ -38,7 +38,7 @@
|
|
38
38
|
export default {
|
39
39
|
name: 'VcsTextMenu',
|
40
40
|
components: {
|
41
|
-
|
41
|
+
StyleMenuWrapper,
|
42
42
|
VcsTextSelector,
|
43
43
|
},
|
44
44
|
props: {
|
@@ -16,12 +16,10 @@
|
|
16
16
|
</template>
|
17
17
|
|
18
18
|
<script>
|
19
|
-
import { inject,
|
19
|
+
import { inject, computed } from 'vue';
|
20
20
|
import { VSheet } from 'vuetify/components';
|
21
21
|
import VcsTreeview from '../components/lists/VcsTreeview.vue';
|
22
22
|
|
23
|
-
/** The open state Symbol of the ContentTree */
|
24
|
-
export const openStateMapSymbol = Symbol('openStateMap');
|
25
23
|
/**
|
26
24
|
* @description
|
27
25
|
* Implements Treeview and shows content tree
|
@@ -37,52 +35,16 @@
|
|
37
35
|
},
|
38
36
|
setup(props) {
|
39
37
|
const app = inject('vcsApp');
|
40
|
-
const open = ref(app.contentTree.getTreeOpenState(props.windowState.id));
|
41
|
-
const tree = app.contentTree.getComputedVisibleTree(props.windowState.id);
|
42
|
-
|
43
|
-
function getWithVisibleChildren(item) {
|
44
|
-
return [
|
45
|
-
item.name,
|
46
|
-
...(item.visibleChildren
|
47
|
-
?.map((c) => getWithVisibleChildren(c))
|
48
|
-
?.flat() ?? []),
|
49
|
-
];
|
50
|
-
}
|
51
38
|
|
52
|
-
|
53
|
-
app.contentTree
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
const openStateMap = app.contentTree[openStateMapSymbol];
|
59
|
-
// watch for new visible children, which should start init open
|
60
|
-
watch(
|
61
|
-
tree,
|
62
|
-
(value, oldValue) => {
|
63
|
-
if (openStateMap.has(app.maps.activeMap?.name)) {
|
64
|
-
open.value = openStateMap.get(app.maps.activeMap?.name);
|
65
|
-
} else {
|
66
|
-
const items = [...app.contentTree]
|
67
|
-
.filter((i) => i.initOpen && i.getTreeViewItem().visible)
|
68
|
-
.map(({ name }) => name);
|
69
|
-
const oldValues = oldValue
|
70
|
-
? oldValue.map(getWithVisibleChildren).flat()
|
71
|
-
: [];
|
72
|
-
const changed = items.filter(
|
73
|
-
(name) => !oldValues.includes(name) && !open.value.includes(name),
|
74
|
-
);
|
75
|
-
open.value.push(...changed);
|
76
|
-
}
|
39
|
+
const open = computed({
|
40
|
+
get: () => app.contentTree.getTreeOpenState(props.windowState.id),
|
41
|
+
set: (value) => {
|
42
|
+
app.contentTree
|
43
|
+
.getTreeOpenState(props.windowState.id)
|
44
|
+
.splice(0, Infinity, ...value);
|
77
45
|
},
|
78
|
-
{ immediate: true },
|
79
|
-
);
|
80
|
-
|
81
|
-
watch(open, () => {
|
82
|
-
if (app.maps.activeMap) {
|
83
|
-
openStateMap.set(app.maps.activeMap.name, [...open.value]);
|
84
|
-
}
|
85
46
|
});
|
47
|
+
const tree = app.contentTree.getComputedVisibleTree(props.windowState.id);
|
86
48
|
|
87
49
|
return {
|
88
50
|
tree,
|
@@ -1,5 +1,3 @@
|
|
1
|
-
/** The open state Symbol of the ContentTree */
|
2
|
-
export const openStateMapSymbol: unique symbol;
|
3
1
|
declare const _default: import("vue").DefineComponent<{
|
4
2
|
windowState: {
|
5
3
|
type: ObjectConstructor;
|
@@ -7,7 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
7
5
|
};
|
8
6
|
}, {
|
9
7
|
tree: any;
|
10
|
-
open: import("vue").
|
8
|
+
open: import("vue").WritableComputedRef<any>;
|
11
9
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
12
10
|
windowState: {
|
13
11
|
type: ObjectConstructor;
|
@@ -78,6 +78,12 @@ declare class ContentTreeCollection extends IndexedCollection<ContentTreeItem> {
|
|
78
78
|
* @private
|
79
79
|
*/
|
80
80
|
private _setTreeView;
|
81
|
+
/**
|
82
|
+
* @param {ContentTreeItem} item
|
83
|
+
* @returns {string}
|
84
|
+
* @private
|
85
|
+
*/
|
86
|
+
private _getSubtreeIdForItem;
|
81
87
|
/**
|
82
88
|
* Returns all managed subtrees. Entries are not persisted and will change, if the trees get recalculated.
|
83
89
|
* @type {import("vue").Ref<Map<string, import("./contentTreeItem.js").TreeViewItem>>}
|
@@ -107,6 +113,7 @@ declare class ContentTreeCollection extends IndexedCollection<ContentTreeItem> {
|
|
107
113
|
*/
|
108
114
|
getChildrenForSubTree(id: string): Array<ContentTreeItem>;
|
109
115
|
/**
|
116
|
+
* This returns a proxy to the subtrees open state. You should mutate this array in place.
|
110
117
|
* @param {string} id
|
111
118
|
* @returns {Array<string>}
|
112
119
|
*/
|
@@ -99,6 +99,10 @@ class ContentTreeCollection extends IndexedCollection {
|
|
99
99
|
child.name,
|
100
100
|
child.weightChanged.addEventListener(recreateTree),
|
101
101
|
);
|
102
|
+
if (child.initOpen) {
|
103
|
+
const subTreeId = this._getSubtreeIdForItem(child);
|
104
|
+
this.getTreeOpenState(subTreeId).push(child.name);
|
105
|
+
}
|
102
106
|
}),
|
103
107
|
this.removed.addEventListener((child) => {
|
104
108
|
recreateTree();
|
@@ -212,6 +216,7 @@ class ContentTreeCollection extends IndexedCollection {
|
|
212
216
|
{ id, action, weight: subTreeViewItem[subTreeItemWeight] },
|
213
217
|
vcsAppSymbol,
|
214
218
|
ButtonLocation.CONTENT,
|
219
|
+
{ mobile: true, desktop: true, tablet: true },
|
215
220
|
);
|
216
221
|
return () => {
|
217
222
|
app.windowManager.remove(id);
|
@@ -286,25 +291,42 @@ class ContentTreeCollection extends IndexedCollection {
|
|
286
291
|
return tree.name;
|
287
292
|
}),
|
288
293
|
);
|
294
|
+
|
289
295
|
subTrees.forEach((subTree) => {
|
290
|
-
if (!this.
|
296
|
+
if (!this._subTreeViewItems.value.has(subTree.name)) {
|
291
297
|
this._subTreeViewItems.value.set(subTree.name, subTree);
|
292
|
-
|
298
|
+
}
|
299
|
+
|
300
|
+
if (!this._app.uiConfig.config.hideContentTree) {
|
301
|
+
if (!this._app.navbarManager.has(subTree.name) || resetSubtreeButtons) {
|
293
302
|
this._subTreeListeners.get(subTree.name)?.();
|
294
303
|
this._subTreeListeners.set(
|
295
304
|
subTree.name,
|
296
305
|
this._createSubtreeActionButton(subTree),
|
297
306
|
);
|
298
|
-
}
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
307
|
+
} else {
|
308
|
+
const buttonComponent = this._app.navbarManager.get(subTree.name);
|
309
|
+
if (buttonComponent.weight !== subTree[subTreeItemWeight]) {
|
310
|
+
buttonComponent.weight = subTree[subTreeItemWeight];
|
311
|
+
}
|
303
312
|
}
|
304
313
|
}
|
305
314
|
});
|
306
315
|
}
|
307
316
|
|
317
|
+
/**
|
318
|
+
* @param {ContentTreeItem} item
|
319
|
+
* @returns {string}
|
320
|
+
* @private
|
321
|
+
*/
|
322
|
+
_getSubtreeIdForItem(item) {
|
323
|
+
const [parent] = item.name.split('.');
|
324
|
+
if (this._subTreeViewItems.value.has(parent)) {
|
325
|
+
return parent;
|
326
|
+
}
|
327
|
+
return defaultContentTreeComponentId;
|
328
|
+
}
|
329
|
+
|
308
330
|
/**
|
309
331
|
* Returns all managed subtrees. Entries are not persisted and will change, if the trees get recalculated.
|
310
332
|
* @type {import("vue").Ref<Map<string, import("./contentTreeItem.js").TreeViewItem>>}
|
@@ -375,6 +397,7 @@ class ContentTreeCollection extends IndexedCollection {
|
|
375
397
|
}
|
376
398
|
|
377
399
|
/**
|
400
|
+
* This returns a proxy to the subtrees open state. You should mutate this array in place.
|
378
401
|
* @param {string} id
|
379
402
|
* @returns {Array<string>}
|
380
403
|
*/
|
@@ -382,9 +405,7 @@ class ContentTreeCollection extends IndexedCollection {
|
|
382
405
|
const subTree = this._getSubTree(id);
|
383
406
|
if (subTree) {
|
384
407
|
if (!subTree[subTreeOpenStateSymbol]) {
|
385
|
-
subTree[subTreeOpenStateSymbol] =
|
386
|
-
.filter((i) => i.initOpen)
|
387
|
-
.map((i) => i.name);
|
408
|
+
subTree[subTreeOpenStateSymbol] = [];
|
388
409
|
}
|
389
410
|
return subTree[subTreeOpenStateSymbol];
|
390
411
|
}
|
@@ -99,14 +99,14 @@ declare class ContentTreeItem {
|
|
99
99
|
static get className(): string;
|
100
100
|
/**
|
101
101
|
* @param {ContentTreeItemOptions} options
|
102
|
-
* @param {import("
|
102
|
+
* @param {import("../vcsUiApp.js").default} app
|
103
103
|
*/
|
104
|
-
constructor(options: ContentTreeItemOptions, app: import("
|
104
|
+
constructor(options: ContentTreeItemOptions, app: import("../vcsUiApp.js").default);
|
105
105
|
/**
|
106
106
|
* @protected
|
107
|
-
* @type {import("
|
107
|
+
* @type {import("../vcsUiApp.js").default}
|
108
108
|
*/
|
109
|
-
protected _app: import("
|
109
|
+
protected _app: import("../vcsUiApp.js").default;
|
110
110
|
/**
|
111
111
|
* @type {import("vue").ShallowRef<Array<import("../actions/actionHelper.js").VcsAction>>}
|
112
112
|
* @private
|
@@ -65,12 +65,12 @@ class ContentTreeItem {
|
|
65
65
|
|
66
66
|
/**
|
67
67
|
* @param {ContentTreeItemOptions} options
|
68
|
-
* @param {import("
|
68
|
+
* @param {import("../vcsUiApp.js").default} app
|
69
69
|
*/
|
70
70
|
constructor(options, app) {
|
71
71
|
/**
|
72
72
|
* @protected
|
73
|
-
* @type {import("
|
73
|
+
* @type {import("../vcsUiApp.js").default}
|
74
74
|
*/
|
75
75
|
this._app = app;
|
76
76
|
|
@@ -1,9 +1,11 @@
|
|
1
1
|
export default FlightContentTreeItem;
|
2
2
|
export type FlightContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
|
3
3
|
flightName: string;
|
4
|
+
showWhenNotSupported?: boolean;
|
4
5
|
};
|
5
6
|
/**
|
6
|
-
* @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string }} FlightContentTreeItemOptions
|
7
|
+
* @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string, showWhenNotSupported?: boolean }} FlightContentTreeItemOptions
|
8
|
+
* @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
|
7
9
|
*/
|
8
10
|
/**
|
9
11
|
* A flight item. Allows for playing a flight from the content tree.
|
@@ -23,6 +25,11 @@ declare class FlightContentTreeItem extends VcsObjectContentTreeItem<any> {
|
|
23
25
|
* @private
|
24
26
|
*/
|
25
27
|
private _flightName;
|
28
|
+
/**
|
29
|
+
* @type {boolean}
|
30
|
+
* @private
|
31
|
+
*/
|
32
|
+
private _showWhenNotSupported;
|
26
33
|
/**
|
27
34
|
* @type {Array<Function>}
|
28
35
|
* @private
|
@@ -1,11 +1,13 @@
|
|
1
1
|
import { CesiumMap } from '@vcmap/core';
|
2
|
+
import { parseBoolean } from '@vcsuite/parsers';
|
2
3
|
import { reactive } from 'vue';
|
3
4
|
import VcsObjectContentTreeItem from './vcsObjectContentTreeItem.js';
|
4
5
|
import { contentTreeClassRegistry } from './contentTreeItem.js';
|
5
6
|
import { executeCallbacks } from '../callback/vcsCallback.js';
|
6
7
|
|
7
8
|
/**
|
8
|
-
* @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string }} FlightContentTreeItemOptions
|
9
|
+
* @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string, showWhenNotSupported?: boolean }} FlightContentTreeItemOptions
|
10
|
+
* @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
|
9
11
|
*/
|
10
12
|
|
11
13
|
/**
|
@@ -36,6 +38,15 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
|
|
36
38
|
*/
|
37
39
|
this._flightName = options.flightName;
|
38
40
|
|
41
|
+
/**
|
42
|
+
* @type {boolean}
|
43
|
+
* @private
|
44
|
+
*/
|
45
|
+
this._showWhenNotSupported = parseBoolean(
|
46
|
+
options.showWhenNotSupported,
|
47
|
+
false,
|
48
|
+
);
|
49
|
+
|
39
50
|
/**
|
40
51
|
* @type {Array<Function>}
|
41
52
|
* @private
|
@@ -161,7 +172,12 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
|
|
161
172
|
this._app.flights.added.addEventListener(resetHandler),
|
162
173
|
);
|
163
174
|
} else {
|
164
|
-
|
175
|
+
let isCesium = this._app.maps.activeMap instanceof CesiumMap;
|
176
|
+
this.visible = isCesium || this._showWhenNotSupported;
|
177
|
+
|
178
|
+
if (this._showWhenNotSupported) {
|
179
|
+
this.disabled = !isCesium;
|
180
|
+
}
|
165
181
|
this._setupPlayer();
|
166
182
|
this.setPropertiesFromObject(this._flight);
|
167
183
|
|
@@ -174,7 +190,11 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
|
|
174
190
|
|
175
191
|
this._listeners.push(
|
176
192
|
this._app.maps.mapActivated.addEventListener(() => {
|
177
|
-
|
193
|
+
isCesium = this._app.maps.activeMap instanceof CesiumMap;
|
194
|
+
this.visible = isCesium || this._showWhenNotSupported;
|
195
|
+
if (this._showWhenNotSupported) {
|
196
|
+
this.disabled = !isCesium;
|
197
|
+
}
|
178
198
|
}),
|
179
199
|
);
|
180
200
|
}
|
@@ -186,6 +206,9 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
|
|
186
206
|
toJSON() {
|
187
207
|
const config = super.toJSON();
|
188
208
|
config.flightName = this._flightName;
|
209
|
+
if (this._showWhenNotSupported) {
|
210
|
+
config.showWhenNotSupported = this._showWhenNotSupported;
|
211
|
+
}
|
189
212
|
return config;
|
190
213
|
}
|
191
214
|
|
@@ -1,14 +1,35 @@
|
|
1
1
|
export default GroupContentTreeItem;
|
2
|
+
export type GroupContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
|
3
|
+
disableIfChildrenDisabled?: boolean;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { disableIfChildrenDisabled?: boolean }} GroupContentTreeItemOptions
|
7
|
+
* @property {boolean} [disableIfChildrenDisabled=false] - optional flag to disable the contentTreeItem if all children are disabled.
|
8
|
+
*/
|
2
9
|
/**
|
3
10
|
* A clickable group item. When clicked, every child with a state not NONE will also be clicked.
|
4
11
|
* @class
|
5
12
|
* @extends {ContentTreeItem}
|
6
13
|
*/
|
7
14
|
declare class GroupContentTreeItem extends ContentTreeItem {
|
15
|
+
/**
|
16
|
+
* @param {GroupContentTreeItemOptions} options
|
17
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
18
|
+
*/
|
19
|
+
constructor(options: GroupContentTreeItemOptions, app: import("@src/vcsUiApp.js").default);
|
20
|
+
/**
|
21
|
+
* @type {boolean}
|
22
|
+
* @private
|
23
|
+
*/
|
24
|
+
private _disableIfChildrenDisabled;
|
8
25
|
/**
|
9
26
|
* @type {function():void}
|
10
27
|
* @private
|
11
28
|
*/
|
12
29
|
private _childWatcher;
|
30
|
+
/**
|
31
|
+
* @returns {GroupContentTreeItemOptions}
|
32
|
+
*/
|
33
|
+
toJSON(): GroupContentTreeItemOptions;
|
13
34
|
}
|
14
35
|
import ContentTreeItem from './contentTreeItem.js';
|