@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
@@ -1,4 +1,4 @@
|
|
1
|
-
import { computed, nextTick, ref, watch } from 'vue';
|
1
|
+
import { computed, nextTick, onUnmounted, ref, watch } from 'vue';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* returns a computed which is true, if the provided attributes contain one or more
|
@@ -30,6 +30,35 @@ export function useForwardSlots(slots, exclude = []) {
|
|
30
30
|
});
|
31
31
|
}
|
32
32
|
|
33
|
+
let intersectionObserver = null;
|
34
|
+
/** @type {WeakMap<WeakKey<HTMLElement>, import("vue").ComputedRef<boolean>>} */
|
35
|
+
const observedTargets = new WeakMap();
|
36
|
+
|
37
|
+
/**
|
38
|
+
* if the visibility of the element changes, the computed ref will be set.
|
39
|
+
* @param {HTMLElement} elem
|
40
|
+
* @param {import("vue").ComputedRef<boolean>} visible
|
41
|
+
* @returns {() => void}}
|
42
|
+
*/
|
43
|
+
function registerTargetWithIntersectionObserver(elem, visible) {
|
44
|
+
if (!intersectionObserver) {
|
45
|
+
intersectionObserver = new IntersectionObserver((targets) => {
|
46
|
+
targets.forEach((target) => {
|
47
|
+
const visibilityRef = observedTargets.get(target.target);
|
48
|
+
if (visibilityRef) {
|
49
|
+
visibilityRef.value = target.isIntersecting;
|
50
|
+
}
|
51
|
+
});
|
52
|
+
});
|
53
|
+
}
|
54
|
+
intersectionObserver.observe(elem);
|
55
|
+
observedTargets.set(elem, visible);
|
56
|
+
return () => {
|
57
|
+
intersectionObserver.unobserve(elem);
|
58
|
+
observedTargets.delete(elem);
|
59
|
+
};
|
60
|
+
}
|
61
|
+
|
33
62
|
/**
|
34
63
|
* @param {import("vue").ComputedRef<HTMLElement|undefined>} parent
|
35
64
|
* @param {import("vue").ComputedRef<string|undefined>} tooltip
|
@@ -39,19 +68,49 @@ export function useForwardSlots(slots, exclude = []) {
|
|
39
68
|
export function createEllipseTooltip(parent, tooltip, title) {
|
40
69
|
const offsetWidth = ref(0);
|
41
70
|
const scrollWidth = ref(0);
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
if (
|
46
|
-
|
47
|
-
|
48
|
-
scrollWidth.value = elem.scrollWidth;
|
49
|
-
});
|
71
|
+
const visible = ref(false);
|
72
|
+
let observerListener = () => {};
|
73
|
+
watch(visible, () => {
|
74
|
+
if (visible.value && parent.value) {
|
75
|
+
offsetWidth.value = parent.value.offsetWidth;
|
76
|
+
scrollWidth.value = parent.value.scrollWidth;
|
50
77
|
} else {
|
51
78
|
offsetWidth.value = 0;
|
52
79
|
scrollWidth.value = 0;
|
53
80
|
}
|
54
81
|
});
|
82
|
+
watch(
|
83
|
+
parent,
|
84
|
+
() => {
|
85
|
+
observerListener();
|
86
|
+
visible.value = false;
|
87
|
+
const elem = parent.value;
|
88
|
+
if (elem) {
|
89
|
+
if (elem.checkVisibility()) {
|
90
|
+
visible.value = true;
|
91
|
+
} else {
|
92
|
+
observerListener = registerTargetWithIntersectionObserver(
|
93
|
+
elem,
|
94
|
+
visible,
|
95
|
+
);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
},
|
99
|
+
{ immediate: true },
|
100
|
+
);
|
101
|
+
|
102
|
+
watch(title, async () => {
|
103
|
+
if (visible.value) {
|
104
|
+
await nextTick(() => {
|
105
|
+
offsetWidth.value = parent.value.offsetWidth;
|
106
|
+
scrollWidth.value = parent.value.scrollWidth;
|
107
|
+
});
|
108
|
+
}
|
109
|
+
});
|
110
|
+
|
111
|
+
onUnmounted(() => {
|
112
|
+
observerListener();
|
113
|
+
});
|
55
114
|
|
56
115
|
return computed(() => {
|
57
116
|
if (tooltip.value) {
|
@@ -63,3 +122,14 @@ export function createEllipseTooltip(parent, tooltip, title) {
|
|
63
122
|
return '';
|
64
123
|
});
|
65
124
|
}
|
125
|
+
|
126
|
+
let componentIdCounter = 0;
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Returns a globally unique vcs component id string
|
130
|
+
* @returns {string}
|
131
|
+
*/
|
132
|
+
export function useComponentId() {
|
133
|
+
componentIdCounter += 1;
|
134
|
+
return `vcs-${componentIdCounter}`;
|
135
|
+
}
|
@@ -2,13 +2,13 @@
|
|
2
2
|
<v-container class="py-0 px-1">
|
3
3
|
<v-row no-gutters v-if="modelValue.projection">
|
4
4
|
<v-col :cols="firstCols">
|
5
|
-
<VcsLabel html-for="projection">
|
5
|
+
<VcsLabel :html-for="`${cid}-projection`">
|
6
6
|
{{ $t('components.extent.projection') }}
|
7
7
|
</VcsLabel>
|
8
8
|
</v-col>
|
9
9
|
<v-col>
|
10
10
|
<VcsTextField
|
11
|
-
id="projection"
|
11
|
+
:id="`${cid}-projection`"
|
12
12
|
disabled
|
13
13
|
:model-value="modelValue.projection.epsg"
|
14
14
|
/>
|
@@ -23,9 +23,9 @@
|
|
23
23
|
[(v) => checkInput(v, max[1])],
|
24
24
|
]"
|
25
25
|
>
|
26
|
-
<template #prepend
|
26
|
+
<template #prepend>
|
27
27
|
<v-col :cols="firstCols">
|
28
|
-
<VcsLabel
|
28
|
+
<VcsLabel>
|
29
29
|
{{ $t('components.extent.min') }}
|
30
30
|
</VcsLabel>
|
31
31
|
</v-col>
|
@@ -40,9 +40,9 @@
|
|
40
40
|
[(v) => checkInput(min[1], v)],
|
41
41
|
]"
|
42
42
|
>
|
43
|
-
<template #prepend
|
43
|
+
<template #prepend>
|
44
44
|
<v-col :cols="firstCols">
|
45
|
-
<VcsLabel
|
45
|
+
<VcsLabel>
|
46
46
|
{{ $t('components.extent.max') }}
|
47
47
|
</VcsLabel>
|
48
48
|
</v-col>
|
@@ -59,6 +59,7 @@
|
|
59
59
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
60
60
|
import VcsCoordinate from '../form-inputs-controls/VcsCoordinate.vue';
|
61
61
|
import { useProxiedComplexModel } from '../modelHelper.js';
|
62
|
+
import { useComponentId } from '../composables.js';
|
62
63
|
|
63
64
|
function checkInput(min, max) {
|
64
65
|
return min < max || 'components.extent.invalid';
|
@@ -114,10 +115,13 @@
|
|
114
115
|
},
|
115
116
|
});
|
116
117
|
|
118
|
+
const cid = useComponentId();
|
119
|
+
|
117
120
|
return {
|
118
121
|
min: getCoordinate(0, 2),
|
119
122
|
max: getCoordinate(2),
|
120
123
|
checkInput,
|
124
|
+
cid,
|
121
125
|
};
|
122
126
|
},
|
123
127
|
};
|
@@ -15,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
15
15
|
min: import("vue").WritableComputedRef<any>;
|
16
16
|
max: import("vue").WritableComputedRef<any>;
|
17
17
|
checkInput: typeof checkInput;
|
18
|
+
cid: string;
|
18
19
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
modelValue: {
|
20
21
|
type: ObjectConstructor;
|
@@ -18,23 +18,23 @@
|
|
18
18
|
<v-container class="py-0 px-1">
|
19
19
|
<v-row no-gutters v-if="!hideName">
|
20
20
|
<v-col cols="6">
|
21
|
-
<VcsLabel html-for="name" required>
|
21
|
+
<VcsLabel :html-for="`${cid}-name`" required>
|
22
22
|
{{ $t('components.flight.name') }}
|
23
23
|
</VcsLabel>
|
24
24
|
</v-col>
|
25
25
|
<v-col>
|
26
|
-
<VcsTextField id="name" clearable v-model="name" />
|
26
|
+
<VcsTextField :id="`${cid}-name`" clearable v-model="name" />
|
27
27
|
</v-col>
|
28
28
|
</v-row>
|
29
29
|
<v-row no-gutters v-if="!hideTitle">
|
30
30
|
<v-col cols="6">
|
31
|
-
<VcsLabel html-for="title">
|
31
|
+
<VcsLabel :html-for="`${cid}-title`">
|
32
32
|
{{ $t('components.flight.title') }}
|
33
33
|
</VcsLabel>
|
34
34
|
</v-col>
|
35
35
|
<v-col>
|
36
36
|
<VcsTextField
|
37
|
-
id="title"
|
37
|
+
:id="`${cid}-title`"
|
38
38
|
clearable
|
39
39
|
:placeholder="$t('components.flight.titlePlaceholder')"
|
40
40
|
v-model="title"
|
@@ -43,13 +43,13 @@
|
|
43
43
|
</v-row>
|
44
44
|
<v-row no-gutters v-if="!hideInterpolation">
|
45
45
|
<v-col cols="6">
|
46
|
-
<VcsLabel html-for="interpolation">
|
46
|
+
<VcsLabel :html-for="`${cid}-interpolation`">
|
47
47
|
{{ $t('components.flight.interpolation') }}
|
48
48
|
</VcsLabel>
|
49
49
|
</v-col>
|
50
50
|
<v-col>
|
51
51
|
<VcsSelect
|
52
|
-
id="
|
52
|
+
:id="`${cid}-interpolation`"
|
53
53
|
:items="[
|
54
54
|
{ value: 'spline', title: 'components.flight.spline' },
|
55
55
|
{ value: 'linear', title: 'components.flight.linear' },
|
@@ -60,13 +60,13 @@
|
|
60
60
|
</v-row>
|
61
61
|
<v-row no-gutters v-if="!hideDuration">
|
62
62
|
<v-col cols="6">
|
63
|
-
<VcsLabel html-for="duration">
|
63
|
+
<VcsLabel :html-for="`${cid}-duration`">
|
64
64
|
{{ $t('components.flight.duration') }}
|
65
65
|
</VcsLabel>
|
66
66
|
</v-col>
|
67
67
|
<v-col>
|
68
68
|
<VcsTextField
|
69
|
-
id="duration"
|
69
|
+
:id="`${cid}-duration`"
|
70
70
|
v-model="duration"
|
71
71
|
:hide-spin-buttons="true"
|
72
72
|
type="number"
|
@@ -79,11 +79,7 @@
|
|
79
79
|
</v-row>
|
80
80
|
<v-row no-gutters v-if="!hideLoop">
|
81
81
|
<v-col cols="6">
|
82
|
-
<VcsCheckbox
|
83
|
-
id="animate"
|
84
|
-
label="components.flight.loop"
|
85
|
-
v-model="loop"
|
86
|
-
/>
|
82
|
+
<VcsCheckbox label="components.flight.loop" v-model="loop" />
|
87
83
|
</v-col>
|
88
84
|
</v-row>
|
89
85
|
</v-container>
|
@@ -116,6 +112,7 @@
|
|
116
112
|
getProvidedFlightInstance,
|
117
113
|
setupFlightAnchorEditingListener,
|
118
114
|
} from './composables.js';
|
115
|
+
import { useComponentId } from '../composables.js';
|
119
116
|
|
120
117
|
/**
|
121
118
|
* @param {import("@vcmap/core").FlightInstance} instance
|
@@ -228,6 +225,8 @@
|
|
228
225
|
editingListener();
|
229
226
|
});
|
230
227
|
|
228
|
+
const cid = useComponentId();
|
229
|
+
|
231
230
|
return {
|
232
231
|
name: flightInstance.name,
|
233
232
|
title: computed({
|
@@ -275,6 +274,7 @@
|
|
275
274
|
},
|
276
275
|
}),
|
277
276
|
disablePlayer,
|
277
|
+
cid,
|
278
278
|
};
|
279
279
|
},
|
280
280
|
};
|
@@ -47,6 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
47
47
|
durationRule: typeof durationRule;
|
48
48
|
loop: import("vue").WritableComputedRef<boolean>;
|
49
49
|
disablePlayer: import("vue").Ref<boolean>;
|
50
|
+
cid: string;
|
50
51
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
51
52
|
heading: {
|
52
53
|
type: StringConstructor;
|
@@ -37,12 +37,17 @@
|
|
37
37
|
</v-checkbox>
|
38
38
|
</template>
|
39
39
|
<style lang="scss" scoped>
|
40
|
+
:deep(.v-icon--size-default) {
|
41
|
+
font-size: calc(var(--v-vcs-font-size) * (1.2 + 0.1 / 3));
|
42
|
+
}
|
40
43
|
.v-input--density-compact :deep(.v-selection-control) {
|
41
|
-
--v-selection-control-size:
|
42
|
-
|
44
|
+
--v-selection-control-size: calc(
|
45
|
+
var(--v-vcs-font-size) * (1.2 + 0.1 / 3) + 4
|
46
|
+
);
|
47
|
+
--v-input-control-height: calc(var(--v-vcs-font-size) + 3px);
|
43
48
|
}
|
44
49
|
:deep(.v-input__control) {
|
45
|
-
height: calc(var(--v-vcs-
|
50
|
+
height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
46
51
|
}
|
47
52
|
// remove ripple effect
|
48
53
|
:deep(.v-selection-control__input::before) {
|
@@ -23,24 +23,21 @@
|
|
23
23
|
<div v-for="({ key, value }, index) in localValue" :key="key">
|
24
24
|
<v-chip
|
25
25
|
v-if="selected !== index"
|
26
|
-
v-bind="{ ...noListenerAttrs }"
|
27
26
|
size="small"
|
28
27
|
:disabled="disabled"
|
29
28
|
:closable="deletableChips"
|
30
29
|
@click="select(index)"
|
31
30
|
@click:close="remove(index)"
|
31
|
+
v-bind="{ ...noListenerAttrs }"
|
32
32
|
>
|
33
33
|
<span class="text-truncate d-inline-block">{{ value }}</span>
|
34
34
|
</v-chip>
|
35
35
|
<VcsTextField
|
36
36
|
v-else
|
37
|
-
v-bind="{ ...noListenerAttrs }"
|
38
37
|
rounded
|
39
38
|
filled
|
40
39
|
autofocus
|
41
40
|
hide-spin-buttons
|
42
|
-
:height="useItemHeight().value - 8"
|
43
|
-
v-model="editValue"
|
44
41
|
@keydown.esc="selected = -1"
|
45
42
|
@blur="selected = -1"
|
46
43
|
@keydown.enter="submitChange($event)"
|
@@ -48,27 +45,26 @@
|
|
48
45
|
append-inner-icon="mdi-check"
|
49
46
|
:style="{ width: `${inputWidth}px` }"
|
50
47
|
class="py-0"
|
48
|
+
v-bind="{ ...noListenerAttrs }"
|
49
|
+
v-model="editValue"
|
51
50
|
/>
|
52
51
|
</div>
|
53
52
|
<div>
|
54
53
|
<v-chip
|
55
54
|
v-if="adding === false"
|
56
|
-
v-bind="{ ...noListenerAttrs }"
|
57
55
|
size="small"
|
58
56
|
:disabled="disabled"
|
59
57
|
@click="adding = true"
|
58
|
+
v-bind="{ ...noListenerAttrs }"
|
60
59
|
>
|
61
60
|
<v-icon>$vcsPlus</v-icon>
|
62
61
|
</v-chip>
|
63
62
|
<VcsTextField
|
64
63
|
v-else
|
65
|
-
v-bind="{ ...noListenerAttrs }"
|
66
64
|
rounded
|
67
65
|
filled
|
68
66
|
autofocus
|
69
67
|
hide-spin-buttons
|
70
|
-
:height="useItemHeight().value - 8"
|
71
|
-
v-model="newValue"
|
72
68
|
@keydown.enter="add($event, newValue)"
|
73
69
|
@click:append-inner="add($event, newValue)"
|
74
70
|
@keydown.esc="cancel"
|
@@ -76,6 +72,8 @@
|
|
76
72
|
append-inner-icon="mdi-check"
|
77
73
|
:style="{ width: `${inputWidth}px` }"
|
78
74
|
class="py-0"
|
75
|
+
v-bind="{ ...noListenerAttrs }"
|
76
|
+
v-model="newValue"
|
79
77
|
/>
|
80
78
|
</div>
|
81
79
|
</div>
|
@@ -96,10 +94,11 @@
|
|
96
94
|
display: none;
|
97
95
|
}
|
98
96
|
.v-chip.v-chip--size-small {
|
99
|
-
--v-chip-height: calc(var(--v-vcs-
|
97
|
+
--v-chip-height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
98
|
+
padding: 0 calc(var(--v-vcs-font-size) - 3px);
|
100
99
|
}
|
101
100
|
:deep(.v-icon--size-x-small) {
|
102
|
-
font-size:
|
101
|
+
font-size: calc(var(--v-vcs-font-size) + 3px);
|
103
102
|
}
|
104
103
|
.row-gap {
|
105
104
|
row-gap: 8px !important;
|
@@ -111,7 +110,6 @@
|
|
111
110
|
import { VChip, VIcon } from 'vuetify/components';
|
112
111
|
import { v4 as uuid } from 'uuid';
|
113
112
|
import { usePadding } from '../composables.js';
|
114
|
-
import { useItemHeight } from '../../vuePlugins/vuetify.js';
|
115
113
|
import VcsButton from '../buttons/VcsButton.vue';
|
116
114
|
import VcsTextField from './VcsTextField.vue';
|
117
115
|
import { removeListenersFromAttrs } from '../attrsHelpers.js';
|
@@ -166,8 +164,8 @@
|
|
166
164
|
setup(props, { attrs, emit }) {
|
167
165
|
const selected = ref(-1);
|
168
166
|
const adding = ref(false);
|
169
|
-
const editValue = ref(
|
170
|
-
const newValue = ref(
|
167
|
+
const editValue = ref(null);
|
168
|
+
const newValue = ref(null);
|
171
169
|
const vcsChipArrayInput = ref();
|
172
170
|
const hasScrollbar = ref();
|
173
171
|
|
@@ -247,7 +245,7 @@
|
|
247
245
|
}
|
248
246
|
|
249
247
|
function cancel() {
|
250
|
-
newValue.value =
|
248
|
+
newValue.value = null;
|
251
249
|
adding.value = false;
|
252
250
|
}
|
253
251
|
|
@@ -271,7 +269,7 @@
|
|
271
269
|
vcsChipArrayInput.value.scrollLeft =
|
272
270
|
vcsChipArrayInput.value.scrollWidth;
|
273
271
|
}
|
274
|
-
newValue.value =
|
272
|
+
newValue.value = null;
|
275
273
|
adding.value = true;
|
276
274
|
}
|
277
275
|
|
@@ -294,7 +292,6 @@
|
|
294
292
|
submitChange,
|
295
293
|
add,
|
296
294
|
cancel,
|
297
|
-
useItemHeight,
|
298
295
|
};
|
299
296
|
},
|
300
297
|
};
|
@@ -29,8 +29,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
29
29
|
noListenerAttrs: import("vue").ComputedRef<Record<string, unknown>>;
|
30
30
|
selected: import("vue").Ref<number>;
|
31
31
|
adding: import("vue").Ref<boolean>;
|
32
|
-
editValue: import("vue").Ref<
|
33
|
-
newValue: import("vue").Ref<
|
32
|
+
editValue: import("vue").Ref<null>;
|
33
|
+
newValue: import("vue").Ref<null>;
|
34
34
|
vcsChipArrayInput: import("vue").Ref<any>;
|
35
35
|
hasScrollbar: import("vue").Ref<any>;
|
36
36
|
remove: (index: any) => void;
|
@@ -38,7 +38,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
38
38
|
submitChange: (e: any) => void;
|
39
39
|
add: (e: any, v: any) => Promise<void>;
|
40
40
|
cancel: () => void;
|
41
|
-
useItemHeight: typeof useItemHeight;
|
42
41
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
43
42
|
modelValue: {
|
44
43
|
type: ArrayConstructor;
|
@@ -75,4 +74,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
75
74
|
scrollDx: number;
|
76
75
|
}, {}>;
|
77
76
|
export default _default;
|
78
|
-
import { useItemHeight } from '../../vuePlugins/vuetify.js';
|
@@ -9,20 +9,20 @@
|
|
9
9
|
>
|
10
10
|
<slot name="prepend" v-bind="{ ...$props }" />
|
11
11
|
<template v-for="(_, idx) in localValue">
|
12
|
-
<v-col :key="
|
12
|
+
<v-col :key="`coordinate-${idx}`" v-if="!hideZ || idx < 2">
|
13
13
|
<VcsTextField
|
14
|
-
:id="`${prefixes[idx]}-coordinate`"
|
15
14
|
:hide-spin-buttons="true"
|
16
15
|
type="number"
|
17
16
|
class="py-0"
|
18
17
|
:min="getRangeFromExtent(idx, extent)?.[0]"
|
19
18
|
:max="getRangeFromExtent(idx, extent)?.[1]"
|
20
19
|
:step="steps[idx]"
|
21
|
-
:prefix="prefixes[idx]"
|
22
20
|
:unit="units[idx]"
|
21
|
+
:prefix="prefixes[idx]"
|
22
|
+
force-prefix
|
23
23
|
:decimals="decimals[idx]"
|
24
24
|
v-bind="noListenerAttrs"
|
25
|
-
v-model="localValue[idx]"
|
25
|
+
v-model.number="localValue[idx]"
|
26
26
|
:rules="getRulesForAxis(idx)"
|
27
27
|
/>
|
28
28
|
</v-col>
|
@@ -9,8 +9,8 @@
|
|
9
9
|
>
|
10
10
|
<v-radio
|
11
11
|
v-for="(item, idx) in items"
|
12
|
-
:id="`${
|
13
|
-
:key="`${
|
12
|
+
:id="`${cid}-${idx}`"
|
13
|
+
:key="`${cid}-${idx}`"
|
14
14
|
:value="item[itemValue] ?? item"
|
15
15
|
:disabled="$attrs.disabled ?? item.disabled ?? false"
|
16
16
|
:color="item?.color ?? undefined"
|
@@ -23,7 +23,7 @@
|
|
23
23
|
>
|
24
24
|
<template #label>
|
25
25
|
<slot name="label" :item="item" :error="!!errorTooltip">
|
26
|
-
<span :html-for="`${
|
26
|
+
<span :html-for="`${cid}-${idx}`">
|
27
27
|
{{ $st(item.label ?? item) }}
|
28
28
|
</span>
|
29
29
|
</slot>
|
@@ -50,8 +50,8 @@
|
|
50
50
|
</template>
|
51
51
|
<style lang="scss" scoped>
|
52
52
|
.v-input--density-compact :deep(.v-selection-control) {
|
53
|
-
--v-selection-control-size: calc(var(--v-vcs-
|
54
|
-
--v-input-control-height: calc(var(--v-vcs-
|
53
|
+
--v-selection-control-size: calc(var(--v-vcs-font-size) * 2 - 2px);
|
54
|
+
--v-input-control-height: calc(var(--v-vcs-font-size) + 3px);
|
55
55
|
}
|
56
56
|
// remove ripple effect
|
57
57
|
:deep(.v-selection-control__input::before) {
|
@@ -73,7 +73,7 @@
|
|
73
73
|
<script>
|
74
74
|
import { ref } from 'vue';
|
75
75
|
import { VRadio, VRadioGroup, VTooltip } from 'vuetify/components';
|
76
|
-
import { usePadding } from '../composables.js';
|
76
|
+
import { useComponentId, usePadding } from '../composables.js';
|
77
77
|
|
78
78
|
/**
|
79
79
|
* @typedef {Object} VcsRadioItem
|
@@ -128,11 +128,13 @@
|
|
128
128
|
const radioGroup = ref();
|
129
129
|
const errorTooltip = ref();
|
130
130
|
const paddingProvided = usePadding(attrs);
|
131
|
+
const cid = useComponentId();
|
131
132
|
|
132
133
|
return {
|
133
134
|
paddingProvided,
|
134
135
|
radioGroup,
|
135
136
|
errorTooltip,
|
137
|
+
cid,
|
136
138
|
};
|
137
139
|
},
|
138
140
|
};
|
@@ -23,6 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
23
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
24
24
|
radioGroup: import("vue").Ref<any>;
|
25
25
|
errorTooltip: import("vue").Ref<any>;
|
26
|
+
cid: string;
|
26
27
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
27
28
|
items: {
|
28
29
|
type: ArrayConstructor;
|
@@ -73,7 +73,7 @@
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
.v-input--density-compact :deep(.v-field) {
|
76
|
-
--v-input-control-height: calc(var(--v-vcs-
|
76
|
+
--v-input-control-height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
77
77
|
--v-field-padding-bottom: 0px;
|
78
78
|
--v-field-input-padding-top: 0px;
|
79
79
|
--v-input-padding-top: 0px;
|
@@ -124,12 +124,9 @@
|
|
124
124
|
:deep(input::placeholder) {
|
125
125
|
color: rgb(var(--v-theme-primary));
|
126
126
|
opacity: 1;
|
127
|
-
|
127
|
+
font-style: italic !important;
|
128
128
|
padding: 0 3px 0 0;
|
129
129
|
}
|
130
|
-
:deep(input::-moz-placeholder) {
|
131
|
-
font-style: italic;
|
132
|
-
}
|
133
130
|
}
|
134
131
|
// remove details
|
135
132
|
:deep(.v-input__details) {
|
@@ -32,7 +32,7 @@
|
|
32
32
|
</template>
|
33
33
|
<style lang="scss" scoped>
|
34
34
|
.v-input--horizontal :deep(.v-input__control) {
|
35
|
-
min-height: calc(var(--v-vcs-
|
35
|
+
min-height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
36
36
|
}
|
37
37
|
.v-input--horizontal.v-slider--has-labels {
|
38
38
|
margin-bottom: var(--v-vcs-font-size);
|
@@ -77,7 +77,7 @@
|
|
77
77
|
import { computed, ref } from 'vue';
|
78
78
|
import { VSlider, VTooltip } from 'vuetify/components';
|
79
79
|
import { useForwardSlots, usePadding } from '../composables.js';
|
80
|
-
import {
|
80
|
+
import { useFontSize } from '../../vuePlugins/vuetify.js';
|
81
81
|
|
82
82
|
/**
|
83
83
|
* @description stylized wrapper around {@link https://vuetifyjs.com/en/components/sliders/#usage}.
|
@@ -100,14 +100,13 @@
|
|
100
100
|
default: 'right',
|
101
101
|
},
|
102
102
|
},
|
103
|
-
emits: ['update:modelValue'],
|
104
103
|
setup(props, { attrs, slots }) {
|
105
|
-
const
|
104
|
+
const fontSize = useFontSize();
|
106
105
|
const thumbSize = computed(() => {
|
107
|
-
return Math.floor(
|
106
|
+
return Math.floor((fontSize.value + 3) / 2);
|
108
107
|
});
|
109
108
|
const trackSize = computed(() => {
|
110
|
-
return Math.floor(
|
109
|
+
return Math.floor((fontSize.value + 3) / 6);
|
111
110
|
});
|
112
111
|
const tickSize = computed(() => {
|
113
112
|
return trackSize.value * 2;
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
15
15
|
tickSize: import("vue").ComputedRef<number>;
|
16
16
|
trackSize: import("vue").ComputedRef<number>;
|
17
17
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
18
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
18
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
19
19
|
tooltip: {
|
20
20
|
type: StringConstructor;
|
21
21
|
default: undefined;
|
@@ -24,9 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
24
|
type: StringConstructor;
|
25
25
|
default: string;
|
26
26
|
};
|
27
|
-
}
|
28
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
29
|
-
}, {
|
27
|
+
}>>, {
|
30
28
|
tooltip: string;
|
31
29
|
tooltipPosition: string;
|
32
30
|
}, {}>;
|
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<style lang="scss" scoped>
|
41
41
|
.v-input--density-compact :deep(.v-field) {
|
42
|
-
--v-input-control-height: calc(var(--v-vcs-
|
42
|
+
--v-input-control-height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
43
43
|
--v-field-padding-bottom: 0px;
|
44
44
|
--v-field-input-padding-top: 0px;
|
45
45
|
--v-input-padding-top: 0px;
|
@@ -121,13 +121,10 @@
|
|
121
121
|
.primary--placeholder {
|
122
122
|
:deep(textarea::placeholder) {
|
123
123
|
color: rgb(var(--v-theme-primary));
|
124
|
-
font-style: italic;
|
124
|
+
font-style: italic !important;
|
125
125
|
opacity: 1;
|
126
126
|
padding: 0 3px 0 0;
|
127
127
|
}
|
128
|
-
:deep(textarea::-moz-placeholder) {
|
129
|
-
font-style: initial;
|
130
|
-
}
|
131
128
|
}
|
132
129
|
|
133
130
|
// remove details
|