qwc2 2025.3.31

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 (528) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +68 -0
  3. package/actions/display.js +7 -0
  4. package/actions/editing.js +7 -0
  5. package/actions/layerinfo.js +7 -0
  6. package/actions/layers.js +8 -0
  7. package/actions/localConfig.js +7 -0
  8. package/actions/locale.js +10 -0
  9. package/actions/locate.js +8 -0
  10. package/actions/logging.js +7 -0
  11. package/actions/map.js +15 -0
  12. package/actions/measurement.js +8 -0
  13. package/actions/processNotifications.js +7 -0
  14. package/actions/redlining.js +7 -0
  15. package/actions/redliningPick.js +7 -0
  16. package/actions/serviceinfo.js +7 -0
  17. package/actions/task.js +9 -0
  18. package/actions/theme.js +24 -0
  19. package/actions/windows.js +10 -0
  20. package/components/AppMenu.js +8 -0
  21. package/components/AttributeForm.js +34 -0
  22. package/components/AutoEditForm.js +8 -0
  23. package/components/CoordinateDisplayer.js +7 -0
  24. package/components/EditComboField.js +10 -0
  25. package/components/EditUploadField.js +8 -0
  26. package/components/FullscreenSwitcher.js +8 -0
  27. package/components/Icon.js +7 -0
  28. package/components/IdentifyViewer.js +16 -0
  29. package/components/ImportLayer.js +25 -0
  30. package/components/LayerInfoWindow.js +7 -0
  31. package/components/LinkFeatureForm.js +10 -0
  32. package/components/MapSelection.js +13 -0
  33. package/components/NumericInputWindow.js +7 -0
  34. package/components/PickFeature.js +7 -0
  35. package/components/PluginsContainer.js +8 -0
  36. package/components/PrintSelection.js +54 -0
  37. package/components/QtDesignerForm.js +30 -0
  38. package/components/ResizeableWindow.js +12 -0
  39. package/components/SearchBox.js +26 -0
  40. package/components/ServiceInfoWindow.js +7 -0
  41. package/components/SideBar.js +9 -0
  42. package/components/StandardApp.js +35 -0
  43. package/components/Swipeable.js +1 -0
  44. package/components/TaskBar.js +7 -0
  45. package/components/ThemeLayersListWindow.js +9 -0
  46. package/components/ThemeList.js +12 -0
  47. package/components/Toolbar.js +7 -0
  48. package/components/WindowManager.js +7 -0
  49. package/components/map/OlLayer.js +12 -0
  50. package/components/map/OlLocate.css +56 -0
  51. package/components/map/OlLocate.js +17 -0
  52. package/components/map/OlMap.js +11 -0
  53. package/components/map/layers/BingLayer.js +8 -0
  54. package/components/map/layers/GoogleLayer.js +27 -0
  55. package/components/map/layers/GraticuleLayer.js +8 -0
  56. package/components/map/layers/ImageLayer.js +8 -0
  57. package/components/map/layers/MVTLayer.js +7 -0
  58. package/components/map/layers/OSMLayer.js +8 -0
  59. package/components/map/layers/OverlayLayer.js +10 -0
  60. package/components/map/layers/VectorLayer.js +14 -0
  61. package/components/map/layers/WFSLayer.js +11 -0
  62. package/components/map/layers/WMSLayer.js +11 -0
  63. package/components/map/layers/WMTSLayer.js +9 -0
  64. package/components/map/layers/XYZLayer.js +7 -0
  65. package/components/map/layers/index.js +8 -0
  66. package/components/map3d/BottomBar3D.js +7 -0
  67. package/components/map3d/Compare3D.js +12 -0
  68. package/components/map3d/Draw3D.js +10 -0
  69. package/components/map3d/ExportObjects3D.js +17 -0
  70. package/components/map3d/HeightProfile3D.js +8 -0
  71. package/components/map3d/HideObjects3D.js +12 -0
  72. package/components/map3d/Identify3D.js +13 -0
  73. package/components/map3d/LayerTree3D.js +8 -0
  74. package/components/map3d/Map3D.js +29 -0
  75. package/components/map3d/Map3DLight.js +10 -0
  76. package/components/map3d/MapControls3D.js +20 -0
  77. package/components/map3d/MapExport3D.js +11 -0
  78. package/components/map3d/Measure3D.js +23 -0
  79. package/components/map3d/OverviewMap3D.js +9 -0
  80. package/components/map3d/SearchField3D.js +16 -0
  81. package/components/map3d/TopBar3D.js +7 -0
  82. package/components/map3d/View3DSwitcher.js +7 -0
  83. package/components/map3d/drawtool/CreateTool3D.js +9 -0
  84. package/components/map3d/drawtool/EditTool3D.js +9 -0
  85. package/components/map3d/drawtool/NumericInput3D.js +7 -0
  86. package/components/map3d/img/viewcone.svg +124 -0
  87. package/components/map3d/layers/VectorLayer3D.js +7 -0
  88. package/components/map3d/layers/WFSLayer3D.js +8 -0
  89. package/components/map3d/layers/WMSLayer3D.js +7 -0
  90. package/components/map3d/layers/WMTSLayer3D.js +9 -0
  91. package/components/map3d/layers/index.js +8 -0
  92. package/components/map3d/models/arrow.glb +0 -0
  93. package/components/map3d/models/pin.glb +0 -0
  94. package/components/map3d/slices/map3d.js +1 -0
  95. package/components/map3d/style/BottomBar3D.css +67 -0
  96. package/components/map3d/style/Compare3D.css +57 -0
  97. package/components/map3d/style/Draw3D.css +7 -0
  98. package/components/map3d/style/HideObjects3D.css +29 -0
  99. package/components/map3d/style/LayerTree3D.css +126 -0
  100. package/components/map3d/style/Map3D.css +42 -0
  101. package/components/map3d/style/Map3DLight.css +72 -0
  102. package/components/map3d/style/MapControls3D.css +56 -0
  103. package/components/map3d/style/MapExport3D.css +25 -0
  104. package/components/map3d/style/OverviewMap3D.css +37 -0
  105. package/components/map3d/style/SearchField3D.css +7 -0
  106. package/components/map3d/style/View3DSwitcher.css +27 -0
  107. package/components/map3d/utils/Tiles3DStyle.js +1 -0
  108. package/components/share/ShareLink.js +7 -0
  109. package/components/share/ShareQRCode.js +8 -0
  110. package/components/share/ShareSocials.js +9 -0
  111. package/components/share/style/ShareLink.css +13 -0
  112. package/components/share/style/ShareSocials.css +9 -0
  113. package/components/style/App.css +229 -0
  114. package/components/style/AppMenu.css +162 -0
  115. package/components/style/AttributeForm.css +57 -0
  116. package/components/style/AutoEditForm.css +64 -0
  117. package/components/style/DefaultColorScheme.css +60 -0
  118. package/components/style/EditUploadField.css +103 -0
  119. package/components/style/FullscreenSwitcher.css +25 -0
  120. package/components/style/Icon.css +26 -0
  121. package/components/style/IdentifyViewer.css +249 -0
  122. package/components/style/ImportLayer.css +28 -0
  123. package/components/style/LayerInfoWindow.css +46 -0
  124. package/components/style/LinkFeatureForm.css +48 -0
  125. package/components/style/NumericInputWindow.css +11 -0
  126. package/components/style/PickFeature.css +25 -0
  127. package/components/style/PluginsContainer.css +4 -0
  128. package/components/style/QtDesignerForm.css +225 -0
  129. package/components/style/ResizeableWindow.css +178 -0
  130. package/components/style/SearchBox.css +159 -0
  131. package/components/style/ServiceInfoWindow.css +34 -0
  132. package/components/style/SideBar.css +100 -0
  133. package/components/style/TaskBar.css +35 -0
  134. package/components/style/ThemeLayersListWindow.css +47 -0
  135. package/components/style/ThemeList.css +200 -0
  136. package/components/style/Toolbar.css +20 -0
  137. package/components/style/WindowManager.css +50 -0
  138. package/components/timeline/FixedTimeline.js +10 -0
  139. package/components/timeline/InfiniteTimeline.js +13 -0
  140. package/components/timeline/TimelineFeaturesSlider.js +10 -0
  141. package/components/timeline/style/FixedTimeline.css +76 -0
  142. package/components/timeline/style/InfiniteTimeline.css +94 -0
  143. package/components/timeline/style/TimelineFeaturesSlider.css +131 -0
  144. package/components/widgets/AccordeonWidget.js +7 -0
  145. package/components/widgets/ButtonBar.js +7 -0
  146. package/components/widgets/ColorButton.js +8 -0
  147. package/components/widgets/ComboBox.js +7 -0
  148. package/components/widgets/CopyButton.js +7 -0
  149. package/components/widgets/DateTimeInput.js +8 -0
  150. package/components/widgets/EditableSelect.js +8 -0
  151. package/components/widgets/FileSelector.js +9 -0
  152. package/components/widgets/Input.js +7 -0
  153. package/components/widgets/InputContainer.js +7 -0
  154. package/components/widgets/LayerCatalogWidget.js +3 -0
  155. package/components/widgets/MenuButton.js +1 -0
  156. package/components/widgets/ModalDialog.js +7 -0
  157. package/components/widgets/NavBar.js +7 -0
  158. package/components/widgets/NumberInput.js +9 -0
  159. package/components/widgets/PopupMenu.js +1 -0
  160. package/components/widgets/Primitives.js +7 -0
  161. package/components/widgets/ReCaptchaWidget.js +1 -0
  162. package/components/widgets/SearchWidget.js +7 -0
  163. package/components/widgets/Spinner.js +6 -0
  164. package/components/widgets/SuggestionInput.js +7 -0
  165. package/components/widgets/TextInput.js +7 -0
  166. package/components/widgets/ToggleSwitch.js +7 -0
  167. package/components/widgets/VectorLayerPicker.js +8 -0
  168. package/components/widgets/style/AccordeonWidget.css +22 -0
  169. package/components/widgets/style/ButtonBar.css +88 -0
  170. package/components/widgets/style/ColorButton.css +88 -0
  171. package/components/widgets/style/ComboBox.css +83 -0
  172. package/components/widgets/style/CopyButton.css +21 -0
  173. package/components/widgets/style/EditableSelect.css +47 -0
  174. package/components/widgets/style/FileSelector.css +14 -0
  175. package/components/widgets/style/InputContainer.css +34 -0
  176. package/components/widgets/style/LayerCatalogWidget.css +59 -0
  177. package/components/widgets/style/MenuButton.css +122 -0
  178. package/components/widgets/style/ModalDialog.css +50 -0
  179. package/components/widgets/style/NavBar.css +12 -0
  180. package/components/widgets/style/NumberInput.css +76 -0
  181. package/components/widgets/style/SearchWidget.css +43 -0
  182. package/components/widgets/style/Spinner.css +32 -0
  183. package/components/widgets/style/SuggestionInput.css +8 -0
  184. package/components/widgets/style/TextInput.css +94 -0
  185. package/components/widgets/style/ToggleSwitch.css +61 -0
  186. package/components/widgets/style/VectorLayerPicker.css +3 -0
  187. package/icons/2d.svg +70 -0
  188. package/icons/3d.svg +70 -0
  189. package/icons/3d2d.svg +92 -0
  190. package/icons/after.svg +76 -0
  191. package/icons/arrow-down.svg +60 -0
  192. package/icons/arrow-up.svg +60 -0
  193. package/icons/before.svg +76 -0
  194. package/icons/bglayer.svg +71 -0
  195. package/icons/bookmark.svg +170 -0
  196. package/icons/box.svg +63 -0
  197. package/icons/buffer.svg +67 -0
  198. package/icons/camera.svg +118 -0
  199. package/icons/catalog.svg +62 -0
  200. package/icons/checked.svg +80 -0
  201. package/icons/chevron-down.svg +60 -0
  202. package/icons/chevron-left.svg +59 -0
  203. package/icons/chevron-right.svg +60 -0
  204. package/icons/chevron-up.svg +60 -0
  205. package/icons/circle.svg +70 -0
  206. package/icons/clear.svg +62 -0
  207. package/icons/clock.svg +71 -0
  208. package/icons/cog.svg +60 -0
  209. package/icons/collapse.svg +73 -0
  210. package/icons/compare.svg +72 -0
  211. package/icons/cone.svg +58 -0
  212. package/icons/confirm.svg +62 -0
  213. package/icons/copy.svg +60 -0
  214. package/icons/cuboid.svg +58 -0
  215. package/icons/cyclomedia.svg +47 -0
  216. package/icons/cylinder.svg +58 -0
  217. package/icons/dataimport.svg +116 -0
  218. package/icons/detach.svg +79 -0
  219. package/icons/dock.svg +82 -0
  220. package/icons/dock_bottom.svg +82 -0
  221. package/icons/dock_left.svg +84 -0
  222. package/icons/dock_right.svg +84 -0
  223. package/icons/dock_top.svg +84 -0
  224. package/icons/draw.svg +78 -0
  225. package/icons/editdraw.svg +84 -0
  226. package/icons/edited.svg +78 -0
  227. package/icons/editing.svg +118 -0
  228. package/icons/ellipse.svg +72 -0
  229. package/icons/embed.svg +88 -0
  230. package/icons/expand.svg +73 -0
  231. package/icons/export.svg +126 -0
  232. package/icons/eye.svg +127 -0
  233. package/icons/featureform.svg +115 -0
  234. package/icons/fill.svg +62 -0
  235. package/icons/filter.svg +69 -0
  236. package/icons/folder-open.svg +60 -0
  237. package/icons/freehand.svg +82 -0
  238. package/icons/group.svg +76 -0
  239. package/icons/home.svg +60 -0
  240. package/icons/identify_radius.svg +71 -0
  241. package/icons/identify_region.svg +71 -0
  242. package/icons/import.svg +62 -0
  243. package/icons/info-sign.svg +60 -0
  244. package/icons/info.svg +80 -0
  245. package/icons/layers.svg +71 -0
  246. package/icons/light.svg +77 -0
  247. package/icons/line.svg +61 -0
  248. package/icons/line_buffer.svg +65 -0
  249. package/icons/link.svg +75 -0
  250. package/icons/list-alt.svg +111 -0
  251. package/icons/lock.svg +54 -0
  252. package/icons/login.svg +56 -0
  253. package/icons/logout.svg +56 -0
  254. package/icons/map3d.svg +51 -0
  255. package/icons/maximize.svg +84 -0
  256. package/icons/measure.svg +82 -0
  257. package/icons/measure_line.svg +87 -0
  258. package/icons/measure_polygon.svg +88 -0
  259. package/icons/menu-hamburger.svg +60 -0
  260. package/icons/minimize.svg +76 -0
  261. package/icons/minus-sign.svg +60 -0
  262. package/icons/minus.svg +61 -0
  263. package/icons/nav-end.svg +74 -0
  264. package/icons/nav-left.svg +74 -0
  265. package/icons/nav-right.svg +74 -0
  266. package/icons/nav-start.svg +73 -0
  267. package/icons/new.svg +84 -0
  268. package/icons/nodetool.svg +68 -0
  269. package/icons/numericinput.svg +86 -0
  270. package/icons/ok.svg +60 -0
  271. package/icons/open.svg +79 -0
  272. package/icons/open_link.svg +74 -0
  273. package/icons/paint.svg +75 -0
  274. package/icons/pen.svg +41 -0
  275. package/icons/person.svg +44 -0
  276. package/icons/pick.svg +67 -0
  277. package/icons/pick_point.svg +74 -0
  278. package/icons/pick_region.svg +71 -0
  279. package/icons/plus.svg +60 -0
  280. package/icons/point.svg +67 -0
  281. package/icons/point_buffer.svg +74 -0
  282. package/icons/polygon.svg +61 -0
  283. package/icons/print.svg +60 -0
  284. package/icons/pyramid.svg +58 -0
  285. package/icons/radio_checked.svg +78 -0
  286. package/icons/radio_tristate.svg +75 -0
  287. package/icons/radio_unchecked.svg +72 -0
  288. package/icons/rasterexport.svg +124 -0
  289. package/icons/rect.svg +63 -0
  290. package/icons/refresh.svg +44 -0
  291. package/icons/remove.svg +60 -0
  292. package/icons/report.svg +84 -0
  293. package/icons/routing-bicycle.svg +40 -0
  294. package/icons/routing-bus.svg +40 -0
  295. package/icons/routing-cablecar.svg +40 -0
  296. package/icons/routing-car.svg +40 -0
  297. package/icons/routing-ship.svg +40 -0
  298. package/icons/routing-train.svg +40 -0
  299. package/icons/routing-tram.svg +40 -0
  300. package/icons/routing-truck.svg +40 -0
  301. package/icons/routing-walking.svg +40 -0
  302. package/icons/routing.svg +68 -0
  303. package/icons/save.svg +190 -0
  304. package/icons/scale.svg +62 -0
  305. package/icons/screenshot.svg +60 -0
  306. package/icons/search.svg +60 -0
  307. package/icons/selectbox.svg +79 -0
  308. package/icons/share.svg +64 -0
  309. package/icons/snap_edge.svg +79 -0
  310. package/icons/snap_vertex.svg +79 -0
  311. package/icons/sphere.svg +58 -0
  312. package/icons/square.svg +68 -0
  313. package/icons/sync.svg +72 -0
  314. package/icons/text.svg +68 -0
  315. package/icons/themes.svg +81 -0
  316. package/icons/tilt-down.svg +67 -0
  317. package/icons/tilt-left.svg +48 -0
  318. package/icons/tilt-right.svg +48 -0
  319. package/icons/tilt-up.svg +67 -0
  320. package/icons/today.svg +45 -0
  321. package/icons/tools.svg +77 -0
  322. package/icons/transformtool.svg +74 -0
  323. package/icons/transparency.svg +132 -0
  324. package/icons/trash.svg +60 -0
  325. package/icons/tree_minus.svg +81 -0
  326. package/icons/tree_plus.svg +81 -0
  327. package/icons/triangle-down.svg +59 -0
  328. package/icons/triangle-left.svg +60 -0
  329. package/icons/triangle-right.svg +60 -0
  330. package/icons/triangle-up.svg +59 -0
  331. package/icons/tristate.svg +79 -0
  332. package/icons/unchecked.svg +74 -0
  333. package/icons/undock.svg +82 -0
  334. package/icons/undock_bottom.svg +82 -0
  335. package/icons/undock_left.svg +82 -0
  336. package/icons/undock_right.svg +84 -0
  337. package/icons/undock_top.svg +84 -0
  338. package/icons/unmaximize.svg +84 -0
  339. package/icons/unminimize.svg +76 -0
  340. package/icons/up-down-arrow.svg +66 -0
  341. package/icons/warning.svg +72 -0
  342. package/icons/wedge.svg +58 -0
  343. package/icons/zoom.svg +60 -0
  344. package/icons/zoomin.svg +71 -0
  345. package/icons/zoomout.svg +80 -0
  346. package/libs/openlayers.js +11 -0
  347. package/package.json +135 -0
  348. package/plugins/API.js +114 -0
  349. package/plugins/AttributeTable.js +25 -0
  350. package/plugins/Authentication.js +13 -0
  351. package/plugins/BackgroundSwitcher.js +10 -0
  352. package/plugins/Bookmark.js +13 -0
  353. package/plugins/BottomBar.js +10 -0
  354. package/plugins/CookiePopup.js +9 -0
  355. package/plugins/Cyclomedia.js +11 -0
  356. package/plugins/Editing.js +21 -0
  357. package/plugins/FeatureForm.js +21 -0
  358. package/plugins/FeatureSearch.js +11 -0
  359. package/plugins/GeometryDigitizer.js +43 -0
  360. package/plugins/HeightProfile.js +26 -0
  361. package/plugins/Help.js +11 -0
  362. package/plugins/HomeButton.js +9 -0
  363. package/plugins/Identify.js +18 -0
  364. package/plugins/LayerCatalog.js +45 -0
  365. package/plugins/LayerTree.js +15 -0
  366. package/plugins/LocateButton.js +10 -0
  367. package/plugins/Map.js +22 -0
  368. package/plugins/MapCompare.js +11 -0
  369. package/plugins/MapCopyright.js +11 -0
  370. package/plugins/MapExport.js +23 -0
  371. package/plugins/MapFilter.js +20 -0
  372. package/plugins/MapInfoTooltip.js +32 -0
  373. package/plugins/MapLegend.js +14 -0
  374. package/plugins/MapTip.js +15 -0
  375. package/plugins/Measure.js +10 -0
  376. package/plugins/NewsPopup.js +12 -0
  377. package/plugins/Panoramax.js +10 -0
  378. package/plugins/Portal.js +10 -0
  379. package/plugins/Print.js +22 -0
  380. package/plugins/ProcessNotifications.js +11 -0
  381. package/plugins/Redlining.js +12 -0
  382. package/plugins/Reports.js +15 -0
  383. package/plugins/Routing.js +23 -0
  384. package/plugins/ScratchDrawing.js +15 -0
  385. package/plugins/Settings.js +12 -0
  386. package/plugins/Share.js +11 -0
  387. package/plugins/StartupMarker.js +12 -0
  388. package/plugins/TaskButton.js +9 -0
  389. package/plugins/ThemeSwitcher.js +10 -0
  390. package/plugins/TimeManager.js +21 -0
  391. package/plugins/TopBar.js +13 -0
  392. package/plugins/ValueTool.js +11 -0
  393. package/plugins/View3D.js +34 -0
  394. package/plugins/ZoomButtons.js +11 -0
  395. package/plugins/map/EditingSupport.js +13 -0
  396. package/plugins/map/LocateSupport.js +14 -0
  397. package/plugins/map/MeasurementSupport.js +15 -0
  398. package/plugins/map/OverviewSupport.js +14 -0
  399. package/plugins/map/RedliningPickSupport.js +12 -0
  400. package/plugins/map/RedliningSupport.js +28 -0
  401. package/plugins/map/ScaleBarSupport.js +10 -0
  402. package/plugins/map/SnapInteraction.js +1 -0
  403. package/plugins/map/SnapSupport.js +7 -0
  404. package/plugins/map/SnappingSupport.js +23 -0
  405. package/plugins/map/style/OverviewSupport.css +42 -0
  406. package/plugins/map/style/ScaleBarSupport.css +18 -0
  407. package/plugins/map/style/SnappingSupport.css +33 -0
  408. package/plugins/redlining/RedliningBufferSupport.js +8 -0
  409. package/plugins/style/AttributeTable.css +220 -0
  410. package/plugins/style/Authentication.css +16 -0
  411. package/plugins/style/BackgroundSwitcher.css +99 -0
  412. package/plugins/style/Bookmark.css +62 -0
  413. package/plugins/style/BottomBar.css +53 -0
  414. package/plugins/style/Buttons.css +68 -0
  415. package/plugins/style/CookiePopup.css +24 -0
  416. package/plugins/style/Cyclomedia.css +66 -0
  417. package/plugins/style/Editing.css +40 -0
  418. package/plugins/style/FeatureForm.css +21 -0
  419. package/plugins/style/FeatureSearch.css +71 -0
  420. package/plugins/style/GeometryDigitizer.css +28 -0
  421. package/plugins/style/HeightProfile.css +26 -0
  422. package/plugins/style/Identify.css +4 -0
  423. package/plugins/style/LayerCatalog.css +8 -0
  424. package/plugins/style/LayerTree.css +316 -0
  425. package/plugins/style/Map.css +43 -0
  426. package/plugins/style/MapCompare.css +27 -0
  427. package/plugins/style/MapCopyright.css +17 -0
  428. package/plugins/style/MapExport.css +55 -0
  429. package/plugins/style/MapFilter.css +101 -0
  430. package/plugins/style/MapInfoTooltip.css +78 -0
  431. package/plugins/style/MapLegend.css +36 -0
  432. package/plugins/style/MapTip.css +22 -0
  433. package/plugins/style/Measure.css +23 -0
  434. package/plugins/style/NewsPopup.css +87 -0
  435. package/plugins/style/Panoramax.css +15 -0
  436. package/plugins/style/Portal.css +115 -0
  437. package/plugins/style/Print.css +116 -0
  438. package/plugins/style/ProcessNotifications.css +55 -0
  439. package/plugins/style/Redlining.css +101 -0
  440. package/plugins/style/Reports.css +11 -0
  441. package/plugins/style/Routing.css +243 -0
  442. package/plugins/style/ScratchDrawing.css +8 -0
  443. package/plugins/style/Settings.css +11 -0
  444. package/plugins/style/Share.css +59 -0
  445. package/plugins/style/ThemeSwitcher.css +7 -0
  446. package/plugins/style/TimeManager.css +91 -0
  447. package/plugins/style/TopBar.css +50 -0
  448. package/plugins/style/ValueTool.css +60 -0
  449. package/reducers/display.js +7 -0
  450. package/reducers/editing.js +8 -0
  451. package/reducers/index.js +7 -0
  452. package/reducers/layerinfo.js +7 -0
  453. package/reducers/layers.js +14 -0
  454. package/reducers/localConfig.js +8 -0
  455. package/reducers/locale.js +8 -0
  456. package/reducers/locate.js +8 -0
  457. package/reducers/map.js +11 -0
  458. package/reducers/measurement.js +8 -0
  459. package/reducers/processNotifications.js +7 -0
  460. package/reducers/redlining.js +7 -0
  461. package/reducers/redliningPick.js +7 -0
  462. package/reducers/serviceinfo.js +7 -0
  463. package/reducers/task.js +7 -0
  464. package/reducers/theme.js +7 -0
  465. package/reducers/windows.js +7 -0
  466. package/scripts/dist.sh +16 -0
  467. package/scripts/gen-plugin-docs.js +9 -0
  468. package/scripts/makeIconkit.js +7 -0
  469. package/scripts/package-commands.bat +8 -0
  470. package/scripts/package-commands.sh +22 -0
  471. package/scripts/themesConfig.js +48 -0
  472. package/scripts/themesConfig.py +659 -0
  473. package/scripts/translateui.sh +51 -0
  474. package/scripts/updateTranslations.js +17 -0
  475. package/scripts/wmts_config_generator.py +169 -0
  476. package/selectors/searchproviders.js +12 -0
  477. package/static/translations/bg-BG.json +709 -0
  478. package/static/translations/ca-ES.json +709 -0
  479. package/static/translations/cs-CZ.json +709 -0
  480. package/static/translations/de-CH.json +709 -0
  481. package/static/translations/de-DE.json +709 -0
  482. package/static/translations/en-US.json +709 -0
  483. package/static/translations/es-ES.json +709 -0
  484. package/static/translations/fi-FI.json +709 -0
  485. package/static/translations/fr-FR.json +709 -0
  486. package/static/translations/hu-HU.json +709 -0
  487. package/static/translations/it-IT.json +709 -0
  488. package/static/translations/ja-JP.json +709 -0
  489. package/static/translations/nl-NL.json +709 -0
  490. package/static/translations/no-NO.json +709 -0
  491. package/static/translations/pl-PL.json +709 -0
  492. package/static/translations/pt-BR.json +709 -0
  493. package/static/translations/pt-PT.json +709 -0
  494. package/static/translations/ro-RO.json +709 -0
  495. package/static/translations/ru-RU.json +709 -0
  496. package/static/translations/sv-SE.json +709 -0
  497. package/static/translations/tr-TR.json +709 -0
  498. package/static/translations/tsconfig.json +606 -0
  499. package/stores/StandardStore.js +8 -0
  500. package/utils/ConfigUtils.js +9 -0
  501. package/utils/CoordinatesUtils.js +29 -0
  502. package/utils/DxfUtils.js +10 -0
  503. package/utils/EditingInterface.js +67 -0
  504. package/utils/EditingUtils.js +11 -0
  505. package/utils/FeatureStyles.js +10 -0
  506. package/utils/IdentifyUtils.js +12 -0
  507. package/utils/ImageEditor.js +15 -0
  508. package/utils/LayerUtils.js +57 -0
  509. package/utils/LocaleUtils.js +9 -0
  510. package/utils/MapUtils.js +66 -0
  511. package/utils/MeasureUtils.js +9 -0
  512. package/utils/MiscUtils.js +15 -0
  513. package/utils/PermaLinkUtils.js +11 -0
  514. package/utils/ResourceRegistry.js +7 -0
  515. package/utils/RoutingInterface.js +12 -0
  516. package/utils/SearchProviders.js +19 -0
  517. package/utils/ServiceLayerUtils.js +20 -0
  518. package/utils/Signal.js +2 -0
  519. package/utils/ThemeUtils.js +12 -0
  520. package/utils/VectorLayerUtils.js +20 -0
  521. package/utils/expr_grammar/README.md +3 -0
  522. package/utils/expr_grammar/grammar.js +3 -0
  523. package/utils/expr_grammar/grammar.ne +118 -0
  524. package/utils/expr_grammar/test.js +13 -0
  525. package/utils/img/README.markers +1 -0
  526. package/utils/img/arrowhead.svg +4 -0
  527. package/utils/img/marker-icon.png +0 -0
  528. package/utils/img/measurehead.svg +4 -0
