@mapsight/ui 7.1.0 → 7.2.1

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 (497) hide show
  1. package/README.md +95 -2
  2. package/dist/components/app.d.ts +1 -1
  3. package/dist/components/app.d.ts.map +1 -1
  4. package/dist/components/feature-details-content/feature-details-content.d.ts +1 -1
  5. package/dist/components/feature-details-content/feature-details-content.d.ts.map +1 -1
  6. package/dist/components/feature-details-content/index.d.ts +1 -1
  7. package/dist/components/feature-details-content/share-feature-link-modal.d.ts +1 -1
  8. package/dist/components/feature-details-content/share-feature-link-modal.d.ts.map +1 -1
  9. package/dist/components/feature-list/context.d.ts +12 -4
  10. package/dist/components/feature-list/context.d.ts.map +1 -1
  11. package/dist/components/feature-list/context.js.map +1 -1
  12. package/dist/components/feature-list/empty-message.d.ts +1 -1
  13. package/dist/components/feature-list/empty-message.d.ts.map +1 -1
  14. package/dist/components/feature-list/filter.d.ts +1 -1
  15. package/dist/components/feature-list/filter.d.ts.map +1 -1
  16. package/dist/components/feature-list/footer.d.ts +1 -1
  17. package/dist/components/feature-list/footer.d.ts.map +1 -1
  18. package/dist/components/feature-list/hooks/useAutoloadFeatureSource.d.ts.map +1 -1
  19. package/dist/components/feature-list/hooks/useAutoloadFeatureSource.js +12 -3
  20. package/dist/components/feature-list/hooks/useAutoloadFeatureSource.js.map +1 -1
  21. package/dist/components/feature-list/hooks/useFeatureListItemGroups.js +1 -1
  22. package/dist/components/feature-list/hooks/useFeatureListItemGroups.js.map +1 -1
  23. package/dist/components/feature-list/index.d.ts +3 -2
  24. package/dist/components/feature-list/index.d.ts.map +1 -1
  25. package/dist/components/feature-list/index.js +33 -42
  26. package/dist/components/feature-list/index.js.map +1 -1
  27. package/dist/components/feature-list/layer-switcher-control.d.ts +4 -0
  28. package/dist/components/feature-list/layer-switcher-control.d.ts.map +1 -0
  29. package/dist/components/feature-list/layer-switcher-control.js +11 -0
  30. package/dist/components/feature-list/layer-switcher-control.js.map +1 -0
  31. package/dist/components/feature-list/pagination.d.ts +1 -1
  32. package/dist/components/feature-list/pagination.d.ts.map +1 -1
  33. package/dist/components/feature-list/query-input.d.ts +1 -1
  34. package/dist/components/feature-list/query-input.d.ts.map +1 -1
  35. package/dist/components/feature-list/tag-switcher-control.d.ts +4 -0
  36. package/dist/components/feature-list/tag-switcher-control.d.ts.map +1 -0
  37. package/dist/components/feature-list/tag-switcher-control.js +10 -0
  38. package/dist/components/feature-list/tag-switcher-control.js.map +1 -0
  39. package/dist/components/feature-list-cycling/button.d.ts +1 -1
  40. package/dist/components/feature-list-cycling/button.d.ts.map +1 -1
  41. package/dist/components/feature-list-cycling/dot.d.ts +1 -1
  42. package/dist/components/feature-list-cycling/dot.d.ts.map +1 -1
  43. package/dist/components/feature-list-cycling/feature-list-cycling.d.ts +1 -1
  44. package/dist/components/feature-list-cycling/feature-list-cycling.d.ts.map +1 -1
  45. package/dist/components/feature-list-cycling/index.d.ts +1 -1
  46. package/dist/components/feature-list-item/icon.d.ts +8 -6
  47. package/dist/components/feature-list-item/icon.d.ts.map +1 -1
  48. package/dist/components/feature-list-item/icon.js +5 -13
  49. package/dist/components/feature-list-item/icon.js.map +1 -1
  50. package/dist/components/feature-list-item/index.d.ts +1 -1
  51. package/dist/components/feature-list-item/index.d.ts.map +1 -1
  52. package/dist/components/feature-list-sorting/feature-list-sorting.d.ts +1 -1
  53. package/dist/components/feature-list-sorting/feature-list-sorting.d.ts.map +1 -1
  54. package/dist/components/feature-list-sorting/feature-list-sorting.js +3 -12
  55. package/dist/components/feature-list-sorting/feature-list-sorting.js.map +1 -1
  56. package/dist/components/feature-list-sorting/index.d.ts +1 -1
  57. package/dist/components/feature-list-sorting/status-indicator.d.ts +1 -1
  58. package/dist/components/feature-list-sorting/status-indicator.d.ts.map +1 -1
  59. package/dist/components/feature-select-button.d.ts +1 -1
  60. package/dist/components/feature-select-button.d.ts.map +1 -1
  61. package/dist/components/feature-selection-info/close-button.d.ts +1 -1
  62. package/dist/components/feature-selection-info/close-button.d.ts.map +1 -1
  63. package/dist/components/feature-selection-info/container.d.ts +1 -1
  64. package/dist/components/feature-selection-info/container.d.ts.map +1 -1
  65. package/dist/components/feature-selection-info/header.d.ts +1 -1
  66. package/dist/components/feature-selection-info/header.d.ts.map +1 -1
  67. package/dist/components/feature-selection-info/index.d.ts +1 -1
  68. package/dist/components/feature-selection-info/index.d.ts.map +1 -1
  69. package/dist/components/feature-selection-info/with-sticky-header.d.ts +1 -1
  70. package/dist/components/feature-selection-info/with-sticky-header.d.ts.map +1 -1
  71. package/dist/components/feature-selection-info/without-sticky-header.d.ts +1 -1
  72. package/dist/components/feature-selection-info/without-sticky-header.d.ts.map +1 -1
  73. package/dist/components/filter-toggle-control/FilterToggleControl.d.ts +12 -0
  74. package/dist/components/filter-toggle-control/FilterToggleControl.d.ts.map +1 -0
  75. package/dist/components/filter-toggle-control/FilterToggleControl.js +20 -0
  76. package/dist/components/filter-toggle-control/FilterToggleControl.js.map +1 -0
  77. package/dist/components/helping/app-channel.d.ts +1 -1
  78. package/dist/components/helping/app-channel.d.ts.map +1 -1
  79. package/dist/components/helping/app-context.d.ts +1 -1
  80. package/dist/components/helping/app-context.d.ts.map +1 -1
  81. package/dist/components/instance.d.ts +1 -1
  82. package/dist/components/instance.d.ts.map +1 -1
  83. package/dist/components/layer-switcher/GroupedLayerSwitcher.d.ts +1 -1
  84. package/dist/components/layer-switcher/LayerSwitcher.d.ts +1 -1
  85. package/dist/components/layer-switcher/LayerSwitcherContainer.d.ts +4 -2
  86. package/dist/components/layer-switcher/LayerSwitcherContainer.d.ts.map +1 -1
  87. package/dist/components/layer-switcher/LayerSwitcherContainer.js +10 -4
  88. package/dist/components/layer-switcher/LayerSwitcherContainer.js.map +1 -1
  89. package/dist/components/layer-switcher/LayerSwitcherEntry.d.ts +1 -1
  90. package/dist/components/layer-switcher/SplitBaseLayerSwitcher.d.ts +26 -0
  91. package/dist/components/layer-switcher/SplitBaseLayerSwitcher.d.ts.map +1 -0
  92. package/dist/components/layer-switcher/SplitBaseLayerSwitcher.js +48 -0
  93. package/dist/components/layer-switcher/SplitBaseLayerSwitcher.js.map +1 -0
  94. package/dist/components/layer-switcher/index.d.ts +1 -1
  95. package/dist/components/layer-switcher/index.d.ts.map +1 -1
  96. package/dist/components/layer-switcher/index.js +1 -0
  97. package/dist/components/layer-switcher/index.js.map +1 -1
  98. package/dist/components/layout/additional-container/content.d.ts +1 -1
  99. package/dist/components/layout/additional-container/content.d.ts.map +1 -1
  100. package/dist/components/layout/additional-container/index.d.ts +1 -1
  101. package/dist/components/layout/additional-container/index.d.ts.map +1 -1
  102. package/dist/components/layout/additional-container/marginal.d.ts +1 -1
  103. package/dist/components/layout/additional-container/marginal.d.ts.map +1 -1
  104. package/dist/components/layout/main-container.d.ts +1 -1
  105. package/dist/components/layout/main-container.d.ts.map +1 -1
  106. package/dist/components/layout/map-row.d.ts +1 -1
  107. package/dist/components/layout/map-row.d.ts.map +1 -1
  108. package/dist/components/layout/title-bar.d.ts +1 -1
  109. package/dist/components/layout/title-bar.d.ts.map +1 -1
  110. package/dist/components/layout/wrapper.d.ts +1 -1
  111. package/dist/components/layout/wrapper.d.ts.map +1 -1
  112. package/dist/components/link-share.d.ts +1 -1
  113. package/dist/components/link-share.d.ts.map +1 -1
  114. package/dist/components/main-panel/container.d.ts +1 -1
  115. package/dist/components/main-panel/container.d.ts.map +1 -1
  116. package/dist/components/main-panel/context.d.ts +1 -1
  117. package/dist/components/main-panel/context.d.ts.map +1 -1
  118. package/dist/components/main-panel/index.d.ts +1 -1
  119. package/dist/components/main-panel/index.d.ts.map +1 -1
  120. package/dist/components/main-panel/list-toggle-button.d.ts +1 -1
  121. package/dist/components/main-panel/list-toggle-button.d.ts.map +1 -1
  122. package/dist/components/map-overlay/attribution-entries.d.ts +1 -1
  123. package/dist/components/map-overlay/attribution-entries.d.ts.map +1 -1
  124. package/dist/components/map-overlay/attribution.d.ts +1 -1
  125. package/dist/components/map-overlay/attribution.d.ts.map +1 -1
  126. package/dist/components/map-overlay/combined-buttons.d.ts +1 -1
  127. package/dist/components/map-overlay/combined-buttons.d.ts.map +1 -1
  128. package/dist/components/map-overlay/index.d.ts +1 -1
  129. package/dist/components/map-overlay/index.d.ts.map +1 -1
  130. package/dist/components/map-overlay/info-overlay-left.d.ts +1 -1
  131. package/dist/components/map-overlay/info-overlay-left.d.ts.map +1 -1
  132. package/dist/components/map-overlay/info-overlay-modal.d.ts +1 -1
  133. package/dist/components/map-overlay/info-overlay-modal.d.ts.map +1 -1
  134. package/dist/components/map-overlay/info-overlay-right.d.ts +1 -1
  135. package/dist/components/map-overlay/info-overlay-right.d.ts.map +1 -1
  136. package/dist/components/map-overlay/layer-switcher-overlay.d.ts +1 -1
  137. package/dist/components/map-overlay/layer-switcher-overlay.d.ts.map +1 -1
  138. package/dist/components/map-overlay/legend.d.ts +1 -1
  139. package/dist/components/map-overlay/legend.d.ts.map +1 -1
  140. package/dist/components/map-overlay/logo.d.ts +1 -1
  141. package/dist/components/map-overlay/logo.d.ts.map +1 -1
  142. package/dist/components/map-overlay/measure-distance-button.d.ts +1 -1
  143. package/dist/components/map-overlay/measure-distance-button.d.ts.map +1 -1
  144. package/dist/components/map-overlay/measure-distance-overlay.d.ts +1 -1
  145. package/dist/components/map-overlay/measure-distance-overlay.d.ts.map +1 -1
  146. package/dist/components/map-overlay/search-overlay.d.ts +1 -1
  147. package/dist/components/map-overlay/search-overlay.d.ts.map +1 -1
  148. package/dist/components/map-overlay/share-position-link-button.d.ts +1 -1
  149. package/dist/components/map-overlay/share-position-link-button.d.ts.map +1 -1
  150. package/dist/components/map-overlay/tool-overlay.d.ts +1 -1
  151. package/dist/components/map-overlay/tool-overlay.d.ts.map +1 -1
  152. package/dist/components/map-overlay/zoom-buttons.d.ts +1 -1
  153. package/dist/components/map-overlay/zoom-buttons.d.ts.map +1 -1
  154. package/dist/components/map-synced-interlay/index.d.ts +1 -1
  155. package/dist/components/map-synced-interlay/map-synced-interlay.d.ts +1 -1
  156. package/dist/components/map-synced-interlay/map-synced-interlay.d.ts.map +1 -1
  157. package/dist/components/map-synced-interlay/tooltip.d.ts +1 -1
  158. package/dist/components/map-synced-interlay/tooltip.d.ts.map +1 -1
  159. package/dist/components/map-wrapper.d.ts +3 -3
  160. package/dist/components/map-wrapper.d.ts.map +1 -1
  161. package/dist/components/map-wrapper.js +4 -7
  162. package/dist/components/map-wrapper.js.map +1 -1
  163. package/dist/components/map.d.ts +1 -1
  164. package/dist/components/map.d.ts.map +1 -1
  165. package/dist/components/mapsight-icon/mapsight-icon.d.ts +10 -0
  166. package/dist/components/mapsight-icon/mapsight-icon.d.ts.map +1 -0
  167. package/dist/components/mapsight-icon/mapsight-icon.js +33 -0
  168. package/dist/components/mapsight-icon/mapsight-icon.js.map +1 -0
  169. package/dist/components/modal.d.ts +1 -1
  170. package/dist/components/modal.d.ts.map +1 -1
  171. package/dist/components/query-input-with-label.d.ts +1 -1
  172. package/dist/components/query-input-with-label.d.ts.map +1 -1
  173. package/dist/components/search/index.d.ts +1 -1
  174. package/dist/components/search/index.d.ts.map +1 -1
  175. package/dist/components/search/result-entry.d.ts +1 -1
  176. package/dist/components/search/result-entry.d.ts.map +1 -1
  177. package/dist/components/search/result.d.ts +1 -1
  178. package/dist/components/search/result.d.ts.map +1 -1
  179. package/dist/components/switcher/GroupedSwitcher.d.ts +1 -1
  180. package/dist/components/switcher/GroupedSwitcher.d.ts.map +1 -1
  181. package/dist/components/switcher/Switcher.d.ts +1 -1
  182. package/dist/components/switcher/Switcher.d.ts.map +1 -1
  183. package/dist/components/switcher/SwitcherButton.d.ts +1 -1
  184. package/dist/components/switcher/SwitcherButton.d.ts.map +1 -1
  185. package/dist/components/switcher/SwitcherEntry.d.ts +1 -1
  186. package/dist/components/switcher/SwitcherEntry.d.ts.map +1 -1
  187. package/dist/components/switcher/SwitcherHeader.d.ts +1 -1
  188. package/dist/components/switcher/SwitcherHeader.d.ts.map +1 -1
  189. package/dist/components/switcher/SwitcherStatusIcon.d.ts +1 -1
  190. package/dist/components/switcher/SwitcherStatusIcon.d.ts.map +1 -1
  191. package/dist/components/tag-switcher/TagSwitcher.d.ts +1 -1
  192. package/dist/components/tag-switcher/TagSwitcher.d.ts.map +1 -1
  193. package/dist/components/tag-switcher/createTagSwitcherEntry.d.ts +1 -1
  194. package/dist/components/tag-switcher/createTagSwitcherHeader.d.ts +1 -1
  195. package/dist/components/tag-switcher/index.d.ts +1 -1
  196. package/dist/components/time-filter.d.ts +1 -1
  197. package/dist/components/time-filter.d.ts.map +1 -1
  198. package/dist/components/view-toggle-button/desktop-button.d.ts +1 -1
  199. package/dist/components/view-toggle-button/desktop-button.d.ts.map +1 -1
  200. package/dist/components/view-toggle-button/index.d.ts +1 -1
  201. package/dist/components/view-toggle-button/mobile-button.d.ts +1 -1
  202. package/dist/components/view-toggle-button/mobile-button.d.ts.map +1 -1
  203. package/dist/components/view-toggle-button/view-toggle-button.d.ts +1 -1
  204. package/dist/components/view-toggle-button/view-toggle-button.d.ts.map +1 -1
  205. package/dist/components/view-toggle-button/viewport-button.d.ts +1 -1
  206. package/dist/components/view-toggle-button/viewport-button.d.ts.map +1 -1
  207. package/dist/config/feature/sources.d.ts +8 -5
  208. package/dist/config/feature/sources.d.ts.map +1 -1
  209. package/dist/config/feature/sources.js +7 -9
  210. package/dist/config/feature/sources.js.map +1 -1
  211. package/dist/config/index.d.ts +1 -1
  212. package/dist/config/map/featureInteractions.js.map +1 -1
  213. package/dist/config/map/layers.d.ts +16 -13
  214. package/dist/config/map/layers.d.ts.map +1 -1
  215. package/dist/config/map/layers.js.map +1 -1
  216. package/dist/config/schema/index.d.ts +197 -0
  217. package/dist/config/schema/index.d.ts.map +1 -0
  218. package/dist/config/schema/index.js +26 -0
  219. package/dist/config/schema/index.js.map +1 -0
  220. package/dist/config/schema/validate.d.ts +8 -0
  221. package/dist/config/schema/validate.d.ts.map +1 -0
  222. package/dist/config/schema/validate.js +7 -0
  223. package/dist/config/schema/validate.js.map +1 -0
  224. package/dist/controllers/defaults.d.ts.map +1 -1
  225. package/dist/controllers/defaults.js +5 -0
  226. package/dist/controllers/defaults.js.map +1 -1
  227. package/dist/filters/tag-filter.d.ts +7 -0
  228. package/dist/filters/tag-filter.d.ts.map +1 -1
  229. package/dist/filters/tag-filter.js +10 -0
  230. package/dist/filters/tag-filter.js.map +1 -1
  231. package/dist/filters/time-filter.d.ts +9 -0
  232. package/dist/filters/time-filter.d.ts.map +1 -1
  233. package/dist/filters/time-filter.js +10 -0
  234. package/dist/filters/time-filter.js.map +1 -1
  235. package/dist/helpers/i18n/de.d.ts.map +1 -1
  236. package/dist/helpers/i18n/de.js +3 -0
  237. package/dist/helpers/i18n/de.js.map +1 -1
  238. package/dist/helpers/i18n/en.d.ts.map +1 -1
  239. package/dist/helpers/i18n/en.js +3 -0
  240. package/dist/helpers/i18n/en.js.map +1 -1
  241. package/dist/helpers/sort-features-by-distance.d.ts +2 -7
  242. package/dist/helpers/sort-features-by-distance.d.ts.map +1 -1
  243. package/dist/helpers/sort-features-by-distance.js +27 -39
  244. package/dist/helpers/sort-features-by-distance.js.map +1 -1
  245. package/dist/hooks/useMapsightIcon.d.ts +8 -0
  246. package/dist/hooks/useMapsightIcon.d.ts.map +1 -0
  247. package/dist/hooks/useMapsightIcon.js +50 -0
  248. package/dist/hooks/useMapsightIcon.js.map +1 -0
  249. package/dist/index.d.ts +2 -2
  250. package/dist/index.d.ts.map +1 -1
  251. package/dist/index.js +15 -2
  252. package/dist/index.js.map +1 -1
  253. package/dist/plugins/browser-defaults.d.ts +2 -0
  254. package/dist/plugins/browser-defaults.d.ts.map +1 -1
  255. package/dist/plugins/browser-defaults.js +5 -0
  256. package/dist/plugins/browser-defaults.js.map +1 -1
  257. package/dist/plugins/common/combined-visible-layers.d.ts +15 -0
  258. package/dist/plugins/common/combined-visible-layers.d.ts.map +1 -0
  259. package/dist/plugins/common/combined-visible-layers.js +63 -0
  260. package/dist/plugins/common/combined-visible-layers.js.map +1 -0
  261. package/dist/plugins/common/runtime-icon-style.d.ts +12 -0
  262. package/dist/plugins/common/runtime-icon-style.d.ts.map +1 -0
  263. package/dist/plugins/common/runtime-icon-style.js +58 -0
  264. package/dist/plugins/common/runtime-icon-style.js.map +1 -0
  265. package/dist/react-modal-app-element.d.ts +6 -0
  266. package/dist/react-modal-app-element.d.ts.map +1 -0
  267. package/dist/react-modal-app-element.js +9 -0
  268. package/dist/react-modal-app-element.js.map +1 -0
  269. package/dist/store/actions.d.ts.map +1 -1
  270. package/dist/store/actions.js +6 -1
  271. package/dist/store/actions.js.map +1 -1
  272. package/dist/store/reducers.d.ts +75 -6
  273. package/dist/store/reducers.d.ts.map +1 -1
  274. package/dist/store/selectors.d.ts +75 -17
  275. package/dist/store/selectors.d.ts.map +1 -1
  276. package/dist/store/selectors.js +9 -1
  277. package/dist/store/selectors.js.map +1 -1
  278. package/dist/types.d.ts +21 -5
  279. package/dist/types.d.ts.map +1 -1
  280. package/package.json +24 -8
  281. package/src/scss/blocks/_features-sorting.scss +0 -13
  282. package/src/scss/blocks/_filter-button.scss +39 -8
  283. package/src/scss/blocks/_filter-toggle-control.scss +15 -0
  284. package/src/scss/default.scss +1 -0
  285. package/src/scss/themes/2022-03.scss +66 -0
  286. package/src/img/mapsight-ui/check-empty.svg +0 -1
  287. package/src/img/mapsight-ui/check.svg +0 -2
  288. package/src/img/mapsight-ui/close-list.svg +0 -1
  289. package/src/img/mapsight-ui/close.svg +0 -1
  290. package/src/img/mapsight-ui/error.svg +0 -1
  291. package/src/img/mapsight-ui/fullscreen-close.svg +0 -1
  292. package/src/img/mapsight-ui/fullscreen.svg +0 -1
  293. package/src/img/mapsight-ui/geo-active.svg +0 -1
  294. package/src/img/mapsight-ui/geo-error.svg +0 -1
  295. package/src/img/mapsight-ui/geo-inactive.svg +0 -1
  296. package/src/img/mapsight-ui/info.svg +0 -1
  297. package/src/img/mapsight-ui/layers.svg +0 -1
  298. package/src/img/mapsight-ui/loading.svg +0 -1
  299. package/src/img/mapsight-ui/map.svg +0 -1
  300. package/src/img/mapsight-ui/measure-distance.svg +0 -7
  301. package/src/img/mapsight-ui/open-list.svg +0 -1
  302. package/src/img/mapsight-ui/place-marker.svg +0 -4
  303. package/src/img/mapsight-ui/print.svg +0 -4
  304. package/src/img/mapsight-ui/reset-active.svg +0 -1
  305. package/src/img/mapsight-ui/reset.svg +0 -1
  306. package/src/img/mapsight-ui/search.svg +0 -1
  307. package/src/img/mapsight-ui/sharing.svg +0 -7
  308. package/src/img/mapsight-ui/sort-active.svg +0 -1
  309. package/src/img/mapsight-ui/sort.svg +0 -1
  310. package/src/img/mapsight-ui/watermark.svg +0 -1
  311. package/src/img/mapsight-ui/zoom-in.svg +0 -3
  312. package/src/img/mapsight-ui/zoom-out.svg +0 -3
  313. package/src/js/components/app.tsx +0 -232
  314. package/src/js/components/close-overlay-button.tsx +0 -27
  315. package/src/js/components/feature-details-content/feature-details-content-inner.tsx +0 -116
  316. package/src/js/components/feature-details-content/feature-details-content.jsx +0 -185
  317. package/src/js/components/feature-details-content/index.js +0 -16
  318. package/src/js/components/feature-details-content/share-feature-link-modal.jsx +0 -56
  319. package/src/js/components/feature-list/content.jsx +0 -42
  320. package/src/js/components/feature-list/context.tsx +0 -47
  321. package/src/js/components/feature-list/empty-message.jsx +0 -15
  322. package/src/js/components/feature-list/filter.jsx +0 -35
  323. package/src/js/components/feature-list/footer.jsx +0 -5
  324. package/src/js/components/feature-list/grouped-content.jsx +0 -74
  325. package/src/js/components/feature-list/header.jsx +0 -7
  326. package/src/js/components/feature-list/hooks/useAutoloadFeatureSource.ts +0 -25
  327. package/src/js/components/feature-list/hooks/useFeatureListFeatureSource.ts +0 -22
  328. package/src/js/components/feature-list/hooks/useFeatureListItemGroups.ts +0 -127
  329. package/src/js/components/feature-list/hooks/useFeatureListState.ts +0 -98
  330. package/src/js/components/feature-list/hooks/useKeyboardNavigation.js +0 -112
  331. package/src/js/components/feature-list/hooks/useMakeHeaderSticky.js +0 -40
  332. package/src/js/components/feature-list/hooks/usePaginatedFilteredFeatures.ts +0 -129
  333. package/src/js/components/feature-list/hooks/useRestoreDocumentScroll.js +0 -12
  334. package/src/js/components/feature-list/hooks/useSelectFeature.js +0 -88
  335. package/src/js/components/feature-list/index.jsx +0 -278
  336. package/src/js/components/feature-list/pagination.tsx +0 -57
  337. package/src/js/components/feature-list/query-input.jsx +0 -14
  338. package/src/js/components/feature-list-cycling/button.jsx +0 -13
  339. package/src/js/components/feature-list-cycling/dot.jsx +0 -43
  340. package/src/js/components/feature-list-cycling/feature-list-cycling.jsx +0 -153
  341. package/src/js/components/feature-list-cycling/index.js +0 -82
  342. package/src/js/components/feature-list-item/head.jsx +0 -131
  343. package/src/js/components/feature-list-item/hooks/useFeatureListItemScrollAndFocus.js +0 -51
  344. package/src/js/components/feature-list-item/hooks/useFeatureListItemState.ts +0 -75
  345. package/src/js/components/feature-list-item/icon.jsx +0 -35
  346. package/src/js/components/feature-list-item/index.jsx +0 -168
  347. package/src/js/components/feature-list-sorting/feature-list-sorting.tsx +0 -144
  348. package/src/js/components/feature-list-sorting/index.js +0 -22
  349. package/src/js/components/feature-list-sorting/status-indicator.jsx +0 -10
  350. package/src/js/components/feature-select-button.jsx +0 -70
  351. package/src/js/components/feature-selection-info/close-button.jsx +0 -64
  352. package/src/js/components/feature-selection-info/container.jsx +0 -9
  353. package/src/js/components/feature-selection-info/header.tsx +0 -27
  354. package/src/js/components/feature-selection-info/index.tsx +0 -81
  355. package/src/js/components/feature-selection-info/with-sticky-header.tsx +0 -76
  356. package/src/js/components/feature-selection-info/without-sticky-header.jsx +0 -19
  357. package/src/js/components/feature-selection-info/wrapper.jsx +0 -43
  358. package/src/js/components/helping/app-channel.tsx +0 -99
  359. package/src/js/components/helping/app-context.tsx +0 -32
  360. package/src/js/components/helping/visibility-wrapper.jsx +0 -23
  361. package/src/js/components/instance.tsx +0 -48
  362. package/src/js/components/layer-switcher/GroupedLayerSwitcher.js +0 -47
  363. package/src/js/components/layer-switcher/LayerSwitcher.ts +0 -34
  364. package/src/js/components/layer-switcher/LayerSwitcherContainer.tsx +0 -88
  365. package/src/js/components/layer-switcher/LayerSwitcherEntry.ts +0 -152
  366. package/src/js/components/layer-switcher/index.ts +0 -42
  367. package/src/js/components/layout/additional-container/content.jsx +0 -10
  368. package/src/js/components/layout/additional-container/index.jsx +0 -5
  369. package/src/js/components/layout/additional-container/marginal.jsx +0 -10
  370. package/src/js/components/layout/main-container.jsx +0 -5
  371. package/src/js/components/layout/map-row.jsx +0 -5
  372. package/src/js/components/layout/title-bar.tsx +0 -25
  373. package/src/js/components/layout/wrapper.jsx +0 -28
  374. package/src/js/components/link-share.jsx +0 -78
  375. package/src/js/components/main-panel/container.tsx +0 -23
  376. package/src/js/components/main-panel/context.tsx +0 -71
  377. package/src/js/components/main-panel/index.tsx +0 -46
  378. package/src/js/components/main-panel/list-toggle-button.jsx +0 -43
  379. package/src/js/components/map-overlay/area.jsx +0 -17
  380. package/src/js/components/map-overlay/attribution-entries.tsx +0 -33
  381. package/src/js/components/map-overlay/attribution.tsx +0 -25
  382. package/src/js/components/map-overlay/combined-buttons.jsx +0 -5
  383. package/src/js/components/map-overlay/index.jsx +0 -5
  384. package/src/js/components/map-overlay/info-overlay-left.jsx +0 -51
  385. package/src/js/components/map-overlay/info-overlay-modal.tsx +0 -49
  386. package/src/js/components/map-overlay/info-overlay-right.jsx +0 -46
  387. package/src/js/components/map-overlay/layer-switcher-overlay.tsx +0 -100
  388. package/src/js/components/map-overlay/legend.tsx +0 -22
  389. package/src/js/components/map-overlay/logo.jsx +0 -11
  390. package/src/js/components/map-overlay/measure-distance-button.tsx +0 -116
  391. package/src/js/components/map-overlay/measure-distance-overlay.jsx +0 -56
  392. package/src/js/components/map-overlay/mini-legend.jsx +0 -103
  393. package/src/js/components/map-overlay/region-selector.jsx +0 -63
  394. package/src/js/components/map-overlay/search-overlay.jsx +0 -79
  395. package/src/js/components/map-overlay/share-position-link-button.tsx +0 -144
  396. package/src/js/components/map-overlay/tool-overlay.tsx +0 -28
  397. package/src/js/components/map-overlay/user-geo-location-button.jsx +0 -89
  398. package/src/js/components/map-overlay/zoom-button.jsx +0 -98
  399. package/src/js/components/map-overlay/zoom-buttons.jsx +0 -26
  400. package/src/js/components/map-synced-interlay/index.ts +0 -15
  401. package/src/js/components/map-synced-interlay/map-synced-interlay.jsx +0 -22
  402. package/src/js/components/map-synced-interlay/tooltip-content.tsx +0 -22
  403. package/src/js/components/map-synced-interlay/tooltip.tsx +0 -199
  404. package/src/js/components/map-wrapper.tsx +0 -65
  405. package/src/js/components/map.tsx +0 -55
  406. package/src/js/components/modal.tsx +0 -40
  407. package/src/js/components/query-input-with-label.tsx +0 -71
  408. package/src/js/components/query-input.tsx +0 -81
  409. package/src/js/components/search/index.jsx +0 -83
  410. package/src/js/components/search/query-input.jsx +0 -20
  411. package/src/js/components/search/result-entry.jsx +0 -63
  412. package/src/js/components/search/result.jsx +0 -71
  413. package/src/js/components/switcher/GroupedSwitcher.jsx +0 -42
  414. package/src/js/components/switcher/Switcher.jsx +0 -54
  415. package/src/js/components/switcher/SwitcherButton.jsx +0 -23
  416. package/src/js/components/switcher/SwitcherEntry.tsx +0 -164
  417. package/src/js/components/switcher/SwitcherHeader.jsx +0 -58
  418. package/src/js/components/switcher/SwitcherStatusIcon.jsx +0 -36
  419. package/src/js/components/tag-switcher/TagSwitcher.tsx +0 -56
  420. package/src/js/components/tag-switcher/createTagSwitcherEntry.ts +0 -39
  421. package/src/js/components/tag-switcher/createTagSwitcherHeader.ts +0 -47
  422. package/src/js/components/tag-switcher/index.ts +0 -17
  423. package/src/js/components/time-filter.jsx +0 -187
  424. package/src/js/components/view-toggle-button/desktop-button.jsx +0 -13
  425. package/src/js/components/view-toggle-button/index.ts +0 -42
  426. package/src/js/components/view-toggle-button/mobile-button.tsx +0 -13
  427. package/src/js/components/view-toggle-button/view-toggle-button.jsx +0 -74
  428. package/src/js/components/view-toggle-button/viewport-button.tsx +0 -13
  429. package/src/js/config/constants/app.ts +0 -16
  430. package/src/js/config/constants/controllers.ts +0 -11
  431. package/src/js/config/feature/selections.ts +0 -13
  432. package/src/js/config/feature/sources.ts +0 -77
  433. package/src/js/config/index.ts +0 -133
  434. package/src/js/config/map/featureInteractions.ts +0 -53
  435. package/src/js/config/map/interactions.ts +0 -15
  436. package/src/js/config/map/layers.ts +0 -190
  437. package/src/js/controllers/defaults.ts +0 -36
  438. package/src/js/embed/browser.ts +0 -89
  439. package/src/js/embed/node.ts +0 -57
  440. package/src/js/filters/tag-filter.ts +0 -135
  441. package/src/js/filters/time-filter.ts +0 -53
  442. package/src/js/helpers/components.ts +0 -66
  443. package/src/js/helpers/create-action-watcher.ts +0 -35
  444. package/src/js/helpers/events.ts +0 -11
  445. package/src/js/helpers/get-feature-property.ts +0 -14
  446. package/src/js/helpers/i18n/de.ts +0 -145
  447. package/src/js/helpers/i18n/en.ts +0 -140
  448. package/src/js/helpers/i18n/index.ts +0 -41
  449. package/src/js/helpers/makeReplaceableComponent.ts +0 -0
  450. package/src/js/helpers/mod-classes.ts +0 -47
  451. package/src/js/helpers/react.ts +0 -14
  452. package/src/js/helpers/scroll-to-element-top.ts +0 -16
  453. package/src/js/helpers/sort-features-by-distance.ts +0 -102
  454. package/src/js/helpers/sticky.js +0 -143
  455. package/src/js/hooks/useCallbackRef.ts +0 -14
  456. package/src/js/hooks/useControllableState.ts +0 -50
  457. package/src/js/hooks/useDebounce.ts +0 -32
  458. package/src/js/hooks/useHandleEscapeKeyDown.ts +0 -27
  459. package/src/js/hooks/useMapsightPanel.ts +0 -40
  460. package/src/js/hooks/useMountable.ts +0 -47
  461. package/src/js/hooks/usePrevious.ts +0 -15
  462. package/src/js/hooks/useStickyHeader.ts +0 -50
  463. package/src/js/hooks/useUpdateMapSizeCallback.ts +0 -32
  464. package/src/js/hooks/useUpdateMapSizeOnRender.ts +0 -16
  465. package/src/js/hooks/useUpdateMapSizeOnTransitionEnd.ts +0 -40
  466. package/src/js/hooks/useUpdateMapSizeOnViewChange.ts +0 -36
  467. package/src/js/index.ts +0 -320
  468. package/src/js/plugins/browser/app-title.ts +0 -36
  469. package/src/js/plugins/browser/debug.ts +0 -37
  470. package/src/js/plugins/browser/feature-deep-link.ts +0 -223
  471. package/src/js/plugins/browser/local-storage.ts +0 -79
  472. package/src/js/plugins/browser/native-fullscreen.ts +0 -81
  473. package/src/js/plugins/browser/no-scroll.ts +0 -91
  474. package/src/js/plugins/browser/partial-content-changed-event.ts +0 -23
  475. package/src/js/plugins/browser/piwik-track-feature-selection-event.ts +0 -75
  476. package/src/js/plugins/browser/piwik-track-fullscreen-toggle-event.ts +0 -46
  477. package/src/js/plugins/browser/search.ts +0 -42
  478. package/src/js/plugins/browser/share-position-link.ts +0 -463
  479. package/src/js/plugins/browser/toggle-mobile-views.ts +0 -60
  480. package/src/js/plugins/browser/user-geolocation.ts +0 -142
  481. package/src/js/plugins/browser/views.ts +0 -141
  482. package/src/js/plugins/browser-defaults.ts +0 -101
  483. package/src/js/plugins/common/feature-selection-details-url.ts +0 -135
  484. package/src/js/plugins/common/lang.ts +0 -17
  485. package/src/js/plugins/common/measure-distance.ts +0 -223
  486. package/src/js/plugins/common/ol-proxy.ts +0 -68
  487. package/src/js/plugins/common/render-await-feature-details-loaded.ts +0 -154
  488. package/src/js/plugins/common/render-await-list-feature-sources-loaded.ts +0 -109
  489. package/src/js/plugins/server/feature-deep-link.ts +0 -67
  490. package/src/js/plugins/server-defaults.ts +0 -36
  491. package/src/js/renderer/browser-dom.tsx +0 -27
  492. package/src/js/renderer/server-string.tsx +0 -17
  493. package/src/js/server-handler.js +0 -39
  494. package/src/js/store/actions.ts +0 -662
  495. package/src/js/store/reducers.ts +0 -491
  496. package/src/js/store/selectors.ts +0 -483
  497. package/src/js/types.ts +0 -405
