@vcmap/ui 5.0.0-rc.21 → 5.0.0-rc.23

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 (153) hide show
  1. package/README.md +2 -2
  2. package/app.config.json +5 -0
  3. package/build/buildHelpers.js +1 -0
  4. package/build/buildPreview.js +2 -2
  5. package/build/commonViteConfig.js +1 -0
  6. package/config/aerowest.config.json +2 -0
  7. package/config/base.config.json +1 -0
  8. package/config/codes.config.json +2 -0
  9. package/config/dev.config.json +6 -0
  10. package/config/graphFeatureInfo.config.json +3 -1
  11. package/config/projects.config.json +27 -0
  12. package/config/www.config.json +27 -14
  13. package/dist/assets/cesium.js +1 -1
  14. package/dist/assets/{core.59d4d1.js → core.9342a1.js} +7912 -5474
  15. package/dist/assets/core.js +1 -1
  16. package/dist/assets/favicon.decf54cc.svg +10 -0
  17. package/dist/assets/index.fd041928.js +1 -0
  18. package/dist/assets/{ol.c1c512.js → ol.d2cba3.js} +12406 -12152
  19. package/dist/assets/ol.js +1 -1
  20. package/dist/assets/ui.c27597.css +5 -0
  21. package/dist/assets/{ui.80175f.js → ui.c27597.js} +6508 -5169
  22. package/dist/assets/ui.js +1 -1
  23. package/dist/assets/vue.js +2 -2
  24. package/dist/assets/vuetify.2f1432.css +5 -0
  25. package/dist/assets/{vuetify.efc158.js → vuetify.2f1432.js} +1 -1
  26. package/dist/assets/vuetify.js +2 -2
  27. package/dist/index.html +6 -1
  28. package/index.html +5 -0
  29. package/index.js +7 -3
  30. package/lib/olLib.js +15 -1
  31. package/package.json +5 -4
  32. package/plugins/@vcmap/project-selector/{ContextsListComponent.vue → ModulesListComponent.vue} +10 -10
  33. package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +16 -16
  34. package/plugins/@vcmap/project-selector/README.md +15 -21
  35. package/plugins/@vcmap/project-selector/config.json +3 -3
  36. package/plugins/@vcmap/project-selector/de.json +3 -0
  37. package/plugins/@vcmap/project-selector/en.json +3 -0
  38. package/plugins/@vcmap/project-selector/index.js +76 -101
  39. package/plugins/@vcmap/simple-graph/index.js +1 -1
  40. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +10 -4
  41. package/plugins/@vcmap-show-case/category-tester/Categories.vue +2 -2
  42. package/plugins/@vcmap-show-case/category-tester/Category.vue +1 -4
  43. package/plugins/@vcmap-show-case/config-editor/editor.vue +14 -14
  44. package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +92 -81
  45. package/plugins/@vcmap-show-case/form-inputs-example/index.js +8 -3
  46. package/plugins/@vcmap-show-case/form-inputs-example/validation.js +1 -1
  47. package/plugins/@vcmap-show-case/list-example/ListExample.vue +5 -2
  48. package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +202 -0
  49. package/plugins/@vcmap-show-case/table-example/README.md +3 -0
  50. package/plugins/@vcmap-show-case/table-example/index.js +47 -0
  51. package/plugins/@vcmap-show-case/table-example/package.json +5 -0
  52. package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +57 -23
  53. package/plugins/package.json +2 -1
  54. package/src/actions/actionHelper.js +16 -27
  55. package/src/actions/styleSelector.vue +26 -19
  56. package/src/application/VcsApp.vue +13 -5
  57. package/src/application/VcsAttributions.vue +2 -3
  58. package/src/application/VcsAttributionsFooter.vue +10 -16
  59. package/src/application/VcsNavbar.vue +1 -2
  60. package/src/application/VcsSettings.vue +21 -8
  61. package/src/assets/favicon-128.png +0 -0
  62. package/src/assets/favicon-180.png +0 -0
  63. package/src/assets/favicon-192.png +0 -0
  64. package/src/assets/favicon-32.png +0 -0
  65. package/src/assets/favicon.svg +10 -0
  66. package/src/components/buttons/VcsButton.vue +2 -3
  67. package/src/components/form-inputs-controls/VcsCheckbox.vue +46 -26
  68. package/src/components/form-inputs-controls/VcsDatePicker.vue +111 -0
  69. package/src/components/form-inputs-controls/VcsFormSection.vue +15 -13
  70. package/src/components/form-inputs-controls/VcsLabel.vue +10 -1
  71. package/src/components/form-inputs-controls/VcsRadio.vue +38 -18
  72. package/src/components/form-inputs-controls/VcsSelect.vue +117 -59
  73. package/src/components/form-inputs-controls/VcsTextArea.vue +101 -60
  74. package/src/components/form-inputs-controls/VcsTextField.vue +182 -69
  75. package/src/components/form-inputs-controls/VcsWizard.vue +23 -15
  76. package/src/components/form-inputs-controls/VcsWizardStep.vue +18 -16
  77. package/src/components/form-inputs-controls/composables.js +26 -0
  78. package/src/components/form-output/VcsFormattedNumber.vue +1 -1
  79. package/src/components/icons/2DDistanceIcon.vue +0 -3
  80. package/src/components/icons/3DDistanceIcon.vue +0 -3
  81. package/src/components/icons/3DHeightIcon.vue +0 -3
  82. package/src/components/icons/CheckboxCheckedIcon.vue +4 -11
  83. package/src/components/icons/CheckboxIcon.vue +9 -2
  84. package/src/components/icons/CheckboxIndeterminateIcon.vue +4 -21
  85. package/src/components/icons/CommentIcon.vue +1 -5
  86. package/src/components/icons/LegendIcon.vue +10 -60
  87. package/src/components/icons/ObliqueViewIcon.vue +6 -8
  88. package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -1
  89. package/src/components/icons/SplitViewIcon.vue +0 -4
  90. package/src/components/icons/ToolsIcon.vue +2 -4
  91. package/src/components/lists/VcsActionList.vue +0 -1
  92. package/src/components/lists/VcsList.vue +30 -30
  93. package/src/components/lists/VcsTreeview.vue +2 -2
  94. package/src/components/lists/VcsTreeviewLeaf.vue +3 -9
  95. package/src/components/lists/VcsTreeviewSearchbar.vue +4 -4
  96. package/src/components/notification/VcsBadge.vue +6 -2
  97. package/src/components/notification/VcsHelp.vue +39 -0
  98. package/src/components/tables/VcsDataTable.vue +386 -0
  99. package/src/components/tables/VcsTable.vue +55 -254
  100. package/src/contentTree/contentTreeCollection.js +1 -1
  101. package/src/contentTree/layerContentTreeItem.js +3 -0
  102. package/src/downloadHelper.js +49 -0
  103. package/src/featureInfo/AddressBalloonComponent.vue +1 -1
  104. package/src/featureInfo/BalloonComponent.vue +21 -15
  105. package/src/featureInfo/abstractFeatureInfoView.js +1 -1
  106. package/src/featureInfo/featureInfo.js +27 -9
  107. package/src/featureInfo/tableFeatureInfoView.js +4 -0
  108. package/src/i18n/de.js +13 -1
  109. package/src/i18n/en.js +13 -1
  110. package/src/i18n/i18nCollection.js +22 -22
  111. package/src/init.js +90 -7
  112. package/src/legend/styleLegendItem.vue +24 -2
  113. package/src/legend/vcsLegend.vue +24 -31
  114. package/src/manager/categoryManager/CategoryComponent.vue +56 -47
  115. package/src/manager/categoryManager/CategoryManager.vue +23 -10
  116. package/src/manager/categoryManager/categoryManager.js +11 -11
  117. package/src/manager/navbarManager.js +18 -0
  118. package/src/manager/toolbox/GroupToolboxComponent.vue +2 -3
  119. package/src/manager/toolbox/SelectToolboxComponent.vue +11 -5
  120. package/src/manager/toolbox/ToolboxManager.vue +0 -7
  121. package/src/manager/window/WindowComponent.vue +10 -16
  122. package/src/manager/window/WindowComponentHeader.vue +6 -4
  123. package/src/manager/window/WindowManager.vue +14 -15
  124. package/src/manager/window/windowHelper.js +1 -1
  125. package/src/manager/window/windowManager.js +18 -7
  126. package/src/navigation/mapNavCompass.vue +1 -1
  127. package/src/navigation/mapNavigation.vue +6 -6
  128. package/src/navigation/obliqueRotation.vue +36 -13
  129. package/src/navigation/orientationToolsButton.vue +0 -1
  130. package/src/navigation/overviewMap.js +11 -20
  131. package/src/navigation/tiltSlider.vue +30 -6
  132. package/src/navigation/vcsZoomButton.vue +37 -11
  133. package/src/pluginHelper.js +20 -0
  134. package/src/search/resultsComponent.vue +0 -1
  135. package/src/search/search.js +19 -20
  136. package/src/search/searchComponent.vue +21 -7
  137. package/src/state.js +6 -6
  138. package/src/styles/_theming.scss +72 -3
  139. package/src/styles/_typography.scss +0 -5
  140. package/src/styles/main.scss +1 -0
  141. package/src/styles/shades.scss +2 -0
  142. package/src/styles/variables.scss +40 -4
  143. package/src/uiConfig.js +4 -3
  144. package/src/vcsUiApp.js +49 -40
  145. package/src/vuePlugins/i18n.js +1 -0
  146. package/src/vuePlugins/vuetify.js +59 -13
  147. package/start.js +8 -2
  148. package/dist/assets/index.a3861d4e.js +0 -1
  149. package/dist/assets/ui.80175f.css +0 -1
  150. package/dist/assets/vuetify.efc158.css +0 -5
  151. package/map.config.json +0 -44
  152. /package/dist/assets/{cesium.49585c.js → cesium.166f91.js} +0 -0
  153. /package/dist/assets/{vue.a08ab1.js → vue.5d00e9.js} +0 -0
