@vcmap/ui 6.0.0-rc.3 → 6.0.0-rc.6
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/buildHelpers.js +60 -11
- package/build/buildTypes.js +9 -5
- package/build/bundle.js +1 -1
- package/build/info/publish.js +25 -31
- package/build/lintTypes.js +5 -0
- package/config/base.config.json +2 -7
- package/config/dev.config.json +11 -1
- package/config/projects.config.json +2 -1
- package/config/theming.config.json +68 -0
- package/config/www.config.json +27 -23
- package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
- package/dist/assets/{cesium-cb4dbfba.js → cesium-ccb4cc30.js} +272 -385
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-72f21835.js → core-e06aa7a6.js} +2313 -2321
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-2d33bc8b.js → ol-e7981d5c.js} +233 -329
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5dda32d2.css +1 -0
- package/dist/assets/{ui-2ab43a16.js → ui-5dda32d2.js} +11344 -11078
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-87bc6efe.js +6083 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-760ced3b.css → vuetify-4c4e4217.css} +2 -2
- package/dist/assets/{vuetify-760ced3b.js → vuetify-4c4e4217.js} +8063 -8262
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +27 -17
- package/index.js +16 -8
- package/package.json +17 -17
- package/plugins/@vcmap-show-case/custom-icons-example/README.md +3 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/imageExample.png +0 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/svgExample.svg +1 -0
- package/plugins/@vcmap-show-case/custom-icons-example/package.json +5 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/CustomIconsExample.vue +90 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/index.js +45 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +2 -3
- package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
- package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
- package/plugins/@vcmap-show-case/theming-example/README.md +3 -0
- package/plugins/@vcmap-show-case/theming-example/package.json +5 -0
- package/plugins/@vcmap-show-case/theming-example/src/ThemingExample.vue +116 -0
- package/plugins/@vcmap-show-case/theming-example/src/index.js +53 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
- package/plugins/package.json +7 -23
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
- package/src/actions/StyleSelector.vue +1 -1
- package/src/actions/actionHelper.d.ts +4 -11
- package/src/actions/actionHelper.js +15 -7
- package/src/actions/listActions.d.ts +5 -5
- package/src/actions/listActions.js +2 -2
- package/src/application/VcsApp.vue +113 -50
- package/src/application/VcsApp.vue.d.ts +301 -4
- package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
- package/src/application/VcsContainer.vue +27 -10
- package/src/application/VcsContainer.vue.d.ts +241 -0
- package/src/application/VcsMainMap.vue +7 -7
- package/src/application/VcsMainMap.vue.d.ts +2 -2
- package/src/application/VcsNavbar.vue +14 -2
- package/src/application/VcsNavbar.vue.d.ts +1 -0
- package/src/application/VcsSplashScreen.vue +33 -26
- package/src/application/VcsTextPageFooter.vue +2 -1
- package/src/application/attributionsHelper.d.ts +20 -22
- package/src/application/attributionsHelper.js +4 -4
- package/src/callback/vcsCallback.d.ts +2 -2
- package/src/callback/vcsCallback.js +1 -1
- package/src/components/buttons/VcsActionButtonList.vue +61 -6
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
- package/src/components/buttons/VcsButton.vue +2 -4
- package/src/components/buttons/VcsButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsFormButton.vue +4 -4
- package/src/components/buttons/VcsToolButton.vue +4 -2
- package/src/components/buttons/VcsToolButton.vue.d.ts +2 -2
- package/src/components/composables.d.ts +5 -0
- package/src/components/composables.js +79 -9
- package/src/components/extent/VcsExtent.vue +10 -6
- package/src/components/extent/VcsExtent.vue.d.ts +1 -0
- package/src/components/flight/VcsFlightComponent.vue +13 -13
- package/src/components/flight/VcsFlightComponent.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +8 -3
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +13 -16
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -4
- package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +8 -6
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +2 -5
- package/src/components/form-inputs-controls/VcsSlider.vue +5 -6
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -5
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -1
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +11 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
- package/src/components/form-inputs-controls/VcsWizardStep.vue +6 -5
- package/src/components/form-inputs-controls/vcsTextField.scss +8 -5
- package/src/components/form-output/VcsFormattedNumber.vue +7 -5
- package/src/components/form-output/VcsMarkdown.vue +15 -12
- package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
- package/src/components/form-output/markdownHelper.d.ts +30 -0
- package/src/components/form-output/markdownHelper.js +398 -0
- package/src/components/import/VcsFileDrop.vue +8 -5
- package/src/components/import/VcsImportComponent.vue +8 -4
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
- package/src/components/lists/VcsActionList.vue +6 -6
- package/src/components/lists/VcsList.vue +22 -37
- package/src/components/lists/VcsList.vue.d.ts +14 -55
- package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +37 -11
- package/src/components/lists/VcsListItemComponent.vue.d.ts +79 -0
- package/src/components/lists/VcsTreeview.vue +95 -26
- package/src/components/lists/VcsTreeview.vue.d.ts +16 -3
- package/src/components/lists/VcsTreeviewSearchbar.vue +16 -5
- package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +3 -1
- package/src/components/lists/VcsTreeviewTitle.vue +36 -0
- package/src/components/modelHelper.d.ts +10 -8
- package/src/components/modelHelper.js +8 -6
- package/src/components/notification/VcsHelp.vue +6 -7
- package/src/components/notification/VcsHelp.vue.d.ts +0 -8
- package/src/components/plugins/AbstractConfigEditor.vue +1 -22
- package/src/components/plugins/AbstractConfigEditor.vue.d.ts +6 -29
- package/src/components/section/VcsExpansionPanel.vue +9 -3
- package/src/components/section/VcsExpansionPanel.vue.d.ts +2 -2
- package/src/components/section/VcsFormSection.vue +13 -7
- package/src/components/section/VcsFormSection.vue.d.ts +2 -3
- package/src/components/style/VcsImageSelector.vue +14 -6
- package/src/components/style/VcsImageSelector.vue.d.ts +1 -0
- package/src/components/style/VcsStrokeSelector.vue +5 -2
- package/src/components/style/VcsStrokeSelector.vue.d.ts +1 -0
- package/src/components/style/VcsTextMenu.vue +3 -3
- package/src/components/style/VcsVectorStyleComponent.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +42 -32
- package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
- package/src/components/tables/VcsTable.vue +45 -62
- package/src/components/tables/VcsTable.vue.d.ts +30 -17
- package/src/components/tables/VcsTableCell.vue +72 -0
- package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +42 -31
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +14 -11
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
- package/src/contentTree/LayerTree.vue +9 -27
- package/src/contentTree/LayerTree.vue.d.ts +1 -1
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +45 -11
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +1 -1
- package/src/featureInfo/BalloonComponent.vue +32 -25
- package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
- package/src/featureInfo/abstractFeatureInfoView.d.ts +10 -4
- package/src/featureInfo/abstractFeatureInfoView.js +19 -11
- package/src/featureInfo/featureInfo.d.ts +7 -7
- package/src/featureInfo/featureInfo.js +51 -31
- package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
- package/src/featureInfo/iframeFeatureInfoView.js +15 -5
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
- package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownFeatureInfoView.js +9 -11
- package/src/featureInfo/tableFeatureInfoView.js +13 -4
- package/src/i18n/i18nCollection.d.ts +9 -15
- package/src/i18n/i18nCollection.js +3 -3
- package/src/legend/VcsLegend.vue +6 -2
- package/src/legend/VcsLegend.vue.d.ts +1 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +2 -2
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
- package/src/manager/collectionManager/categoryManager.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +3 -3
- package/src/manager/collectionManager/collectionComponentClass.js +6 -6
- package/src/manager/collectionManager/collectionManager.d.ts +1 -1
- package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
- package/src/manager/panel/PanelComponent.vue +2 -9
- package/src/manager/panel/PanelManagerComponent.vue +7 -3
- package/src/manager/panel/panelHelper.js +3 -3
- package/src/manager/panel/panelManager.d.ts +9 -1
- package/src/manager/panel/panelManager.js +15 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +11 -5
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +11 -6
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +13 -7
- package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -0
- package/src/manager/window/WindowComponent.vue +12 -8
- package/src/manager/window/WindowComponentHeader.vue +33 -9
- package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -0
- package/src/manager/window/WindowManager.vue +2 -2
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +3 -3
- package/src/navigation/MapNavigation.vue +20 -0
- package/src/navigation/OrientationToolsButton.vue +2 -4
- package/src/navigation/TiltSlider.vue +3 -5
- package/src/navigation/locatorHelper.js +1 -1
- package/src/navigation/overviewMap.js +1 -1
- package/src/notifier/NotifierComponent.vue +18 -15
- package/src/search/ResultItem.vue +18 -6
- package/src/search/ResultsComponent.vue +31 -20
- package/src/search/ResultsComponent.vue.d.ts +2 -1
- package/src/search/SearchComponent.vue +11 -15
- package/src/search/SearchComponent.vue.d.ts +1 -0
- package/src/siteConfig.js +8 -8
- package/src/styles/_typography.scss +0 -2
- package/src/styles/main.scss +0 -4
- package/src/styles/vcsList.scss +1 -1
- package/src/uiConfig.d.ts +311 -7
- package/src/uiConfig.js +30 -17
- package/src/vcsUiApp.d.ts +48 -63
- package/src/vcsUiApp.js +44 -37
- package/src/vuePlugins/vuetify.d.ts +88 -62
- package/src/vuePlugins/vuetify.js +119 -20
- package/dist/assets/ui-2ab43a16.css +0 -1
- package/dist/assets/vue-03b265aa.js +0 -6096
- package/plugins/@vcmap-show-case/theme-changer/README.md +0 -23
- package/plugins/@vcmap-show-case/theme-changer/config.json +0 -69
- package/plugins/@vcmap-show-case/theme-changer/package.json +0 -11
- package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +0 -120
- package/plugins/@vcmap-show-case/theme-changer/src/index.js +0 -108
- package/src/application/markdownHelper.d.ts +0 -12
- package/src/application/markdownHelper.js +0 -70
- package/src/components/lists/VcsListItem.vue.d.ts +0 -27
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -83
- package/src/components/notification/VcsTooltip.vue +0 -156
- package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
- package/src/featureInfo/MarkdownComponent.vue +0 -16
- package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
- package/src/styles/_theming.scss +0 -73
- package/src/styles/settings.scss +0 -6
- package/src/styles/shades.scss +0 -4
- package/src/styles/variables.scss +0 -140
- package/src/styles/vcsFont.scss +0 -2
- package/src/styles/vcsGrid.scss +0 -3
- /package/src/components/lists/{VcsTreeviewLeaf.vue.d.ts → VcsTreeviewTitle.vue.d.ts} +0 -0
@@ -241,6 +241,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
241
241
|
storeyHeights: import("vue").ComputedRef<{}>;
|
242
242
|
modelScale: import("vue").ComputedRef<{}>;
|
243
243
|
dimensionsUpperCase: string[];
|
244
|
+
cid: string;
|
244
245
|
}, any, {}, {
|
245
246
|
computed: typeof import("@vue/reactivity").computed;
|
246
247
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -9,13 +9,13 @@
|
|
9
9
|
<v-container class="py-0 px-1">
|
10
10
|
<v-row no-gutters v-if="!hideName">
|
11
11
|
<v-col cols="6">
|
12
|
-
<VcsLabel html-for="name" dense required>
|
12
|
+
<VcsLabel :html-for="`${cid}-name`" dense required>
|
13
13
|
{{ $t('components.viewpoint.name') }}
|
14
14
|
</VcsLabel>
|
15
15
|
</v-col>
|
16
16
|
<v-col>
|
17
17
|
<VcsTextField
|
18
|
-
id="name"
|
18
|
+
:id="`${cid}-name`"
|
19
19
|
clearable
|
20
20
|
v-model="localValue.name"
|
21
21
|
:rules="nameRules"
|
@@ -24,13 +24,13 @@
|
|
24
24
|
</v-row>
|
25
25
|
<v-row no-gutters v-if="!hideTitle">
|
26
26
|
<v-col cols="6">
|
27
|
-
<VcsLabel html-for="title" dense>
|
27
|
+
<VcsLabel :html-for="`${cid}-title`" dense>
|
28
28
|
{{ $t('components.viewpoint.title') }}
|
29
29
|
</VcsLabel>
|
30
30
|
</v-col>
|
31
31
|
<v-col>
|
32
32
|
<VcsTextField
|
33
|
-
id="title"
|
33
|
+
:id="`${cid}-title`"
|
34
34
|
clearable
|
35
35
|
:placeholder="$t('components.viewpoint.titlePlaceholder')"
|
36
36
|
v-model="title"
|
@@ -40,7 +40,6 @@
|
|
40
40
|
<v-row no-gutters v-if="!hideAnimate">
|
41
41
|
<v-col cols="6">
|
42
42
|
<VcsCheckbox
|
43
|
-
id="animate"
|
44
43
|
label="components.viewpoint.animate"
|
45
44
|
v-model="localValue.animate"
|
46
45
|
/>
|
@@ -48,7 +47,6 @@
|
|
48
47
|
<v-col>
|
49
48
|
<VcsTextField
|
50
49
|
v-if="localValue.animate"
|
51
|
-
id="duration"
|
52
50
|
clearable
|
53
51
|
:hide-spin-buttons="true"
|
54
52
|
type="number"
|
@@ -102,12 +100,13 @@
|
|
102
100
|
<template v-if="!isCesiumMap">
|
103
101
|
<v-row no-gutters>
|
104
102
|
<v-col>
|
105
|
-
<VcsLabel html-for="distance" dense>
|
103
|
+
<VcsLabel :html-for="`${cid}-distance`" dense>
|
106
104
|
{{ $t('components.viewpoint.distance') }}
|
107
105
|
</VcsLabel>
|
108
106
|
</v-col>
|
109
107
|
<v-col>
|
110
108
|
<VcsTextField
|
109
|
+
:id="`${cid}-distance`"
|
111
110
|
:min="0"
|
112
111
|
:step="100"
|
113
112
|
prefix="d"
|
@@ -128,13 +127,13 @@
|
|
128
127
|
<div v-for="key in ['heading', 'pitch', 'roll']" :key="key">
|
129
128
|
<v-row no-gutters>
|
130
129
|
<v-col cols="9">
|
131
|
-
<VcsLabel :html-for="key" dense>
|
130
|
+
<VcsLabel :html-for="`${cid}-${key}`" dense>
|
132
131
|
{{ $st(`components.viewpoint.${key}`) }}
|
133
132
|
</VcsLabel>
|
134
133
|
</v-col>
|
135
134
|
<v-col cols="3">
|
136
135
|
<VcsTextField
|
137
|
-
:id="key"
|
136
|
+
:id="`${cid}-${key}`"
|
138
137
|
:hide-spin-buttons="true"
|
139
138
|
type="number"
|
140
139
|
unit="°"
|
@@ -154,9 +153,9 @@
|
|
154
153
|
height="32"
|
155
154
|
hide-details
|
156
155
|
:step="0.1"
|
157
|
-
v-model="localValue[key]"
|
158
|
-
v-bind="hprSliderOptions[key]"
|
159
156
|
:disabled="editAction.active"
|
157
|
+
v-bind="hprSliderOptions[key]"
|
158
|
+
v-model="localValue[key]"
|
160
159
|
@update:model-value="gotoViewpoint"
|
161
160
|
/>
|
162
161
|
</v-col>
|
@@ -188,6 +187,7 @@
|
|
188
187
|
import VcsCoordinate from '../form-inputs-controls/VcsCoordinate.vue';
|
189
188
|
import VcsSlider from '../form-inputs-controls/VcsSlider.vue';
|
190
189
|
import { useProxiedComplexModel } from '../modelHelper.js';
|
190
|
+
import { useComponentId } from '../composables.js';
|
191
191
|
|
192
192
|
/**
|
193
193
|
* Updates the localValue ref by keeping name and properties
|
@@ -489,6 +489,8 @@
|
|
489
489
|
}
|
490
490
|
}
|
491
491
|
|
492
|
+
const cid = useComponentId();
|
493
|
+
|
492
494
|
return {
|
493
495
|
isCesiumMap,
|
494
496
|
localValue,
|
@@ -500,6 +502,7 @@
|
|
500
502
|
hprSliderOptions,
|
501
503
|
isFiniteNumber,
|
502
504
|
isPositiveNumber,
|
505
|
+
cid,
|
503
506
|
};
|
504
507
|
},
|
505
508
|
};
|
@@ -79,6 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
};
|
80
80
|
isFiniteNumber: typeof isFiniteNumber;
|
81
81
|
isPositiveNumber: typeof isPositiveNumber;
|
82
|
+
cid: string;
|
82
83
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
83
84
|
modelValue: {
|
84
85
|
type: ObjectConstructor;
|
@@ -3,8 +3,9 @@
|
|
3
3
|
<VcsTreeview
|
4
4
|
v-if="tree && tree.length"
|
5
5
|
:items="tree"
|
6
|
-
v-model:opened="opened"
|
7
6
|
:show-searchbar="true"
|
7
|
+
v-model:opened="open"
|
8
|
+
open-on-click
|
8
9
|
:searchbar-placeholder="'content.search.placeholder'"
|
9
10
|
item-children="visibleChildren"
|
10
11
|
/>
|
@@ -15,7 +16,7 @@
|
|
15
16
|
</template>
|
16
17
|
|
17
18
|
<script>
|
18
|
-
import {
|
19
|
+
import { inject, ref, watch } from 'vue';
|
19
20
|
import { VSheet } from 'vuetify/components';
|
20
21
|
import VcsTreeview from '../components/lists/VcsTreeview.vue';
|
21
22
|
|
@@ -35,7 +36,7 @@
|
|
35
36
|
},
|
36
37
|
setup(props) {
|
37
38
|
const app = inject('vcsApp');
|
38
|
-
const open = app.contentTree.getTreeOpenState(props.windowState.id);
|
39
|
+
const open = ref(app.contentTree.getTreeOpenState(props.windowState.id));
|
39
40
|
const tree = app.contentTree.getComputedVisibleTree(props.windowState.id);
|
40
41
|
|
41
42
|
function getWithVisibleChildren(item) {
|
@@ -59,8 +60,7 @@
|
|
59
60
|
tree,
|
60
61
|
(value, oldValue) => {
|
61
62
|
if (openStateMap.has(app.maps.activeMap?.name)) {
|
62
|
-
open.
|
63
|
-
open.push(...openStateMap.get(app.maps.activeMap?.name));
|
63
|
+
open.value = openStateMap.get(app.maps.activeMap?.name);
|
64
64
|
} else {
|
65
65
|
const items = [...app.contentTree]
|
66
66
|
.filter((i) => i.initOpen && i.getTreeViewItem().visible)
|
@@ -69,9 +69,9 @@
|
|
69
69
|
? oldValue.map(getWithVisibleChildren).flat()
|
70
70
|
: [];
|
71
71
|
const changed = items.filter(
|
72
|
-
(name) => !oldValues.includes(name) && !open.includes(name),
|
72
|
+
(name) => !oldValues.includes(name) && !open.value.includes(name),
|
73
73
|
);
|
74
|
-
open.push(...changed);
|
74
|
+
open.value.push(...changed);
|
75
75
|
}
|
76
76
|
},
|
77
77
|
{ immediate: true },
|
@@ -79,31 +79,13 @@
|
|
79
79
|
|
80
80
|
watch(open, () => {
|
81
81
|
if (app.maps.activeMap) {
|
82
|
-
openStateMap.set(app.maps.activeMap.name, [...open]);
|
82
|
+
openStateMap.set(app.maps.activeMap.name, [...open.value]);
|
83
83
|
}
|
84
84
|
});
|
85
85
|
|
86
|
-
// the entire block, very ugly because of https://github.com/vuetifyjs/vuetify/issues/19414
|
87
|
-
const opened = reactive([]);
|
88
|
-
onMounted(() => {
|
89
|
-
opened.splice(0);
|
90
|
-
opened.push(...open);
|
91
|
-
|
92
|
-
watch(opened, () => {
|
93
|
-
open.splice(0);
|
94
|
-
open.push(...opened);
|
95
|
-
});
|
96
|
-
});
|
97
|
-
|
98
86
|
return {
|
99
87
|
tree,
|
100
|
-
|
101
|
-
get: () => opened,
|
102
|
-
set: (value) => {
|
103
|
-
opened.splice(0);
|
104
|
-
opened.push(...value);
|
105
|
-
},
|
106
|
-
}),
|
88
|
+
open,
|
107
89
|
};
|
108
90
|
},
|
109
91
|
};
|
@@ -5,7 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
};
|
6
6
|
}, {
|
7
7
|
tree: any;
|
8
|
-
|
8
|
+
open: import("vue").Ref<any>;
|
9
9
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
10
10
|
windowState: {
|
11
11
|
type: ObjectConstructor;
|
@@ -53,6 +53,24 @@ class ContentTreeCollection extends IndexedCollection {
|
|
53
53
|
*/
|
54
54
|
this._weightListeners = new Map();
|
55
55
|
|
56
|
+
const uiConfigChanged = () => {
|
57
|
+
this.subTreeViewItems.value.forEach((subTree) => {
|
58
|
+
if (
|
59
|
+
!this._app.uiConfig.config.hideContentTree &&
|
60
|
+
!this._subTreeListeners.has(subTree.name)
|
61
|
+
) {
|
62
|
+
this._subTreeListeners.get(subTree.name)?.();
|
63
|
+
this._subTreeListeners.set(
|
64
|
+
subTree.name,
|
65
|
+
this._createSubtreeActionButton(subTree),
|
66
|
+
);
|
67
|
+
} else if (this._app.uiConfig.config.hideContentTree) {
|
68
|
+
this._subTreeListeners.get(subTree.name)?.();
|
69
|
+
this._subTreeListeners.delete(subTree.name);
|
70
|
+
}
|
71
|
+
});
|
72
|
+
};
|
73
|
+
|
56
74
|
/**
|
57
75
|
* @type {Array<function():void>}
|
58
76
|
* @private
|
@@ -78,6 +96,8 @@ class ContentTreeCollection extends IndexedCollection {
|
|
78
96
|
}
|
79
97
|
}),
|
80
98
|
this.moved.addEventListener(() => recreateTree(true)),
|
99
|
+
app.uiConfig.added.addEventListener(uiConfigChanged),
|
100
|
+
app.uiConfig.removed.addEventListener(uiConfigChanged),
|
81
101
|
];
|
82
102
|
/**
|
83
103
|
* This is the default content tree.
|
@@ -113,11 +133,19 @@ class ContentTreeCollection extends IndexedCollection {
|
|
113
133
|
|
114
134
|
/**
|
115
135
|
* @private
|
136
|
+
* @param {Array<string>} exclude
|
116
137
|
*/
|
117
|
-
_clearSubTrees() {
|
118
|
-
this._subTreeViewItems.value.
|
119
|
-
|
120
|
-
|
138
|
+
_clearSubTrees(exclude = []) {
|
139
|
+
this._subTreeViewItems.value.forEach((tree, key) => {
|
140
|
+
if (!exclude.includes(key)) {
|
141
|
+
this._subTreeViewItems.value.delete(key);
|
142
|
+
}
|
143
|
+
});
|
144
|
+
this._subTreeListeners.forEach((cb, key) => {
|
145
|
+
if (!exclude.includes(key)) {
|
146
|
+
cb();
|
147
|
+
this._subTreeListeners.delete(key);
|
148
|
+
}
|
121
149
|
});
|
122
150
|
}
|
123
151
|
|
@@ -159,7 +187,6 @@ class ContentTreeCollection extends IndexedCollection {
|
|
159
187
|
vcsAppSymbol,
|
160
188
|
ButtonLocation.CONTENT,
|
161
189
|
);
|
162
|
-
this._subTreeViewItems.value.set(id, subTreeViewItem);
|
163
190
|
return () => {
|
164
191
|
app.windowManager.remove(id);
|
165
192
|
app.navbarManager.remove(id);
|
@@ -228,14 +255,21 @@ class ContentTreeCollection extends IndexedCollection {
|
|
228
255
|
defaultSubTreeViewItem,
|
229
256
|
...topLevelItems.filter((i) => i[subTreeSymbol]),
|
230
257
|
];
|
231
|
-
|
258
|
+
this._clearSubTrees(
|
259
|
+
subTrees.map((tree) => {
|
260
|
+
return tree.name;
|
261
|
+
}),
|
262
|
+
);
|
232
263
|
subTrees.forEach((subTree) => {
|
233
264
|
if (!this._app.navbarManager.has(subTree.name) || resetSubtreeButtons) {
|
234
|
-
this.
|
235
|
-
this.
|
236
|
-
subTree.name
|
237
|
-
this.
|
238
|
-
|
265
|
+
this._subTreeViewItems.value.set(subTree.name, subTree);
|
266
|
+
if (!this._app.uiConfig.config.hideContentTree) {
|
267
|
+
this._subTreeListeners.get(subTree.name)?.();
|
268
|
+
this._subTreeListeners.set(
|
269
|
+
subTree.name,
|
270
|
+
this._createSubtreeActionButton(subTree),
|
271
|
+
);
|
272
|
+
}
|
239
273
|
} else {
|
240
274
|
const buttonComponent = this._app.navbarManager.get(subTree.name);
|
241
275
|
if (buttonComponent.weight !== subTree[subTreeItemWeight]) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* @type {ClassRegistry<
|
2
|
+
* @type {ClassRegistry<typeof ContentTreeItem>}
|
3
3
|
*/
|
4
|
-
export const contentTreeClassRegistry: ClassRegistry<
|
4
|
+
export const contentTreeClassRegistry: ClassRegistry<typeof ContentTreeItem>;
|
5
5
|
export default ContentTreeItem;
|
6
6
|
export type ContentTreeItemOptions = {
|
7
7
|
type?: string | undefined;
|
@@ -47,7 +47,7 @@ import { executeCallbacks } from '../callback/vcsCallback.js';
|
|
47
47
|
const actionWeightSymbol = Symbol('ActionWeight');
|
48
48
|
|
49
49
|
/**
|
50
|
-
* @type {ClassRegistry<
|
50
|
+
* @type {ClassRegistry<typeof ContentTreeItem>}
|
51
51
|
*/
|
52
52
|
export const contentTreeClassRegistry = new ClassRegistry();
|
53
53
|
|
@@ -1,24 +1,32 @@
|
|
1
1
|
<template>
|
2
2
|
<v-card class="mx-auto elevation-0" v-if="position">
|
3
3
|
<slot name="balloon-header" :attrs="{ ...$props, ...$attrs }">
|
4
|
-
<v-list-item class="px-
|
5
|
-
<template #prepend>
|
6
|
-
<
|
4
|
+
<v-list-item class="px-1">
|
5
|
+
<template #prepend="prependScope">
|
6
|
+
<slot name="prepend" v-bind="prependScope">
|
7
|
+
<div class="pl-1 pr-2">
|
8
|
+
<v-icon color="primary" :size="iconSize"> $vcsInfo </v-icon>
|
9
|
+
</div>
|
10
|
+
</slot>
|
11
|
+
</template>
|
12
|
+
<slot name="balloon-title" :attrs="{ ...$props, ...$attrs }">
|
13
|
+
<v-list-item-title>
|
14
|
+
<h3 class="font-weight-bold">
|
15
|
+
{{ $st(balloonTitle) }}
|
16
|
+
</h3>
|
17
|
+
</v-list-item-title>
|
18
|
+
<v-list-item-subtitle v-if="balloonSubtitle">
|
19
|
+
{{ $st(balloonSubtitle) }}
|
20
|
+
</v-list-item-subtitle>
|
21
|
+
</slot>
|
22
|
+
<template #append>
|
23
|
+
<VcsButton
|
24
|
+
@click.stop="close"
|
25
|
+
icon="mdi-close-thick"
|
26
|
+
tooltip="components.close"
|
27
|
+
class="px-1"
|
28
|
+
/>
|
7
29
|
</template>
|
8
|
-
<v-list-item-title>
|
9
|
-
<h3 class="font-weight-bold">
|
10
|
-
{{ $st(balloonTitle) }}
|
11
|
-
</h3>
|
12
|
-
</v-list-item-title>
|
13
|
-
<v-list-item-subtitle v-if="balloonSubtitle">
|
14
|
-
{{ $st(balloonSubtitle) }}
|
15
|
-
</v-list-item-subtitle>
|
16
|
-
<VcsButton
|
17
|
-
@click.stop="close"
|
18
|
-
icon="mdi-close-thick"
|
19
|
-
tooltip="components.close"
|
20
|
-
class="d-flex"
|
21
|
-
/>
|
22
30
|
</v-list-item>
|
23
31
|
</slot>
|
24
32
|
|
@@ -69,6 +77,7 @@
|
|
69
77
|
import { setupBalloonPositionListener } from './balloonHelper.js';
|
70
78
|
import VcsButton from '../components/buttons/VcsButton.vue';
|
71
79
|
import { getTag, getTagOptions } from '../components/tables/VcsTable.vue';
|
80
|
+
import { useIconSize } from '../vuePlugins/vuetify.js';
|
72
81
|
|
73
82
|
/**
|
74
83
|
* @description A balloon viewing feature attributes. Size dynamic dependent on number of attributes.
|
@@ -80,7 +89,9 @@
|
|
80
89
|
* @vue-prop {Object} tags - optional object containing keys rendered as tags
|
81
90
|
* @vue-prop {Array<import("ol/coordinate").Coordinate>} position - clicked position balloon is rendered at
|
82
91
|
* @vue-data {slot} [#balloon-header] - slot to override balloon header, $props and $attrs are passed to `attrs`
|
92
|
+
* @vue-data {slot} [#balloon-title] - slot to override balloon title and subtitle, $props and $attrs are passed to `attrs`. Is overwritten by balloon-header slot.
|
83
93
|
* @vue-data {slot} [#default] - slot to override balloon content, $props and $attrs are passed to `attrs`
|
94
|
+
* @vue-data {slot} [#prepend] - slot to override balloon header icon
|
84
95
|
*/
|
85
96
|
export default {
|
86
97
|
name: 'BalloonComponent',
|
@@ -182,8 +193,9 @@
|
|
182
193
|
app.windowManager.remove(attrs['window-state'].id);
|
183
194
|
destroyListener();
|
184
195
|
};
|
185
|
-
|
196
|
+
const iconSize = useIconSize();
|
186
197
|
return {
|
198
|
+
iconSize,
|
187
199
|
close,
|
188
200
|
getTag,
|
189
201
|
getTagOptions,
|
@@ -194,8 +206,6 @@
|
|
194
206
|
</script>
|
195
207
|
|
196
208
|
<style lang="scss">
|
197
|
-
@import '../styles/shades.scss';
|
198
|
-
|
199
209
|
.balloon {
|
200
210
|
z-index: 0 !important;
|
201
211
|
}
|
@@ -213,11 +223,8 @@
|
|
213
223
|
width: 0;
|
214
224
|
filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.3));
|
215
225
|
}
|
216
|
-
.
|
217
|
-
border-color:
|
218
|
-
}
|
219
|
-
.theme--dark .balloon:after {
|
220
|
-
border-color: map-get($shades, 'black') transparent;
|
226
|
+
.balloon:after {
|
227
|
+
border-color: rgb(var(--v-theme-surface-light)) transparent;
|
221
228
|
}
|
222
229
|
.balloon .v-list-item .v-list-item__title,
|
223
230
|
.balloon .v-list-item .v-list-item__subtitle {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<BalloonComponent v-bind="{ ...$attrs }">
|
3
|
-
<
|
3
|
+
<VcsMarkdown :content="content" />
|
4
4
|
</BalloonComponent>
|
5
5
|
</template>
|
6
6
|
<script>
|
7
7
|
import BalloonComponent from './BalloonComponent.vue';
|
8
|
+
import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
|
8
9
|
|
9
10
|
/**
|
10
11
|
* @description A balloon showing markdown content
|
@@ -12,12 +13,13 @@
|
|
12
13
|
export default {
|
13
14
|
name: 'MarkdownBalloonComponent',
|
14
15
|
props: {
|
15
|
-
|
16
|
+
content: {
|
16
17
|
type: String,
|
17
18
|
required: true,
|
18
19
|
},
|
19
20
|
},
|
20
21
|
components: {
|
22
|
+
VcsMarkdown,
|
21
23
|
BalloonComponent,
|
22
24
|
},
|
23
25
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
|
-
|
2
|
+
content: {
|
3
3
|
type: StringConstructor;
|
4
4
|
required: true;
|
5
5
|
};
|
6
6
|
}, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
7
|
-
|
7
|
+
content: {
|
8
8
|
type: StringConstructor;
|
9
9
|
required: true;
|
10
10
|
};
|
@@ -103,7 +103,7 @@ export type FeatureInfoViewOptions = import("@vcmap/core").VcsObjectOptions & {
|
|
103
103
|
keyMapping?: Record<string, string>;
|
104
104
|
valueMapping?: Record<string, string | Record<string, string>>;
|
105
105
|
tags?: Record<string, HTMLTagOptions>;
|
106
|
-
window?: import("../manager/window/windowManager.js").WindowComponentOptions
|
106
|
+
window?: Pick<import("../manager/window/windowManager.js").WindowComponentOptions, 'state' | 'slot' | 'position'>;
|
107
107
|
};
|
108
108
|
/**
|
109
109
|
* Abstract class to be extended by FeatureInfoView classes
|
@@ -145,7 +145,7 @@ declare class AbstractFeatureInfoView extends VcsObject {
|
|
145
145
|
[x: string]: HTMLTagOptions;
|
146
146
|
};
|
147
147
|
/**
|
148
|
-
* @type {import("../manager/window/windowManager.js").WindowComponentOptions|Object}
|
148
|
+
* @type {Pick<import("../manager/window/windowManager.js").WindowComponentOptions,'state'|'slot'|'position'>|Object}
|
149
149
|
* @private
|
150
150
|
*/
|
151
151
|
private _window;
|
@@ -156,14 +156,20 @@ declare class AbstractFeatureInfoView extends VcsObject {
|
|
156
156
|
private _component;
|
157
157
|
/**
|
158
158
|
* window options, configured in a module, used only internally by AbstractFeatureInfoView or subclass
|
159
|
-
* @type {import("../manager/window/windowManager.js").WindowComponentOptions|Object}
|
159
|
+
* @type {Pick<import("../manager/window/windowManager.js").WindowComponentOptions<FeatureInfoProps>,'state'|'slot'|'position'>|Object}
|
160
160
|
*/
|
161
|
-
get window(): Object | import("../manager/window/windowManager.js").WindowComponentOptions<
|
161
|
+
get window(): Object | Pick<import("../manager/window/windowManager.js").WindowComponentOptions<FeatureInfoProps>, "slot" | "state" | "position">;
|
162
162
|
/**
|
163
163
|
* component provided by a FeatureInfoView class, passed to featureInfo via `getWindowComponentOptions()`
|
164
164
|
* @type {import("vue").Component<FeatureInfoProps, unknown, unknown>|undefined}
|
165
165
|
*/
|
166
166
|
get component(): import("vue").Component<FeatureInfoProps, unknown, unknown, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | undefined;
|
167
|
+
/**
|
168
|
+
* @param {undefined|import("ol").Feature|import("@vcmap-cesium/engine").Cesium3DTileFeature|import("@vcmap-cesium/engine").Cesium3DTilePointFeature} feature
|
169
|
+
* @returns {Object}
|
170
|
+
* @protected
|
171
|
+
*/
|
172
|
+
protected _getAttributesFromFeature(feature: undefined | import("ol").Feature | import("@vcmap-cesium/engine").Cesium3DTileFeature | import("@vcmap-cesium/engine").Cesium3DTilePointFeature): Object;
|
167
173
|
/**
|
168
174
|
* This method returns all relevant attributes for this view.
|
169
175
|
* Called by `getProperties()` to pass attributes as props object to the VueComponent of this view.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { VcsObject } from '@vcmap/core';
|
2
2
|
import { WindowSlot } from '../manager/window/windowManager.js';
|
3
3
|
import { defaultTagOptions } from '../components/tables/VcsTable.vue';
|
4
|
-
import {
|
4
|
+
import { renderTemplate } from '../components/form-output/markdownHelper.js';
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @typedef {Object} FeatureInfoProps
|
@@ -24,13 +24,13 @@ import { replaceAttributes } from '../application/markdownHelper.js';
|
|
24
24
|
* keyMapping?: Record<string,string>,
|
25
25
|
* valueMapping?: Record<string, string|Record<string,string>>,
|
26
26
|
* tags?: Record<string, HTMLTagOptions>,
|
27
|
-
* window?: import("../manager/window/windowManager.js").WindowComponentOptions
|
27
|
+
* window?: Pick<import("../manager/window/windowManager.js").WindowComponentOptions,'state'|'slot'|'position'>
|
28
28
|
* }} FeatureInfoViewOptions
|
29
29
|
* @property {Array<string>} [attributeKeys] - list of keys to filter attributes of selected feature
|
30
30
|
* @property {Object<string,string>} [keyMapping] - object providing text replacements or i18n strings for attribute keys
|
31
31
|
* @property {Object<string, string|Object<string,string>>} [valueMapping] - object providing text replacements or i18n strings for attribute values
|
32
32
|
* @property {Object<string,HTMLTagOptions>} [tags] - object with keys rendered as special html element. Value contains html options
|
33
|
-
* @property {import("../manager/window/windowManager.js").WindowComponentOptions} [window] - state, slot, position can be set. Other options are predefined. headerTitle of window state can be a template string, e.g. "{{myAttribute}}" or ["{{layerName}}", " - ", "{{myAttribute}}"]
|
33
|
+
* @property {Pick<import("../manager/window/windowManager.js").WindowComponentOptions,'state'|'slot'|'position'>} [window] - state, slot, position can be set. Other options are predefined. headerTitle of window state can be a template string, e.g. "{{myAttribute}}" or ["{{layerName}}", " - ", "{{myAttribute}}"]
|
34
34
|
*/
|
35
35
|
|
36
36
|
/**
|
@@ -251,11 +251,9 @@ function getWindowState(app, state, attributes) {
|
|
251
251
|
let headerTitle = state?.headerTitle;
|
252
252
|
if (headerTitle) {
|
253
253
|
if (Array.isArray(headerTitle)) {
|
254
|
-
headerTitle = headerTitle.map((item) =>
|
255
|
-
replaceAttributes(item, attributes),
|
256
|
-
);
|
254
|
+
headerTitle = headerTitle.map((item) => renderTemplate(item, attributes));
|
257
255
|
} else {
|
258
|
-
headerTitle =
|
256
|
+
headerTitle = renderTemplate(headerTitle, attributes);
|
259
257
|
}
|
260
258
|
}
|
261
259
|
return {
|
@@ -316,7 +314,7 @@ class AbstractFeatureInfoView extends VcsObject {
|
|
316
314
|
*/
|
317
315
|
this.tags = options.tags || defaultOptions.tags;
|
318
316
|
/**
|
319
|
-
* @type {import("../manager/window/windowManager.js").WindowComponentOptions|Object}
|
317
|
+
* @type {Pick<import("../manager/window/windowManager.js").WindowComponentOptions,'state'|'slot'|'position'>|Object}
|
320
318
|
* @private
|
321
319
|
*/
|
322
320
|
this._window = options.window || defaultOptions.window;
|
@@ -329,7 +327,7 @@ class AbstractFeatureInfoView extends VcsObject {
|
|
329
327
|
|
330
328
|
/**
|
331
329
|
* window options, configured in a module, used only internally by AbstractFeatureInfoView or subclass
|
332
|
-
* @type {import("../manager/window/windowManager.js").WindowComponentOptions|Object}
|
330
|
+
* @type {Pick<import("../manager/window/windowManager.js").WindowComponentOptions<FeatureInfoProps>,'state'|'slot'|'position'>|Object}
|
333
331
|
*/
|
334
332
|
get window() {
|
335
333
|
return this._window;
|
@@ -343,6 +341,16 @@ class AbstractFeatureInfoView extends VcsObject {
|
|
343
341
|
return this._component;
|
344
342
|
}
|
345
343
|
|
344
|
+
/**
|
345
|
+
* @param {undefined|import("ol").Feature|import("@vcmap-cesium/engine").Cesium3DTileFeature|import("@vcmap-cesium/engine").Cesium3DTilePointFeature} feature
|
346
|
+
* @returns {Object}
|
347
|
+
* @protected
|
348
|
+
*/
|
349
|
+
// eslint-disable-next-line class-methods-use-this
|
350
|
+
_getAttributesFromFeature(feature) {
|
351
|
+
return feature?.getProperty('attributes') || {};
|
352
|
+
}
|
353
|
+
|
346
354
|
/**
|
347
355
|
* This method returns all relevant attributes for this view.
|
348
356
|
* Called by `getProperties()` to pass attributes as props object to the VueComponent of this view.
|
@@ -352,7 +360,7 @@ class AbstractFeatureInfoView extends VcsObject {
|
|
352
360
|
* @returns {Object}
|
353
361
|
*/
|
354
362
|
getAttributes(feature) {
|
355
|
-
let attributes =
|
363
|
+
let attributes = this._getAttributesFromFeature(feature);
|
356
364
|
if (this.attributeKeys.length > 0) {
|
357
365
|
attributes = applyAttributeFilter(attributes, this.attributeKeys);
|
358
366
|
}
|
@@ -375,7 +383,7 @@ class AbstractFeatureInfoView extends VcsObject {
|
|
375
383
|
*/
|
376
384
|
getTags(feature) {
|
377
385
|
if (this.tags) {
|
378
|
-
const attributes =
|
386
|
+
const attributes = this._getAttributesFromFeature(feature);
|
379
387
|
const tags = Object.keys(this.tags)
|
380
388
|
.filter(
|
381
389
|
(key) =>
|