@vcmap/ui 5.0.0-rc.24 → 5.0.0-rc.26

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 (215) hide show
  1. package/build/build.js +132 -14
  2. package/build/buildHelpers.js +196 -92
  3. package/build/bundle.js +56 -0
  4. package/build/commonViteConfig.js +2 -2
  5. package/config/base.config.json +29 -2
  6. package/config/dev.config.json +29 -1
  7. package/config/www.config.json +81 -39
  8. package/dist/assets/@mdi/font/LICENSE +20 -0
  9. package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  10. package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
  11. package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  12. package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-85d9e53a.js → AxisAlignedBoundingBox-4140c51f.js} +1 -1
  13. package/dist/assets/cesium/Workers/{BoundingRectangle-1ee7eb47.js → BoundingRectangle-c714b156.js} +1 -1
  14. package/dist/assets/cesium/Workers/{BoxGeometry-3b2be784.js → BoxGeometry-6f3da43d.js} +1 -1
  15. package/dist/assets/cesium/Workers/{Color-f107c84d.js → Color-8a565ff2.js} +5 -5
  16. package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-78d71993.js → CoplanarPolygonGeometryLibrary-4b4d4096.js} +1 -1
  17. package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-50d99b33.js → CorridorGeometryLibrary-7b94502b.js} +1 -1
  18. package/dist/assets/cesium/Workers/{CylinderGeometry-51b0d9bf.js → CylinderGeometry-ca070b87.js} +1 -1
  19. package/dist/assets/cesium/Workers/{EllipseGeometry-bcfb5d87.js → EllipseGeometry-122e51fa.js} +1 -1
  20. package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-e94f8472.js → EllipseGeometryLibrary-4d326efc.js} +1 -1
  21. package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-28e3a1bb.js → EllipseOutlineGeometry-16cc2bd7.js} +1 -1
  22. package/dist/assets/cesium/Workers/{EllipsoidGeometry-b222fa63.js → EllipsoidGeometry-cb148ca2.js} +1 -1
  23. package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-38a3fb5b.js → EllipsoidOutlineGeometry-0fa10c79.js} +1 -1
  24. package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-8c89f28c.js → EllipsoidTangentPlane-6dd1b7af.js} +1 -1
  25. package/dist/assets/cesium/Workers/{FrustumGeometry-bdd3a04d.js → FrustumGeometry-ee73037c.js} +1 -1
  26. package/dist/assets/cesium/Workers/{GeometryAttribute-153115c5.js → GeometryAttribute-ff5b4fb1.js} +1 -1
  27. package/dist/assets/cesium/Workers/{GeometryPipeline-acb2399c.js → GeometryPipeline-1f8fbf05.js} +1 -1
  28. package/dist/assets/cesium/Workers/{IntersectionTests-271e513e.js → IntersectionTests-70d39ba9.js} +1 -1
  29. package/dist/assets/cesium/Workers/{OrientedBoundingBox-5e04e31f.js → OrientedBoundingBox-159cf1d6.js} +1 -1
  30. package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-6762b65b.js → PolygonGeometryLibrary-076a5d25.js} +1 -1
  31. package/dist/assets/cesium/Workers/{PolygonPipeline-7dc7a431.js → PolygonPipeline-b9f2810a.js} +1 -1
  32. package/dist/assets/cesium/Workers/{PolylinePipeline-15fde655.js → PolylinePipeline-639192e0.js} +1 -1
  33. package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-ba7dfed5.js → PolylineVolumeGeometryLibrary-b73549fb.js} +1 -1
  34. package/dist/assets/cesium/Workers/{PrimitivePipeline-68f0b9a2.js → PrimitivePipeline-10ede1b6.js} +1 -1
  35. package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-8eaf23da.js → RectangleGeometryLibrary-c35a7356.js} +1 -1
  36. package/dist/assets/cesium/Workers/{TerrainEncoding-eb8a645a.js → TerrainEncoding-668d242f.js} +1 -1
  37. package/dist/assets/cesium/Workers/{Transforms-f6451f99.js → Transforms-a2a85221.js} +14 -0
  38. package/dist/assets/cesium/Workers/{WallGeometryLibrary-feef3109.js → WallGeometryLibrary-1938bf0d.js} +1 -1
  39. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
  40. package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
  41. package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
  42. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
  43. package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
  44. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
  45. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
  46. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  47. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
  48. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
  49. package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
  50. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
  51. package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
  52. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  53. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
  54. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  55. package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
  56. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
  57. package/dist/assets/cesium/Workers/createGeometry.js +1 -1
  58. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
  59. package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
  60. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
  61. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
  62. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
  63. package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
  64. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
  65. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  66. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
  67. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
  68. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
  69. package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
  70. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
  71. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
  72. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
  73. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  74. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
  75. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  76. package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
  77. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
  78. package/dist/assets/cesium/Workers/package.js +1 -1
  79. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
  80. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  81. package/dist/assets/{cesium.253914.js → cesium.305b7c.js} +58656 -33170
  82. package/dist/assets/cesium.js +1 -1
  83. package/dist/assets/core.f3d6d4.js +19060 -0
  84. package/dist/assets/core.js +1 -1
  85. package/dist/assets/index-f94d5be3.js +1 -0
  86. package/dist/assets/{ol.1c946a.js → ol.39cc05.js} +27344 -12118
  87. package/dist/assets/ol.js +1 -1
  88. package/dist/assets/ui.74022f.css +5 -0
  89. package/dist/assets/ui.74022f.js +13466 -0
  90. package/dist/assets/ui.js +1 -1
  91. package/dist/assets/{vue.c1ece7.js → vue.9b8c6e.js} +834 -598
  92. package/dist/assets/vue.js +2 -2
  93. package/dist/assets/{vuetify.6efa21.css → vuetify.30486f.css} +1 -1
  94. package/dist/assets/{vuetify.6efa21.js → vuetify.30486f.js} +343 -103
  95. package/dist/assets/vuetify.js +2 -2
  96. package/dist/index.html +7 -6
  97. package/index.html +14 -6
  98. package/index.js +19 -2
  99. package/lib/olLib.js +19 -16
  100. package/package.json +15 -14
  101. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -2
  102. package/plugins/@vcmap/simple-graph/index.js +1 -1
  103. package/plugins/@vcmap-show-case/README.md +2 -1
  104. package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +55 -79
  105. package/plugins/@vcmap-show-case/category-tester/CategoriesExample.vue +135 -0
  106. package/plugins/@vcmap-show-case/category-tester/CollectionComponentOptions.vue +209 -0
  107. package/plugins/@vcmap-show-case/category-tester/index.js +19 -1
  108. package/plugins/@vcmap-show-case/collection-manager-example/CollectionManagerExample.vue +182 -0
  109. package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
  110. package/plugins/@vcmap-show-case/collection-manager-example/index.js +74 -0
  111. package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
  112. package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +20 -3
  113. package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
  114. package/plugins/@vcmap-show-case/switch-map-callback-example/SwitchMapCallback.js +47 -0
  115. package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
  116. package/plugins/@vcmap-show-case/switch-map-callback-example/index.js +34 -0
  117. package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
  118. package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +0 -1
  119. package/plugins/package.json +3 -1
  120. package/public/assets/@mdi/font/LICENSE +20 -0
  121. package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  122. package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
  123. package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  124. package/public/assets/favicon-128.png +0 -0
  125. package/public/assets/favicon-180.png +0 -0
  126. package/public/assets/favicon-192.png +0 -0
  127. package/public/assets/favicon-32.png +0 -0
  128. package/src/application/VcsApp.vue +38 -8
  129. package/src/application/VcsAttributions.vue +20 -5
  130. package/src/application/VcsAttributionsFooter.vue +0 -1
  131. package/src/application/VcsNavbar.vue +29 -22
  132. package/src/callback/activateLayersCallback.js +54 -0
  133. package/src/callback/applyLayerStyleCallback.js +63 -0
  134. package/src/callback/deactivateLayersCallback.js +54 -0
  135. package/src/callback/goToViewpointCallback.js +54 -0
  136. package/src/callback/vcsCallback.js +66 -0
  137. package/src/components/buttons/VcsActionButtonList.vue +28 -10
  138. package/src/components/buttons/VcsButton.vue +38 -100
  139. package/src/components/buttons/VcsFormButton.vue +6 -4
  140. package/src/components/buttons/VcsToolButton.vue +161 -0
  141. package/src/components/form-inputs-controls/VcsDatePicker.vue +19 -5
  142. package/src/components/form-inputs-controls/VcsFormSection.vue +0 -1
  143. package/src/components/form-inputs-controls/VcsSelect.vue +16 -2
  144. package/src/components/form-inputs-controls/VcsSlider.vue +72 -0
  145. package/src/components/form-inputs-controls/VcsTextField.vue +24 -13
  146. package/src/components/form-inputs-controls/VcsWizard.vue +13 -14
  147. package/src/components/form-inputs-controls/VcsWizardStep.vue +0 -1
  148. package/src/components/lists/VcsList.vue +3 -2
  149. package/src/components/lists/VcsTreeviewLeaf.vue +0 -1
  150. package/src/components/tables/VcsDataTable.vue +5 -5
  151. package/src/components/tables/VcsTable.vue +1 -1
  152. package/src/contentTree/LayerTree.vue +15 -9
  153. package/src/contentTree/contentTreeCollection.js +1 -1
  154. package/src/contentTree/contentTreeItem.js +22 -3
  155. package/src/contentTree/groupContentTreeItem.js +1 -0
  156. package/src/contentTree/layerContentTreeItem.js +4 -14
  157. package/src/contentTree/layerGroupContentTreeItem.js +4 -14
  158. package/src/contentTree/obliqueCollectionContentTreeItem.js +4 -0
  159. package/src/contentTree/viewpointContentTreeItem.js +1 -0
  160. package/src/featureInfo/BalloonComponent.vue +0 -1
  161. package/src/featureInfo/abstractFeatureInfoView.js +16 -1
  162. package/src/featureInfo/featureInfo.js +45 -56
  163. package/src/i18n/de.js +5 -2
  164. package/src/i18n/en.js +5 -2
  165. package/src/i18n/i18nCollection.js +1 -2
  166. package/src/init.js +1 -4
  167. package/src/legend/vcsLegend.vue +1 -1
  168. package/src/manager/buttonManager.js +15 -0
  169. package/src/manager/{categoryManager/CategoryComponent.vue → collectionManager/CollectionComponent.vue} +57 -66
  170. package/src/manager/collectionManager/CollectionComponentList.vue +62 -0
  171. package/src/manager/collectionManager/CollectionComponentProvider.vue +38 -0
  172. package/src/manager/collectionManager/CollectionManager.vue +43 -0
  173. package/src/manager/collectionManager/categoryManager.js +83 -0
  174. package/src/manager/collectionManager/collectionComponent.js +453 -0
  175. package/src/manager/collectionManager/collectionManager.js +432 -0
  176. package/src/manager/navbarManager.js +5 -4
  177. package/src/manager/toolbox/GroupToolboxComponent.vue +5 -7
  178. package/src/manager/toolbox/SelectToolboxComponent.vue +6 -9
  179. package/src/manager/toolbox/ToolboxManager.vue +4 -5
  180. package/src/manager/window/WindowComponentHeader.vue +0 -4
  181. package/src/manager/window/WindowManager.vue +22 -5
  182. package/src/navigation/mapNavigation.vue +34 -8
  183. package/src/navigation/overviewMap.js +7 -1
  184. package/src/notifier/notifierComponent.vue +0 -1
  185. package/src/pluginHelper.js +5 -0
  186. package/src/search/resultItem.vue +0 -1
  187. package/src/search/searchComponent.vue +7 -9
  188. package/src/styles/_theming.scss +0 -16
  189. package/src/styles/_typography.scss +2 -2
  190. package/src/styles/main.scss +8 -0
  191. package/src/styles/vcsFont.scss +1 -22
  192. package/src/vcsUiApp.js +76 -12
  193. package/src/vuePlugins/i18n.js +18 -19
  194. package/src/vuePlugins/vuetify.js +0 -1
  195. package/dist/assets/core.3a8205.js +0 -18426
  196. package/dist/assets/index.91ae2d55.js +0 -1
  197. package/dist/assets/ui.0025be.css +0 -5
  198. package/dist/assets/ui.0025be.js +0 -18534
  199. package/plugins/@vcmap-show-case/category-tester/Categories.vue +0 -291
  200. package/plugins/@vcmap-show-case/category-tester/Category.vue +0 -164
  201. package/src/manager/categoryManager/CategoryComponentList.vue +0 -82
  202. package/src/manager/categoryManager/CategoryManager.vue +0 -47
  203. package/src/manager/categoryManager/categoryManager.js +0 -633
  204. package/start.js +0 -9
  205. /package/{src/assets/favicon-128.png → dist/assets/favicon-128.4c4ce5.png} +0 -0
  206. /package/{src/assets/favicon-180.png → dist/assets/favicon-180.5b99c0.png} +0 -0
  207. /package/{src/assets/favicon-192.png → dist/assets/favicon-192.0e205e.png} +0 -0
  208. /package/{src/assets/favicon-32.png → dist/assets/favicon-32.6b9add.png} +0 -0
  209. /package/dist/assets/{favicon.decf54cc.svg → favicon.d5ec97.svg} +0 -0
  210. /package/dist/assets/font/{TitilliumWeb-Regular.woff2 → TitilliumWeb-Regular.9ca076.woff2} +0 -0
  211. /package/{src → public}/assets/favicon.svg +0 -0
  212. /package/{src → public}/assets/font/OFL.txt +0 -0
  213. /package/{src → public}/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  214. /package/src/{assets/logo-mobile.svg → logo-mobile.svg} +0 -0
  215. /package/src/{assets/logo.svg → logo.svg} +0 -0
