@vcmap/ui 5.0.2 → 5.1.0-rc.2
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 +22 -0
- package/config/dev.config.json +176 -5
- package/config/www.config.json +32 -0
- package/dist/assets/{cesium.a3a1dc.js → cesium.b97c3b.js} +1859 -1828
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.bb64ed.js → core.5b03e5.js} +5859 -5041
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-92075a75.js +1 -0
- package/dist/assets/{ol.833fa9.js → ol.0cd250.js} +7257 -7252
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.aeb2ec.css → ui.67779e.css} +2 -2
- package/dist/assets/{ui.aeb2ec.js → ui.67779e.js} +14199 -9198
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.8e1850.js → vue.62ecd5.js} +1243 -1234
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.3ed426.css → vuetify.3b3e23.css} +1 -1
- package/dist/assets/{vuetify.3ed426.js → vuetify.3b3e23.js} +155 -154
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.d.ts +256 -0
- package/index.js +48 -11
- package/package.json +21 -14
- 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 +6 -2
- 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 +36 -19
- 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 -42
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +17 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +53 -18
- 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 +58 -54
- 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-661636d9.js +0 -1
- package/plugins/@vcmap-show-case/window-tester/src/toolboxData.js +0 -288
package/src/manager/collectionManager/{collectionComponent.js → collectionComponentClass.js}
RENAMED
@@ -1,28 +1,68 @@
|
|
1
1
|
import { IndexedCollection, isOverrideCollection } from '@vcmap/core';
|
2
2
|
import { getLogger } from '@vcsuite/logger';
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
4
|
-
import { computed, ref } from 'vue';
|
5
|
-
import { parseNumber } from '@vcsuite/parsers';
|
4
|
+
import { computed, ref, watch } from 'vue';
|
5
|
+
import { parseBoolean, parseNumber } from '@vcsuite/parsers';
|
6
6
|
import { validateAction } from '../../components/lists/VcsActionList.vue';
|
7
7
|
import { sortByWeight } from '../buttonManager.js';
|
8
|
+
import {
|
9
|
+
createListItemBulkAction,
|
10
|
+
createListItemDeleteAction,
|
11
|
+
createListItemRenameAction,
|
12
|
+
} from '../../actions/listActions.js';
|
13
|
+
import { sortByOwner } from '../navbarManager.js';
|
8
14
|
|
9
15
|
/**
|
10
16
|
* @typedef {Object} CollectionComponentUiOptions
|
11
17
|
* @property {string} [id]
|
12
18
|
* @property {string} [title]
|
13
|
-
* @property {boolean} [draggable] - only supported for IndexedCollections
|
14
|
-
* @property {boolean} [
|
15
|
-
* @property {boolean} [
|
19
|
+
* @property {boolean} [draggable=false] - only supported for IndexedCollections
|
20
|
+
* @property {boolean} [renamable=false] - adds actions to rename items from list. Sets a default titleChanged callback on all list items, which can be overwritten in the mapping function, if necessary.
|
21
|
+
* @property {boolean} [removable=false] - adds actions to remove items from list. Also adds a header action to delete selected, if selectable is set to true.
|
22
|
+
* @property {boolean} [selectable=false]
|
23
|
+
* @property {boolean} [singleSelect=false]
|
16
24
|
* @property {number} [overflowCount=2] - number of header action buttons rendered until overflow
|
17
25
|
* @property {number} [limit=10] - limit number of items in rendered list (more items are rendered in extra window)
|
18
26
|
*/
|
19
27
|
|
20
28
|
/**
|
21
|
-
* @typedef {CollectionComponentUiOptions
|
22
|
-
*
|
29
|
+
* @typedef {CollectionComponentUiOptions & {
|
30
|
+
* collection: import("@vcmap/core").Collection<T>
|
31
|
+
* }} CollectionComponentClassOptions
|
23
32
|
* @template {Object} T
|
24
33
|
*/
|
25
34
|
|
35
|
+
/**
|
36
|
+
* @typedef {import("../../components/lists/VcsList.vue").VcsListItem & {
|
37
|
+
* actions: Array<import("../../actions/actionHelper.js").VcsAction & { weight?: number }>,
|
38
|
+
* clickedCallbacks: Array<function(PointerEvent):void>,
|
39
|
+
* destroy: function():void|undefined
|
40
|
+
* destroyFunctions: Array<function():void>
|
41
|
+
* }} CollectionComponentListItem
|
42
|
+
*/
|
43
|
+
|
44
|
+
/**
|
45
|
+
* @param {CollectionComponentListItem} listItem
|
46
|
+
*/
|
47
|
+
function destroyListItem(listItem) {
|
48
|
+
listItem.destroyFunctions.forEach((cb) => cb());
|
49
|
+
listItem.destroy?.();
|
50
|
+
}
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Renames the title of an item for VcsObject based items.
|
54
|
+
* @param {import("@vcmap/core").VcsObject} item
|
55
|
+
* @param {import("../../components/lists/VcsList").VcsListItem} listItem
|
56
|
+
* @param {string} newTitle
|
57
|
+
*/
|
58
|
+
function titleChanged(item, listItem, newTitle) {
|
59
|
+
if (!item.properties) {
|
60
|
+
item.properties = {};
|
61
|
+
}
|
62
|
+
item.properties.title = newTitle;
|
63
|
+
listItem.title = newTitle;
|
64
|
+
}
|
65
|
+
|
26
66
|
/**
|
27
67
|
* Manages one collection and creates a mirrored items array with ListItems.
|
28
68
|
* Listens to all collection events and synchronizes changes to the items array.
|
@@ -30,15 +70,15 @@ import { sortByWeight } from '../buttonManager.js';
|
|
30
70
|
* @class
|
31
71
|
* @template {Object|import("@vcmap/core").VcsObject} T
|
32
72
|
*/
|
33
|
-
class
|
73
|
+
class CollectionComponentClass {
|
34
74
|
/**
|
35
|
-
* @param {
|
36
|
-
* @param {string|vcsAppSymbol} owner
|
75
|
+
* @param {CollectionComponentClassOptions<T>} options
|
76
|
+
* @param {string|import("../../pluginHelper.js").vcsAppSymbol} owner
|
37
77
|
*/
|
38
78
|
constructor(options, owner) {
|
39
79
|
if (!options?.collection?.uniqueKey) {
|
40
80
|
throw new Error(
|
41
|
-
'
|
81
|
+
'CollectionComponentClassOptions requires a collection with mandatory key!',
|
42
82
|
);
|
43
83
|
}
|
44
84
|
|
@@ -80,11 +120,19 @@ class CollectionComponent {
|
|
80
120
|
/**
|
81
121
|
* @type {import("vue").Ref<boolean>}
|
82
122
|
*/
|
83
|
-
this.
|
123
|
+
this.renamable = ref(parseBoolean(options.renamable, false));
|
124
|
+
/**
|
125
|
+
* @type {import("vue").Ref<boolean>}
|
126
|
+
*/
|
127
|
+
this.removable = ref(parseBoolean(options.removable, false));
|
84
128
|
/**
|
85
129
|
* @type {import("vue").Ref<boolean>}
|
86
130
|
*/
|
87
|
-
this.
|
131
|
+
this.selectable = ref(parseBoolean(options.selectable));
|
132
|
+
/**
|
133
|
+
* @type {import("vue").Ref<boolean>}
|
134
|
+
*/
|
135
|
+
this.singleSelect = ref(parseBoolean(options.singleSelect));
|
88
136
|
/**
|
89
137
|
* @type {string|vcsAppSymbol}
|
90
138
|
* @private
|
@@ -92,29 +140,53 @@ class CollectionComponent {
|
|
92
140
|
this._owner = owner;
|
93
141
|
|
94
142
|
/**
|
95
|
-
* @type {import("vue").Ref<Array<OwnedAction>>}
|
143
|
+
* @type {import("vue").Ref<Array<import("./collectionManager.js").OwnedAction>>}
|
96
144
|
*/
|
97
145
|
this._actions = ref([]);
|
98
146
|
/**
|
99
|
-
* @type {Array<ItemMapping
|
147
|
+
* @type {Array<import("./collectionManager.js").ItemMapping<T>>}
|
100
148
|
* @private
|
101
149
|
*/
|
102
150
|
this._itemMappings = [];
|
103
151
|
/**
|
104
|
-
* @type {Array<ItemFilter
|
152
|
+
* @type {Array<import("./collectionManager.js").ItemFilter<T>>}
|
105
153
|
* @private
|
106
154
|
*/
|
107
155
|
this._itemFilters = [];
|
108
156
|
/**
|
109
|
-
* @type {import("vue").Ref<Array<
|
157
|
+
* @type {import("vue").Ref<Array<CollectionComponentListItem>>}
|
110
158
|
* @private
|
111
159
|
*/
|
112
160
|
this._listItems = ref([]);
|
113
161
|
/**
|
114
|
-
* @type {import("vue").Ref<Array<
|
162
|
+
* @type {import("vue").Ref<Array<CollectionComponentListItem>>}
|
115
163
|
*/
|
116
164
|
this.selection = ref([]);
|
117
165
|
|
166
|
+
this._resetWatchers = [
|
167
|
+
watch(this.renamable, () => this.reset()),
|
168
|
+
watch([this.removable, this.selectable], () => {
|
169
|
+
if (this.removable.value && this.selectable.value) {
|
170
|
+
this._addBulkDeleteAction();
|
171
|
+
} else {
|
172
|
+
this._removeBulkDeleteAction();
|
173
|
+
}
|
174
|
+
this.reset();
|
175
|
+
}),
|
176
|
+
watch(this._draggable, () => {
|
177
|
+
if (!(this._collection instanceof IndexedCollection)) {
|
178
|
+
getLogger('CollectionComponentClass').warning(
|
179
|
+
'draggable can only be set to IndexedCollections!',
|
180
|
+
);
|
181
|
+
this._draggable.value = false;
|
182
|
+
}
|
183
|
+
}),
|
184
|
+
];
|
185
|
+
this._destroyBulkDelete = () => {};
|
186
|
+
if (this.removable.value && this.selectable.value) {
|
187
|
+
this._addBulkDeleteAction();
|
188
|
+
}
|
189
|
+
|
118
190
|
this._listeners = [
|
119
191
|
this._collection.added.addEventListener(this._handleItemAdded.bind(this)),
|
120
192
|
this._collection.removed.addEventListener(
|
@@ -124,9 +196,9 @@ class CollectionComponent {
|
|
124
196
|
|
125
197
|
if (this._collection[isOverrideCollection]) {
|
126
198
|
this._listeners.push(
|
127
|
-
this._collection.replaced.addEventListener(
|
128
|
-
this.
|
129
|
-
|
199
|
+
this._collection.replaced.addEventListener(
|
200
|
+
this._handleItemReplaced.bind(this),
|
201
|
+
),
|
130
202
|
);
|
131
203
|
}
|
132
204
|
|
@@ -137,29 +209,25 @@ class CollectionComponent {
|
|
137
209
|
),
|
138
210
|
);
|
139
211
|
}
|
140
|
-
|
141
212
|
this.reset();
|
142
213
|
}
|
143
214
|
|
144
215
|
/**
|
145
216
|
* @type {string}
|
146
|
-
* @readonly
|
147
217
|
*/
|
148
218
|
get id() {
|
149
219
|
return this._id;
|
150
220
|
}
|
151
221
|
|
152
222
|
/**
|
153
|
-
* @type {import("@vcmap/core").Collection
|
154
|
-
* @readonly
|
223
|
+
* @type {import("@vcmap/core").Collection<T>}
|
155
224
|
*/
|
156
225
|
get collection() {
|
157
226
|
return this._collection;
|
158
227
|
}
|
159
228
|
|
160
229
|
/**
|
161
|
-
* @type {import("vue").Ref<Array<
|
162
|
-
* @readonly
|
230
|
+
* @type {import("vue").Ref<Array<CollectionComponentListItem>>}
|
163
231
|
*/
|
164
232
|
get items() {
|
165
233
|
return this._listItems;
|
@@ -167,7 +235,6 @@ class CollectionComponent {
|
|
167
235
|
|
168
236
|
/**
|
169
237
|
* @type {import("vue").Ref<boolean>}
|
170
|
-
* @readonly
|
171
238
|
*/
|
172
239
|
get draggable() {
|
173
240
|
return this._draggable;
|
@@ -175,36 +242,66 @@ class CollectionComponent {
|
|
175
242
|
|
176
243
|
/**
|
177
244
|
* @param {boolean} value
|
245
|
+
* @deprecated
|
178
246
|
*/
|
179
247
|
set draggable(value) {
|
180
|
-
|
181
|
-
getLogger('CollectionComponent').warn(
|
182
|
-
'draggable can only be set to IndexedCollections!',
|
183
|
-
);
|
184
|
-
return;
|
185
|
-
}
|
248
|
+
getLogger('CollectionComponentClass').deprecate('set draggable');
|
186
249
|
this._draggable.value = value;
|
187
250
|
}
|
188
251
|
|
189
252
|
/**
|
190
|
-
* @type {string|vcsAppSymbol}
|
191
|
-
* @readonly
|
253
|
+
* @type {string|import("../../pluginHelper.js").vcsAppSymbol}
|
192
254
|
*/
|
193
255
|
get owner() {
|
194
256
|
return this._owner;
|
195
257
|
}
|
196
258
|
|
197
259
|
/**
|
198
|
-
* @returns {import("vue").ComputedRef<VcsAction[]>}
|
260
|
+
* @returns {import("vue").ComputedRef<import("../../actions/actionHelper.js").VcsAction[]>}
|
199
261
|
*/
|
200
262
|
getActions() {
|
201
263
|
return computed(() => this._actions.value.map(({ action }) => action));
|
202
264
|
}
|
203
265
|
|
204
266
|
/**
|
205
|
-
*
|
267
|
+
* @private
|
268
|
+
*/
|
269
|
+
_addBulkDeleteAction() {
|
270
|
+
const { action, destroy } = createListItemBulkAction(this.selection, {
|
271
|
+
name: 'list.delete',
|
272
|
+
callback: () => {
|
273
|
+
[...this.selection.value].forEach((listItem) => {
|
274
|
+
this._collection.remove(this._collection.getByKey(listItem.name));
|
275
|
+
});
|
276
|
+
},
|
277
|
+
});
|
278
|
+
this._destroyBulkDelete = destroy;
|
279
|
+
this.addActions([
|
280
|
+
{
|
281
|
+
action,
|
282
|
+
owner: this._owner,
|
283
|
+
weight: 100,
|
284
|
+
},
|
285
|
+
]);
|
286
|
+
}
|
287
|
+
|
288
|
+
/**
|
289
|
+
* @private
|
290
|
+
*/
|
291
|
+
_removeBulkDeleteAction() {
|
292
|
+
this._destroyBulkDelete();
|
293
|
+
const action = this._actions.value.find(
|
294
|
+
(a) => a.action.name === 'list.delete',
|
295
|
+
);
|
296
|
+
if (action) {
|
297
|
+
this.removeActions([action]);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
|
301
|
+
/**
|
302
|
+
* uses the itemMappings to transform the given Item to an CollectionComponentListItem usable in the VcsList
|
206
303
|
* @param {T} item
|
207
|
-
* @returns {
|
304
|
+
* @returns {CollectionComponentListItem}
|
208
305
|
* @template T
|
209
306
|
* @private
|
210
307
|
*/
|
@@ -219,9 +316,21 @@ class CollectionComponent {
|
|
219
316
|
disabled: item?.properties?.disabled,
|
220
317
|
tooltip: item?.properties?.tooltip,
|
221
318
|
icon: item?.properties?.icon,
|
222
|
-
hasUpdate:
|
319
|
+
hasUpdate: false,
|
320
|
+
rename: false,
|
223
321
|
actions: [],
|
322
|
+
clickedCallbacks: [],
|
323
|
+
destroy: undefined,
|
324
|
+
destroyFunctions: [],
|
224
325
|
};
|
326
|
+
if (this.renamable.value) {
|
327
|
+
listItem.actions.push(createListItemRenameAction(listItem));
|
328
|
+
listItem.titleChanged = (newTitle) =>
|
329
|
+
titleChanged(item, listItem, newTitle);
|
330
|
+
}
|
331
|
+
if (this.removable.value) {
|
332
|
+
listItem.actions.push(createListItemDeleteAction(this._collection, item));
|
333
|
+
}
|
225
334
|
this._itemMappings.forEach((itemMapping) => {
|
226
335
|
if (
|
227
336
|
itemMapping.predicate === undefined ||
|
@@ -230,16 +339,18 @@ class CollectionComponent {
|
|
230
339
|
itemMapping.mappingFunction(item, this, listItem);
|
231
340
|
}
|
232
341
|
});
|
233
|
-
listItem.actions = listItem.actions
|
234
|
-
|
235
|
-
|
342
|
+
listItem.actions = listItem.actions
|
343
|
+
.filter((action) => {
|
344
|
+
return validateAction(action);
|
345
|
+
})
|
346
|
+
.sort((a, b) => sortByWeight(a.weight, b.weight));
|
236
347
|
return listItem;
|
237
348
|
}
|
238
349
|
|
239
350
|
/**
|
240
351
|
* Inserts the listItem into the list items array at the correct relative position in respect to the position of the listItem
|
241
352
|
* in the collection
|
242
|
-
* @param {
|
353
|
+
* @param {CollectionComponentListItem} listItem
|
243
354
|
* @private
|
244
355
|
*/
|
245
356
|
_insertListItem(listItem) {
|
@@ -266,7 +377,7 @@ class CollectionComponent {
|
|
266
377
|
}
|
267
378
|
|
268
379
|
/**
|
269
|
-
* synchronizes the
|
380
|
+
* synchronizes the collection items with the internal items list.
|
270
381
|
* @param {T} item
|
271
382
|
* @template T
|
272
383
|
* @private
|
@@ -282,6 +393,31 @@ class CollectionComponent {
|
|
282
393
|
}
|
283
394
|
}
|
284
395
|
|
396
|
+
/**
|
397
|
+
* synchronizes the collection items with the internal items list by preserving previous selection
|
398
|
+
* @param {import("@vcmap/core").ReplacedEvent<T>} replaced
|
399
|
+
* @private
|
400
|
+
*/
|
401
|
+
_handleItemReplaced(replaced) {
|
402
|
+
const selectedIdx = this.selection.value.findIndex(
|
403
|
+
(l) => l.name === replaced.old[this.collection.uniqueKey],
|
404
|
+
);
|
405
|
+
this._handleItemRemoved(replaced.old);
|
406
|
+
if (selectedIdx > -1) {
|
407
|
+
const addedListener = this._collection.added.addEventListener((added) => {
|
408
|
+
if (added === replaced.new) {
|
409
|
+
const newListItem = this.items.value.find(
|
410
|
+
(l) => l.name === added[this.collection.uniqueKey],
|
411
|
+
);
|
412
|
+
if (newListItem) {
|
413
|
+
this.selection.value.splice(selectedIdx, 0, newListItem);
|
414
|
+
}
|
415
|
+
addedListener();
|
416
|
+
}
|
417
|
+
});
|
418
|
+
}
|
419
|
+
}
|
420
|
+
|
285
421
|
/**
|
286
422
|
* synchronizes the order of the list items with respect to the order of the items in the collection.
|
287
423
|
* removes and reinserts the moved item.
|
@@ -318,16 +454,28 @@ class CollectionComponent {
|
|
318
454
|
});
|
319
455
|
if (index > -1) {
|
320
456
|
const listItem = this._listItems.value[index];
|
321
|
-
|
322
|
-
|
457
|
+
const selectionIdx = this.selection.value.indexOf(listItem);
|
458
|
+
if (selectionIdx > -1) {
|
459
|
+
this.selection.value.splice(selectionIdx, 1);
|
323
460
|
}
|
461
|
+
destroyListItem(this._listItems.value[index]);
|
324
462
|
this._listItems.value.splice(index, 1);
|
325
463
|
}
|
326
464
|
}
|
327
465
|
|
466
|
+
/**
|
467
|
+
* @param {T} item
|
468
|
+
* @template T
|
469
|
+
* @returns {CollectionComponentListItem|undefined}
|
470
|
+
*/
|
471
|
+
getListItemForItem(item) {
|
472
|
+
const itemKey = item[this._collection.uniqueKey];
|
473
|
+
return this.items.value.find((i) => i.name === itemKey);
|
474
|
+
}
|
475
|
+
|
328
476
|
/**
|
329
477
|
* recreates the items array with the new Mapping Function
|
330
|
-
* @param {ItemMapping} itemMapping
|
478
|
+
* @param {import("./collectionManager.js").ItemMapping<T>} itemMapping
|
331
479
|
*/
|
332
480
|
addItemMapping(itemMapping) {
|
333
481
|
if (
|
@@ -345,7 +493,7 @@ class CollectionComponent {
|
|
345
493
|
|
346
494
|
/**
|
347
495
|
* recreates the items array with the new Mapping Function
|
348
|
-
* @param {ItemMapping} itemMapping
|
496
|
+
* @param {import("./collectionManager.js").ItemMapping<T>} itemMapping
|
349
497
|
*/
|
350
498
|
removeItemMapping(itemMapping) {
|
351
499
|
const index = this._itemMappings.findIndex(({ mappingFunction, owner }) => {
|
@@ -362,7 +510,7 @@ class CollectionComponent {
|
|
362
510
|
|
363
511
|
/**
|
364
512
|
* recreates the items array with the new Filter Function
|
365
|
-
* @param {ItemFilter} itemFilter
|
513
|
+
* @param {import("./collectionManager.js").ItemFilter<T>} itemFilter
|
366
514
|
*/
|
367
515
|
addItemFilter(itemFilter) {
|
368
516
|
if (
|
@@ -380,7 +528,7 @@ class CollectionComponent {
|
|
380
528
|
|
381
529
|
/**
|
382
530
|
* recreates the items array with the new Filter Function
|
383
|
-
* @param {ItemFilter} itemFilter
|
531
|
+
* @param {import("./collectionManager.js").ItemFilter<T>} itemFilter
|
384
532
|
*/
|
385
533
|
removeItemFilter(itemFilter) {
|
386
534
|
const index = this._itemFilters.findIndex(({ filterFunction, owner }) => {
|
@@ -396,7 +544,7 @@ class CollectionComponent {
|
|
396
544
|
}
|
397
545
|
|
398
546
|
/**
|
399
|
-
* @param {Array<OwnedAction>} ownedActions
|
547
|
+
* @param {Array<import("./collectionManager.js").OwnedAction>} ownedActions
|
400
548
|
*/
|
401
549
|
addActions(ownedActions) {
|
402
550
|
const actions = [...this._actions.value, ...ownedActions];
|
@@ -404,11 +552,14 @@ class CollectionComponent {
|
|
404
552
|
.filter((item, pos, self) => {
|
405
553
|
return self.indexOf(item) === pos;
|
406
554
|
})
|
407
|
-
.sort(
|
555
|
+
.sort(
|
556
|
+
(a, b) =>
|
557
|
+
sortByWeight(a.weight, b.weight) || sortByOwner(a.owner, b.owner),
|
558
|
+
);
|
408
559
|
}
|
409
560
|
|
410
561
|
/**
|
411
|
-
* @param {Array<OwnedAction>} ownedActions
|
562
|
+
* @param {Array<import("./collectionManager.js").OwnedAction>} ownedActions
|
412
563
|
*/
|
413
564
|
removeActions(ownedActions) {
|
414
565
|
this._actions.value = this._actions.value.filter((ownedAction) => {
|
@@ -446,7 +597,7 @@ class CollectionComponent {
|
|
446
597
|
* re-adding them from the collection applying current filter and mapping functions
|
447
598
|
*/
|
448
599
|
reset() {
|
449
|
-
this._listItems.value.forEach(
|
600
|
+
this._listItems.value.forEach(destroyListItem);
|
450
601
|
this._listItems.value = [];
|
451
602
|
this.selection.value = [];
|
452
603
|
[...this._collection]
|
@@ -461,10 +612,12 @@ class CollectionComponent {
|
|
461
612
|
|
462
613
|
destroy() {
|
463
614
|
this._listeners.forEach((cb) => cb());
|
464
|
-
this.
|
615
|
+
this._destroyBulkDelete();
|
616
|
+
this._resetWatchers.forEach((cb) => cb());
|
617
|
+
this._listItems.value.forEach(destroyListItem);
|
465
618
|
this._listItems.value = [];
|
466
619
|
this.selection.value = [];
|
467
620
|
}
|
468
621
|
}
|
469
622
|
|
470
|
-
export default
|
623
|
+
export default CollectionComponentClass;
|
@@ -0,0 +1,200 @@
|
|
1
|
+
export default CollectionManager;
|
2
|
+
export type MappingFunction<T extends Object> = (arg0: T, arg1: import("./collectionComponentClass.js").default<T>, arg2: import("./collectionComponentClass.js").CollectionComponentListItem) => void;
|
3
|
+
export type PredicateFunction<T extends Object> = (arg0: T, arg1: import("./collectionComponentClass.js").default<T>) => boolean;
|
4
|
+
export type ItemMapping<T extends Object> = {
|
5
|
+
predicate?: PredicateFunction<T>;
|
6
|
+
mappingFunction: MappingFunction<T>;
|
7
|
+
owner: string | symbol;
|
8
|
+
};
|
9
|
+
export type ItemFilter<T extends Object> = {
|
10
|
+
filterFunction: PredicateFunction<T>;
|
11
|
+
owner: string | symbol;
|
12
|
+
};
|
13
|
+
export type OwnedAction = {
|
14
|
+
action: import("../../actions/actionHelper.js").VcsAction;
|
15
|
+
/**
|
16
|
+
* Optional weight affecting the displaying order
|
17
|
+
*/
|
18
|
+
weight?: number | undefined;
|
19
|
+
owner: string | symbol;
|
20
|
+
};
|
21
|
+
export type ICollectionManager = import("../../vcsUiApp.js").VcsComponentManager<CollectionComponentClass<any>, import("./collectionComponentClass.js").CollectionComponentClassOptions<Object>>;
|
22
|
+
/**
|
23
|
+
* @typedef {function(T, import("./collectionComponentClass.js").default<T>, import("./collectionComponentClass.js").CollectionComponentListItem): void} MappingFunction
|
24
|
+
* @template {Object} T
|
25
|
+
*/
|
26
|
+
/**
|
27
|
+
* @typedef {function(T, import("./collectionComponentClass.js").default<T>): boolean} PredicateFunction
|
28
|
+
* @template {Object} T
|
29
|
+
*/
|
30
|
+
/**
|
31
|
+
* @typedef {{
|
32
|
+
* predicate?: PredicateFunction<T>,
|
33
|
+
* mappingFunction: MappingFunction<T>,
|
34
|
+
* owner: string | symbol,
|
35
|
+
* }} ItemMapping
|
36
|
+
* @template {Object} T
|
37
|
+
*/
|
38
|
+
/**
|
39
|
+
* @typedef {{
|
40
|
+
* filterFunction: PredicateFunction<T>,
|
41
|
+
* owner: string | symbol
|
42
|
+
* }} ItemFilter
|
43
|
+
* @template {Object} T
|
44
|
+
*/
|
45
|
+
/**
|
46
|
+
* @typedef {Object} OwnedAction
|
47
|
+
* @property {import("../../actions/actionHelper.js").VcsAction} action
|
48
|
+
* @property {number} [weight=0] Optional weight affecting the displaying order
|
49
|
+
* @property {string | symbol} owner
|
50
|
+
*/
|
51
|
+
/**
|
52
|
+
* @typedef {import("../../vcsUiApp.js").VcsComponentManager<CollectionComponentClass, import("./collectionComponentClass.js").CollectionComponentClassOptions<Object>>} ICollectionManager
|
53
|
+
*/
|
54
|
+
/**
|
55
|
+
* Manages a list of collections as collectionComponents.
|
56
|
+
* Sets the correct mapping/filter functions and actions on the collectionComponent
|
57
|
+
* Provides an API to add/remove collectionsComponents.
|
58
|
+
* @implements {ICollectionManager}
|
59
|
+
*/
|
60
|
+
declare class CollectionManager implements ICollectionManager {
|
61
|
+
/**
|
62
|
+
* @type {VcsEvent<CollectionComponentClass<Object>>}
|
63
|
+
*/
|
64
|
+
added: VcsEvent<CollectionComponentClass<Object>>;
|
65
|
+
/**
|
66
|
+
* @type {VcsEvent<CollectionComponentClass<Object>>}
|
67
|
+
*/
|
68
|
+
removed: VcsEvent<CollectionComponentClass<Object>>;
|
69
|
+
/**
|
70
|
+
* @type {Array<string>}
|
71
|
+
*/
|
72
|
+
componentIds: Array<string>;
|
73
|
+
/**
|
74
|
+
* @type {Map<string, CollectionComponentClass<Object>>}
|
75
|
+
* @private
|
76
|
+
*/
|
77
|
+
private _collectionComponents;
|
78
|
+
/**
|
79
|
+
* @type {Array<ItemMapping & { collectionComponentIds:Array<string> }>}
|
80
|
+
* @private
|
81
|
+
*/
|
82
|
+
private _itemMappings;
|
83
|
+
/**
|
84
|
+
* @type {Array<ItemFilter & { collectionComponentIds:Array<string> }>}
|
85
|
+
* @private
|
86
|
+
*/
|
87
|
+
private _itemFilters;
|
88
|
+
/**
|
89
|
+
* @type {Array<{actions:Array<import("../../actions/actionHelper.js").VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
90
|
+
* @private
|
91
|
+
*/
|
92
|
+
private _actions;
|
93
|
+
/**
|
94
|
+
* @param {string} id
|
95
|
+
* @returns {CollectionComponentClass<Object>|undefined}
|
96
|
+
*/
|
97
|
+
get(id: string): CollectionComponentClass<Object> | undefined;
|
98
|
+
/**
|
99
|
+
* @param {string} id
|
100
|
+
* @returns {boolean}
|
101
|
+
*/
|
102
|
+
has(id: string): boolean;
|
103
|
+
/**
|
104
|
+
* @param {import("@vcmap/core").Collection<Object>} collection
|
105
|
+
* @returns {boolean}
|
106
|
+
*/
|
107
|
+
hasCollection(collection: import("@vcmap/core").Collection<Object>): boolean;
|
108
|
+
/**
|
109
|
+
* gets all collection components corresponding to provided collection
|
110
|
+
* @param {import("@vcmap/core").Collection<T>} collection
|
111
|
+
* @returns {CollectionComponentClass<T>[]}
|
112
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
113
|
+
*/
|
114
|
+
getCollection<T extends Object | import("@vcmap/core/dist/src/vcsObject.js").default>(collection: Collection<T>): CollectionComponentClass<T>[];
|
115
|
+
/**
|
116
|
+
* adds a collectionComponent
|
117
|
+
* @param {import("./collectionComponentClass.js").CollectionComponentClassOptions<T>} collectionComponentOptions
|
118
|
+
* @param {string|symbol} owner
|
119
|
+
* @returns {CollectionComponentClass<T>}
|
120
|
+
* @template {Object|import("@vcmap/core").VcsObject} T
|
121
|
+
*/
|
122
|
+
add<T_1 extends Object | import("@vcmap/core/dist/src/vcsObject.js").default>(collectionComponentOptions: import("./collectionComponentClass.js").CollectionComponentClassOptions<T_1>, owner: string | symbol): CollectionComponentClass<T_1>;
|
123
|
+
/**
|
124
|
+
* removes a CollectionComponentClass, Component will not be rendered anymore and will be destroyed. Add CollectionComponentClass again
|
125
|
+
* to show the component again
|
126
|
+
* @param {string} id
|
127
|
+
*/
|
128
|
+
remove(id: string): void;
|
129
|
+
/**
|
130
|
+
* Gets affected ids for adding mapping and filter functions or actions.
|
131
|
+
* If no ids are provided, ids of all managed collectionComponents are returned.
|
132
|
+
* @param {Array<string>} [collectionComponentIds]
|
133
|
+
* @returns {string[]}
|
134
|
+
* @private
|
135
|
+
*/
|
136
|
+
private _getAffectedIds;
|
137
|
+
/**
|
138
|
+
* adds MappingFunction to the collectionManager. For the given collectionComponents each Item will be transformed by the
|
139
|
+
* mappingFunction if the predicate returns true.
|
140
|
+
* @param {PredicateFunction<T>} predicate
|
141
|
+
* @param {MappingFunction<T>} mappingFunction
|
142
|
+
* @param {string | symbol} owner
|
143
|
+
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this mappingFunction should be used on. If empty, mappingFunction is applied to all managed collectionComponents.
|
144
|
+
* @template {Object} T
|
145
|
+
*/
|
146
|
+
addMappingFunction<T_2 extends Object>(predicate: PredicateFunction<T_2>, mappingFunction: MappingFunction<T_2>, owner: string | symbol, collectionComponentIds?: string[] | undefined): void;
|
147
|
+
/**
|
148
|
+
* removes the given mappingFunction
|
149
|
+
* @param {MappingFunction<T>} mappingFunction
|
150
|
+
* @param {string | symbol} owner
|
151
|
+
* @template {Object} T
|
152
|
+
*/
|
153
|
+
removeMappingFunction<T_3 extends Object>(mappingFunction: MappingFunction<T_3>, owner: string | symbol): void;
|
154
|
+
/**
|
155
|
+
* @param {PredicateFunction<T>} filterFunction
|
156
|
+
* @param {string | symbol} owner
|
157
|
+
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this filterFunction should be used on. If empty, filterFunction is applied to all managed collectionComponents.
|
158
|
+
* @template {Object} T
|
159
|
+
*/
|
160
|
+
addFilterFunction<T_4 extends Object>(filterFunction: PredicateFunction<T_4>, owner: string | symbol, collectionComponentIds?: string[] | undefined): void;
|
161
|
+
/**
|
162
|
+
* removes the given filterFunction
|
163
|
+
* @param {PredicateFunction<T>} filterFunction
|
164
|
+
* @param {string | symbol} owner
|
165
|
+
* @template {Object} T
|
166
|
+
*/
|
167
|
+
removeFilterFunction<T_5 extends Object>(filterFunction: PredicateFunction<T_5>, owner: string | symbol): void;
|
168
|
+
/**
|
169
|
+
* add multiple actions owned by the same owner
|
170
|
+
* @param {Array<import("../../actions/actionHelper.js").VcsAction>} actions
|
171
|
+
* @param {string | symbol} owner
|
172
|
+
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this mappingFunction should be used on. If empty, actions are applied to all managed collectionComponents.
|
173
|
+
*/
|
174
|
+
addActions(actions: Array<import("../../actions/actionHelper.js").VcsAction>, owner: string | symbol, collectionComponentIds?: string[] | undefined): void;
|
175
|
+
/**
|
176
|
+
* @param {Array<import("../../actions/actionHelper.js").VcsAction>} actions
|
177
|
+
* @param {string | symbol} owner
|
178
|
+
*/
|
179
|
+
removeActions(actions: Array<import("../../actions/actionHelper.js").VcsAction>, owner: string | symbol): void;
|
180
|
+
/**
|
181
|
+
* removes managed collection components or actions and mapping/ filter functions belonging to the given owner.
|
182
|
+
* @param {string | symbol} owner
|
183
|
+
*/
|
184
|
+
removeOwner(owner: string | symbol): void;
|
185
|
+
/**
|
186
|
+
* Resets all collectionComponents
|
187
|
+
*/
|
188
|
+
reset(): void;
|
189
|
+
/**
|
190
|
+
* Clears the manager of all added categories and item mappings
|
191
|
+
*/
|
192
|
+
clear(): void;
|
193
|
+
/**
|
194
|
+
* destroys the categoryManager, removes all Listeners and clears all Managed Categories
|
195
|
+
*/
|
196
|
+
destroy(): void;
|
197
|
+
}
|
198
|
+
import CollectionComponentClass from './collectionComponentClass.js';
|
199
|
+
import { VcsEvent } from '@vcmap/core';
|
200
|
+
import { Collection } from '@vcmap/core';
|