@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.
Files changed (235) hide show
  1. package/build/buildHelpers.js +60 -11
  2. package/build/buildTypes.js +9 -5
  3. package/build/bundle.js +1 -1
  4. package/build/info/publish.js +25 -31
  5. package/build/lintTypes.js +5 -0
  6. package/config/base.config.json +2 -7
  7. package/config/dev.config.json +11 -1
  8. package/config/projects.config.json +2 -1
  9. package/config/theming.config.json +68 -0
  10. package/config/www.config.json +27 -23
  11. package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
  12. package/dist/assets/{cesium-cb4dbfba.js → cesium-ccb4cc30.js} +272 -385
  13. package/dist/assets/cesium.js +1 -1
  14. package/dist/assets/{core-72f21835.js → core-e06aa7a6.js} +2313 -2321
  15. package/dist/assets/core.js +1 -1
  16. package/dist/assets/{ol-2d33bc8b.js → ol-e7981d5c.js} +233 -329
  17. package/dist/assets/ol.js +1 -1
  18. package/dist/assets/ui-5dda32d2.css +1 -0
  19. package/dist/assets/{ui-2ab43a16.js → ui-5dda32d2.js} +11344 -11078
  20. package/dist/assets/ui.js +1 -1
  21. package/dist/assets/vue-87bc6efe.js +6083 -0
  22. package/dist/assets/vue.js +1 -1
  23. package/dist/assets/{vuetify-760ced3b.css → vuetify-4c4e4217.css} +2 -2
  24. package/dist/assets/{vuetify-760ced3b.js → vuetify-4c4e4217.js} +8063 -8262
  25. package/dist/assets/vuetify.js +1 -1
  26. package/index.d.ts +27 -17
  27. package/index.js +16 -8
  28. package/package.json +17 -17
  29. package/plugins/@vcmap-show-case/custom-icons-example/README.md +3 -0
  30. package/plugins/@vcmap-show-case/custom-icons-example/assets/imageExample.png +0 -0
  31. package/plugins/@vcmap-show-case/custom-icons-example/assets/svgExample.svg +1 -0
  32. package/plugins/@vcmap-show-case/custom-icons-example/package.json +5 -0
  33. package/plugins/@vcmap-show-case/custom-icons-example/src/CustomIconsExample.vue +90 -0
  34. package/plugins/@vcmap-show-case/custom-icons-example/src/index.js +45 -0
  35. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +2 -3
  36. package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
  37. package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
  38. package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
  39. package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
  40. package/plugins/@vcmap-show-case/theming-example/README.md +3 -0
  41. package/plugins/@vcmap-show-case/theming-example/package.json +5 -0
  42. package/plugins/@vcmap-show-case/theming-example/src/ThemingExample.vue +116 -0
  43. package/plugins/@vcmap-show-case/theming-example/src/index.js +53 -0
  44. package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
  45. package/plugins/package.json +7 -23
  46. package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
  47. package/src/actions/StyleSelector.vue +1 -1
  48. package/src/actions/actionHelper.d.ts +4 -11
  49. package/src/actions/actionHelper.js +15 -7
  50. package/src/actions/listActions.d.ts +5 -5
  51. package/src/actions/listActions.js +2 -2
  52. package/src/application/VcsApp.vue +113 -50
  53. package/src/application/VcsApp.vue.d.ts +301 -4
  54. package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
  55. package/src/application/VcsContainer.vue +27 -10
  56. package/src/application/VcsContainer.vue.d.ts +241 -0
  57. package/src/application/VcsMainMap.vue +7 -7
  58. package/src/application/VcsMainMap.vue.d.ts +2 -2
  59. package/src/application/VcsNavbar.vue +14 -2
  60. package/src/application/VcsNavbar.vue.d.ts +1 -0
  61. package/src/application/VcsSplashScreen.vue +33 -26
  62. package/src/application/VcsTextPageFooter.vue +2 -1
  63. package/src/application/attributionsHelper.d.ts +20 -22
  64. package/src/application/attributionsHelper.js +4 -4
  65. package/src/callback/vcsCallback.d.ts +2 -2
  66. package/src/callback/vcsCallback.js +1 -1
  67. package/src/components/buttons/VcsActionButtonList.vue +61 -6
  68. package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
  69. package/src/components/buttons/VcsButton.vue +2 -4
  70. package/src/components/buttons/VcsButton.vue.d.ts +1 -1
  71. package/src/components/buttons/VcsFormButton.vue +4 -4
  72. package/src/components/buttons/VcsToolButton.vue +4 -2
  73. package/src/components/buttons/VcsToolButton.vue.d.ts +2 -2
  74. package/src/components/composables.d.ts +5 -0
  75. package/src/components/composables.js +79 -9
  76. package/src/components/extent/VcsExtent.vue +10 -6
  77. package/src/components/extent/VcsExtent.vue.d.ts +1 -0
  78. package/src/components/flight/VcsFlightComponent.vue +13 -13
  79. package/src/components/flight/VcsFlightComponent.vue.d.ts +1 -0
  80. package/src/components/form-inputs-controls/VcsCheckbox.vue +8 -3
  81. package/src/components/form-inputs-controls/VcsChipArrayInput.vue +13 -16
  82. package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +2 -4
  83. package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -4
  84. package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
  85. package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
  86. package/src/components/form-inputs-controls/VcsRadio.vue +8 -6
  87. package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
  88. package/src/components/form-inputs-controls/VcsSelect.vue +2 -5
  89. package/src/components/form-inputs-controls/VcsSlider.vue +5 -6
  90. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
  91. package/src/components/form-inputs-controls/VcsTextArea.vue +2 -5
  92. package/src/components/form-inputs-controls/VcsTextField.vue +24 -1
  93. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +11 -1
  94. package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
  95. package/src/components/form-inputs-controls/VcsWizardStep.vue +6 -5
  96. package/src/components/form-inputs-controls/vcsTextField.scss +8 -5
  97. package/src/components/form-output/VcsFormattedNumber.vue +7 -5
  98. package/src/components/form-output/VcsMarkdown.vue +15 -12
  99. package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
  100. package/src/components/form-output/markdownHelper.d.ts +30 -0
  101. package/src/components/form-output/markdownHelper.js +398 -0
  102. package/src/components/import/VcsFileDrop.vue +8 -5
  103. package/src/components/import/VcsImportComponent.vue +8 -4
  104. package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
  105. package/src/components/lists/VcsActionList.vue +6 -6
  106. package/src/components/lists/VcsList.vue +22 -37
  107. package/src/components/lists/VcsList.vue.d.ts +14 -55
  108. package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +37 -11
  109. package/src/components/lists/VcsListItemComponent.vue.d.ts +79 -0
  110. package/src/components/lists/VcsTreeview.vue +95 -26
  111. package/src/components/lists/VcsTreeview.vue.d.ts +16 -3
  112. package/src/components/lists/VcsTreeviewSearchbar.vue +16 -5
  113. package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +3 -1
  114. package/src/components/lists/VcsTreeviewTitle.vue +36 -0
  115. package/src/components/modelHelper.d.ts +10 -8
  116. package/src/components/modelHelper.js +8 -6
  117. package/src/components/notification/VcsHelp.vue +6 -7
  118. package/src/components/notification/VcsHelp.vue.d.ts +0 -8
  119. package/src/components/plugins/AbstractConfigEditor.vue +1 -22
  120. package/src/components/plugins/AbstractConfigEditor.vue.d.ts +6 -29
  121. package/src/components/section/VcsExpansionPanel.vue +9 -3
  122. package/src/components/section/VcsExpansionPanel.vue.d.ts +2 -2
  123. package/src/components/section/VcsFormSection.vue +13 -7
  124. package/src/components/section/VcsFormSection.vue.d.ts +2 -3
  125. package/src/components/style/VcsImageSelector.vue +14 -6
  126. package/src/components/style/VcsImageSelector.vue.d.ts +1 -0
  127. package/src/components/style/VcsStrokeSelector.vue +5 -2
  128. package/src/components/style/VcsStrokeSelector.vue.d.ts +1 -0
  129. package/src/components/style/VcsTextMenu.vue +3 -3
  130. package/src/components/style/VcsVectorStyleComponent.vue +1 -1
  131. package/src/components/tables/VcsDataTable.vue +42 -32
  132. package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
  133. package/src/components/tables/VcsTable.vue +45 -62
  134. package/src/components/tables/VcsTable.vue.d.ts +30 -17
  135. package/src/components/tables/VcsTableCell.vue +72 -0
  136. package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
  137. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
  138. package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
  139. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +42 -31
  140. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -0
  141. package/src/components/viewpoint/VcsViewpointComponent.vue +14 -11
  142. package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
  143. package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
  144. package/src/contentTree/LayerTree.vue +9 -27
  145. package/src/contentTree/LayerTree.vue.d.ts +1 -1
  146. package/src/contentTree/contentTreeCollection.d.ts +1 -0
  147. package/src/contentTree/contentTreeCollection.js +45 -11
  148. package/src/contentTree/contentTreeItem.d.ts +2 -2
  149. package/src/contentTree/contentTreeItem.js +1 -1
  150. package/src/featureInfo/BalloonComponent.vue +32 -25
  151. package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
  152. package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
  153. package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
  154. package/src/featureInfo/abstractFeatureInfoView.d.ts +10 -4
  155. package/src/featureInfo/abstractFeatureInfoView.js +19 -11
  156. package/src/featureInfo/featureInfo.d.ts +7 -7
  157. package/src/featureInfo/featureInfo.js +51 -31
  158. package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
  159. package/src/featureInfo/iframeFeatureInfoView.js +15 -5
  160. package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
  161. package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
  162. package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
  163. package/src/featureInfo/markdownFeatureInfoView.js +9 -11
  164. package/src/featureInfo/tableFeatureInfoView.js +13 -4
  165. package/src/i18n/i18nCollection.d.ts +9 -15
  166. package/src/i18n/i18nCollection.js +3 -3
  167. package/src/legend/VcsLegend.vue +6 -2
  168. package/src/legend/VcsLegend.vue.d.ts +1 -0
  169. package/src/manager/collectionManager/CollectionComponentList.vue +2 -2
  170. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
  171. package/src/manager/collectionManager/categoryManager.d.ts +1 -1
  172. package/src/manager/collectionManager/collectionComponentClass.d.ts +3 -3
  173. package/src/manager/collectionManager/collectionComponentClass.js +6 -6
  174. package/src/manager/collectionManager/collectionManager.d.ts +1 -1
  175. package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
  176. package/src/manager/panel/PanelComponent.vue +2 -9
  177. package/src/manager/panel/PanelManagerComponent.vue +7 -3
  178. package/src/manager/panel/panelHelper.js +3 -3
  179. package/src/manager/panel/panelManager.d.ts +9 -1
  180. package/src/manager/panel/panelManager.js +15 -3
  181. package/src/manager/toolbox/GroupToolboxComponent.vue +11 -5
  182. package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
  183. package/src/manager/toolbox/SelectToolboxComponent.vue +11 -6
  184. package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
  185. package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +13 -7
  186. package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -0
  187. package/src/manager/window/WindowComponent.vue +12 -8
  188. package/src/manager/window/WindowComponentHeader.vue +33 -9
  189. package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -0
  190. package/src/manager/window/WindowManager.vue +2 -2
  191. package/src/manager/window/windowManager.d.ts +6 -6
  192. package/src/manager/window/windowManager.js +3 -3
  193. package/src/navigation/MapNavigation.vue +20 -0
  194. package/src/navigation/OrientationToolsButton.vue +2 -4
  195. package/src/navigation/TiltSlider.vue +3 -5
  196. package/src/navigation/locatorHelper.js +1 -1
  197. package/src/navigation/overviewMap.js +1 -1
  198. package/src/notifier/NotifierComponent.vue +18 -15
  199. package/src/search/ResultItem.vue +18 -6
  200. package/src/search/ResultsComponent.vue +31 -20
  201. package/src/search/ResultsComponent.vue.d.ts +2 -1
  202. package/src/search/SearchComponent.vue +11 -15
  203. package/src/search/SearchComponent.vue.d.ts +1 -0
  204. package/src/siteConfig.js +8 -8
  205. package/src/styles/_typography.scss +0 -2
  206. package/src/styles/main.scss +0 -4
  207. package/src/styles/vcsList.scss +1 -1
  208. package/src/uiConfig.d.ts +311 -7
  209. package/src/uiConfig.js +30 -17
  210. package/src/vcsUiApp.d.ts +48 -63
  211. package/src/vcsUiApp.js +44 -37
  212. package/src/vuePlugins/vuetify.d.ts +88 -62
  213. package/src/vuePlugins/vuetify.js +119 -20
  214. package/dist/assets/ui-2ab43a16.css +0 -1
  215. package/dist/assets/vue-03b265aa.js +0 -6096
  216. package/plugins/@vcmap-show-case/theme-changer/README.md +0 -23
  217. package/plugins/@vcmap-show-case/theme-changer/config.json +0 -69
  218. package/plugins/@vcmap-show-case/theme-changer/package.json +0 -11
  219. package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +0 -120
  220. package/plugins/@vcmap-show-case/theme-changer/src/index.js +0 -108
  221. package/src/application/markdownHelper.d.ts +0 -12
  222. package/src/application/markdownHelper.js +0 -70
  223. package/src/components/lists/VcsListItem.vue.d.ts +0 -27
  224. package/src/components/lists/VcsTreeviewLeaf.vue +0 -83
  225. package/src/components/notification/VcsTooltip.vue +0 -156
  226. package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
  227. package/src/featureInfo/MarkdownComponent.vue +0 -16
  228. package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
  229. package/src/styles/_theming.scss +0 -73
  230. package/src/styles/settings.scss +0 -6
  231. package/src/styles/shades.scss +0 -4
  232. package/src/styles/variables.scss +0 -140
  233. package/src/styles/vcsFont.scss +0 -2
  234. package/src/styles/vcsGrid.scss +0 -3
  235. /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