@@ -0,0 +1,51 @@
1
+ #!/bin/sh
2
+
3
+ if [ $# -lt 2 ]; then
4
+ echo "Usage: $0 form.ui lang1 [lang2 ...]"
5
+ exit 1
6
+ fi
7
+
8
+ UIC=""
9
+ LUPDATE=""
10
+ if command -v uic && command -v lupdate; then
11
+ UIC="uic"
12
+ LUPDATE="lupdate"
13
+ elif command -v uic-qt5 && command -v lupdate-qt5; then
14
+ UIC="uic-qt5"
15
+ LUPDATE="lupdate-qt5"
16
+ elif command -v uic-qt6 && command -v lupdate-qt6; then
17
+ UIC="uic-qt6"
18
+ LUPDATE="lupdate-qt6"
19
+ else
20
+ echo "Could not find uic and/or lupdate in PATH"
21
+ exit 1
22
+ fi
23
+
24
+ cd $(dirname $1)
25
+ ui=$(basename $1)
26
+
27
+ if [ ! -f "$ui" ]; then
28
+ echo "$1 does not exist"
29
+ exit 1
30
+ fi
31
+
32
+ shift
33
+
34
+ tsfiles () {
35
+ for i in $@
36
+ do
37
+ echo -n "${ui/.ui/_$i.ts} "
38
+ done
39
+ }
40
+
41
+ $UIC $ui > ui_${ui/.ui/.h}
42
+
43
+ cat > ${ui/.ui/.pro} <<EOF
44
+ SOURCES += ui_${ui/.ui/.h}
45
+ TRANSLATIONS += $(tsfiles $@)
46
+ EOF
47
+
48
+ $LUPDATE ${ui/.ui/.pro}
49
+
50
+ rm ui_${ui/.ui/.h}
51
+ rm ${ui/.ui/.pro}
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Copyright 2017-2024 Sourcepole AG
4
+ * All rights reserved.
5
+ *
6
+ * This source code is licensed under the BSD-style license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */var _packageJson$dependen;function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t["return"]||t["return"]()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}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)}var fs=require("fs");var merge=require("deepmerge");var objectPath=require("object-path");var readJSON=function readJSON(path){try{return JSON.parse(fs.readFileSync(process.cwd()+path,"utf8"))}catch(e){return{}}};var _cleanMessages=function cleanMessages(data,ref){for(var _i=0,_Object$keys=Object.keys(data);_i<_Object$keys.length;_i++){var property=_Object$keys[_i];var omit=ref&&!(property in ref);if(_typeof(data[property])==="object"){if(omit){delete data[property]}else{_cleanMessages(data[property],ref?ref[property]:undefined)}}else if(data[property]===""||omit){delete data[property]}}return data};var createSkel=function createSkel(strings){var skel={locale:"",messages:{}};var _iterator=_createForOfIteratorHelper(strings),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var string=_step.value;var path=string.split(".");var cur=skel.messages;for(var i=0;i<path.length-1;++i){cur[path[i]]=cur[path[i]]||{};cur=cur[path[i]]}cur[path[path.length-1]]=""}}catch(err){_iterator.e(err)}finally{_iterator.f()}return skel};var _listDir=function listDir(dir,pattern){var results=[];var list=fs.readdirSync(dir);list.forEach(function(file){if(file==="node_modules"){return}var path=dir+"/"+file;var stat=fs.statSync(path);if(stat&&stat.isDirectory()){/* Recurse into a subdirectory */results=results.concat(_listDir(path,pattern))}else if(pattern.exec(file)){/* Is a file */results.push(path)}});return results};var updateTsConfig=function updateTsConfig(topdir,tsconfig){var collectedMsgIds=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var files=_listDir(topdir,/^.*\.jsx?$/);var trRegEx=/LocaleUtils\.tr(?:msg)?\((['"])([A-Za-z0-9._]+)\1/g;var msgIds=new Set;var _iterator2=_createForOfIteratorHelper(files),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var file=_step2.value;var data=fs.readFileSync(file).toString();var _iterator3=_createForOfIteratorHelper(data.matchAll(trRegEx)),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var match=_step3.value;if((!collectedMsgIds||!collectedMsgIds.has(match[2]))&&!match[2].endsWith(".")){msgIds.add(match[2])}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}var msgIdList=Array.from(msgIds);msgIdList.sort();var json=readJSON(tsconfig);json.strings=msgIdList;fs.writeFileSync(process.cwd()+"/"+tsconfig,JSON.stringify(json,null,2)+"\n");return msgIds};// Determine workspaces / dependencies
9
+ var packageJson=readJSON("/package.json");var workspaces=packageJson.workspaces||[];var qwcDeps=Object.keys((_packageJson$dependen=packageJson.dependencies)!==null&&_packageJson$dependen!==void 0?_packageJson$dependen:{qwc2:"0"}).filter(function(dep){return dep.startsWith("qwc")});// Generate workspace translations
10
+ var collectedMsgIds=new Set;var _iterator4=_createForOfIteratorHelper(workspaces),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var workspace=_step4.value;/* eslint-disable-next-line */console.log("Generating translations for "+workspace);var newMsgIds=updateTsConfig(process.cwd()+"/"+workspace,"/"+workspace+"/static/translations/tsconfig.json");collectedMsgIds=new Set([].concat(_toConsumableArray(collectedMsgIds),_toConsumableArray(newMsgIds)));var _config=readJSON("/"+workspace+"/static/translations/tsconfig.json");var _strings=[].concat(_toConsumableArray(_config.strings||[]),_toConsumableArray(_config.extra_strings||[]));var _skel=createSkel(_strings);var _iterator6=_createForOfIteratorHelper(_config.languages||[]),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var lang=_step6.value;var langskel=merge(_skel,{locale:lang});// Merge translations
11
+ var data=merge(langskel,_cleanMessages(readJSON("/"+workspace+"/static/translations/"+lang+".json"),langskel));// Write updated translations file
12
+ try{fs.writeFileSync(process.cwd()+"/"+workspace+"/static/translations/"+lang+".json",JSON.stringify(data,null,2)+"\n");/* eslint-disable-next-line */console.log("Wrote "+workspace+"/static/translations/"+lang+".json")}catch(e){/* eslint-disable-next-line */console.error("Failed to write "+workspace+"/static/translations/"+lang+".json: "+e)}}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}}// Generate application translations
13
+ }catch(err){_iterator4.e(err)}finally{_iterator4.f()}updateTsConfig(fs.existsSync(process.cwd()+"/js")?process.cwd()+"/js":process.cwd(),"/static/translations/tsconfig.json",collectedMsgIds);var config=readJSON("/static/translations/tsconfig.json");var strings=[].concat(_toConsumableArray(config.strings||[]),_toConsumableArray(config.extra_strings||[]));var skel=createSkel(strings);var _iterator5=_createForOfIteratorHelper(config.languages||[]),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _lang=_step5.value;var _langskel=merge(skel,{locale:_lang});var origData=readJSON("/static/translations/"+_lang+".json");var _data=merge(_langskel,_cleanMessages(readJSON("/static/translations/"+_lang+".json"),_langskel));// Merge translations from workspaces
14
+ var _iterator7=_createForOfIteratorHelper(workspaces),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _workspace=_step7.value;_data=merge(_data,readJSON("/"+_workspace+"/static/translations/"+_lang+".json"))}// Merge translations from dependencies
15
+ }catch(err){_iterator7.e(err)}finally{_iterator7.f()}var _iterator8=_createForOfIteratorHelper(qwcDeps),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var qwcDep=_step8.value;_data=merge(_data,readJSON("/node_modules/"+qwcDep+"/static/translations/"+_lang+".json"))}// Revert to original values for strings specified in overrides
16
+ }catch(err){_iterator8.e(err)}finally{_iterator8.f()}var _iterator9=_createForOfIteratorHelper(config.overrides||[]),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var path=_step9.value;var value=objectPath.get(origData.messages,path);if(value!==undefined){objectPath.set(_data.messages,path,value)}}// Write output
17
+ }catch(err){_iterator9.e(err)}finally{_iterator9.f()}try{fs.writeFileSync(process.cwd()+"/static/translations/"+_lang+".json",JSON.stringify(_data,null,2)+"\n");/* eslint-disable-next-line */console.log("Wrote static/translations/"+_lang+".json")}catch(e){/* eslint-disable-next-line */console.error("Failed to write static/translations/"+_lang+".json: "+e)}}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}
@@ -0,0 +1,169 @@
1
+ #!/usr/bin/python3
2
+
3
+ # Automatically generates a QWC2 WMTS background layer configuration, to be added to themesConfig.json
4
+ #
5
+ # Usage: wmts_config_generator.py <WMTS Capabilities URL> <LayerName> <Projection> [<format>]
6
+ #
7
+ # Example: wmts_config_generator.py https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml nw_dop EPSG:25832
8
+
9
+ import json
10
+ import re
11
+ import sys
12
+ import urllib.request
13
+ from xml.dom.minidom import parseString
14
+
15
+
16
+ def getFirstElementByTagName(parent, name):
17
+ try:
18
+ return parent.getElementsByTagName(name)[0]
19
+ except:
20
+ return None
21
+
22
+ def getFirstElementValueByTagName(parent, name):
23
+ try:
24
+ return parent.getElementsByTagName(name)[0].firstChild.nodeValue
25
+ except:
26
+ return ""
27
+
28
+
29
+ if len(sys.argv) < 4:
30
+ print("Usage: %s WMTS_Capabilities_URL LayerName Projection [style=default]" % sys.argv[0], file=sys.stderr)
31
+ sys.exit(1)
32
+
33
+ capabilitiesUrl = sys.argv[1]
34
+ layerName = sys.argv[2]
35
+ crs = sys.argv[3]
36
+ styleIdentifier = sys.argv[4] if len(sys.argv) > 4 else ""
37
+
38
+
39
+ try:
40
+ response = urllib.request.urlopen(capabilitiesUrl)
41
+ except:
42
+ print("Failed to download capabilities", file=sys.stderr)
43
+ sys.exit(1)
44
+
45
+ try:
46
+ capabilities = parseString(response.read())
47
+ except:
48
+ print("Failed to parse capabilities", file=sys.stderr)
49
+ sys.exit(1)
50
+
51
+ contents = getFirstElementByTagName(capabilities, "Contents")
52
+
53
+ # Search for layer
54
+ targetLayer = None
55
+ for layer in contents.getElementsByTagName("Layer"):
56
+ identifier = getFirstElementValueByTagName(layer, "ows:Identifier")
57
+ if identifier == layerName:
58
+ targetLayer = layer
59
+ break
60
+
61
+ if not targetLayer:
62
+ print("Could not find layer %s in capabilities" % layerName, file=sys.stderr)
63
+ sys.exit(1)
64
+
65
+ # Get supported tile matrix
66
+ layerTileMatrixSet = []
67
+ for tileMatrixSetLink in targetLayer.getElementsByTagName("TileMatrixSetLink"):
68
+ layerTileMatrixSet.append(getFirstElementValueByTagName(tileMatrixSetLink, "TileMatrixSet"))
69
+
70
+ # Get best tile matrix
71
+ tileMatrix = None
72
+ tileMatrixName = ""
73
+ for child in contents.childNodes:
74
+ if child.nodeName == "TileMatrixSet":
75
+ tileMatrixSet = child
76
+ tileMatrixName = getFirstElementValueByTagName(tileMatrixSet, "ows:Identifier")
77
+ supportedCrs = getFirstElementValueByTagName(tileMatrixSet, "ows:SupportedCRS")
78
+ crsMatch = re.search(r'(EPSG).*:(\d+)', supportedCrs)
79
+ if crsMatch and crs == "EPSG:" + crsMatch.group(2) and tileMatrixName in layerTileMatrixSet:
80
+ tileMatrix = tileMatrixSet.getElementsByTagName("TileMatrix")
81
+ break
82
+
83
+ if not tileMatrix:
84
+ print("Could not find compatible tile matrix", file=sys.stderr)
85
+ sys.exit(1)
86
+
87
+ # Boundingbox
88
+ wgsBboxEl = getFirstElementByTagName(layer, "ows:WGS84BoundingBox")
89
+ tmsBboxEl = getFirstElementByTagName(tileMatrixSet, "ows:BoundingBox")
90
+ if wgsBboxEl is not None:
91
+ bboxLower = list(map(float, getFirstElementValueByTagName(wgsBboxEl, "ows:LowerCorner").split(" ")))
92
+ bboxUpper = list(map(float, getFirstElementValueByTagName(wgsBboxEl, "ows:UpperCorner").split(" ")))
93
+ bbox = {
94
+ "crs": "EPSG:4326",
95
+ "bounds": [bboxLower[0], bboxLower[1], bboxUpper[0], bboxUpper[1]]
96
+ }
97
+ elif tmsBboxEl is not None:
98
+ bboxLower = list(map(float, getFirstElementValueByTagName(tmsBboxEl, "ows:LowerCorner").split(" ")))
99
+ bboxUpper = list(map(float, getFirstElementValueByTagName(tmsBboxEl, "ows:UpperCorner").split(" ")))
100
+ crsMatch = re.search(r'(EPSG).*:(\d+)', tmsBboxEl.getAttribute("crs"))
101
+ bbox = {
102
+ "crs": ("EPSG:" + crsMatch.group(2)) if crsMatch else crs,
103
+ "bounds": [bboxLower[0], bboxLower[1], bboxUpper[0], bboxUpper[1]]
104
+ }
105
+
106
+
107
+ # Compute origin and resolutions
108
+ origin = list(map(float, filter(bool, getFirstElementValueByTagName(tileMatrix[0], "TopLeftCorner").split(" "))))
109
+ tileSize = [
110
+ int(getFirstElementValueByTagName(tileMatrix[0], "TileWidth")),
111
+ int(getFirstElementValueByTagName(tileMatrix[0], "TileHeight"))
112
+ ]
113
+ resolutions = []
114
+ for entry in tileMatrix:
115
+ scaleDenominator = getFirstElementValueByTagName(entry, "ScaleDenominator")
116
+ # 0.00028: assumed pixel width in meters, as per WMTS standard
117
+ resolutions.append(float(scaleDenominator) * 0.00028)
118
+
119
+ # Determine style
120
+ if not styleIdentifier:
121
+ for style in targetLayer.getElementsByTagName("Style"):
122
+ if style.getAttribute("isDefault") == "true":
123
+ styleIdentifier = getFirstElementValueByTagName(style, "ows:Identifier")
124
+ break
125
+
126
+ # Resource URL
127
+ tileUrl = None
128
+ for resourceURL in targetLayer.getElementsByTagName("ResourceURL"):
129
+ if resourceURL.getAttribute("resourceType") == "tile":
130
+ tileUrl = resourceURL.getAttribute("template")
131
+
132
+ # Dimensions
133
+ for dimension in targetLayer.getElementsByTagName("Dimension"):
134
+ dimensionIdentifier = getFirstElementValueByTagName(dimension, "ows:Identifier")
135
+ dimensionValue = getFirstElementValueByTagName(dimension, "Default")
136
+ tileUrl = tileUrl.replace("{%s}" % dimensionIdentifier, dimensionValue)
137
+
138
+ # Format
139
+ format = getFirstElementValueByTagName(targetLayer, "Format")
140
+
141
+ # RequestEncoding
142
+ requestEncoding = ""
143
+ operationsMetadata = getFirstElementByTagName(capabilities, "ows:OperationsMetadata")
144
+ if operationsMetadata is not None:
145
+ for operation in operationsMetadata.getElementsByTagName("ows:Operation"):
146
+ if operation.getAttribute("name") == "GetCapabilities":
147
+ constraint = getFirstElementByTagName(operation, "ows:Constraint")
148
+ if constraint.getAttribute("name") == "GetEncoding":
149
+ requestEncoding = getFirstElementValueByTagName(constraint, "ows:Value")
150
+
151
+ result = {
152
+ "type": "wmts",
153
+ "url": tileUrl,
154
+ "name": layerName,
155
+ "format": format,
156
+ "requestEncoding": requestEncoding,
157
+ "tileMatrixPrefix": "",
158
+ "tileMatrixSet": tileMatrixName,
159
+ "originX": origin[0],
160
+ "originY": origin[1],
161
+ "projection": crs,
162
+ "tileSize": tileSize,
163
+ "style": styleIdentifier,
164
+ "bbox": bbox,
165
+ "resolutions": resolutions,
166
+ "thumbnail": layerName + ".jpg",
167
+ }
168
+
169
+ print(json.dumps(result, indent=2))
@@ -0,0 +1,12 @@
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 _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t["return"]||t["return"]()}finally{if(u)throw 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 _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)}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}/**
2
+ * Copyright 2020-2024 Sourcepole AG
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */import{createSelector}from"reselect";import{LayerRole}from"../actions/layers";import ConfigUtils from"../utils/ConfigUtils";import LayerUtils from"../utils/LayerUtils";import LocaleUtils from"../utils/LocaleUtils";import MapUtils from"../utils/MapUtils";import SearchProviders from"../utils/SearchProviders";import ThemeUtils from"../utils/ThemeUtils";import VectorLayerUtils from"../utils/VectorLayerUtils";// Uniformize the response of getResultGeometry
8
+ function getResultGeometry(provider,item,callback){provider.getResultGeometry(item,function(response){var features=[];if(response!==null&&response!==void 0&&response.geometry){var highlightFeature=response.geometry.coordinates?{type:"Feature",geometry:response.geometry}:VectorLayerUtils.wktToGeoJSON(response.geometry,response.crs,response.crs);if(highlightFeature){features.push(highlightFeature)}}else if(response!==null&&response!==void 0&&response.feature){if(response.feature.features){features.push.apply(features,_toConsumableArray(response.feature.features))}else{features.push(response.feature)}}if(features.length===0){callback(null)}else{callback(_objectSpread(_objectSpread({feature:{type:"FeatureCollection",features:features},crs:response.crs,hidemarker:response.hidemarker},response.bbox&&{bbox:response.bbox}),response.center&&{center:response.center}))}})}export default createSelector([function(state){return state.theme.current},function(state){return state.theme},function(state){return state.layers.flat},function(state){return state.map.scales},function(state){return state.map.zoom}],function(theme,themes,layers,scales,zoom){// Collect active layers/search terms
9
+ var searchTerms=[];var activeLayers=[];var mapScale=MapUtils.computeForZoom(scales,zoom);var _iterator=_createForOfIteratorHelper(LayerUtils.explodeLayers(layers)),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var entry=_step.value;if(entry.layer.role===LayerRole.THEME&&entry.sublayer.visibility===true&&LayerUtils.layerScaleInRange(entry.sublayer,mapScale)){searchTerms=searchTerms.concat(entry.sublayer.searchterms||[]);activeLayers.push(entry.sublayer.name)}}}catch(err){_iterator.e(err)}finally{_iterator.f()}var searchProviders=_objectSpread(_objectSpread({},SearchProviders),window.QWC2SearchProviders||{});var availableProviders={};var themeLayerNames=layers.map(function(layer){return layer.role===LayerRole.THEME?layer.params.LAYERS:""}).join(",").split(",").filter(function(entry){return entry});var providerKeys=new Set;var _iterator2=_createForOfIteratorHelper((theme===null||theme===void 0?void 0:theme.searchProviders)||[]),_step2;try{var _loop=function _loop(){var _entry;var entry=_step2.value;if(typeof entry==="string"){entry={provider:entry}}// Omit qgis provider with field configuration, this is only supported through the FeatureSearch plugin
10
+ if(entry.provider==="qgis"&&(_entry=entry)!==null&&_entry!==void 0&&(_entry=_entry.params)!==null&&_entry!==void 0&&_entry.fields){return 0;// continue
11
+ }var provider=searchProviders[entry.provider];if(provider){var _entry$key,_entry$label,_entry$labelmsgid;if(provider.requiresLayer&&!themeLayerNames.includes(provider.requiresLayer)){return 0;// continue
12
+ }var key=(_entry$key=entry.key)!==null&&_entry$key!==void 0?_entry$key:entry.provider;if(providerKeys.has(key)){var i=0;for(i=0;providerKeys.has(key+"_"+i);++i);key=key+"_"+i}providerKeys.add(key);availableProviders[key]=_objectSpread(_objectSpread({},provider),{},{label:(_entry$label=entry.label)!==null&&_entry$label!==void 0?_entry$label:provider.label,labelmsgid:(_entry$labelmsgid=entry.labelmsgid)!==null&&_entry$labelmsgid!==void 0?_entry$labelmsgid:provider.labelmsgid,getResultGeometry:provider.getResultGeometry?function(item,callback){return getResultGeometry(provider,item,callback)}:null,cfgParams:entry.params||{},params:{searchTerms:searchTerms,activeLayers:activeLayers,theme:theme}})}},_ret;for(_iterator2.s();!(_step2=_iterator2.n()).done;){_ret=_loop();if(_ret===0)continue}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}if(ConfigUtils.getConfigProp("searchThemes",theme)){availableProviders.themes={labelmsgid:LocaleUtils.trmsg("search.themes"),onSearch:function onSearch(text,options,callback){callback({results:ThemeUtils.searchThemes(themes.themes,text)})}}}if(ConfigUtils.getConfigProp("searchThemeLayers",theme)){availableProviders.themelayers={labelmsgid:LocaleUtils.trmsg("search.themelayers"),onSearch:function onSearch(text,options,callback){callback({results:ThemeUtils.searchThemeLayers(themes.themes,text)})}}}return availableProviders});