@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
@@ -8,27 +8,27 @@
|
|
8
8
|
<style lang="scss" scoped></style>
|
9
9
|
|
10
10
|
<script>
|
11
|
-
import { inject, onMounted, onUnmounted, ref } from 'vue';
|
11
|
+
import { inject, onMounted, onUnmounted, ref, computed } from 'vue';
|
12
12
|
import { v4 as uuid } from 'uuid';
|
13
13
|
import MapNavigation from '../navigation/MapNavigation.vue';
|
14
14
|
import VcsMap from './VcsMap.vue';
|
15
15
|
|
16
16
|
export function setupMapNavigation(app) {
|
17
|
-
const
|
17
|
+
const mapSize = ref(app.maps.size);
|
18
18
|
|
19
19
|
const listeners = [
|
20
20
|
app.maps.added.addEventListener(() => {
|
21
|
-
|
21
|
+
mapSize.value = app.maps.size;
|
22
22
|
}),
|
23
23
|
app.maps.removed.addEventListener(() => {
|
24
|
-
|
25
|
-
showMapNavigation.value = false;
|
26
|
-
}
|
24
|
+
mapSize.value = app.maps.size;
|
27
25
|
}),
|
28
26
|
];
|
29
27
|
|
30
28
|
return {
|
31
|
-
showMapNavigation
|
29
|
+
showMapNavigation: computed(() => {
|
30
|
+
return mapSize.value > 0 && !app.uiConfig.config.hideMapNavigation;
|
31
|
+
}),
|
32
32
|
destroy: () => {
|
33
33
|
listeners.forEach((cb) => cb());
|
34
34
|
},
|
@@ -1,9 +1,9 @@
|
|
1
1
|
export function setupMapNavigation(app: any): {
|
2
|
-
showMapNavigation: import("vue").
|
2
|
+
showMapNavigation: import("vue").ComputedRef<boolean>;
|
3
3
|
destroy: () => void;
|
4
4
|
};
|
5
5
|
declare const _default: import("vue").DefineComponent<{}, {
|
6
6
|
mapId: string;
|
7
|
-
showMapNavigation: import("vue").
|
7
|
+
showMapNavigation: import("vue").ComputedRef<boolean>;
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
9
9
|
export default _default;
|
@@ -4,6 +4,7 @@
|
|
4
4
|
:density="density"
|
5
5
|
elevation="0"
|
6
6
|
class="px-4"
|
7
|
+
:height="toolbarHeight"
|
7
8
|
:style="xs ? { bottom: 0 } : { top: 0 }"
|
8
9
|
>
|
9
10
|
<v-container fluid class="pa-0">
|
@@ -14,6 +15,7 @@
|
|
14
15
|
<VcsActionButtonList
|
15
16
|
:actions="mapActions"
|
16
17
|
:overflow-count="3"
|
18
|
+
:force-overflow="false"
|
17
19
|
button="VcsToolButton"
|
18
20
|
/>
|
19
21
|
<v-divider
|
@@ -28,6 +30,7 @@
|
|
28
30
|
<VcsActionButtonList
|
29
31
|
:actions="contentActions"
|
30
32
|
:overflow-count="xs ? 3 : 4"
|
33
|
+
:force-overflow="false"
|
31
34
|
button="VcsToolButton"
|
32
35
|
/>
|
33
36
|
<v-divider
|
@@ -38,6 +41,7 @@
|
|
38
41
|
/>
|
39
42
|
<VcsActionButtonList
|
40
43
|
:actions="toolActions"
|
44
|
+
:force-overflow="false"
|
41
45
|
v-if="mdAndUp"
|
42
46
|
button="VcsToolButton"
|
43
47
|
/>
|
@@ -62,6 +66,7 @@
|
|
62
66
|
<div class="d-flex">
|
63
67
|
<VcsActionButtonList
|
64
68
|
:actions="projectActions"
|
69
|
+
:force-overflow="false"
|
65
70
|
button="VcsToolButton"
|
66
71
|
/>
|
67
72
|
<v-divider
|
@@ -120,7 +125,7 @@
|
|
120
125
|
|
121
126
|
<style lang="scss" scoped>
|
122
127
|
.logo {
|
123
|
-
max-height:
|
128
|
+
max-height: calc(var(--v-vcs-font-size) * 3 - 3px);
|
124
129
|
margin: 0 auto;
|
125
130
|
}
|
126
131
|
.v-toolbar.v-toolbar--bottom {
|
@@ -150,6 +155,7 @@
|
|
150
155
|
import VcsToolButton from '../components/buttons/VcsToolButton.vue';
|
151
156
|
import { createSearchButtonAction } from '../actions/actionHelper.js';
|
152
157
|
import VcsDefaultLogo from '../logo.svg';
|
158
|
+
import { useFontSize } from '../vuePlugins/vuetify.js';
|
153
159
|
|
154
160
|
/**
|
155
161
|
* @description The menu bar of a VcsMap application.
|
@@ -186,7 +192,7 @@
|
|
186
192
|
);
|
187
193
|
|
188
194
|
const logo = computed(() => {
|
189
|
-
return app.uiConfig.config.
|
195
|
+
return app.uiConfig.config.logo ?? VcsDefaultLogo;
|
190
196
|
});
|
191
197
|
|
192
198
|
const { searchAction, destroy: destroySearchAction } =
|
@@ -202,6 +208,11 @@
|
|
202
208
|
return xs.value ? 'comfortable' : 'compact';
|
203
209
|
});
|
204
210
|
|
211
|
+
const fontSize = useFontSize();
|
212
|
+
const toolbarHeight = computed(() => {
|
213
|
+
return fontSize.value * 3 + 8 + 16;
|
214
|
+
});
|
215
|
+
|
205
216
|
return {
|
206
217
|
mapActions: getActions(ButtonLocation.MAP),
|
207
218
|
contentActions: getActions(ButtonLocation.CONTENT),
|
@@ -215,6 +226,7 @@
|
|
215
226
|
xs,
|
216
227
|
density,
|
217
228
|
mdAndUp,
|
229
|
+
toolbarHeight,
|
218
230
|
};
|
219
231
|
},
|
220
232
|
};
|
@@ -44,5 +44,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
44
44
|
xs: import("vue").Ref<boolean>;
|
45
45
|
density: import("vue").ComputedRef<"compact" | "comfortable">;
|
46
46
|
mdAndUp: import("vue").Ref<boolean>;
|
47
|
+
toolbarHeight: import("vue").ComputedRef<number>;
|
47
48
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
48
49
|
export default _default;
|
@@ -9,33 +9,40 @@
|
|
9
9
|
persistent
|
10
10
|
>
|
11
11
|
<v-card>
|
12
|
-
<
|
13
|
-
<
|
14
|
-
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
12
|
+
<v-card-text>
|
13
|
+
<VcsMarkdown :content="$st(options.content)" />
|
14
|
+
<VcsCheckbox v-if="options.acceptInput" v-model="checkBox">
|
15
|
+
<template #label>
|
16
|
+
<VcsMarkdown
|
17
|
+
:content="
|
18
|
+
$st(
|
19
|
+
options.checkBoxText ||
|
20
|
+
'components.splashScreen.checkBoxText',
|
21
|
+
)
|
22
|
+
"
|
23
|
+
class="marked-checkbox-content"
|
24
|
+
/>
|
25
|
+
</template>
|
26
|
+
</VcsCheckbox>
|
27
|
+
</v-card-text>
|
24
28
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
29
|
+
<v-card-actions>
|
30
|
+
<v-row no-gutters>
|
31
|
+
<v-col class="text-right">
|
32
|
+
<VcsFormButton
|
33
|
+
color="primary"
|
34
|
+
variant="filled"
|
35
|
+
@click="exitScreen"
|
36
|
+
:disabled="options.acceptInput && !checkBox"
|
37
|
+
>{{
|
38
|
+
$st(
|
39
|
+
options.buttonTitle || 'components.splashScreen.buttonTitle',
|
40
|
+
)
|
41
|
+
}}</VcsFormButton
|
42
|
+
>
|
43
|
+
</v-col>
|
44
|
+
</v-row>
|
45
|
+
</v-card-actions>
|
39
46
|
</v-card>
|
40
47
|
</v-dialog>
|
41
48
|
</template>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template v-if="textPage.title">
|
2
2
|
<span class="d-inline-block text-truncate mr-1">
|
3
3
|
<span v-if="textPage.url" class="imprint">
|
4
|
-
<a :href="textPage.url" target="_blank"
|
4
|
+
<a :href="$st(textPage.url)" target="_blank"
|
5
5
|
>{{ $st(textPage.title) }} <span></span>
|
6
6
|
</a>
|
7
7
|
</span>
|
@@ -38,6 +38,7 @@
|
|
38
38
|
|
39
39
|
/**
|
40
40
|
* A Footer element opening either an URL in a new tab or a WindowComponent with provided content
|
41
|
+
* textPage title, tooltip and the url can also be i18n keys, and will be translated.
|
41
42
|
* @vue-prop {import("../uiConfig.js").TextPageType} [textPage]
|
42
43
|
* @vue-prop {string} windowId
|
43
44
|
*/
|
@@ -1,24 +1,24 @@
|
|
1
1
|
/**
|
2
|
-
* @typedef {Object}
|
2
|
+
* @typedef {Object} AttributionOptions
|
3
3
|
* @property {string} provider - name of the data provider
|
4
4
|
* @property {number} [year] - year of dataset
|
5
|
-
* @property {
|
5
|
+
* @property {string} url - link to data provider
|
6
6
|
*/
|
7
7
|
/**
|
8
8
|
* @typedef {Object} AttributionEntry
|
9
9
|
* @property {string} key - name of the VcsObject the attribution applies to
|
10
10
|
* @property {string} title - title of the VcsObject the attribution applies to
|
11
|
-
* @property {
|
11
|
+
* @property {AttributionOptions|Array<AttributionOptions>} attributions - attributions of a map, layer or oblique collection
|
12
12
|
*/
|
13
13
|
/**
|
14
14
|
* merges attribution entries of same providers
|
15
15
|
* @param {Array<AttributionEntry>} entries
|
16
|
-
* @returns {Array<{provider: string, years: string, url:
|
16
|
+
* @returns {Array<{provider: string, years: string, url: string}>}
|
17
17
|
*/
|
18
18
|
export function mergeAttributions(entries: Array<AttributionEntry>): Array<{
|
19
19
|
provider: string;
|
20
20
|
years: string;
|
21
|
-
url:
|
21
|
+
url: string;
|
22
22
|
}>;
|
23
23
|
/**
|
24
24
|
* Gets attributions of all active maps, layers and oblique collections and returns an array of entries.
|
@@ -32,22 +32,20 @@ export function getAttributions(app: import("../vcsUiApp.js").default): {
|
|
32
32
|
entries: import("vue").UnwrapRef<Array<AttributionEntry>>;
|
33
33
|
destroy: () => void;
|
34
34
|
};
|
35
|
-
export
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
};
|
50
|
-
}
|
35
|
+
export type AttributionOptions = {
|
36
|
+
/**
|
37
|
+
* - name of the data provider
|
38
|
+
*/
|
39
|
+
provider: string;
|
40
|
+
/**
|
41
|
+
* - year of dataset
|
42
|
+
*/
|
43
|
+
year?: number | undefined;
|
44
|
+
/**
|
45
|
+
* - link to data provider
|
46
|
+
*/
|
47
|
+
url: string;
|
48
|
+
};
|
51
49
|
export type AttributionEntry = {
|
52
50
|
/**
|
53
51
|
* - name of the VcsObject the attribution applies to
|
@@ -60,5 +58,5 @@ export type AttributionEntry = {
|
|
60
58
|
/**
|
61
59
|
* - attributions of a map, layer or oblique collection
|
62
60
|
*/
|
63
|
-
attributions:
|
61
|
+
attributions: AttributionOptions | Array<AttributionOptions>;
|
64
62
|
};
|
@@ -2,23 +2,23 @@ import { reactive } from 'vue';
|
|
2
2
|
import { ObliqueMap } from '@vcmap/core';
|
3
3
|
|
4
4
|
/**
|
5
|
-
* @typedef {Object}
|
5
|
+
* @typedef {Object} AttributionOptions
|
6
6
|
* @property {string} provider - name of the data provider
|
7
7
|
* @property {number} [year] - year of dataset
|
8
|
-
* @property {
|
8
|
+
* @property {string} url - link to data provider
|
9
9
|
*/
|
10
10
|
|
11
11
|
/**
|
12
12
|
* @typedef {Object} AttributionEntry
|
13
13
|
* @property {string} key - name of the VcsObject the attribution applies to
|
14
14
|
* @property {string} title - title of the VcsObject the attribution applies to
|
15
|
-
* @property {
|
15
|
+
* @property {AttributionOptions|Array<AttributionOptions>} attributions - attributions of a map, layer or oblique collection
|
16
16
|
*/
|
17
17
|
|
18
18
|
/**
|
19
19
|
* merges attribution entries of same providers
|
20
20
|
* @param {Array<AttributionEntry>} entries
|
21
|
-
* @returns {Array<{provider: string, years: string, url:
|
21
|
+
* @returns {Array<{provider: string, years: string, url: string}>}
|
22
22
|
*/
|
23
23
|
export function mergeAttributions(entries) {
|
24
24
|
const providers = {};
|
@@ -5,9 +5,9 @@
|
|
5
5
|
*/
|
6
6
|
export function executeCallbacks(app: import("@src/vcsUiApp.js").default, vcsCallbackOptions: Array<VcsCallbackOptions>): void;
|
7
7
|
/**
|
8
|
-
* @type {ClassRegistry<
|
8
|
+
* @type {ClassRegistry<typeof VcsCallback>}
|
9
9
|
*/
|
10
|
-
export const callbackClassRegistry: ClassRegistry<
|
10
|
+
export const callbackClassRegistry: ClassRegistry<typeof VcsCallback>;
|
11
11
|
export default VcsCallback;
|
12
12
|
export type VcsCallbackOptions = {
|
13
13
|
type: string;
|
@@ -7,6 +7,7 @@
|
|
7
7
|
v-for="(btn, index) in buttons"
|
8
8
|
:key="`${btn.name}-${index}`"
|
9
9
|
:tooltip="btn.title"
|
10
|
+
:tooltip-position="tooltipPosition"
|
10
11
|
:icon="btn.icon"
|
11
12
|
:active="btn.active"
|
12
13
|
:disabled="btn.disabled || disabled"
|
@@ -28,12 +29,15 @@
|
|
28
29
|
:disabled="disabled"
|
29
30
|
v-bind="props"
|
30
31
|
class="d-flex"
|
31
|
-
|
32
|
-
|
33
|
-
</component>
|
32
|
+
:icon="overflowIcon"
|
33
|
+
/>
|
34
34
|
</template>
|
35
35
|
<VcsActionList :actions="overflowButtons" :disabled="disabled" />
|
36
36
|
</v-menu>
|
37
|
+
<v-spacer
|
38
|
+
v-else-if="blockOverflow"
|
39
|
+
class="flex-grow-0 d-inline-block px-2"
|
40
|
+
/>
|
37
41
|
</div>
|
38
42
|
</template>
|
39
43
|
<script>
|
@@ -43,17 +47,36 @@
|
|
43
47
|
import VcsFormButton from './VcsFormButton.vue';
|
44
48
|
import VcsActionList, { validateActions } from '../lists/VcsActionList.vue';
|
45
49
|
|
50
|
+
/**
|
51
|
+
* compares two strings token based
|
52
|
+
* @param {string} str1
|
53
|
+
* @param {string} str2
|
54
|
+
* @returns {number} the convergence of both strings in percent
|
55
|
+
*/
|
56
|
+
function jaccardSimilarity(str1, str2) {
|
57
|
+
const set1 = new Set(str1.split(' '));
|
58
|
+
const set2 = new Set(str2.split(' '));
|
59
|
+
const intersection = new Set([...set1].filter((x) => set2.has(x)));
|
60
|
+
const union = new Set([...set1, ...set2]);
|
61
|
+
|
62
|
+
return intersection.size / union.size;
|
63
|
+
}
|
64
|
+
|
46
65
|
/**
|
47
66
|
* @description
|
48
67
|
* A component rendering a list of actions with overflow mechanic using
|
68
|
+
* For overflow buttons the title is only rendered, if it differs significantly from the action's name.
|
49
69
|
* {@link VcsButton} and {@link VcsActionList}.
|
50
70
|
* @vue-prop {Array<VcsAction>} actions - Array of actions
|
51
71
|
* @vue-prop {string} [button='VcsButton'] - used button type (one of 'VcsButton', 'VcsToolButton' or 'VcsFormButton)
|
52
72
|
* @vue-prop {number} [overflowCount=2] - number of buttons rendered until overflow.
|
53
73
|
* @vue-prop {string} [overflowIcon='$vcsKebab'] - optional custom icon for overflow button
|
74
|
+
* @vue-prop {boolean} [blockOverflow=false] - if space for the overflow should be blocked or not (e.g. when rendering lists in a grid)
|
75
|
+
* @vue-prop {boolean} [forceOverflow=true] - if there is only one overflow button, this button can be rendered instead of the overflow button by setting this option to false
|
76
|
+
* @vue-prop {boolean} [disabled=false] - disable all actions
|
77
|
+
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} tooltipPosition - Position of the tooltip.
|
54
78
|
* @vue-computed {Array<VcsAction>} buttons - buttons rendered directly, have to provide an icon
|
55
79
|
* @vue-computed {Array<VcsAction>} overflowButtons - rest of buttons rendered in overflow
|
56
|
-
* @vue-prop {boolean} [disabled=false] - disable all actions
|
57
80
|
*/
|
58
81
|
export default {
|
59
82
|
name: 'VcsActionButtonList',
|
@@ -86,19 +109,40 @@
|
|
86
109
|
type: String,
|
87
110
|
default: '$vcsKebab',
|
88
111
|
},
|
112
|
+
blockOverflow: {
|
113
|
+
type: Boolean,
|
114
|
+
default: false,
|
115
|
+
},
|
116
|
+
forceOverflow: {
|
117
|
+
type: Boolean,
|
118
|
+
default: true,
|
119
|
+
},
|
89
120
|
disabled: {
|
90
121
|
type: Boolean,
|
91
122
|
default: false,
|
92
123
|
},
|
124
|
+
tooltipPosition: {
|
125
|
+
type: String,
|
126
|
+
default: 'bottom',
|
127
|
+
},
|
93
128
|
},
|
94
129
|
computed: {
|
95
130
|
right() {
|
96
131
|
return this.$attrs.right !== undefined && this.$attrs.right !== false;
|
97
132
|
},
|
133
|
+
computedCount() {
|
134
|
+
if (
|
135
|
+
!this.forceOverflow &&
|
136
|
+
this.actions.length === this.overflowCount + 1
|
137
|
+
) {
|
138
|
+
return this.actions.length;
|
139
|
+
}
|
140
|
+
return this.overflowCount;
|
141
|
+
},
|
98
142
|
buttons() {
|
99
143
|
const buttons = this.actions
|
100
144
|
.filter((i) => i.icon)
|
101
|
-
.slice(0, this.
|
145
|
+
.slice(0, this.computedCount);
|
102
146
|
if (this.right) {
|
103
147
|
return buttons.reverse();
|
104
148
|
}
|
@@ -106,7 +150,18 @@
|
|
106
150
|
},
|
107
151
|
overflowButtons() {
|
108
152
|
const buttonsNames = this.buttons.map((i) => i.name);
|
109
|
-
return this.actions
|
153
|
+
return this.actions
|
154
|
+
.filter((i) => !buttonsNames.includes(i.name))
|
155
|
+
.map((i) => {
|
156
|
+
const { title, ...button } = i;
|
157
|
+
if (
|
158
|
+
title &&
|
159
|
+
jaccardSimilarity(this.$t(i.name), this.$t(title)) > 0.5
|
160
|
+
) {
|
161
|
+
return button;
|
162
|
+
}
|
163
|
+
return i;
|
164
|
+
});
|
110
165
|
},
|
111
166
|
classes() {
|
112
167
|
const classes = ['d-flex', 'align-center', 'action-btn-wrap'];
|
@@ -17,12 +17,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
17
17
|
type: StringConstructor;
|
18
18
|
default: string;
|
19
19
|
};
|
20
|
+
blockOverflow: {
|
21
|
+
type: BooleanConstructor;
|
22
|
+
default: boolean;
|
23
|
+
};
|
24
|
+
forceOverflow: {
|
25
|
+
type: BooleanConstructor;
|
26
|
+
default: boolean;
|
27
|
+
};
|
20
28
|
disabled: {
|
21
29
|
type: BooleanConstructor;
|
22
30
|
default: boolean;
|
23
31
|
};
|
32
|
+
tooltipPosition: {
|
33
|
+
type: StringConstructor;
|
34
|
+
default: string;
|
35
|
+
};
|
24
36
|
}, any, any, {
|
25
37
|
right(): boolean;
|
38
|
+
computedCount(): any;
|
26
39
|
buttons(): any;
|
27
40
|
overflowButtons(): any;
|
28
41
|
classes(): string[];
|
@@ -45,15 +58,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
45
58
|
type: StringConstructor;
|
46
59
|
default: string;
|
47
60
|
};
|
61
|
+
blockOverflow: {
|
62
|
+
type: BooleanConstructor;
|
63
|
+
default: boolean;
|
64
|
+
};
|
65
|
+
forceOverflow: {
|
66
|
+
type: BooleanConstructor;
|
67
|
+
default: boolean;
|
68
|
+
};
|
48
69
|
disabled: {
|
49
70
|
type: BooleanConstructor;
|
50
71
|
default: boolean;
|
51
72
|
};
|
73
|
+
tooltipPosition: {
|
74
|
+
type: StringConstructor;
|
75
|
+
default: string;
|
76
|
+
};
|
52
77
|
}>>, {
|
53
78
|
button: string;
|
54
79
|
disabled: boolean;
|
80
|
+
tooltipPosition: string;
|
55
81
|
overflowCount: number;
|
56
82
|
overflowIcon: string;
|
83
|
+
blockOverflow: boolean;
|
84
|
+
forceOverflow: boolean;
|
57
85
|
}, {}>;
|
58
86
|
export default _default;
|
59
87
|
import { validateActions } from '../lists/VcsActionList.vue';
|
@@ -64,7 +64,7 @@
|
|
64
64
|
import { computed } from 'vue';
|
65
65
|
import { VBtn, VIcon, VTooltip } from 'vuetify/components';
|
66
66
|
import VcsBadge from '../notification/VcsBadge.vue';
|
67
|
-
import { useFontSize } from '../../vuePlugins/vuetify.js';
|
67
|
+
import { useFontSize, useIconSize } from '../../vuePlugins/vuetify.js';
|
68
68
|
import { useForwardSlots } from '../composables.js';
|
69
69
|
|
70
70
|
/**
|
@@ -132,9 +132,7 @@
|
|
132
132
|
const minHeight = computed(() => {
|
133
133
|
return fontSize.value * 1.5;
|
134
134
|
});
|
135
|
-
const iconSize =
|
136
|
-
return fontSize.value * (1.2 + 0.1 / 3);
|
137
|
-
});
|
135
|
+
const iconSize = useIconSize();
|
138
136
|
return {
|
139
137
|
forwardSlots,
|
140
138
|
hasDefaultSlot,
|
@@ -67,7 +67,7 @@
|
|
67
67
|
import { computed } from 'vue';
|
68
68
|
import { VBtn, VIcon, VTooltip } from 'vuetify/components';
|
69
69
|
import VcsBadge from '../notification/VcsBadge.vue';
|
70
|
-
import { useFontSize,
|
70
|
+
import { useFontSize, useIconSize } from '../../vuePlugins/vuetify.js';
|
71
71
|
import { useForwardSlots } from '../composables.js';
|
72
72
|
|
73
73
|
/**
|
@@ -112,7 +112,6 @@
|
|
112
112
|
},
|
113
113
|
},
|
114
114
|
setup(props, { slots }) {
|
115
|
-
const itemHeight = useItemHeight();
|
116
115
|
const buttonVariant = computed(() => {
|
117
116
|
if (props.variant === 'filled') {
|
118
117
|
return 'flat';
|
@@ -124,8 +123,9 @@
|
|
124
123
|
});
|
125
124
|
const forwardSlots = useForwardSlots(slots, ['default']);
|
126
125
|
const fontSize = useFontSize();
|
127
|
-
const iconSize =
|
128
|
-
|
126
|
+
const iconSize = useIconSize();
|
127
|
+
const itemHeight = computed(() => {
|
128
|
+
return fontSize.value * 2 + 6;
|
129
129
|
});
|
130
130
|
return {
|
131
131
|
forwardSlots,
|
@@ -70,7 +70,7 @@
|
|
70
70
|
import { VBtn, VIcon, VTooltip } from 'vuetify/components';
|
71
71
|
import VcsBadge from '../notification/VcsBadge.vue';
|
72
72
|
import { useForwardSlots } from '../composables.js';
|
73
|
-
import {
|
73
|
+
import { useFontSize } from '../../vuePlugins/vuetify.js';
|
74
74
|
|
75
75
|
/**
|
76
76
|
* @description a button with tooltip extending {@link https://vuetifyjs.com/en/api/v-btn/|vuetify v-btn} using {@link VcsTooltip}. Used for tool buttons in the Navbar.
|
@@ -149,7 +149,9 @@
|
|
149
149
|
});
|
150
150
|
|
151
151
|
const fontSize = useFontSize();
|
152
|
-
const itemHeight =
|
152
|
+
const itemHeight = computed(() => {
|
153
|
+
return fontSize.value * 2 + 6;
|
154
|
+
});
|
153
155
|
const iconSize = computed(() => {
|
154
156
|
return fontSize.value * 1.5;
|
155
157
|
});
|
@@ -72,11 +72,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
72
72
|
default: string;
|
73
73
|
};
|
74
74
|
}>>, {
|
75
|
-
background: boolean;
|
76
75
|
icon: string;
|
76
|
+
background: boolean;
|
77
|
+
disabled: boolean;
|
77
78
|
active: boolean;
|
78
79
|
hasUpdate: boolean;
|
79
|
-
disabled: boolean;
|
80
80
|
color: string;
|
81
81
|
tooltip: string;
|
82
82
|
tooltipPosition: string;
|
@@ -19,3 +19,8 @@ export function useForwardSlots(slots: import("vue").Slots, exclude?: Array<stri
|
|
19
19
|
* @returns {import("vue").ComputedRef<string>}
|
20
20
|
*/
|
21
21
|
export function createEllipseTooltip(parent: import("vue").ComputedRef<HTMLElement | undefined>, tooltip: import("vue").ComputedRef<string | undefined>, title: import("vue").ComputedRef<string | undefined>): import("vue").ComputedRef<string>;
|
22
|
+
/**
|
23
|
+
* Returns a globally unique vcs component id string
|
24
|
+
* @returns {string}
|
25
|
+
*/
|
26
|
+
export function useComponentId(): string;
|