@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
@@ -1,60 +1,60 @@
|
|
1
1
|
import { VcsEvent, Collection } from '@vcmap/core';
|
2
2
|
import { check, checkMaybe } from '@vcsuite/check';
|
3
3
|
import { validateActions } from '../../components/lists/VcsActionList.vue';
|
4
|
-
import
|
4
|
+
import CollectionComponentClass from './collectionComponentClass.js';
|
5
5
|
|
6
6
|
/**
|
7
|
-
* @
|
8
|
-
* @param {T} item
|
9
|
-
* @param {CollectionComponent<T>} collectionComponent
|
10
|
-
* @param {import("@vcmap/ui").VcsListItem & { destroy: (function():void)|undefined }} listItem - you can add a destroy callback for cleanup
|
7
|
+
* @typedef {function(T, import("./collectionComponentClass.js").default<T>, import("./collectionComponentClass.js").CollectionComponentListItem): void} MappingFunction
|
11
8
|
* @template {Object} T
|
12
9
|
*/
|
13
10
|
|
14
11
|
/**
|
15
|
-
* @
|
16
|
-
* @param {T} item
|
17
|
-
* @param {CollectionComponent<T>} collectionComponent
|
18
|
-
* @returns {boolean}
|
12
|
+
* @typedef {function(T, import("./collectionComponentClass.js").default<T>): boolean} PredicateFunction
|
19
13
|
* @template {Object} T
|
20
14
|
*/
|
21
15
|
|
22
16
|
/**
|
23
|
-
* @typedef {
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
17
|
+
* @typedef {{
|
18
|
+
* predicate?: PredicateFunction<T>,
|
19
|
+
* mappingFunction: MappingFunction<T>,
|
20
|
+
* owner: string | symbol,
|
21
|
+
* }} ItemMapping
|
22
|
+
* @template {Object} T
|
28
23
|
*/
|
29
24
|
|
30
25
|
/**
|
31
|
-
* @typedef {
|
32
|
-
*
|
33
|
-
*
|
34
|
-
*
|
26
|
+
* @typedef {{
|
27
|
+
* filterFunction: PredicateFunction<T>,
|
28
|
+
* owner: string | symbol
|
29
|
+
* }} ItemFilter
|
30
|
+
* @template {Object} T
|
35
31
|
*/
|
36
32
|
|
37
33
|
/**
|
38
34
|
* @typedef {Object} OwnedAction
|
39
|
-
* @property {VcsAction} action
|
35
|
+
* @property {import("../../actions/actionHelper.js").VcsAction} action
|
40
36
|
* @property {number} [weight=0] Optional weight affecting the displaying order
|
41
37
|
* @property {string | symbol} owner
|
42
38
|
*/
|
43
39
|
|
40
|
+
/**
|
41
|
+
* @typedef {import("../../vcsUiApp.js").VcsComponentManager<CollectionComponentClass, import("./collectionComponentClass.js").CollectionComponentClassOptions<Object>>} ICollectionManager
|
42
|
+
*/
|
43
|
+
|
44
44
|
/**
|
45
45
|
* Manages a list of collections as collectionComponents.
|
46
46
|
* Sets the correct mapping/filter functions and actions on the collectionComponent
|
47
47
|
* Provides an API to add/remove collectionsComponents.
|
48
|
-
* @implements {
|
48
|
+
* @implements {ICollectionManager}
|
49
49
|
*/
|
50
50
|
class CollectionManager {
|
51
51
|
constructor() {
|
52
52
|
/**
|
53
|
-
* @type {VcsEvent<
|
53
|
+
* @type {VcsEvent<CollectionComponentClass<Object>>}
|
54
54
|
*/
|
55
55
|
this.added = new VcsEvent();
|
56
56
|
/**
|
57
|
-
* @type {VcsEvent<
|
57
|
+
* @type {VcsEvent<CollectionComponentClass<Object>>}
|
58
58
|
*/
|
59
59
|
this.removed = new VcsEvent();
|
60
60
|
/**
|
@@ -62,7 +62,7 @@ class CollectionManager {
|
|
62
62
|
*/
|
63
63
|
this.componentIds = [];
|
64
64
|
/**
|
65
|
-
* @type {Map<string,
|
65
|
+
* @type {Map<string, CollectionComponentClass<Object>>}
|
66
66
|
* @private
|
67
67
|
*/
|
68
68
|
this._collectionComponents = new Map();
|
@@ -78,7 +78,7 @@ class CollectionManager {
|
|
78
78
|
*/
|
79
79
|
this._itemFilters = [];
|
80
80
|
/**
|
81
|
-
* @type {Array<{actions:Array<VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
81
|
+
* @type {Array<{actions:Array<import("../../actions/actionHelper.js").VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
82
82
|
* @private
|
83
83
|
*/
|
84
84
|
this._actions = [];
|
@@ -86,7 +86,7 @@ class CollectionManager {
|
|
86
86
|
|
87
87
|
/**
|
88
88
|
* @param {string} id
|
89
|
-
* @returns {
|
89
|
+
* @returns {CollectionComponentClass<Object>|undefined}
|
90
90
|
*/
|
91
91
|
get(id) {
|
92
92
|
return this._collectionComponents.get(id);
|
@@ -101,7 +101,7 @@ class CollectionManager {
|
|
101
101
|
}
|
102
102
|
|
103
103
|
/**
|
104
|
-
* @param {import("@vcmap/core").Collection} collection
|
104
|
+
* @param {import("@vcmap/core").Collection<Object>} collection
|
105
105
|
* @returns {boolean}
|
106
106
|
*/
|
107
107
|
hasCollection(collection) {
|
@@ -112,8 +112,9 @@ class CollectionManager {
|
|
112
112
|
|
113
113
|
/**
|
114
114
|
* gets all collection components corresponding to provided collection
|
115
|
-
* @param {import("@vcmap/core").Collection} collection
|
116
|
-
* @returns {
|
115
|
+
* @param {import("@vcmap/core").Collection<T>} collection
|
116
|
+
* @returns {CollectionComponentClass<T>[]}
|
117
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
117
118
|
*/
|
118
119
|
getCollection(collection) {
|
119
120
|
return [...this._collectionComponents.values()].filter(
|
@@ -123,9 +124,10 @@ class CollectionManager {
|
|
123
124
|
|
124
125
|
/**
|
125
126
|
* adds a collectionComponent
|
126
|
-
* @param {
|
127
|
+
* @param {import("./collectionComponentClass.js").CollectionComponentClassOptions<T>} collectionComponentOptions
|
127
128
|
* @param {string|symbol} owner
|
128
|
-
* @returns {
|
129
|
+
* @returns {CollectionComponentClass<T>}
|
130
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
129
131
|
*/
|
130
132
|
add(collectionComponentOptions, owner) {
|
131
133
|
check(collectionComponentOptions, { collection: Collection });
|
@@ -140,7 +142,7 @@ class CollectionManager {
|
|
140
142
|
);
|
141
143
|
}
|
142
144
|
|
143
|
-
const collectionComponent = new
|
145
|
+
const collectionComponent = new CollectionComponentClass(
|
144
146
|
collectionComponentOptions,
|
145
147
|
owner,
|
146
148
|
);
|
@@ -174,7 +176,7 @@ class CollectionManager {
|
|
174
176
|
}
|
175
177
|
|
176
178
|
/**
|
177
|
-
* removes a
|
179
|
+
* removes a CollectionComponentClass, Component will not be rendered anymore and will be destroyed. Add CollectionComponentClass again
|
178
180
|
* to show the component again
|
179
181
|
* @param {string} id
|
180
182
|
*/
|
@@ -206,10 +208,11 @@ class CollectionManager {
|
|
206
208
|
/**
|
207
209
|
* adds MappingFunction to the collectionManager. For the given collectionComponents each Item will be transformed by the
|
208
210
|
* mappingFunction if the predicate returns true.
|
209
|
-
* @param {PredicateFunction} predicate
|
210
|
-
* @param {MappingFunction} mappingFunction
|
211
|
+
* @param {PredicateFunction<T>} predicate
|
212
|
+
* @param {MappingFunction<T>} mappingFunction
|
211
213
|
* @param {string | symbol} owner
|
212
214
|
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this mappingFunction should be used on. If empty, mappingFunction is applied to all managed collectionComponents.
|
215
|
+
* @template {Object} T
|
213
216
|
*/
|
214
217
|
addMappingFunction(
|
215
218
|
predicate,
|
@@ -251,8 +254,9 @@ class CollectionManager {
|
|
251
254
|
|
252
255
|
/**
|
253
256
|
* removes the given mappingFunction
|
254
|
-
* @param {MappingFunction} mappingFunction
|
257
|
+
* @param {MappingFunction<T>} mappingFunction
|
255
258
|
* @param {string | symbol} owner
|
259
|
+
* @template {Object} T
|
256
260
|
*/
|
257
261
|
removeMappingFunction(mappingFunction, owner) {
|
258
262
|
check(mappingFunction, Function);
|
@@ -268,9 +272,10 @@ class CollectionManager {
|
|
268
272
|
}
|
269
273
|
|
270
274
|
/**
|
271
|
-
* @param {PredicateFunction} filterFunction
|
275
|
+
* @param {PredicateFunction<T>} filterFunction
|
272
276
|
* @param {string | symbol} owner
|
273
277
|
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this filterFunction should be used on. If empty, filterFunction is applied to all managed collectionComponents.
|
278
|
+
* @template {Object} T
|
274
279
|
*/
|
275
280
|
addFilterFunction(filterFunction, owner, collectionComponentIds = []) {
|
276
281
|
check(filterFunction, Function);
|
@@ -305,8 +310,9 @@ class CollectionManager {
|
|
305
310
|
|
306
311
|
/**
|
307
312
|
* removes the given filterFunction
|
308
|
-
* @param {PredicateFunction} filterFunction
|
313
|
+
* @param {PredicateFunction<T>} filterFunction
|
309
314
|
* @param {string | symbol} owner
|
315
|
+
* @template {Object} T
|
310
316
|
*/
|
311
317
|
removeFilterFunction(filterFunction, owner) {
|
312
318
|
check(filterFunction, Function);
|
@@ -323,7 +329,7 @@ class CollectionManager {
|
|
323
329
|
|
324
330
|
/**
|
325
331
|
* add multiple actions owned by the same owner
|
326
|
-
* @param {Array<VcsAction>} actions
|
332
|
+
* @param {Array<import("../../actions/actionHelper.js").VcsAction>} actions
|
327
333
|
* @param {string | symbol} owner
|
328
334
|
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this mappingFunction should be used on. If empty, actions are applied to all managed collectionComponents.
|
329
335
|
*/
|
@@ -356,7 +362,7 @@ class CollectionManager {
|
|
356
362
|
}
|
357
363
|
|
358
364
|
/**
|
359
|
-
* @param {Array<VcsAction>} actions
|
365
|
+
* @param {Array<import("../../actions/actionHelper.js").VcsAction>} actions
|
360
366
|
* @param {string | symbol} owner
|
361
367
|
*/
|
362
368
|
removeActions(actions, owner) {
|
@@ -0,0 +1,60 @@
|
|
1
|
+
/**
|
2
|
+
* Adds select behaviour toggling editor or multi-editor components. Two modes are distinguished:
|
3
|
+
* - selection based (default): editor windows are toggled on selection change. All editor windows are exclusive.
|
4
|
+
* - clicked based: editor windows are opened on click. Multiple editor windows can be open at the same time.
|
5
|
+
* @param {import("../../vcsUiApp.js").default} app
|
6
|
+
* @param {import("./collectionComponentClass.js").default<T>} collectionComponent
|
7
|
+
* @param {EditingOptions<T>} editingOptions
|
8
|
+
* @param {string} [parentId='category-manager'] - windowId of window with CollectionComponent
|
9
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
10
|
+
* @returns {EditorCollectionComponentClass<T>}
|
11
|
+
*/
|
12
|
+
export function makeEditorCollectionComponentClass<T extends Object | import("@vcmap/core/dist/src/vcsObject.js").default>(app: import("../../vcsUiApp.js").default, collectionComponent: CollectionComponentClass<T>, editingOptions: EditingOptions<T>, parentId?: string | undefined): EditorCollectionComponentClass<T>;
|
13
|
+
/**
|
14
|
+
* @typedef {Omit<import("../window/windowManager.js").WindowComponentOptions,"id"|"parentId"|"slot">} EditorWindowComponentOptions
|
15
|
+
*/
|
16
|
+
/**
|
17
|
+
* @typedef {{
|
18
|
+
* editor: EditorWindowComponentOptions|function(T):EditorWindowComponentOptions|undefined,
|
19
|
+
* multiEditor?: EditorWindowComponentOptions,
|
20
|
+
* selectionBased?: boolean
|
21
|
+
* }} EditingOptions
|
22
|
+
* @property {EditorWindowComponentOptions|function(T)|undefined} editor
|
23
|
+
* @property {EditorWindowComponentOptions} [multiEditor]
|
24
|
+
* @property {boolean} [selectionBased=true] - If true, editor windows are coupled to selection and editor windows are exclusive
|
25
|
+
* @template {Object} T
|
26
|
+
*/
|
27
|
+
/**
|
28
|
+
* @typedef {import("./collectionComponentClass.js").default<T> & {
|
29
|
+
* getEditorWindowId: function(T):string,
|
30
|
+
* getMultiEditorWindowId: function():string|undefined,
|
31
|
+
* closeEditorWindow: function(T):void,
|
32
|
+
* closeEditorWindows: function():void,
|
33
|
+
* closeMultiEditorWindow: function():void,
|
34
|
+
* openEditorWindow: function(T):void,
|
35
|
+
* openMultiEditorWindow: function():void,
|
36
|
+
* parentId: string,
|
37
|
+
* }} EditorCollectionComponentClass
|
38
|
+
* @template {Object} T
|
39
|
+
*/
|
40
|
+
/**
|
41
|
+
* A symbol added to collection component class with editor selection behaviour.
|
42
|
+
*/
|
43
|
+
export const isEditorCollectionComponentClass: unique symbol;
|
44
|
+
export type EditorWindowComponentOptions = Omit<import("../window/windowManager.js").WindowComponentOptions, "id" | "parentId" | "slot">;
|
45
|
+
export type EditingOptions<T extends Object> = {
|
46
|
+
editor: EditorWindowComponentOptions | ((arg0: T) => EditorWindowComponentOptions | undefined);
|
47
|
+
multiEditor?: EditorWindowComponentOptions;
|
48
|
+
selectionBased?: boolean;
|
49
|
+
};
|
50
|
+
export type EditorCollectionComponentClass<T extends Object> = import("./collectionComponentClass.js").default<T> & {
|
51
|
+
getEditorWindowId: (arg0: T) => string;
|
52
|
+
getMultiEditorWindowId: () => string | undefined;
|
53
|
+
closeEditorWindow: (arg0: T) => void;
|
54
|
+
closeEditorWindows: () => void;
|
55
|
+
closeMultiEditorWindow: () => void;
|
56
|
+
openEditorWindow: (arg0: T) => void;
|
57
|
+
openMultiEditorWindow: () => void;
|
58
|
+
parentId: string;
|
59
|
+
};
|
60
|
+
import CollectionComponentClass from './collectionComponentClass.js';
|
@@ -0,0 +1,295 @@
|
|
1
|
+
import { nextTick, reactive, watch } from 'vue';
|
2
|
+
import { check, checkMaybe } from '@vcsuite/check';
|
3
|
+
import { WindowSlot } from '../window/windowManager.js';
|
4
|
+
import CollectionComponentClass from './collectionComponentClass.js';
|
5
|
+
import { createListEditAction } from '../../actions/listActions.js';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @typedef {Omit<import("../window/windowManager.js").WindowComponentOptions,"id"|"parentId"|"slot">} EditorWindowComponentOptions
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @typedef {{
|
13
|
+
* editor: EditorWindowComponentOptions|function(T):EditorWindowComponentOptions|undefined,
|
14
|
+
* multiEditor?: EditorWindowComponentOptions,
|
15
|
+
* selectionBased?: boolean
|
16
|
+
* }} EditingOptions
|
17
|
+
* @property {EditorWindowComponentOptions|function(T)|undefined} editor
|
18
|
+
* @property {EditorWindowComponentOptions} [multiEditor]
|
19
|
+
* @property {boolean} [selectionBased=true] - If true, editor windows are coupled to selection and editor windows are exclusive
|
20
|
+
* @template {Object} T
|
21
|
+
*/
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @typedef {import("./collectionComponentClass.js").default<T> & {
|
25
|
+
* getEditorWindowId: function(T):string,
|
26
|
+
* getMultiEditorWindowId: function():string|undefined,
|
27
|
+
* closeEditorWindow: function(T):void,
|
28
|
+
* closeEditorWindows: function():void,
|
29
|
+
* closeMultiEditorWindow: function():void,
|
30
|
+
* openEditorWindow: function(T):void,
|
31
|
+
* openMultiEditorWindow: function():void,
|
32
|
+
* parentId: string,
|
33
|
+
* }} EditorCollectionComponentClass
|
34
|
+
* @template {Object} T
|
35
|
+
*/
|
36
|
+
|
37
|
+
/**
|
38
|
+
* A symbol added to collection component class with editor selection behaviour.
|
39
|
+
*/
|
40
|
+
export const isEditorCollectionComponentClass = Symbol(
|
41
|
+
'EditorCollectionComponentClass',
|
42
|
+
);
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Adds select behaviour toggling editor or multi-editor components. Two modes are distinguished:
|
46
|
+
* - selection based (default): editor windows are toggled on selection change. All editor windows are exclusive.
|
47
|
+
* - clicked based: editor windows are opened on click. Multiple editor windows can be open at the same time.
|
48
|
+
* @param {import("../../vcsUiApp.js").default} app
|
49
|
+
* @param {import("./collectionComponentClass.js").default<T>} collectionComponent
|
50
|
+
* @param {EditingOptions<T>} editingOptions
|
51
|
+
* @param {string} [parentId='category-manager'] - windowId of window with CollectionComponent
|
52
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
53
|
+
* @returns {EditorCollectionComponentClass<T>}
|
54
|
+
*/
|
55
|
+
export function makeEditorCollectionComponentClass(
|
56
|
+
app,
|
57
|
+
collectionComponent,
|
58
|
+
editingOptions,
|
59
|
+
parentId = 'category-manager',
|
60
|
+
) {
|
61
|
+
check(collectionComponent, CollectionComponentClass);
|
62
|
+
check(editingOptions.editor, [Object, Function]);
|
63
|
+
checkMaybe(editingOptions.multiEditor, Object);
|
64
|
+
|
65
|
+
const editorCollectionComponent =
|
66
|
+
/** @type {EditorCollectionComponentClass} */ collectionComponent;
|
67
|
+
|
68
|
+
if (!editorCollectionComponent.selectable.value) {
|
69
|
+
editorCollectionComponent.selectable.value = true;
|
70
|
+
}
|
71
|
+
|
72
|
+
if (editorCollectionComponent[isEditorCollectionComponentClass]) {
|
73
|
+
throw new Error(
|
74
|
+
'Cannot transform collectionComponentClass, since it is already an EditorCollectionComponentClass',
|
75
|
+
);
|
76
|
+
}
|
77
|
+
editorCollectionComponent[isEditorCollectionComponentClass] = true;
|
78
|
+
|
79
|
+
const {
|
80
|
+
editor,
|
81
|
+
multiEditor = undefined,
|
82
|
+
selectionBased = true,
|
83
|
+
} = editingOptions;
|
84
|
+
const keyProperty = editorCollectionComponent.collection.uniqueKey;
|
85
|
+
const exclusiveEditorId = `${editorCollectionComponent.id}-editor`;
|
86
|
+
const multiEditorId = `${editorCollectionComponent.id}-multi-editor`;
|
87
|
+
|
88
|
+
/**
|
89
|
+
* @param {import("collectionComponentClass.js").CollectionComponentListItem} listItem
|
90
|
+
* @returns {T}
|
91
|
+
*/
|
92
|
+
function getItemForListItem(listItem) {
|
93
|
+
return editorCollectionComponent.collection.getByKey(listItem.name);
|
94
|
+
}
|
95
|
+
|
96
|
+
/**
|
97
|
+
* @param {T} item
|
98
|
+
* @returns {string}
|
99
|
+
*/
|
100
|
+
function getEditorWindowId(item) {
|
101
|
+
if (selectionBased) {
|
102
|
+
return exclusiveEditorId;
|
103
|
+
}
|
104
|
+
return `${exclusiveEditorId}-${item[keyProperty]}`;
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* @returns {string|undefined}
|
109
|
+
*/
|
110
|
+
function getMultiEditorWindowId() {
|
111
|
+
if (multiEditor) {
|
112
|
+
return multiEditorId;
|
113
|
+
}
|
114
|
+
return undefined;
|
115
|
+
}
|
116
|
+
|
117
|
+
/**
|
118
|
+
* @param {T} item
|
119
|
+
* @returns {EditorWindowComponentOptions}
|
120
|
+
*/
|
121
|
+
function getEditorWindowOptions(item) {
|
122
|
+
return typeof editor === 'function' ? editor(item) : editor;
|
123
|
+
}
|
124
|
+
|
125
|
+
/**
|
126
|
+
* @param {T} item
|
127
|
+
*/
|
128
|
+
function closeEditorWindow(item) {
|
129
|
+
const id = getEditorWindowId(item);
|
130
|
+
if (app.windowManager.has(id)) {
|
131
|
+
app.windowManager.remove(id);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
function closeEditorWindows() {
|
136
|
+
app.windowManager.componentIds
|
137
|
+
.filter((id) => id.startsWith(exclusiveEditorId))
|
138
|
+
.forEach((id) => app.windowManager.remove(id));
|
139
|
+
}
|
140
|
+
|
141
|
+
function closeMultiEditorWindow() {
|
142
|
+
if (app.windowManager.has(multiEditorId)) {
|
143
|
+
app.windowManager.remove(multiEditorId);
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
/**
|
148
|
+
* @param {T} item
|
149
|
+
*/
|
150
|
+
function openEditorWindow(item) {
|
151
|
+
const editorOptions = getEditorWindowOptions(item);
|
152
|
+
const id = getEditorWindowId(item);
|
153
|
+
if (editorOptions) {
|
154
|
+
closeMultiEditorWindow();
|
155
|
+
if (app.windowManager.has(id)) {
|
156
|
+
app.windowManager.bringWindowToTop(id);
|
157
|
+
} else {
|
158
|
+
app.windowManager.add(
|
159
|
+
{
|
160
|
+
...editorOptions,
|
161
|
+
id,
|
162
|
+
slot: WindowSlot.DYNAMIC_CHILD,
|
163
|
+
parentId,
|
164
|
+
},
|
165
|
+
editorCollectionComponent.owner,
|
166
|
+
);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
function openMultiEditorWindow() {
|
172
|
+
if (multiEditor) {
|
173
|
+
closeEditorWindows();
|
174
|
+
if (app.windowManager.has(multiEditorId)) {
|
175
|
+
app.windowManager.bringWindowToTop(multiEditorId);
|
176
|
+
} else {
|
177
|
+
app.windowManager.add(
|
178
|
+
{
|
179
|
+
...multiEditor,
|
180
|
+
id: multiEditorId,
|
181
|
+
slot: WindowSlot.DYNAMIC_CHILD,
|
182
|
+
parentId,
|
183
|
+
},
|
184
|
+
editorCollectionComponent.owner,
|
185
|
+
);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
const selectionWatcher = watch(
|
191
|
+
editorCollectionComponent.selection,
|
192
|
+
async (selection, previous) => {
|
193
|
+
if (selection.length > 1) {
|
194
|
+
closeEditorWindows();
|
195
|
+
} else if (selection.length === 1 && previous.indexOf(selection[0]) < 0) {
|
196
|
+
if (selectionBased) {
|
197
|
+
// we need wait with opening the new window otherwise the editor will not be rerendered.
|
198
|
+
closeEditorWindows();
|
199
|
+
await nextTick();
|
200
|
+
}
|
201
|
+
openEditorWindow(getItemForListItem(selection[0]));
|
202
|
+
} else if (selection.length === 0) {
|
203
|
+
if (selectionBased) {
|
204
|
+
closeEditorWindows();
|
205
|
+
}
|
206
|
+
closeMultiEditorWindow();
|
207
|
+
}
|
208
|
+
},
|
209
|
+
);
|
210
|
+
|
211
|
+
const itemRemovedListener =
|
212
|
+
editorCollectionComponent.collection.removed.addEventListener(
|
213
|
+
closeEditorWindow,
|
214
|
+
);
|
215
|
+
|
216
|
+
editorCollectionComponent.addItemMapping({
|
217
|
+
predicate: (item) => !!getEditorWindowOptions(item),
|
218
|
+
mappingFunction: (item, c, listItem) => {
|
219
|
+
listItem.clickedCallbacks.push((event) => {
|
220
|
+
if (!(event.shiftKey || event.ctrlKey)) {
|
221
|
+
if (editorCollectionComponent.selection.value.length > 1) {
|
222
|
+
openEditorWindow(item);
|
223
|
+
}
|
224
|
+
if (
|
225
|
+
!selectionBased &&
|
226
|
+
editorCollectionComponent.selection.value.length === 1 &&
|
227
|
+
editorCollectionComponent.selection.value[0] === listItem
|
228
|
+
) {
|
229
|
+
closeEditorWindow(item);
|
230
|
+
}
|
231
|
+
}
|
232
|
+
});
|
233
|
+
|
234
|
+
const editItemAction = {
|
235
|
+
name: 'list.editItem',
|
236
|
+
async callback() {
|
237
|
+
if (selectionBased) {
|
238
|
+
closeEditorWindows();
|
239
|
+
await nextTick();
|
240
|
+
collectionComponent.selection.value = [listItem];
|
241
|
+
} else {
|
242
|
+
collectionComponent.selection.value = [];
|
243
|
+
}
|
244
|
+
openEditorWindow(item);
|
245
|
+
},
|
246
|
+
weight: 10,
|
247
|
+
};
|
248
|
+
listItem.actions.push(editItemAction);
|
249
|
+
},
|
250
|
+
owner: editorCollectionComponent.owner,
|
251
|
+
});
|
252
|
+
|
253
|
+
let multiEditorDestroy = () => {};
|
254
|
+
|
255
|
+
if (multiEditor) {
|
256
|
+
const { action, destroy } = createListEditAction(
|
257
|
+
editorCollectionComponent.selection,
|
258
|
+
openMultiEditorWindow,
|
259
|
+
app.windowManager,
|
260
|
+
editorCollectionComponent.owner,
|
261
|
+
getMultiEditorWindowId(),
|
262
|
+
);
|
263
|
+
|
264
|
+
editorCollectionComponent.addActions([
|
265
|
+
{
|
266
|
+
action: reactive(action),
|
267
|
+
owner: editorCollectionComponent.owner,
|
268
|
+
weight: 101,
|
269
|
+
},
|
270
|
+
]);
|
271
|
+
multiEditorDestroy = destroy;
|
272
|
+
}
|
273
|
+
|
274
|
+
editorCollectionComponent.getEditorWindowId = getEditorWindowId;
|
275
|
+
editorCollectionComponent.getMultiEditorWindowId = getMultiEditorWindowId;
|
276
|
+
editorCollectionComponent.closeEditorWindow = closeEditorWindow;
|
277
|
+
editorCollectionComponent.closeEditorWindows = closeEditorWindows;
|
278
|
+
editorCollectionComponent.closeMultiEditorWindow = closeMultiEditorWindow;
|
279
|
+
editorCollectionComponent.openEditorWindow = openEditorWindow;
|
280
|
+
editorCollectionComponent.openMultiEditorWindow = openMultiEditorWindow;
|
281
|
+
editorCollectionComponent.parentId = parentId;
|
282
|
+
|
283
|
+
const originalDestroy = editorCollectionComponent.destroy.bind(
|
284
|
+
editorCollectionComponent,
|
285
|
+
);
|
286
|
+
|
287
|
+
editorCollectionComponent.destroy = function destroy() {
|
288
|
+
originalDestroy();
|
289
|
+
selectionWatcher();
|
290
|
+
itemRemovedListener();
|
291
|
+
multiEditorDestroy();
|
292
|
+
};
|
293
|
+
|
294
|
+
return editorCollectionComponent;
|
295
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* @type {string}
|
3
|
+
*/
|
4
|
+
export const contextMenuWindowId: string;
|
5
|
+
declare const _default: import("vue").DefineComponent<{
|
6
|
+
actions: {
|
7
|
+
type: ArrayConstructor;
|
8
|
+
required: true;
|
9
|
+
};
|
10
|
+
}, {
|
11
|
+
close: () => void;
|
12
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
13
|
+
actions: {
|
14
|
+
type: ArrayConstructor;
|
15
|
+
required: true;
|
16
|
+
};
|
17
|
+
}>>, {}>;
|
18
|
+
export default _default;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export default ContextMenuInteraction;
|
2
|
+
/**
|
3
|
+
* Class to call a callback on right click and a callback on any other click
|
4
|
+
* @class
|
5
|
+
* @extends {AbstractInteraction}
|
6
|
+
*/
|
7
|
+
declare class ContextMenuInteraction extends AbstractInteraction {
|
8
|
+
/**
|
9
|
+
* @param {function(import("@vcmap/core").InteractionEvent):Promise<void>} rightClick - the right click callback, called on right click only
|
10
|
+
* @param {function(import("@vcmap/core").InteractionEvent):Promise<void>} clear - the clear callback
|
11
|
+
*/
|
12
|
+
constructor(rightClick: (arg0: import("@vcmap/core").InteractionEvent) => Promise<void>, clear: (arg0: import("@vcmap/core").InteractionEvent) => Promise<void>);
|
13
|
+
/**
|
14
|
+
* @type {function(import("@vcmap/core").InteractionEvent): Promise<void>}
|
15
|
+
* @private
|
16
|
+
*/
|
17
|
+
private _clear;
|
18
|
+
/**
|
19
|
+
* @type {function(import("@vcmap/core").InteractionEvent): Promise<void>}
|
20
|
+
* @private
|
21
|
+
*/
|
22
|
+
private _rightClick;
|
23
|
+
}
|
24
|
+
import { AbstractInteraction } from '@vcmap/core';
|