@vcmap/ui 5.0.0-rc.24 → 5.0.0-rc.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/build.js +132 -14
- package/build/buildHelpers.js +196 -92
- package/build/bundle.js +56 -0
- package/build/commonViteConfig.js +2 -2
- package/config/base.config.json +29 -2
- package/config/dev.config.json +29 -1
- package/config/www.config.json +81 -39
- package/dist/assets/@mdi/font/LICENSE +20 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
- package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-85d9e53a.js → AxisAlignedBoundingBox-4140c51f.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-1ee7eb47.js → BoundingRectangle-c714b156.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-3b2be784.js → BoxGeometry-6f3da43d.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-f107c84d.js → Color-8a565ff2.js} +5 -5
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-78d71993.js → CoplanarPolygonGeometryLibrary-4b4d4096.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-50d99b33.js → CorridorGeometryLibrary-7b94502b.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-51b0d9bf.js → CylinderGeometry-ca070b87.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-bcfb5d87.js → EllipseGeometry-122e51fa.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-e94f8472.js → EllipseGeometryLibrary-4d326efc.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-28e3a1bb.js → EllipseOutlineGeometry-16cc2bd7.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-b222fa63.js → EllipsoidGeometry-cb148ca2.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-38a3fb5b.js → EllipsoidOutlineGeometry-0fa10c79.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-8c89f28c.js → EllipsoidTangentPlane-6dd1b7af.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-bdd3a04d.js → FrustumGeometry-ee73037c.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryAttribute-153115c5.js → GeometryAttribute-ff5b4fb1.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-acb2399c.js → GeometryPipeline-1f8fbf05.js} +1 -1
- package/dist/assets/cesium/Workers/{IntersectionTests-271e513e.js → IntersectionTests-70d39ba9.js} +1 -1
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-5e04e31f.js → OrientedBoundingBox-159cf1d6.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-6762b65b.js → PolygonGeometryLibrary-076a5d25.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7dc7a431.js → PolygonPipeline-b9f2810a.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-15fde655.js → PolylinePipeline-639192e0.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-ba7dfed5.js → PolylineVolumeGeometryLibrary-b73549fb.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-68f0b9a2.js → PrimitivePipeline-10ede1b6.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-8eaf23da.js → RectangleGeometryLibrary-c35a7356.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-eb8a645a.js → TerrainEncoding-668d242f.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-f6451f99.js → Transforms-a2a85221.js} +14 -0
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-feef3109.js → WallGeometryLibrary-1938bf0d.js} +1 -1
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/package.js +1 -1
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.253914.js → cesium.1457fa.js} +58656 -33170
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.47836f.js +19060 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-bb372634.js +1 -0
- package/dist/assets/{ol.1c946a.js → ol.9e4d23.js} +27344 -12118
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.6ed89d.css +5 -0
- package/dist/assets/ui.6ed89d.js +13461 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.c1ece7.js → vue.7327e4.js} +834 -598
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.6efa21.css → vuetify.d2131d.css} +1 -1
- package/dist/assets/{vuetify.6efa21.js → vuetify.d2131d.js} +343 -103
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +7 -6
- package/index.html +14 -6
- package/index.js +17 -2
- package/lib/olLib.js +19 -16
- package/package.json +15 -14
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -2
- package/plugins/@vcmap/simple-graph/index.js +1 -1
- package/plugins/@vcmap-show-case/README.md +2 -1
- package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +55 -79
- package/plugins/@vcmap-show-case/category-tester/CategoriesExample.vue +135 -0
- package/plugins/@vcmap-show-case/category-tester/CollectionComponentOptions.vue +209 -0
- package/plugins/@vcmap-show-case/category-tester/index.js +19 -1
- package/plugins/@vcmap-show-case/collection-manager-example/CollectionManagerExample.vue +182 -0
- package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
- package/plugins/@vcmap-show-case/collection-manager-example/index.js +74 -0
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +20 -3
- package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/SwitchMapCallback.js +47 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/index.js +34 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +0 -1
- package/plugins/package.json +3 -1
- package/public/assets/@mdi/font/LICENSE +20 -0
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
- package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/public/assets/favicon-128.png +0 -0
- package/public/assets/favicon-180.png +0 -0
- package/public/assets/favicon-192.png +0 -0
- package/public/assets/favicon-32.png +0 -0
- package/public/assets/logo-mobile.svg +9 -0
- package/public/assets/logo.svg +26 -0
- package/src/application/VcsApp.vue +34 -5
- package/src/application/VcsAttributions.vue +20 -5
- package/src/application/VcsAttributionsFooter.vue +0 -1
- package/src/application/VcsNavbar.vue +18 -13
- package/src/callback/activateLayersCallback.js +54 -0
- package/src/callback/applyLayerStyleCallback.js +63 -0
- package/src/callback/deactivateLayersCallback.js +54 -0
- package/src/callback/goToViewpointCallback.js +54 -0
- package/src/callback/vcsCallback.js +66 -0
- package/src/components/buttons/VcsActionButtonList.vue +28 -10
- package/src/components/buttons/VcsButton.vue +38 -100
- package/src/components/buttons/VcsFormButton.vue +6 -4
- package/src/components/buttons/VcsToolButton.vue +161 -0
- package/src/components/form-inputs-controls/VcsDatePicker.vue +19 -5
- package/src/components/form-inputs-controls/VcsFormSection.vue +0 -1
- package/src/components/form-inputs-controls/VcsSelect.vue +16 -2
- package/src/components/form-inputs-controls/VcsSlider.vue +72 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -13
- package/src/components/form-inputs-controls/VcsWizard.vue +13 -14
- package/src/components/form-inputs-controls/VcsWizardStep.vue +0 -1
- package/src/components/lists/VcsList.vue +3 -2
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -1
- package/src/components/tables/VcsDataTable.vue +2 -4
- package/src/contentTree/LayerTree.vue +15 -9
- package/src/contentTree/contentTreeCollection.js +1 -1
- package/src/contentTree/contentTreeItem.js +22 -3
- package/src/contentTree/groupContentTreeItem.js +1 -0
- package/src/contentTree/layerContentTreeItem.js +4 -14
- package/src/contentTree/layerGroupContentTreeItem.js +4 -14
- package/src/contentTree/obliqueCollectionContentTreeItem.js +4 -0
- package/src/contentTree/viewpointContentTreeItem.js +1 -0
- package/src/featureInfo/BalloonComponent.vue +0 -1
- package/src/featureInfo/abstractFeatureInfoView.js +16 -1
- package/src/featureInfo/featureInfo.js +45 -56
- package/src/i18n/de.js +5 -2
- package/src/i18n/en.js +5 -2
- package/src/i18n/i18nCollection.js +1 -2
- package/src/init.js +1 -4
- package/src/legend/vcsLegend.vue +1 -1
- package/src/manager/buttonManager.js +15 -0
- package/src/manager/{categoryManager/CategoryComponent.vue → collectionManager/CollectionComponent.vue} +57 -66
- package/src/manager/collectionManager/CollectionComponentList.vue +62 -0
- package/src/manager/collectionManager/CollectionComponentProvider.vue +38 -0
- package/src/manager/collectionManager/CollectionManager.vue +43 -0
- package/src/manager/collectionManager/categoryManager.js +83 -0
- package/src/manager/collectionManager/collectionComponent.js +453 -0
- package/src/manager/collectionManager/collectionManager.js +432 -0
- package/src/manager/navbarManager.js +5 -4
- package/src/manager/toolbox/GroupToolboxComponent.vue +5 -7
- package/src/manager/toolbox/SelectToolboxComponent.vue +6 -9
- package/src/manager/toolbox/ToolboxManager.vue +4 -5
- package/src/manager/window/WindowComponentHeader.vue +0 -4
- package/src/navigation/mapNavigation.vue +34 -8
- package/src/navigation/overviewMap.js +7 -1
- package/src/notifier/notifierComponent.vue +0 -1
- package/src/pluginHelper.js +5 -0
- package/src/search/resultItem.vue +0 -1
- package/src/search/searchComponent.vue +7 -9
- package/src/styles/_theming.scss +2 -2
- package/src/styles/_typography.scss +2 -2
- package/src/styles/main.scss +8 -0
- package/src/styles/vcsFont.scss +1 -22
- package/src/vcsUiApp.js +76 -12
- package/src/vuePlugins/i18n.js +18 -19
- package/src/vuePlugins/vuetify.js +0 -1
- package/dist/assets/core.3a8205.js +0 -18426
- package/dist/assets/index.91ae2d55.js +0 -1
- package/dist/assets/ui.0025be.css +0 -5
- package/dist/assets/ui.0025be.js +0 -18534
- package/plugins/@vcmap-show-case/category-tester/Categories.vue +0 -291
- package/plugins/@vcmap-show-case/category-tester/Category.vue +0 -164
- package/src/manager/categoryManager/CategoryComponentList.vue +0 -82
- package/src/manager/categoryManager/CategoryManager.vue +0 -47
- package/src/manager/categoryManager/categoryManager.js +0 -633
- package/start.js +0 -9
- /package/{src/assets/favicon-128.png → dist/assets/favicon-128.4c4ce5.png} +0 -0
- /package/{src/assets/favicon-180.png → dist/assets/favicon-180.5b99c0.png} +0 -0
- /package/{src/assets/favicon-192.png → dist/assets/favicon-192.0e205e.png} +0 -0
- /package/{src/assets/favicon-32.png → dist/assets/favicon-32.6b9add.png} +0 -0
- /package/dist/assets/{favicon.decf54cc.svg → favicon.d5ec97.svg} +0 -0
- /package/dist/assets/font/{TitilliumWeb-Regular.woff2 → TitilliumWeb-Regular.9ca076.woff2} +0 -0
- /package/{src/assets/logo-mobile.svg → dist/assets/logo-mobile.2d10a6.svg} +0 -0
- /package/{src/assets/logo.svg → dist/assets/logo.27089a.svg} +0 -0
- /package/{src → public}/assets/favicon.svg +0 -0
- /package/{src → public}/assets/font/OFL.txt +0 -0
- /package/{src → public}/assets/font/TitilliumWeb-Regular.woff2 +0 -0
@@ -25,6 +25,7 @@
|
|
25
25
|
</v-row>
|
26
26
|
<v-row justify="center">
|
27
27
|
<OrientationToolsButton
|
28
|
+
v-if="showOverviewButton"
|
28
29
|
:icon="overviewAction.icon"
|
29
30
|
:tooltip="overviewAction.title"
|
30
31
|
:color="overviewAction.active ? 'primary' : undefined"
|
@@ -43,7 +44,10 @@
|
|
43
44
|
createGoToViewpointAction,
|
44
45
|
createOverviewMapAction,
|
45
46
|
} from '../actions/actionHelper.js';
|
46
|
-
import {
|
47
|
+
import {
|
48
|
+
getWindowComponentOptions,
|
49
|
+
overviewMapLayerSymbol,
|
50
|
+
} from './overviewMap.js';
|
47
51
|
import VcsCompass from './vcsCompass.vue';
|
48
52
|
import VcsZoomButton from './vcsZoomButton.vue';
|
49
53
|
import TiltSlider from './tiltSlider.vue';
|
@@ -205,19 +209,40 @@
|
|
205
209
|
},
|
206
210
|
});
|
207
211
|
|
208
|
-
const { action, destroy } =
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
+
const { action: overviewAction, destroy: overviewDestroy } =
|
213
|
+
createOverviewMapAction(
|
214
|
+
app.overviewMap,
|
215
|
+
getWindowComponentOptions(),
|
216
|
+
app.windowManager,
|
217
|
+
);
|
218
|
+
const showOverviewButton = ref(
|
219
|
+
app.overviewMap.map.layerCollection.size > 0,
|
212
220
|
);
|
221
|
+
const overviewMapListeners = [
|
222
|
+
app.overviewMap.map.layerCollection.added.addEventListener(() => {
|
223
|
+
showOverviewButton.value = true;
|
224
|
+
}),
|
225
|
+
app.overviewMap.map.layerCollection.removed.addEventListener(() => {
|
226
|
+
if (
|
227
|
+
[...app.overviewMap.map.layerCollection].filter(
|
228
|
+
(l) => !l[overviewMapLayerSymbol],
|
229
|
+
).length < 1 &&
|
230
|
+
app.overviewMap.active
|
231
|
+
) {
|
232
|
+
app.overviewMap.deactivate();
|
233
|
+
showOverviewButton.value = false;
|
234
|
+
}
|
235
|
+
}),
|
236
|
+
];
|
213
237
|
|
214
238
|
const { action: homeAction, destroy: homeDestroy } = setupHomeButton(app);
|
215
239
|
|
216
240
|
onUnmounted(() => {
|
217
|
-
if (
|
218
|
-
|
241
|
+
if (overviewDestroy) {
|
242
|
+
overviewDestroy();
|
219
243
|
}
|
220
244
|
postRenderHandler();
|
245
|
+
overviewMapListeners.forEach((cb) => cb());
|
221
246
|
homeDestroy();
|
222
247
|
});
|
223
248
|
|
@@ -237,7 +262,8 @@
|
|
237
262
|
zoomOut() {
|
238
263
|
zoom(app.maps.activeMap, true);
|
239
264
|
},
|
240
|
-
overviewAction: reactive(
|
265
|
+
overviewAction: reactive(overviewAction),
|
266
|
+
showOverviewButton,
|
241
267
|
homeAction,
|
242
268
|
};
|
243
269
|
},
|
@@ -27,6 +27,8 @@ import {
|
|
27
27
|
import { vcsAppSymbol } from '../pluginHelper.js';
|
28
28
|
import VcsMap from '../application/VcsMap.vue';
|
29
29
|
|
30
|
+
export const overviewMapLayerSymbol = Symbol('overviewMapLayerSymbol');
|
31
|
+
|
30
32
|
/**
|
31
33
|
* @returns {WindowComponentOptions}
|
32
34
|
*/
|
@@ -331,7 +333,7 @@ class OverviewMap {
|
|
331
333
|
const { activeMap } = this._app.maps;
|
332
334
|
if (activeMap instanceof ObliqueMap) {
|
333
335
|
await this._initializeForOblique(activeMap);
|
334
|
-
} else {
|
336
|
+
} else if (activeMap) {
|
335
337
|
await this._initializePostRenderHandler(activeMap);
|
336
338
|
}
|
337
339
|
}
|
@@ -496,6 +498,7 @@ class OverviewMap {
|
|
496
498
|
style: obliqueTileStyle,
|
497
499
|
zIndex: 1,
|
498
500
|
});
|
501
|
+
this._obliqueTileLayer[overviewMapLayerSymbol] = true;
|
499
502
|
|
500
503
|
const obliqueImageStyle = new VectorStyleItem({});
|
501
504
|
obliqueImageStyle.style = (feature) => {
|
@@ -509,10 +512,12 @@ class OverviewMap {
|
|
509
512
|
projection: mercatorProjection.toJSON(),
|
510
513
|
style: obliqueImageStyle,
|
511
514
|
});
|
515
|
+
this._obliqueImageLayer[overviewMapLayerSymbol] = true;
|
512
516
|
this._obliqueSelectedImageLayer = new VectorLayer({
|
513
517
|
projection: mercatorProjection.toJSON(),
|
514
518
|
style: this.obliqueSelectedStyle,
|
515
519
|
});
|
520
|
+
this._obliqueSelectedImageLayer[overviewMapLayerSymbol] = true;
|
516
521
|
this._map.layerCollection.add(this._obliqueImageLayer);
|
517
522
|
this._map.layerCollection.add(this._obliqueSelectedImageLayer);
|
518
523
|
this._map.layerCollection.add(this._obliqueTileLayer);
|
@@ -540,6 +545,7 @@ class OverviewMap {
|
|
540
545
|
projection: mercatorProjection.toJSON(),
|
541
546
|
zIndex: 50,
|
542
547
|
});
|
548
|
+
this._cameraIconLayer[overviewMapLayerSymbol] = true;
|
543
549
|
this._map.layerCollection.add(this._cameraIconLayer);
|
544
550
|
}
|
545
551
|
}
|
package/src/pluginHelper.js
CHANGED
@@ -85,6 +85,11 @@ export async function loadPlugin(name, config) {
|
|
85
85
|
// early escape to bypass module loading for testing, see VcsUiApp.spec.js
|
86
86
|
return null;
|
87
87
|
}
|
88
|
+
if (config.version) {
|
89
|
+
const moduleUrl = new URL(module, window.location.href);
|
90
|
+
moduleUrl.searchParams.set('version', config.version);
|
91
|
+
module = moduleUrl.toString();
|
92
|
+
}
|
88
93
|
|
89
94
|
// if (!context.security.isTrustedUrl(module)) { XXX missing pipeline security
|
90
95
|
// getLogger().warning(`suppressed loading of insecure plugin ${module}`);
|
@@ -17,13 +17,11 @@
|
|
17
17
|
<v-divider class="mt-1 base darken-1" v-if="!!results.length" />
|
18
18
|
<ResultsComponent :query="query" :results="results" />
|
19
19
|
<v-divider v-if="!!results.length" />
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
>
|
25
|
-
{{ $t('search.zoomToAll') }}
|
26
|
-
</VcsButton>
|
20
|
+
<div v-if="!!results.length" class="d-flex px-2 pt-2 pb-1 justify-end">
|
21
|
+
<VcsFormButton @click="zoomToAll" variant="outlined">
|
22
|
+
{{ $t('search.zoomToAll') }}
|
23
|
+
</VcsFormButton>
|
24
|
+
</div>
|
27
25
|
</v-sheet>
|
28
26
|
</template>
|
29
27
|
|
@@ -51,11 +49,11 @@
|
|
51
49
|
import { VSheet, VDivider, VIcon } from 'vuetify/lib';
|
52
50
|
import VcsTextField from '../components/form-inputs-controls/VcsTextField.vue';
|
53
51
|
import ResultsComponent from './resultsComponent.vue';
|
54
|
-
import
|
52
|
+
import VcsFormButton from '../components/buttons/VcsFormButton.vue';
|
55
53
|
|
56
54
|
export default {
|
57
55
|
components: {
|
58
|
-
|
56
|
+
VcsFormButton,
|
59
57
|
ResultsComponent,
|
60
58
|
VcsTextField,
|
61
59
|
VSheet,
|
package/src/styles/_theming.scss
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
@
|
1
|
+
@import 'vcsFont.scss';
|
2
2
|
|
3
3
|
.v-application {
|
4
4
|
h1,
|
@@ -14,7 +14,7 @@
|
|
14
14
|
.caption,
|
15
15
|
.tooltip,
|
16
16
|
p {
|
17
|
-
font-size: $font-size;
|
17
|
+
font-size: $vcs-font-size;
|
18
18
|
&:not(.v-icon) {
|
19
19
|
font-family: 'Titillium Web', sans-serif !important;
|
20
20
|
}
|
package/src/styles/main.scss
CHANGED
@@ -7,6 +7,14 @@
|
|
7
7
|
@import './vcsFont';
|
8
8
|
@import './vcsGrid';
|
9
9
|
|
10
|
+
/* latin-ext */
|
11
|
+
@font-face {
|
12
|
+
font-family: 'Titillium Web';
|
13
|
+
font-style: normal;
|
14
|
+
font-weight: 400;
|
15
|
+
src: url(./assets/font/TitilliumWeb-Regular.woff2) format('woff2');
|
16
|
+
}
|
17
|
+
|
10
18
|
html.vcs-ui {
|
11
19
|
overflow-x: hidden !important;
|
12
20
|
overflow-y: hidden !important;
|
package/src/styles/vcsFont.scss
CHANGED
@@ -1,23 +1,2 @@
|
|
1
|
-
|
2
|
-
@font-face {
|
3
|
-
font-family: 'Titillium Web';
|
4
|
-
font-style: normal;
|
5
|
-
font-weight: 400;
|
6
|
-
src: url(../assets/font/TitilliumWeb-Regular.woff2) format('woff2');
|
7
|
-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
|
8
|
-
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
9
|
-
}
|
10
|
-
/* latin */
|
11
|
-
@font-face {
|
12
|
-
font-family: 'Titillium Web';
|
13
|
-
font-style: normal;
|
14
|
-
font-weight: 400;
|
15
|
-
src: url(../assets/font/TitilliumWeb-Regular.woff2) format('woff2');
|
16
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
17
|
-
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
|
18
|
-
U+FEFF, U+FFFD;
|
19
|
-
}
|
20
|
-
|
21
|
-
// fonts
|
1
|
+
// fontSize
|
22
2
|
$vcs-font-size: 13px;
|
23
|
-
// header
|
package/src/vcsUiApp.js
CHANGED
@@ -10,6 +10,7 @@ import {
|
|
10
10
|
Viewpoint,
|
11
11
|
volatileModuleId,
|
12
12
|
VcsEvent,
|
13
|
+
getObjectFromClassRegistry,
|
13
14
|
} from '@vcmap/core';
|
14
15
|
import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
15
16
|
import {
|
@@ -27,14 +28,19 @@ import { createContentTreeCollection } from './contentTree/contentTreeCollection
|
|
27
28
|
import { contentTreeClassRegistry } from './contentTree/contentTreeItem.js';
|
28
29
|
import OverviewMap from './navigation/overviewMap.js';
|
29
30
|
import I18nCollection from './i18n/i18nCollection.js';
|
30
|
-
import CategoryManager from './manager/
|
31
|
+
import CategoryManager from './manager/collectionManager/categoryManager.js';
|
31
32
|
import ContextMenuManager from './manager/contextMenu/contextMenuManager.js';
|
32
|
-
import FeatureInfo
|
33
|
+
import FeatureInfo, {
|
34
|
+
featureInfoClassRegistry,
|
35
|
+
} from './featureInfo/featureInfo.js';
|
33
36
|
import UiConfig from './uiConfig.js';
|
34
37
|
import { createEmptyState, getStateFromURL } from './state.js';
|
35
38
|
import { version } from '../package.json';
|
36
39
|
import Search from './search/search.js';
|
37
40
|
import Notifier from './notifier/notifier.js';
|
41
|
+
import AbstractFeatureInfoView from './featureInfo/abstractFeatureInfoView.js';
|
42
|
+
import { createVueI18n, setupI18n } from './vuePlugins/i18n.js';
|
43
|
+
import { callbackClassRegistry } from './callback/vcsCallback.js';
|
38
44
|
|
39
45
|
/**
|
40
46
|
* @typedef {import("@vcmap/core").VcsModuleConfig} VcsUiModuleConfig
|
@@ -176,7 +182,15 @@ class VcsUiApp extends VcsApp {
|
|
176
182
|
];
|
177
183
|
|
178
184
|
/**
|
179
|
-
* @type {OverrideClassRegistry<
|
185
|
+
* @type {OverrideClassRegistry<VcsCallbackItem>}
|
186
|
+
* @private
|
187
|
+
*/
|
188
|
+
this._callbackClassRegistry = new OverrideClassRegistry(
|
189
|
+
callbackClassRegistry,
|
190
|
+
);
|
191
|
+
|
192
|
+
/**
|
193
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<ContentTreeItem>}
|
180
194
|
* @private
|
181
195
|
*/
|
182
196
|
this._contentTreeClassRegistry = new OverrideClassRegistry(
|
@@ -212,10 +226,24 @@ class VcsUiApp extends VcsApp {
|
|
212
226
|
*/
|
213
227
|
this._uiConfig = new UiConfig(() => this.dynamicModuleId);
|
214
228
|
/**
|
215
|
-
* @type {
|
229
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<AbstractFeatureInfoView>}
|
230
|
+
* @private
|
231
|
+
*/
|
232
|
+
this._featureInfoClassRegistry = new OverrideClassRegistry(
|
233
|
+
featureInfoClassRegistry,
|
234
|
+
);
|
235
|
+
/**
|
236
|
+
* @type {import("@vcmap/core").OverrideCollection<AbstractFeatureInfoView>}
|
216
237
|
* @private
|
217
238
|
*/
|
218
|
-
this._featureInfo =
|
239
|
+
this._featureInfo = makeOverrideCollection(
|
240
|
+
new FeatureInfo(this),
|
241
|
+
() => this.dynamicModuleId,
|
242
|
+
null,
|
243
|
+
(config) =>
|
244
|
+
getObjectFromClassRegistry(this._featureInfoClassRegistry, config),
|
245
|
+
AbstractFeatureInfoView,
|
246
|
+
);
|
219
247
|
|
220
248
|
/**
|
221
249
|
* @type {OverviewMap}
|
@@ -229,6 +257,19 @@ class VcsUiApp extends VcsApp {
|
|
229
257
|
*/
|
230
258
|
this._i18n = new I18nCollection(() => this.dynamicModuleId);
|
231
259
|
|
260
|
+
/**
|
261
|
+
*
|
262
|
+
* @type {import("vue-i18n").VueI18n}
|
263
|
+
* @private
|
264
|
+
*/
|
265
|
+
this._vueI18n = createVueI18n();
|
266
|
+
/**
|
267
|
+
*
|
268
|
+
* @type {function(): void}
|
269
|
+
* @private
|
270
|
+
*/
|
271
|
+
this._vueI18nDestroy = setupI18n(this);
|
272
|
+
|
232
273
|
/**
|
233
274
|
* @type {CategoryManager}
|
234
275
|
* @private
|
@@ -283,13 +324,29 @@ class VcsUiApp extends VcsApp {
|
|
283
324
|
}
|
284
325
|
|
285
326
|
/**
|
286
|
-
* @type {OverrideClassRegistry<
|
327
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<VcsCallback>}
|
328
|
+
* @readonly
|
329
|
+
*/
|
330
|
+
get callbackClassRegistry() {
|
331
|
+
return this._callbackClassRegistry;
|
332
|
+
}
|
333
|
+
|
334
|
+
/**
|
335
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<ContentTreeItem>}
|
287
336
|
* @readonly
|
288
337
|
*/
|
289
338
|
get contentTreeClassRegistry() {
|
290
339
|
return this._contentTreeClassRegistry;
|
291
340
|
}
|
292
341
|
|
342
|
+
/**
|
343
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<AbstractFeatureInfoView>}
|
344
|
+
* @readonly
|
345
|
+
*/
|
346
|
+
get featureInfoClassRegistry() {
|
347
|
+
return this._featureInfoClassRegistry;
|
348
|
+
}
|
349
|
+
|
293
350
|
/**
|
294
351
|
* @returns {ToolboxManager}
|
295
352
|
* @readonly
|
@@ -338,6 +395,14 @@ class VcsUiApp extends VcsApp {
|
|
338
395
|
return this._i18n;
|
339
396
|
}
|
340
397
|
|
398
|
+
/**
|
399
|
+
* @returns {import("vue-i18n").VueI18n}
|
400
|
+
* @readonly
|
401
|
+
*/
|
402
|
+
get vueI18n() {
|
403
|
+
return this._vueI18n;
|
404
|
+
}
|
405
|
+
|
341
406
|
/**
|
342
407
|
* @returns {CategoryManager}
|
343
408
|
* @readonly
|
@@ -483,10 +548,7 @@ class VcsUiApp extends VcsApp {
|
|
483
548
|
await super._parseModule(module);
|
484
549
|
await this._contentTree.parseItems(config.contentTree, module._id);
|
485
550
|
await this._uiConfig.parseItems(config.uiConfig, module._id);
|
486
|
-
await this._featureInfo.
|
487
|
-
config.featureInfo,
|
488
|
-
module._id,
|
489
|
-
);
|
551
|
+
await this._featureInfo.parseItems(config.featureInfo, module._id);
|
490
552
|
}
|
491
553
|
|
492
554
|
/**
|
@@ -553,7 +615,7 @@ class VcsUiApp extends VcsApp {
|
|
553
615
|
serializeModule(moduleId) {
|
554
616
|
const config = super.serializeModule(moduleId);
|
555
617
|
config.uiConfig = this._uiConfig.serializeModule(moduleId);
|
556
|
-
config.featureInfo = this._featureInfo.
|
618
|
+
config.featureInfo = this._featureInfo.serializeModule(moduleId);
|
557
619
|
config.i18n = this._i18n.serializeModule(moduleId);
|
558
620
|
config.plugins = this._plugins.serializeModule(moduleId);
|
559
621
|
return config;
|
@@ -570,7 +632,7 @@ class VcsUiApp extends VcsApp {
|
|
570
632
|
this._plugins.removeModule(moduleId),
|
571
633
|
this._i18n.removeModule(moduleId),
|
572
634
|
this._contentTree.removeModule(moduleId),
|
573
|
-
this._featureInfo.
|
635
|
+
this._featureInfo.removeModule(moduleId),
|
574
636
|
this._uiConfig.removeModule(moduleId),
|
575
637
|
]);
|
576
638
|
}
|
@@ -593,7 +655,9 @@ class VcsUiApp extends VcsApp {
|
|
593
655
|
destroyCollection(this._contentTree);
|
594
656
|
destroyCollection(this._i18n);
|
595
657
|
destroyCollection(this._search);
|
658
|
+
this._vueI18nDestroy();
|
596
659
|
this._contentTreeClassRegistry.destroy();
|
660
|
+
this._featureInfoClassRegistry.destroy();
|
597
661
|
this._featureInfo.destroy();
|
598
662
|
this._uiConfig.destroy();
|
599
663
|
super.destroy();
|
package/src/vuePlugins/i18n.js
CHANGED
@@ -9,10 +9,10 @@ Vue.use(VueI18n);
|
|
9
9
|
|
10
10
|
/**
|
11
11
|
* creates a new VueI18n Instance.
|
12
|
-
* @returns {VueI18n}
|
12
|
+
* @returns {import("vue-i18n").VueI18n}
|
13
13
|
*/
|
14
14
|
export function createVueI18n() {
|
15
|
-
|
15
|
+
return new VueI18n({
|
16
16
|
locale: 'en',
|
17
17
|
silentFallbackWarn: true,
|
18
18
|
silentTranslationWarn: true,
|
@@ -22,44 +22,43 @@ export function createVueI18n() {
|
|
22
22
|
},
|
23
23
|
postTranslation: (val, key) => (typeof val === 'string' ? val : key),
|
24
24
|
});
|
25
|
-
return i18n;
|
26
25
|
}
|
27
26
|
|
28
27
|
/**
|
29
|
-
* sets the messages to the
|
30
|
-
* @param {
|
31
|
-
* @param {VueI18n} i18n
|
28
|
+
* sets the messages to the app's I18n Instance;
|
29
|
+
* @param {VcsUiApp} app
|
32
30
|
*/
|
33
|
-
function
|
34
|
-
|
35
|
-
|
36
|
-
});
|
37
|
-
Object.entries(messages).forEach(([locale, localeMessages]) => {
|
38
|
-
i18n.setLocaleMessage(locale, localeMessages);
|
31
|
+
function setI18nMessages(app) {
|
32
|
+
app.vueI18n.availableLocales.forEach((locale) => {
|
33
|
+
app.vueI18n.setLocaleMessage(locale, undefined);
|
39
34
|
});
|
35
|
+
Object.entries(app.i18n.getMergedMessages()).forEach(
|
36
|
+
([locale, localeMessages]) => {
|
37
|
+
app.vueI18n.setLocaleMessage(locale, localeMessages);
|
38
|
+
},
|
39
|
+
);
|
40
40
|
}
|
41
41
|
|
42
42
|
/**
|
43
43
|
* @param {VcsUiApp} app
|
44
|
-
* @param {VueI18n} i18n
|
45
44
|
* @returns {function():void} returns a destroy function
|
46
45
|
*/
|
47
|
-
export function setupI18n(app
|
46
|
+
export function setupI18n(app) {
|
48
47
|
const defaultMessages = { name: 'default', en, de };
|
49
48
|
defaultMessages[i18nPluginSymbol] = vcsAppSymbol;
|
50
49
|
app.i18n.add(defaultMessages);
|
51
50
|
|
52
|
-
|
53
|
-
|
51
|
+
setI18nMessages(app);
|
52
|
+
app.vueI18n.locale = app.locale;
|
54
53
|
const destroyFunctions = [
|
55
54
|
app.i18n.added.addEventListener(() => {
|
56
|
-
|
55
|
+
setI18nMessages(app);
|
57
56
|
}),
|
58
57
|
app.i18n.removed.addEventListener(() => {
|
59
|
-
|
58
|
+
setI18nMessages(app);
|
60
59
|
}),
|
61
60
|
app.localeChanged.addEventListener((locale) => {
|
62
|
-
|
61
|
+
app.vueI18n.locale = locale;
|
63
62
|
}),
|
64
63
|
];
|
65
64
|
return function tearDownI18nSetup() {
|