- watch([parent, title], async () => {
44
- const elem = parent.value;
45
- if (elem) {
46
- await nextTick(() => {
47
- offsetWidth.value = elem.offsetWidth;
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="{ prefixes }">
26
+ <template #prepend>
27
27
  <v-col :cols="firstCols">
28
- <VcsLabel :html-for="`${prefixes[0]}-coordinate`">
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="{ prefixes }">
43
+ <template #prepend>
44
44
  <v-col :cols="firstCols">
45
- <VcsLabel :html-for="`${prefixes[0]}-coordinate`">
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="title"
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: 20px;
42
- --v-input-control-height: calc(var(--v-vcs-item-height) - 16px);
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-item-height) - 8px);
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-item-height) - 8px);
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: 18px;
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(undefined);
170
- const newValue = ref(undefined);
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 = undefined;
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 = undefined;
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<undefined>;
33
- newValue: import("vue").Ref<undefined>;
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="`${prefixes[idx]}-coordinate`" v-if="!hideZ || idx < 2">
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>
@@ -46,7 +46,7 @@
46
46
  overflow: hidden;
47
47
  text-overflow: ellipsis;
48
48
  white-space: nowrap;
49
- line-height: calc(var(--v-vcs-item-height) - 9px);
49
+ line-height: calc(var(--v-vcs-font-size) * 2 - 3px);
50
50
  }
