@vcmap/ui 5.0.1 → 5.1.0-rc.1
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/README.md +2 -2
- package/build/buildTypes.js +176 -0
- package/build/lintTypes.js +30 -0
- package/config/aerowest.config.json +4 -0
- package/config/base.config.json +24 -2
- package/config/dev.config.json +176 -5
- package/config/www.config.json +25 -1
- package/dist/assets/{cesium.888ef7.js → cesium.e9b3ca.js} +1859 -1828
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.860907.js → core.a9fe5a.js} +5865 -5041
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-bb2549d6.js +1 -0
- package/dist/assets/{ol.5e8a90.js → ol.5f0496.js} +7257 -7252
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.7758a8.css → ui.3c73c2.css} +2 -2
- package/dist/assets/{ui.7758a8.js → ui.3c73c2.js} +14281 -9264
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.9771b3.js → vue.4fe14e.js} +1243 -1234
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.2818ff.css → vuetify.260d9a.css} +1 -1
- package/dist/assets/{vuetify.2818ff.js → vuetify.260d9a.js} +155 -154
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +2 -2
- package/index.d.ts +256 -0
- package/index.html +1 -1
- package/index.js +48 -11
- package/package.json +22 -15
- package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +3 -0
- package/plugins/@vcmap-show-case/category-tester/src/CategoriesExample.vue +312 -43
- package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +48 -182
- package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +118 -0
- package/plugins/@vcmap-show-case/category-tester/src/importExportHelper.js +29 -0
- package/plugins/@vcmap-show-case/category-tester/src/index.js +16 -0
- package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +2 -1
- package/plugins/@vcmap-show-case/collection-manager-example/src/index.js +8 -4
- package/plugins/@vcmap-show-case/extent-example/README.md +3 -0
- package/plugins/@vcmap-show-case/extent-example/package.json +5 -0
- package/plugins/@vcmap-show-case/extent-example/src/ExtentExample.vue +71 -0
- package/plugins/@vcmap-show-case/extent-example/src/index.js +68 -0
- package/plugins/@vcmap-show-case/flight-component-example/README.md +3 -0
- package/plugins/@vcmap-show-case/flight-component-example/package.json +5 -0
- package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +53 -0
- package/plugins/@vcmap-show-case/flight-component-example/src/index.js +42 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +78 -5
- package/plugins/@vcmap-show-case/hello-world/src/helloWorld.vue +2 -2
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +22 -10
- package/plugins/@vcmap-show-case/toolbox-example/README.md +9 -0
- package/plugins/@vcmap-show-case/toolbox-example/package.json +5 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/TriStateExampleWindow.vue +21 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/dummyToolboxActions.js +94 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/index.js +260 -0
- package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +12 -2
- package/plugins/@vcmap-show-case/viewpoint-component-example/README.md +3 -0
- package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +5 -0
- package/plugins/@vcmap-show-case/viewpoint-component-example/src/ViewpointExample.vue +52 -0
- package/plugins/@vcmap-show-case/viewpoint-component-example/src/index.js +42 -0
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +31 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +20 -16
- package/plugins/@vcmap-show-case/window-tester/src/index.js +2 -17
- package/plugins/package.json +3 -1
- package/src/actions/StyleSelector.vue +8 -7
- package/src/actions/StyleSelector.vue.d.ts +27 -0
- package/src/actions/actionHelper.d.ts +153 -0
- package/src/actions/actionHelper.js +48 -21
- package/src/actions/extentActions.d.ts +40 -0
- package/src/actions/extentActions.js +359 -0
- package/src/actions/flightActions.d.ts +59 -0
- package/src/actions/flightActions.js +232 -0
- package/src/actions/listActions.d.ts +63 -0
- package/src/actions/listActions.js +185 -0
- package/src/actions/stateRefAction.d.ts +19 -0
- package/src/actions/stateRefAction.js +1 -1
- package/src/application/VcsApp.vue +103 -28
- package/src/application/VcsApp.vue.d.ts +86 -0
- package/src/application/VcsAppWrapper.vue.d.ts +12 -0
- package/src/application/VcsAttributions.vue.d.ts +14 -0
- package/src/application/VcsAttributionsFooter.vue +1 -4
- package/src/application/VcsAttributionsFooter.vue.d.ts +26 -0
- package/src/application/VcsMap.vue.d.ts +12 -0
- package/src/application/VcsNavbar.vue.d.ts +45 -0
- package/src/application/VcsPositionDisplay.vue +208 -0
- package/src/application/VcsPositionDisplay.vue.d.ts +18 -0
- package/src/application/VcsSettings.vue.d.ts +5 -0
- package/src/application/VcsTextPage.vue +65 -0
- package/src/application/VcsTextPage.vue.d.ts +16 -0
- package/src/application/VcsTextPageFooter.vue +89 -0
- package/src/application/VcsTextPageFooter.vue.d.ts +22 -0
- package/src/application/attributionsHelper.d.ts +64 -0
- package/src/application/attributionsHelper.js +1 -1
- package/src/application/markdownHelper.d.ts +5 -0
- package/src/application/markdownHelper.js +11 -0
- package/src/application/positionDisplayInteraction.d.ts +42 -0
- package/src/application/positionDisplayInteraction.js +65 -0
- package/src/callback/activateLayersCallback.d.ts +29 -0
- package/src/callback/activateLayersCallback.js +2 -2
- package/src/callback/applyLayerStyleCallback.d.ts +36 -0
- package/src/callback/applyLayerStyleCallback.js +2 -2
- package/src/callback/deactivateLayersCallback.d.ts +29 -0
- package/src/callback/deactivateLayersCallback.js +2 -2
- package/src/callback/goToViewpointCallback.d.ts +29 -0
- package/src/callback/goToViewpointCallback.js +2 -2
- package/src/callback/vcsCallback.d.ts +44 -0
- package/src/callback/vcsCallback.js +4 -9
- package/src/components/ImageElementInjector.vue.d.ts +24 -0
- package/src/components/buttons/VcsActionButtonList.vue +24 -16
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +68 -0
- package/src/components/buttons/VcsButton.vue +7 -0
- package/src/components/buttons/VcsButton.vue.d.ts +89 -0
- package/src/components/buttons/VcsFormButton.vue +9 -0
- package/src/components/buttons/VcsFormButton.vue.d.ts +91 -0
- package/src/components/buttons/VcsToolButton.vue +9 -0
- package/src/components/buttons/VcsToolButton.vue.d.ts +91 -0
- package/src/components/flight/VcsFlightAnchorsComponent.vue +329 -0
- package/src/components/flight/VcsFlightAnchorsComponent.vue.d.ts +45 -0
- package/src/components/flight/VcsFlightComponent.vue +284 -0
- package/src/components/flight/VcsFlightComponent.vue.d.ts +104 -0
- package/src/components/flight/VcsFlightEditor.vue +77 -0
- package/src/components/flight/VcsFlightEditor.vue.d.ts +34 -0
- package/src/components/flight/VcsFlightPlayer.vue +124 -0
- package/src/components/flight/VcsFlightPlayer.vue.d.ts +25 -0
- package/src/components/flight/composables.d.ts +11 -0
- package/src/components/flight/composables.js +39 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +18 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +82 -0
- package/src/components/form-inputs-controls/VcsCoordinate.vue +152 -0
- package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +90 -0
- package/src/components/form-inputs-controls/VcsDatePicker.vue +2 -2
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +31 -0
- package/src/components/form-inputs-controls/VcsExtent.vue +122 -0
- package/src/components/form-inputs-controls/VcsExtent.vue.d.ts +36 -0
- package/src/components/form-inputs-controls/VcsFormSection.vue +6 -1
- package/src/components/form-inputs-controls/VcsFormSection.vue.d.ts +75 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +18 -0
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +41 -0
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +32 -0
- package/src/components/form-inputs-controls/VcsRadioGrid.vue.d.ts +35 -0
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +31 -0
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -0
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +22 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +57 -10
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +65 -0
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +14 -0
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +89 -0
- package/src/components/form-inputs-controls/composables.d.ts +7 -0
- package/src/components/form-inputs-controls/composables.js +1 -1
- package/src/components/form-output/VcsFormattedNumber.vue +13 -2
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +89 -0
- package/src/components/icons/+all.d.ts +9 -0
- package/src/components/icons/+all.js +16 -0
- package/src/components/icons/2DAreaIcon.vue.d.ts +2 -0
- package/src/components/icons/2DDistanceIcon.vue.d.ts +2 -0
- package/src/components/icons/2DHeightObliqueIcon.vue +20 -0
- package/src/components/icons/2DHeightObliqueIcon.vue.d.ts +2 -0
- package/src/components/icons/3DAreaIcon.vue.d.ts +2 -0
- package/src/components/icons/3DDistanceIcon.vue.d.ts +2 -0
- package/src/components/icons/3DHeightIcon.vue.d.ts +2 -0
- package/src/components/icons/AngleIcon.vue.d.ts +2 -0
- package/src/components/icons/AssociationsIcon.vue.d.ts +2 -0
- package/src/components/icons/AxisIcon.vue.d.ts +2 -0
- package/src/components/icons/BoundingBoxIcon.vue.d.ts +2 -0
- package/src/components/icons/CheckboxCheckedIcon.vue.d.ts +2 -0
- package/src/components/icons/CheckboxIcon.vue.d.ts +2 -0
- package/src/components/icons/CheckboxIndeterminateIcon.vue.d.ts +2 -0
- package/src/components/icons/CircleIcon.vue.d.ts +2 -0
- package/src/components/icons/ClippingHorizontalIcon.vue.d.ts +2 -0
- package/src/components/icons/ClippingIcon.vue.d.ts +2 -0
- package/src/components/icons/ClippingVerticalIcon.vue.d.ts +2 -0
- package/src/components/icons/ColorPickerIcon.vue.d.ts +2 -0
- package/src/components/icons/ColorSwatchIcon.vue.d.ts +2 -0
- package/src/components/icons/CommentIcon.vue.d.ts +2 -0
- package/src/components/icons/CompassIcon.vue.d.ts +2 -0
- package/src/components/icons/ComponentsIcon.vue.d.ts +2 -0
- package/src/components/icons/ComponentsPlusIcon.vue +17 -0
- package/src/components/icons/ComponentsPlusIcon.vue.d.ts +2 -0
- package/src/components/icons/ConeIcon.vue.d.ts +2 -0
- package/src/components/icons/DimensionsHouseIcon.vue.d.ts +2 -0
- package/src/components/icons/EditIcon.vue.d.ts +2 -0
- package/src/components/icons/EditVerticesIcon.vue.d.ts +2 -0
- package/src/components/icons/ElevationProfileIcon.vue.d.ts +2 -0
- package/src/components/icons/ExportAreaIcon.vue.d.ts +2 -0
- package/src/components/icons/ExportFlightIcon.vue.d.ts +2 -0
- package/src/components/icons/ExportIcon.vue.d.ts +2 -0
- package/src/components/icons/ExternalLinkIcon.vue.d.ts +2 -0
- package/src/components/icons/EyeIcon.vue.d.ts +2 -0
- package/src/components/icons/FastForwardIcon.vue.d.ts +2 -0
- package/src/components/icons/FilterIcon.vue.d.ts +2 -0
- package/src/components/icons/GlobalTerrainIcon.vue.d.ts +2 -0
- package/src/components/icons/GlobeNatureIcon.vue.d.ts +2 -0
- package/src/components/icons/GroundIcon.vue.d.ts +2 -0
- package/src/components/icons/HealthCareIndustriesIcon.vue.d.ts +2 -0
- package/src/components/icons/HelpIcon.vue.d.ts +2 -0
- package/src/components/icons/HideIcon.vue.d.ts +2 -0
- package/src/components/icons/HomePointIcon.vue.d.ts +2 -0
- package/src/components/icons/HospitalsIcon.vue.d.ts +2 -0
- package/src/components/icons/HouseIcon.vue.d.ts +2 -0
- package/src/components/icons/ImportIcon.vue.d.ts +2 -0
- package/src/components/icons/InfoIcon.vue.d.ts +2 -0
- package/src/components/icons/KebabIcon.vue.d.ts +2 -0
- package/src/components/icons/LabelIcon.vue.d.ts +2 -0
- package/src/components/icons/LayersIcon.vue.d.ts +2 -0
- package/src/components/icons/LegendIcon.vue.d.ts +2 -0
- package/src/components/icons/LineIcon.vue.d.ts +2 -0
- package/src/components/icons/LinkIcon.vue.d.ts +2 -0
- package/src/components/icons/LogoutIcon.vue.d.ts +2 -0
- package/src/components/icons/MapIcon.vue.d.ts +2 -0
- package/src/components/icons/MenuIcon.vue.d.ts +2 -0
- package/src/components/icons/MinusIcon.vue.d.ts +2 -0
- package/src/components/icons/MultiViewIcon.vue +16 -0
- package/src/components/icons/MultiViewIcon.vue.d.ts +2 -0
- package/src/components/icons/ObjectAttributeIcon.vue.d.ts +2 -0
- package/src/components/icons/ObjectSelectIcon.vue.d.ts +2 -0
- package/src/components/icons/ObliqueViewIcon.vue.d.ts +2 -0
- package/src/components/icons/PdfIcon.vue.d.ts +2 -0
- package/src/components/icons/PedestrianIcon.vue.d.ts +2 -0
- package/src/components/icons/PenIcon.vue.d.ts +2 -0
- package/src/components/icons/PlayCircleIcon.vue.d.ts +2 -0
- package/src/components/icons/PlusIcon.vue.d.ts +2 -0
- package/src/components/icons/PoiIcon.vue.d.ts +2 -0
- package/src/components/icons/PointIcon.vue.d.ts +2 -0
- package/src/components/icons/PointMeasurementIcon.vue +36 -0
- package/src/components/icons/PointMeasurementIcon.vue.d.ts +2 -0
- package/src/components/icons/PointSelectIcon.vue.d.ts +2 -0
- package/src/components/icons/PresentationModeIcon.vue.d.ts +2 -0
- package/src/components/icons/ProgressIcon.vue.d.ts +2 -0
- package/src/components/icons/QueryIcon.vue.d.ts +2 -0
- package/src/components/icons/RectangleIcon.vue.d.ts +2 -0
- package/src/components/icons/ReturnIcon.vue.d.ts +2 -0
- package/src/components/icons/RewindIcon.vue.d.ts +2 -0
- package/src/components/icons/RotateLeftIcon.vue.d.ts +2 -0
- package/src/components/icons/RotateRightIcon.vue.d.ts +2 -0
- package/src/components/icons/ScreenshotIcon.vue.d.ts +2 -0
- package/src/components/icons/SearchIcon.vue.d.ts +2 -0
- package/src/components/icons/ShadowIcon.vue.d.ts +2 -0
- package/src/components/icons/ShapesIcon.vue.d.ts +2 -0
- package/src/components/icons/ShareIcon.vue.d.ts +2 -0
- package/src/components/icons/SimpleCircleFilledIcon.vue.d.ts +2 -0
- package/src/components/icons/SimpleCircleHalfFilledIcon.vue.d.ts +2 -0
- package/src/components/icons/SimpleCircleOutlinedIcon.vue.d.ts +2 -0
- package/src/components/icons/SkipNextIcon.vue.d.ts +2 -0
- package/src/components/icons/SkipPreviousIcon.vue.d.ts +2 -0
- package/src/components/icons/SplitViewIcon.vue.d.ts +2 -0
- package/src/components/icons/TerrainBoxIcon.vue.d.ts +2 -0
- package/src/components/icons/TextStyleIcon.vue.d.ts +2 -0
- package/src/components/icons/ThreeDimensionsIcon.vue.d.ts +2 -0
- package/src/components/icons/ToolsIcon.vue.d.ts +2 -0
- package/src/components/icons/TouchIcon.vue.d.ts +2 -0
- package/src/components/icons/TrashCanIcon.vue.d.ts +2 -0
- package/src/components/icons/TriangleIcon.vue.d.ts +2 -0
- package/src/components/icons/TwoDimensionsIcon.vue.d.ts +2 -0
- package/src/components/icons/UploadIcon.vue.d.ts +2 -0
- package/src/components/icons/UserProfileIcon.vue.d.ts +2 -0
- package/src/components/icons/UserShareIcon.vue.d.ts +2 -0
- package/src/components/icons/VideoRecorderIcon.vue.d.ts +2 -0
- package/src/components/icons/ViewpointFlightIcon.vue.d.ts +2 -0
- package/src/components/icons/ViewpointIcon.vue.d.ts +2 -0
- package/src/components/icons/Viewshed360Icon.vue.d.ts +2 -0
- package/src/components/icons/ViewshedConeIcon.vue.d.ts +2 -0
- package/src/components/icons/ViewshedIcon.vue.d.ts +2 -0
- package/src/components/icons/WalkingIcon.vue.d.ts +2 -0
- package/src/components/icons/WallIcon.vue.d.ts +2 -0
- package/src/components/icons/WandIcon.vue.d.ts +2 -0
- package/src/components/import/FileDrop.vue +69 -0
- package/src/components/import/FileDrop.vue.d.ts +26 -0
- package/src/components/import/ImportComponent.vue +78 -0
- package/src/components/import/ImportComponent.vue.d.ts +34 -0
- package/src/components/lists/VcsActionList.vue +8 -15
- package/src/components/lists/VcsActionList.vue.d.ts +66 -0
- package/src/components/lists/VcsList.vue +207 -116
- package/src/components/lists/VcsList.vue.d.ts +227 -0
- package/src/components/lists/VcsTreeview.vue +3 -1
- package/src/components/lists/VcsTreeview.vue.d.ts +28 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +1 -0
- package/src/components/lists/VcsTreeviewLeaf.vue.d.ts +19 -0
- package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +41 -0
- package/src/components/notification/VcsBadge.vue.d.ts +14 -0
- package/src/components/notification/VcsHelp.vue.d.ts +22 -0
- package/src/components/notification/VcsTooltip.vue.d.ts +27 -0
- package/src/components/notification/validation.d.ts +8 -0
- package/src/components/notification/validation.js +3 -2
- package/src/components/plugins/AbstractConfigEditor.vue +25 -4
- package/src/components/plugins/AbstractConfigEditor.vue.d.ts +55 -0
- package/src/components/style/MenuWrapper.vue.d.ts +55 -0
- package/src/components/style/VcsFeatureStyleComponent.vue +389 -0
- package/src/components/style/VcsFeatureStyleComponent.vue.d.ts +31 -0
- package/src/components/style/VcsFillMenu.vue.d.ts +34 -0
- package/src/components/style/VcsFillSelector.vue.d.ts +22 -0
- package/src/components/style/VcsImageMenu.vue.d.ts +43 -0
- package/src/components/style/VcsImageSelector.vue.d.ts +128 -0
- package/src/components/style/VcsStrokeMenu.vue.d.ts +34 -0
- package/src/components/style/VcsStrokeSelector.vue.d.ts +23 -0
- package/src/components/style/VcsTextMenu.vue.d.ts +52 -0
- package/src/components/style/VcsTextSelector.vue.d.ts +58 -0
- package/src/components/style/VcsVectorStyleComponent.vue.d.ts +76 -0
- package/src/components/style/composables.d.ts +43 -0
- package/src/components/style/composables.js +11 -8
- package/src/components/tables/VcsDataTable.vue +11 -3
- package/src/components/tables/VcsDataTable.vue.d.ts +142 -0
- package/src/components/tables/VcsTable.vue +71 -2
- package/src/components/tables/VcsTable.vue.d.ts +88 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +392 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +87 -0
- package/src/components/vector-properties/VcsFeatureTransforms.vue +217 -0
- package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +45 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +96 -52
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +119 -0
- package/src/components/vector-properties/composables.d.ts +33 -0
- package/src/components/vector-properties/composables.js +21 -14
- package/src/components/viewpoint/VcsViewpointComponent.vue +514 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +126 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue +87 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue.d.ts +25 -0
- package/src/contentTree/LayerTree.vue.d.ts +15 -0
- package/src/contentTree/contentTreeCollection.d.ts +113 -0
- package/src/contentTree/contentTreeCollection.js +10 -20
- package/src/contentTree/contentTreeItem.d.ts +334 -0
- package/src/contentTree/contentTreeItem.js +31 -17
- package/src/contentTree/flightContentTreeItem.d.ts +53 -0
- package/src/contentTree/flightContentTreeItem.js +201 -0
- package/src/contentTree/groupContentTreeItem.d.ts +14 -0
- package/src/contentTree/groupContentTreeItem.js +2 -2
- package/src/contentTree/layerContentTreeItem.d.ts +76 -0
- package/src/contentTree/layerContentTreeItem.js +7 -9
- package/src/contentTree/layerGroupContentTreeItem.d.ts +50 -0
- package/src/contentTree/layerGroupContentTreeItem.js +2 -3
- package/src/contentTree/nodeContentTreeItem.d.ts +10 -0
- package/src/contentTree/nodeContentTreeItem.js +2 -2
- package/src/contentTree/obliqueCollectionContentTreeItem.d.ts +46 -0
- package/src/contentTree/obliqueCollectionContentTreeItem.js +3 -5
- package/src/contentTree/subContentTreeItem.d.ts +15 -0
- package/src/contentTree/subContentTreeItem.js +3 -3
- package/src/contentTree/vcsObjectContentTreeItem.d.ts +56 -0
- package/src/contentTree/vcsObjectContentTreeItem.js +3 -4
- package/src/contentTree/viewpointContentTreeItem.d.ts +46 -0
- package/src/contentTree/viewpointContentTreeItem.js +3 -4
- package/src/downloadHelper.d.ts +27 -0
- package/src/featureInfo/AddressBalloonComponent.vue.d.ts +2 -0
- package/src/featureInfo/BalloonComponent.vue +16 -3
- package/src/featureInfo/BalloonComponent.vue.d.ts +61 -0
- package/src/featureInfo/abstractFeatureInfoView.d.ts +199 -0
- package/src/featureInfo/abstractFeatureInfoView.js +82 -18
- package/src/featureInfo/addressBalloonFeatureInfoView.d.ts +67 -0
- package/src/featureInfo/addressBalloonFeatureInfoView.js +9 -2
- package/src/featureInfo/balloonFeatureInfoView.d.ts +49 -0
- package/src/featureInfo/balloonFeatureInfoView.js +12 -11
- package/src/featureInfo/balloonHelper.d.ts +31 -0
- package/src/featureInfo/balloonHelper.js +6 -6
- package/src/featureInfo/featureInfo.d.ts +146 -0
- package/src/featureInfo/featureInfo.js +11 -16
- package/src/featureInfo/featureInfoInteraction.d.ts +21 -0
- package/src/featureInfo/featureInfoInteraction.js +2 -2
- package/src/featureInfo/iframeFeatureInfoView.d.ts +48 -0
- package/src/featureInfo/iframeFeatureInfoView.js +3 -5
- package/src/featureInfo/tableFeatureInfoView.d.ts +75 -0
- package/src/featureInfo/tableFeatureInfoView.js +19 -9
- package/src/i18n/de.d.ts +353 -0
- package/src/i18n/de.js +114 -2
- package/src/i18n/en.d.ts +352 -0
- package/src/i18n/en.js +113 -1
- package/src/i18n/i18nCollection.d.ts +82 -0
- package/src/i18n/i18nCollection.js +3 -3
- package/src/init.d.ts +58 -0
- package/src/init.js +3 -5
- package/src/legend/StyleLegendItem.vue.d.ts +25 -0
- package/src/legend/VcsLegend.vue.d.ts +20 -0
- package/src/legend/legendHelper.d.ts +172 -0
- package/src/legend/legendHelper.js +21 -21
- package/src/manager/buttonManager.d.ts +106 -0
- package/src/manager/buttonManager.js +8 -4
- package/src/manager/collectionManager/CollectionComponent.vue +38 -38
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +17 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +78 -24
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +38 -0
- package/src/manager/collectionManager/CollectionComponentProvider.vue +3 -2
- package/src/manager/collectionManager/CollectionComponentProvider.vue.d.ts +12 -0
- package/src/manager/collectionManager/CollectionManager.vue +29 -4
- package/src/manager/collectionManager/CollectionManager.vue.d.ts +8 -0
- package/src/manager/collectionManager/categoryManager.d.ts +56 -0
- package/src/manager/collectionManager/categoryManager.js +21 -7
- package/src/manager/collectionManager/collectionComponentClass.d.ts +257 -0
- package/src/manager/collectionManager/{collectionComponent.js → collectionComponentClass.js} +210 -57
- package/src/manager/collectionManager/collectionManager.d.ts +200 -0
- package/src/manager/collectionManager/collectionManager.js +45 -39
- package/src/manager/collectionManager/editorCollectionComponentClass.d.ts +60 -0
- package/src/manager/collectionManager/editorCollectionComponentClass.js +295 -0
- package/src/manager/contextMenu/ContextMenuComponent.vue.d.ts +18 -0
- package/src/manager/contextMenu/contextMenuInteraction.d.ts +24 -0
- package/src/manager/contextMenu/contextMenuManager.d.ts +70 -0
- package/src/manager/contextMenu/contextMenuManager.js +5 -5
- package/src/manager/navbarManager.d.ts +60 -0
- package/src/manager/navbarManager.js +10 -6
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +17 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +15 -0
- package/src/manager/toolbox/ToolboxManager.vue +33 -7
- package/src/manager/toolbox/ToolboxManager.vue.d.ts +21 -0
- package/src/manager/toolbox/toolboxManager.d.ts +177 -0
- package/src/manager/toolbox/toolboxManager.js +86 -31
- package/src/manager/window/WindowComponent.vue.d.ts +40 -0
- package/src/manager/window/WindowComponentHeader.vue +1 -1
- package/src/manager/window/WindowComponentHeader.vue.d.ts +36 -0
- package/src/manager/window/WindowManager.vue +1 -0
- package/src/manager/window/WindowManager.vue.d.ts +19 -0
- package/src/manager/window/windowHelper.d.ts +134 -0
- package/src/manager/window/windowHelper.js +20 -20
- package/src/manager/window/windowManager.d.ts +422 -0
- package/src/manager/window/windowManager.js +95 -40
- package/src/navigation/MapNavCompass.vue.d.ts +25 -0
- package/src/navigation/MapNavigation.vue +2 -2
- package/src/navigation/MapNavigation.vue.d.ts +46 -0
- package/src/navigation/ObliqueRotation.vue +8 -4
- package/src/navigation/ObliqueRotation.vue.d.ts +14 -0
- package/src/navigation/OrientationToolsButton.vue.d.ts +30 -0
- package/src/navigation/TiltSlider.vue.d.ts +19 -0
- package/src/navigation/VcsCompass.vue.d.ts +25 -0
- package/src/navigation/VcsZoomButton.vue +6 -3
- package/src/navigation/VcsZoomButton.vue.d.ts +2 -0
- package/src/navigation/overviewMap.d.ts +199 -0
- package/src/navigation/overviewMap.js +3 -7
- package/src/navigation/overviewMapClickedInteraction.d.ts +21 -0
- package/src/notifier/NotifierComponent.vue.d.ts +10 -0
- package/src/notifier/notifier.d.ts +53 -0
- package/src/notifier/notifier.js +0 -1
- package/src/pluginHelper.d.ts +67 -0
- package/src/pluginHelper.js +11 -9
- package/src/search/ResultItem.vue.d.ts +25 -0
- package/src/search/ResultsComponent.vue +1 -1
- package/src/search/ResultsComponent.vue.d.ts +24 -0
- package/src/search/SearchComponent.vue +1 -1
- package/src/search/SearchComponent.vue.d.ts +10 -0
- package/src/search/search.d.ts +129 -0
- package/src/search/search.js +8 -11
- package/src/setup.d.ts +1 -0
- package/src/state.d.ts +57 -0
- package/src/state.js +7 -5
- package/src/uiConfig.d.ts +99 -0
- package/src/uiConfig.js +17 -7
- package/src/vcsUiApp.d.ts +301 -0
- package/src/vcsUiApp.js +57 -53
- package/src/vuePlugins/i18n.d.ts +10 -0
- package/src/vuePlugins/i18n.js +3 -3
- package/src/vuePlugins/vuetify.d.ts +27 -0
- package/tsconfig.json +36 -0
- package/dist/assets/index-f265c560.js +0 -1
- package/plugins/@vcmap-show-case/window-tester/src/toolboxData.js +0 -288
@@ -0,0 +1,359 @@
|
|
1
|
+
import { v4 as uuid } from 'uuid';
|
2
|
+
import {
|
3
|
+
Extent,
|
4
|
+
GeometryType,
|
5
|
+
LayerState,
|
6
|
+
markVolatile,
|
7
|
+
maxZIndex,
|
8
|
+
mercatorProjection,
|
9
|
+
startCreateFeatureSession,
|
10
|
+
startEditFeaturesSession,
|
11
|
+
startEditGeometrySession,
|
12
|
+
VectorLayer,
|
13
|
+
Viewpoint,
|
14
|
+
} from '@vcmap/core';
|
15
|
+
import { reactive, ref, watch, nextTick } from 'vue';
|
16
|
+
import { Feature } from 'ol';
|
17
|
+
import { transformExtent } from 'ol/proj.js';
|
18
|
+
import { fromExtent } from 'ol/geom/Polygon.js';
|
19
|
+
import { createOrUpdateFromCoordinates } from 'ol/extent.js';
|
20
|
+
import { Polygon } from 'ol/geom.js';
|
21
|
+
import { unByKey } from 'ol/Observable.js';
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
25
|
+
* @param {import("vue").ComputedRef<import("@vcmap/core").Extent>|import("vue").Ref<import("@vcmap/core").Extent>} extent
|
26
|
+
* @returns {import("./actionHelper.js").VcsAction}
|
27
|
+
*/
|
28
|
+
export function createZoomToExtentAction(app, extent) {
|
29
|
+
return {
|
30
|
+
name: 'components.extent.zoom',
|
31
|
+
icon: 'mdi-target',
|
32
|
+
active: false,
|
33
|
+
callback() {
|
34
|
+
const vp = Viewpoint.createViewpointFromExtent(extent.value);
|
35
|
+
if (vp) {
|
36
|
+
app.maps.activeMap.gotoViewpoint(vp);
|
37
|
+
}
|
38
|
+
},
|
39
|
+
};
|
40
|
+
}
|
41
|
+
|
42
|
+
/**
|
43
|
+
* @param {import("@vcmap/core").Layer} layer
|
44
|
+
* @param {boolean} disabled
|
45
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: (function(): void)}}
|
46
|
+
*/
|
47
|
+
export function createLayerToggleAction(layer, disabled) {
|
48
|
+
const action = reactive({
|
49
|
+
name: 'components.extent.toggle',
|
50
|
+
title: 'components.extent.show',
|
51
|
+
icon: '$vcsEye',
|
52
|
+
active: false,
|
53
|
+
disabled,
|
54
|
+
async callback() {
|
55
|
+
if (!this.active) {
|
56
|
+
await layer.activate();
|
57
|
+
this.title = 'components.extent.hide';
|
58
|
+
} else {
|
59
|
+
layer.deactivate();
|
60
|
+
this.title = 'components.extent.show';
|
61
|
+
}
|
62
|
+
},
|
63
|
+
});
|
64
|
+
|
65
|
+
const stateChangedListener = layer.stateChanged.addEventListener((state) => {
|
66
|
+
action.active = state === LayerState.ACTIVE;
|
67
|
+
});
|
68
|
+
|
69
|
+
return { action, destroy: () => stateChangedListener() };
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
*
|
74
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
75
|
+
* @param {import("@vcmap/core").VectorLayer} layer
|
76
|
+
* @param {import("vue").ComputedRef<import("@vcmap/core").Extent>|import("vue").Ref<import("@vcmap/core").Extent>} extent
|
77
|
+
* @param {string} featureId
|
78
|
+
* @param {boolean} disabled
|
79
|
+
* @returns {{ action: import("./actionHelper.js").VcsAction, destroy:()=>void}}
|
80
|
+
*/
|
81
|
+
export function createExtentFeatureAction(
|
82
|
+
app,
|
83
|
+
layer,
|
84
|
+
extent,
|
85
|
+
featureId,
|
86
|
+
disabled,
|
87
|
+
) {
|
88
|
+
let session;
|
89
|
+
const action = reactive({
|
90
|
+
name: 'components.extent.create',
|
91
|
+
title: 'components.extent.create',
|
92
|
+
icon: '$vcsBoundingBox',
|
93
|
+
active: false,
|
94
|
+
disabled,
|
95
|
+
callback() {
|
96
|
+
if (!this.active) {
|
97
|
+
this.active = true;
|
98
|
+
layer.activate();
|
99
|
+
layer.removeFeaturesById([featureId]);
|
100
|
+
session = startCreateFeatureSession(app, layer, GeometryType.BBox);
|
101
|
+
const listeners = [
|
102
|
+
session.creationFinished.addEventListener((f) => {
|
103
|
+
if (f) {
|
104
|
+
f.setId(featureId);
|
105
|
+
const newExtent = transformExtent(
|
106
|
+
f.getGeometry().getExtent(),
|
107
|
+
mercatorProjection.proj,
|
108
|
+
extent.value.projection.epsg,
|
109
|
+
);
|
110
|
+
extent.value = Object.assign(extent.value, {
|
111
|
+
extent: newExtent,
|
112
|
+
});
|
113
|
+
session.stop();
|
114
|
+
}
|
115
|
+
}),
|
116
|
+
session.stopped.addEventListener(() => {
|
117
|
+
this.active = false;
|
118
|
+
listeners.forEach((cb) => cb());
|
119
|
+
}),
|
120
|
+
];
|
121
|
+
} else {
|
122
|
+
session?.stop();
|
123
|
+
this.active = false;
|
124
|
+
}
|
125
|
+
},
|
126
|
+
});
|
127
|
+
return {
|
128
|
+
action,
|
129
|
+
destroy: () => {
|
130
|
+
if (session) {
|
131
|
+
session.stop();
|
132
|
+
session = null;
|
133
|
+
}
|
134
|
+
},
|
135
|
+
};
|
136
|
+
}
|
137
|
+
|
138
|
+
/**
|
139
|
+
* @param {import("ol").Feature<import("ol/geom").Polygon>} feature
|
140
|
+
* @param {import("vue").WritableComputedRef<import("@vcmap/core").Extent>} extent
|
141
|
+
*/
|
142
|
+
function updateExtentFromFeature(feature, extent) {
|
143
|
+
const options = extent.value.toJSON();
|
144
|
+
options.coordinates = transformExtent(
|
145
|
+
createOrUpdateFromCoordinates(feature.getGeometry().getCoordinates()[0]),
|
146
|
+
mercatorProjection.proj,
|
147
|
+
extent.value.projection.proj,
|
148
|
+
);
|
149
|
+
|
150
|
+
extent.value = new Extent(options);
|
151
|
+
}
|
152
|
+
|
153
|
+
/**
|
154
|
+
* @param {import("../vcsUiApp.js").default} app
|
155
|
+
* @param {import("@vcmap/core").VectorLayer} layer
|
156
|
+
* @param {string} featureId
|
157
|
+
* @param {import("vue").WritableComputedRef<import("@vcmap/core").Extent>} extent
|
158
|
+
* @param {import("vue").Ref<boolean>} suspendFeatureUpdate
|
159
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy(): void}}
|
160
|
+
*/
|
161
|
+
function setupTranslateAction(
|
162
|
+
app,
|
163
|
+
layer,
|
164
|
+
featureId,
|
165
|
+
extent,
|
166
|
+
suspendFeatureUpdate,
|
167
|
+
) {
|
168
|
+
let session;
|
169
|
+
const action = reactive({
|
170
|
+
name: 'components.extent.translate',
|
171
|
+
title: 'components.extent.translate',
|
172
|
+
icon: 'mdi-axis-arrow',
|
173
|
+
active: false,
|
174
|
+
async callback() {
|
175
|
+
if (session) {
|
176
|
+
session.stop();
|
177
|
+
} else {
|
178
|
+
const feature = layer.getFeatureById(featureId);
|
179
|
+
if (feature) {
|
180
|
+
const featureListener = feature.getGeometry().on('change', () => {
|
181
|
+
suspendFeatureUpdate.value = true;
|
182
|
+
updateExtentFromFeature(feature, extent);
|
183
|
+
nextTick(() => {
|
184
|
+
suspendFeatureUpdate.value = false;
|
185
|
+
});
|
186
|
+
});
|
187
|
+
await layer.activate();
|
188
|
+
session = startEditFeaturesSession(app, layer);
|
189
|
+
session.stopped.addEventListener(() => {
|
190
|
+
action.active = false;
|
191
|
+
unByKey(featureListener);
|
192
|
+
session = undefined;
|
193
|
+
});
|
194
|
+
session.setFeatures([feature]);
|
195
|
+
action.active = true;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
},
|
199
|
+
});
|
200
|
+
|
201
|
+
return {
|
202
|
+
action,
|
203
|
+
destroy() {
|
204
|
+
session?.stop();
|
205
|
+
},
|
206
|
+
};
|
207
|
+
}
|
208
|
+
|
209
|
+
/**
|
210
|
+
* @param {import("../vcsUiApp.js").default} app
|
211
|
+
* @param {import("@vcmap/core").VectorLayer} layer
|
212
|
+
* @param {string} featureId
|
213
|
+
* @param {import("vue").WritableComputedRef<import("@vcmap/core").Extent>} extent
|
214
|
+
* @param {import("vue").Ref<boolean>} suspendFeatureUpdate
|
215
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy(): void}}
|
216
|
+
*/
|
217
|
+
function setupVertexAction(
|
218
|
+
app,
|
219
|
+
layer,
|
220
|
+
featureId,
|
221
|
+
extent,
|
222
|
+
suspendFeatureUpdate,
|
223
|
+
) {
|
224
|
+
let session;
|
225
|
+
const action = reactive({
|
226
|
+
name: 'components.extent.editVertices',
|
227
|
+
title: 'components.extent.editVertices',
|
228
|
+
icon: '$vcsEditVertices',
|
229
|
+
active: false,
|
230
|
+
disabled: false,
|
231
|
+
async callback() {
|
232
|
+
if (session) {
|
233
|
+
session.stop();
|
234
|
+
} else {
|
235
|
+
const feature = layer.getFeatureById(featureId);
|
236
|
+
if (feature) {
|
237
|
+
const featureListener = feature.getGeometry().on('change', () => {
|
238
|
+
suspendFeatureUpdate.value = true;
|
239
|
+
updateExtentFromFeature(feature, extent);
|
240
|
+
nextTick(() => {
|
241
|
+
suspendFeatureUpdate.value = false;
|
242
|
+
});
|
243
|
+
});
|
244
|
+
await layer.activate();
|
245
|
+
session = startEditGeometrySession(app, layer);
|
246
|
+
session.stopped.addEventListener(() => {
|
247
|
+
action.active = false;
|
248
|
+
unByKey(featureListener);
|
249
|
+
session = undefined;
|
250
|
+
});
|
251
|
+
session.setFeature(feature);
|
252
|
+
action.active = true;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
},
|
256
|
+
});
|
257
|
+
|
258
|
+
return {
|
259
|
+
action,
|
260
|
+
destroy() {
|
261
|
+
session?.stop();
|
262
|
+
},
|
263
|
+
};
|
264
|
+
}
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Synchronizes a feature with an extent
|
268
|
+
* @param {import("vue").ComputedRef<import("@vcmap/core").Extent>|import("vue").Ref<import("@vcmap/core").Extent>} extent
|
269
|
+
* @param {import("@vcmap/core").VectorLayer} layer
|
270
|
+
* @param {string} featureId
|
271
|
+
*/
|
272
|
+
function syncExtentFeature(extent, layer, featureId) {
|
273
|
+
const extentGeometry = fromExtent(extent.value.extent);
|
274
|
+
extentGeometry.transform(
|
275
|
+
extent.value.projection.proj,
|
276
|
+
mercatorProjection.proj,
|
277
|
+
);
|
278
|
+
const coordinates = extentGeometry.getCoordinates();
|
279
|
+
coordinates[0].forEach((c) => {
|
280
|
+
c.push(0);
|
281
|
+
});
|
282
|
+
coordinates[0].pop();
|
283
|
+
const geometry = new Polygon(coordinates, 'XYZ');
|
284
|
+
geometry.set('_vcsGeomType', GeometryType.BBox);
|
285
|
+
layer.getFeatureById(featureId).setGeometry(geometry);
|
286
|
+
}
|
287
|
+
|
288
|
+
/**
|
289
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
290
|
+
* @param {import("vue").ComputedRef<import("@vcmap/core").Extent>|import("vue").Ref<import("@vcmap/core").Extent>|import("vue").WritableComputedRef<import("@vcmap/core").Extent>} extent
|
291
|
+
* @param {boolean} disabled
|
292
|
+
* @returns {{ actions: Array<import("./actionHelper.js").VcsAction>, destroy: () => void, layer: import("@vcmap/core").VectorLayer, featureId: string }}
|
293
|
+
*/
|
294
|
+
export function setupExtentComponentActions(app, extent, disabled) {
|
295
|
+
const layer = new VectorLayer({
|
296
|
+
projection: mercatorProjection.toJSON(),
|
297
|
+
zIndex: maxZIndex - 1,
|
298
|
+
});
|
299
|
+
markVolatile(layer);
|
300
|
+
app.layers.add(layer);
|
301
|
+
|
302
|
+
const feature = new Feature();
|
303
|
+
const featureId = uuid();
|
304
|
+
const suspendFeatureUpdate = ref(false);
|
305
|
+
feature.setId(featureId);
|
306
|
+
layer.addFeatures([feature]);
|
307
|
+
|
308
|
+
if (extent.value.isValid()) {
|
309
|
+
syncExtentFeature(extent, layer, featureId);
|
310
|
+
}
|
311
|
+
|
312
|
+
const stopWatching = watch(
|
313
|
+
extent,
|
314
|
+
() => {
|
315
|
+
if (extent.value.isValid() && !suspendFeatureUpdate.value) {
|
316
|
+
syncExtentFeature(extent, layer, featureId);
|
317
|
+
}
|
318
|
+
},
|
319
|
+
{ deep: true },
|
320
|
+
);
|
321
|
+
|
322
|
+
const { action: showExtentAction, destroy: destroyShowExtent } =
|
323
|
+
createLayerToggleAction(layer, disabled);
|
324
|
+
const { action: createExtentAction, destroy: destroyCreateExtent } =
|
325
|
+
createExtentFeatureAction(app, layer, extent, featureId, disabled);
|
326
|
+
const zoomToExtentAction = createZoomToExtentAction(app, extent);
|
327
|
+
zoomToExtentAction.title = 'components.extent.zoom';
|
328
|
+
const { action: translateAction, destroy: destroyTranslate } =
|
329
|
+
setupTranslateAction(app, layer, featureId, extent, suspendFeatureUpdate);
|
330
|
+
const { action: vertexAction, destroy: destroyVertex } = setupVertexAction(
|
331
|
+
app,
|
332
|
+
layer,
|
333
|
+
featureId,
|
334
|
+
extent,
|
335
|
+
suspendFeatureUpdate,
|
336
|
+
);
|
337
|
+
|
338
|
+
return {
|
339
|
+
actions: [
|
340
|
+
showExtentAction,
|
341
|
+
createExtentAction,
|
342
|
+
vertexAction,
|
343
|
+
translateAction,
|
344
|
+
zoomToExtentAction,
|
345
|
+
],
|
346
|
+
destroy: () => {
|
347
|
+
layer.deactivate();
|
348
|
+
app.layers.remove(layer);
|
349
|
+
layer.destroy();
|
350
|
+
destroyShowExtent();
|
351
|
+
destroyCreateExtent();
|
352
|
+
destroyTranslate();
|
353
|
+
destroyVertex();
|
354
|
+
stopWatching();
|
355
|
+
},
|
356
|
+
layer,
|
357
|
+
featureId,
|
358
|
+
};
|
359
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* @param {import("../vcsUiApp.js").default} app
|
3
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
4
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: () => void}}
|
5
|
+
*/
|
6
|
+
export function createPlayAction(app: import("../vcsUiApp.js").default, instance: import("@vcmap/core").FlightInstance): {
|
7
|
+
action: import("./actionHelper.js").VcsAction;
|
8
|
+
destroy: () => void;
|
9
|
+
};
|
10
|
+
/**
|
11
|
+
* @param {import("../vcsUiApp.js").default} app
|
12
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
13
|
+
* @param {PlayerDirection} direction
|
14
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: () => void}}
|
15
|
+
*/
|
16
|
+
export function createStepAction(app: import("../vcsUiApp.js").default, instance: import("@vcmap/core").FlightInstance, direction: PlayerDirection): {
|
17
|
+
action: import("./actionHelper.js").VcsAction;
|
18
|
+
destroy: () => void;
|
19
|
+
};
|
20
|
+
/**
|
21
|
+
* @param {import("../vcsUiApp.js").default} app
|
22
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
23
|
+
* @param {PlayerDirection} direction
|
24
|
+
* @returns {{ action: import("./actionHelper.js").VcsAction & { listeners:Object<string,()=>void>, destroy: () => void }}}
|
25
|
+
*/
|
26
|
+
export function createFastAction(app: import("../vcsUiApp.js").default, instance: import("@vcmap/core").FlightInstance, direction: PlayerDirection): {
|
27
|
+
action: import("./actionHelper.js").VcsAction & {
|
28
|
+
listeners: {
|
29
|
+
[x: string]: () => void;
|
30
|
+
};
|
31
|
+
destroy: () => void;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
/**
|
35
|
+
*
|
36
|
+
* @param {import("../vcsUiApp.js").default} app
|
37
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
38
|
+
* @returns {{destroy: (() => void), actions: Array<import("./actionHelper.js").VcsAction> }}
|
39
|
+
*/
|
40
|
+
export function createFlightPlayerActions(app: import("../vcsUiApp.js").default, instance: import("@vcmap/core").FlightInstance): {
|
41
|
+
destroy: (() => void);
|
42
|
+
actions: Array<import("./actionHelper.js").VcsAction>;
|
43
|
+
};
|
44
|
+
/**
|
45
|
+
*
|
46
|
+
* @param {import("../vcsUiApp.js").default} app
|
47
|
+
* @param {import("@vcmap/core").FlightInstance} flightInstance
|
48
|
+
* @param {boolean} [active=true]
|
49
|
+
* @returns {Promise<{action: import("./actionHelper.js").VcsAction, destroy:()=>void}>}
|
50
|
+
*/
|
51
|
+
export function createFlightVisualizationAction(app: import("../vcsUiApp.js").default, flightInstance: import("@vcmap/core").FlightInstance, active?: boolean | undefined): Promise<{
|
52
|
+
action: import("./actionHelper.js").VcsAction;
|
53
|
+
destroy: () => void;
|
54
|
+
}>;
|
55
|
+
export type PlayerDirection = string;
|
56
|
+
export namespace PlayerDirection {
|
57
|
+
let Forward: string;
|
58
|
+
let Backward: string;
|
59
|
+
}
|
@@ -0,0 +1,232 @@
|
|
1
|
+
import { reactive } from 'vue';
|
2
|
+
import { check } from '@vcsuite/check';
|
3
|
+
import { createFlightVisualization } from '@vcmap/core';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @param {import("../vcsUiApp.js").default} app
|
7
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
8
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: () => void}}
|
9
|
+
*/
|
10
|
+
export function createPlayAction(app, instance) {
|
11
|
+
let stateListener = () => {};
|
12
|
+
let destroyListener = () => {};
|
13
|
+
/** @type {import("@vcmap/core").FlightPlayer|undefined} */
|
14
|
+
let player;
|
15
|
+
|
16
|
+
const action = reactive({
|
17
|
+
name: 'play',
|
18
|
+
icon: '$vcsPlayCircle',
|
19
|
+
title: 'flight.playTooltip',
|
20
|
+
callback: async () => {
|
21
|
+
if (player) {
|
22
|
+
if (player.state === 'playing') {
|
23
|
+
player.pause();
|
24
|
+
} else {
|
25
|
+
player.play();
|
26
|
+
}
|
27
|
+
} else {
|
28
|
+
player = await app.flights.setPlayerForFlight(instance);
|
29
|
+
if (player) {
|
30
|
+
stateListener = player.stateChanged.addEventListener((state) => {
|
31
|
+
if (state === 'stopped') {
|
32
|
+
action.icon = '$vcsPlayCircle';
|
33
|
+
action.title = 'flight.playTooltip';
|
34
|
+
} else if (state === 'paused') {
|
35
|
+
action.icon = '$vcsPlayCircle';
|
36
|
+
action.title = 'flight.playTooltip';
|
37
|
+
} else {
|
38
|
+
action.icon = 'mdi-pause';
|
39
|
+
action.title = 'flight.pauseTooltip';
|
40
|
+
}
|
41
|
+
});
|
42
|
+
destroyListener = player.destroyed.addEventListener(() => {
|
43
|
+
player = null;
|
44
|
+
action.icon = '$vcsPlayCircle';
|
45
|
+
stateListener();
|
46
|
+
destroyListener();
|
47
|
+
});
|
48
|
+
player.play();
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
});
|
53
|
+
|
54
|
+
return {
|
55
|
+
action,
|
56
|
+
destroy: () => {
|
57
|
+
if (player) {
|
58
|
+
player.stop();
|
59
|
+
player.destroy();
|
60
|
+
player = null;
|
61
|
+
}
|
62
|
+
},
|
63
|
+
};
|
64
|
+
}
|
65
|
+
|
66
|
+
/**
|
67
|
+
* @enum {string}
|
68
|
+
*/
|
69
|
+
export const PlayerDirection = {
|
70
|
+
Forward: 'forward',
|
71
|
+
Backward: 'backward',
|
72
|
+
};
|
73
|
+
|
74
|
+
/**
|
75
|
+
* @param {import("../vcsUiApp.js").default} app
|
76
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
77
|
+
* @param {PlayerDirection} direction
|
78
|
+
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: () => void}}
|
79
|
+
*/
|
80
|
+
export function createStepAction(app, instance, direction) {
|
81
|
+
check(direction, Object.values(PlayerDirection));
|
82
|
+
|
83
|
+
let player;
|
84
|
+
const action = reactive({
|
85
|
+
name: `step-${direction}`,
|
86
|
+
icon: `mdi-step-${direction}`,
|
87
|
+
title: `flight.${direction}StepTooltip`,
|
88
|
+
disabled: false,
|
89
|
+
async callback() {
|
90
|
+
if (player) {
|
91
|
+
player[direction]?.();
|
92
|
+
}
|
93
|
+
},
|
94
|
+
});
|
95
|
+
|
96
|
+
const playerChangedListener = app.flights.playerChanged.addEventListener(
|
97
|
+
(activePlayer) => {
|
98
|
+
if (activePlayer?.flightInstanceName === instance.name) {
|
99
|
+
player = activePlayer;
|
100
|
+
action.disabled = false;
|
101
|
+
} else {
|
102
|
+
action.disabled = true;
|
103
|
+
}
|
104
|
+
},
|
105
|
+
);
|
106
|
+
|
107
|
+
return { action, destroy: playerChangedListener };
|
108
|
+
}
|
109
|
+
|
110
|
+
/**
|
111
|
+
* @param {import("../vcsUiApp.js").default} app
|
112
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
113
|
+
* @param {PlayerDirection} direction
|
114
|
+
* @returns {{ action: import("./actionHelper.js").VcsAction & { listeners:Object<string,()=>void>, destroy: () => void }}}
|
115
|
+
*/
|
116
|
+
export function createFastAction(app, instance, direction) {
|
117
|
+
check(direction, Object.values(PlayerDirection));
|
118
|
+
|
119
|
+
let player;
|
120
|
+
const sign = direction === PlayerDirection.Forward ? 1 : -1;
|
121
|
+
const icon =
|
122
|
+
direction === PlayerDirection.Forward ? 'mdi-fast-forward' : 'mdi-rewind';
|
123
|
+
const { multiplier } = instance;
|
124
|
+
|
125
|
+
function accelerate() {
|
126
|
+
instance.multiplier = sign * 5 * multiplier;
|
127
|
+
player?.play();
|
128
|
+
}
|
129
|
+
|
130
|
+
function reset() {
|
131
|
+
instance.multiplier = multiplier;
|
132
|
+
player?.pause();
|
133
|
+
}
|
134
|
+
|
135
|
+
const action = {
|
136
|
+
name: `fast-${direction}`,
|
137
|
+
icon,
|
138
|
+
title: `flight.${direction}FastTooltip`,
|
139
|
+
disabled: false,
|
140
|
+
callback() {},
|
141
|
+
listeners: {
|
142
|
+
mousedown: accelerate,
|
143
|
+
pointerdown: accelerate,
|
144
|
+
mouseup: reset,
|
145
|
+
pointerup: reset,
|
146
|
+
mouseout() {
|
147
|
+
if (instance.multiplier !== multiplier) {
|
148
|
+
reset();
|
149
|
+
}
|
150
|
+
},
|
151
|
+
},
|
152
|
+
};
|
153
|
+
|
154
|
+
const playerChangedListener = app.flights.playerChanged.addEventListener(
|
155
|
+
(activePlayer) => {
|
156
|
+
if (activePlayer?.flightInstanceName === instance.name) {
|
157
|
+
player = activePlayer;
|
158
|
+
action.disabled = false;
|
159
|
+
} else {
|
160
|
+
action.disabled = true;
|
161
|
+
}
|
162
|
+
},
|
163
|
+
);
|
164
|
+
|
165
|
+
return { action, destroy: playerChangedListener };
|
166
|
+
}
|
167
|
+
|
168
|
+
/**
|
169
|
+
*
|
170
|
+
* @param {import("../vcsUiApp.js").default} app
|
171
|
+
* @param {import("@vcmap/core").FlightInstance} instance
|
172
|
+
* @returns {{destroy: (() => void), actions: Array<import("./actionHelper.js").VcsAction> }}
|
173
|
+
*/
|
174
|
+
export function createFlightPlayerActions(app, instance) {
|
175
|
+
const array = [
|
176
|
+
createStepAction(app, instance, PlayerDirection.Backward),
|
177
|
+
createFastAction(app, instance, PlayerDirection.Backward),
|
178
|
+
createPlayAction(app, instance),
|
179
|
+
createFastAction(app, instance, PlayerDirection.Forward),
|
180
|
+
createStepAction(app, instance, PlayerDirection.Forward),
|
181
|
+
];
|
182
|
+
|
183
|
+
return {
|
184
|
+
actions: array.map(({ action }) => action),
|
185
|
+
destroy: () => array.forEach(({ destroy }) => destroy()),
|
186
|
+
};
|
187
|
+
}
|
188
|
+
|
189
|
+
/**
|
190
|
+
*
|
191
|
+
* @param {import("../vcsUiApp.js").default} app
|
192
|
+
* @param {import("@vcmap/core").FlightInstance} flightInstance
|
193
|
+
* @param {boolean} [active=true]
|
194
|
+
* @returns {Promise<{action: import("./actionHelper.js").VcsAction, destroy:()=>void}>}
|
195
|
+
*/
|
196
|
+
export async function createFlightVisualizationAction(
|
197
|
+
app,
|
198
|
+
flightInstance,
|
199
|
+
active = true,
|
200
|
+
) {
|
201
|
+
let flightVis = await createFlightVisualization(flightInstance, app);
|
202
|
+
|
203
|
+
const action = reactive({
|
204
|
+
name: 'components.flight.hidePath',
|
205
|
+
title: 'components.flight.hidePath',
|
206
|
+
icon: 'mdi-eye-outline',
|
207
|
+
active,
|
208
|
+
async callback() {
|
209
|
+
if (!flightVis) {
|
210
|
+
flightVis = await createFlightVisualization(flightInstance, app);
|
211
|
+
}
|
212
|
+
if (this.active) {
|
213
|
+
flightVis.deactivate();
|
214
|
+
} else {
|
215
|
+
await flightVis.activate();
|
216
|
+
}
|
217
|
+
this.active = !this.active;
|
218
|
+
this.icon = this.active ? 'mdi-eye-outline' : 'mdi-eye-off-outline';
|
219
|
+
},
|
220
|
+
});
|
221
|
+
|
222
|
+
if (active) {
|
223
|
+
await flightVis.activate();
|
224
|
+
}
|
225
|
+
|
226
|
+
const destroy = () => {
|
227
|
+
flightVis.deactivate();
|
228
|
+
flightVis.destroy();
|
229
|
+
};
|
230
|
+
|
231
|
+
return { action, destroy };
|
232
|
+
}
|