@vcmap/ui 6.0.0-rc.8 → 6.0.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/README.md +2 -0
- package/build/buildHelpers.js +1 -1
- package/build/commonViteConfig.js +7 -0
- package/config/aerowest.config.json +12 -2
- package/config/analysis.config.json +17 -0
- package/config/base.config.json +19 -5
- package/config/components-show-case.config.json +53 -0
- package/config/concepts-show-case.config.json +39 -0
- package/config/dev.config.json +164 -105
- package/config/dynamic-layer.config.json +32 -0
- package/config/hello-world.config.json +11 -0
- package/config/projects.config.json +9 -1
- package/config/solar.config.json +65 -0
- package/config/vectorTile.config.json +70 -0
- package/config/www.config.json +34 -13
- package/dist/assets/{cesium-2ec6aae0.js → cesium-00deba88.js} +4672 -4704
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-6f2522e5.js → core-a599e8b6.js} +7932 -7342
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-b0e134cb.js → ol-21bbc740.js} +12206 -11711
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-adeddc7d.css +1 -0
- package/dist/assets/{ui-bf3d1f84.js → ui-adeddc7d.js} +10415 -9588
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-99bf601c.css → vuetify-c0e02f11.css} +1 -1
- package/dist/assets/{vuetify-99bf601c.js → vuetify-c0e02f11.js} +5313 -5294
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +4 -0
- package/index.js +2 -0
- package/lib/olLib.js +6 -0
- package/package.json +12 -12
- package/plugins/@vcmap-show-case/README.md +15 -6
- package/plugins/@vcmap-show-case/category-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +23 -23
- package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +2 -8
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +1 -1
- package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +10 -8
- package/plugins/@vcmap-show-case/context-menu-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/extent-example/package.json +1 -1
- package/plugins/@vcmap-show-case/flight-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/form-inputs-example/package.json +1 -1
- package/plugins/@vcmap-show-case/hello-world/package.json +1 -1
- package/plugins/@vcmap-show-case/icons-example/package.json +1 -1
- package/plugins/@vcmap-show-case/notifier-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/panel-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/package.json +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/src/index.js +17 -6
- package/plugins/@vcmap-show-case/project-selector/package.json +1 -9
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +22 -31
- package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +15 -23
- package/plugins/@vcmap-show-case/projection-example/README.md +3 -0
- package/plugins/@vcmap-show-case/projection-example/package.json +5 -0
- package/plugins/@vcmap-show-case/projection-example/src/ProjectionExample.vue +73 -0
- package/plugins/@vcmap-show-case/{table-example → projection-example}/src/index.js +22 -11
- package/plugins/@vcmap-show-case/search-example/package.json +1 -1
- package/plugins/@vcmap-show-case/simple-graph/package.json +1 -4
- package/plugins/@vcmap-show-case/style-input-example/package.json +1 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +2 -2
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +2 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/src/index.js +4 -1
- package/plugins/@vcmap-show-case/theming-example/package.json +1 -1
- package/plugins/@vcmap-show-case/toolbox-example/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +1 -1
- package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +5 -1
- package/plugins/@vcmap-show-case/wizard-example/package.json +1 -1
- package/plugins/package.json +23 -3
- package/src/actions/flightActions.js +40 -20
- package/src/actions/listActions.d.ts +1 -1
- package/src/actions/listActions.js +1 -1
- package/src/application/VcsApp.vue +3 -0
- package/src/application/VcsApp.vue.d.ts +15 -0
- package/src/application/VcsAttributions.vue +1 -1
- package/src/application/VcsAttributionsFooter.vue +1 -1
- package/src/application/VcsContainer.vue +0 -1
- package/src/application/VcsContainer.vue.d.ts +15 -0
- package/src/application/VcsObliqueFooter.vue +110 -0
- package/src/application/VcsObliqueFooter.vue.d.ts +4 -0
- package/src/application/VcsTextPageFooter.vue +1 -0
- package/src/application/attributionsHelper.js +10 -6
- package/src/components/buttons/VcsButton.vue +2 -2
- package/src/components/buttons/VcsButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsFormButton.vue +2 -2
- package/src/components/buttons/VcsFormButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsToolButton.vue +2 -2
- package/src/components/buttons/VcsToolButton.vue.d.ts +1 -1
- package/src/components/composables.d.ts +2 -2
- package/src/components/composables.js +3 -5
- package/src/components/flight/VcsFlightPlayer.vue +26 -20
- package/src/components/form-inputs-controls/VcsCheckbox.vue +11 -5
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +10 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue +23 -3
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsFileInput.vue +3 -3
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +10 -1
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsRadio.vue +4 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +2 -2
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +3 -3
- package/src/components/form-inputs-controls/VcsSlider.vue +2 -2
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsTextField.vue +3 -3
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +2 -2
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsWizardStep.vue +2 -2
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +3 -3
- package/src/components/import/VcsImportComponent.vue +3 -3
- package/src/components/lists/VcsActionList.vue +1 -1
- package/src/components/lists/VcsList.vue +56 -39
- package/src/components/lists/VcsListItemComponent.vue +14 -12
- package/src/components/lists/VcsListItemComponent.vue.d.ts +5 -28
- package/src/components/lists/VcsTreeview.vue +4 -2
- package/src/components/lists/VcsTreeview.vue.d.ts +1 -1
- package/src/components/notification/VcsHelp.vue +0 -1
- package/src/components/notification/VcsHelpTooltip.vue +48 -0
- package/src/components/notification/VcsHelpTooltip.vue.d.ts +25 -0
- package/src/components/projection/VcsProjection.vue +329 -0
- package/src/components/projection/VcsProjection.vue.d.ts +7 -0
- package/src/components/section/VcsFormSection.vue +0 -1
- package/src/components/section/VcsFormSection.vue.d.ts +1 -1
- package/src/components/tables/VcsDataTable.vue +15 -4
- package/src/components/tables/VcsDataTable.vue.d.ts +13 -2
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +17 -1
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +10 -1
- package/src/components/vector-properties/VcsFeatureTransforms.vue +39 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +2 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +44 -24
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +27 -2
- package/src/components/viewpoint/VcsViewpointComponent.vue +6 -6
- package/src/contentTree/contentTreeCollection.js +12 -1
- package/src/contentTree/obliqueCollectionContentTreeItem.js +6 -1
- package/src/featureInfo/abstractFeatureInfoView.d.ts +9 -0
- package/src/featureInfo/abstractFeatureInfoView.js +20 -3
- package/src/i18n/de.d.ts +93 -39
- package/src/i18n/de.js +68 -22
- package/src/i18n/en.d.ts +93 -39
- package/src/i18n/en.js +64 -18
- package/src/legend/StyleLegendItem.vue +1 -5
- package/src/legend/VcsLegend.vue +9 -10
- package/src/legend/VcsLegend.vue.d.ts +1 -1
- package/src/legend/legendHelper.js +6 -1
- package/src/manager/collectionManager/collectionComponentClass.js +9 -5
- package/src/manager/collectionManager/editorCollectionComponentClass.js +5 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +6 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue +6 -2
- package/src/manager/toolbox/ToolboxManagerComponent.vue +7 -2
- package/src/manager/window/WindowComponentHeader.vue +1 -1
- package/src/manager/window/windowManager.d.ts +59 -3
- package/src/manager/window/windowManager.js +23 -2
- package/src/navigation/MapNavCompass.vue +166 -140
- package/src/navigation/MapNavCompass.vue.d.ts +3 -1
- package/src/navigation/MapNavigation.vue +22 -5
- package/src/navigation/VcsCompass.vue +2 -1
- package/src/navigation/overviewMap.js +4 -1
- package/src/obliqueFallbackWarnings.d.ts +5 -0
- package/src/obliqueFallbackWarnings.js +54 -0
- package/src/styles/main.scss +2 -2
- package/src/uiConfig.d.ts +30 -0
- package/src/uiConfig.js +3 -0
- package/src/vcsUiApp.d.ts +37 -10
- package/src/vcsUiApp.js +4 -0
- package/src/vuePlugins/i18n.js +1 -0
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/ui-bf3d1f84.css +0 -1
- package/plugins/@vcmap-show-case/buttons-example/README.md +0 -4
- package/plugins/@vcmap-show-case/buttons-example/package.json +0 -5
- package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +0 -281
- package/plugins/@vcmap-show-case/buttons-example/src/index.js +0 -51
- package/plugins/@vcmap-show-case/config-editor/README.md +0 -3
- package/plugins/@vcmap-show-case/config-editor/package.json +0 -5
- package/plugins/@vcmap-show-case/config-editor/src/ConfigEditor.vue +0 -62
- package/plugins/@vcmap-show-case/config-editor/src/index.js +0 -49
- package/plugins/@vcmap-show-case/list-example/README.md +0 -3
- package/plugins/@vcmap-show-case/list-example/package.json +0 -5
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +0 -403
- package/plugins/@vcmap-show-case/list-example/src/index.js +0 -46
- package/plugins/@vcmap-show-case/table-example/README.md +0 -3
- package/plugins/@vcmap-show-case/table-example/package.json +0 -5
- package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +0 -203
- package/plugins/@vcmap-show-case/textfields-example/README.md +0 -3
- package/plugins/@vcmap-show-case/textfields-example/package.json +0 -5
- package/plugins/@vcmap-show-case/textfields-example/src/TextfieldsExample.vue +0 -115
- package/plugins/@vcmap-show-case/textfields-example/src/index.js +0 -64
- /package/dist/assets/{vue-43880c5a.js → vue-8269279d.js} +0 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
<template>
|
2
|
+
<span
|
3
|
+
v-if="content"
|
4
|
+
class="d-flex align-center overflow-hidden vcs-oblique-footer"
|
5
|
+
v-html="content"
|
6
|
+
/>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<style lang="scss" scoped>
|
10
|
+
.vcs-oblique-footer {
|
11
|
+
:deep(p) {
|
12
|
+
font-size: smaller;
|
13
|
+
margin: 0;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
import { computed, inject, onUnmounted, shallowRef } from 'vue';
|
20
|
+
import { ObliqueMap, ObliqueViewDirection } from '@vcmap/core';
|
21
|
+
import { renderTemplate } from '../components/form-output/markdownHelper.js';
|
22
|
+
|
23
|
+
const i18nViewDirection = {
|
24
|
+
[ObliqueViewDirection.NORTH]: 'footer.oblique.north',
|
25
|
+
[ObliqueViewDirection.EAST]: 'footer.oblique.east',
|
26
|
+
[ObliqueViewDirection.SOUTH]: 'footer.oblique.south',
|
27
|
+
[ObliqueViewDirection.WEST]: 'footer.oblique.west',
|
28
|
+
[ObliqueViewDirection.NADIR]: 'footer.oblique.nadir',
|
29
|
+
};
|
30
|
+
|
31
|
+
/**
|
32
|
+
* @description Renders image information according to configured markdown template
|
33
|
+
* @vue-computed {string} content - the derived rendered image information
|
34
|
+
*/
|
35
|
+
export default {
|
36
|
+
name: 'VcsObliqueFooter',
|
37
|
+
setup() {
|
38
|
+
const app = inject('vcsApp');
|
39
|
+
|
40
|
+
/**
|
41
|
+
* @returns {import("@vcmap/core").ObliqueImage|null}
|
42
|
+
*/
|
43
|
+
function getImage() {
|
44
|
+
const map = app.maps.activeMap;
|
45
|
+
if (map instanceof ObliqueMap) {
|
46
|
+
return map.currentImage;
|
47
|
+
}
|
48
|
+
return null;
|
49
|
+
}
|
50
|
+
|
51
|
+
/**
|
52
|
+
* @param {import("@vcmap/core").ObliqueImage?} image
|
53
|
+
* @returns {import("@vcmap/core").ObliqueImage & {viewDirection: string}|null}
|
54
|
+
*/
|
55
|
+
function getTranslatedImageInfo(image) {
|
56
|
+
if (image) {
|
57
|
+
return {
|
58
|
+
...image,
|
59
|
+
viewDirection: app.vueI18n.t(
|
60
|
+
i18nViewDirection[image.viewDirection],
|
61
|
+
),
|
62
|
+
};
|
63
|
+
}
|
64
|
+
return null;
|
65
|
+
}
|
66
|
+
|
67
|
+
const currentImage = shallowRef(getImage());
|
68
|
+
|
69
|
+
let imageChangedListener = () => {};
|
70
|
+
const mapChangedListener = app.maps.mapActivated.addEventListener(
|
71
|
+
(map) => {
|
72
|
+
imageChangedListener();
|
73
|
+
if (map instanceof ObliqueMap) {
|
74
|
+
currentImage.value = map.currentImage;
|
75
|
+
imageChangedListener = map.imageChanged.addEventListener(
|
76
|
+
(image) => {
|
77
|
+
currentImage.value = image;
|
78
|
+
},
|
79
|
+
);
|
80
|
+
} else if (currentImage.value) {
|
81
|
+
currentImage.value = null;
|
82
|
+
imageChangedListener = () => {};
|
83
|
+
}
|
84
|
+
},
|
85
|
+
);
|
86
|
+
|
87
|
+
onUnmounted(() => {
|
88
|
+
imageChangedListener();
|
89
|
+
mapChangedListener();
|
90
|
+
});
|
91
|
+
|
92
|
+
const content = computed(() => {
|
93
|
+
if (!app.uiConfig.config.hideObliqueFooter && currentImage.value) {
|
94
|
+
const template =
|
95
|
+
app.uiConfig.config.obliqueFooterTemplate ??
|
96
|
+
'footer.oblique.template';
|
97
|
+
return renderTemplate(
|
98
|
+
app.vueI18n.te(template) ? app.vueI18n.tm(template) : template,
|
99
|
+
getTranslatedImageInfo(currentImage.value),
|
100
|
+
);
|
101
|
+
}
|
102
|
+
return null;
|
103
|
+
});
|
104
|
+
|
105
|
+
return {
|
106
|
+
content,
|
107
|
+
};
|
108
|
+
},
|
109
|
+
};
|
110
|
+
</script>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
2
|
+
content: import("vue").ComputedRef<string | null>;
|
3
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
4
|
+
export default _default;
|
@@ -107,14 +107,14 @@ export function getAttributions(app) {
|
|
107
107
|
}
|
108
108
|
|
109
109
|
/**
|
110
|
-
* adds or removes a AttributionEntry
|
111
|
-
* @param {import("@vcmap/core").VcsMap|import("@vcmap/core").Layer
|
110
|
+
* adds or removes a AttributionEntry for layers or maps
|
111
|
+
* @param {import("@vcmap/core").VcsMap|import("@vcmap/core").Layer} object
|
112
112
|
*/
|
113
113
|
function syncAttributions(object) {
|
114
114
|
if (object?.properties?.attributions === undefined) {
|
115
115
|
return;
|
116
116
|
}
|
117
|
-
if (object.active
|
117
|
+
if (object.active) {
|
118
118
|
addAttributions(object);
|
119
119
|
} else {
|
120
120
|
removeAttributions(object);
|
@@ -138,9 +138,13 @@ export function getAttributions(app) {
|
|
138
138
|
}
|
139
139
|
});
|
140
140
|
if (map instanceof ObliqueMap) {
|
141
|
-
|
142
|
-
obliqueListener =
|
143
|
-
|
141
|
+
addAttributions(map.collection);
|
142
|
+
obliqueListener = map.collectionChanged.addEventListener(
|
143
|
+
(obliqueCollection) => {
|
144
|
+
[...app.obliqueCollections].forEach(removeAttributions);
|
145
|
+
addAttributions(obliqueCollection);
|
146
|
+
},
|
147
|
+
);
|
144
148
|
}
|
145
149
|
}
|
146
150
|
|
@@ -65,7 +65,7 @@
|
|
65
65
|
import { VBtn, VIcon, VTooltip } from 'vuetify/components';
|
66
66
|
import VcsBadge from '../notification/VcsBadge.vue';
|
67
67
|
import { useFontSize, useIconSize } from '../../vuePlugins/vuetify.js';
|
68
|
-
import {
|
68
|
+
import { getForwardSlots } from '../composables.js';
|
69
69
|
|
70
70
|
/**
|
71
71
|
* @description a button with tooltip extending {@link https://vuetifyjs.com/en/api/v-btn/|vuetify v-btn}.
|
@@ -124,7 +124,7 @@
|
|
124
124
|
return null;
|
125
125
|
}
|
126
126
|
});
|
127
|
-
const forwardSlots =
|
127
|
+
const forwardSlots = getForwardSlots(slots, ['default']);
|
128
128
|
const hasDefaultSlot = computed(() => {
|
129
129
|
return !!slots?.default;
|
130
130
|
});
|
@@ -28,7 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
28
|
default: string;
|
29
29
|
};
|
30
30
|
}, {
|
31
|
-
forwardSlots:
|
31
|
+
forwardSlots: string[];
|
32
32
|
hasDefaultSlot: import("vue").ComputedRef<boolean>;
|
33
33
|
appliedColor: import("vue").ComputedRef<string | null>;
|
34
34
|
iconSize: import("vue").ComputedRef<number>;
|
@@ -68,7 +68,7 @@
|
|
68
68
|
import { VBtn, VIcon, VTooltip } from 'vuetify/components';
|
69
69
|
import VcsBadge from '../notification/VcsBadge.vue';
|
70
70
|
import { useFontSize, useIconSize } from '../../vuePlugins/vuetify.js';
|
71
|
-
import {
|
71
|
+
import { getForwardSlots } from '../composables.js';
|
72
72
|
|
73
73
|
/**
|
74
74
|
* @description a button with tooltip extending {@link https://vuetifyjs.com/en/api/v-btn/|vuetify v-btn}.
|
@@ -121,7 +121,7 @@
|
|
121
121
|
const hasDefaultSlot = computed(() => {
|
122
122
|
return !!slots?.default;
|
123
123
|
});
|
124
|
-
const forwardSlots =
|
124
|
+
const forwardSlots = getForwardSlots(slots, ['default']);
|
125
125
|
const fontSize = useFontSize();
|
126
126
|
const iconSize = useIconSize();
|
127
127
|
const itemHeight = computed(() => {
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
21
21
|
default: string;
|
22
22
|
};
|
23
23
|
}, {
|
24
|
-
forwardSlots:
|
24
|
+
forwardSlots: string[];
|
25
25
|
buttonVariant: import("vue").ComputedRef<string>;
|
26
26
|
hasDefaultSlot: import("vue").ComputedRef<boolean>;
|
27
27
|
itemHeight: import("vue").ComputedRef<number>;
|
@@ -69,7 +69,7 @@
|
|
69
69
|
import { computed } from 'vue';
|
70
70
|
import { VBtn, VIcon, VTooltip } from 'vuetify/components';
|
71
71
|
import VcsBadge from '../notification/VcsBadge.vue';
|
72
|
-
import {
|
72
|
+
import { getForwardSlots } from '../composables.js';
|
73
73
|
import { useFontSize } from '../../vuePlugins/vuetify.js';
|
74
74
|
|
75
75
|
/**
|
@@ -140,7 +140,7 @@
|
|
140
140
|
const hasDefaultSlot = computed(() => {
|
141
141
|
return !!slots?.default;
|
142
142
|
});
|
143
|
-
const forwardSlots =
|
143
|
+
const forwardSlots = getForwardSlots(slots, ['default']);
|
144
144
|
const buttonVariant = computed(() => {
|
145
145
|
if (props.active && !props.disabled) {
|
146
146
|
return 'flat';
|
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
35
35
|
itemHeight: import("vue").ComputedRef<number>;
|
36
36
|
iconSize: import("vue").ComputedRef<number>;
|
37
37
|
appliedColor: import("vue").ComputedRef<string | null>;
|
38
|
-
forwardSlots:
|
38
|
+
forwardSlots: string[];
|
39
39
|
buttonVariant: import("vue").ComputedRef<"flat" | "text">;
|
40
40
|
hasDefaultSlot: import("vue").ComputedRef<boolean>;
|
41
41
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -9,9 +9,9 @@ export function usePadding(attrs: Object): import("vue").ComputedRef<boolean>;
|
|
9
9
|
* returns only the slotNames which are not excluded as a computed.
|
10
10
|
* @param {import("vue").Slots} slots
|
11
11
|
* @param {Array<string>} exclude
|
12
|
-
* @returns {
|
12
|
+
* @returns {Array<string>}
|
13
13
|
*/
|
14
|
-
export function
|
14
|
+
export function getForwardSlots(slots: import("vue").Slots, exclude?: Array<string>): Array<string>;
|
15
15
|
/**
|
16
16
|
* @param {import("vue").ComputedRef<HTMLElement|undefined>} parent
|
17
17
|
* @param {import("vue").ComputedRef<string|undefined>} tooltip
|
@@ -22,12 +22,10 @@ export function usePadding(attrs) {
|
|
22
22
|
* returns only the slotNames which are not excluded as a computed.
|
23
23
|
* @param {import("vue").Slots} slots
|
24
24
|
* @param {Array<string>} exclude
|
25
|
-
* @returns {
|
25
|
+
* @returns {Array<string>}
|
26
26
|
*/
|
27
|
-
export function
|
28
|
-
return
|
29
|
-
return Object.keys(slots).filter((slotName) => !exclude.includes(slotName));
|
30
|
-
});
|
27
|
+
export function getForwardSlots(slots, exclude = []) {
|
28
|
+
return Object.keys(slots).filter((slotName) => !exclude.includes(slotName));
|
31
29
|
}
|
32
30
|
|
33
31
|
let intersectionObserver = null;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<v-container class="py-0 px-1 vcs-flight-player">
|
3
|
-
<VcsLabel>{{ $t('flight.player') }}</VcsLabel>
|
3
|
+
<VcsLabel html-for="player">{{ $t('flight.player') }}</VcsLabel>
|
4
4
|
<VcsSlider
|
5
5
|
v-if="clock"
|
6
6
|
type="number"
|
@@ -94,30 +94,36 @@
|
|
94
94
|
);
|
95
95
|
|
96
96
|
let clockChangedListener = () => {};
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
);
|
97
|
+
let playerChangedListener = () => {};
|
98
|
+
|
99
|
+
function syncPlayer(player) {
|
100
|
+
if (player?.flightInstanceName === flightInstance.name) {
|
101
|
+
isCurrentPlayer.value = true;
|
102
|
+
flightInstancePlayer = player;
|
103
|
+
syncClocks(clock, player.clock);
|
104
|
+
clockChangedListener = player.clock.changed.addEventListener(
|
105
|
+
(changed) => {
|
106
|
+
syncClocks(clock, changed);
|
107
|
+
},
|
108
|
+
);
|
109
|
+
} else {
|
110
|
+
isCurrentPlayer.value = false;
|
111
|
+
flightInstancePlayer = undefined;
|
112
|
+
clock.value = getDefaultClock();
|
113
|
+
}
|
114
|
+
}
|
116
115
|
|
117
116
|
onMounted(async () => {
|
118
117
|
flightInstancePlayer =
|
119
118
|
await app.flights.setPlayerForFlight(flightInstance);
|
119
|
+
syncPlayer(flightInstancePlayer);
|
120
120
|
syncClocks(clock, flightInstancePlayer.clock);
|
121
|
+
playerChangedListener = app.flights.playerChanged.addEventListener(
|
122
|
+
(player) => {
|
123
|
+
clockChangedListener();
|
124
|
+
syncPlayer(player);
|
125
|
+
},
|
126
|
+
);
|
121
127
|
});
|
122
128
|
|
123
129
|
onUnmounted(() => {
|
@@ -11,8 +11,10 @@
|
|
11
11
|
}"
|
12
12
|
v-bind="$attrs"
|
13
13
|
>
|
14
|
-
<template #label="scope">
|
15
|
-
<
|
14
|
+
<template #label="scope" v-if="label || $slots.label">
|
15
|
+
<span class="pl-1">
|
16
|
+
<slot name="label" v-bind="scope ?? {}">{{ $st(label) }}</slot>
|
17
|
+
</span>
|
16
18
|
</template>
|
17
19
|
<template v-for="slot of forwardSlots" #[slot]="scope">
|
18
20
|
<slot :name="slot" v-bind="scope ?? {}" />
|
@@ -61,14 +63,14 @@
|
|
61
63
|
<script>
|
62
64
|
import { ref } from 'vue';
|
63
65
|
import { VCheckbox, VTooltip } from 'vuetify/components';
|
64
|
-
import {
|
66
|
+
import { getForwardSlots, usePadding } from '../composables.js';
|
65
67
|
|
66
68
|
/**
|
67
69
|
* @description Stylized wrapper around {@link https://vuetifyjs.com/en/api/v-checkbox/ |vuetify checkbox}.
|
68
70
|
* Provides VTooltip to show error messages
|
69
71
|
* @vue-prop {string} [tooltip] - A message to be displayed when there is no error.
|
70
72
|
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} [tooltipPosition='right'] - Position of the error tooltip, see {@link https://vuetifyjs.com/en/api/v-tooltip/#props-location | vuetify tooltip}.
|
71
|
-
* @vue-prop {string} label - Label to be displayed, will be translated.
|
73
|
+
* @vue-prop {string} [label] - Label to be displayed, will be translated.
|
72
74
|
* @vue-data {slot} [#label] - slot to pass html for Checkbox label. Overrides label passed as prop.
|
73
75
|
*/
|
74
76
|
export default {
|
@@ -87,12 +89,16 @@
|
|
87
89
|
type: String,
|
88
90
|
default: 'right',
|
89
91
|
},
|
92
|
+
label: {
|
93
|
+
type: String,
|
94
|
+
default: undefined,
|
95
|
+
},
|
90
96
|
},
|
91
97
|
setup(props, { attrs, slots }) {
|
92
98
|
const checkbox = ref();
|
93
99
|
const errorTooltip = ref();
|
94
100
|
const paddingProvided = usePadding(attrs);
|
95
|
-
const forwardSlots =
|
101
|
+
const forwardSlots = getForwardSlots(slots, ['label', 'message']);
|
96
102
|
return {
|
97
103
|
forwardSlots,
|
98
104
|
paddingProvided,
|
@@ -7,8 +7,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
7
7
|
type: StringConstructor;
|
8
8
|
default: string;
|
9
9
|
};
|
10
|
+
label: {
|
11
|
+
type: StringConstructor;
|
12
|
+
default: undefined;
|
13
|
+
};
|
10
14
|
}, {
|
11
|
-
forwardSlots:
|
15
|
+
forwardSlots: string[];
|
12
16
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
13
17
|
checkbox: import("vue").Ref<any>;
|
14
18
|
errorTooltip: import("vue").Ref<any>;
|
@@ -21,7 +25,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
21
25
|
type: StringConstructor;
|
22
26
|
default: string;
|
23
27
|
};
|
28
|
+
label: {
|
29
|
+
type: StringConstructor;
|
30
|
+
default: undefined;
|
31
|
+
};
|
24
32
|
}>>, {
|
33
|
+
label: string;
|
25
34
|
tooltip: string;
|
26
35
|
tooltipPosition: string;
|
27
36
|
}, {}>;
|
@@ -31,11 +31,10 @@
|
|
31
31
|
</template>
|
32
32
|
<style lang="scss" scoped></style>
|
33
33
|
<script>
|
34
|
-
import { computed, ref } from 'vue';
|
34
|
+
import { computed, ref, watch } from 'vue';
|
35
35
|
import { VMenu, VDatePicker, VBtn } from 'vuetify/components';
|
36
36
|
import { useI18n } from 'vue-i18n';
|
37
37
|
import VcsTextField from './VcsTextField.vue';
|
38
|
-
import { useProxiedAtomicModel } from '../modelHelper.js';
|
39
38
|
|
40
39
|
/**
|
41
40
|
* @description stylized wrapper around {@link https://vuetifyjs.com/en/components/date-pickers/#internationalization}.
|
@@ -63,8 +62,29 @@
|
|
63
62
|
emits: ['update:modelValue'],
|
64
63
|
setup(props, { emit }) {
|
65
64
|
const i18n = useI18n();
|
66
|
-
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
67
65
|
const menuOpen = ref(false);
|
66
|
+
const internal = ref(props.modelValue);
|
67
|
+
|
68
|
+
watch(
|
69
|
+
() => props.modelValue,
|
70
|
+
(newValue) => {
|
71
|
+
if (!menuOpen.value) {
|
72
|
+
internal.value = newValue;
|
73
|
+
}
|
74
|
+
},
|
75
|
+
);
|
76
|
+
|
77
|
+
const localValue = computed({
|
78
|
+
get() {
|
79
|
+
return internal.value;
|
80
|
+
},
|
81
|
+
set(newValue) {
|
82
|
+
if (internal.value?.getTime() !== newValue?.getTime()) {
|
83
|
+
internal.value = newValue;
|
84
|
+
emit('update:modelValue', newValue);
|
85
|
+
}
|
86
|
+
},
|
87
|
+
});
|
68
88
|
|
69
89
|
const formatDate = (date) => {
|
70
90
|
if (date) {
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
9
9
|
};
|
10
10
|
}, {
|
11
11
|
formattedDate: import("vue").WritableComputedRef<string>;
|
12
|
-
localValue: import("vue").
|
12
|
+
localValue: import("vue").WritableComputedRef<Date>;
|
13
13
|
menuOpen: import("vue").Ref<boolean>;
|
14
14
|
formatDate: (date: any) => string;
|
15
15
|
goToToday: () => void;
|
@@ -38,7 +38,7 @@
|
|
38
38
|
</template>
|
39
39
|
|
40
40
|
<style lang="scss" scoped>
|
41
|
-
@
|
41
|
+
@use './vcsTextField.scss';
|
42
42
|
|
43
43
|
// set text overflow for file input
|
44
44
|
:deep(.v-field__input) {
|
@@ -53,7 +53,7 @@
|
|
53
53
|
<script>
|
54
54
|
import { ref } from 'vue';
|
55
55
|
import { VFileInput, VTooltip } from 'vuetify/components';
|
56
|
-
import {
|
56
|
+
import { getForwardSlots, usePadding } from '../composables.js';
|
57
57
|
|
58
58
|
/**
|
59
59
|
* @description extends API of {@link https://vuetifyjs.com/en/api/v-file-input v-text-field}.
|
@@ -86,7 +86,7 @@
|
|
86
86
|
const errorTooltipRef = ref();
|
87
87
|
|
88
88
|
const paddingProvided = usePadding(attrs);
|
89
|
-
const forwardSlots =
|
89
|
+
const forwardSlots = getForwardSlots(slots, ['append-inner', 'message']);
|
90
90
|
|
91
91
|
return {
|
92
92
|
forwardSlots,
|
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
8
8
|
default: string;
|
9
9
|
};
|
10
10
|
}, {
|
11
|
-
forwardSlots:
|
11
|
+
forwardSlots: string[];
|
12
12
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
13
13
|
fileInputRef: import("vue").Ref<any>;
|
14
14
|
errorTooltipRef: import("vue").Ref<any>;
|
@@ -17,6 +17,9 @@
|
|
17
17
|
:text="$st(labelTooltip)"
|
18
18
|
></v-tooltip>
|
19
19
|
</span>
|
20
|
+
<vcs-help-tooltip :text="helpText" v-if="helpText || $slots.help">
|
21
|
+
<slot name="help" />
|
22
|
+
</vcs-help-tooltip>
|
20
23
|
</label>
|
21
24
|
</template>
|
22
25
|
|
@@ -38,7 +41,7 @@
|
|
38
41
|
height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
39
42
|
font-size: var(--v-vcs-font-size);
|
40
43
|
}
|
41
|
-
.vcs-label-required:after {
|
44
|
+
.vcs-label-required .ellipsis-text:after {
|
42
45
|
content: ' *';
|
43
46
|
color: rgb(var(--v-theme-error));
|
44
47
|
}
|
@@ -50,6 +53,7 @@
|
|
50
53
|
import { VTooltip } from 'vuetify/components';
|
51
54
|
import { computed, ref } from 'vue';
|
52
55
|
import { createEllipseTooltip, usePadding } from '../composables.js';
|
56
|
+
import VcsHelpTooltip from '../notification/VcsHelpTooltip.vue';
|
53
57
|
|
54
58
|
/**
|
55
59
|
* @description Stylized wrapper around {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label |label label}.
|
@@ -63,6 +67,7 @@
|
|
63
67
|
export default {
|
64
68
|
name: 'VcsLabel',
|
65
69
|
components: {
|
70
|
+
VcsHelpTooltip,
|
66
71
|
VTooltip,
|
67
72
|
},
|
68
73
|
props: {
|
@@ -86,6 +91,10 @@
|
|
86
91
|
type: String,
|
87
92
|
default: 'right',
|
88
93
|
},
|
94
|
+
helpText: {
|
95
|
+
type: String,
|
96
|
+
default: undefined,
|
97
|
+
},
|
89
98
|
},
|
90
99
|
setup(props, { attrs }) {
|
91
100
|
const paddingProvided = usePadding(attrs);
|
@@ -19,6 +19,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
type: StringConstructor;
|
20
20
|
default: string;
|
21
21
|
};
|
22
|
+
helpText: {
|
23
|
+
type: StringConstructor;
|
24
|
+
default: undefined;
|
25
|
+
};
|
22
26
|
}, {
|
23
27
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
24
28
|
labelTooltip: import("vue").ComputedRef<string>;
|
@@ -44,11 +48,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
48
|
type: StringConstructor;
|
45
49
|
default: string;
|
46
50
|
};
|
51
|
+
helpText: {
|
52
|
+
type: StringConstructor;
|
53
|
+
default: undefined;
|
54
|
+
};
|
47
55
|
}>>, {
|
48
56
|
disabled: boolean;
|
49
57
|
required: boolean;
|
50
58
|
tooltip: string;
|
51
59
|
tooltipPosition: string;
|
52
60
|
htmlFor: string;
|
61
|
+
helpText: string;
|
53
62
|
}, {}>;
|
54
63
|
export default _default;
|
@@ -57,6 +57,10 @@
|
|
57
57
|
:deep(.v-selection-control__input::before) {
|
58
58
|
background-color: transparent;
|
59
59
|
}
|
60
|
+
:deep(.v-icon--size-default) {
|
61
|
+
font-size: calc(var(--v-vcs-font-size) + 3px);
|
62
|
+
padding-right: 2px;
|
63
|
+
}
|
60
64
|
// remove details
|
61
65
|
:deep(.v-input__details) {
|
62
66
|
display: none;
|
@@ -141,7 +141,7 @@
|
|
141
141
|
<script>
|
142
142
|
import { VSelect, VTooltip, VListItem } from 'vuetify/components';
|
143
143
|
import { computed, ref } from 'vue';
|
144
|
-
import {
|
144
|
+
import { getForwardSlots, usePadding } from '../composables.js';
|
145
145
|
import VcsCheckbox from './VcsCheckbox.vue';
|
146
146
|
import { useProxiedComplexModel } from '../modelHelper.js';
|
147
147
|
|
@@ -213,7 +213,7 @@
|
|
213
213
|
return props.multiple;
|
214
214
|
});
|
215
215
|
const paddingProvided = usePadding(attrs);
|
216
|
-
const forwardSlots =
|
216
|
+
const forwardSlots = getForwardSlots(slots, ['append-inner', 'message']);
|
217
217
|
|
218
218
|
return {
|
219
219
|
forwardSlots,
|
@@ -4,7 +4,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
default: boolean;
|
5
5
|
};
|
6
6
|
modelValue: {
|
7
|
-
type: (BooleanConstructor |
|
7
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor | ArrayConstructor)[];
|
8
8
|
default(rawProps: any): never[] | null;
|
9
9
|
};
|
10
10
|
tooltip: {
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
20
20
|
default: undefined;
|
21
21
|
};
|
22
22
|
}, {
|
23
|
-
forwardSlots:
|
23
|
+
forwardSlots: string[];
|
24
24
|
localModelValue: import("vue").Ref<any>;
|
25
25
|
additionalItems: import("vue").ComputedRef<number>;
|
26
26
|
isMultiple: import("vue").ComputedRef<boolean>;
|
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
34
34
|
default: boolean;
|
35
35
|
};
|
36
36
|
modelValue: {
|
37
|
-
type: (BooleanConstructor |
|
37
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor | ArrayConstructor)[];
|
38
38
|
default(rawProps: any): never[] | null;
|
39
39
|
};
|
40
40
|
tooltip: {
|
@@ -76,7 +76,7 @@
|
|
76
76
|
<script>
|
77
77
|
import { computed, ref } from 'vue';
|
78
78
|
import { VSlider, VTooltip } from 'vuetify/components';
|
79
|
-
import {
|
79
|
+
import { getForwardSlots, usePadding } from '../composables.js';
|
80
80
|
import { useFontSize } from '../../vuePlugins/vuetify.js';
|
81
81
|
|
82
82
|
/**
|
@@ -112,7 +112,7 @@
|
|
112
112
|
return trackSize.value * 2;
|
113
113
|
});
|
114
114
|
const paddingProvided = usePadding(attrs);
|
115
|
-
const forwardSlots =
|
115
|
+
const forwardSlots = getForwardSlots(slots, ['append']);
|
116
116
|
const sliderRef = ref();
|
117
117
|
return {
|
118
118
|
hasAppendSlot: computed(() => {
|