qwc2 2025.10.13 → 2025.10.15

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.
Files changed (241) hide show
  1. package/actions/display.js +30 -1
  2. package/actions/editing.js +22 -1
  3. package/actions/layerinfo.js +13 -1
  4. package/actions/layers.js +213 -3
  5. package/actions/localConfig.js +58 -1
  6. package/actions/locale.js +21 -1
  7. package/actions/locate.js +26 -1
  8. package/actions/logging.js +10 -1
  9. package/actions/map.js +105 -2
  10. package/actions/measurement.js +12 -1
  11. package/actions/processNotifications.js +37 -1
  12. package/actions/redlining.js +18 -1
  13. package/actions/redliningPick.js +12 -1
  14. package/actions/search.js +12 -1
  15. package/actions/serviceinfo.js +12 -1
  16. package/actions/task.js +55 -3
  17. package/actions/theme.js +339 -19
  18. package/actions/windows.js +164 -5
  19. package/components/AppMenu.js +435 -3
  20. package/components/AttributeForm.js +928 -32
  21. package/components/AttributeTableWidget.js +1105 -13
  22. package/components/AutoEditForm.js +189 -3
  23. package/components/CoordinateDisplayer.js +78 -2
  24. package/components/EditComboField.js +190 -6
  25. package/components/EditUploadField.js +315 -3
  26. package/components/ExportSelection.js +203 -2
  27. package/components/FullscreenSwitcher.js +90 -3
  28. package/components/Icon.js +81 -2
  29. package/components/IdentifyViewer.js +1161 -6
  30. package/components/ImportLayer.js +718 -20
  31. package/components/LayerInfoWindow.js +145 -2
  32. package/components/LinkFeatureForm.js +246 -5
  33. package/components/MapButton.js +88 -2
  34. package/components/MapSelection.js +287 -8
  35. package/components/MessageBar.js +68 -2
  36. package/components/NumericInputWindow.js +359 -2
  37. package/components/PickFeature.js +266 -2
  38. package/components/PluginsContainer.js +227 -8
  39. package/components/PrintSelection.js +620 -49
  40. package/components/ProcessNotifications.js +104 -2
  41. package/components/QtDesignerForm.js +1137 -18
  42. package/components/ResizeableWindow.js +591 -8
  43. package/components/SearchBox.js +1307 -20
  44. package/components/ServiceInfoWindow.js +107 -2
  45. package/components/SideBar.js +204 -4
  46. package/components/StandardApp.js +381 -20
  47. package/components/Swipeable.js +15 -1
  48. package/components/TaskBar.js +85 -2
  49. package/components/ThemeLayersListWindow.js +216 -4
  50. package/components/ThemeList.js +381 -7
  51. package/components/Toolbar.js +106 -2
  52. package/components/WindowManager.js +178 -2
  53. package/components/map/OlLayer.js +257 -6
  54. package/components/map/OlMap.js +405 -5
  55. package/components/map/layers/BingLayer.js +31 -2
  56. package/components/map/layers/GoogleLayer.js +222 -19
  57. package/components/map/layers/GraticuleLayer.js +21 -1
  58. package/components/map/layers/ImageLayer.js +15 -1
  59. package/components/map/layers/MVTLayer.js +52 -2
  60. package/components/map/layers/OSMLayer.js +24 -2
  61. package/components/map/layers/OverlayLayer.js +55 -3
  62. package/components/map/layers/VectorLayer.js +173 -8
  63. package/components/map/layers/WFSLayer.js +220 -6
  64. package/components/map/layers/WMSLayer.js +180 -6
  65. package/components/map/layers/WMTSLayer.js +67 -3
  66. package/components/map/layers/XYZLayer.js +24 -2
  67. package/components/map/layers/index.js +28 -1
  68. package/components/map3d/EditDataset3D.js +190 -3
  69. package/components/map3d/HeightProfile3D.js +402 -3
  70. package/components/map3d/ImportObjects3D.js +162 -2
  71. package/components/map3d/Map3D.js +1304 -38
  72. package/components/map3d/MapControls3D.js +392 -7
  73. package/components/map3d/SearchField3D.js +183 -11
  74. package/components/map3d/View3DSwitcher.js +98 -2
  75. package/components/map3d/drawtool/CreateTool3D.js +174 -4
  76. package/components/map3d/drawtool/EditTool3D.js +590 -6
  77. package/components/map3d/drawtool/NumericInput3D.js +336 -4
  78. package/components/map3d/layers/GeoTIFFLayer3D.js +15 -1
  79. package/components/map3d/layers/VectorLayer3D.js +53 -2
  80. package/components/map3d/layers/WFSLayer3D.js +109 -3
  81. package/components/map3d/layers/WMSLayer3D.js +70 -2
  82. package/components/map3d/layers/WMTSLayer3D.js +27 -3
  83. package/components/map3d/layers/index.js +14 -1
  84. package/components/map3d/utils/FirstPersonControls3D.js +423 -16
  85. package/components/map3d/utils/MiscUtils3D.js +221 -13
  86. package/components/map3d/utils/OrbitControls3D.js +176 -5
  87. package/components/map3d/utils/Tiles3DStyle.js +238 -9
  88. package/components/share/ShareLink.js +54 -2
  89. package/components/share/ShareQRCode.js +62 -2
  90. package/components/share/ShareSocials.js +125 -3
  91. package/components/timeline/FixedTimeline.js +236 -5
  92. package/components/timeline/InfiniteTimeline.js +347 -8
  93. package/components/timeline/TimelineFeaturesSlider.js +439 -5
  94. package/components/widgets/AccordeonWidget.js +96 -2
  95. package/components/widgets/ButtonBar.js +124 -2
  96. package/components/widgets/ColorButton.js +201 -3
  97. package/components/widgets/ComboBox.js +166 -2
  98. package/components/widgets/CopyButton.js +110 -2
  99. package/components/widgets/DateTimeInput.js +100 -3
  100. package/components/widgets/EditableSelect.js +230 -3
  101. package/components/widgets/FileSelector.js +128 -4
  102. package/components/widgets/Input.js +124 -2
  103. package/components/widgets/InputContainer.js +96 -2
  104. package/components/widgets/LayerCatalogWidget.js +219 -3
  105. package/components/widgets/MenuButton.js +157 -1
  106. package/components/widgets/ModalDialog.js +64 -2
  107. package/components/widgets/NavBar.js +119 -2
  108. package/components/widgets/NumberInput.js +226 -4
  109. package/components/widgets/PopupMenu.js +72 -1
  110. package/components/widgets/Primitives.js +6 -1
  111. package/components/widgets/ReCaptchaWidget.js +55 -1
  112. package/components/widgets/SearchWidget.js +255 -2
  113. package/components/widgets/Spinner.js +44 -2
  114. package/components/widgets/SuggestionInput.js +77 -2
  115. package/components/widgets/TextInput.js +308 -2
  116. package/components/widgets/ToggleSwitch.js +85 -2
  117. package/components/widgets/VectorLayerPicker.js +85 -3
  118. package/libs/openlayers.js +225 -5
  119. package/package.json +1 -1
  120. package/plugins/API.js +358 -15
  121. package/plugins/AttributeTable.js +109 -3
  122. package/plugins/Authentication.js +130 -5
  123. package/plugins/BackgroundSwitcher.js +218 -4
  124. package/plugins/Bookmark.js +289 -3
  125. package/plugins/BottomBar.js +298 -4
  126. package/plugins/CookiePopup.js +67 -3
  127. package/plugins/Cyclomedia.js +442 -5
  128. package/plugins/Editing.js +497 -9
  129. package/plugins/FeatureForm.js +366 -4
  130. package/plugins/FeatureSearch.js +458 -3
  131. package/plugins/GeometryDigitizer.js +664 -7
  132. package/plugins/HeightProfile.js +768 -15
  133. package/plugins/Help.js +102 -3
  134. package/plugins/HomeButton.js +80 -3
  135. package/plugins/Identify.js +543 -5
  136. package/plugins/LayerCatalog.js +215 -4
  137. package/plugins/LayerTree.js +1194 -6
  138. package/plugins/LocateButton.js +94 -3
  139. package/plugins/Map.js +320 -16
  140. package/plugins/MapCompare.js +94 -3
  141. package/plugins/MapCopyright.js +127 -5
  142. package/plugins/MapExport.js +613 -20
  143. package/plugins/MapFilter.js +868 -12
  144. package/plugins/MapInfoTooltip.js +277 -3
  145. package/plugins/MapLegend.js +253 -4
  146. package/plugins/MapTip.js +290 -4
  147. package/plugins/Measure.js +220 -4
  148. package/plugins/NewsPopup.js +137 -3
  149. package/plugins/OverviewMap.js +167 -7
  150. package/plugins/Panoramax.js +340 -2
  151. package/plugins/Portal.js +199 -4
  152. package/plugins/Print.js +1231 -15
  153. package/plugins/Redlining.js +750 -6
  154. package/plugins/Reports.js +332 -3
  155. package/plugins/Routing.js +1278 -15
  156. package/plugins/ScratchDrawing.js +173 -5
  157. package/plugins/Settings.js +241 -4
  158. package/plugins/Share.js +198 -3
  159. package/plugins/StartupMarker.js +84 -4
  160. package/plugins/TaskButton.js +88 -3
  161. package/plugins/ThemeSwitcher.js +164 -4
  162. package/plugins/TimeManager.js +971 -10
  163. package/plugins/TopBar.js +300 -7
  164. package/plugins/TourGuide.js +213 -2
  165. package/plugins/ValueTool.js +419 -4
  166. package/plugins/View3D.js +519 -14
  167. package/plugins/ZoomButtons.js +165 -3
  168. package/plugins/map/EditingSupport.js +199 -7
  169. package/plugins/map/LocateSupport.js +260 -4
  170. package/plugins/map/MeasurementSupport.js +216 -8
  171. package/plugins/map/RedliningPickSupport.js +201 -7
  172. package/plugins/map/RedliningSupport.js +726 -17
  173. package/plugins/map/SnapInteraction.js +101 -1
  174. package/plugins/map/SnapSupport.js +210 -2
  175. package/plugins/map/SnappingSupport.js +356 -17
  176. package/plugins/map3d/BackgroundSwitcher3D.js +44 -3
  177. package/plugins/map3d/BottomBar3D.js +118 -3
  178. package/plugins/map3d/Compare3D.js +422 -8
  179. package/plugins/map3d/Draw3D.js +353 -6
  180. package/plugins/map3d/ExportObjects3D.js +393 -18
  181. package/plugins/map3d/HideObjects3D.js +313 -12
  182. package/plugins/map3d/Identify3D.js +283 -12
  183. package/plugins/map3d/LayerTree3D.js +323 -3
  184. package/plugins/map3d/MapCopyright3D.js +128 -5
  185. package/plugins/map3d/MapExport3D.js +590 -10
  186. package/plugins/map3d/MapLight3D.js +553 -6
  187. package/plugins/map3d/Measure3D.js +571 -20
  188. package/plugins/map3d/OverviewMap3D.js +169 -3
  189. package/plugins/map3d/Settings3D.js +73 -3
  190. package/plugins/map3d/TopBar3D.js +207 -9
  191. package/plugins/redlining/RedliningBufferSupport.js +206 -3
  192. package/reducers/display.js +34 -2
  193. package/reducers/editing.js +68 -3
  194. package/reducers/index.js +9 -1
  195. package/reducers/layerinfo.js +26 -2
  196. package/reducers/layers.js +456 -9
  197. package/reducers/localConfig.js +122 -2
  198. package/reducers/locale.js +38 -2
  199. package/reducers/locate.js +40 -2
  200. package/reducers/map.js +176 -5
  201. package/reducers/measurement.js +42 -2
  202. package/reducers/processNotifications.js +49 -2
  203. package/reducers/redlining.js +50 -2
  204. package/reducers/redliningPick.js +27 -2
  205. package/reducers/search.js +20 -1
  206. package/reducers/serviceinfo.js +25 -2
  207. package/reducers/task.js +45 -2
  208. package/reducers/theme.js +51 -2
  209. package/reducers/windows.js +203 -2
  210. package/scripts/dist.sh +1 -1
  211. package/scripts/gen-plugin-docs.js +152 -2
  212. package/scripts/makeIconkit.js +85 -6
  213. package/scripts/themesConfig.js +742 -40
  214. package/scripts/updateTranslations.js +251 -10
  215. package/selectors/searchproviders.js +44 -2
  216. package/stores/StandardStore.js +42 -2
  217. package/utils/ConfigUtils.js +84 -3
  218. package/utils/CoordinatesUtils.js +234 -23
  219. package/utils/DxfUtils.js +237 -11
  220. package/utils/EditingInterface.js +421 -87
  221. package/utils/EditingUtils.js +357 -13
  222. package/utils/ElevationInterface.js +83 -22
  223. package/utils/FeatureStyles.js +429 -5
  224. package/utils/IdentifyUtils.js +443 -7
  225. package/utils/ImageEditor.js +79 -9
  226. package/utils/LayerUtils.js +1516 -50
  227. package/utils/LocaleUtils.js +117 -7
  228. package/utils/MapUtils.js +241 -59
  229. package/utils/MeasureUtils.js +323 -2
  230. package/utils/MiscUtils.js +189 -11
  231. package/utils/PermaLinkUtils.js +429 -6
  232. package/utils/PluginStore.js +27 -1
  233. package/utils/ResourceRegistry.js +15 -1
  234. package/utils/RoutingInterface.js +307 -7
  235. package/utils/SearchProviders.js +722 -19
  236. package/utils/ServiceLayerUtils.js +669 -14
  237. package/utils/Signal.js +32 -2
  238. package/utils/ThemeUtils.js +341 -7
  239. package/utils/VectorLayerUtils.js +589 -15
  240. package/utils/expr_grammar/grammar.js +2239 -2
  241. package/utils/expr_grammar/test.js +65 -3