Binary file
Binary file
Binary file
Binary file
@@ -15,7 +15,6 @@
15
15
  draggable="false"
16
16
  class="mobile-logo"
17
17
  />
18
- <div v-else class="company-logo-mobile mobile-logo" />
19
18
  </template>
20
19
  <VcsButton
21
20
  v-if="!$vuetify.breakpoint.smAndUp && $vuetify.breakpoint.mobile"
@@ -24,11 +23,10 @@
24
23
  :icon="attributionAction.icon"
25
24
  :active="attributionAction.active"
26
25
  @click.stop="attributionAction.callback($event)"
27
- small
28
26
  class="z-index-1 mobile-attribution-btn"
29
27
  />
30
28
  <VcsMap :map-id="mapId" />
31
- <MapNavigation />
29
+ <MapNavigation v-if="showMapNavigation" />
32
30
  <ToolboxManagerComponent />
33
31
  <WindowManagerComponent />
34
32
  <NotifierComponent />
@@ -71,7 +69,7 @@
71
69
  .mobile-attribution-btn {
72
70
  position: fixed;
73
71
  right: 2px;
74
- bottom: 56px;
72
+ bottom: 36px;
75
73
  }
76
74
  </style>
77
75
 
@@ -83,6 +81,7 @@
83
81
  onMounted,
