@vcmap/ui 5.0.0-rc.6 → 5.0.0-rc.9
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 +72 -22
- package/build/build.js +0 -3
- package/build/buildHelpers.js +0 -1
- package/build/commonViteConfig.js +1 -1
- package/config/aerowest.config.json +2 -1
- package/config/base.config.json +7 -7
- package/config/dev.config.json +4 -4
- package/dist/assets/cesium/Workers/{AttributeCompression-27507afe.js → AttributeCompression-80665726.js} +1 -1
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-7565c1e8.js → AxisAlignedBoundingBox-a655a4bc.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-fb31d3b5.js → BoxGeometry-f8f9c981.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-56bb5728.js → Color-de06a177.js} +1 -1
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-72143c19.js → CoplanarPolygonGeometryLibrary-48cdc26d.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-7bae1712.js → CorridorGeometryLibrary-ddc027d3.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-dbc15162.js → EllipseGeometryLibrary-b2ae188a.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-21191fce.js → EllipseOutlineGeometry-f05a5a27.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-48d9c023.js → EllipsoidOutlineGeometry-21c243df.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js} +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +1 -0
- package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-9ab86004.js → FrustumGeometry-17776af8.js} +1 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +1 -0
- package/dist/assets/cesium/Workers/{GeometryInstance-13e4ff38.js → GeometryInstance-4fbf16ba.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-e0eb4567.js → GeometryPipeline-309fad76.js} +1 -1
- package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +1 -0
- package/dist/assets/cesium/Workers/{Matrix2-37e55508.js → Matrix2-47e98d76.js} +0 -0
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-e9c07538.js → OrientedBoundingBox-fcb5b750.js} +1 -1
- package/dist/assets/cesium/Workers/{Plane-6ee42cab.js → Plane-3f01019d.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-b408c688.js → PolygonGeometryLibrary-0b29eb16.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7b8e4643.js → PolygonPipeline-a934c4dd.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-6757400c.js → PolylinePipeline-8095c9bc.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-eb972210.js → PolylineVolumeGeometryLibrary-67d12fff.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-f244975e.js → PrimitivePipeline-980e44c5.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-1bd6152a.js → RectangleGeometryLibrary-621c6de8.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-5a21a97f.js → TerrainEncoding-f96552d5.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-eb5c1a84.js → Transforms-c8cb8f43.js} +3 -3
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-a6b6a368.js → WallGeometryLibrary-c03d8479.js} +1 -1
- package/dist/assets/cesium/Workers/{WebMercatorProjection-2839e524.js → WebMercatorProjection-79b3214e.js} +1 -1
- package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.fba8ca.js → cesium.4e40f4.js} +955 -968
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.edcf5e.js +4 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.6a83278e.js → index.889d0f3a.js} +1 -1
- package/dist/assets/{ol.abea3a.js → ol.246fd4.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.df4f6d.css +1 -0
- package/dist/assets/ui.df4f6d.js +43 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue-composition-api.7051d7.js → vue-composition-api.a520f3.js} +1 -1
- package/dist/assets/vue-composition-api.js +2 -2
- package/dist/assets/{vue.9fd7f6.js → vue.2cee44.js} +0 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.33dafc.css → vuetify.cc817b.css} +1 -1
- package/dist/assets/{vuetify.33dafc.js → vuetify.cc817b.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +96 -6
- package/package.json +3 -4
- package/plugins/@vcmap/pluginExample/index.js +5 -5
- package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/ContextsListComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/index.js +5 -5
- package/plugins/@vcmap/project-selector/package.json +1 -2
- package/plugins/@vcmap/theme-changer/index.js +6 -6
- package/plugins/buttonExamples/ButtonExamples.vue +1 -1
- package/plugins/buttonExamples/index.js +5 -4
- package/plugins/categoryTest/Categories.vue +1 -1
- package/plugins/categoryTest/Category.vue +1 -1
- package/plugins/categoryTest/index.js +5 -5
- package/plugins/example/index.js +33 -14
- package/plugins/test/allIconsComponent.vue +34 -0
- package/plugins/test/editor.vue +1 -1
- package/plugins/test/index.js +40 -17
- package/plugins/test/toolbox-data.js +106 -26
- package/plugins/test/windowManagerExample.vue +1 -2
- package/src/actions/actionHelper.js +41 -1
- package/src/actions/styleSelector.vue +1 -1
- package/src/application/Navbar.vue +47 -6
- package/src/application/VcsApp.vue +37 -29
- package/src/application/VcsMap.vue +1 -20
- package/src/assets/logo-mobile.svg +9 -0
- package/src/assets/logo.svg +23 -23
- package/src/components/buttons/VcsActionButtonList.vue +99 -0
- package/src/components/buttons/VcsButton.vue +201 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +73 -0
- package/src/components/form-inputs-controls/VcsColorPicker.vue +81 -0
- package/src/components/form-inputs-controls/VcsFormSection.vue +46 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +38 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +97 -0
- package/src/components/form-inputs-controls/VcsTextArea.vue +130 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +129 -0
- package/src/components/form-output/VcsFormattedNumber.vue +103 -0
- package/src/components/lists/VcsActionList.vue +100 -0
- package/src/components/lists/VcsTreeview.vue +109 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +105 -0
- package/src/components/lists/VcsTreeviewSearchbar.vue +156 -0
- package/src/components/notification/VcsBadge.vue +27 -0
- package/src/components/notification/VcsTooltip.vue +154 -0
- package/src/components/notification/validation.js +19 -0
- package/src/contentTree/LayerTree.vue +1 -1
- package/src/contentTree/contentTreeCollection.js +6 -2
- package/src/icons/+all.js +359 -0
- package/src/icons/2DAreaIcon.vue +21 -0
- package/src/icons/2DDistanceIcon.vue +18 -0
- package/src/icons/3DAreaIcon.vue +21 -0
- package/src/icons/3DDistanceIcon.vue +18 -0
- package/src/icons/3DHeightIcon.vue +18 -0
- package/src/icons/AngleIcon.vue +8 -0
- package/src/icons/AssociationsIcon.vue +34 -0
- package/src/icons/AxisIcon.vue +10 -0
- package/src/icons/BoundingBoxIcon.vue +15 -0
- package/src/icons/CheckboxCheckedIcon.vue +16 -0
- package/src/icons/CheckboxIcon.vue +23 -0
- package/src/icons/CheckboxIndeterminateIcon.vue +24 -0
- package/src/icons/CircleIcon.vue +10 -0
- package/src/icons/ColorSwatchIcon.vue +17 -0
- package/src/icons/CommentIcon.vue +19 -0
- package/src/icons/CompassIcon.vue +8 -0
- package/src/icons/ComponentsIcon.vue +7 -0
- package/src/icons/ConeIcon.vue +11 -0
- package/src/icons/DimensionsHouseIcon.vue +14 -0
- package/src/icons/ElevationProfileIcon.vue +111 -0
- package/src/icons/ExportAreaIcon.vue +7 -0
- package/src/icons/ExportFlightIcon.vue +7 -0
- package/src/icons/ExportIcon.vue +8 -0
- package/src/icons/ExternalLinkIcon.vue +10 -0
- package/src/icons/EyeIcon.vue +7 -0
- package/src/icons/FastForwardIcon.vue +7 -0
- package/src/icons/FilterIcon.vue +8 -0
- package/src/icons/GlobeNatureIcon.vue +14 -0
- package/src/icons/HealthCareIndustriesIcon.vue +118 -0
- package/src/icons/HelpIcon.vue +7 -0
- package/src/icons/HomePointIcon.vue +8 -0
- package/src/icons/HospitalsIcon.vue +237 -0
- package/src/icons/HouseIcon.vue +25 -0
- package/src/icons/ImportIcon.vue +8 -0
- package/src/icons/InfoIcon.vue +10 -0
- package/src/icons/KebabIcon.vue +36 -0
- package/src/icons/LabelIcon.vue +7 -0
- package/src/icons/LayersIcon.vue +26 -0
- package/src/icons/LegendIcon.vue +65 -0
- package/src/icons/LineIcon.vue +7 -0
- package/src/icons/LinkIcon.vue +7 -0
- package/src/icons/MapIcon.vue +8 -0
- package/src/icons/MenuIcon.vue +34 -0
- package/src/icons/MinusIcon.vue +8 -0
- package/src/icons/ObjectAttributeIcon.vue +18 -0
- package/src/icons/ObjectSelectIcon.vue +8 -0
- package/src/icons/ObliqueViewIcon.vue +13 -0
- package/src/icons/PdfIcon.vue +10 -0
- package/src/icons/PedestrianIcon.vue +8 -0
- package/src/icons/PenIcon.vue +14 -0
- package/src/icons/PlayCircleIcon.vue +10 -0
- package/src/icons/PlusIcon.vue +9 -0
- package/src/icons/PoiIcon.vue +7 -0
- package/src/icons/PointSelectIcon.vue +7 -0
- package/src/icons/PolygonIcon.vue +38 -0
- package/src/icons/PresentationModeIcon.vue +7 -0
- package/src/icons/ProgressIcon.vue +24 -0
- package/src/icons/QueryIcon.vue +15 -0
- package/src/icons/RectangleIcon.vue +9 -0
- package/src/icons/ReturnIcon.vue +7 -0
- package/src/icons/RewindIcon.vue +6 -0
- package/src/icons/SearchIcon.vue +8 -0
- package/src/icons/ShadowIcon.vue +9 -0
- package/src/icons/ShapesIcon.vue +28 -0
- package/src/icons/ShareIcon.vue +22 -0
- package/src/icons/SimpleCircleFilledIcon.vue +15 -0
- package/src/icons/SimpleCircleHalfFilledIcon.vue +12 -0
- package/src/icons/SimpleCircleOutlinedIcon.vue +15 -0
- package/src/icons/SkipNextIcon.vue +7 -0
- package/src/icons/SkipPreviousIcon.vue +9 -0
- package/src/icons/SplitViewIcon.vue +19 -0
- package/src/icons/TextStyleIcon.vue +14 -0
- package/src/icons/ThreeDimensionsIcon.vue +7 -0
- package/src/icons/ToolsIcon.vue +35 -0
- package/src/icons/TouchIcon.vue +8 -0
- package/src/icons/TrashCanIcon.vue +7 -0
- package/src/icons/TriangleIcon.vue +15 -0
- package/src/icons/TwoDimensionsIcon.vue +8 -0
- package/src/icons/UploadIcon.vue +14 -0
- package/src/icons/VideoRecorderIcon.vue +14 -0
- package/src/icons/WalkingIcon.vue +7 -0
- package/src/icons/WallIcon.vue +14 -0
- package/src/manager/buttonManager.js +5 -52
- package/src/manager/navbarManager.js +81 -0
- package/src/manager/toolbox/ToolboxGroupComponent.vue +128 -0
- package/src/manager/toolbox/ToolboxManager.vue +119 -76
- package/src/manager/toolbox/toolboxManager.js +204 -0
- package/src/manager/window/WindowComponent.vue +27 -20
- package/src/manager/window/WindowComponentHeader.vue +13 -6
- package/src/manager/window/WindowManager.vue +18 -1
- package/src/manager/window/windowManager.js +3 -5
- package/src/navigation/mapNavigation.vue +34 -5
- package/src/navigation/orientationToolsButton.vue +1 -1
- package/src/navigation/overviewMap.js +616 -0
- package/src/navigation/overviewMapClickedInteraction.js +38 -0
- package/src/navigation/tiltSlider.vue +1 -1
- package/src/styles/_theming.scss +10 -0
- package/src/styles/main.scss +3 -0
- package/src/styles/variables.scss +70 -0
- package/src/styles/vcsFont.scss +5 -0
- package/src/styles/vcsGrid.scss +4 -0
- package/src/vcsUiApp.js +18 -3
- package/src/vuePlugins/vuetify.js +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-678e34e4.js +0 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-3915ea0b.js +0 -1
- package/dist/assets/cesium/Workers/IntersectionTests-ac2459de.js +0 -1
- package/dist/assets/core.d5ed0f.js +0 -4
- package/dist/assets/ui.ad1ec9.css +0 -1
- package/dist/assets/ui.ad1ec9.js +0 -39
- package/dist/assets/uicomponents.161461.css +0 -1
- package/dist/assets/uicomponents.161461.js +0 -31
- package/dist/assets/uicomponents.js +0 -1
- package/lib/uicomponents.js +0 -1
- package/src/manager/toolbox/ToolboxMultiSelectButton.vue +0 -96
- package/src/manager/toolbox/ToolboxSingleSelectButton.vue +0 -98
- package/src/manager/toolbox/toolbox-manager.js +0 -203
@@ -0,0 +1,15 @@
|
|
1
|
+
<template>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
|
3
|
+
<g id="Rectangle_750" data-name="Rectangle 750" fill="none" stroke="#585858" stroke-width="2">
|
4
|
+
<rect width="8" height="8" rx="4" stroke="none" />
|
5
|
+
<rect
|
6
|
+
x="1"
|
7
|
+
y="1"
|
8
|
+
width="6"
|
9
|
+
height="6"
|
10
|
+
rx="3"
|
11
|
+
fill="none"
|
12
|
+
/>
|
13
|
+
</g>
|
14
|
+
</svg>
|
15
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
|
5
|
+
<path id="Path_92" data-name="Path 92" d="M7,15.377a1,1,0,0,0,1.669.744l3.753-3.378a1,1,0,0,0,.075-1.412q-.036-.039-.075-.075L8.67,7.878A1,1,0,0,0,7,8.622ZM14,8v8a1,1,0,0,0,1,1h1a1,1,0,0,0,1-1V8a1,1,0,0,0-1-1H15A1,1,0,0,0,14,8Z" transform="translate(-7 -7)" fill="currentColor" />
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
|
5
|
+
<g id="streamline-icon-button-previous_24x24" data-name="streamline-icon-button-previous@24x24" transform="translate(-7 -7)">
|
6
|
+
<path id="Path_92" data-name="Path 92" d="M17,15.377a1,1,0,0,1-1.669.744l-3.753-3.378a1,1,0,0,1-.075-1.412q.036-.039.075-.075L15.33,7.878A1,1,0,0,1,17,8.622ZM10,8v8a1,1,0,0,1-1,1H8a1,1,0,0,1-1-1V8A1,1,0,0,1,8,7H9A1,1,0,0,1,10,8Z" fill="currentColor" />
|
7
|
+
</g>
|
8
|
+
</svg>
|
9
|
+
</template>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25.003" viewBox="0 0 25 25.003">
|
5
|
+
<g id="icon_24_splitview" transform="translate(0.5 0.5)">
|
6
|
+
<path
|
7
|
+
id="Union_46"
|
8
|
+
data-name="Union 46"
|
9
|
+
d="M10942,13196v-22a1,1,0,1,1,2,0v22a1,1,0,1,1-2,0Zm9.5-9.25v-.5a.5.5,0,0,0-.5-.5h-4v-2h4a.5.5,0,0,0,.5-.5v-.5a.75.75,0,0,1,1.281-.53l2,2a.747.747,0,0,1,0,1.06l-2,2a.757.757,0,0,1-.529.218A.748.748,0,0,1,10951.5,13186.75Zm-18.279.53-2-2a.75.75,0,0,1,0-1.063l2-2a.736.736,0,0,1,.526-.219.747.747,0,0,1,.752.749v.5a.5.5,0,0,0,.5.5h4v2h-4a.5.5,0,0,0-.5.5v.5a.763.763,0,0,1-.218.534.754.754,0,0,1-1.061,0Zm5.779-1.53Zm8-2Z"
|
10
|
+
transform="translate(-10931 -13172.998)"
|
11
|
+
fill="currentColor"
|
12
|
+
stroke="rgba(0,0,0,0)"
|
13
|
+
stroke-miterlimit="10"
|
14
|
+
stroke-width="1"
|
15
|
+
/>
|
16
|
+
<rect id="size" width="24" height="24" fill="none" />
|
17
|
+
</g>
|
18
|
+
</svg>
|
19
|
+
</template>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="streamline-icon-text-style_24x24"
|
6
|
+
data-name="streamline-icon-text-style@24x24"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
width="20.105"
|
9
|
+
height="24"
|
10
|
+
viewBox="0 0 20.105 24"
|
11
|
+
>
|
12
|
+
<path id="Path_4" data-name="Path 4" d="M20.093.359H4.512A2.268,2.268,0,0,0,2.25,2.622V4.57a1.289,1.289,0,1,0,2.578,0V3.194a.258.258,0,0,1,.258-.258h5.671a.258.258,0,0,1,.258.258V21.524a.258.258,0,0,1-.258.258H8.894a1.289,1.289,0,0,0,0,2.578h6.817a1.289,1.289,0,0,0,0-2.578H13.849a.258.258,0,0,1-.258-.258V3.194a.258.258,0,0,1,.258-.258H19.52a.258.258,0,0,1,.258.258V4.57a1.289,1.289,0,0,0,2.578,0V2.622A2.268,2.268,0,0,0,20.093.359Z" transform="translate(-2.25 -0.359)" fill="currentColor" />
|
13
|
+
</svg>
|
14
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16" viewBox="0 0 24 16">
|
5
|
+
<path id="Path_488" data-name="Path 488" d="M6.688-1.914q-1.633,0-3.112-.117T.912-2.361v-2.53H5.545a6.016,6.016,0,0,0,1.367-.128A1.38,1.38,0,0,0,7.7-5.465a1.4,1.4,0,0,0,.255-.893v-.659a1.4,1.4,0,0,0-.265-.9,1.568,1.568,0,0,0-.7-.489,3.314,3.314,0,0,0-1.01-.181L2.259-8.74v-2.424l3.592-.213a3.148,3.148,0,0,0,1.429-.34,1.084,1.084,0,0,0,.51-1.021v-.532a1.464,1.464,0,0,0-.541-1.255,3.086,3.086,0,0,0-1.806-.4h-4.2v-2.509q1.163-.191,2.531-.351a19.986,19.986,0,0,1,2.878-.117,5.416,5.416,0,0,1,2.245.457,3.056,3.056,0,0,1,1.4,1.3,4.343,4.343,0,0,1,.48,2.137v1.17a4.139,4.139,0,0,1-.133,1.084,2.432,2.432,0,0,1-.4.84,2.756,2.756,0,0,1-.612.6,2.777,2.777,0,0,1-.735.372,2.119,2.119,0,0,1,.806.4,3.242,3.242,0,0,1,.663.712,3.531,3.531,0,0,1,.459.989,4.322,4.322,0,0,1,.173,1.255v.808A3.6,3.6,0,0,1,9.851-2.9,4.678,4.678,0,0,1,6.688-1.914Zm6.571-.128V-17.778h6.388a5.225,5.225,0,0,1,2.551.564A4.166,4.166,0,0,1,23.82-15.6a7.532,7.532,0,0,1,.847,2.5,19.165,19.165,0,0,1,.245,3.19,14.119,14.119,0,0,1-.582,4.4,5.146,5.146,0,0,1-1.745,2.6,4.806,4.806,0,0,1-2.939.861Zm3.02-2.828h3.061a1.988,1.988,0,0,0,1.49-.564,3.471,3.471,0,0,0,.806-1.691,12.866,12.866,0,0,0,.255-2.786,15.951,15.951,0,0,0-.163-2.52,4.7,4.7,0,0,0-.48-1.542,1.742,1.742,0,0,0-.8-.766,2.722,2.722,0,0,0-1.112-.213H16.279Z" transform="translate(-0.912 17.914)" fill="currentColor" />
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
<template>
|
3
|
+
<svg>
|
4
|
+
<rect id="size" width="24" height="24" fill="none" />
|
5
|
+
<g id="Group_719" data-name="Group 719" transform="translate(-0.001)">
|
6
|
+
<rect
|
7
|
+
id="Rectangle_667"
|
8
|
+
data-name="Rectangle 667"
|
9
|
+
width="5"
|
10
|
+
height="1"
|
11
|
+
transform="translate(5.001 19)"
|
12
|
+
fill="currentColor"
|
13
|
+
/>
|
14
|
+
<rect
|
15
|
+
id="Rectangle_668"
|
16
|
+
data-name="Rectangle 668"
|
17
|
+
width="2"
|
18
|
+
height="10"
|
19
|
+
transform="translate(8 8)"
|
20
|
+
fill="currentColor"
|
21
|
+
/>
|
22
|
+
<path id="Path_366" data-name="Path 366" d="M7.957,3.3a.5.5,0,0,0-.913,0L5.176,7H9.825Z" fill="currentColor" />
|
23
|
+
<path id="Path_367" data-name="Path 367" d="M5,21.5a2.5,2.5,0,1,0,5,0V21H5v.5Z" fill="currentColor" />
|
24
|
+
<rect
|
25
|
+
id="Rectangle_669"
|
26
|
+
data-name="Rectangle 669"
|
27
|
+
width="2"
|
28
|
+
height="10"
|
29
|
+
transform="translate(5.001 8)"
|
30
|
+
fill="currentColor"
|
31
|
+
/>
|
32
|
+
<path id="Path_368" data-name="Path 368" d="M18.5,0h-6a.5.5,0,0,0-.5.5V3h2.5a.5.5,0,0,1,0,1H12V7h2.5a.5.5,0,0,1,0,1H12v3h2.5a.5.5,0,0,1,0,1H12v3h2.5a.5.5,0,0,1,0,1H12v3h2.5a.5.5,0,0,1,0,1H12v3.5a.5.5,0,0,0,.5.5h6a.5.5,0,0,0,.5-.5V.5A.5.5,0,0,0,18.5,0Z" fill="currentColor" />
|
33
|
+
</g>
|
34
|
+
</svg>
|
35
|
+
</template>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg id="icon-touch" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
5
|
+
<rect id="size" width="16" height="16" fill="none" />
|
6
|
+
<path id="touch-app" d="M16.668-42.679a1.077,1.077,0,0,1,.679,1.036v.143l-.571,4.036a.976.976,0,0,1-.357.7,1.136,1.136,0,0,1-.75.268H10.489a1.069,1.069,0,0,1-.786-.321L5.918-40.607l.607-.607a.827.827,0,0,1,.607-.25.294.294,0,0,1,.089.018.294.294,0,0,0,.089.018l2.607.536v-8.179a1.082,1.082,0,0,1,.339-.821,1.129,1.129,0,0,1,.8-.321,1.129,1.129,0,0,1,.8.321,1.082,1.082,0,0,1,.339.821V-44.5h.607a1.969,1.969,0,0,1,.393.071Zm-7.5-3.536a3.211,3.211,0,0,1-1.536-2.857,3.306,3.306,0,0,1,1-2.429,3.306,3.306,0,0,1,2.429-1,3.306,3.306,0,0,1,2.429,1,3.306,3.306,0,0,1,1,2.429,3.178,3.178,0,0,1-1.5,2.857v-2.857a1.8,1.8,0,0,0-.571-1.339,1.884,1.884,0,0,0-1.357-.554,1.824,1.824,0,0,0-1.339.554,1.824,1.824,0,0,0-.554,1.339Z" transform="translate(-3.633 52.5)" fill="currentColor" />
|
7
|
+
</svg>
|
8
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="14" viewBox="0 0 12 14">
|
5
|
+
<path id="delete" d="M14.525,4.27A.5.5,0,0,1,15,4.784V5.05a.5.5,0,0,1-.475.514H3.476A.5.5,0,0,1,3,5.05V4.784a.5.5,0,0,1,.476-.514H5.42a.866.866,0,0,0,.827-.71l.1-.477A1.341,1.341,0,0,1,7.624,2h2.753a1.338,1.338,0,0,1,1.268,1.048l.109.511a.865.865,0,0,0,.827.711Zm-.988,9.724c.2-1.986.558-6.7.558-6.751a.539.539,0,0,0-.121-.391.474.474,0,0,0-.349-.164H4.379a.461.461,0,0,0-.349.164.571.571,0,0,0-.127.391c0,.009.014.175.035.453.095,1.234.358,4.672.529,6.3a1.989,1.989,0,0,0,1.954,1.979c.837.02,1.7.027,2.581.027.831,0,1.674-.007,2.537-.027A1.988,1.988,0,0,0,13.537,13.994Z" transform="translate(-3 -2)" fill="currentColor" fill-rule="evenodd" />
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
<!-- eslint-disable max-len -->
|
3
|
+
|
4
|
+
<template>
|
5
|
+
<svg
|
6
|
+
id="streamline-icon-vectors-anchor-triangle_24x24"
|
7
|
+
data-name="streamline-icon-vectors-anchor-triangle@24x24"
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
9
|
+
width="24"
|
10
|
+
height="24"
|
11
|
+
viewBox="0 0 24 24"
|
12
|
+
>
|
13
|
+
<path id="Path_22" data-name="Path 22" d="M12,0A3,3,0,1,1,9,3,3,3,0,0,1,12,0ZM3,18a3,3,0,1,1-3,3A3,3,0,0,1,3,18Zm18,0a3,3,0,1,1-3,3A3,3,0,0,1,21,18ZM4.218,15.829,8.494,7.276a.251.251,0,0,1,.336-.111l1.342.671a.25.25,0,0,1,.112.335L6.008,16.724a.25.25,0,0,1-.335.112L4.33,16.164A.249.249,0,0,1,4.218,15.829Zm9.611-7.993,1.342-.671a.249.249,0,0,1,.335.112l4.276,8.553a.249.249,0,0,1-.112.335l-1.342.671a.249.249,0,0,1-.335-.112L13.717,8.171A.251.251,0,0,1,13.829,7.836ZM7.75,20h8.5a.25.25,0,0,1,.25.25v1.5a.25.25,0,0,1-.25.25H7.75a.25.25,0,0,1-.25-.25v-1.5A.25.25,0,0,1,7.75,20Z" fill="currentColor" />
|
14
|
+
</svg>
|
15
|
+
</template>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg id="icon_24_2d" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
5
|
+
<rect id="size" width="24" height="24" fill="none" />
|
6
|
+
<path id="Path_489" data-name="Path 489" d="M1.1-1.9V-4.456L6.295-9.711a10.338,10.338,0,0,0,1.03-1.158,4.419,4.419,0,0,0,.6-1.062,3.144,3.144,0,0,0,.2-1.126,2.11,2.11,0,0,0-.221-1,1.4,1.4,0,0,0-.715-.633A3.481,3.481,0,0,0,5.833-14.9H1.461v-2.488q1.009-.193,2.238-.354A21.267,21.267,0,0,1,6.442-17.9a6.568,6.568,0,0,1,2.869.515,3.046,3.046,0,0,1,1.482,1.48,5.6,5.6,0,0,1,.441,2.338,6.333,6.333,0,0,1-.284,1.952,6.587,6.587,0,0,1-.83,1.684A10.5,10.5,0,0,1,8.733-8.317L5.244-4.778h6.473V-1.9Zm12,0V-17.775h6.578a5.474,5.474,0,0,1,2.627.568,4.247,4.247,0,0,1,1.671,1.63,7.492,7.492,0,0,1,.872,2.52A18.941,18.941,0,0,1,25.1-9.84a13.968,13.968,0,0,1-.6,4.44,5.188,5.188,0,0,1-1.8,2.627,5.023,5.023,0,0,1-3.026.869Zm3.11-2.853h3.152A2.071,2.071,0,0,0,20.9-5.325a3.472,3.472,0,0,0,.83-1.705,12.719,12.719,0,0,0,.263-2.81,15.763,15.763,0,0,0-.168-2.542,4.673,4.673,0,0,0-.494-1.555,1.778,1.778,0,0,0-.82-.772,2.854,2.854,0,0,0-1.145-.214H16.214Z" transform="translate(-1.104 21.904)" fill="currentColor" />
|
7
|
+
</svg>
|
8
|
+
</template>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="streamline-icon-cloud-upload_24x24_1_"
|
6
|
+
data-name="streamline-icon-cloud-upload@24x24 (1)"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
width="25.717"
|
9
|
+
height="24"
|
10
|
+
viewBox="0 0 25.717 24"
|
11
|
+
>
|
12
|
+
<path id="Path_121" data-name="Path 121" d="M25.713,11.1a6.236,6.236,0,0,0-1.9-4.464,6.117,6.117,0,0,0-3.693-1.7.267.267,0,0,1-.2-.129A8.232,8.232,0,0,0,4.811,7.266a.268.268,0,0,1-.243.214A4.918,4.918,0,0,0,0,12.381,4.632,4.632,0,0,0,1.324,15.82,5.912,5.912,0,0,0,5.187,17.3a1.071,1.071,0,1,0-.032-2.143A3.525,3.525,0,0,1,2.828,14.3a2.544,2.544,0,0,1-.685-1.919A2.775,2.775,0,0,1,5.487,9.664,1.071,1.071,0,0,0,6.752,8.83a1.043,1.043,0,0,0,.02-.151A6.092,6.092,0,0,1,18.365,6.442a1.031,1.031,0,0,0,1.008.611,3.965,3.965,0,0,1,2.955,1.126A4.02,4.02,0,0,1,23.571,11.1a4.109,4.109,0,0,1-3.683,4.057,1.071,1.071,0,0,0,.141,2.134,1.018,1.018,0,0,0,.14-.01A6.221,6.221,0,0,0,25.713,11.1Zm-12.1-1.526a1.072,1.072,0,0,0-1.515,0l-3.75,3.75a1.071,1.071,0,0,0,.757,1.833h1.875a.266.266,0,0,1,.268.266v7.77a1.607,1.607,0,1,0,3.214,0V15.424a.266.266,0,0,1,.266-.268h1.877a1.071,1.071,0,0,0,.757-1.829Z" transform="translate(0.004 -0.799)" fill="currentColor" />
|
13
|
+
</svg>
|
14
|
+
</template>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="streamline-icon-camera-studio_24x24"
|
6
|
+
data-name="streamline-icon-camera-studio@24x24"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
width="24"
|
9
|
+
height="20.999"
|
10
|
+
viewBox="0 0 24 20.999"
|
11
|
+
>
|
12
|
+
<path id="Path_15" data-name="Path 15" d="M23.5,12.989a1.175,1.175,0,0,0-1.121-.066L19.653,14.06a.251.251,0,0,0-.154.231v5.416a.251.251,0,0,0,.154.231l2.73,1.137a1.154,1.154,0,0,0,1.122-.066A1.178,1.178,0,0,0,24,20V14A1.178,1.178,0,0,0,23.5,12.989ZM2.5,11.5h14A1.5,1.5,0,0,1,18,13v8a1.5,1.5,0,0,1-1.5,1.5H2.5A1.5,1.5,0,0,1,1,21V13A1.5,1.5,0,0,1,2.5,11.5Zm2-10A4.5,4.5,0,1,1,0,6,4.5,4.5,0,0,1,4.5,1.5Zm9,3a3,3,0,1,1-3,3A3,3,0,0,1,13.5,4.5Z" transform="translate(0 -1.5)" fill="currentColor" />
|
13
|
+
</svg>
|
14
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="10.666" height="15.999" viewBox="0 0 10.666 15.999">
|
5
|
+
<path id="Path_7" data-name="Path 7" d="M9.731.784A1.828,1.828,0,0,1,11.6,2.567a1.872,1.872,0,0,1-3.74,0A1.828,1.828,0,0,1,9.731.784ZM11.37,8.2a6.486,6.486,0,0,0,1.809.9l.88.28a1.176,1.176,0,0,0,.355.055,1.066,1.066,0,0,0,.3-2.1l-.827-.262a4.2,4.2,0,0,1-1.17-.585l-.76-.543A4.438,4.438,0,0,0,7.5,5.558,4.494,4.494,0,0,0,4.869,9.531,1.088,1.088,0,0,0,5.9,10.679c.029,0,.058,0,.088,0A1.1,1.1,0,0,0,7.113,9.665a2.409,2.409,0,0,1,1.213-2.1.193.193,0,0,1,.257.06.164.164,0,0,1,.027.093v.968a13.235,13.235,0,0,1-.346,3.008,8.9,8.9,0,0,1-1.655,3.352,1.037,1.037,0,0,0,.176,1.5,1.16,1.16,0,0,0,1.578-.168,12.131,12.131,0,0,0,1.915-3.786.192.192,0,0,1,.324-.058,11.634,11.634,0,0,1,1.807,3.514,1.118,1.118,0,0,0,1.065.732,1.15,1.15,0,0,0,.355-.056,1.06,1.06,0,0,0,.711-1.353v0a12.176,12.176,0,0,0-3.417-5.362.7.7,0,0,1-.266-.538V8.186a.183.183,0,0,1,.187-.178.2.2,0,0,1,.112.036Z" transform="translate(-4.866 -0.784)" fill="currentColor" />
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
<template>
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.158" height="22" viewBox="0 0 20.158 22">
|
4
|
+
<defs>
|
5
|
+
<clipPath id="clip-path">
|
6
|
+
<rect id="Rectangle_843" data-name="Rectangle 843" width="20.158" height="22" fill="currentColor" />
|
7
|
+
</clipPath>
|
8
|
+
</defs>
|
9
|
+
<g id="Group_1440" data-name="Group 1440" clip-path="url(#clip-path)">
|
10
|
+
<path id="Path_530" data-name="Path 530" d="M16.158,20h-3V2h3V7h2V1a1,1,0,0,0-1-1H12.593a1,1,0,0,0-.2.02L.805,2.33A1,1,0,0,0,0,3.311V15.864a1,1,0,0,0,.59.913L12,21.912a1,1,0,0,0,.41.088h4.745a1,1,0,0,0,1-1V15h-2ZM2,4.131l9.158-1.825V19.339L2,15.218Z" fill="currentColor" />
|
11
|
+
<path id="Path_531" data-name="Path 531" d="M17.158,8a3,3,0,1,0,3,3,3,3,0,0,0-3-3" fill="currentColor" />
|
12
|
+
</g>
|
13
|
+
</svg>
|
14
|
+
</template>
|
@@ -1,53 +1,13 @@
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
1
2
|
import { reactive } from '@vue/composition-api';
|
2
3
|
import { VcsEvent } from '@vcmap/core';
|
3
4
|
import { v4 as uuidv4 } from 'uuid';
|
4
5
|
import { check, checkMaybe } from '@vcsuite/check';
|
5
6
|
import { vcsAppSymbol } from '../pluginHelper.js';
|
6
7
|
|
7
|
-
/**
|
8
|
-
* sorts by owner and optionally plugin order
|
9
|
-
* @param {ButtonComponent} a
|
10
|
-
* @param {ButtonComponent} b
|
11
|
-
* @param {string[]} [order] order of owners to sort by
|
12
|
-
* @returns {number}
|
13
|
-
*/
|
14
|
-
function sortByOwner(a, b, order = []) {
|
15
|
-
const sorted = [vcsAppSymbol, ...order];
|
16
|
-
return sorted.indexOf(b.owner) -
|
17
|
-
sorted.indexOf(a.owner);
|
18
|
-
}
|
19
|
-
|
20
|
-
/**
|
21
|
-
* filters actions by button location and returns actions (optionally sorted)
|
22
|
-
* @param {Array<ButtonComponent>} buttonComponents
|
23
|
-
* @param {ButtonLocation} location Button render position
|
24
|
-
* @param {string[]} [order] optional order to sort by (plugin names)
|
25
|
-
* @param {function(a: ButtonComponent, b: ButtonComponent, order: string[]):number} [compareFn=sortByOwner] Per default components are sorted by owner: app first, then plugins
|
26
|
-
* @returns {Array<VcsAction>}
|
27
|
-
*/
|
28
|
-
export function getActionsByLocation(buttonComponents, location, order = [], compareFn = sortByOwner) {
|
29
|
-
return buttonComponents
|
30
|
-
.filter(b => b.location === location)
|
31
|
-
.sort((a, b) => compareFn(a, b, order))
|
32
|
-
.map(b => b.action);
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Possible render positions of buttons in navbar from left to right
|
37
|
-
* @enum
|
38
|
-
*/
|
39
|
-
export const ButtonLocation = {
|
40
|
-
MAP: 0,
|
41
|
-
CONTENT: 1,
|
42
|
-
TOOL: 2,
|
43
|
-
PROJECT: 3,
|
44
|
-
MENU: 4,
|
45
|
-
};
|
46
|
-
|
47
8
|
/**
|
48
9
|
* @typedef ButtonComponentOptions
|
49
|
-
* @property {string} [id] Optional ID, If not provided
|
50
|
-
* @property {ButtonLocation} location Button render position
|
10
|
+
* @property {string} [id] Optional ID, If not provided an uuid will be generated.
|
51
11
|
* @property {VcsAction} action Action performed by button.
|
52
12
|
*/
|
53
13
|
|
@@ -55,7 +15,6 @@ export const ButtonLocation = {
|
|
55
15
|
* @typedef ButtonComponent
|
56
16
|
* @property {string} id
|
57
17
|
* @property {string|vcsAppSymbol} owner
|
58
|
-
* @property {ButtonLocation} location
|
59
18
|
* @property {VcsAction} action
|
60
19
|
*/
|
61
20
|
|
@@ -64,7 +23,7 @@ export const ButtonLocation = {
|
|
64
23
|
* @description Manages a set of Map Buttons
|
65
24
|
* @implements VcsComponentManager<ButtonComponent,ButtonComponentOptions>
|
66
25
|
*/
|
67
|
-
export
|
26
|
+
export class ButtonManager {
|
68
27
|
constructor() {
|
69
28
|
/**
|
70
29
|
* @type {import("@vcmap/core").VcsEvent<ButtonComponent>}
|
@@ -93,10 +52,7 @@ export default class ButtonManager {
|
|
93
52
|
* @returns {ButtonComponent}
|
94
53
|
*/
|
95
54
|
get(id) {
|
96
|
-
|
97
|
-
return this._buttonComponents.get(id);
|
98
|
-
}
|
99
|
-
return undefined;
|
55
|
+
return this._buttonComponents.get(id);
|
100
56
|
}
|
101
57
|
|
102
58
|
/**
|
@@ -113,6 +69,7 @@ export default class ButtonManager {
|
|
113
69
|
* @param {string} id
|
114
70
|
*/
|
115
71
|
remove(id) {
|
72
|
+
check(id, String);
|
116
73
|
const buttonComponent = this._buttonComponents.get(id);
|
117
74
|
if (buttonComponent) {
|
118
75
|
const index = this.componentIds.indexOf(id);
|
@@ -131,7 +88,6 @@ export default class ButtonManager {
|
|
131
88
|
*/
|
132
89
|
add(buttonComponentOptions, owner) {
|
133
90
|
checkMaybe(buttonComponentOptions.id, String);
|
134
|
-
check(buttonComponentOptions.location, Object.values(ButtonLocation));
|
135
91
|
check(buttonComponentOptions.action, {
|
136
92
|
name: String,
|
137
93
|
title: [undefined, String],
|
@@ -156,9 +112,6 @@ export default class ButtonManager {
|
|
156
112
|
get owner() {
|
157
113
|
return owner;
|
158
114
|
},
|
159
|
-
get location() {
|
160
|
-
return buttonComponentOptions.location;
|
161
|
-
},
|
162
115
|
get action() {
|
163
116
|
return reactive(buttonComponentOptions.action);
|
164
117
|
},
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { check } from '@vcsuite/check';
|
2
|
+
import { ButtonManager } from './buttonManager.js';
|
3
|
+
import { vcsAppSymbol } from '../pluginHelper.js';
|
4
|
+
|
5
|
+
export const locationSymbol = Symbol('location');
|
6
|
+
|
7
|
+
/**
|
8
|
+
* sorts by owner and optionally plugin order
|
9
|
+
* @param {ButtonComponent} a
|
10
|
+
* @param {ButtonComponent} b
|
11
|
+
* @param {string[]} [order] order of owners to sort by
|
12
|
+
* @returns {number}
|
13
|
+
*/
|
14
|
+
function sortByOwner(a, b, order = []) {
|
15
|
+
const sorted = [vcsAppSymbol, ...order];
|
16
|
+
const indexA = sorted.indexOf(a.owner);
|
17
|
+
const indexB = sorted.indexOf(b.owner);
|
18
|
+
|
19
|
+
if (indexA === indexB) {
|
20
|
+
return 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
if (indexA === -1) {
|
24
|
+
return 1;
|
25
|
+
}
|
26
|
+
|
27
|
+
if (indexB === -1) {
|
28
|
+
return -1;
|
29
|
+
}
|
30
|
+
return indexA - indexB;
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* filters actions by button location and returns actions (optionally sorted)
|
35
|
+
* @param {Array<ButtonComponent>} buttonComponents
|
36
|
+
* @param {ButtonLocation} location Button render position
|
37
|
+
* @param {string[]} [order] optional order to sort by (plugin names)
|
38
|
+
* @param {function(a: ButtonComponent, b: ButtonComponent, order: string[]):number} [compareFn=sortByOwner] Per default components are sorted by owner: app first, then plugins
|
39
|
+
* @returns {Array<VcsAction>}
|
40
|
+
*/
|
41
|
+
export function getActionsByLocation(buttonComponents, location, order = [], compareFn = sortByOwner) {
|
42
|
+
return [...buttonComponents]
|
43
|
+
.filter(b => b[locationSymbol] === location)
|
44
|
+
.sort((a, b) => compareFn(a, b, order))
|
45
|
+
.map(b => b.action);
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Possible render positions of buttons in navbar from left to right
|
50
|
+
* @enum
|
51
|
+
*/
|
52
|
+
export const ButtonLocation = {
|
53
|
+
MAP: 0,
|
54
|
+
CONTENT: 1,
|
55
|
+
TOOL: 2,
|
56
|
+
PROJECT: 3,
|
57
|
+
SHARE: 4,
|
58
|
+
MENU: 5,
|
59
|
+
};
|
60
|
+
|
61
|
+
/**
|
62
|
+
* @class NavbarManager
|
63
|
+
* @description Manages a set of Map Buttons in the Navbar
|
64
|
+
* @implements VcsComponentManager<ButtonComponent,ButtonComponentOptions>
|
65
|
+
*/
|
66
|
+
export class NavbarManager extends ButtonManager {
|
67
|
+
/**
|
68
|
+
* adds a buttonComponent
|
69
|
+
* @param {ButtonComponentOptions} buttonComponentOptions
|
70
|
+
* @param {string|symbol} owner pluginName or vcsAppSymbol
|
71
|
+
* @param {ButtonLocation} location Button render position
|
72
|
+
* @throws {Error} if a buttonComponent with the same ID has already been added
|
73
|
+
* @returns {ButtonComponent}
|
74
|
+
*/
|
75
|
+
add(buttonComponentOptions, owner, location) {
|
76
|
+
check(location, Object.values(ButtonLocation));
|
77
|
+
const buttonComponent = super.add(buttonComponentOptions, owner);
|
78
|
+
buttonComponent[locationSymbol] = location;
|
79
|
+
return buttonComponent;
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-if="actions.length > 0">
|
3
|
+
<VcsButton
|
4
|
+
v-if="singleActionButton"
|
5
|
+
:key="singleActionButton.name"
|
6
|
+
:tooltip="singleActionButton.title"
|
7
|
+
:icon="singleActionButton.icon"
|
8
|
+
:active="singleActionButton.active"
|
9
|
+
@click.stop="singleActionButton.callback($event)"
|
10
|
+
v-bind="{...$attrs}"
|
11
|
+
/>
|
12
|
+
<VcsButton
|
13
|
+
v-else-if="groupButtons.length > 0"
|
14
|
+
v-bind="{...$attrs}"
|
15
|
+
width="48"
|
16
|
+
:icon="groupIcon"
|
17
|
+
:tooltip="groupTitle"
|
18
|
+
:active="active"
|
19
|
+
@click="$emit('click')"
|
20
|
+
>
|
21
|
+
<v-icon v-text="active ? 'mdi-chevron-up' : 'mdi-chevron-down'" color="accent" class="text--darken-3" />
|
22
|
+
</VcsButton>
|
23
|
+
<v-toolbar
|
24
|
+
v-if="active"
|
25
|
+
dense
|
26
|
+
absolute
|
27
|
+
:width="width"
|
28
|
+
class="toolbar__secondary rounded-b mx-auto v-sheet mt-12 px-4"
|
29
|
+
:style="{left: `${nudgeLeft}px` }"
|
30
|
+
>
|
31
|
+
<v-toolbar-items class="w-full">
|
32
|
+
<div class="d-flex align-center justify-space-between w-full action-btn-wrap">
|
33
|
+
<VcsButton
|
34
|
+
v-for="(button, index) in groupButtons"
|
35
|
+
:key="`${button.name}-${index}`"
|
36
|
+
:tooltip="button.title"
|
37
|
+
:icon="button.icon"
|
38
|
+
:active="button.active"
|
39
|
+
@click.stop="button.callback($event)"
|
40
|
+
small
|
41
|
+
:width="buttonSize"
|
42
|
+
v-bind="{...$attrs}"
|
43
|
+
/>
|
44
|
+
</div>
|
45
|
+
</v-toolbar-items>
|
46
|
+
</v-toolbar>
|
47
|
+
</div>
|
48
|
+
</template>
|
49
|
+
<style lang="scss" scoped>
|
50
|
+
.action-btn-wrap{
|
51
|
+
gap: 8px;
|
52
|
+
}
|
53
|
+
.v-toolbar.v-sheet {
|
54
|
+
background-color: #ffffffda;
|
55
|
+
}
|
56
|
+
</style>
|
57
|
+
<script>
|
58
|
+
|
59
|
+
import VcsButton from '../../components/buttons/VcsButton.vue';
|
60
|
+
import { validateActions } from '../../components/lists/VcsActionList.vue';
|
61
|
+
|
62
|
+
/**
|
63
|
+
* @description
|
64
|
+
* A component rendering a single action or a group of actions in a dropdown toolbox using {@link VcsButton} and {@link ToolboxButton}.
|
65
|
+
* @vue-prop {Array<VcsAction>} actions - Array of actions
|
66
|
+
* @vue-prop {string} [groupIcon=''] - optional icon for group dropdown button
|
67
|
+
* @vue-prop {string} [groupTitle=''] - optional title for group dropdown button
|
68
|
+
* @vue-prop {boolean} active - boolean flag, whether group is active
|
69
|
+
* @vue-prop {boolean} position - relative x-position of the button within the toolbar
|
70
|
+
* @vue-computed {Array<VcsAction>} singleActionButton - single button without dropdown
|
71
|
+
* @vue-computed {Array<VcsAction>} groupButtons - buttons rendered below group dropdown button
|
72
|
+
* @vue-computed {number} nudgeLeft - offset depending on buttonSize and buttonPadding to render toolbox centered below dropdown button
|
73
|
+
*/
|
74
|
+
export default {
|
75
|
+
name: 'ToolboxGroupComponent',
|
76
|
+
components: { VcsButton },
|
77
|
+
props: {
|
78
|
+
actions: {
|
79
|
+
type: Array,
|
80
|
+
required: true,
|
81
|
+
validator: validateActions,
|
82
|
+
},
|
83
|
+
groupIcon: {
|
84
|
+
type: String,
|
85
|
+
required: true,
|
86
|
+
},
|
87
|
+
groupTitle: {
|
88
|
+
type: String,
|
89
|
+
default: '',
|
90
|
+
},
|
91
|
+
active: {
|
92
|
+
type: Boolean,
|
93
|
+
required: true,
|
94
|
+
},
|
95
|
+
position: {
|
96
|
+
type: Number,
|
97
|
+
required: true,
|
98
|
+
},
|
99
|
+
},
|
100
|
+
data() {
|
101
|
+
return {
|
102
|
+
buttonSize: 34,
|
103
|
+
buttonPadding: 8,
|
104
|
+
};
|
105
|
+
},
|
106
|
+
computed: {
|
107
|
+
singleActionButton() {
|
108
|
+
if (this.actions.length === 1) {
|
109
|
+
return this.actions[0];
|
110
|
+
}
|
111
|
+
return undefined;
|
112
|
+
},
|
113
|
+
groupButtons() {
|
114
|
+
if (this.singleActionButton) {
|
115
|
+
return [];
|
116
|
+
}
|
117
|
+
return this.actions;
|
118
|
+
},
|
119
|
+
width() {
|
120
|
+
// XXX can this be solved by CSS to get rid of hardcoded size and padding?
|
121
|
+
return this.groupButtons.length * (this.buttonSize + 2 * this.buttonPadding);
|
122
|
+
},
|
123
|
+
nudgeLeft() {
|
124
|
+
return this.position - this.width / 2;
|
125
|
+
},
|
126
|
+
},
|
127
|
+
};
|
128
|
+
</script>
|