@tak-ps/cloudtak 12.54.0
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 +34 -0
- package/dist/types/plugin.d.ts +99 -0
- package/dist/types/src/App.vue.d.ts +5 -0
- package/dist/types/src/base/chatroom-chats.d.ts +17 -0
- package/dist/types/src/base/chatroom.d.ts +47 -0
- package/dist/types/src/base/cot.d.ts +94 -0
- package/dist/types/src/base/database.d.ts +115 -0
- package/dist/types/src/base/events.d.ts +30 -0
- package/dist/types/src/base/filter.d.ts +41 -0
- package/dist/types/src/base/handler.d.ts +11 -0
- package/dist/types/src/base/icon.d.ts +4 -0
- package/dist/types/src/base/notification.d.ts +37 -0
- package/dist/types/src/base/overlay.d.ts +94 -0
- package/dist/types/src/base/subscription-feature.d.ts +49 -0
- package/dist/types/src/base/subscription-log.d.ts +32 -0
- package/dist/types/src/base/subscription.d.ts +115 -0
- package/dist/types/src/base/utils/styles.d.ts +11 -0
- package/dist/types/src/base/validators.d.ts +9 -0
- package/dist/types/src/components/Admin/AdminImports.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminLayers.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplate.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplateLog.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplates.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPalette.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPaletteFeature.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPalettes.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminServer.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminTasks.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminUser.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminUsers.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminVideos.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerConnection.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerInjectorModal.vue.d.ts +11 -0
- package/dist/types/src/components/Admin/Server/ServerInjectors.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerPackages.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerRepeaters.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerVideos.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Tasks/AdminRawTasks.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/AdminVideoLeases.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/AdminVideoService.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/VideoConfig.vue.d.ts +7 -0
- package/dist/types/src/components/Admin/Videos/VideoConfigPort.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/CoordInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/FeatView.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/GeoJSONInput.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Map.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +101 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/RangeInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/RangeRingsInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +67 -0
- package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +122 -0
- package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +81 -0
- package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +71 -0
- package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +58 -0
- package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +54 -0
- package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +25 -0
- package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +37 -0
- package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +28 -0
- package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +53 -0
- package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +62 -0
- package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +41 -0
- package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +7 -0
- package/dist/types/src/components/Configure.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +8 -0
- package/dist/types/src/components/ETL/Connection/ConnectionFiles.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/ConnectionTokens.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/ConnectionVideos.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Connection/TokenModal.vue.d.ts +16 -0
- package/dist/types/src/components/ETL/Connection.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/ConnectionCard.vue.d.ts +16 -0
- package/dist/types/src/components/ETL/Connections.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Data.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Layer/LayerIncomingConfig.vue.d.ts +27 -0
- package/dist/types/src/components/ETL/Layer/LayerOutgoingConfig.vue.d.ts +27 -0
- package/dist/types/src/components/ETL/Layer/utils/QueryInput.vue.d.ts +56 -0
- package/dist/types/src/components/ETL/Layer/utils/StatusDot.vue.d.ts +7 -0
- package/dist/types/src/components/ETL/Layer.vue.d.ts +3 -0
- package/dist/types/src/components/Home.vue.d.ts +13 -0
- package/dist/types/src/components/Loading.vue.d.ts +3 -0
- package/dist/types/src/components/Login.vue.d.ts +7 -0
- package/dist/types/src/components/LostUser.vue.d.ts +3 -0
- package/dist/types/src/components/PageFooter.vue.d.ts +3 -0
- package/dist/types/src/components/ServerAdmin.vue.d.ts +3 -0
- package/dist/types/src/components/VideoWall/Main.vue.d.ts +3 -0
- package/dist/types/src/components/VideoWall.vue.d.ts +13 -0
- package/dist/types/src/components/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/util/InitialAuthor.vue.d.ts +6 -0
- package/dist/types/src/components/util/StatusDot.vue.d.ts +8 -0
- package/dist/types/src/components/util/Upload.vue.d.ts +46 -0
- package/dist/types/src/components/util/UploadLogo.vue.d.ts +14 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/pages/admin/main.d.ts +1 -0
- package/dist/types/src/pages/connection/main.d.ts +1 -0
- package/dist/types/src/pages/docs/App.vue.d.ts +4 -0
- package/dist/types/src/pages/docs/main.d.ts +1 -0
- package/dist/types/src/pages/video/main.d.ts +1 -0
- package/dist/types/src/std.d.ts +19 -0
- package/dist/types/src/stores/brand.d.ts +7 -0
- package/dist/types/src/stores/float.d.ts +42 -0
- package/dist/types/src/stores/map.d.ts +115 -0
- package/dist/types/src/stores/modules/draw.d.ts +35 -0
- package/dist/types/src/stores/modules/icons.d.ts +38 -0
- package/dist/types/src/stores/modules/menu.d.ts +34 -0
- package/dist/types/src/test/setup.d.ts +1 -0
- package/dist/types/src/timediff.d.ts +1 -0
- package/dist/types/src/types.d.ts +158 -0
- package/dist/types/src/video.d.ts +1 -0
- package/dist/types/src/workers/atlas-connection.d.ts +12 -0
- package/dist/types/src/workers/atlas-database.d.ts +134 -0
- package/dist/types/src/workers/atlas-profile.d.ts +39 -0
- package/dist/types/src/workers/atlas-team.d.ts +13 -0
- package/dist/types/src/workers/atlas.d.ts +19 -0
- package/package.json +97 -0
- package/src/App.vue +341 -0
- package/src/base/chatroom-chats.ts +124 -0
- package/src/base/chatroom.ts +202 -0
- package/src/base/cot.ts +625 -0
- package/src/base/database.ts +150 -0
- package/src/base/events.ts +43 -0
- package/src/base/filter.ts +163 -0
- package/src/base/handler.ts +67 -0
- package/src/base/icon.ts +16 -0
- package/src/base/notification.ts +163 -0
- package/src/base/overlay.ts +558 -0
- package/src/base/subscription-feature.ts +224 -0
- package/src/base/subscription-log.ts +174 -0
- package/src/base/subscription.ts +489 -0
- package/src/base/utils/styles.ts +430 -0
- package/src/base/validators.ts +66 -0
- package/src/components/Admin/AdminConfig.vue +487 -0
- package/src/components/Admin/AdminConnections.vue +195 -0
- package/src/components/Admin/AdminDatas.vue +165 -0
- package/src/components/Admin/AdminExport.vue +121 -0
- package/src/components/Admin/AdminImports.vue +222 -0
- package/src/components/Admin/AdminLayerTemplate.vue +91 -0
- package/src/components/Admin/AdminLayers.vue +301 -0
- package/src/components/Admin/AdminMissionTemplate.vue +259 -0
- package/src/components/Admin/AdminMissionTemplateLog.vue +273 -0
- package/src/components/Admin/AdminMissionTemplates.vue +189 -0
- package/src/components/Admin/AdminOverlays.vue +232 -0
- package/src/components/Admin/AdminOverlaysEdit.vue +355 -0
- package/src/components/Admin/AdminPalette.vue +214 -0
- package/src/components/Admin/AdminPaletteFeature.vue +208 -0
- package/src/components/Admin/AdminPalettes.vue +189 -0
- package/src/components/Admin/AdminServer.vue +143 -0
- package/src/components/Admin/AdminTasks.vue +60 -0
- package/src/components/Admin/AdminUser.vue +263 -0
- package/src/components/Admin/AdminUsers.vue +183 -0
- package/src/components/Admin/AdminVideos.vue +60 -0
- package/src/components/Admin/Server/ServerConnection.vue +322 -0
- package/src/components/Admin/Server/ServerInjectorModal.vue +125 -0
- package/src/components/Admin/Server/ServerInjectors.vue +104 -0
- package/src/components/Admin/Server/ServerPackages.vue +159 -0
- package/src/components/Admin/Server/ServerRepeaters.vue +105 -0
- package/src/components/Admin/Server/ServerVideos.vue +83 -0
- package/src/components/Admin/Tasks/AdminRawTasks.vue +148 -0
- package/src/components/Admin/Tasks/AdminTasks.vue +286 -0
- package/src/components/Admin/Videos/AdminVideoLeases.vue +198 -0
- package/src/components/Admin/Videos/AdminVideoService.vue +67 -0
- package/src/components/Admin/Videos/VideoConfig.vue +132 -0
- package/src/components/Admin/Videos/VideoConfigPath.vue +58 -0
- package/src/components/Admin/Videos/VideoConfigPort.vue +40 -0
- package/src/components/CloudTAK/CoTView.vue +915 -0
- package/src/components/CloudTAK/CoordInput.vue +110 -0
- package/src/components/CloudTAK/DrawTools.vue +200 -0
- package/src/components/CloudTAK/FeatView.vue +242 -0
- package/src/components/CloudTAK/GeoJSONInput.vue +226 -0
- package/src/components/CloudTAK/MainMenu.vue +190 -0
- package/src/components/CloudTAK/MainMenuContents.vue +360 -0
- package/src/components/CloudTAK/Map.vue +972 -0
- package/src/components/CloudTAK/MapLoading.vue +31 -0
- package/src/components/CloudTAK/Menu/Basemaps/EditModal.vue +427 -0
- package/src/components/CloudTAK/Menu/Debugger.vue +118 -0
- package/src/components/CloudTAK/Menu/Iconset/EditModal.vue +118 -0
- package/src/components/CloudTAK/Menu/MenuBasemaps.vue +410 -0
- package/src/components/CloudTAK/Menu/MenuChannels.vue +206 -0
- package/src/components/CloudTAK/Menu/MenuChat.vue +222 -0
- package/src/components/CloudTAK/Menu/MenuChats.vue +167 -0
- package/src/components/CloudTAK/Menu/MenuConnections.vue +166 -0
- package/src/components/CloudTAK/Menu/MenuContacts.vue +245 -0
- package/src/components/CloudTAK/Menu/MenuFeatures.vue +718 -0
- package/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue +217 -0
- package/src/components/CloudTAK/Menu/MenuFiles.vue +433 -0
- package/src/components/CloudTAK/Menu/MenuIcon.vue +236 -0
- package/src/components/CloudTAK/Menu/MenuIconset.vue +128 -0
- package/src/components/CloudTAK/Menu/MenuIconsets.vue +266 -0
- package/src/components/CloudTAK/Menu/MenuImport.vue +198 -0
- package/src/components/CloudTAK/Menu/MenuImports.vue +199 -0
- package/src/components/CloudTAK/Menu/MenuItemCard.vue +240 -0
- package/src/components/CloudTAK/Menu/MenuMission.vue +324 -0
- package/src/components/CloudTAK/Menu/MenuMissions.vue +334 -0
- package/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue +434 -0
- package/src/components/CloudTAK/Menu/MenuOverlays.vue +560 -0
- package/src/components/CloudTAK/Menu/MenuPackage.vue +340 -0
- package/src/components/CloudTAK/Menu/MenuPackages.vue +193 -0
- package/src/components/CloudTAK/Menu/MenuRoutes.vue +186 -0
- package/src/components/CloudTAK/Menu/MenuRoutesNew.vue +193 -0
- package/src/components/CloudTAK/Menu/MenuSettings.vue +95 -0
- package/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue +12 -0
- package/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue +144 -0
- package/src/components/CloudTAK/Menu/MenuSettingsTokens.vue +83 -0
- package/src/components/CloudTAK/Menu/MenuVideos.vue +436 -0
- package/src/components/CloudTAK/Menu/MenuVideosRemote.vue +203 -0
- package/src/components/CloudTAK/Menu/Mission/MissionContents.vue +211 -0
- package/src/components/CloudTAK/Menu/Mission/MissionCreate.vue +372 -0
- package/src/components/CloudTAK/Menu/Mission/MissionInfo.vue +331 -0
- package/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue +107 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue +77 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue +77 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue +194 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +157 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLog.vue +170 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLogs.vue +194 -0
- package/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue +142 -0
- package/src/components/CloudTAK/Menu/Mission/MissionUsers.vue +74 -0
- package/src/components/CloudTAK/Menu/Mission/PendingInvites.vue +130 -0
- package/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue +57 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeCots.vue +497 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +32 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeVector.vue +113 -0
- package/src/components/CloudTAK/Menu/Settings/TokenModal.vue +110 -0
- package/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue +753 -0
- package/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue +75 -0
- package/src/components/CloudTAK/Notifications.vue +195 -0
- package/src/components/CloudTAK/Query/Magnetic.vue +80 -0
- package/src/components/CloudTAK/Query/Reverse.vue +65 -0
- package/src/components/CloudTAK/Query/Sun.vue +178 -0
- package/src/components/CloudTAK/Query/Weather.vue +195 -0
- package/src/components/CloudTAK/QueryView.vue +134 -0
- package/src/components/CloudTAK/RadialMenu/LICENSE +21 -0
- package/src/components/CloudTAK/RadialMenu/README.md +63 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.css +85 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.js +534 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.vue +257 -0
- package/src/components/CloudTAK/RangeInput.vue +155 -0
- package/src/components/CloudTAK/RangeRingsInput.vue +269 -0
- package/src/components/CloudTAK/util/Breadcrumb.vue +85 -0
- package/src/components/CloudTAK/util/ChannelInfo.vue +25 -0
- package/src/components/CloudTAK/util/Contact.vue +131 -0
- package/src/components/CloudTAK/util/ContactPuck.vue +40 -0
- package/src/components/CloudTAK/util/Coordinate.vue +313 -0
- package/src/components/CloudTAK/util/CoordinateType.vue +134 -0
- package/src/components/CloudTAK/util/CopyButton.vue +67 -0
- package/src/components/CloudTAK/util/CopyField.vue +286 -0
- package/src/components/CloudTAK/util/DrawOverlay.vue +254 -0
- package/src/components/CloudTAK/util/EmptyInfo.vue +71 -0
- package/src/components/CloudTAK/util/FeatureIcon.vue +134 -0
- package/src/components/CloudTAK/util/FeatureRow.vue +206 -0
- package/src/components/CloudTAK/util/FloatingAttachment.vue +191 -0
- package/src/components/CloudTAK/util/FloatingVideo.vue +654 -0
- package/src/components/CloudTAK/util/GenericSelect.vue +125 -0
- package/src/components/CloudTAK/util/GroupSelect.vue +129 -0
- package/src/components/CloudTAK/util/Icons.vue +146 -0
- package/src/components/CloudTAK/util/JSONModal.vue +57 -0
- package/src/components/CloudTAK/util/Keywords.vue +31 -0
- package/src/components/CloudTAK/util/LineLength.vue +121 -0
- package/src/components/CloudTAK/util/MenuItem.vue +21 -0
- package/src/components/CloudTAK/util/MenuTemplate.vue +137 -0
- package/src/components/CloudTAK/util/MultipleSelect.vue +103 -0
- package/src/components/CloudTAK/util/NotificationIcon.vue +50 -0
- package/src/components/CloudTAK/util/NotificationToast.vue +125 -0
- package/src/components/CloudTAK/util/PolygonArea.vue +109 -0
- package/src/components/CloudTAK/util/PropertyAttachments.vue +224 -0
- package/src/components/CloudTAK/util/PropertyBattery.vue +44 -0
- package/src/components/CloudTAK/util/PropertyBearing.vue +148 -0
- package/src/components/CloudTAK/util/PropertyCreator.vue +61 -0
- package/src/components/CloudTAK/util/PropertyDistance.vue +182 -0
- package/src/components/CloudTAK/util/PropertyElevation.vue +84 -0
- package/src/components/CloudTAK/util/PropertyEmail.vue +44 -0
- package/src/components/CloudTAK/util/PropertyLinks.vue +148 -0
- package/src/components/CloudTAK/util/PropertyMetadata.vue +53 -0
- package/src/components/CloudTAK/util/PropertyMilSym.vue +62 -0
- package/src/components/CloudTAK/util/PropertyPhone.vue +61 -0
- package/src/components/CloudTAK/util/PropertySensor.vue +129 -0
- package/src/components/CloudTAK/util/PropertySpeed.vue +91 -0
- package/src/components/CloudTAK/util/PropertyStyle.vue +202 -0
- package/src/components/CloudTAK/util/PropertyTimes.vue +95 -0
- package/src/components/CloudTAK/util/PropertyType.vue +274 -0
- package/src/components/CloudTAK/util/SearchBox.vue +314 -0
- package/src/components/CloudTAK/util/SelectFeats.vue +190 -0
- package/src/components/CloudTAK/util/SettingsCallsign.vue +151 -0
- package/src/components/CloudTAK/util/Share.vue +496 -0
- package/src/components/CloudTAK/util/ShareToMission.vue +223 -0
- package/src/components/CloudTAK/util/ShareToPackage.vue +250 -0
- package/src/components/CloudTAK/util/SlideDownHeader.vue +92 -0
- package/src/components/CloudTAK/util/StandardItem.vue +42 -0
- package/src/components/CloudTAK/util/Subscriptions.vue +151 -0
- package/src/components/CloudTAK/util/TagEntry.vue +301 -0
- package/src/components/CloudTAK/util/UploadImport.vue +195 -0
- package/src/components/CloudTAK/util/VideoLeaseSourceType.vue +66 -0
- package/src/components/CloudTAK/util/WarnChannels.vue +56 -0
- package/src/components/CloudTAK/util/WarnConfiguration.vue +34 -0
- package/src/components/Configure.vue +259 -0
- package/src/components/ETL/Connection/AgencyBadge.vue +102 -0
- package/src/components/ETL/Connection/AgencySelect.vue +185 -0
- package/src/components/ETL/Connection/CertificateLogin.vue +75 -0
- package/src/components/ETL/Connection/CertificateMachineUser.vue +228 -0
- package/src/components/ETL/Connection/CertificateP12.vue +104 -0
- package/src/components/ETL/Connection/CertificateRaw.vue +50 -0
- package/src/components/ETL/Connection/ConnectionData.vue +174 -0
- package/src/components/ETL/Connection/ConnectionFiles.vue +182 -0
- package/src/components/ETL/Connection/ConnectionGroups.vue +181 -0
- package/src/components/ETL/Connection/ConnectionLayer.vue +180 -0
- package/src/components/ETL/Connection/ConnectionTokens.vue +147 -0
- package/src/components/ETL/Connection/ConnectionVideos.vue +151 -0
- package/src/components/ETL/Connection/Events.vue +88 -0
- package/src/components/ETL/Connection/StatusDot.vue +48 -0
- package/src/components/ETL/Connection/TokenModal.vue +136 -0
- package/src/components/ETL/Connection.vue +194 -0
- package/src/components/ETL/ConnectionCard.vue +265 -0
- package/src/components/ETL/ConnectionEdit.vue +448 -0
- package/src/components/ETL/Connections.vue +148 -0
- package/src/components/ETL/Data/DataFiles.vue +245 -0
- package/src/components/ETL/Data/DataGroups.vue +45 -0
- package/src/components/ETL/Data/DataLayer.vue +144 -0
- package/src/components/ETL/Data/Location.vue +238 -0
- package/src/components/ETL/Data.vue +259 -0
- package/src/components/ETL/DataEdit.vue +212 -0
- package/src/components/ETL/Layer/LayerAlarm.vue +307 -0
- package/src/components/ETL/Layer/LayerDeployment.vue +388 -0
- package/src/components/ETL/Layer/LayerEnvironment.vue +259 -0
- package/src/components/ETL/Layer/LayerIncomingConfig.vue +401 -0
- package/src/components/ETL/Layer/LayerIncomingEnvironmentArcGIS.vue +354 -0
- package/src/components/ETL/Layer/LayerIncomingSchema.vue +138 -0
- package/src/components/ETL/Layer/LayerIncomingStyles.vue +349 -0
- package/src/components/ETL/Layer/LayerOutgoingConfig.vue +204 -0
- package/src/components/ETL/Layer/LayerOutgoingEnvironmentArcGIS.vue +279 -0
- package/src/components/ETL/Layer/utils/QueryInput.vue +52 -0
- package/src/components/ETL/Layer/utils/Schema.vue +322 -0
- package/src/components/ETL/Layer/utils/SchemaModal.vue +77 -0
- package/src/components/ETL/Layer/utils/StatusDot.vue +38 -0
- package/src/components/ETL/Layer/utils/StyleLinkModal.vue +83 -0
- package/src/components/ETL/Layer/utils/StyleLinks.vue +139 -0
- package/src/components/ETL/Layer/utils/StyleSingle.vue +885 -0
- package/src/components/ETL/Layer/utils/StyleTemplate.vue +97 -0
- package/src/components/ETL/Layer/utils/TaskModal.vue +217 -0
- package/src/components/ETL/Layer.vue +560 -0
- package/src/components/ETL/LayerEdit.vue +276 -0
- package/src/components/ETL/Styling/Layer.vue +311 -0
- package/src/components/ETL/Styling/ObjectInput.vue +46 -0
- package/src/components/ETL/Styling/Style.vue +233 -0
- package/src/components/Home.vue +17 -0
- package/src/components/Loading.vue +42 -0
- package/src/components/Login.vue +198 -0
- package/src/components/LostUser.vue +31 -0
- package/src/components/PageFooter.vue +41 -0
- package/src/components/ServerAdmin.vue +408 -0
- package/src/components/VideoWall/Main.vue +79 -0
- package/src/components/VideoWall.vue +17 -0
- package/src/components/util/DataSelect.vue +148 -0
- package/src/components/util/EsriFilter.vue +140 -0
- package/src/components/util/EsriPortal.vue +422 -0
- package/src/components/util/EsriPortalCreate.vue +72 -0
- package/src/components/util/EsriServer.vue +368 -0
- package/src/components/util/GroupSelect.vue +166 -0
- package/src/components/util/IconSelect.vue +302 -0
- package/src/components/util/InitialAuthor.vue +28 -0
- package/src/components/util/LayerSelect.vue +162 -0
- package/src/components/util/LayerTaskSelect.vue +311 -0
- package/src/components/util/LayerTemplateSelect.vue +173 -0
- package/src/components/util/LoginModal.vue +110 -0
- package/src/components/util/PublicTilesSelect.vue +171 -0
- package/src/components/util/StatusDot.vue +31 -0
- package/src/components/util/TableFooter.vue +64 -0
- package/src/components/util/TableHeader.vue +127 -0
- package/src/components/util/Upload.vue +220 -0
- package/src/components/util/UploadCSV.vue +46 -0
- package/src/components/util/UploadLogo.vue +83 -0
- package/src/components/util/UploadP12.vue +93 -0
- package/src/components/util/UserSelect.vue +151 -0
- package/src/derived-types.d.ts +35243 -0
- package/src/main.ts +264 -0
- package/src/pages/admin/main.ts +208 -0
- package/src/pages/connection/main.ts +158 -0
- package/src/pages/docs/App.vue +19 -0
- package/src/pages/docs/main.ts +6 -0
- package/src/pages/video/main.ts +27 -0
- package/src/std.ts +152 -0
- package/src/stores/brand.ts +28 -0
- package/src/stores/float.ts +113 -0
- package/src/stores/map.ts +931 -0
- package/src/stores/modules/draw.ts +413 -0
- package/src/stores/modules/icons.ts +185 -0
- package/src/stores/modules/menu.ts +281 -0
- package/src/test/setup.ts +43 -0
- package/src/timediff.ts +33 -0
- package/src/types.ts +226 -0
- package/src/video.ts +27 -0
- package/src/vite-env.d.ts +9 -0
- package/src/workers/atlas-connection.ts +236 -0
- package/src/workers/atlas-database.ts +764 -0
- package/src/workers/atlas-profile.ts +374 -0
- package/src/workers/atlas-team.ts +90 -0
- package/src/workers/atlas.ts +81 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProfileOverlay,
|
|
3
|
+
ProfileOverlay_Create,
|
|
4
|
+
TileJSON
|
|
5
|
+
} from '../types.ts';
|
|
6
|
+
import { DrawToolMode } from '../stores/modules/draw.ts';
|
|
7
|
+
import type { FeatureCollection } from 'geojson';
|
|
8
|
+
import { bbox } from '@turf/bbox'
|
|
9
|
+
import type { LngLatBoundsLike, LayerSpecification, VectorTileSource, RasterTileSource, GeoJSONSource } from 'maplibre-gl'
|
|
10
|
+
import cotStyles from './utils/styles.ts'
|
|
11
|
+
import { std, stdurl } from '../std.js';
|
|
12
|
+
import { useMapStore } from '../stores/map.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @class
|
|
16
|
+
*/
|
|
17
|
+
export default class Overlay {
|
|
18
|
+
_destroyed: boolean;
|
|
19
|
+
_internal: boolean;
|
|
20
|
+
|
|
21
|
+
_timer: ReturnType<typeof setInterval> | null;
|
|
22
|
+
|
|
23
|
+
_clickable: Array<{ id: string; type: string }>;
|
|
24
|
+
|
|
25
|
+
_error?: Error;
|
|
26
|
+
_loaded: boolean;
|
|
27
|
+
|
|
28
|
+
id: number;
|
|
29
|
+
name: string;
|
|
30
|
+
active: boolean;
|
|
31
|
+
username?: string;
|
|
32
|
+
frequency: number | null;
|
|
33
|
+
iconset: string | null;
|
|
34
|
+
created: string;
|
|
35
|
+
updated: string;
|
|
36
|
+
pos: number;
|
|
37
|
+
type: string;
|
|
38
|
+
opacity: number;
|
|
39
|
+
visible: boolean;
|
|
40
|
+
mode: string;
|
|
41
|
+
mode_id: string | null;
|
|
42
|
+
|
|
43
|
+
actions: ProfileOverlay["actions"];
|
|
44
|
+
|
|
45
|
+
url?: string;
|
|
46
|
+
styles: Array<LayerSpecification>;
|
|
47
|
+
token: string | null;
|
|
48
|
+
|
|
49
|
+
static async create(
|
|
50
|
+
body: ProfileOverlay | ProfileOverlay_Create,
|
|
51
|
+
opts: {
|
|
52
|
+
internal?: boolean;
|
|
53
|
+
skipSave?: boolean;
|
|
54
|
+
clickable?: Array<{ id: string; type: string }>;
|
|
55
|
+
before?: string;
|
|
56
|
+
skipLayers?: boolean;
|
|
57
|
+
} = {}
|
|
58
|
+
): Promise<Overlay> {
|
|
59
|
+
if (opts.skipSave !== true) {
|
|
60
|
+
let ov = await std('/api/profile/overlay', {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
body
|
|
63
|
+
}) as ProfileOverlay;
|
|
64
|
+
|
|
65
|
+
if (ov.styles && ov.styles.length) {
|
|
66
|
+
for (const layer of ov.styles) {
|
|
67
|
+
const l = layer as LayerSpecification;
|
|
68
|
+
l.id = `${ov.id}-${l.id}`;
|
|
69
|
+
// @ts-expect-error Special case Background Layer type
|
|
70
|
+
l.source = String(ov.id);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
ov = await std(`/api/profile/overlay/${ov.id}`, {
|
|
75
|
+
method: 'PATCH',
|
|
76
|
+
body: ov
|
|
77
|
+
}) as ProfileOverlay;
|
|
78
|
+
|
|
79
|
+
const overlay = new Overlay(ov, {
|
|
80
|
+
internal: opts.internal
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
await overlay.init(opts);
|
|
84
|
+
|
|
85
|
+
return overlay;
|
|
86
|
+
} else {
|
|
87
|
+
const overlay = new Overlay(body as ProfileOverlay, {
|
|
88
|
+
internal: opts.internal
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
await overlay.init(opts);
|
|
92
|
+
|
|
93
|
+
return overlay;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static async internal(
|
|
98
|
+
body: {
|
|
99
|
+
id: number;
|
|
100
|
+
type: string;
|
|
101
|
+
name: string;
|
|
102
|
+
styles?: Array<LayerSpecification>;
|
|
103
|
+
clickable?: Array<{ id: string; type: string }>;
|
|
104
|
+
}
|
|
105
|
+
): Promise<Overlay> {
|
|
106
|
+
const overlay = await Overlay.create({
|
|
107
|
+
...body,
|
|
108
|
+
visible: true,
|
|
109
|
+
opacity: 1,
|
|
110
|
+
username: 'internal',
|
|
111
|
+
url: '',
|
|
112
|
+
frequency: null,
|
|
113
|
+
iconset: null,
|
|
114
|
+
created: new Date().toISOString(),
|
|
115
|
+
updated: new Date().toISOString(),
|
|
116
|
+
token: undefined,
|
|
117
|
+
mode: 'internal',
|
|
118
|
+
mode_id: undefined,
|
|
119
|
+
styles: body.styles || [],
|
|
120
|
+
pos: 3,
|
|
121
|
+
}, {
|
|
122
|
+
skipSave: true,
|
|
123
|
+
clickable: body.clickable,
|
|
124
|
+
internal: true
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
return overlay;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static async load(id: number): Promise<Overlay> {
|
|
131
|
+
const remote = await std(`/api/profile/overlay/${id}`) as ProfileOverlay;
|
|
132
|
+
|
|
133
|
+
const ov = await Overlay.create(remote, {
|
|
134
|
+
skipSave: true
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
return ov;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
constructor(
|
|
141
|
+
overlay: ProfileOverlay,
|
|
142
|
+
opts: {
|
|
143
|
+
internal?: boolean;
|
|
144
|
+
} = {}
|
|
145
|
+
) {
|
|
146
|
+
this._destroyed = false;
|
|
147
|
+
this._internal = opts.internal || false;
|
|
148
|
+
this._clickable = [];
|
|
149
|
+
this._loaded = false;
|
|
150
|
+
|
|
151
|
+
this.id = overlay.id;
|
|
152
|
+
this.name = overlay.name;
|
|
153
|
+
this.active = overlay.active;
|
|
154
|
+
this.username = overlay.username;
|
|
155
|
+
this.frequency = overlay.frequency;
|
|
156
|
+
this.iconset = overlay.iconset;
|
|
157
|
+
this.created = overlay.created;
|
|
158
|
+
this.updated = overlay.updated;
|
|
159
|
+
this.actions = overlay.actions || {
|
|
160
|
+
feature: []
|
|
161
|
+
};
|
|
162
|
+
this.pos = overlay.pos;
|
|
163
|
+
this.type = overlay.type;
|
|
164
|
+
this.opacity = overlay.opacity;
|
|
165
|
+
this.visible = overlay.visible;
|
|
166
|
+
this.mode = overlay.mode;
|
|
167
|
+
this.mode_id = overlay.mode_id || null;
|
|
168
|
+
this.url = overlay.url;
|
|
169
|
+
this.styles = overlay.styles as Array<LayerSpecification>;
|
|
170
|
+
this.token = overlay.token;
|
|
171
|
+
|
|
172
|
+
if (this.frequency) {
|
|
173
|
+
this._timer = setInterval(async () => {
|
|
174
|
+
const mapStore = useMapStore();
|
|
175
|
+
try {
|
|
176
|
+
mapStore.map.refreshTiles(String(this.id));
|
|
177
|
+
} catch (err) {
|
|
178
|
+
console.error('Error refreshing tiles for overlay', this.id, err);
|
|
179
|
+
}
|
|
180
|
+
}, this.frequency * 1000);
|
|
181
|
+
} else {
|
|
182
|
+
this._timer = null;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
healthy(): boolean {
|
|
187
|
+
return !this._error;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
hasBounds(): boolean {
|
|
191
|
+
const mapStore = useMapStore();
|
|
192
|
+
const source = mapStore.map.getSource(String(this.id))
|
|
193
|
+
if (!source) return false;
|
|
194
|
+
|
|
195
|
+
if (source.type === 'vector') {
|
|
196
|
+
return !!(source as VectorTileSource).bounds;
|
|
197
|
+
} else if (source.type === 'raster') {
|
|
198
|
+
return !!(source as RasterTileSource).bounds;
|
|
199
|
+
} else if (source.type === 'geojson') {
|
|
200
|
+
return true;
|
|
201
|
+
} else {
|
|
202
|
+
return false
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async zoomTo(): Promise<void> {
|
|
207
|
+
const mapStore = useMapStore();
|
|
208
|
+
const source = mapStore.map.getSource(String(this.id))
|
|
209
|
+
if (!source) return;
|
|
210
|
+
|
|
211
|
+
if (source.type === 'vector') {
|
|
212
|
+
mapStore.map.fitBounds((source as VectorTileSource).bounds);
|
|
213
|
+
} else if (source.type === 'raster') {
|
|
214
|
+
mapStore.map.fitBounds((source as RasterTileSource).bounds);
|
|
215
|
+
} else if (source.type === 'geojson') {
|
|
216
|
+
const geojson = await (source as GeoJSONSource).getData();
|
|
217
|
+
mapStore.map.fitBounds(bbox(geojson) as LngLatBoundsLike);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
async addLayers(before?: string): Promise<void> {
|
|
222
|
+
const mapStore = useMapStore();
|
|
223
|
+
|
|
224
|
+
for (const l of this.styles) {
|
|
225
|
+
if (before) {
|
|
226
|
+
mapStore.map.addLayer(l, before);
|
|
227
|
+
} else {
|
|
228
|
+
mapStore.map.addLayer(l)
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// The above doesn't set vis/opacity initially
|
|
233
|
+
await this.update({
|
|
234
|
+
opacity: this.opacity,
|
|
235
|
+
visible: this.visible
|
|
236
|
+
})
|
|
237
|
+
|
|
238
|
+
for (const click of this._clickable) {
|
|
239
|
+
const hoverIds = new Set<string>();
|
|
240
|
+
|
|
241
|
+
mapStore.map.on('mouseenter', click.id, () => {
|
|
242
|
+
if (mapStore.draw.mode !== DrawToolMode.STATIC) return;
|
|
243
|
+
mapStore.map.getCanvas().style.cursor = 'pointer';
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
mapStore.map.on('mousemove', click.id, (e) => {
|
|
247
|
+
if (mapStore.draw.mode !== DrawToolMode.STATIC) return;
|
|
248
|
+
|
|
249
|
+
if (this.type === 'vector' && e.features) {
|
|
250
|
+
const newIds = e.features.map(f => String(f.id));
|
|
251
|
+
|
|
252
|
+
for (const id of hoverIds) {
|
|
253
|
+
if (newIds.includes(id)) continue;
|
|
254
|
+
|
|
255
|
+
mapStore.map.setFeatureState({
|
|
256
|
+
id: id,
|
|
257
|
+
source: String(this.id),
|
|
258
|
+
sourceLayer: 'out'
|
|
259
|
+
}, { hover: false });
|
|
260
|
+
|
|
261
|
+
hoverIds.delete(id);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
for (const id of newIds) {
|
|
265
|
+
mapStore.map.setFeatureState({
|
|
266
|
+
id: id,
|
|
267
|
+
source: String(this.id),
|
|
268
|
+
sourceLayer: 'out'
|
|
269
|
+
}, { hover: true });
|
|
270
|
+
|
|
271
|
+
hoverIds.add(id);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
mapStore.map.on('mouseleave', click.id, () => {
|
|
277
|
+
if (mapStore.draw.mode !== DrawToolMode.STATIC) return;
|
|
278
|
+
mapStore.map.getCanvas().style.cursor = '';
|
|
279
|
+
|
|
280
|
+
if (this.type === 'vector') {
|
|
281
|
+
for (const id of hoverIds) {
|
|
282
|
+
mapStore.map.setFeatureState({
|
|
283
|
+
id: id,
|
|
284
|
+
source: String(this.id),
|
|
285
|
+
sourceLayer: 'out'
|
|
286
|
+
}, { hover: false });
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
hoverIds.clear()
|
|
290
|
+
}
|
|
291
|
+
})
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
async init(opts: {
|
|
296
|
+
clickable?: Array<{ id: string; type: string }>;
|
|
297
|
+
before?: string;
|
|
298
|
+
skipLayers?: boolean;
|
|
299
|
+
} = {}) {
|
|
300
|
+
const mapStore = useMapStore();
|
|
301
|
+
|
|
302
|
+
if (this.type === 'raster' && this.url) {
|
|
303
|
+
const url = stdurl(this.url);
|
|
304
|
+
url.searchParams.append('token', localStorage.token);
|
|
305
|
+
|
|
306
|
+
const tileJSON = await std(url.toString()) as TileJSON
|
|
307
|
+
|
|
308
|
+
mapStore.map.addSource(String(this.id), {
|
|
309
|
+
...tileJSON,
|
|
310
|
+
type: 'raster',
|
|
311
|
+
});
|
|
312
|
+
} else if (this.type === 'vector' && this.url) {
|
|
313
|
+
const url = stdurl(this.url);
|
|
314
|
+
url.searchParams.append('token', localStorage.token);
|
|
315
|
+
|
|
316
|
+
mapStore.map.addSource(String(this.id), {
|
|
317
|
+
type: 'vector',
|
|
318
|
+
url: String(url)
|
|
319
|
+
});
|
|
320
|
+
} else if (this.type === 'geojson') {
|
|
321
|
+
if (!mapStore.map.getSource(String(this.id))) {
|
|
322
|
+
const data: FeatureCollection = { type: 'FeatureCollection', features: [] };
|
|
323
|
+
|
|
324
|
+
mapStore.map.addSource(String(this.id), {
|
|
325
|
+
type: 'geojson',
|
|
326
|
+
cluster: false,
|
|
327
|
+
data
|
|
328
|
+
})
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const profile = await mapStore.worker.profile.load();
|
|
333
|
+
|
|
334
|
+
let size = 8
|
|
335
|
+
if (profile.display_text === 'Small') size = 4;
|
|
336
|
+
if (profile.display_text === 'Large') size = 16;
|
|
337
|
+
|
|
338
|
+
if (!this.styles.length && this.type === 'raster') {
|
|
339
|
+
this.styles = [{
|
|
340
|
+
'id': String(this.id),
|
|
341
|
+
'type': 'raster',
|
|
342
|
+
'source': String(this.id)
|
|
343
|
+
}]
|
|
344
|
+
} else if (!this.styles.length && this.type === 'vector') {
|
|
345
|
+
this.styles = cotStyles(String(this.id), {
|
|
346
|
+
sourceLayer: 'out',
|
|
347
|
+
group: false,
|
|
348
|
+
icons: !!this.iconset,
|
|
349
|
+
labels: { size }
|
|
350
|
+
});
|
|
351
|
+
} else if (!this.styles.length && this.type === 'geojson') {
|
|
352
|
+
this.styles = cotStyles(String(this.id), {
|
|
353
|
+
group: this.mode !== "mission",
|
|
354
|
+
icons: true,
|
|
355
|
+
course: true,
|
|
356
|
+
rotateIcons: profile.display_icon_rotation,
|
|
357
|
+
labels: { size }
|
|
358
|
+
});
|
|
359
|
+
} else if (!this.styles.length) {
|
|
360
|
+
this.styles = [];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (this.iconset) {
|
|
364
|
+
try {
|
|
365
|
+
mapStore.icons.addIconset(this.iconset);
|
|
366
|
+
} catch (err) {
|
|
367
|
+
console.error('Error adding iconset', this.iconset, err);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if (this.type === 'vector' && this. mode !== 'basemap' && opts.clickable === undefined) {
|
|
372
|
+
opts.clickable = this.styles.map((l) => {
|
|
373
|
+
return { id: l.id, type: 'feat' };
|
|
374
|
+
});
|
|
375
|
+
} else if (this.type === 'geojson' && opts.clickable === undefined) {
|
|
376
|
+
opts.clickable = this.styles.map((l) => {
|
|
377
|
+
if (this.mode === 'mission') {
|
|
378
|
+
return { id: l.id, type: 'cot' };
|
|
379
|
+
} else {
|
|
380
|
+
return { id: l.id, type: this.id === -1 ? 'cot' : 'feat' };
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (!opts.clickable) {
|
|
386
|
+
opts.clickable = [];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
this._clickable = opts.clickable;
|
|
390
|
+
|
|
391
|
+
if (!opts.skipLayers) {
|
|
392
|
+
await this.addLayers(opts.before);
|
|
393
|
+
}
|
|
394
|
+
this._loaded = true;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
remove() {
|
|
398
|
+
const mapStore = useMapStore();
|
|
399
|
+
|
|
400
|
+
for (const l of this.styles) {
|
|
401
|
+
mapStore.map.removeLayer(String(l.id));
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
if (this.iconset) {
|
|
405
|
+
mapStore.icons.removeIconset(this.iconset);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (mapStore.map.getStyle().sources[String(this.id)]) {
|
|
409
|
+
// Don't crash the map if it already removed
|
|
410
|
+
mapStore.map.removeSource(String(this.id));
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
async replace(
|
|
415
|
+
overlay: {
|
|
416
|
+
name?: string
|
|
417
|
+
active?: boolean;
|
|
418
|
+
username?: string
|
|
419
|
+
actions?: ProfileOverlay["actions"];
|
|
420
|
+
type?: string;
|
|
421
|
+
opacity?: number;
|
|
422
|
+
visible?: boolean;
|
|
423
|
+
mode?: string;
|
|
424
|
+
mode_id?: string;
|
|
425
|
+
url?: string;
|
|
426
|
+
token?: string;
|
|
427
|
+
styles?: Array<LayerSpecification>;
|
|
428
|
+
},
|
|
429
|
+
opts: {
|
|
430
|
+
before?: string;
|
|
431
|
+
} = {}
|
|
432
|
+
): Promise<void> {
|
|
433
|
+
this.remove();
|
|
434
|
+
|
|
435
|
+
if (overlay.name) this.name = overlay.name;
|
|
436
|
+
if (overlay.active !== undefined) this.active = overlay.active;
|
|
437
|
+
if (overlay.username) this.username = overlay.username;
|
|
438
|
+
if (overlay.actions) this.actions = overlay.actions || { feature: [] };
|
|
439
|
+
if (overlay.type) this.type = overlay.type;
|
|
440
|
+
if (overlay.opacity) this.opacity = overlay.opacity;
|
|
441
|
+
if (overlay.visible) this.visible = overlay.visible;
|
|
442
|
+
if (overlay.mode) this.mode = overlay.mode;
|
|
443
|
+
if (overlay.mode_id) this.mode_id = overlay.mode_id || null;
|
|
444
|
+
if (overlay.url) this.url = overlay.url;
|
|
445
|
+
if (overlay.token) this.token = overlay.token;
|
|
446
|
+
if (overlay.styles) {
|
|
447
|
+
if (overlay.styles && overlay.styles.length) {
|
|
448
|
+
for (const layer of overlay.styles) {
|
|
449
|
+
const l = layer as LayerSpecification;
|
|
450
|
+
l.id = `${this.id}-${l.id}`;
|
|
451
|
+
// @ts-expect-error Special case Background Layer type
|
|
452
|
+
l.source = String(this.id);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
this.styles = overlay.styles as Array<LayerSpecification>;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
await this.init({
|
|
459
|
+
clickable: this._clickable,
|
|
460
|
+
before: opts.before
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
await this.save();
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
// Update attribution if this is a basemap
|
|
467
|
+
if (this.mode === 'basemap') {
|
|
468
|
+
const mapStore = useMapStore();
|
|
469
|
+
await mapStore.updateAttribution();
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
async delete(): Promise<void> {
|
|
474
|
+
this._destroyed = true;
|
|
475
|
+
|
|
476
|
+
const wasBasemap = this.mode === 'basemap';
|
|
477
|
+
|
|
478
|
+
if (this._timer) {
|
|
479
|
+
clearInterval(this._timer);
|
|
480
|
+
this._timer = null;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
this.remove();
|
|
484
|
+
|
|
485
|
+
if (this._internal) return;
|
|
486
|
+
|
|
487
|
+
if (this.id) {
|
|
488
|
+
await std(`/api/profile/overlay?id=${this.id}`, {
|
|
489
|
+
method: 'DELETE'
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// Update attribution if this was a basemap
|
|
494
|
+
if (wasBasemap) {
|
|
495
|
+
const mapStore = useMapStore();
|
|
496
|
+
await mapStore.updateAttribution();
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
async update(body: {
|
|
501
|
+
pos?: number;
|
|
502
|
+
visible?: boolean;
|
|
503
|
+
opacity?: number;
|
|
504
|
+
}): Promise<void> {
|
|
505
|
+
const mapStore = useMapStore();
|
|
506
|
+
|
|
507
|
+
if (body.opacity !== undefined) {
|
|
508
|
+
this.opacity = body.opacity;
|
|
509
|
+
for (const l of this.styles) {
|
|
510
|
+
if (this.type === 'raster') {
|
|
511
|
+
mapStore.map.setPaintProperty(l.id, 'raster-opacity', Number(this.opacity))
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
if (body.visible !== undefined) {
|
|
517
|
+
this.visible = body.visible;
|
|
518
|
+
for (const l of this.styles) {
|
|
519
|
+
mapStore.map.setLayoutProperty(l.id, 'visibility', this.visible ? 'visible' : 'none');
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Update attribution if this is a basemap
|
|
524
|
+
if (this.mode === 'basemap') {
|
|
525
|
+
await mapStore.updateAttribution();
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
if (body.pos !== undefined) {
|
|
529
|
+
this.pos = body.pos;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
await this.save();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
async save(): Promise<void> {
|
|
536
|
+
if (this._destroyed) throw new Error('Cannot save a destroyed layer');
|
|
537
|
+
if (this._internal) return;
|
|
538
|
+
|
|
539
|
+
// We want to just use the default style every time for things like missions
|
|
540
|
+
// We only want to save the style on custom datasources
|
|
541
|
+
const dropStyles = ['mission', 'internal'].includes(this.mode);
|
|
542
|
+
|
|
543
|
+
await std(`/api/profile/overlay/${this.id}`, {
|
|
544
|
+
method: 'PATCH',
|
|
545
|
+
body: {
|
|
546
|
+
pos: this.pos,
|
|
547
|
+
name: this.name,
|
|
548
|
+
type: this.type,
|
|
549
|
+
active: this.active,
|
|
550
|
+
opacity: this.opacity,
|
|
551
|
+
mode_id: this.mode_id,
|
|
552
|
+
url: this.url,
|
|
553
|
+
visible: this.visible,
|
|
554
|
+
styles: dropStyles ? [] : this.styles
|
|
555
|
+
}
|
|
556
|
+
})
|
|
557
|
+
}
|
|
558
|
+
}
|