84
82
  onUnmounted,
85
83
  provide,
84
+ ref,
86
85
  watch,
87
86
  } from 'vue';
88
87
  import { getVcsAppById } from '@vcmap/core';
@@ -101,7 +100,7 @@
101
100
  import MapNavigation from '../navigation/mapNavigation.vue';
102
101
  import VcsSettings from './VcsSettings.vue';
103
102
  import { WindowSlot } from '../manager/window/windowManager.js';
104
- import CategoryManager from '../manager/categoryManager/CategoryManager.vue';
103
+ import CollectionManager from '../manager/collectionManager/CollectionManager.vue';
105
104
  import { defaultPrimaryColor } from '../vuePlugins/vuetify.js';
106
105
  import VcsLegend from '../legend/vcsLegend.vue';
107
106
  import { getLegendEntries } from '../legend/legendHelper.js';
@@ -110,6 +109,7 @@
110
109
  import VcsAttributions from './VcsAttributions.vue';
111
110
  import { getAttributions } from './attributionsHelper.js';
112
111
  import NotifierComponent from '../notifier/notifierComponent.vue';
112
+ import VcsDefaultLogoMobile from '../logo-mobile.svg';
113
113
 
114
114
  /**
115
115
  * You should call this function in the component providing the vcsUiApp to your
@@ -239,7 +239,7 @@
239
239
  action: legendAction,
240
240
  },
241
241
  vcsAppSymbol,
242
- ButtonLocation.TOOL,
242
+ ButtonLocation.CONTENT,
243
243
  );
244
244
  }
245
245
  };
@@ -338,7 +338,10 @@
338
338
  headerTitle: 'categoryManager.title',
339
339
  headerIcon: '$vcsComponents',
340
340
  },
341
- component: CategoryManager,
341
+ component: CollectionManager,
342
+ provides: {
343
+ collectionManager: app.categoryManager,
344
+ },
342
345
  slot: WindowSlot.STATIC,
343
346
  },
344
347
  app.windowManager,
@@ -452,6 +455,28 @@
452
455
  };
453
456
  }
454
457
 
458
+ export function setupMapNavigation(app) {
459
+ const showMapNavigation = ref(false);
460
+
461
+ const listeners = [
462
+ app.maps.added.addEventListener(() => {
463
+ showMapNavigation.value = true;
464
+ }),
465
+ app.maps.removed.addEventListener(() => {
466
+ if (app.maps.size < 1) {
467
+ showMapNavigation.value = false;
468
+ }
469
+ }),
470
+ ];
471
+
472
+ return {
473
+ showMapNavigation,
474
+ destroy: () => {
475
+ listeners.forEach((cb) => cb());
476
+ },
477
+ };
478
+ }
479
+
455
480
  /**
456
481
  * The base component to setup the entire application. To embed the VcsApp, use this component.
457
482
  * @vue-prop {string} appId - the id of the app to inject. this will setup listeners on the app to call vcsAppMounted on plugins
@@ -493,6 +518,8 @@
493
518
  );
494
519
  const { attributionEntries, attributionAction, destroyAttributions } =
495
520
  setupAttributions(app);
521
+ const { showMapNavigation, destroy: destroyMapNavigationListener } =
522
+ setupMapNavigation(app);
496
523
 
497
524
  let pluginMountedListener;
498
525
  onMounted(() => {
@@ -511,6 +538,7 @@
511
538
  destroyComponentsWindow();
512
539
  destroyThemingListener();
513
540
  destroyAttributions();
541
+ destroyMapNavigationListener();
514
542
  });
515
543
 
516
544
  return {
@@ -518,10 +546,12 @@
518
546
  mobileLogo: computed(
519
547
  () =>
520
548
  app.uiConfig.config.value.mobileLogo ??
521
- app.uiConfig.config.value.logo,
549
+ app.uiConfig.config.value.logo ??
550
+ VcsDefaultLogoMobile,
522
551
  ),
523
552
  attributionEntries,
524
553
  attributionAction,
554
+ showMapNavigation,
525
555
  };
526
556
  },
527
557
  };
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <v-list class="px-1">
2
+ <v-list class="px-2">
3
3
  <v-list-item
4
4
  v-for="{ key, title, attributions } in entries"
5
5
  :key="key"
6
- class="px-1"
6
+ class="px-0"
7
7
  >
8
8
  <v-list-item-content>
9
9
  <v-list-item-title>{{ $t(title) }}</v-list-item-title>
@@ -22,9 +22,24 @@
22
22
  </template>
23
23
 
24
24
  <style lang="scss" scoped>
25
- ::v-deep {
26
- a:before {
27
- content: '\00a9\00a0';
25
+ @import '../styles/shades.scss';
26
+
27
+ .theme--light {
28
+ a {
29
+ color: map-get($shades, 'black');
30
+ }
31
+ }
32
+ .theme--dark {
33
+ a {
34
+ color: map-get($shades, 'white');
35
+ }
36
+ }
37
+ a {
38
+ &:hover {
39
+ color: var(--v-primary-base);
40
+ }
41
+ &:before {
42
+ content: '\00a9';
28
43
  }
29
44
  }
30
45
  </style>
@@ -11,7 +11,6 @@
11
11
  </span>
12
12
  <VcsButton
13
13
  class="d-flex"
14
- small
15
14
  :key="attributionAction.name"
16
15
  :tooltip="attributionAction.title"
17
16
  :icon="attributionAction.icon"
@@ -15,7 +15,7 @@
15
15
  <VcsActionButtonList
16
16
  :actions="mapActions"
17
17
  :overflow-count="3"
18
- large
18
+ button="VcsToolButton"
19
19
  />
20
20
  <v-divider
21
21
  v-if="
@@ -28,8 +28,8 @@
28
28
  />
29
29
  <VcsActionButtonList
30
30
  :actions="contentActions"
31
- :overflow-count="$vuetify.breakpoint.xs ? 2 : 3"
32
- large
31
+ :overflow-count="$vuetify.breakpoint.xs ? 3 : 4"
32
+ button="VcsToolButton"
33
33
  />
34
34
  <v-divider
35
35
  v-if="contentActions.length > 0 && toolActions.length > 0"
@@ -40,7 +40,7 @@
40
40
  <VcsActionButtonList
41
41
  :actions="toolActions"
42
42
  v-if="$vuetify.breakpoint.mdAndUp"
43
- large
43
+ button="VcsToolButton"
44
44
  />
45
45
  </div>
46
46
  </v-toolbar-items>
@@ -48,16 +48,12 @@
48
48
  <v-col class="d-flex justify-center">
49
49
  <div class="d-flex align-center">
50
50
  <template v-if="!$vuetify.breakpoint.xs">
51
- <img
52
- v-if="config.logo"
53
- class="logo"
54
- :src="config.logo"
55
- draggable="false"
56
- alt="Logo"
57
- />
58
- <div v-else class="company-logo logo" />
51
+ <img class="logo" :src="logo" draggable="false" alt="Logo" />
59
52
  </template>
60
- <div v-if="!$vuetify.breakpoint.sm && config.appTitle" class="ml-4">
53
+ <div
54
+ v-if="$vuetify.breakpoint.mdAndUp && config.appTitle"
55
+ class="ml-4"
56
+ >
61
57
  {{ $t(config.appTitle) }}
62
58
  </div>
63
59
  </div>
@@ -65,19 +61,22 @@
65
61
  <v-col class="align-content-end d-flex justify-end">
66
62
  <v-toolbar-items v-if="$vuetify.breakpoint.mdAndUp">
67
63
  <div class="d-flex">
68
- <VcsActionButtonList :actions="projectActions" large />
64
+ <VcsActionButtonList
65
+ :actions="projectActions"
66
+ button="VcsToolButton"
67
+ />
69
68
  <v-divider
70
69
  v-if="projectActions.length > 0 && menuActions.length > 0"
71
70
  vertical
72
71
  inset
73
72
  class="mx-2"
74
73
  />
74
+
75
75
  <v-menu offset-y v-if="shareActions.length > 0">
76
76
  <template #activator="{ on, attrs }">
77
- <VcsButton
77
+ <VcsToolButton
78
78
  v-bind="attrs"
79
79
  v-on="on"
80
- large
81
80
  tooltip="navbar.share.tooltip"
82
81
  icon="$vcsShare"
83
82
  />
@@ -88,10 +87,9 @@
88
87
  :show-icon="true"
89
88
  />
90
89
  </v-menu>
91
- <VcsButton
90
+ <VcsToolButton
92
91
  class="d-flex"
93
92
  v-if="searchAction"
94
- large
95
93
  :key="searchAction.name"
96
94
  :tooltip="searchAction.title"
97
95
  :icon="searchAction.icon"
@@ -101,10 +99,9 @@
101
99
  />
102
100
  <v-menu offset-y v-if="menuActions.length > 0">
103
101
  <template #activator="{ on, attrs }">
104
- <VcsButton
102
+ <VcsToolButton
105
103
  v-bind="attrs"
106
104
  v-on="on"
107
- large
108
105
  tooltip="navbar.menu.tooltip"
109
106
  icon="$vcsMenu"
110
107
  />
@@ -131,6 +128,10 @@
131
128
  max-height: 36px;
132
129
  margin: 0 auto;
133
130
  }
131
+ .v-toolbar.v-toolbar--bottom {
132
+ bottom: 0;
133
+ position: fixed;
134
+ }
134
135
  </style>
135
136
 
136
137
  <script>
@@ -150,15 +151,16 @@
150
151
  } from '../manager/navbarManager.js';
151
152
  import VcsActionButtonList from '../components/buttons/VcsActionButtonList.vue';
152
153
  import VcsActionList from '../components/lists/VcsActionList.vue';
153
- import VcsButton from '../components/buttons/VcsButton.vue';
154
+ import VcsToolButton from '../components/buttons/VcsToolButton.vue';
154
155
  import { createSearchButtonAction } from '../actions/actionHelper.js';
156
+ import VcsDefaultLogo from '../logo.svg';
155
157
 
156
158
  export default {
157
159
  name: 'VcsNavbar',
158
160
  components: {
159
161
  VcsActionButtonList,
160
162
  VcsActionList,
161
- VcsButton,
163
+ VcsToolButton,
162
164
  VToolbar,
163
165
  VContainer,
164
166
  VRow,
@@ -183,6 +185,10 @@
183
185
  ),
184
186
  );
185
187
 
188
+ const logo = computed(() => {
189
+ return app.uiConfig.config.value.logo ?? VcsDefaultLogo;
190
+ });
191
+
186
192
  const { searchAction, destroy: destroySearchAction } =
187
193
  createSearchButtonAction(app);
188
194
 
@@ -199,6 +205,7 @@
199
205
  searchAction,
200
206
  menuActions: getActions(ButtonLocation.MENU),
201
207
  config: app.uiConfig.config,
208
+ logo,
202
209
  };
203
210
  },
204
211
  };
@@ -0,0 +1,54 @@
1
+ import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
2
+
3
+ /**
4
+ * @typedef {VcsCallbackOptions} ActivateLayersOptions
5
+ * @property {Array<string>} layerNames - layer names to activate
6
+ */
7
+
8
+ /**
9
+ * @class
10
+ * @extends {VcsCallback}
11
+ */
12
+ class ActivateLayersCallback extends VcsCallback {
13
+ /**
14
+ * @type {string}
15
+ */
16
+ static get className() {
17
+ return 'ActivateLayersCallback';
18
+ }
19
+
20
+ /**
21
+ * @param {ActivateLayersOptions} options
22
+ * @param {VcsUiApp} app
23
+ */
24
+ constructor(options, app) {
25
+ super(options, app);
26
+ /**
27
+ * @type {Array<string>}
28
+ * @private
29
+ */
30
+ this._layerNames = options.layerNames;
31
+ }
32
+
33
+ callback() {
34
+ this._layerNames
35
+ .map((n) => this._app.layers.getByKey(n))
36
+ .filter((l) => l)
37
+ .forEach((l) => l.activate());
38
+ }
39
+
40
+ /**
41
+ * @returns {ActivateLayersOptions}
42
+ */
43
+ toJSON() {
44
+ const config = super.toJSON();
45
+ config.layerNames = this._layerNames.slice();
46
+ return config;
47
+ }
48
+ }
49
+
50
+ export default ActivateLayersCallback;
51
+ callbackClassRegistry.registerClass(
52
+ ActivateLayersCallback.className,
53
+ ActivateLayersCallback,
54
+ );
@@ -0,0 +1,63 @@
1
+ import { FeatureLayer } from '@vcmap/core';
2
+ import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
3
+
4
+ /**
5
+ * @typedef {VcsCallbackOptions} ApplyLayerStyleOptions
6
+ * @property {string} styleName - name of the style
7
+ * @property {string} layerName - name of the layer to apply the style
8
+ */
9
+
10
+ /**
11
+ * @class
12
+ * @extends {VcsCallback}
13
+ */
14
+ class ApplyLayerStyleCallback extends VcsCallback {
15
+ /**
16
+ * @type {string}
17
+ */
18
+ static get className() {
19
+ return 'ApplyLayerStyleCallback';
20
+ }
21
+
22
+ /**
23
+ * @param {ApplyLayerStyleOptions} options
24
+ * @param {VcsUiApp} app
25
+ */
26
+ constructor(options, app) {
27
+ super(options, app);
28
+ /**
29
+ * @type {string}
30
+ * @private
31
+ */
32
+ this._styleName = options.styleName;
33
+ /**
34
+ * @type {string}
35
+ * @private
36
+ */
37
+ this._layerName = options.layerName;
38
+ }
39
+
40
+ callback() {
41
+ const style = this._app.styles.getByKey(this._styleName);
42
+ const layer = this._app.layers.getByKey(this._layerName);
43
+ if (style && layer && layer instanceof FeatureLayer) {
44
+ layer.setStyle(style);
45
+ }
46
+ }
47
+
48
+ /**
49
+ * @returns {ApplyLayerStyleOptions}
50
+ */
51
+ toJSON() {
52
+ const config = super.toJSON();
53
+ config.styleName = this._styleName;
54
+ config.layerName = this._layerName;
55
+ return config;
56
+ }
57
+ }
58
+
59
+ export default ApplyLayerStyleCallback;
60
+ callbackClassRegistry.registerClass(
61
+ ApplyLayerStyleCallback.className,
62
+ ApplyLayerStyleCallback,
63
+ );
@@ -0,0 +1,54 @@
1
+ import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
2
+
3
+ /**
4
+ * @typedef {VcsCallbackOptions} DeactivateLayersOptions
5
+ * @property {Array<string>} layerNames - layer names to deactivate
6
+ */
7
+
8
+ /**
9
+ * @class
10
+ * @extends {VcsCallback}
11
+ */
12
+ class DeactivateLayersCallback extends VcsCallback {
13
+ /**
14
+ * @type {string}
15
+ */
16
+ static get className() {
17
+ return 'DeactivateLayersCallback';
18
+ }
19
+
20
+ /**
21
+ * @param {DeactivateLayersOptions} options
22
+ * @param {VcsUiApp} app
23
+ */
24
+ constructor(options, app) {
25
+ super(options, app);
26
+ /**
27
+ * @type {Array<string>}
28
+ * @private
29
+ */
30
+ this._layerNames = options.layerNames;
31
+ }
32
+
33
+ callback() {
34
+ this._layerNames
35
+ .map((n) => this._app.layers.getByKey(n))
36
+ .filter((l) => l)
37
+ .forEach((l) => l.deactivate());
38
+ }
39
+
40
+ /**
41
+ * @returns {DeactivateLayersOptions}
42
+ */
43
+ toJSON() {
44
+ const config = super.toJSON();
45
+ config.layerNames = this._layerNames.slice();
46
+ return config;
47
+ }
48
+ }
49
+
50
+ export default DeactivateLayersCallback;
51
+ callbackClassRegistry.registerClass(
52
+ DeactivateLayersCallback.className,
53
+ DeactivateLayersCallback,
54
+ );
@@ -0,0 +1,54 @@
1
+ import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
2
+
3
+ /**
4
+ * @typedef {VcsCallbackOptions} GoToViewpointOptions
5
+ * @property {string} viewpoint - name of the viewpoint
6
+ */
7
+
8
+ /**
9
+ * @class
10
+ * @extends {VcsCallback}
11
+ */
12
+ class GoToViewpointCallback extends VcsCallback {
13
+ /**
14
+ * @type {string}
15
+ */
16
+ static get className() {
17
+ return 'GoToViewpointCallback';
18
+ }
19
+
20
+ /**
21
+ * @param {GoToViewpointOptions} options
22
+ * @param {VcsUiApp} app
23
+ */
24
+ constructor(options, app) {
25
+ super(options, app);
26
+ /**
27
+ * @type {string}
28
+ * @private
29
+ */
30
+ this._viewpoint = options.viewpoint;
31
+ }
32
+
33
+ callback() {
34
+ const vp = this._app.viewpoints.getByKey(this._viewpoint);
35
+ if (this._app.maps.activeMap && vp) {
36
+ this._app.maps.activeMap.gotoViewpoint(vp);
37
+ }
38
+ }
39
+
40
+ /**
41
+ * @returns {GoToViewpointOptions}
42
+ */
43
+ toJSON() {
44
+ const config = super.toJSON();
45
+ config.viewpoint = this._viewpoint;
46
+ return config;
47
+ }
48
+ }
49
+
50
+ export default GoToViewpointCallback;
51
+ callbackClassRegistry.registerClass(
52
+ GoToViewpointCallback.className,
53
+ GoToViewpointCallback,
54
+ );
@@ -0,0 +1,66 @@
1
+ import { ClassRegistry } from '@vcmap/core';
2
+
3
+ /**
4
+ * @type {ClassRegistry<VcsCallback>}
5
+ */
6
+ export const callbackClassRegistry = new ClassRegistry();
7
+
8
+ /**
9
+ * creates instances of VcsCallback classes and executes its callback function
10
+ * @param {VcsUiApp} app
11
+ * @param {Array<VcsCallbackOptions>} vcsCallbackOptions
12
+ */
13
+ export function executeCallbacks(app, vcsCallbackOptions) {
14
+ vcsCallbackOptions.forEach((options) =>
15
+ app.callbackClassRegistry.createFromTypeOptions(options, app)?.callback(),
16
+ );
17
+ }
18
+
19
+ /**
20
+ * @typedef {Object} VcsCallbackOptions
21
+ * @property {string} type
22
+ */
23
+
24
+ /**
25
+ * @typedef {Object} VcsCallback
26
+ * @property {function():void} callback
27
+ */
28
+
29
+ /**
30
+ * @class
31
+ * @abstract
32
+ */
33
+ class VcsCallback {
34
+ /**
35
+ * @type {string}
36
+ */
37
+ static get className() {
38
+ return 'VcsCallback';
39
+ }
40
+
41
+ /**
42
+ * @param {VcsCallbackOptions} options
43
+ * @param {VcsUiApp} app
44
+ */
45
+ constructor(options, app) {
46
+ /**
47
+ * @protected
48
+ * @type {VcsUiApp}
49
+ */
50
+ this._app = app;
51
+ }
52
+
53
+ // eslint-disable-next-line class-methods-use-this
54
+ callback() {}
55
+
56
+ /**
57
+ * @returns {VcsCallbackOptions}
58
+ */
59
+ toJSON() {
60
+ return {
61
+ type: this.constructor.className,
62
+ };
63
+ }
64
+ }
65
+
66
+ export default VcsCallback;