@@ -1,9 +1,175 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
5
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
6
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
+ /**
2
18
  * Copyright 2024 Sourcepole AG
3
19
  * All rights reserved.
4
20
  *
5
21
  * This source code is licensed under the BSD-style license found in the
6
22
  * LICENSE file in the root directory of this source tree.
7
- */import React from"react";import ol from"openlayers";import PropTypes from"prop-types";import OlLayer from"../../components/map/OlLayer";import viewconeIcon from"../../resources/viewcone.svg";import"./style/OverviewMap3D.css";/**
23
+ */
24
+
25
+ import React from 'react';
26
+ import ol from 'openlayers';
27
+ import PropTypes from 'prop-types';
28
+ import OlLayer from '../../components/map/OlLayer';
29
+ import viewconeIcon from '../../resources/viewcone.svg';
30
+ import './style/OverviewMap3D.css';
31
+
32
+ /**
8
33
  * Overview map for the 3D map.
9
- */var OverviewMap3D=/*#__PURE__*/function(_React$Component){function OverviewMap3D(props){var _this;_classCallCheck(this,OverviewMap3D);_this=_callSuper(this,OverviewMap3D,[props]);_defineProperty(_this,"state",{collapsed:true});_defineProperty(_this,"initOverviewMap",function(el){if(el){_this.map=new ol.Map({layers:[_this.viewConeLayer],controls:[],target:el});_this.setupView()}});_defineProperty(_this,"setupView",function(){var overviewView=new ol.View({enableRotation:false,projection:_this.props.sceneContext.mapCrs});_this.map.setView(overviewView);_this.updateViewCone()});_defineProperty(_this,"updateViewCone",function(){var _scene$view$controls$,_scene$view$controls,_scene$view$controls$2;if(!_this.map){return}var scene=_this.props.sceneContext.scene;var x=scene.view.camera.position.x;var y=scene.view.camera.position.y;var azimuth=(_scene$view$controls$=(_scene$view$controls=scene.view.controls)===null||_scene$view$controls===void 0||(_scene$view$controls$2=_scene$view$controls.getAzimuthalAngle)===null||_scene$view$controls$2===void 0?void 0:_scene$view$controls$2.call(_scene$view$controls))!==null&&_scene$view$controls$!==void 0?_scene$view$controls$:0;var cameraHeight=scene.view.camera.position.z;var resolution=cameraHeight/100;_this.map.getView().setCenter([x,y]);_this.map.getView().setResolution(resolution);_this.viewConeFeature.getGeometry().setCoordinates([x,y]);_this.viewConeFeature.set("rotation",-azimuth,true);_this.viewConeLayer.getSource().changed()});_this.map=null;_this.viewConeFeature=new ol.Feature(new ol.geom.Point([0,0]));_this.viewConeLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[_this.viewConeFeature]}),style:function style(feature){return new ol.style.Style({fill:new ol.style.Fill({color:"white"}),stroke:new ol.style.Stroke({color:"red",width:2}),image:new ol.style.Icon({anchor:[0.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction",src:viewconeIcon,rotation:feature.get("rotation"),scale:2})})},zIndex:10000});return _this}_inherits(OverviewMap3D,_React$Component);return _createClass(OverviewMap3D,[{key:"componentDidMount",value:function componentDidMount(){this.props.sceneContext.scene.view.controls.addEventListener("change",this.updateViewCone)}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){if(this.props.sceneContext.mapCrs!==prevProps.sceneContext.mapCrs){this.setupView()}if(this.map){if(this.state.center!==prevState.center||this.state.azimuth!==prevState.azimuth){this.map.getView().setCenter(this.state.center);this.viewConeFeature.getGeometry().setCoordinates(this.state.center);this.viewConeFeature.set("rotation",-this.state.azimuth,true);this.viewConeLayer.getSource().changed()}if(this.state.resolution!==prevState.resolution){this.map.getView().setResolution(this.state.resolution)}}}},{key:"render",value:function render(){var _this$props$sceneCont,_this2=this;var style={display:this.state.collapsed?"none":"initial"};var baseLayer=this.props.sceneContext.baseLayers.find(function(l){return l.visibility===true});var overviewLayer=(_this$props$sceneCont=this.props.sceneContext.baseLayers.find(function(l){return l.overview===true}))!==null&&_this$props$sceneCont!==void 0?_this$props$sceneCont:baseLayer;return[/*#__PURE__*/React.createElement("div",{className:"overview-map-3d",key:"map3d-overview-map"},/*#__PURE__*/React.createElement("div",{className:"ol-overviewmap-map-3d",ref:this.initOverviewMap,style:style}),/*#__PURE__*/React.createElement("button",{onClick:function onClick(){return _this2.setState(function(state){return{collapsed:!state.collapsed}})},type:"button"},this.state.collapsed?"\xAB":"\xBB")),this.map&&overviewLayer?/*#__PURE__*/React.createElement(OlLayer,{key:overviewLayer.name,map:this.map,options:_objectSpread(_objectSpread({},overviewLayer),{},{visibility:true}),projection:this.props.sceneContext.mapCrs}):null]}}])}(React.Component);_defineProperty(OverviewMap3D,"propTypes",{sceneContext:PropTypes.object});export{OverviewMap3D as default};
34
+ */
35
+ var OverviewMap3D = /*#__PURE__*/function (_React$Component) {
36
+ function OverviewMap3D(props) {
37
+ var _this;
38
+ _classCallCheck(this, OverviewMap3D);
39
+ _this = _callSuper(this, OverviewMap3D, [props]);
40
+ _defineProperty(_this, "state", {
41
+ collapsed: true
42
+ });
43
+ _defineProperty(_this, "initOverviewMap", function (el) {
44
+ if (el) {
45
+ _this.map = new ol.Map({
46
+ layers: [_this.viewConeLayer],
47
+ controls: [],
48
+ target: el
49
+ });
50
+ _this.setupView();
51
+ }
52
+ });
53
+ _defineProperty(_this, "setupView", function () {
54
+ var overviewView = new ol.View({
55
+ enableRotation: false,
56
+ projection: _this.props.sceneContext.mapCrs
57
+ });
58
+ _this.map.setView(overviewView);
59
+ _this.updateViewCone();
60
+ });
61
+ _defineProperty(_this, "updateViewCone", function () {
62
+ var _scene$view$controls$, _scene$view$controls, _scene$view$controls$2;
63
+ if (!_this.map) {
64
+ return;
65
+ }
66
+ var scene = _this.props.sceneContext.scene;
67
+ var x = scene.view.camera.position.x;
68
+ var y = scene.view.camera.position.y;
69
+ var azimuth = (_scene$view$controls$ = (_scene$view$controls = scene.view.controls) === null || _scene$view$controls === void 0 || (_scene$view$controls$2 = _scene$view$controls.getAzimuthalAngle) === null || _scene$view$controls$2 === void 0 ? void 0 : _scene$view$controls$2.call(_scene$view$controls)) !== null && _scene$view$controls$ !== void 0 ? _scene$view$controls$ : 0;
70
+ var cameraHeight = scene.view.camera.position.z;
71
+ var resolution = cameraHeight / 100;
72
+ _this.map.getView().setCenter([x, y]);
73
+ _this.map.getView().setResolution(resolution);
74
+ _this.viewConeFeature.getGeometry().setCoordinates([x, y]);
75
+ _this.viewConeFeature.set('rotation', -azimuth, true);
76
+ _this.viewConeLayer.getSource().changed();
77
+ });
78
+ _this.map = null;
79
+ _this.viewConeFeature = new ol.Feature(new ol.geom.Point([0, 0]));
80
+ _this.viewConeLayer = new ol.layer.Vector({
81
+ source: new ol.source.Vector({
82
+ features: [_this.viewConeFeature]
83
+ }),
84
+ style: function style(feature) {
85
+ return new ol.style.Style({
86
+ fill: new ol.style.Fill({
87
+ color: 'white'
88
+ }),
89
+ stroke: new ol.style.Stroke({
90
+ color: 'red',
91
+ width: 2
92
+ }),
93
+ image: new ol.style.Icon({
94
+ anchor: [0.5, 1],
95
+ anchorXUnits: 'fraction',
96
+ anchorYUnits: 'fraction',
97
+ src: viewconeIcon,
98
+ rotation: feature.get('rotation'),
99
+ scale: 2
100
+ })
101
+ });
102
+ },
103
+ zIndex: 10000
104
+ });
105
+ return _this;
106
+ }
107
+ _inherits(OverviewMap3D, _React$Component);
108
+ return _createClass(OverviewMap3D, [{
109
+ key: "componentDidMount",
110
+ value: function componentDidMount() {
111
+ this.props.sceneContext.scene.view.controls.addEventListener('change', this.updateViewCone);
112
+ }
113
+ }, {
114
+ key: "componentDidUpdate",
115
+ value: function componentDidUpdate(prevProps, prevState) {
116
+ if (this.props.sceneContext.mapCrs !== prevProps.sceneContext.mapCrs) {
117
+ this.setupView();
118
+ }
119
+ if (this.map) {
120
+ if (this.state.center !== prevState.center || this.state.azimuth !== prevState.azimuth) {
121
+ this.map.getView().setCenter(this.state.center);
122
+ this.viewConeFeature.getGeometry().setCoordinates(this.state.center);
123
+ this.viewConeFeature.set('rotation', -this.state.azimuth, true);
124
+ this.viewConeLayer.getSource().changed();
125
+ }
126
+ if (this.state.resolution !== prevState.resolution) {
127
+ this.map.getView().setResolution(this.state.resolution);
128
+ }
129
+ }
130
+ }
131
+ }, {
132
+ key: "render",
133
+ value: function render() {
134
+ var _this$props$sceneCont,
135
+ _this2 = this;
136
+ var style = {
137
+ display: this.state.collapsed ? 'none' : 'initial'
138
+ };
139
+ var baseLayer = this.props.sceneContext.baseLayers.find(function (l) {
140
+ return l.visibility === true;
141
+ });
142
+ var overviewLayer = (_this$props$sceneCont = this.props.sceneContext.baseLayers.find(function (l) {
143
+ return l.overview === true;
144
+ })) !== null && _this$props$sceneCont !== void 0 ? _this$props$sceneCont : baseLayer;
145
+ return [/*#__PURE__*/React.createElement("div", {
146
+ className: "overview-map-3d",
147
+ key: "map3d-overview-map"
148
+ }, /*#__PURE__*/React.createElement("div", {
149
+ className: "ol-overviewmap-map-3d",
150
+ ref: this.initOverviewMap,
151
+ style: style
152
+ }), /*#__PURE__*/React.createElement("button", {
153
+ onClick: function onClick() {
154
+ return _this2.setState(function (state) {
155
+ return {
156
+ collapsed: !state.collapsed
157
+ };
158
+ });
159
+ },
160
+ type: "button"
161
+ }, this.state.collapsed ? '«' : '»')), this.map && overviewLayer ? /*#__PURE__*/React.createElement(OlLayer, {
162
+ key: overviewLayer.name,
163
+ map: this.map,
164
+ options: _objectSpread(_objectSpread({}, overviewLayer), {}, {
165
+ visibility: true
166
+ }),
167
+ projection: this.props.sceneContext.mapCrs
168
+ }) : null];
169
+ }
170
+ }]);
171
+ }(React.Component);
172
+ _defineProperty(OverviewMap3D, "propTypes", {
173
+ sceneContext: PropTypes.object
174
+ });
175
+ export { OverviewMap3D as default };
@@ -1,9 +1,79 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
7
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ /**
2
16
  * Copyright 2025 Sourcepole AG
3
17
  * All rights reserved.
4
18
  *
5
19
  * This source code is licensed under the BSD-style license found in the
6
20
  * LICENSE file in the root directory of this source tree.
7
- */import React from"react";import PropTypes from"prop-types";import SideBar from"../../components/SideBar";import Input from"../../components/widgets/Input";import LocaleUtils from"../../utils/LocaleUtils";import"./style/Settings3D.css";/**
21
+ */
22
+
23
+ import React from 'react';
24
+ import PropTypes from 'prop-types';
25
+ import SideBar from '../../components/SideBar';
26
+ import Input from '../../components/widgets/Input';
27
+ import LocaleUtils from '../../utils/LocaleUtils';
28
+ import './style/Settings3D.css';
29
+
30
+ /**
8
31
  * Settings panel for the 3D map.
9
- */var Settings3D=/*#__PURE__*/function(_React$Component){function Settings3D(){var _this;_classCallCheck(this,Settings3D);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,Settings3D,[].concat(args));_defineProperty(_this,"renderBody",function(){return/*#__PURE__*/React.createElement("div",{className:"settings3d-body"},/*#__PURE__*/React.createElement("table",null,/*#__PURE__*/React.createElement("tbody",null,/*#__PURE__*/React.createElement("tr",null,/*#__PURE__*/React.createElement("td",null,LocaleUtils.tr("settings3d.quality")),/*#__PURE__*/React.createElement("td",null,/*#__PURE__*/React.createElement(Input,{max:100,min:20,onChange:_this.qualityChanged,step:20,type:"range",value:_this.props.sceneContext.settings.sceneQuality}))))))});_defineProperty(_this,"qualityChanged",function(value){_this.props.sceneContext.setSetting("sceneQuality",parseInt(value,10))});return _this}_inherits(Settings3D,_React$Component);return _createClass(Settings3D,[{key:"render",value:function render(){var _this2=this;return/*#__PURE__*/React.createElement(SideBar,{icon:"cog",id:"Settings3D",title:LocaleUtils.tr("appmenu.items.Settings3D"),width:"20em"},function(){return{body:_this2.renderBody()}})}}])}(React.Component);_defineProperty(Settings3D,"propTypes",{sceneContext:PropTypes.object});export{Settings3D as default};
32
+ */
33
+ var Settings3D = /*#__PURE__*/function (_React$Component) {
34
+ function Settings3D() {
35
+ var _this;
36
+ _classCallCheck(this, Settings3D);
37
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
38
+ args[_key] = arguments[_key];
39
+ }
40
+ _this = _callSuper(this, Settings3D, [].concat(args));
41
+ _defineProperty(_this, "renderBody", function () {
42
+ return /*#__PURE__*/React.createElement("div", {
43
+ className: "settings3d-body"
44
+ }, /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("settings3d.quality")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Input, {
45
+ max: 100,
46
+ min: 20,
47
+ onChange: _this.qualityChanged,
48
+ step: 20,
49
+ type: "range",
50
+ value: _this.props.sceneContext.settings.sceneQuality
51
+ }))))));
52
+ });
53
+ _defineProperty(_this, "qualityChanged", function (value) {
54
+ _this.props.sceneContext.setSetting("sceneQuality", parseInt(value, 10));
55
+ });
56
+ return _this;
57
+ }
58
+ _inherits(Settings3D, _React$Component);
59
+ return _createClass(Settings3D, [{
60
+ key: "render",
61
+ value: function render() {
62
+ var _this2 = this;
63
+ return /*#__PURE__*/React.createElement(SideBar, {
64
+ icon: "cog",
65
+ id: "Settings3D",
66
+ title: LocaleUtils.tr("appmenu.items.Settings3D"),
67
+ width: "20em"
68
+ }, function () {
69
+ return {
70
+ body: _this2.renderBody()
71
+ };
72
+ });
73
+ }
74
+ }]);
75
+ }(React.Component);
76
+ _defineProperty(Settings3D, "propTypes", {
77
+ sceneContext: PropTypes.object
78
+ });
79
+ export { Settings3D as default };
@@ -1,15 +1,213 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
5
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
6
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
+ /**
2
18
  * Copyright 2024 Sourcepole AG
3
19
  * All rights reserved.
4
20
  *
5
21
  * This source code is licensed under the BSD-style license found in the
6
22
  * LICENSE file in the root directory of this source tree.
7
- */import React from"react";import{connect}from"react-redux";import classNames from"classnames";import isEmpty from"lodash.isempty";import PropTypes from"prop-types";import{toggleFullscreen,View3DMode}from"../../actions/display";import{openExternalUrl,setTopbarHeight}from"../../actions/windows";import AppMenu from"../../components/AppMenu";import FullscreenSwitcher from"../../components/FullscreenSwitcher";import{Swipeable}from"../../components/Swipeable";import Toolbar from"../../components/Toolbar";import SearchField3D from"../../components/map3d/SearchField3D";import ConfigUtils from"../../utils/ConfigUtils";import LocaleUtils from"../../utils/LocaleUtils";import ThemeUtils from"../../utils/ThemeUtils";/**
23
+ */
24
+
25
+ import React from 'react';
26
+ import { connect } from 'react-redux';
27
+ import classNames from 'classnames';
28
+ import isEmpty from 'lodash.isempty';
29
+ import PropTypes from 'prop-types';
30
+ import { toggleFullscreen, View3DMode } from '../../actions/display';
31
+ import { openExternalUrl, setTopbarHeight } from '../../actions/windows';
32
+ import AppMenu from '../../components/AppMenu';
33
+ import FullscreenSwitcher from '../../components/FullscreenSwitcher';
34
+ import { Swipeable } from '../../components/Swipeable';
35
+ import Toolbar from '../../components/Toolbar';
36
+ import SearchField3D from '../../components/map3d/SearchField3D';
37
+ import ConfigUtils from '../../utils/ConfigUtils';
38
+ import LocaleUtils from '../../utils/LocaleUtils';
39
+ import ThemeUtils from '../../utils/ThemeUtils';
40
+
41
+ /**
8
42
  * Bottom bar of the 3D map, including the search bar, tool bar and menu.
9
- */var TopBar3D=/*#__PURE__*/function(_React$Component){function TopBar3D(){var _this;_classCallCheck(this,TopBar3D);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,TopBar3D,[].concat(args));_defineProperty(_this,"state",{allowedMenuItems:[],allowedToolbarItems:[]});_defineProperty(_this,"filter2DItems",function(item){var pluginConf=ConfigUtils.getPluginConfig(item.key);return isEmpty(pluginConf)||_this.props.view3dMode===View3DMode.FULLSCREEN&&pluginConf.availableIn3D});_defineProperty(_this,"storeHeight",function(el){if(el){_this.props.setTopbarHeight(el.clientHeight)}});_defineProperty(_this,"openUrl",function(url,target,title,icon){if(target==="iframe"){target=":iframedialog:externallinkiframe"}_this.props.openExternalUrl(url,target,{title:title,icon:icon})});_defineProperty(_this,"addGenericMenuItems",function(menuItems,inputConfig){inputConfig.forEach(function(entry){if(entry.subitems){var group=[];_this.addGenericMenuItems(group,entry.subitems);if(group.length>0){menuItems.push(_objectSpread(_objectSpread({},entry),{},{subitems:group}))}}else{var pluginConfig=ConfigUtils.getPluginConfig(entry.key);if(entry.url||pluginConfig.availableIn3D){menuItems.push(entry)}}})});return _this}_inherits(TopBar3D,_React$Component);return _createClass(TopBar3D,[{key:"componentDidMount",value:function componentDidMount(){this.componentDidUpdate({})}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(this.props.currentTheme!==prevProps.currentTheme||this.props.view3dMode!==prevProps.view3dMode){this.setState({allowedToolbarItems:ThemeUtils.allowedItems(this.props.toolbarItems,this.props.currentTheme,this.filter2DItems),allowedMenuItems:ThemeUtils.allowedItems(this.props.menuItems,this.props.currentTheme,this.filter2DItems)})}}},{key:"render",value:function render(){var _ConfigUtils$getPlugi,_this2=this;var config=((_ConfigUtils$getPlugi=ConfigUtils.getPluginConfig("TopBar"))===null||_ConfigUtils$getPlugi===void 0?void 0:_ConfigUtils$getPlugi.cfg)||{};var logo;var assetsPath=ConfigUtils.getAssetsPath();var isMobile=ConfigUtils.isMobile();if(isMobile){logo=assetsPath+"/img/logo-mobile."+(config.logoFormat||"svg")}else{logo=assetsPath+"/img/logo."+(config.logoFormat||"svg")}var logoEl=/*#__PURE__*/React.createElement("img",{className:"topbar-logo",src:config.logoSrc||logo});if(config.logoUrl){logoEl=/*#__PURE__*/React.createElement("a",{href:config.logoUrl,rel:"noreferrer",target:"_blank"},logoEl)}var menuCompact=!isMobile?config.appMenuCompact:false;var classes=classNames({TopBar:true,mobile:isMobile,fullscreen:this.props.fullscreen});return/*#__PURE__*/React.createElement(Swipeable,{onSwipedDown:function onSwipedDown(){return _this2.props.toggleFullscreen(false)},onSwipedUp:function onSwipedUp(){return _this2.props.toggleFullscreen(true)}},/*#__PURE__*/React.createElement("div",{className:classes,ref:this.storeHeight},logoEl,/*#__PURE__*/React.createElement("div",{className:"topbar-center-span"},/*#__PURE__*/React.createElement("div",{className:"topbar-search-container"},/*#__PURE__*/React.createElement(SearchField3D,{sceneContext:this.props.sceneContext,searchOptions:this.props.searchOptions})),/*#__PURE__*/React.createElement(Toolbar,{openExternalUrl:this.openUrl,toolbarItems:this.state.allowedToolbarItems})),/*#__PURE__*/React.createElement(AppMenu,{appMenuClearsTask:config.appMenuClearsTask,appMenuShortcut:config.appMenuShortcut,buttonLabel:LocaleUtils.tr("appmenu.menulabel"),keepMenuOpen:menuCompact,menuCompact:menuCompact,menuItems:this.state.allowedMenuItems,openExternalUrl:this.openUrl,showFilterField:config.appMenuFilterField}),this.props.view3dMode===View3DMode.FULLSCREEN?/*#__PURE__*/React.createElement(FullscreenSwitcher,null):null))}}])}(React.Component);_defineProperty(TopBar3D,"propTypes",{currentTheme:PropTypes.object,fullscreen:PropTypes.bool,/** The menu items, in the same format as the 2D `TopBar` menu items.
10
- * You can include entries for the View3D plugins.
11
- * You can also include entries for 2D plugins which are compatible with the 3D view (i.e. `ThemeSwitcher`, `Share`, etc.),
12
- * these will be displayed only in fullsceen 3D mode. */menuItems:PropTypes.array,openExternalUrl:PropTypes.func,sceneContext:PropTypes.object,/** Options passed down to the search component. */searchOptions:PropTypes.shape({/** Minimum scale denominator when zooming to search result. */minScaleDenom:PropTypes.number}),setTopbarHeight:PropTypes.func,toggleFullscreen:PropTypes.func,/** The toolbar, in the same format as the 2D `TopBar` toolbar items.
13
- * You can include entries for the View3D plugins.
14
- * You can also include entries for 2D plugins which are compatible with the 3D view (i.e. `ThemeSwitcher`, `Share`, etc.),
15
- * these will be displayed only in fullsceen 3D mode. */toolbarItems:PropTypes.array,view3dMode:PropTypes.number});_defineProperty(TopBar3D,"defaultProps",{searchOptions:{minScaleDenom:1000}});export default connect(function(state){return{currentTheme:state.theme.current,fullscreen:state.display.fullscreen,view3dMode:state.display.view3dMode}},{setTopbarHeight:setTopbarHeight,toggleFullscreen:toggleFullscreen,openExternalUrl:openExternalUrl})(TopBar3D);
43
+ */
44
+ var TopBar3D = /*#__PURE__*/function (_React$Component) {
45
+ function TopBar3D() {
46
+ var _this;
47
+ _classCallCheck(this, TopBar3D);
48
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
49
+ args[_key] = arguments[_key];
50
+ }
51
+ _this = _callSuper(this, TopBar3D, [].concat(args));
52
+ _defineProperty(_this, "state", {
53
+ allowedMenuItems: [],
54
+ allowedToolbarItems: []
55
+ });
56
+ _defineProperty(_this, "filter2DItems", function (item) {
57
+ var pluginConf = ConfigUtils.getPluginConfig(item.key);
58
+ return isEmpty(pluginConf) || _this.props.view3dMode === View3DMode.FULLSCREEN && pluginConf.availableIn3D;
59
+ });
60
+ _defineProperty(_this, "storeHeight", function (el) {
61
+ if (el) {
62
+ _this.props.setTopbarHeight(el.clientHeight);
63
+ }
64
+ });
65
+ _defineProperty(_this, "openUrl", function (url, target, title, icon) {
66
+ if (target === "iframe") {
67
+ target = ":iframedialog:externallinkiframe";
68
+ }
69
+ _this.props.openExternalUrl(url, target, {
70
+ title: title,
71
+ icon: icon
72
+ });
73
+ });
74
+ _defineProperty(_this, "addGenericMenuItems", function (menuItems, inputConfig) {
75
+ inputConfig.forEach(function (entry) {
76
+ if (entry.subitems) {
77
+ var group = [];
78
+ _this.addGenericMenuItems(group, entry.subitems);
79
+ if (group.length > 0) {
80
+ menuItems.push(_objectSpread(_objectSpread({}, entry), {}, {
81
+ subitems: group
82
+ }));
83
+ }
84
+ } else {
85
+ var pluginConfig = ConfigUtils.getPluginConfig(entry.key);
86
+ if (entry.url || pluginConfig.availableIn3D) {
87
+ menuItems.push(entry);
88
+ }
89
+ }
90
+ });
91
+ });
92
+ return _this;
93
+ }
94
+ _inherits(TopBar3D, _React$Component);
95
+ return _createClass(TopBar3D, [{
96
+ key: "componentDidMount",
97
+ value: function componentDidMount() {
98
+ this.componentDidUpdate({});
99
+ }
100
+ }, {
101
+ key: "componentDidUpdate",
102
+ value: function componentDidUpdate(prevProps) {
103
+ if (this.props.currentTheme !== prevProps.currentTheme || this.props.view3dMode !== prevProps.view3dMode) {
104
+ this.setState({
105
+ allowedToolbarItems: ThemeUtils.allowedItems(this.props.toolbarItems, this.props.currentTheme, this.filter2DItems),
106
+ allowedMenuItems: ThemeUtils.allowedItems(this.props.menuItems, this.props.currentTheme, this.filter2DItems)
107
+ });
108
+ }
109
+ }
110
+ }, {
111
+ key: "render",
112
+ value: function render() {
113
+ var _ConfigUtils$getPlugi,
114
+ _this2 = this;
115
+ var config = ((_ConfigUtils$getPlugi = ConfigUtils.getPluginConfig("TopBar")) === null || _ConfigUtils$getPlugi === void 0 ? void 0 : _ConfigUtils$getPlugi.cfg) || {};
116
+ var logo;
117
+ var assetsPath = ConfigUtils.getAssetsPath();
118
+ var isMobile = ConfigUtils.isMobile();
119
+ if (isMobile) {
120
+ logo = assetsPath + "/img/logo-mobile." + (config.logoFormat || "svg");
121
+ } else {
122
+ logo = assetsPath + "/img/logo." + (config.logoFormat || "svg");
123
+ }
124
+ var logoEl = /*#__PURE__*/React.createElement("img", {
125
+ className: "topbar-logo",
126
+ src: config.logoSrc || logo
127
+ });
128
+ if (config.logoUrl) {
129
+ logoEl = /*#__PURE__*/React.createElement("a", {
130
+ href: config.logoUrl,
131
+ rel: "noreferrer",
132
+ target: "_blank"
133
+ }, logoEl);
134
+ }
135
+ var menuCompact = !isMobile ? config.appMenuCompact : false;
136
+ var classes = classNames({
137
+ TopBar: true,
138
+ mobile: isMobile,
139
+ fullscreen: this.props.fullscreen
140
+ });
141
+ return /*#__PURE__*/React.createElement(Swipeable, {
142
+ onSwipedDown: function onSwipedDown() {
143
+ return _this2.props.toggleFullscreen(false);
144
+ },
145
+ onSwipedUp: function onSwipedUp() {
146
+ return _this2.props.toggleFullscreen(true);
147
+ }
148
+ }, /*#__PURE__*/React.createElement("div", {
149
+ className: classes,
150
+ ref: this.storeHeight
151
+ }, logoEl, /*#__PURE__*/React.createElement("div", {
152
+ className: "topbar-center-span"
153
+ }, /*#__PURE__*/React.createElement("div", {
154
+ className: "topbar-search-container"
155
+ }, /*#__PURE__*/React.createElement(SearchField3D, {
156
+ sceneContext: this.props.sceneContext,
157
+ searchOptions: this.props.searchOptions
158
+ })), /*#__PURE__*/React.createElement(Toolbar, {
159
+ openExternalUrl: this.openUrl,
160
+ toolbarItems: this.state.allowedToolbarItems
161
+ })), /*#__PURE__*/React.createElement(AppMenu, {
162
+ appMenuClearsTask: config.appMenuClearsTask,
163
+ appMenuShortcut: config.appMenuShortcut,
164
+ buttonLabel: LocaleUtils.tr("appmenu.menulabel"),
165
+ keepMenuOpen: menuCompact,
166
+ menuCompact: menuCompact,
167
+ menuItems: this.state.allowedMenuItems,
168
+ openExternalUrl: this.openUrl,
169
+ showFilterField: config.appMenuFilterField
170
+ }), this.props.view3dMode === View3DMode.FULLSCREEN ? /*#__PURE__*/React.createElement(FullscreenSwitcher, null) : null));
171
+ }
172
+ }]);
173
+ }(React.Component);
174
+ _defineProperty(TopBar3D, "propTypes", {
175
+ currentTheme: PropTypes.object,
176
+ fullscreen: PropTypes.bool,
177
+ /** The menu items, in the same format as the 2D `TopBar` menu items.
178
+ * You can include entries for the View3D plugins.
179
+ * You can also include entries for 2D plugins which are compatible with the 3D view (i.e. `ThemeSwitcher`, `Share`, etc.),
180
+ * these will be displayed only in fullsceen 3D mode. */
181
+ menuItems: PropTypes.array,
182
+ openExternalUrl: PropTypes.func,
183
+ sceneContext: PropTypes.object,
184
+ /** Options passed down to the search component. */
185
+ searchOptions: PropTypes.shape({
186
+ /** Minimum scale denominator when zooming to search result. */
187
+ minScaleDenom: PropTypes.number
188
+ }),
189
+ setTopbarHeight: PropTypes.func,
190
+ toggleFullscreen: PropTypes.func,
191
+ /** The toolbar, in the same format as the 2D `TopBar` toolbar items.
192
+ * You can include entries for the View3D plugins.
193
+ * You can also include entries for 2D plugins which are compatible with the 3D view (i.e. `ThemeSwitcher`, `Share`, etc.),
194
+ * these will be displayed only in fullsceen 3D mode. */
195
+ toolbarItems: PropTypes.array,
196
+ view3dMode: PropTypes.number
197
+ });
198
+ _defineProperty(TopBar3D, "defaultProps", {
199
+ searchOptions: {
200
+ minScaleDenom: 1000
201
+ }
202
+ });
203
+ export default connect(function (state) {
204
+ return {
205
+ currentTheme: state.theme.current,
206
+ fullscreen: state.display.fullscreen,
207
+ view3dMode: state.display.view3dMode
208
+ };
209
+ }, {
210
+ setTopbarHeight: setTopbarHeight,
211
+ toggleFullscreen: toggleFullscreen,
212
+ openExternalUrl: openExternalUrl
213
+ })(TopBar3D);