@mapsight/ui 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -2
- package/dist/components/app.d.ts +1 -1
- package/dist/components/app.d.ts.map +1 -1
- package/dist/components/feature-details-content/feature-details-content.d.ts +1 -1
- package/dist/components/feature-details-content/feature-details-content.d.ts.map +1 -1
- package/dist/components/feature-details-content/index.d.ts +1 -1
- package/dist/components/feature-details-content/share-feature-link-modal.d.ts +1 -1
- package/dist/components/feature-details-content/share-feature-link-modal.d.ts.map +1 -1
- package/dist/components/feature-list/context.d.ts +12 -4
- package/dist/components/feature-list/context.d.ts.map +1 -1
- package/dist/components/feature-list/context.js.map +1 -1
- package/dist/components/feature-list/empty-message.d.ts +1 -1
- package/dist/components/feature-list/empty-message.d.ts.map +1 -1
- package/dist/components/feature-list/filter.d.ts +1 -1
- package/dist/components/feature-list/filter.d.ts.map +1 -1
- package/dist/components/feature-list/footer.d.ts +1 -1
- package/dist/components/feature-list/footer.d.ts.map +1 -1
- package/dist/components/feature-list/hooks/useAutoloadFeatureSource.d.ts.map +1 -1
- package/dist/components/feature-list/hooks/useAutoloadFeatureSource.js +12 -3
- package/dist/components/feature-list/hooks/useAutoloadFeatureSource.js.map +1 -1
- package/dist/components/feature-list/index.d.ts +3 -2
- package/dist/components/feature-list/index.d.ts.map +1 -1
- package/dist/components/feature-list/index.js +30 -42
- package/dist/components/feature-list/index.js.map +1 -1
- package/dist/components/feature-list/pagination.d.ts +1 -1
- package/dist/components/feature-list/pagination.d.ts.map +1 -1
- package/dist/components/feature-list/query-input.d.ts +1 -1
- package/dist/components/feature-list/query-input.d.ts.map +1 -1
- package/dist/components/feature-list/tag-switcher-control.d.ts +4 -0
- package/dist/components/feature-list/tag-switcher-control.d.ts.map +1 -0
- package/dist/components/feature-list/tag-switcher-control.js +10 -0
- package/dist/components/feature-list/tag-switcher-control.js.map +1 -0
- package/dist/components/feature-list-cycling/button.d.ts +1 -1
- package/dist/components/feature-list-cycling/button.d.ts.map +1 -1
- package/dist/components/feature-list-cycling/dot.d.ts +1 -1
- package/dist/components/feature-list-cycling/dot.d.ts.map +1 -1
- package/dist/components/feature-list-cycling/feature-list-cycling.d.ts +1 -1
- package/dist/components/feature-list-cycling/feature-list-cycling.d.ts.map +1 -1
- package/dist/components/feature-list-cycling/index.d.ts +1 -1
- package/dist/components/feature-list-item/icon.d.ts +8 -6
- package/dist/components/feature-list-item/icon.d.ts.map +1 -1
- package/dist/components/feature-list-item/icon.js +5 -13
- package/dist/components/feature-list-item/icon.js.map +1 -1
- package/dist/components/feature-list-item/index.d.ts +1 -1
- package/dist/components/feature-list-item/index.d.ts.map +1 -1
- package/dist/components/feature-list-sorting/feature-list-sorting.d.ts +1 -1
- package/dist/components/feature-list-sorting/feature-list-sorting.d.ts.map +1 -1
- package/dist/components/feature-list-sorting/feature-list-sorting.js +3 -12
- package/dist/components/feature-list-sorting/feature-list-sorting.js.map +1 -1
- package/dist/components/feature-list-sorting/index.d.ts +1 -1
- package/dist/components/feature-list-sorting/status-indicator.d.ts +1 -1
- package/dist/components/feature-list-sorting/status-indicator.d.ts.map +1 -1
- package/dist/components/feature-select-button.d.ts +1 -1
- package/dist/components/feature-select-button.d.ts.map +1 -1
- package/dist/components/feature-selection-info/close-button.d.ts +1 -1
- package/dist/components/feature-selection-info/close-button.d.ts.map +1 -1
- package/dist/components/feature-selection-info/container.d.ts +1 -1
- package/dist/components/feature-selection-info/container.d.ts.map +1 -1
- package/dist/components/feature-selection-info/header.d.ts +1 -1
- package/dist/components/feature-selection-info/header.d.ts.map +1 -1
- package/dist/components/feature-selection-info/index.d.ts +1 -1
- package/dist/components/feature-selection-info/index.d.ts.map +1 -1
- package/dist/components/feature-selection-info/with-sticky-header.d.ts +1 -1
- package/dist/components/feature-selection-info/with-sticky-header.d.ts.map +1 -1
- package/dist/components/feature-selection-info/without-sticky-header.d.ts +1 -1
- package/dist/components/feature-selection-info/without-sticky-header.d.ts.map +1 -1
- package/dist/components/filter-toggle-control/FilterToggleControl.d.ts +12 -0
- package/dist/components/filter-toggle-control/FilterToggleControl.d.ts.map +1 -0
- package/dist/components/filter-toggle-control/FilterToggleControl.js +20 -0
- package/dist/components/filter-toggle-control/FilterToggleControl.js.map +1 -0
- package/dist/components/helping/app-channel.d.ts +1 -1
- package/dist/components/helping/app-channel.d.ts.map +1 -1
- package/dist/components/helping/app-context.d.ts +1 -1
- package/dist/components/helping/app-context.d.ts.map +1 -1
- package/dist/components/instance.d.ts +1 -1
- package/dist/components/instance.d.ts.map +1 -1
- package/dist/components/layer-switcher/GroupedLayerSwitcher.d.ts +1 -1
- package/dist/components/layer-switcher/LayerSwitcher.d.ts +1 -1
- package/dist/components/layer-switcher/LayerSwitcherContainer.d.ts +3 -2
- package/dist/components/layer-switcher/LayerSwitcherContainer.d.ts.map +1 -1
- package/dist/components/layer-switcher/LayerSwitcherContainer.js +2 -2
- package/dist/components/layer-switcher/LayerSwitcherContainer.js.map +1 -1
- package/dist/components/layer-switcher/LayerSwitcherEntry.d.ts +1 -1
- package/dist/components/layer-switcher/index.d.ts +1 -1
- package/dist/components/layer-switcher/index.js.map +1 -1
- package/dist/components/layout/additional-container/content.d.ts +1 -1
- package/dist/components/layout/additional-container/content.d.ts.map +1 -1
- package/dist/components/layout/additional-container/index.d.ts +1 -1
- package/dist/components/layout/additional-container/index.d.ts.map +1 -1
- package/dist/components/layout/additional-container/marginal.d.ts +1 -1
- package/dist/components/layout/additional-container/marginal.d.ts.map +1 -1
- package/dist/components/layout/main-container.d.ts +1 -1
- package/dist/components/layout/main-container.d.ts.map +1 -1
- package/dist/components/layout/map-row.d.ts +1 -1
- package/dist/components/layout/map-row.d.ts.map +1 -1
- package/dist/components/layout/title-bar.d.ts +1 -1
- package/dist/components/layout/title-bar.d.ts.map +1 -1
- package/dist/components/layout/wrapper.d.ts +1 -1
- package/dist/components/layout/wrapper.d.ts.map +1 -1
- package/dist/components/link-share.d.ts +1 -1
- package/dist/components/link-share.d.ts.map +1 -1
- package/dist/components/main-panel/container.d.ts +1 -1
- package/dist/components/main-panel/container.d.ts.map +1 -1
- package/dist/components/main-panel/context.d.ts +1 -1
- package/dist/components/main-panel/context.d.ts.map +1 -1
- package/dist/components/main-panel/index.d.ts +1 -1
- package/dist/components/main-panel/index.d.ts.map +1 -1
- package/dist/components/main-panel/list-toggle-button.d.ts +1 -1
- package/dist/components/main-panel/list-toggle-button.d.ts.map +1 -1
- package/dist/components/map-overlay/attribution-entries.d.ts +1 -1
- package/dist/components/map-overlay/attribution-entries.d.ts.map +1 -1
- package/dist/components/map-overlay/attribution.d.ts +1 -1
- package/dist/components/map-overlay/attribution.d.ts.map +1 -1
- package/dist/components/map-overlay/combined-buttons.d.ts +1 -1
- package/dist/components/map-overlay/combined-buttons.d.ts.map +1 -1
- package/dist/components/map-overlay/index.d.ts +1 -1
- package/dist/components/map-overlay/index.d.ts.map +1 -1
- package/dist/components/map-overlay/info-overlay-left.d.ts +1 -1
- package/dist/components/map-overlay/info-overlay-left.d.ts.map +1 -1
- package/dist/components/map-overlay/info-overlay-modal.d.ts +1 -1
- package/dist/components/map-overlay/info-overlay-modal.d.ts.map +1 -1
- package/dist/components/map-overlay/info-overlay-right.d.ts +1 -1
- package/dist/components/map-overlay/info-overlay-right.d.ts.map +1 -1
- package/dist/components/map-overlay/layer-switcher-overlay.d.ts +1 -1
- package/dist/components/map-overlay/layer-switcher-overlay.d.ts.map +1 -1
- package/dist/components/map-overlay/legend.d.ts +1 -1
- package/dist/components/map-overlay/legend.d.ts.map +1 -1
- package/dist/components/map-overlay/logo.d.ts +1 -1
- package/dist/components/map-overlay/logo.d.ts.map +1 -1
- package/dist/components/map-overlay/measure-distance-button.d.ts +1 -1
- package/dist/components/map-overlay/measure-distance-button.d.ts.map +1 -1
- package/dist/components/map-overlay/measure-distance-overlay.d.ts +1 -1
- package/dist/components/map-overlay/measure-distance-overlay.d.ts.map +1 -1
- package/dist/components/map-overlay/search-overlay.d.ts +1 -1
- package/dist/components/map-overlay/search-overlay.d.ts.map +1 -1
- package/dist/components/map-overlay/share-position-link-button.d.ts +1 -1
- package/dist/components/map-overlay/share-position-link-button.d.ts.map +1 -1
- package/dist/components/map-overlay/tool-overlay.d.ts +1 -1
- package/dist/components/map-overlay/tool-overlay.d.ts.map +1 -1
- package/dist/components/map-overlay/zoom-buttons.d.ts +1 -1
- package/dist/components/map-overlay/zoom-buttons.d.ts.map +1 -1
- package/dist/components/map-synced-interlay/index.d.ts +1 -1
- package/dist/components/map-synced-interlay/map-synced-interlay.d.ts +1 -1
- package/dist/components/map-synced-interlay/map-synced-interlay.d.ts.map +1 -1
- package/dist/components/map-synced-interlay/tooltip.d.ts +1 -1
- package/dist/components/map-synced-interlay/tooltip.d.ts.map +1 -1
- package/dist/components/map-wrapper.d.ts +3 -3
- package/dist/components/map-wrapper.d.ts.map +1 -1
- package/dist/components/map-wrapper.js +4 -7
- package/dist/components/map-wrapper.js.map +1 -1
- package/dist/components/map.d.ts +1 -1
- package/dist/components/map.d.ts.map +1 -1
- package/dist/components/mapsight-icon/mapsight-icon.d.ts +10 -0
- package/dist/components/mapsight-icon/mapsight-icon.d.ts.map +1 -0
- package/dist/components/mapsight-icon/mapsight-icon.js +33 -0
- package/dist/components/mapsight-icon/mapsight-icon.js.map +1 -0
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/modal.d.ts.map +1 -1
- package/dist/components/query-input-with-label.d.ts +1 -1
- package/dist/components/query-input-with-label.d.ts.map +1 -1
- package/dist/components/search/index.d.ts +1 -1
- package/dist/components/search/index.d.ts.map +1 -1
- package/dist/components/search/result-entry.d.ts +1 -1
- package/dist/components/search/result-entry.d.ts.map +1 -1
- package/dist/components/search/result.d.ts +1 -1
- package/dist/components/search/result.d.ts.map +1 -1
- package/dist/components/switcher/GroupedSwitcher.d.ts +1 -1
- package/dist/components/switcher/GroupedSwitcher.d.ts.map +1 -1
- package/dist/components/switcher/Switcher.d.ts +1 -1
- package/dist/components/switcher/Switcher.d.ts.map +1 -1
- package/dist/components/switcher/SwitcherButton.d.ts +1 -1
- package/dist/components/switcher/SwitcherButton.d.ts.map +1 -1
- package/dist/components/switcher/SwitcherEntry.d.ts +1 -1
- package/dist/components/switcher/SwitcherEntry.d.ts.map +1 -1
- package/dist/components/switcher/SwitcherHeader.d.ts +1 -1
- package/dist/components/switcher/SwitcherHeader.d.ts.map +1 -1
- package/dist/components/switcher/SwitcherStatusIcon.d.ts +1 -1
- package/dist/components/switcher/SwitcherStatusIcon.d.ts.map +1 -1
- package/dist/components/tag-switcher/TagSwitcher.d.ts +1 -1
- package/dist/components/tag-switcher/TagSwitcher.d.ts.map +1 -1
- package/dist/components/tag-switcher/createTagSwitcherEntry.d.ts +1 -1
- package/dist/components/tag-switcher/createTagSwitcherHeader.d.ts +1 -1
- package/dist/components/tag-switcher/index.d.ts +1 -1
- package/dist/components/time-filter.d.ts +1 -1
- package/dist/components/time-filter.d.ts.map +1 -1
- package/dist/components/view-toggle-button/desktop-button.d.ts +1 -1
- package/dist/components/view-toggle-button/desktop-button.d.ts.map +1 -1
- package/dist/components/view-toggle-button/index.d.ts +1 -1
- package/dist/components/view-toggle-button/mobile-button.d.ts +1 -1
- package/dist/components/view-toggle-button/mobile-button.d.ts.map +1 -1
- package/dist/components/view-toggle-button/view-toggle-button.d.ts +1 -1
- package/dist/components/view-toggle-button/view-toggle-button.d.ts.map +1 -1
- package/dist/components/view-toggle-button/viewport-button.d.ts +1 -1
- package/dist/components/view-toggle-button/viewport-button.d.ts.map +1 -1
- package/dist/config/feature/sources.d.ts +8 -5
- package/dist/config/feature/sources.d.ts.map +1 -1
- package/dist/config/feature/sources.js +10 -0
- package/dist/config/feature/sources.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/map/featureInteractions.js.map +1 -1
- package/dist/config/map/layers.d.ts +16 -13
- package/dist/config/map/layers.d.ts.map +1 -1
- package/dist/config/map/layers.js.map +1 -1
- package/dist/config/schema/index.d.ts +195 -0
- package/dist/config/schema/index.d.ts.map +1 -0
- package/dist/config/schema/index.js +26 -0
- package/dist/config/schema/index.js.map +1 -0
- package/dist/config/schema/validate.d.ts +8 -0
- package/dist/config/schema/validate.d.ts.map +1 -0
- package/dist/config/schema/validate.js +7 -0
- package/dist/config/schema/validate.js.map +1 -0
- package/dist/controllers/defaults.d.ts.map +1 -1
- package/dist/controllers/defaults.js +5 -0
- package/dist/controllers/defaults.js.map +1 -1
- package/dist/filters/tag-filter.d.ts +7 -0
- package/dist/filters/tag-filter.d.ts.map +1 -1
- package/dist/filters/tag-filter.js +10 -0
- package/dist/filters/tag-filter.js.map +1 -1
- package/dist/filters/time-filter.d.ts +9 -0
- package/dist/filters/time-filter.d.ts.map +1 -1
- package/dist/filters/time-filter.js +10 -0
- package/dist/filters/time-filter.js.map +1 -1
- package/dist/helpers/i18n/de.d.ts.map +1 -1
- package/dist/helpers/i18n/de.js +1 -0
- package/dist/helpers/i18n/de.js.map +1 -1
- package/dist/helpers/i18n/en.d.ts.map +1 -1
- package/dist/helpers/i18n/en.js +1 -0
- package/dist/helpers/i18n/en.js.map +1 -1
- package/dist/helpers/sort-features-by-distance.d.ts +2 -7
- package/dist/helpers/sort-features-by-distance.d.ts.map +1 -1
- package/dist/helpers/sort-features-by-distance.js +27 -39
- package/dist/helpers/sort-features-by-distance.js.map +1 -1
- package/dist/hooks/useMapsightIcon.d.ts +8 -0
- package/dist/hooks/useMapsightIcon.d.ts.map +1 -0
- package/dist/hooks/useMapsightIcon.js +50 -0
- package/dist/hooks/useMapsightIcon.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/plugins/browser-defaults.d.ts +2 -0
- package/dist/plugins/browser-defaults.d.ts.map +1 -1
- package/dist/plugins/browser-defaults.js +5 -0
- package/dist/plugins/browser-defaults.js.map +1 -1
- package/dist/plugins/common/combined-visible-layers.d.ts +15 -0
- package/dist/plugins/common/combined-visible-layers.d.ts.map +1 -0
- package/dist/plugins/common/combined-visible-layers.js +63 -0
- package/dist/plugins/common/combined-visible-layers.js.map +1 -0
- package/dist/plugins/common/runtime-icon-style.d.ts +12 -0
- package/dist/plugins/common/runtime-icon-style.d.ts.map +1 -0
- package/dist/plugins/common/runtime-icon-style.js +58 -0
- package/dist/plugins/common/runtime-icon-style.js.map +1 -0
- package/dist/react-modal-app-element.d.ts +6 -0
- package/dist/react-modal-app-element.d.ts.map +1 -0
- package/dist/react-modal-app-element.js +9 -0
- package/dist/react-modal-app-element.js.map +1 -0
- package/dist/store/actions.d.ts.map +1 -1
- package/dist/store/actions.js +6 -1
- package/dist/store/actions.js.map +1 -1
- package/dist/store/reducers.d.ts +8 -6
- package/dist/store/reducers.d.ts.map +1 -1
- package/dist/store/selectors.d.ts +10 -17
- package/dist/store/selectors.d.ts.map +1 -1
- package/dist/store/selectors.js +9 -1
- package/dist/store/selectors.js.map +1 -1
- package/dist/types.d.ts +19 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +24 -8
- package/src/scss/blocks/_features-sorting.scss +0 -13
- package/src/scss/blocks/_filter-button.scss +23 -0
- package/src/scss/blocks/_filter-toggle-control.scss +15 -0
- package/src/scss/default.scss +1 -0
- package/src/img/mapsight-ui/check-empty.svg +0 -1
- package/src/img/mapsight-ui/check.svg +0 -2
- package/src/img/mapsight-ui/close-list.svg +0 -1
- package/src/img/mapsight-ui/close.svg +0 -1
- package/src/img/mapsight-ui/error.svg +0 -1
- package/src/img/mapsight-ui/fullscreen-close.svg +0 -1
- package/src/img/mapsight-ui/fullscreen.svg +0 -1
- package/src/img/mapsight-ui/geo-active.svg +0 -1
- package/src/img/mapsight-ui/geo-error.svg +0 -1
- package/src/img/mapsight-ui/geo-inactive.svg +0 -1
- package/src/img/mapsight-ui/info.svg +0 -1
- package/src/img/mapsight-ui/layers.svg +0 -1
- package/src/img/mapsight-ui/loading.svg +0 -1
- package/src/img/mapsight-ui/map.svg +0 -1
- package/src/img/mapsight-ui/measure-distance.svg +0 -7
- package/src/img/mapsight-ui/open-list.svg +0 -1
- package/src/img/mapsight-ui/place-marker.svg +0 -4
- package/src/img/mapsight-ui/print.svg +0 -4
- package/src/img/mapsight-ui/reset-active.svg +0 -1
- package/src/img/mapsight-ui/reset.svg +0 -1
- package/src/img/mapsight-ui/search.svg +0 -1
- package/src/img/mapsight-ui/sharing.svg +0 -7
- package/src/img/mapsight-ui/sort-active.svg +0 -1
- package/src/img/mapsight-ui/sort.svg +0 -1
- package/src/img/mapsight-ui/watermark.svg +0 -1
- package/src/img/mapsight-ui/zoom-in.svg +0 -3
- package/src/img/mapsight-ui/zoom-out.svg +0 -3
- package/src/js/components/app.tsx +0 -232
- package/src/js/components/close-overlay-button.tsx +0 -27
- package/src/js/components/feature-details-content/feature-details-content-inner.tsx +0 -116
- package/src/js/components/feature-details-content/feature-details-content.jsx +0 -185
- package/src/js/components/feature-details-content/index.js +0 -16
- package/src/js/components/feature-details-content/share-feature-link-modal.jsx +0 -56
- package/src/js/components/feature-list/content.jsx +0 -42
- package/src/js/components/feature-list/context.tsx +0 -47
- package/src/js/components/feature-list/empty-message.jsx +0 -15
- package/src/js/components/feature-list/filter.jsx +0 -35
- package/src/js/components/feature-list/footer.jsx +0 -5
- package/src/js/components/feature-list/grouped-content.jsx +0 -74
- package/src/js/components/feature-list/header.jsx +0 -7
- package/src/js/components/feature-list/hooks/useAutoloadFeatureSource.ts +0 -25
- package/src/js/components/feature-list/hooks/useFeatureListFeatureSource.ts +0 -22
- package/src/js/components/feature-list/hooks/useFeatureListItemGroups.ts +0 -127
- package/src/js/components/feature-list/hooks/useFeatureListState.ts +0 -98
- package/src/js/components/feature-list/hooks/useKeyboardNavigation.js +0 -112
- package/src/js/components/feature-list/hooks/useMakeHeaderSticky.js +0 -40
- package/src/js/components/feature-list/hooks/usePaginatedFilteredFeatures.ts +0 -129
- package/src/js/components/feature-list/hooks/useRestoreDocumentScroll.js +0 -12
- package/src/js/components/feature-list/hooks/useSelectFeature.js +0 -88
- package/src/js/components/feature-list/index.jsx +0 -278
- package/src/js/components/feature-list/pagination.tsx +0 -57
- package/src/js/components/feature-list/query-input.jsx +0 -14
- package/src/js/components/feature-list-cycling/button.jsx +0 -13
- package/src/js/components/feature-list-cycling/dot.jsx +0 -43
- package/src/js/components/feature-list-cycling/feature-list-cycling.jsx +0 -153
- package/src/js/components/feature-list-cycling/index.js +0 -82
- package/src/js/components/feature-list-item/head.jsx +0 -131
- package/src/js/components/feature-list-item/hooks/useFeatureListItemScrollAndFocus.js +0 -51
- package/src/js/components/feature-list-item/hooks/useFeatureListItemState.ts +0 -75
- package/src/js/components/feature-list-item/icon.jsx +0 -35
- package/src/js/components/feature-list-item/index.jsx +0 -168
- package/src/js/components/feature-list-sorting/feature-list-sorting.tsx +0 -144
- package/src/js/components/feature-list-sorting/index.js +0 -22
- package/src/js/components/feature-list-sorting/status-indicator.jsx +0 -10
- package/src/js/components/feature-select-button.jsx +0 -70
- package/src/js/components/feature-selection-info/close-button.jsx +0 -64
- package/src/js/components/feature-selection-info/container.jsx +0 -9
- package/src/js/components/feature-selection-info/header.tsx +0 -27
- package/src/js/components/feature-selection-info/index.tsx +0 -81
- package/src/js/components/feature-selection-info/with-sticky-header.tsx +0 -76
- package/src/js/components/feature-selection-info/without-sticky-header.jsx +0 -19
- package/src/js/components/feature-selection-info/wrapper.jsx +0 -43
- package/src/js/components/helping/app-channel.tsx +0 -99
- package/src/js/components/helping/app-context.tsx +0 -32
- package/src/js/components/helping/visibility-wrapper.jsx +0 -23
- package/src/js/components/instance.tsx +0 -48
- package/src/js/components/layer-switcher/GroupedLayerSwitcher.js +0 -47
- package/src/js/components/layer-switcher/LayerSwitcher.ts +0 -34
- package/src/js/components/layer-switcher/LayerSwitcherContainer.tsx +0 -88
- package/src/js/components/layer-switcher/LayerSwitcherEntry.ts +0 -152
- package/src/js/components/layer-switcher/index.ts +0 -42
- package/src/js/components/layout/additional-container/content.jsx +0 -10
- package/src/js/components/layout/additional-container/index.jsx +0 -5
- package/src/js/components/layout/additional-container/marginal.jsx +0 -10
- package/src/js/components/layout/main-container.jsx +0 -5
- package/src/js/components/layout/map-row.jsx +0 -5
- package/src/js/components/layout/title-bar.tsx +0 -25
- package/src/js/components/layout/wrapper.jsx +0 -28
- package/src/js/components/link-share.jsx +0 -78
- package/src/js/components/main-panel/container.tsx +0 -23
- package/src/js/components/main-panel/context.tsx +0 -71
- package/src/js/components/main-panel/index.tsx +0 -46
- package/src/js/components/main-panel/list-toggle-button.jsx +0 -43
- package/src/js/components/map-overlay/area.jsx +0 -17
- package/src/js/components/map-overlay/attribution-entries.tsx +0 -33
- package/src/js/components/map-overlay/attribution.tsx +0 -25
- package/src/js/components/map-overlay/combined-buttons.jsx +0 -5
- package/src/js/components/map-overlay/index.jsx +0 -5
- package/src/js/components/map-overlay/info-overlay-left.jsx +0 -51
- package/src/js/components/map-overlay/info-overlay-modal.tsx +0 -49
- package/src/js/components/map-overlay/info-overlay-right.jsx +0 -46
- package/src/js/components/map-overlay/layer-switcher-overlay.tsx +0 -100
- package/src/js/components/map-overlay/legend.tsx +0 -22
- package/src/js/components/map-overlay/logo.jsx +0 -11
- package/src/js/components/map-overlay/measure-distance-button.tsx +0 -116
- package/src/js/components/map-overlay/measure-distance-overlay.jsx +0 -56
- package/src/js/components/map-overlay/mini-legend.jsx +0 -103
- package/src/js/components/map-overlay/region-selector.jsx +0 -63
- package/src/js/components/map-overlay/search-overlay.jsx +0 -79
- package/src/js/components/map-overlay/share-position-link-button.tsx +0 -144
- package/src/js/components/map-overlay/tool-overlay.tsx +0 -28
- package/src/js/components/map-overlay/user-geo-location-button.jsx +0 -89
- package/src/js/components/map-overlay/zoom-button.jsx +0 -98
- package/src/js/components/map-overlay/zoom-buttons.jsx +0 -26
- package/src/js/components/map-synced-interlay/index.ts +0 -15
- package/src/js/components/map-synced-interlay/map-synced-interlay.jsx +0 -22
- package/src/js/components/map-synced-interlay/tooltip-content.tsx +0 -22
- package/src/js/components/map-synced-interlay/tooltip.tsx +0 -199
- package/src/js/components/map-wrapper.tsx +0 -65
- package/src/js/components/map.tsx +0 -55
- package/src/js/components/modal.tsx +0 -40
- package/src/js/components/query-input-with-label.tsx +0 -71
- package/src/js/components/query-input.tsx +0 -81
- package/src/js/components/search/index.jsx +0 -83
- package/src/js/components/search/query-input.jsx +0 -20
- package/src/js/components/search/result-entry.jsx +0 -63
- package/src/js/components/search/result.jsx +0 -71
- package/src/js/components/switcher/GroupedSwitcher.jsx +0 -42
- package/src/js/components/switcher/Switcher.jsx +0 -54
- package/src/js/components/switcher/SwitcherButton.jsx +0 -23
- package/src/js/components/switcher/SwitcherEntry.tsx +0 -164
- package/src/js/components/switcher/SwitcherHeader.jsx +0 -58
- package/src/js/components/switcher/SwitcherStatusIcon.jsx +0 -36
- package/src/js/components/tag-switcher/TagSwitcher.tsx +0 -56
- package/src/js/components/tag-switcher/createTagSwitcherEntry.ts +0 -39
- package/src/js/components/tag-switcher/createTagSwitcherHeader.ts +0 -47
- package/src/js/components/tag-switcher/index.ts +0 -17
- package/src/js/components/time-filter.jsx +0 -187
- package/src/js/components/view-toggle-button/desktop-button.jsx +0 -13
- package/src/js/components/view-toggle-button/index.ts +0 -42
- package/src/js/components/view-toggle-button/mobile-button.tsx +0 -13
- package/src/js/components/view-toggle-button/view-toggle-button.jsx +0 -74
- package/src/js/components/view-toggle-button/viewport-button.tsx +0 -13
- package/src/js/config/constants/app.ts +0 -16
- package/src/js/config/constants/controllers.ts +0 -11
- package/src/js/config/feature/selections.ts +0 -13
- package/src/js/config/feature/sources.ts +0 -77
- package/src/js/config/index.ts +0 -133
- package/src/js/config/map/featureInteractions.ts +0 -53
- package/src/js/config/map/interactions.ts +0 -15
- package/src/js/config/map/layers.ts +0 -190
- package/src/js/controllers/defaults.ts +0 -36
- package/src/js/embed/browser.ts +0 -89
- package/src/js/embed/node.ts +0 -57
- package/src/js/filters/tag-filter.ts +0 -135
- package/src/js/filters/time-filter.ts +0 -53
- package/src/js/helpers/components.ts +0 -66
- package/src/js/helpers/create-action-watcher.ts +0 -35
- package/src/js/helpers/events.ts +0 -11
- package/src/js/helpers/get-feature-property.ts +0 -14
- package/src/js/helpers/i18n/de.ts +0 -145
- package/src/js/helpers/i18n/en.ts +0 -140
- package/src/js/helpers/i18n/index.ts +0 -41
- package/src/js/helpers/makeReplaceableComponent.ts +0 -0
- package/src/js/helpers/mod-classes.ts +0 -47
- package/src/js/helpers/react.ts +0 -14
- package/src/js/helpers/scroll-to-element-top.ts +0 -16
- package/src/js/helpers/sort-features-by-distance.ts +0 -102
- package/src/js/helpers/sticky.js +0 -143
- package/src/js/hooks/useCallbackRef.ts +0 -14
- package/src/js/hooks/useControllableState.ts +0 -50
- package/src/js/hooks/useDebounce.ts +0 -32
- package/src/js/hooks/useHandleEscapeKeyDown.ts +0 -27
- package/src/js/hooks/useMapsightPanel.ts +0 -40
- package/src/js/hooks/useMountable.ts +0 -47
- package/src/js/hooks/usePrevious.ts +0 -15
- package/src/js/hooks/useStickyHeader.ts +0 -50
- package/src/js/hooks/useUpdateMapSizeCallback.ts +0 -32
- package/src/js/hooks/useUpdateMapSizeOnRender.ts +0 -16
- package/src/js/hooks/useUpdateMapSizeOnTransitionEnd.ts +0 -40
- package/src/js/hooks/useUpdateMapSizeOnViewChange.ts +0 -36
- package/src/js/index.ts +0 -320
- package/src/js/plugins/browser/app-title.ts +0 -36
- package/src/js/plugins/browser/debug.ts +0 -37
- package/src/js/plugins/browser/feature-deep-link.ts +0 -223
- package/src/js/plugins/browser/local-storage.ts +0 -79
- package/src/js/plugins/browser/native-fullscreen.ts +0 -81
- package/src/js/plugins/browser/no-scroll.ts +0 -91
- package/src/js/plugins/browser/partial-content-changed-event.ts +0 -23
- package/src/js/plugins/browser/piwik-track-feature-selection-event.ts +0 -75
- package/src/js/plugins/browser/piwik-track-fullscreen-toggle-event.ts +0 -46
- package/src/js/plugins/browser/search.ts +0 -42
- package/src/js/plugins/browser/share-position-link.ts +0 -463
- package/src/js/plugins/browser/toggle-mobile-views.ts +0 -60
- package/src/js/plugins/browser/user-geolocation.ts +0 -142
- package/src/js/plugins/browser/views.ts +0 -141
- package/src/js/plugins/browser-defaults.ts +0 -101
- package/src/js/plugins/common/feature-selection-details-url.ts +0 -135
- package/src/js/plugins/common/lang.ts +0 -17
- package/src/js/plugins/common/measure-distance.ts +0 -223
- package/src/js/plugins/common/ol-proxy.ts +0 -68
- package/src/js/plugins/common/render-await-feature-details-loaded.ts +0 -154
- package/src/js/plugins/common/render-await-list-feature-sources-loaded.ts +0 -109
- package/src/js/plugins/server/feature-deep-link.ts +0 -67
- package/src/js/plugins/server-defaults.ts +0 -36
- package/src/js/renderer/browser-dom.tsx +0 -27
- package/src/js/renderer/server-string.tsx +0 -17
- package/src/js/server-handler.js +0 -39
- package/src/js/store/actions.ts +0 -662
- package/src/js/store/reducers.ts +0 -491
- package/src/js/store/selectors.ts +0 -483
- 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
|
-
}
|
package/src/js/config/index.ts
DELETED
|
@@ -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
|
-
}
|