51
51
  </style>
52
52
 
@@ -23,7 +23,7 @@
23
23
  box-sizing: content-box;
24
24
  display: flex;
25
25
  align-items: center;
26
- height: calc(var(--v-vcs-item-height) - 8px);
26
+ height: calc(var(--v-vcs-font-size) * 2 - 2px);
27
27
  font-size: var(--v-vcs-font-size);
28
28
  }
29
29
  .vcs-label-required:after {
@@ -9,8 +9,8 @@
9
9
  >
10
10
  <v-radio
11
11
  v-for="(item, idx) in items"
12
- :id="`${$.uid}-${idx}`"
13
- :key="`${$.uid}-${idx}`"
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="`${$.uid}-${idx}`">
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-item-height) - 8px);
54
- --v-input-control-height: calc(var(--v-vcs-item-height) - 16px);
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-item-height) - 8px);
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
- // line-height: unset !important;
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-item-height) - 8px);
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 { useItemHeight } from '../../vuePlugins/vuetify.js';
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 itemHeight = useItemHeight();
104
+ const fontSize = useFontSize();
106
105
  const thumbSize = computed(() => {
107
- return Math.floor(itemHeight.value / 4);
106
+ return Math.floor((fontSize.value + 3) / 2);
108
107
  });
109
108
  const trackSize = computed(() => {
110
- return Math.floor(itemHeight.value / 12);
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, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
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-item-height) - 8px);
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