@@ -1,74 +0,0 @@
1
- import {memo, useCallback} from "react";
2
- import {useSelector} from "react-redux";
3
-
4
- import {
5
- VIEW_DESKTOP,
6
- VIEW_FULLSCREEN,
7
- VIEW_MAP_ONLY,
8
- VIEW_MOBILE,
9
- } from "../../config/constants/app";
10
- import {translate} from "../../helpers/i18n";
11
- import {viewSelector} from "../../store/selectors";
12
-
13
- function getOtherView(view) {
14
- switch (view) {
15
- case VIEW_MAP_ONLY:
16
- return VIEW_MOBILE;
17
- case VIEW_FULLSCREEN:
18
- return VIEW_DESKTOP;
19
- case VIEW_DESKTOP:
20
- return VIEW_FULLSCREEN;
21
- case VIEW_MOBILE:
22
- default:
23
- return VIEW_MAP_ONLY;
24
- }
25
- }
26
-
27
- function getAriaLabel(view) {
28
- return translate("ui.view-toggle-button.ariaLabel" + view);
29
- }
30
-
31
- function getLabel(view) {
32
- return translate("ui.view-toggle-button.label" + view);
33
- }
34
-
35
- function ViewToggleButton({
36
- isMapOutOfViewport = false,
37
- changeView,
38
-
39
- additionalClasses = "",
40
- baseClass = "button",
41
- viewModifierClassPrefix = "button--",
42
-
43
- style = {},
44
- }) {
45
- const view = useSelector(viewSelector);
46
- const otherView = getOtherView(view);
47
-
48
- const onClick = useCallback(
49
- function onClick(e) {
50
- e.stopPropagation();
51
- changeView(view, otherView);
52
- },
53
- [changeView, view, otherView],
54
- );
55
-
56
- let className = `${baseClass} ${viewModifierClassPrefix}${view} ${additionalClasses}`;
57
- if (isMapOutOfViewport) {
58
- className += ` ${viewModifierClassPrefix}map-out-of-view`;
59
- }
60
-
61
- return (
62
- <button
63
- type="button"
64
- style={style}
65
- className={className}
66
- onClick={onClick}
67
- aria-label={getAriaLabel(otherView)}
68
- >
69
- <span className={`${baseClass}__label`}>{getLabel(otherView)}</span>
70
- </button>
71
- );
72
- }
73
-
74
- export default memo(ViewToggleButton);
@@ -1,13 +0,0 @@
1
- import ViewToggleButton from "./index";
2
-
3
- function ViewportViewToggleButton() {
4
- return (
5
- <ViewToggleButton
6
- baseClass="ms3-viewport-button"
7
- additionalClasses="ms3-viewport-button--bottom-right ms3-viewport-button--mobile-view-toggle"
8
- viewModifierClassPrefix="ms3-viewport-button--mobile-view-toggle--"
9
- />
10
- );
11
- }
12
-
13
- export default ViewportViewToggleButton;
@@ -1,16 +0,0 @@
1
- export type View =
2
- | typeof VIEW_DESKTOP
3
- | typeof VIEW_MOBILE
4
- | typeof VIEW_FULLSCREEN
5
- | typeof VIEW_MAP_ONLY;
6
-
7
- export const VIEW_DESKTOP = "desktop";
8
- export const VIEW_MOBILE = "mobile";
9
-
10
- export const VIEW_FULLSCREEN = "fullscreen";
11
- export const VIEW_MAP_ONLY = "mapOnly";
12
-
13
- export const DETAILS_CONTENT_STATE_KEY = "featureItemDetailsContent";
14
-
15
- export const ZOOM_IN = "zoomIn";
16
- export const ZOOM_OUT = "zoomOut";
@@ -1,11 +0,0 @@
1
- export const FEATURE_SOURCES = "featureSources";
2
- export const FEATURE_SELECTIONS = "featureSelections";
3
-
4
- export const FEATURE_LIST = "list";
5
- export const MAP = "map";
6
- export const PROJECTIONS = "projections";
7
-
8
- export const USER_GEOLOCATION = "userGeolocation";
9
-
10
- export const TIME_FILTER = "timeFilter";
11
- export const TAG_FILTER = "tagFilter";
@@ -1,13 +0,0 @@
1
- // ausgewähltes Feature für Detail-Ansicht
2
- export const FEATURE_SELECTION_SELECT = "select";
3
- // in Liste vorgewähltes Feature, ohne Detailansicht
4
- export const FEATURE_SELECTION_PRESELECT = "preselect";
5
- // in Liste und Karte hervorheben bei Mouse-Hover
6
- export const FEATURE_SELECTION_HIGHLIGHT = "highlight";
7
-
8
- // Attention! With respect to the map icon state this is an ordered collection. The map vector style will only correspond to that set state with the highest priority, ie. the one which has been mentioned first.
9
- export default {
10
- [FEATURE_SELECTION_SELECT]: {max: 1},
11
- [FEATURE_SELECTION_HIGHLIGHT]: {max: 1},
12
- [FEATURE_SELECTION_PRESELECT]: {max: 1},
13
- };
@@ -1,77 +0,0 @@
1
- import type {FeatureSourceState} from "@mapsight/core/lib/feature-sources/types";
2
-
3
- export {TIME_FILTER, TAG_FILTER} from "../constants/controllers";
4
-
5
- /**
6
- * Create an empty feature source that can be filled using actions
7
- * and cannot not load features itself.
8
- *
9
- * @returns config for a plain feature source
10
- */
11
- export function plain(): FeatureSourceState {
12
- return {
13
- type: "noop" as const,
14
- data: null,
15
- lastUpdate: null,
16
- lastActionType: null,
17
- };
18
- }
19
-
20
- /**
21
- * Create a feature source that loads data from a remote url.
22
- *
23
- * @param url url to fetch data from
24
- * @returns config for a xhr json feature source
25
- */
26
- export function xhrJson(url: string): FeatureSourceState {
27
- return {
28
- type: "xhr-json" as const,
29
- url: url,
30
- data: null,
31
- lastUpdate: null,
32
- lastActionType: null,
33
- };
34
- }
35
-
36
- /**
37
- * Create a feature source that fetches data from a remote url.
38
- *
39
- * Additionally, it will fetch the data every {timer} milliseconds.
40
- *
41
- * @param url url to fetch data from
42
- * @param timer time in milliseconds to fetch new data
43
- * @returns config for a xhr json feature source that will refresh regularly
44
- */
45
- export function xhrJsonRefreshing(
46
- url: string,
47
- timer: number,
48
- ): FeatureSourceState {
49
- return {
50
- type: "xhr-json" as const,
51
- url: url,
52
- doRefresh: true,
53
- timer: timer,
54
- data: null,
55
- lastUpdate: null,
56
- lastActionType: null,
57
- };
58
- }
59
-
60
- /**
61
- * add a filter to the definition of a feature source.
62
- *
63
- * may be used iteratively.
64
- *
65
- * @param featureSource definition to extend by filterName
66
- * @param filterName name of filter to add to the filter collection. The feature filter will be applied when using the appropriate feature source selectors.
67
- * @returns extended definition of feature source
68
- */
69
- export function withFilter(
70
- featureSource: Partial<FeatureSourceState>,
71
- filterName: string,
72
- ): Partial<FeatureSourceState> {
73
- return {
74
- ...featureSource,
75
- filters: [...(featureSource.filters || []), filterName],
76
- };
77
- }
@@ -1,133 +0,0 @@
1
- import type {Coordinate} from "ol/coordinate";
2
- import type {Extent} from "ol/extent";
3
- import type {ProjectionLike} from "ol/proj";
4
-
5
- import type {FeatureSourceState} from "@mapsight/core/lib/feature-sources/types";
6
- import type {FeatureInteractions} from "@mapsight/core/lib/map/lib/WithFeatureInteractions";
7
- import type {LayerDefinition} from "@mapsight/core/lib/map/lib/WithLayers";
8
- import type {Options} from "@mapsight/core/lib/map/types";
9
-
10
- import {
11
- FEATURE_LIST,
12
- FEATURE_SELECTIONS,
13
- FEATURE_SOURCES,
14
- MAP,
15
- PROJECTIONS,
16
- TIME_FILTER,
17
- } from "./constants/controllers";
18
- import featureSelections, {
19
- FEATURE_SELECTION_HIGHLIGHT,
20
- FEATURE_SELECTION_SELECT,
21
- } from "./feature/selections";
22
- import createFeatureInteractions from "./map/featureInteractions";
23
- import mapInteractions from "./map/interactions";
24
-
25
- export const defaultProjections: Array<ProjectionLike> = [];
26
-
27
- export function mapViewCenter(x: number, y: number): Coordinate {
28
- return [x, y];
29
- }
30
-
31
- export function mapViewExtent(
32
- minx: number,
33
- miny: number,
34
- maxx: number,
35
- maxy: number,
36
- ): Extent {
37
- return [minx, miny, maxx, maxy];
38
- }
39
-
40
- export function mapView(
41
- center: Coordinate,
42
- extent: Extent,
43
- zoom = 13,
44
- minZoom = 5,
45
- maxZoom = 18,
46
- ): Options {
47
- return {
48
- center: center,
49
- extent: extent,
50
- zoom: zoom,
51
- minZoom: minZoom,
52
- maxZoom: maxZoom,
53
- };
54
- }
55
-
56
- // FIXME need function for layers
57
-
58
- export function map(
59
- layers: Record<string, LayerDefinition>,
60
- view: Options,
61
- projections = defaultProjections,
62
- visible = false,
63
- featureInteractions: FeatureInteractions = createFeatureInteractions(),
64
- ) {
65
- if (!projections) {
66
- projections = defaultProjections;
67
- }
68
-
69
- return {
70
- [MAP]: {
71
- layers: layers,
72
- moveTolerance: 2,
73
- interactions: mapInteractions,
74
- featureInteractions: featureInteractions,
75
- view: view,
76
- visible: visible,
77
- },
78
- [PROJECTIONS]: projections,
79
- };
80
- }
81
-
82
- export function features(
83
- featureSources: Record<string, Partial<FeatureSourceState>>,
84
- ) {
85
- return {
86
- [FEATURE_SELECTIONS]: featureSelections,
87
- [FEATURE_SOURCES]: featureSources,
88
- };
89
- }
90
-
91
- // TODO derzeit ist nur eine Liste erlaubt!
92
- export function featureList(featureSourceName: string, visible = false) {
93
- return {
94
- [FEATURE_LIST]: {
95
- visible: visible,
96
- featureSource: featureSourceName,
97
- featureSelectionHighlight: FEATURE_SELECTION_HIGHLIGHT,
98
- featureSelectionSelect: FEATURE_SELECTION_SELECT,
99
- },
100
- };
101
- }
102
-
103
- export function timeFilter(visible = false) {
104
- return {
105
- [TIME_FILTER]: {
106
- // TODO dies gehört nicht in diese js/config und nicht in die
107
- // Eigenschaften des TimeFilter-FilterController, sondern in den uiState
108
- visible: visible,
109
- },
110
- };
111
- }
112
-
113
- export function defaultTopOffsetForView(_view: string) {
114
- return 0;
115
- }
116
-
117
- /** @type {import('../types').SiteConfig} */
118
- export const siteConfig = {
119
- /** base url of app. this must be set for server-side rendering and is not used when run in browser */
120
- baseUrl: "//set this for server based rendering//",
121
-
122
- /** images base url */
123
- imagesUrl: "/images/",
124
-
125
- /** search api url for feature search */
126
- searchUrl: "/poi-search-api/",
127
-
128
- /** search api query parameter for feature search */
129
- searchQueryParameter: "query",
130
-
131
- /** function to get top offset for the given view */
132
- topOffsetForView: defaultTopOffsetForView,
133
- };
@@ -1,53 +0,0 @@
1
- import type {FeatureInteractions} from "@mapsight/core/lib/map/lib/WithFeatureInteractions";
2
-
3
- export default function createFeatureInteractions({
4
- hitTolerance = 5,
5
- deselectUncontrolledOnClick = null,
6
- }: {
7
- hitTolerance?: number;
8
- deselectUncontrolledOnClick?: Array<string> | null;
9
- } = {}): FeatureInteractions {
10
- return {
11
- mouseover: {
12
- selection: "mouseover",
13
- options: {
14
- // mouse event button
15
- main: true,
16
- auxiliary: false,
17
- secondary: false,
18
- fourth: false,
19
- fifth: false,
20
-
21
- // options
22
- cursor: "pointer",
23
- deselectUncontrolled: null,
24
- hitTolerance: hitTolerance,
25
- },
26
- },
27
-
28
- mousedown: {
29
- selection: "mousedown",
30
- options: {
31
- // mouse event button
32
- main: true,
33
- auxiliary: false,
34
- secondary: false,
35
- fourth: false,
36
- fifth: false,
37
-
38
- // options
39
- deselectUncontrolled: deselectUncontrolledOnClick,
40
- hitTolerance: hitTolerance,
41
- },
42
- },
43
-
44
- touch: {
45
- selection: "touch",
46
- options: {
47
- // options
48
- deselectUncontrolled: deselectUncontrolledOnClick,
49
- hitTolerance: hitTolerance,
50
- },
51
- },
52
- };
53
- }
@@ -1,15 +0,0 @@
1
- import type {Description} from "@mapsight/core/ol-proxy";
2
-
3
- const INTERACTIONS: Record<string, Description> = {
4
- DragPan: {
5
- type: "DragPanInteraction",
6
- options: {kinetic: [-0.005, 0.05, 100]},
7
- },
8
- PinchZoom: {type: "PinchZoomInteraction"},
9
- DoubleClickZoom: {type: "DoubleClickZoomInteraction"},
10
- MouseWheelZoom: {type: "MouseWheelZoomInteraction"},
11
- KeyboardPan: {type: "KeyboardPanInteraction"},
12
- KeyboardZoom: {type: "KeyboardZoomInteraction"},
13
- };
14
-
15
- export default INTERACTIONS;
@@ -1,190 +0,0 @@
1
- import type {ProjectionLike} from "ol/proj";
2
-
3
- import type {
4
- Description,
5
- LayerMetaData,
6
- OptionValue,
7
- Options,
8
- } from "@mapsight/core/lib/map/types";
9
-
10
- import type {MapsightStyleFunctionEnv} from "@mapsight/lib-ol/style/styleFunction";
11
-
12
- import {FEATURE_SELECTIONS, FEATURE_SOURCES} from "../constants/controllers";
13
- import {
14
- FEATURE_SELECTION_HIGHLIGHT,
15
- FEATURE_SELECTION_SELECT,
16
- } from "../feature/selections";
17
-
18
- export function features(
19
- featureSourceId: string,
20
- visible = false,
21
- interactive = false,
22
- _metaData: LayerMetaData = {},
23
- style: string | MapsightStyleFunctionEnv = "features",
24
- sourceOptions?: Options,
25
- ): Description {
26
- return {
27
- type: "VectorLayer",
28
- options: {
29
- visible: visible,
30
- style: style as OptionValue,
31
- //updateWhileAnimating: true,
32
- //updateWhileInteracting: true,
33
- renderBuffer: 200,
34
- source: {
35
- type: "VectorFeatureSource",
36
- options: {
37
- featureSourceId,
38
- featureSourcesControllerName: FEATURE_SOURCES,
39
- featureSelectionsControllerName: FEATURE_SELECTIONS,
40
- ...sourceOptions,
41
- },
42
- },
43
- selections: !interactive
44
- ? {}
45
- : {
46
- //'second-touch': FEATURE_SELECTION_SELECT,
47
- //touch: FEATURE_SELECTION_HIGHLIGHT,
48
- mousedown: FEATURE_SELECTION_SELECT,
49
- touch: FEATURE_SELECTION_SELECT,
50
- mouseover: FEATURE_SELECTION_HIGHLIGHT,
51
- },
52
- },
53
- metaData: _metaData,
54
- };
55
- }
56
-
57
- export function interactiveFeatures(
58
- featureSourceId,
59
- visible = false,
60
- _metaData = {},
61
- style: string | MapsightStyleFunctionEnv = "features",
62
- sourceOptions?: Options,
63
- ) {
64
- return features(
65
- featureSourceId,
66
- visible,
67
- true,
68
- _metaData,
69
- style,
70
- sourceOptions,
71
- );
72
- }
73
-
74
- export function userGeolocation(
75
- featureSourceId: string,
76
- visible = false,
77
- _metaData: LayerMetaData = {},
78
- style: string | MapsightStyleFunctionEnv = "userGeolocation",
79
- sourceOptions?: Options,
80
- ) {
81
- const base = features(
82
- featureSourceId,
83
- visible,
84
- false,
85
- _metaData,
86
- style,
87
- sourceOptions,
88
- );
89
-
90
- return {
91
- ...base,
92
- options: {
93
- ...base.options,
94
- updateWhileAnimating: true,
95
- updateWhileInteracting: true,
96
- renderBuffer: 400,
97
- },
98
- };
99
- }
100
-
101
- export function osm(url: string, visible = false, _metaData = {}) {
102
- return {
103
- type: "TileLayer",
104
- metaData: _metaData,
105
- options: {
106
- source: {
107
- type: "OsmSource",
108
- options: {url},
109
- },
110
- visible,
111
- },
112
- };
113
- }
114
-
115
- export function wms(
116
- url: string,
117
- params = {},
118
- projection: ProjectionLike = "ESPG:3857",
119
- visible = false,
120
- _metaData: LayerMetaData = {},
121
- opacity?: number,
122
- ) {
123
- return {
124
- type: "TileLayer",
125
- metaData: _metaData,
126
- options: {
127
- source: {
128
- type: "TileWMSSource",
129
- options: {
130
- projection,
131
- url,
132
- params,
133
- },
134
- },
135
- visible,
136
- opacity,
137
- },
138
- };
139
- }
140
-
141
- // TODO metadata auftrennen in metaData, withAttribution() und withLegend()
142
- export function metaData(
143
- title: string,
144
- attribution: string | null = null,
145
- visibleInLayerSwitcher = false,
146
- visibleInExternalLayerSwitcher = false,
147
- isBaseLayer = false,
148
- group: string | null = null,
149
- lockedInLayerSwitcher = undefined,
150
- ): LayerMetaData {
151
- return {
152
- title,
153
- attribution: attribution ?? undefined,
154
- visibleInLayerSwitcher,
155
- visibleInExternalLayerSwitcher,
156
- group: group ?? undefined,
157
- isBaseLayer,
158
- lockedInLayerSwitcher, // users can't change layer's visbility TODO this has to be implemented
159
- };
160
- }
161
-
162
- export function metaDataWithAttribution(
163
- _metaData: LayerMetaData = {},
164
- attribution: string,
165
- ): LayerMetaData {
166
- return {
167
- ..._metaData,
168
- attribution: attribution,
169
- };
170
- }
171
-
172
- export function metaDataWithLegend(
173
- _metaData: LayerMetaData = {},
174
- legend,
175
- ): LayerMetaData {
176
- return {
177
- ..._metaData,
178
- legend: legend,
179
- };
180
- }
181
-
182
- export function metaDataWithMiniLegend(
183
- _metaData: LayerMetaData = {},
184
- miniLegend,
185
- ): LayerMetaData {
186
- return {
187
- ..._metaData,
188
- miniLegend: miniLegend,
189
- };
190
- }
@@ -1,36 +0,0 @@
1
- import type {BaseController} from "@mapsight/core/lib/base/controller";
2
- import {FeatureSelectionsController} from "@mapsight/core/lib/feature-selections/controller";
3
- import {FeatureSourcesController} from "@mapsight/core/lib/feature-sources/controller";
4
- import {FilterController} from "@mapsight/core/lib/filter/controller";
5
- import {ListController} from "@mapsight/core/lib/list/controller";
6
- import {MapController} from "@mapsight/core/lib/map/controller";
7
- import {ProjectionsController} from "@mapsight/core/lib/projections/controller";
8
- import {UserGeolocationController} from "@mapsight/core/lib/user-geolocation/controller";
9
-
10
- import * as c from "../config/constants/controllers";
11
- import {createTagFilterFunction} from "../filters/tag-filter";
12
- import timeFilter from "../filters/time-filter";
13
- import type {MapsightUiContext} from "../types";
14
-
15
- export function createDefaultControllers(
16
- context: MapsightUiContext,
17
- ): Record<string, BaseController> {
18
- const mapController = new MapController(c.MAP);
19
- mapController.setStyleFunction(context.styleFunction);
20
-
21
- return {
22
- [c.PROJECTIONS]: new ProjectionsController(c.PROJECTIONS),
23
- [c.MAP]: mapController,
24
- [c.FEATURE_LIST]: new ListController(c.FEATURE_LIST),
25
- [c.TIME_FILTER]: new FilterController(c.TIME_FILTER, timeFilter),
26
- [c.TAG_FILTER]: new FilterController(
27
- c.TAG_FILTER,
28
- createTagFilterFunction(),
29
- ),
30
- [c.USER_GEOLOCATION]: new UserGeolocationController(c.USER_GEOLOCATION),
31
- [c.FEATURE_SOURCES]: new FeatureSourcesController(c.FEATURE_SOURCES),
32
- [c.FEATURE_SELECTIONS]: new FeatureSelectionsController(
33
- c.FEATURE_SELECTIONS,
34
- ),
35
- };
36
- }