@@ -20,7 +20,7 @@ import VectorSource from 'ol/source/Vector.js';
20
20
  import { Icon } from 'ol/style.js';
21
21
  import { WindowSlot } from '../manager/window/windowManager.js';
22
22
  import OverviewMapClickedInteraction from './overviewMapClickedInteraction.js';
23
- import { defaultPrimaryColor } from '../vuePlugins/vuetify.js';
23
+ import { getDefaultPrimaryColor, getColorByKey } from '../vuePlugins/vuetify.js';
24
24
  import { vcsAppSymbol } from '../pluginHelper.js';
25
25
  import VcsMap from '../application/VcsMap.vue';
26
26
 
@@ -52,8 +52,7 @@ export function getWindowComponentOptions() {
52
52
  */
53
53
  function getCameraIcon(color) {
54
54
  return {
55
- src: `data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E%3Csvg id='cam' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 81.06 49.47'%3E%3Cdefs%3E%3ClinearGradient id='1' x1='40.53' y1='48.97' x2='40.53' y2='.25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='${encodeURIComponent(color)}'/%3E%3Cstop offset='.46' stop-color='${encodeURIComponent(color)}' stop-opacity='.60'/%3E%3Cstop offset='.65' stop-color='${encodeURIComponent(color)}' stop-opacity='.40'/%3E%3Cstop offset='.83' stop-color='${encodeURIComponent(color)}' stop-opacity='.20'/%3E%3Cstop offset='.89' stop-color='${encodeURIComponent(color)}' stop-opacity='.15'/%3E%3Cstop offset='1' stop-color='transparent' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='2' x1='40.53' y1='49.37' x2='40.53' y2='0' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='.24' stop-color='${encodeURIComponent(color)}'/%3E%3Cstop offset='.38' stop-color='${encodeURIComponent(color)}' stop-opacity='.93'/%3E%3Cstop offset='.57' stop-color='${encodeURIComponent(color)}' stop-opacity='.70'/%3E%3Cstop offset='.78' stop-color='${encodeURIComponent(color)}' stop-opacity='.38'/%3E%3Cstop offset='1' stop-color='transparent' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='40.53 48.97 80.53 .25 .53 .25 40.53 48.97' fill='url(%231)' stroke='url(%232)' stroke-miterlimit='10' stroke-width='.5px'/%3E%3Ccircle cx='40.53' cy='42.97' r='6' fill='${encodeURIComponent(color)}' stroke='%23fff' stroke-miterlimit='10'/%3E%3C/svg%3E`,
56
- scale: 0.5,
55
+ src: `data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22121.58616%22%20height%3D%2274.204994%22%20viewBox%3D%220%200%2032.169671%2019.633405%22%20version%3D%221.1%22%20id%3D%22svg216%22%3E%3Cdefs%20id%3D%22defs213%22%3E%3ClinearGradient%20id%3D%221-0%22%20x1%3D%2240.529999%22%20y1%3D%2248.970001%22%20x2%3D%2240.529999%22%20y2%3D%220.25%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20id%3D%22stop399%22%2F%3E%3Cstop%20offset%3D%22.46%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.60%22%20id%3D%22stop401%22%2F%3E%3Cstop%20offset%3D%22.65%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.40%22%20id%3D%22stop403%22%2F%3E%3Cstop%20offset%3D%22.83%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.20%22%20id%3D%22stop405%22%2F%3E%3Cstop%20offset%3D%22.89%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.15%22%20id%3D%22stop407%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22transparent%22%20stop-opacity%3D%220%22%20id%3D%22stop409%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%222-9%22%20x1%3D%2240.529999%22%20y1%3D%2249.369999%22%20x2%3D%2240.529999%22%20y2%3D%220%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%22.24%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20id%3D%22stop412%22%2F%3E%3Cstop%20offset%3D%22.38%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.93%22%20id%3D%22stop414%22%2F%3E%3Cstop%20offset%3D%22.57%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.70%22%20id%3D%22stop416%22%2F%3E%3Cstop%20offset%3D%22.78%22%20stop-color%3D%22${encodeURIComponent(color)}%22%20stop-opacity%3D%22.38%22%20id%3D%22stop418%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22transparent%22%20stop-opacity%3D%220%22%20id%3D%22stop420%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20id%3D%22layer1%22%20transform%3D%22translate(5.3616118%2C3.2722342)%22%3E%3Cpolygon%20points%3D%220.53%2C0.25%2040.53%2C48.97%2080.53%2C0.25%20%22%20fill%3D%22url(%231)%22%20stroke%3D%22url(%232)%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%220.5px%22%20id%3D%22polygon425%22%20style%3D%22fill%3Aurl(%231-0)%3Bstroke%3Aurl(%232-9)%22%20transform%3D%22matrix(0.396875%2C0%2C0%2C0.396875%2C-5.3621201%2C-3.2722342)%22%2F%3E%3Ccircle%20cx%3D%2210.723224%22%20cy%3D%2213.781484%22%20r%3D%222.3812499%22%20fill%3D%22${encodeURIComponent(color)}%22%20stroke%3D%22%23ffffff%22%20stroke-miterlimit%3D%2210%22%20id%3D%22circle427%22%20style%3D%22stroke-width%3A0.396874%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E`,
57
56
  color,
58
57
  };
59
58
  }
@@ -112,7 +111,7 @@ class OverviewMap {
112
111
  */
113
112
  this._obliqueSelectedImageLayer = null;
114
113
 
115
- const primary = app.uiConfig.config.value.primaryColor ?? defaultPrimaryColor;
114
+ const primary = app.uiConfig.config.value.primaryColor ?? getDefaultPrimaryColor();
116
115
  const fillColor = Color.fromCssColorString('#EDEDED');
117
116
 
118
117
  /**
@@ -165,7 +164,7 @@ class OverviewMap {
165
164
  * @type {import("@vcmap/core").VectorStyleItem}
166
165
  */
167
166
  this.cameraIconStyle = new VectorStyleItem({
168
- image: getCameraIcon(defaultPrimaryColor),
167
+ image: getCameraIcon(getDefaultPrimaryColor()),
169
168
  });
170
169
 
171
170
  /**
@@ -229,16 +228,7 @@ class OverviewMap {
229
228
  this._map.layerCollection.remove(clone);
230
229
  }
231
230
  }),
232
- this._app.uiConfig.added.addEventListener((item) => {
233
- if (item?.name === 'primaryColor') {
234
- this._updatePrimaryColor(item.value);
235
- }
236
- }),
237
- this._app.uiConfig.removed.addEventListener((item) => {
238
- if (item?.name === 'primaryColor') {
239
- this._updatePrimaryColor(defaultPrimaryColor);
240
- }
241
- }),
231
+ this._app.themeChanged.addEventListener(this._updatePrimaryColor.bind(this)),
242
232
  ];
243
233
  }
244
234
 
@@ -275,10 +265,10 @@ class OverviewMap {
275
265
  }
276
266
 
277
267
  /**
278
- * @param {string} color
279
268
  * @private
280
269
  */
281
- _updatePrimaryColor(color) {
270
+ _updatePrimaryColor() {
271
+ const color = getColorByKey('primary');
282
272
  this.obliqueUnselectedStyle?.stroke?.setColor(color);
283
273
  this.obliqueSelectedStyle?.stroke?.setColor(color);
284
274
  this._obliqueTileLayer?.forceRedraw?.();
@@ -313,7 +303,7 @@ class OverviewMap {
313
303
  this._setupMapInteraction();
314
304
  }
315
305
  await this._map.activate();
316
- this.map.setTarget('overview-map-container');
306
+ this._map.setTarget('overview-map-container');
317
307
  this._map.target?.firstChild?.classList?.add('overviewMapElement');
318
308
  if (!this._active) {
319
309
  this._mapActivatedListener = this._app.maps.mapActivated.addEventListener(() => {
@@ -549,8 +539,9 @@ class OverviewMap {
549
539
  return;
550
540
  }
551
541
  let cameraFeature = this._cameraIconLayer.getFeatureById('cameraFeature');
542
+ const coords = Projection.wgs84ToMercator(position);
552
543
  if (!cameraFeature) {
553
- const cameraGeometry = new Point([position[0], position[1]]);
544
+ const cameraGeometry = new Point(coords);
554
545
  cameraFeature = new Feature({
555
546
  geometry: cameraGeometry,
556
547
  });
@@ -558,7 +549,7 @@ class OverviewMap {
558
549
  cameraFeature.setStyle(this.cameraIconStyle.style);
559
550
  this._cameraIconLayer.addFeatures([cameraFeature]);
560
551
  }
561
- cameraFeature.getGeometry().setCoordinates(Projection.wgs84ToMercator(position));
552
+ cameraFeature.getGeometry().setCoordinates(coords);
562
553
 
563
554
  const rotationDegrees = viewpoint.heading;
564
555
  const rotationRadians = CesiumMath.toRadians(rotationDegrees);
@@ -10,8 +10,7 @@
10
10
  v-bind="attrs"
11
11
  >
12
12
  <v-slider
13
- color="secondary"
14
- track-color="accent"
13
+ track-color="base lighten-3"
15
14
  v-model="tilt"
16
15
  :max="0"
17
16
  :min="-90"
@@ -24,6 +23,7 @@
24
23
  </VcsTooltip>
25
24
  </template>
26
25
  <style lang="scss" scoped>
26
+ @import '../styles/shades.scss';
27
27
  .vcs-slider{
28
28
  ::v-deep {
29
29
  .v-slider {
@@ -44,6 +44,34 @@
44
44
  }
45
45
  }
46
46
  }
47
+ .v-application .theme--light.vcs-slider {
48
+ ::v-deep {
49
+ .v-slider {
50
+ .v-slider__track-container{
51
+ .v-slider__track-fill {
52
+ background-color: map-get($shades, 'black') !important;
53
+ }
54
+ }
55
+ .v-slider__thumb {
56
+ background-color: map-get($shades, 'black') !important;
57
+ }
58
+ }
59
+ }
60
+ }
61
+ .v-application .theme--dark.vcs-slider {
62
+ ::v-deep {
63
+ .v-slider {
64
+ .v-slider__track-container{
65
+ .v-slider__track-fill {
66
+ background-color: map-get($shades, 'white') !important;
67
+ }
68
+ }
69
+ .v-slider__thumb {
70
+ background-color: map-get($shades, 'white') !important;
71
+ }
72
+ }
73
+ }
74
+ }
47
75
  </style>
48
76
  <script>
49
77
  import { clamp } from 'ol/math.js';
@@ -93,7 +121,3 @@
93
121
  },
94
122
  };
95
123
  </script>
96
-
97
- <style scoped>
98
-
99
- </style>
@@ -1,15 +1,19 @@
1
1
  <template>
2
- <div>
3
- <OrientationToolsButton
4
- @click="$emit('zoom-in')"
5
- icon="$vcsPlus"
6
- tooltip="navigation.zoomInTooltip"
7
- />
8
- <OrientationToolsButton
9
- @click="$emit('zoom-out')"
10
- icon="$vcsMinus"
11
- tooltip="navigation.zoomOutTooltip"
12
- />
2
+ <div class="rounded vcs-navigation-zoom">
3
+ <div class="rounded inner">
4
+ <OrientationToolsButton
5
+ @click="$emit('zoom-in')"
6
+ icon="$vcsPlus"
7
+ tooltip="navigation.zoomInTooltip"
8
+ elevation="0"
9
+ />
10
+ <OrientationToolsButton
11
+ @click="$emit('zoom-out')"
12
+ icon="$vcsMinus"
13
+ tooltip="navigation.zoomOutTooltip"
14
+ elevation="0"
15
+ />
16
+ </div>
13
17
  </div>
14
18
  </template>
15
19
 
@@ -25,3 +29,25 @@
25
29
  components: { OrientationToolsButton },
26
30
  };
27
31
  </script>
32
+ <style lang="scss" scoped>
33
+ .vcs-navigation-zoom {
34
+ box-shadow: rgba(0, 0, 0, 0.1) 0 2px 2px 0;
35
+ .inner{
36
+ box-shadow: rgba(0, 0, 0, 0.25) 0 0 10px 0 inset;
37
+ }
38
+ ::v-deep {
39
+ .btn-orientation-tools{
40
+ &:first-child{
41
+ box-shadow: rgba(0, 0, 0, 0.25) -2px 2px 1px -2px,
42
+ rgba(0, 0, 0, 0.08) 1px 0 0 0,
43
+ rgba(0, 0, 0, 0.05) -1px 1px 1px 1px !important;
44
+ }
45
+ &:last-child{
46
+ box-shadow: rgba(0, 0, 0, 0.25) -2px 3px 1px -2px,
47
+ rgba(0, 0, 0, 0.08) 1px 4px 2px 0,
48
+ rgba(0, 0, 0, 0.05) -1px 1px 1px 1px !important;
49
+ }
50
+ }
51
+ }
52
+ }
53
+ </style>
@@ -115,12 +115,32 @@ export async function loadPlugin(name, config) {
115
115
  return null;
116
116
  }
117
117
 
118
+ /**
119
+ * @param {string} base
120
+ * @param {string} pluginBase
121
+ * @returns {string}
122
+ */
123
+ export function getPluginEntry(base, pluginBase) {
124
+ const baseUrl = new URL(base);
125
+ const pluginBaseUrl = new URL(pluginBase);
126
+ if (baseUrl.origin !== pluginBaseUrl.origin) {
127
+ return pluginBase;
128
+ }
129
+ const baseSubs = baseUrl.pathname.split('/');
130
+ const pluginSubs = pluginBaseUrl.pathname.split('/');
131
+ return pluginSubs
132
+ .filter((sub, idx) => sub !== baseSubs[idx])
133
+ .join('/');
134
+ }
135
+
118
136
  /**
119
137
  * @param {VcsPlugin} plugin
120
138
  * @returns {Object}
121
139
  */
122
140
  export function serializePlugin(plugin) {
123
141
  const serializedPlugin = plugin.toJSON ? plugin.toJSON() : {};
142
+ serializedPlugin.name = plugin.name;
143
+ serializedPlugin.entry = getPluginEntry(window.location.href, plugin[pluginBaseUrlSymbol]);
124
144
  serializedPlugin[pluginFactorySymbol] = plugin[pluginFactorySymbol];
125
145
  serializedPlugin[pluginBaseUrlSymbol] = plugin[pluginBaseUrlSymbol];
126
146
  return serializedPlugin;
@@ -6,7 +6,6 @@
6
6
  <v-list-item
7
7
  v-for="(item, index) in results"
8
8
  :key="index"
9
- color="secondary"
10
9
  class="px-0"
11
10
  >
12
11
  <v-list-item-content>
@@ -13,7 +13,7 @@ import { check } from '@vcsuite/check';
13
13
  import { Icon } from 'ol/style.js';
14
14
  import { getLogger } from '@vcsuite/logger';
15
15
  import { vcsAppSymbol } from '../pluginHelper.js';
16
- import { defaultPrimaryColor } from '../vuePlugins/vuetify.js';
16
+ import { getDefaultPrimaryColor, getColorByKey } from '../vuePlugins/vuetify.js';
17
17
  import { getViewpointFromFeature } from '../actions/actionHelper.js';
18
18
 
19
19
  /**
@@ -70,39 +70,29 @@ function setupSearchResultLayer(app) {
70
70
  app.layers.add(resultLayer);
71
71
 
72
72
  const style = new VectorStyleItem({
73
- image: getPointResultIcon(defaultPrimaryColor),
73
+ image: getPointResultIcon(getDefaultPrimaryColor()),
74
74
  fill: {
75
75
  color: 'rgba(237, 237, 237, 0.1)',
76
76
  },
77
77
  stroke: {
78
- color: defaultPrimaryColor,
78
+ color: getDefaultPrimaryColor(),
79
79
  width: 5,
80
80
  },
81
81
  });
82
82
  resultLayer.setStyle(style);
83
83
 
84
- function setResultColor(color) {
84
+ function setResultColor() {
85
+ const color = getColorByKey('primary');
85
86
  style.stroke?.setColor(color);
86
87
  style.image = new Icon(getPointResultIcon(color));
87
88
  resultLayer.forceRedraw();
88
89
  }
89
90
 
90
- const listeners = [
91
- app.uiConfig.added.addEventListener((item) => {
92
- if (item.name === 'primaryColor') {
93
- setResultColor(item.value);
94
- }
95
- }),
96
- app.uiConfig.removed.addEventListener((item) => {
97
- if (item.name === 'primaryColor') {
98
- setResultColor(defaultPrimaryColor);
99
- }
100
- }),
101
- ];
91
+ const themChangedListener = app.themeChanged.addEventListener(setResultColor);
102
92
 
103
93
  const destroy = () => {
104
94
  resultLayer.destroy();
105
- listeners.forEach(cb => cb());
95
+ themChangedListener();
106
96
  };
107
97
 
108
98
  return { resultLayer, destroy };
@@ -252,9 +242,6 @@ class Search extends IndexedCollection {
252
242
  });
253
243
  if (this._currentResults.value.length > 0) {
254
244
  await this._resultLayer.activate();
255
- const extent = this._resultLayer.getZoomToExtent();
256
- const viewpoint = Viewpoint.createViewpointFromExtent(extent);
257
- await this._app.maps.activeMap.gotoViewpoint(viewpoint);
258
245
  this.resultsChanged.raiseEvent(this._currentResults.value.slice(0));
259
246
  }
260
247
  }
@@ -296,6 +283,18 @@ class Search extends IndexedCollection {
296
283
  [...this._array].forEach(impl => impl.abort?.());
297
284
  }
298
285
 
286
+ /**
287
+ * Zooms to the extent of all available result features
288
+ * @returns {Promise<void>}
289
+ */
290
+ async zoomToAll() {
291
+ if (this._resultLayer.getFeatures().length > 0) {
292
+ const extent = this._resultLayer.getZoomToExtent();
293
+ const viewpoint = Viewpoint.createViewpointFromExtent(extent);
294
+ await this._app.maps.activeMap.gotoViewpoint(viewpoint);
295
+ }
296
+ }
297
+
299
298
  /**
300
299
  * Clears the results and aborts running request
301
300
  */
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <v-card>
3
- <span class="d-flex justify-space-between align-center ma-1">
2
+ <v-sheet>
3
+ <span class="d-flex justify-space-between align-center mt-1 mx-1">
4
4
  <v-icon
5
5
  class="mx-2"
6
6
  >
@@ -15,13 +15,20 @@
15
15
  :placeholder="$t('search.placeholder')"
16
16
  v-model.trim="query"
17
17
  @keydown.enter="search"
18
- @keydown.esc="clear"
19
18
  @input="reset"
20
19
  />
21
20
  </span>
22
- <v-divider />
21
+ <v-divider class="mt-1" v-if="!!results.length" />
23
22
  <ResultsComponent :query="query" :results="results" />
24
- </v-card>
23
+ <v-divider v-if="!!results.length" />
24
+ <VcsButton
25
+ v-if="!!results.length"
26
+ class="d-flex pt-1 px-1 justify-end"
27
+ @click="zoomToAll"
28
+ >
29
+ {{ $t('search.zoomToAll') }}
30
+ </VcsButton>
31
+ </v-sheet>
25
32
  </template>
26
33
 
27
34
  <style>
@@ -31,15 +38,17 @@
31
38
  <script>
32
39
  import { inject, onUnmounted, ref } from 'vue';
33
40
  import { getLogger } from '@vcsuite/logger';
34
- import { VCard, VDivider, VIcon } from 'vuetify/lib';
41
+ import { VSheet, VDivider, VIcon } from 'vuetify/lib';
35
42
  import VcsTextField from '../components/form-inputs-controls/VcsTextField.vue';
36
43
  import ResultsComponent from './resultsComponent.vue';
44
+ import VcsButton from '../components/buttons/VcsButton.vue';
37
45
 
38
46
  export default {
39
47
  components: {
48
+ VcsButton,
40
49
  ResultsComponent,
41
50
  VcsTextField,
42
- VCard,
51
+ VSheet,
43
52
  VIcon,
44
53
  VDivider,
45
54
  },
@@ -73,6 +82,10 @@
73
82
  searching.value = false;
74
83
  };
75
84
 
85
+ const zoomToAll = () => {
86
+ app.search.zoomToAll();
87
+ };
88
+
76
89
  onUnmounted(() => {
77
90
  clear();
78
91
  });
@@ -84,6 +97,7 @@
84
97
  reset,
85
98
  clear,
86
99
  search,
100
+ zoomToAll,
87
101
  };
88
102
  },
89
103
  };
package/src/state.js CHANGED
@@ -39,7 +39,7 @@ import { Viewpoint } from '@vcmap/core';
39
39
  * @typedef {Object} AppState
40
40
  * @property {import("@vcmap/core").ViewpointOptions} [activeViewpoint]
41
41
  * @property {string} [activeMap]
42
- * @property {Array<string>} contextIds
42
+ * @property {Array<string>} moduleIds
43
43
  * @property {Array<LayerState>} layers
44
44
  * @property {Array<PluginState>} plugins
45
45
  * @property {string} [activeObliqueCollection]
@@ -48,7 +48,7 @@ import { Viewpoint } from '@vcmap/core';
48
48
  /**
49
49
  * The URL state of the app is an array. To null parameters, pass in 0 instead.
50
50
  * The first entry is the viewpoint state, the second the active map name
51
- * The third is an array of contexts to apply the state to
51
+ * The third is an array of modules to apply the state to
52
52
  * the fourth is an array of layer states
53
53
  * the fifth is an array of plugin states
54
54
  * the sixth is the currently active oblique collection or 0 if not applicable
@@ -65,7 +65,7 @@ const MAX_URL_LENGTH = 2048;
65
65
  */
66
66
  export function createEmptyState() {
67
67
  return {
68
- contextIds: [],
68
+ moduleIds: [],
69
69
  layers: [],
70
70
  plugins: [],
71
71
  };
@@ -143,7 +143,7 @@ function parseUrlAppState(urlState) {
143
143
  state.activeMap = urlState[1];
144
144
  }
145
145
  if (Array.isArray(urlState[2])) {
146
- state.contextIds = urlState[2].slice();
146
+ state.moduleIds = urlState[2].slice();
147
147
  }
148
148
  if (Array.isArray(urlState[3])) {
149
149
  urlState[3].forEach((urlLayerState) => {
@@ -190,7 +190,7 @@ function writeUrlAppState(state, maxLength) {
190
190
  urlState[1] = state.activeMap;
191
191
  }
192
192
 
193
- urlState[2] = state.contextIds.slice();
193
+ urlState[2] = state.moduleIds.slice();
194
194
  urlState[3] = [];
195
195
  urlState[4] = [];
196
196
 
@@ -247,7 +247,7 @@ export function setStateToUrl(state, url) {
247
247
  activeObliqueCollection: [String, undefined],
248
248
  layers: Array,
249
249
  plugins: Array,
250
- contextIds: [String],
250
+ moduleIds: [String],
251
251
  });
252
252
  check(url, URL);
253
253
 
@@ -14,7 +14,76 @@
14
14
  width: 70px;
15
15
  }
16
16
 
17
- // Dev-Only!
18
- .bg-dev.theme--light.v-application {
19
- background-color: var(--v-primary-base);
17
+ .v-application .base {
18
+ background-color: var(--v-base-base) !important;
19
+ border-color: var(--v-base-base) !important;
20
+ }
21
+ .v-application .base.lighten-1 {
22
+ background-color: var(--v-base-lighten1) !important;
23
+ border-color: var(--v-base-lighten1) !important;
24
+ }
25
+ .v-application .base.lighten-2 {
26
+ background-color: var(--v-base-lighten2) !important;
27
+ border-color: var(--v-base-lighten2) !important;
28
+ }
29
+ .v-application .base.lighten-3 {
30
+ background-color: var(--v-base-lighten3) !important;
31
+ border-color: var(--v-base-lighten3) !important;
32
+ }
33
+ .v-application .base.lighten-4 {
34
+ background-color: var(--v-base-lighten4) !important;
35
+ border-color: var(--v-base-lighten4) !important;
36
+ }
37
+ .v-application .base.darken-1 {
38
+ background-color: var(--v-base-darken1) !important;
39
+ border-color: var(--v-base-darken1) !important;
40
+ }
41
+ .v-application .base.darken-2 {
42
+ background-color: var(--v-base-darken2) !important;
43
+ border-color: var(--v-base-darken2) !important;
44
+ }
45
+ .v-application .base.darken-3 {
46
+ background-color: var(--v-base-darken3) !important;
47
+ border-color: var(--v-base-darken3) !important;
48
+ }
49
+ .v-application .base.darken-4 {
50
+ background-color: var(--v-base-darken4) !important;
51
+ border-color: var(--v-base-darken4) !important;
52
+ }
53
+
54
+ .v-application .base--text {
55
+ color: var(--v-base-base) !important;
56
+ caret-color: var(--v-base-base) !important;
57
+ }
58
+ .v-application .base--text.text--lighten-1 {
59
+ color: var(--v-base-lighten1) !important;
60
+ caret-color: var(--v-base-lighten1) !important;
61
+ }
62
+ .v-application .base--text.text--lighten-2 {
63
+ color: var(--v-base-lighten2) !important;
64
+ caret-color: var(--v-base-lighten2) !important;
65
+ }
66
+ .v-application .base--text.text--lighten-3 {
67
+ color: var(--v-base-lighten3) !important;
68
+ caret-color: var(--v-base-lighten3) !important;
69
+ }
70
+ .v-application .base--text.text--lighten-4 {
71
+ color: var(--v-base-lighten4) !important;
72
+ caret-color: var(--v-base-lighten4) !important;
73
+ }
74
+ .v-application .base--text.text--darken-1 {
75
+ color: var(--v-base-darken1) !important;
76
+ caret-color: var(--v-base-darken1) !important;
77
+ }
78
+ .v-application .base--text.text--darken-2 {
79
+ color: var(--v-base-darken2) !important;
80
+ caret-color: var(--v-base-darken2) !important;
81
+ }
82
+ .v-application .base--text.text--darken-3 {
83
+ color: var(--v-base-darken3) !important;
84
+ caret-color: var(--v-base-darken3) !important;
85
+ }
86
+ .v-application .base--text.text--darken-4 {
87
+ color: var(--v-base-darken4) !important;
88
+ caret-color: var(--v-base-darken4) !important;
20
89
  }
@@ -29,17 +29,12 @@
29
29
  }
30
30
 
31
31
  h3 {
32
- font-size: 12px;
33
32
  font-weight: normal;
34
33
  }
35
34
 
36
35
  h4 {
37
36
  font-size: 12px;
38
37
  font-weight: normal;
39
- color: rgba(#222222, 0.5);
40
38
  }
41
39
 
42
- .text--disabled {
43
- color: rgba(0, 0, 0, 0.38) !important;
44
- }
45
40
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  @import './theming';
4
4
  @import './typography';
5
+ @import './shades';
5
6
  @import './variables';
6
7
  @import './vcsFont';
7
8
  @import './vcsGrid';
@@ -0,0 +1,2 @@
1
+
2
+ $shades: ('black': #222222, 'white': #FFFFFF);
@@ -1,7 +1,43 @@
1
+ @import 'shades.scss';
2
+
1
3
  /** Global **/
2
4
  $font-size: 14px;
3
5
  $font-size-root: 14px;
4
6
 
7
+ $material-dark: (
8
+ 'background': map-get($shades, 'black'),
9
+ 'cards': map-get($shades, 'black'),
10
+ 'text-fields': (
11
+ 'outlined': var(--v-base-base),
12
+ 'outlined-hover': var(--v-base-base),
13
+ ),
14
+ 'input-bottom-line': var(--v-base-base),
15
+ 'dividers': var(--v-base-lighten2),
16
+ 'toolbar': rgba(map-get($shades, 'black'), 0.8),
17
+ 'table': (
18
+ 'hover': var(--v-base-lighten4),
19
+ ),
20
+ );
21
+ $material-light: (
22
+ 'text-fields': (
23
+ 'outlined': var(--v-base-base),
24
+ 'outlined-hover': var(--v-base-base),
25
+ ),
26
+ 'input-bottom-line': var(--v-base-base),
27
+ 'text': (
28
+ 'primary': map-get($shades, 'black'),
29
+ 'disabled': rgba(map-get($shades, 'black'), 0.3),
30
+ ),
31
+ 'buttons': (
32
+ 'disabled': rgba(map-get($shades, 'black'), 0.5),
33
+ ),
34
+ 'dividers': var(--v-base-lighten2),
35
+ 'toolbar': rgba(map-get($shades, 'white'), 0.8),
36
+ 'table': (
37
+ 'hover': var(--v-base-lighten4),
38
+ ),
39
+ );
40
+
5
41
  // input font and icon
6
42
  $input-font-size: $font-size;
7
43
  $input-icon-height: 16px; // 24px !default;
@@ -20,14 +56,14 @@ $text-field-solo-dense-control-min-height: 22px; //38px !default;
20
56
  $text-field-outlined-fieldset-border: 1px solid currentColor; // 2px solid currentColor !default;
21
57
 
22
58
  // dense non outlined
23
- $text-field-dense-padding: 2px 0px 1px; //4px 0 2px !default;
59
+ $text-field-dense-padding: 2px 0 1px; //4px 0 2px !default;
24
60
 
25
61
  // clear icon non dense
26
62
  $text-field-enclosed-prepend-append-margin-top: 9px;
27
63
 
28
64
  // tooltip icon in append slot
29
65
  $text-field-outlined-append-prepend-outer-margin-top: 4px; // 18px !default;
30
- $text-field-append-prepend-margin: 0px; // 4px !default;
66
+ $text-field-append-prepend-margin: 0; // 4px !default;
31
67
  $text-field-outlined-prepend-append-margin-top: 4px; // 8px !default;
32
68
 
33
69
  // label position for outlined Label dense and non-dense
@@ -39,8 +75,8 @@ $text-field-label-top: 2px; // 6px !default;
39
75
  $text-field-label-active-transform: translateY(-14px) scale(.75); //translateY(-18px) scale(.75) !default;
40
76
 
41
77
  /** VcsTextarea **/
42
- $textarea-box-enclosed-single-outlined-margin-top: 0px; // 10px !default;
43
- $textarea-dense-box-enclosed-single-outlined-margin-top: 0px; // 6px !default;
78
+ $textarea-box-enclosed-single-outlined-margin-top: 0; // 10px !default;
79
+ $textarea-dense-box-enclosed-single-outlined-margin-top: 0; // 6px !default;
44
80
 
45
81
  /** VcsCheckbox **/
46
82
  $icon-size: 20px; // 24px !default;
package/src/uiConfig.js CHANGED
@@ -13,6 +13,7 @@ import { ref } from 'vue';
13
13
  * @property {string} [mobileLogo] - an alternative logo to display in mobile view
14
14
  * @property {string} [appTitle] - an optional title to display next to the company logo
15
15
  * @property {string} [primaryColor] - an optional primary color to use in all themes
16
+ * @property {boolean} [startingFeatureInfo] - an optional flag whether to activate feature info on startup (default active)
16
17
  */
17
18
 
18
19
  /**
@@ -22,12 +23,12 @@ import { ref } from 'vue';
22
23
  */
23
24
  class UiConfig extends Collection {
24
25
  /**
25
- * @param {function():string} getDynamicContextId
26
+ * @param {function():string} getDynamicModuleId
26
27
  */
27
- constructor(getDynamicContextId) {
28
+ constructor(getDynamicModuleId) {
28
29
  super();
29
30
 
30
- makeOverrideCollection(this, getDynamicContextId);
31
+ makeOverrideCollection(this, getDynamicModuleId);
31
32
  /**
32
33
  * This object just acts as a go between for reactivity until we have vue3
33
34
  * @todo vue3 cleanup