@mapsight/ui 7.0.3 → 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 +2 -2
- package/dist/components/app.d.ts.map +1 -1
- package/dist/components/app.js +7 -7
- package/dist/components/app.js.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/feature-details-content.js +2 -2
- package/dist/components/feature-details-content/feature-details-content.js.map +1 -1
- package/dist/components/feature-details-content/index.d.ts +4 -6
- package/dist/components/feature-details-content/index.js +6 -7
- package/dist/components/feature-details-content/index.js.map +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/filter.js +2 -2
- package/dist/components/feature-list/filter.js.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/hooks/useFeatureListState.d.ts.map +1 -1
- package/dist/components/feature-list/hooks/useFeatureListState.js +7 -2
- package/dist/components/feature-list/hooks/useFeatureListState.js.map +1 -1
- package/dist/components/feature-list/hooks/useRestoreDocumentScroll.js +1 -1
- package/dist/components/feature-list/hooks/useRestoreDocumentScroll.js.map +1 -1
- package/dist/components/feature-list/hooks/useSelectFeature.js +6 -6
- package/dist/components/feature-list/hooks/useSelectFeature.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 +34 -46
- 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 +4 -6
- package/dist/components/feature-list-cycling/index.js +1 -1
- package/dist/components/feature-list-cycling/index.js.map +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 +4 -16
- package/dist/components/feature-list-sorting/index.d.ts.map +1 -1
- package/dist/components/feature-list-sorting/index.js +6 -7
- package/dist/components/feature-list-sorting/index.js.map +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/index.js +2 -2
- package/dist/components/feature-selection-info/index.js.map +1 -1
- package/dist/components/feature-selection-info/with-sticky-header.d.ts +10 -7
- package/dist/components/feature-selection-info/with-sticky-header.d.ts.map +1 -1
- package/dist/components/feature-selection-info/with-sticky-header.js +4 -4
- package/dist/components/feature-selection-info/with-sticky-header.js.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 +2 -2
- 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/GroupedLayerSwitcher.js +1 -1
- package/dist/components/layer-switcher/GroupedLayerSwitcher.js.map +1 -1
- package/dist/components/layer-switcher/LayerSwitcher.d.ts +13 -12
- package/dist/components/layer-switcher/LayerSwitcher.d.ts.map +1 -1
- package/dist/components/layer-switcher/LayerSwitcher.js +1 -1
- package/dist/components/layer-switcher/LayerSwitcher.js.map +1 -1
- package/dist/components/layer-switcher/LayerSwitcherContainer.d.ts +16 -0
- package/dist/components/layer-switcher/LayerSwitcherContainer.d.ts.map +1 -0
- package/dist/components/layer-switcher/{LayerSwticherContainer.js → LayerSwitcherContainer.js} +4 -8
- package/dist/components/layer-switcher/LayerSwitcherContainer.js.map +1 -0
- package/dist/components/layer-switcher/LayerSwitcherEntry.d.ts +28 -12
- package/dist/components/layer-switcher/LayerSwitcherEntry.d.ts.map +1 -1
- package/dist/components/layer-switcher/LayerSwitcherEntry.js +33 -35
- package/dist/components/layer-switcher/LayerSwitcherEntry.js.map +1 -1
- package/dist/components/layer-switcher/index.d.ts +9 -2
- package/dist/components/layer-switcher/index.d.ts.map +1 -1
- package/dist/components/layer-switcher/index.js +12 -21
- 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/layout/wrapper.js +1 -1
- package/dist/components/layout/wrapper.js.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 +6 -5
- package/dist/components/main-panel/context.d.ts.map +1 -1
- package/dist/components/main-panel/context.js +5 -13
- package/dist/components/main-panel/context.js.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/main-panel/list-toggle-button.js +2 -2
- package/dist/components/main-panel/list-toggle-button.js.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/attribution.js +1 -1
- package/dist/components/map-overlay/attribution.js.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-left.js +2 -2
- package/dist/components/map-overlay/info-overlay-left.js.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/info-overlay-right.js +2 -2
- package/dist/components/map-overlay/info-overlay-right.js.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/legend.js +1 -1
- package/dist/components/map-overlay/legend.js.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-button.js +1 -1
- package/dist/components/map-overlay/measure-distance-button.js.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/mini-legend.js +2 -2
- package/dist/components/map-overlay/mini-legend.js.map +1 -1
- package/dist/components/map-overlay/region-selector.js +2 -2
- package/dist/components/map-overlay/region-selector.js.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/search-overlay.js +1 -1
- package/dist/components/map-overlay/search-overlay.js.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/share-position-link-button.js +1 -1
- package/dist/components/map-overlay/share-position-link-button.js.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 +3 -6
- package/dist/components/map-synced-interlay/index.d.ts.map +1 -1
- package/dist/components/map-synced-interlay/index.js +5 -6
- package/dist/components/map-synced-interlay/index.js.map +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/map-synced-interlay.js +1 -1
- package/dist/components/map-synced-interlay/map-synced-interlay.js.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-synced-interlay/tooltip.js +1 -1
- package/dist/components/map-synced-interlay/tooltip.js.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 +6 -5
- package/dist/components/map.d.ts.map +1 -1
- package/dist/components/map.js +15 -5
- package/dist/components/map.js.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/index.js +2 -2
- package/dist/components/search/index.js.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-entry.js +1 -1
- package/dist/components/search/result-entry.js.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/search/result.js +1 -1
- package/dist/components/search/result.js.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 +21 -3
- package/dist/components/switcher/SwitcherEntry.d.ts.map +1 -1
- package/dist/components/switcher/SwitcherEntry.js +8 -9
- package/dist/components/switcher/SwitcherEntry.js.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 +3 -3
- package/dist/components/tag-switcher/TagSwitcher.d.ts.map +1 -1
- package/dist/components/tag-switcher/TagSwitcher.js.map +1 -1
- package/dist/components/tag-switcher/createTagSwitcherEntry.d.ts +13 -11
- package/dist/components/tag-switcher/createTagSwitcherEntry.d.ts.map +1 -1
- package/dist/components/tag-switcher/createTagSwitcherEntry.js +6 -12
- package/dist/components/tag-switcher/createTagSwitcherEntry.js.map +1 -1
- package/dist/components/tag-switcher/createTagSwitcherHeader.d.ts +12 -10
- package/dist/components/tag-switcher/createTagSwitcherHeader.d.ts.map +1 -1
- package/dist/components/tag-switcher/createTagSwitcherHeader.js +5 -5
- package/dist/components/tag-switcher/createTagSwitcherHeader.js.map +1 -1
- package/dist/components/tag-switcher/index.d.ts +3 -6
- package/dist/components/tag-switcher/index.d.ts.map +1 -1
- package/dist/components/tag-switcher/index.js +6 -7
- package/dist/components/tag-switcher/index.js.map +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 +7 -6
- package/dist/components/view-toggle-button/index.d.ts.map +1 -1
- package/dist/components/view-toggle-button/index.js +8 -8
- package/dist/components/view-toggle-button/index.js.map +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/mobile-button.js.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/view-toggle-button.js +1 -1
- package/dist/components/view-toggle-button/view-toggle-button.js.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/components/view-toggle-button/viewport-button.js.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/components.d.ts +1 -1
- package/dist/helpers/components.d.ts.map +1 -1
- package/dist/helpers/create-action-watcher.d.ts +1 -1
- package/dist/helpers/create-action-watcher.d.ts.map +1 -1
- package/dist/helpers/create-action-watcher.js +1 -1
- package/dist/helpers/create-action-watcher.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/hooks/useMountable.d.ts +2 -2
- package/dist/hooks/useMountable.d.ts.map +1 -1
- package/dist/hooks/useMountable.js +6 -0
- package/dist/hooks/useMountable.js.map +1 -1
- package/dist/hooks/useStickyHeader.d.ts +3 -3
- package/dist/hooks/useStickyHeader.d.ts.map +1 -1
- package/dist/hooks/useStickyHeader.js +3 -3
- package/dist/hooks/useStickyHeader.js.map +1 -1
- package/dist/hooks/useUpdateMapSizeCallback.d.ts +1 -1
- package/dist/hooks/useUpdateMapSizeCallback.d.ts.map +1 -1
- package/dist/hooks/useUpdateMapSizeOnRender.d.ts +1 -1
- package/dist/hooks/useUpdateMapSizeOnRender.d.ts.map +1 -1
- package/dist/hooks/useUpdateMapSizeOnTransitionEnd.d.ts +1 -1
- package/dist/hooks/useUpdateMapSizeOnTransitionEnd.d.ts.map +1 -1
- package/dist/hooks/useUpdateMapSizeOnViewChange.d.ts +1 -1
- package/dist/hooks/useUpdateMapSizeOnViewChange.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/plugins/browser/app-title.d.ts +1 -1
- package/dist/plugins/browser/app-title.d.ts.map +1 -1
- package/dist/plugins/browser/feature-deep-link.d.ts +1 -1
- package/dist/plugins/browser/feature-deep-link.d.ts.map +1 -1
- package/dist/plugins/browser/feature-deep-link.js.map +1 -1
- package/dist/plugins/browser/local-storage.d.ts +1 -1
- package/dist/plugins/browser/local-storage.d.ts.map +1 -1
- package/dist/plugins/browser/native-fullscreen.d.ts +2 -2
- package/dist/plugins/browser/native-fullscreen.d.ts.map +1 -1
- package/dist/plugins/browser/no-scroll.d.ts +3 -4
- package/dist/plugins/browser/no-scroll.d.ts.map +1 -1
- package/dist/plugins/browser/no-scroll.js.map +1 -1
- package/dist/plugins/browser/partial-content-changed-event.d.ts +1 -1
- package/dist/plugins/browser/partial-content-changed-event.d.ts.map +1 -1
- package/dist/plugins/browser/piwik-track-feature-selection-event.d.ts +1 -1
- package/dist/plugins/browser/piwik-track-feature-selection-event.d.ts.map +1 -1
- package/dist/plugins/browser/piwik-track-fullscreen-toggle-event.d.ts +1 -1
- package/dist/plugins/browser/piwik-track-fullscreen-toggle-event.d.ts.map +1 -1
- package/dist/plugins/browser/search.d.ts +1 -1
- package/dist/plugins/browser/search.d.ts.map +1 -1
- package/dist/plugins/browser/share-position-link.d.ts +1 -1
- package/dist/plugins/browser/share-position-link.d.ts.map +1 -1
- package/dist/plugins/browser/share-position-link.js +1 -1
- package/dist/plugins/browser/share-position-link.js.map +1 -1
- package/dist/plugins/browser/toggle-mobile-views.d.ts +1 -1
- package/dist/plugins/browser/toggle-mobile-views.d.ts.map +1 -1
- package/dist/plugins/browser/user-geolocation.d.ts +1 -1
- package/dist/plugins/browser/user-geolocation.d.ts.map +1 -1
- package/dist/plugins/browser/user-geolocation.js +7 -6
- package/dist/plugins/browser/user-geolocation.js.map +1 -1
- package/dist/plugins/browser/views.d.ts +1 -1
- package/dist/plugins/browser/views.d.ts.map +1 -1
- package/dist/plugins/browser-defaults.d.ts +15 -13
- package/dist/plugins/browser-defaults.d.ts.map +1 -1
- package/dist/plugins/browser-defaults.js +18 -13
- 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/feature-selection-details-url.d.ts +1 -1
- package/dist/plugins/common/feature-selection-details-url.d.ts.map +1 -1
- package/dist/plugins/common/measure-distance.d.ts +1 -1
- package/dist/plugins/common/measure-distance.d.ts.map +1 -1
- package/dist/plugins/common/measure-distance.js +1 -1
- package/dist/plugins/common/measure-distance.js.map +1 -1
- package/dist/plugins/common/ol-proxy.d.ts +1 -1
- package/dist/plugins/common/ol-proxy.d.ts.map +1 -1
- package/dist/plugins/common/render-await-feature-details-loaded.d.ts +1 -1
- package/dist/plugins/common/render-await-feature-details-loaded.d.ts.map +1 -1
- package/dist/plugins/common/render-await-feature-details-loaded.js +2 -1
- package/dist/plugins/common/render-await-feature-details-loaded.js.map +1 -1
- package/dist/plugins/common/render-await-list-feature-sources-loaded.d.ts +1 -1
- package/dist/plugins/common/render-await-list-feature-sources-loaded.d.ts.map +1 -1
- package/dist/plugins/common/render-await-list-feature-sources-loaded.js +2 -1
- package/dist/plugins/common/render-await-list-feature-sources-loaded.js.map +1 -1
- 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/plugins/server/feature-deep-link.d.ts +1 -1
- package/dist/plugins/server/feature-deep-link.d.ts.map +1 -1
- package/dist/plugins/server-defaults.d.ts +4 -4
- package/dist/plugins/server-defaults.d.ts.map +1 -1
- package/dist/plugins/server-defaults.js +4 -4
- package/dist/plugins/server-defaults.js.map +1 -1
- 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/renderer/browser-dom.d.ts.map +1 -1
- package/dist/renderer/browser-dom.js +6 -2
- package/dist/renderer/browser-dom.js.map +1 -1
- package/dist/renderer/server-string.js +2 -2
- package/dist/renderer/server-string.js.map +1 -1
- package/dist/store/actions.d.ts +4 -2
- package/dist/store/actions.d.ts.map +1 -1
- package/dist/store/actions.js +7 -2
- package/dist/store/actions.js.map +1 -1
- package/dist/store/reducers.d.ts +224 -9
- package/dist/store/reducers.d.ts.map +1 -1
- package/dist/store/reducers.js +1 -1
- package/dist/store/reducers.js.map +1 -1
- package/dist/store/selectors.d.ts +267 -243
- package/dist/store/selectors.d.ts.map +1 -1
- package/dist/store/selectors.js +58 -69
- package/dist/store/selectors.js.map +1 -1
- package/dist/types.d.ts +65 -36
- package/dist/types.d.ts.map +1 -1
- package/package.json +26 -11
- 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/dist/components/layer-switcher/LayerSwticherContainer.d.ts +0 -4
- package/dist/components/layer-switcher/LayerSwticherContainer.d.ts.map +0 -1
- package/dist/components/layer-switcher/LayerSwticherContainer.js.map +0 -1
- 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.jsx +0 -237
- 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 -20
- 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 -90
- 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 -25
- 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.jsx +0 -61
- 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.js +0 -27
- package/src/js/components/layer-switcher/LayerSwitcherEntry.js +0 -132
- package/src/js/components/layer-switcher/LayerSwticherContainer.jsx +0 -80
- package/src/js/components/layer-switcher/index.js +0 -47
- 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.jsx +0 -62
- 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.js +0 -17
- 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.jsx +0 -37
- 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.jsx +0 -143
- 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.jsx +0 -57
- package/src/js/components/tag-switcher/createTagSwitcherEntry.js +0 -41
- package/src/js/components/tag-switcher/createTagSwitcherHeader.js +0 -34
- package/src/js/components/tag-switcher/index.js +0 -20
- 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.js +0 -39
- package/src/js/components/view-toggle-button/mobile-button.jsx +0 -13
- package/src/js/components/view-toggle-button/view-toggle-button.jsx +0 -74
- package/src/js/components/view-toggle-button/viewport-button.jsx +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/global.d.ts +0 -7
- 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 -38
- package/src/js/hooks/usePrevious.ts +0 -15
- package/src/js/hooks/useStickyHeader.ts +0 -51
- 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 -319
- 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 -222
- 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 -90
- 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 -134
- 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 -153
- package/src/js/plugins/common/render-await-list-feature-sources-loaded.ts +0 -108
- 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 -23
- package/src/js/renderer/server-string.tsx +0 -17
- package/src/js/server-handler.js +0 -39
- package/src/js/store/actions.ts +0 -648
- package/src/js/store/reducers.ts +0 -491
- package/src/js/store/selectors.ts +0 -449
- package/src/js/types.ts +0 -381
package/src/js/store/actions.ts
DELETED
|
@@ -1,648 +0,0 @@
|
|
|
1
|
-
// TODO: Replace with generic tracking solution that does not rely on simplejs to be used globally
|
|
2
|
-
import {easeOut} from "ol/easing";
|
|
3
|
-
import type {Extent} from "ol/extent";
|
|
4
|
-
|
|
5
|
-
import {batchActions} from "redux-batched-actions";
|
|
6
|
-
|
|
7
|
-
import {mergeAll} from "@mapsight/core/lib/base/actions";
|
|
8
|
-
import {deselectAll} from "@mapsight/core/lib/feature-selections/actions";
|
|
9
|
-
import {animate as animateMap} from "@mapsight/core/lib/map/actions";
|
|
10
|
-
import type {ActionOrThunk, State, ThunkAction} from "@mapsight/core/types";
|
|
11
|
-
|
|
12
|
-
import {trackSiteSearch} from "@mapsight/lib-js/misc/piwik";
|
|
13
|
-
import updateQueryStringParameter from "@mapsight/lib-js/string/update-query-string-parameter";
|
|
14
|
-
|
|
15
|
-
import {siteConfig} from "../config";
|
|
16
|
-
import type {View} from "../config/constants/app";
|
|
17
|
-
import {DETAILS_CONTENT_STATE_KEY} from "../config/constants/app";
|
|
18
|
-
import * as c from "../config/constants/controllers";
|
|
19
|
-
import {
|
|
20
|
-
FEATURE_SELECTION_HIGHLIGHT,
|
|
21
|
-
FEATURE_SELECTION_PRESELECT,
|
|
22
|
-
FEATURE_SELECTION_SELECT,
|
|
23
|
-
} from "../config/feature/selections";
|
|
24
|
-
import type {FullUiState, MapsightUiFeatureId, UiState} from "../types.ts";
|
|
25
|
-
import {featureDetailsUrlSelector, regionsSelector} from "./selectors";
|
|
26
|
-
|
|
27
|
-
function ensureFullUrl(url: string) {
|
|
28
|
-
let requestUrl = url.trim();
|
|
29
|
-
if (typeof window === "undefined" && requestUrl.startsWith("/")) {
|
|
30
|
-
requestUrl = siteConfig.baseUrl.replace(/\/*$/, "") + requestUrl;
|
|
31
|
-
}
|
|
32
|
-
return requestUrl;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function resetMapsightCore(config: Partial<State>) {
|
|
36
|
-
return batchActions([
|
|
37
|
-
deselectAll(c.FEATURE_SELECTIONS, FEATURE_SELECTION_HIGHLIGHT),
|
|
38
|
-
deselectAll(c.FEATURE_SELECTIONS, FEATURE_SELECTION_PRESELECT),
|
|
39
|
-
deselectAll(c.FEATURE_SELECTIONS, FEATURE_SELECTION_SELECT),
|
|
40
|
-
mergeAll(config),
|
|
41
|
-
]);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const SET_VIEW = "SET_VIEW";
|
|
45
|
-
|
|
46
|
-
export function setView(value: View) {
|
|
47
|
-
return {
|
|
48
|
-
type: SET_VIEW,
|
|
49
|
-
value: value,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const SET_LIST_VISIBLE = "SET_LIST_VISIBLE";
|
|
54
|
-
|
|
55
|
-
export function setListVisible(value: boolean) {
|
|
56
|
-
return {
|
|
57
|
-
type: SET_LIST_VISIBLE,
|
|
58
|
-
value: value,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const SET_USER_PREFERENCE_LIST_VISIBLE = "SET_LIST_IS_VISIBLE";
|
|
63
|
-
|
|
64
|
-
// Das setzt die User-Preferenz für die Listenspalte in Fullscreen
|
|
65
|
-
// es gibt noch state[FEATURE_LIST][visible], die die Sicherbarkeit der Liste an sich steuert
|
|
66
|
-
export function setListPreferVisible(value: boolean) {
|
|
67
|
-
return {
|
|
68
|
-
type: SET_USER_PREFERENCE_LIST_VISIBLE,
|
|
69
|
-
value: value,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export const SET_LIST_SCROLL_ON_PRESELECTION =
|
|
74
|
-
"SET_LIST_SCROLL_ON_PRESELECTION";
|
|
75
|
-
|
|
76
|
-
export function setListScrollOnPreselection(value: boolean) {
|
|
77
|
-
return {
|
|
78
|
-
type: SET_LIST_SCROLL_ON_PRESELECTION,
|
|
79
|
-
value: value,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const SET_LIST_SELECTION_BEHAVIOR = "SET_LIST_SELECTION_BEHAVIOR";
|
|
84
|
-
|
|
85
|
-
export function setListSelectionBehavior(
|
|
86
|
-
value: Partial<FullUiState["list"]["selectionBehavior"]>,
|
|
87
|
-
) {
|
|
88
|
-
return {
|
|
89
|
-
type: SET_LIST_SELECTION_BEHAVIOR,
|
|
90
|
-
value: value,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const SET_LIST_SELECTION_BEHAVIOR_SELECTION =
|
|
95
|
-
"SET_LIST_SELECTION_BEHAVIOR_SELECTION";
|
|
96
|
-
|
|
97
|
-
export function setListSelectionBehaviorSelection(
|
|
98
|
-
value: FullUiState["list"]["selectionBehaviorSelection"],
|
|
99
|
-
) {
|
|
100
|
-
return {
|
|
101
|
-
type: SET_LIST_SELECTION_BEHAVIOR_SELECTION,
|
|
102
|
-
value: value,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export const SET_LIST_SELECT_ON_CLICK = "SET_LIST_SELECT_ON_CLICK";
|
|
107
|
-
|
|
108
|
-
export function setListSelectOnClick(value: boolean) {
|
|
109
|
-
return {
|
|
110
|
-
type: SET_LIST_SELECT_ON_CLICK,
|
|
111
|
-
value: value,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export const SET_LIST_HIGHLIGHT_ON_MOUSE = "SET_LIST_HIGHLIGHT_ON_MOUSE";
|
|
116
|
-
|
|
117
|
-
export function setListHighlightOnMouse(value: boolean) {
|
|
118
|
-
return {
|
|
119
|
-
type: SET_LIST_HIGHLIGHT_ON_MOUSE,
|
|
120
|
-
value: value,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export const SET_LIST_INTEGRATED = "SET_LIST_INTEGRATED";
|
|
125
|
-
|
|
126
|
-
export function setListIntregrated(integratedList: boolean) {
|
|
127
|
-
return {
|
|
128
|
-
type: SET_LIST_INTEGRATED,
|
|
129
|
-
value: integratedList,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export const SET_LIST_FILTER_CONTROL = "SET_LIST_FILTER_CONTROL";
|
|
134
|
-
|
|
135
|
-
export function setListFilterControl(showFilterControl: boolean) {
|
|
136
|
-
return {
|
|
137
|
-
type: SET_LIST_FILTER_CONTROL,
|
|
138
|
-
value: showFilterControl,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export const SET_LIST_SORT_CONTROL = "SET_LIST_SORT_CONTROL";
|
|
143
|
-
|
|
144
|
-
export function setListSortControl(showSortControl: boolean) {
|
|
145
|
-
return {
|
|
146
|
-
type: SET_LIST_SORT_CONTROL,
|
|
147
|
-
value: showSortControl,
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export const SET_LIST_CYCLING_CONTROL = "SET_LIST_CYCLING_CONTROL";
|
|
152
|
-
|
|
153
|
-
export function setListCyclingControl(showCyclingControl: boolean) {
|
|
154
|
-
return {
|
|
155
|
-
type: SET_LIST_CYCLING_CONTROL,
|
|
156
|
-
value: showCyclingControl,
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export const SET_TIME_FILTER_VISIBLE = "SET_TIME_FILTER_VISIBLE";
|
|
161
|
-
|
|
162
|
-
export function setTimeFilterVisible(value: boolean) {
|
|
163
|
-
return {
|
|
164
|
-
type: SET_TIME_FILTER_VISIBLE,
|
|
165
|
-
value: value,
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export const SET_TAG_FILTER_CONTROL = "SET_TAG_FILTER_CONTROL";
|
|
170
|
-
|
|
171
|
-
export function setTagFilterControl(
|
|
172
|
-
show: boolean,
|
|
173
|
-
featureSourcesControllerName: string,
|
|
174
|
-
featureSourceId: string,
|
|
175
|
-
tagSwitcherOptions?: Omit<
|
|
176
|
-
Partial<FullUiState["tagSwitcher"]>,
|
|
177
|
-
"show" | "featureSourcesControllerName" | "featureSourceId"
|
|
178
|
-
>,
|
|
179
|
-
) {
|
|
180
|
-
return {
|
|
181
|
-
type: SET_TAG_FILTER_CONTROL,
|
|
182
|
-
show: show,
|
|
183
|
-
featureSourcesControllerName: featureSourcesControllerName,
|
|
184
|
-
featureSourceId: featureSourceId,
|
|
185
|
-
tagSwitcherOptions: tagSwitcherOptions,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export const SET_LIST_PAGINATION_CONTROL = "SET_LIST_PAGINATION_CONTROL";
|
|
190
|
-
|
|
191
|
-
export function setListPaginationControl(show: boolean) {
|
|
192
|
-
return {
|
|
193
|
-
type: SET_LIST_PAGINATION_CONTROL,
|
|
194
|
-
value: show,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export const SET_MAP_VISIBLE = "SET_MAP_VISIBLE";
|
|
199
|
-
|
|
200
|
-
export function setMapVisible(value: boolean) {
|
|
201
|
-
return {
|
|
202
|
-
type: SET_MAP_VISIBLE,
|
|
203
|
-
value: value,
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export const SET_MAP_IS_OUT_OF_VIEWPORT = "SET_MAP_IS_OUT_OF_VIEWPORT";
|
|
208
|
-
|
|
209
|
-
export function setMapIsOutOfViewport(value: boolean) {
|
|
210
|
-
return {
|
|
211
|
-
type: SET_MAP_IS_OUT_OF_VIEWPORT,
|
|
212
|
-
value: value,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export const TOGGLE_USER_PREFERENCE_LIST_VISIBLE = "TOGGLE_LIST_IS_VISIBLE";
|
|
217
|
-
|
|
218
|
-
export function toggleUserPreferenceListVisible() {
|
|
219
|
-
return {type: TOGGLE_USER_PREFERENCE_LIST_VISIBLE};
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export const SET_PAGE_TITLE_SHOW = "SET_PAGE_TITLE_SHOW";
|
|
223
|
-
|
|
224
|
-
export function setPageTitleShow(value: boolean) {
|
|
225
|
-
return {
|
|
226
|
-
type: SET_PAGE_TITLE_SHOW,
|
|
227
|
-
value: value,
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export const SET_APP_TITLE = "SET_APP_TITLE";
|
|
232
|
-
|
|
233
|
-
export function setAppTitle(value: FullUiState["title"]) {
|
|
234
|
-
return {
|
|
235
|
-
type: SET_APP_TITLE,
|
|
236
|
-
value: value,
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export const SET_META_TAGS = "SET_META_TAGS";
|
|
241
|
-
|
|
242
|
-
export function setMetaTags(value: FullUiState["metaTags"]) {
|
|
243
|
-
return {
|
|
244
|
-
type: SET_META_TAGS,
|
|
245
|
-
value: value,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export const SET_MINI_LEGEND_LAYER = "SET_MINI_LEGEND_LAYER";
|
|
250
|
-
|
|
251
|
-
export function setMiniLegendLayer(layerId: string | null) {
|
|
252
|
-
return {
|
|
253
|
-
type: SET_MINI_LEGEND_LAYER,
|
|
254
|
-
value: layerId,
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export const SET_VIEW_BREAKPOINTS = "SET_VIEW_BREAKPOINTS";
|
|
259
|
-
|
|
260
|
-
export function setViewBreakpoints(value: FullUiState["viewBreakpoints"]) {
|
|
261
|
-
return {
|
|
262
|
-
type: SET_VIEW_BREAKPOINTS,
|
|
263
|
-
value: value,
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export const SET_LAST_LIST_SCROLL_POSITION = "SET_LAST_LIST_SCROLL_POSITION";
|
|
268
|
-
|
|
269
|
-
export function setLastListScrollPosition(
|
|
270
|
-
scrollPosition: FullUiState["lastListScrollPosition"],
|
|
271
|
-
) {
|
|
272
|
-
return {
|
|
273
|
-
type: SET_LAST_LIST_SCROLL_POSITION,
|
|
274
|
-
value: scrollPosition,
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export const FILTER_LIST_QUERY = "FILTER_LIST_QUERY";
|
|
279
|
-
|
|
280
|
-
export function filterListQuery(query: string | null): ThunkAction {
|
|
281
|
-
return function (dispatch) {
|
|
282
|
-
dispatch({
|
|
283
|
-
type: FILTER_LIST_QUERY,
|
|
284
|
-
query: query || "",
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
if (query) {
|
|
288
|
-
trackSiteSearch(query, "FilterList");
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export const SORT_LIST = "SORT_LIST";
|
|
294
|
-
|
|
295
|
-
export function sortList(sorting: FullUiState["listSorting"]) {
|
|
296
|
-
return {
|
|
297
|
-
type: SORT_LIST,
|
|
298
|
-
sorting: sorting,
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export const SET_LIST_ITEMS_PER_PAGE = "SET_LIST_ITEMS_PER_PAGE";
|
|
303
|
-
|
|
304
|
-
export function setListItemsPerPage(
|
|
305
|
-
itemsPerPage: FullUiState["list"]["itemsPerPage"],
|
|
306
|
-
) {
|
|
307
|
-
return {
|
|
308
|
-
type: SET_LIST_ITEMS_PER_PAGE,
|
|
309
|
-
value: itemsPerPage,
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export const LIST_PAGE_SET = "LIST_PAGE_SET";
|
|
314
|
-
|
|
315
|
-
export function setListPage(page: FullUiState["listPage"]) {
|
|
316
|
-
return {
|
|
317
|
-
type: LIST_PAGE_SET,
|
|
318
|
-
page: page,
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export function resetListPage() {
|
|
323
|
-
return {
|
|
324
|
-
type: LIST_PAGE_SET,
|
|
325
|
-
page: 0,
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export const LIST_PAGE_NEXT = "LIST_PAGE_NEXT";
|
|
330
|
-
|
|
331
|
-
export function nextListPage() {
|
|
332
|
-
return {type: LIST_PAGE_NEXT};
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export const LIST_PAGE_PREVIOUS = "LIST_PAGE_PREVIOUS";
|
|
336
|
-
|
|
337
|
-
export function previousListPage() {
|
|
338
|
-
return {type: LIST_PAGE_PREVIOUS};
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export const FETCH_TEXT_REQUEST = "FETCH_TEXT_REQUEST";
|
|
342
|
-
export const FETCH_TEXT_FAILURE = "FETCH_TEXT_FAILURE";
|
|
343
|
-
export const FETCH_TEXT_SUCCESS = "FETCH_TEXT_SUCCESS";
|
|
344
|
-
export const FETCH_TEXT_RESET = "FETCH_TEXT_RESET";
|
|
345
|
-
|
|
346
|
-
export function fetchTextRequest(key: string, url: string) {
|
|
347
|
-
return {
|
|
348
|
-
type: FETCH_TEXT_REQUEST,
|
|
349
|
-
key: key,
|
|
350
|
-
url: url,
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
export function fetchTextFailure(key: string, error: unknown) {
|
|
355
|
-
return {
|
|
356
|
-
type: FETCH_TEXT_FAILURE,
|
|
357
|
-
key: key,
|
|
358
|
-
error: error,
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export function fetchTextSuccess(key: string, data: unknown) {
|
|
363
|
-
return {
|
|
364
|
-
type: FETCH_TEXT_SUCCESS,
|
|
365
|
-
key: key,
|
|
366
|
-
data: data,
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export const FETCH_TEXT_STATUS_LOADING = "loading";
|
|
371
|
-
export const FETCH_TEXT_STATUS_ERROR = "error";
|
|
372
|
-
export const FETCH_TEXT_STATUS_SUCCESS = "success";
|
|
373
|
-
|
|
374
|
-
export function fetchText(key: string, url: string): ThunkAction {
|
|
375
|
-
return function (dispatch, getState) {
|
|
376
|
-
const selectState = () => (getState().app as UiState)[key] || {};
|
|
377
|
-
|
|
378
|
-
// do not fetch again if already running
|
|
379
|
-
const state = selectState();
|
|
380
|
-
if (state.url === url && state.status === FETCH_TEXT_STATUS_LOADING) {
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
dispatch(fetchTextRequest(key, url));
|
|
385
|
-
|
|
386
|
-
// TODO: Fix this magic!
|
|
387
|
-
const requestUrl = ensureFullUrl(url);
|
|
388
|
-
|
|
389
|
-
// Do not use catch, because that will also catch
|
|
390
|
-
// any errors in the dispatch and resulting render,
|
|
391
|
-
// causing a loop of 'Unexpected batch number' errors.
|
|
392
|
-
// https://github.com/facebook/react/issues/6895
|
|
393
|
-
fetch(requestUrl)
|
|
394
|
-
.then(
|
|
395
|
-
(response) => response.text(),
|
|
396
|
-
(error) => {
|
|
397
|
-
// discard response if url changed
|
|
398
|
-
if (selectState().url !== url) {
|
|
399
|
-
return Promise.reject();
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
dispatch(fetchTextFailure(key, error));
|
|
403
|
-
|
|
404
|
-
return Promise.reject();
|
|
405
|
-
},
|
|
406
|
-
)
|
|
407
|
-
.then((data) => {
|
|
408
|
-
// discard response if url changed
|
|
409
|
-
if (selectState().url !== url) {
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
dispatch(fetchTextSuccess(key, data));
|
|
414
|
-
})
|
|
415
|
-
.catch((error) => {
|
|
416
|
-
console.error(error);
|
|
417
|
-
dispatch(fetchTextFailure(key, error));
|
|
418
|
-
});
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export function fetchTextReset(key: string) {
|
|
423
|
-
return {
|
|
424
|
-
type: FETCH_TEXT_RESET,
|
|
425
|
-
key: key,
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export const FETCH_JSON_REQUEST = "FETCH_JSON_REQUEST";
|
|
430
|
-
export const FETCH_JSON_FAILURE = "FETCH_JSON_FAILURE";
|
|
431
|
-
export const FETCH_JSON_SUCCESS = "FETCH_JSON_SUCCESS";
|
|
432
|
-
export const FETCH_JSON_RESET = "FETCH_JSON_RESET";
|
|
433
|
-
|
|
434
|
-
export function fetchJsonRequest(key: string, url: string) {
|
|
435
|
-
return {
|
|
436
|
-
type: FETCH_JSON_REQUEST,
|
|
437
|
-
key: key,
|
|
438
|
-
url: url,
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export function fetchJsonFailure(key: string, error: unknown) {
|
|
443
|
-
return {
|
|
444
|
-
type: FETCH_JSON_FAILURE,
|
|
445
|
-
key: key,
|
|
446
|
-
error: error,
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
export function fetchJsonSuccess(key: string, data: unknown) {
|
|
451
|
-
return {
|
|
452
|
-
type: FETCH_JSON_SUCCESS,
|
|
453
|
-
key: key,
|
|
454
|
-
data: data,
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
export function fetchJsonReset(key: string) {
|
|
459
|
-
return {
|
|
460
|
-
type: FETCH_JSON_RESET,
|
|
461
|
-
key: key,
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export const FETCH_JSON_STATUS_LOADING = "loading";
|
|
466
|
-
export const FETCH_JSON_STATUS_ERROR = "error";
|
|
467
|
-
export const FETCH_JSON_STATUS_SUCCESS = "success";
|
|
468
|
-
|
|
469
|
-
export function fetchJson(key: string, url: string = key): ThunkAction {
|
|
470
|
-
return (dispatch, getState) => {
|
|
471
|
-
// do not fetch again if already running
|
|
472
|
-
{
|
|
473
|
-
const appState = getState().app as UiState;
|
|
474
|
-
if (
|
|
475
|
-
appState[key]?.url === url &&
|
|
476
|
-
appState[key].status === FETCH_JSON_STATUS_LOADING
|
|
477
|
-
) {
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
dispatch(fetchJsonRequest(key, url));
|
|
483
|
-
|
|
484
|
-
const requestUrl = ensureFullUrl(url);
|
|
485
|
-
|
|
486
|
-
// Do not use catch, because that will also catch
|
|
487
|
-
// any errors in the dispatch and resulting render,
|
|
488
|
-
// causing a loop of 'Unexpected batch number' errors.
|
|
489
|
-
// https://github.com/facebook/react/issues/6895
|
|
490
|
-
fetch(requestUrl)
|
|
491
|
-
.then(
|
|
492
|
-
(response) => response.text(),
|
|
493
|
-
(error) => {
|
|
494
|
-
// discard response if url changed
|
|
495
|
-
const state = (getState().app as UiState)[key];
|
|
496
|
-
if (state && state.url !== url) {
|
|
497
|
-
return Promise.reject();
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
dispatch(fetchJsonFailure(key, error));
|
|
501
|
-
|
|
502
|
-
return Promise.reject();
|
|
503
|
-
},
|
|
504
|
-
)
|
|
505
|
-
.then((data) => {
|
|
506
|
-
// discard response if url changed
|
|
507
|
-
const state = (getState().app as UiState)[key];
|
|
508
|
-
if (state && state.url !== url) {
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
try {
|
|
513
|
-
const json = JSON.parse(data);
|
|
514
|
-
dispatch(fetchJsonSuccess(key, json));
|
|
515
|
-
} catch (error) {
|
|
516
|
-
dispatch(fetchJsonFailure(key, error));
|
|
517
|
-
}
|
|
518
|
-
})
|
|
519
|
-
.catch((error) => {
|
|
520
|
-
console.error(error);
|
|
521
|
-
dispatch(fetchJsonFailure(key, error));
|
|
522
|
-
});
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
export const SEARCH = "SEARCH";
|
|
527
|
-
|
|
528
|
-
export const search = (query: string | null): ActionOrThunk =>
|
|
529
|
-
query
|
|
530
|
-
? (dispatch) => {
|
|
531
|
-
trackSiteSearch(query, "MapsightToolbarSearch"); // historical keyword (search was in a toolbar once)
|
|
532
|
-
|
|
533
|
-
const searchRequestUrl = updateQueryStringParameter(
|
|
534
|
-
siteConfig.searchUrl,
|
|
535
|
-
siteConfig.searchQueryParameter,
|
|
536
|
-
query,
|
|
537
|
-
); // FIXME Paul, is it ok, that query now gets transformed by encodeURI?
|
|
538
|
-
dispatch({type: SEARCH, query: query});
|
|
539
|
-
dispatch(fetchJson("searchResult", searchRequestUrl));
|
|
540
|
-
}
|
|
541
|
-
: {type: SEARCH, query: ""};
|
|
542
|
-
|
|
543
|
-
export const SELECT_SEARCH_RESULT = "SELECT_SEARCH_RESULT";
|
|
544
|
-
|
|
545
|
-
export const selectSearchResult = (feature: MapsightUiFeatureId) => ({
|
|
546
|
-
type: SELECT_SEARCH_RESULT,
|
|
547
|
-
feature: feature,
|
|
548
|
-
});
|
|
549
|
-
|
|
550
|
-
export const setFeatureDetailsUrl =
|
|
551
|
-
(detailsUrl: string): ThunkAction =>
|
|
552
|
-
(dispatch, getState) => {
|
|
553
|
-
const currentUrl = featureDetailsUrlSelector(
|
|
554
|
-
getState() as {app: UiState},
|
|
555
|
-
);
|
|
556
|
-
if (currentUrl !== detailsUrl) {
|
|
557
|
-
if (detailsUrl) {
|
|
558
|
-
dispatch(fetchText(DETAILS_CONTENT_STATE_KEY, detailsUrl));
|
|
559
|
-
} else {
|
|
560
|
-
dispatch(fetchTextReset(DETAILS_CONTENT_STATE_KEY));
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
|
|
565
|
-
export const SET_TAG_VISIBLE = "SET_TAG_VISIBLE";
|
|
566
|
-
|
|
567
|
-
export const setTagVisible = (
|
|
568
|
-
featureSourceId: string,
|
|
569
|
-
tagGroup: string,
|
|
570
|
-
tag: string,
|
|
571
|
-
visible: boolean,
|
|
572
|
-
) => ({
|
|
573
|
-
type: SET_TAG_VISIBLE,
|
|
574
|
-
featureSourceId: featureSourceId,
|
|
575
|
-
tagGroup: tagGroup,
|
|
576
|
-
tag: tag,
|
|
577
|
-
visible: visible,
|
|
578
|
-
});
|
|
579
|
-
|
|
580
|
-
export const SET_TAG_GROUP_VISIBLE = "SET_TAG_GROUP_VISIBLE";
|
|
581
|
-
|
|
582
|
-
export const setTagGroupVisible = (
|
|
583
|
-
featureSourceId: string,
|
|
584
|
-
tagGroup: string,
|
|
585
|
-
visible: boolean,
|
|
586
|
-
) => ({
|
|
587
|
-
type: SET_TAG_GROUP_VISIBLE,
|
|
588
|
-
featureSourceId: featureSourceId,
|
|
589
|
-
tagGroup: tagGroup,
|
|
590
|
-
visible: visible,
|
|
591
|
-
});
|
|
592
|
-
|
|
593
|
-
export const HIDE_TAG_AND_TAG_GROUP = "HIDE_TAG_AND_TAG_GROUP";
|
|
594
|
-
|
|
595
|
-
export const hideTagAndTagGroup = () => ({
|
|
596
|
-
type: HIDE_TAG_AND_TAG_GROUP,
|
|
597
|
-
});
|
|
598
|
-
|
|
599
|
-
export const SET_OVERLAY_MODAL_VISIBLE = "SET_OVERLAY_MODAL_VISIBLE";
|
|
600
|
-
|
|
601
|
-
export function setOverlayModalVisible(visible: boolean) {
|
|
602
|
-
return {
|
|
603
|
-
type: SET_OVERLAY_MODAL_VISIBLE,
|
|
604
|
-
visible: visible,
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
export const SET_SELECTED_REGION_ID = "MS_APP_SET_SELECTED_REGION_ID";
|
|
609
|
-
|
|
610
|
-
export function setSelectedRegionId(regionId: string | null) {
|
|
611
|
-
return {
|
|
612
|
-
type: SET_SELECTED_REGION_ID,
|
|
613
|
-
payload: regionId,
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
export function setSelectedRegionIdAndAnimateMap(
|
|
618
|
-
regionId: string | null,
|
|
619
|
-
): ActionOrThunk {
|
|
620
|
-
if (regionId === null) {
|
|
621
|
-
return setSelectedRegionId(regionId);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
return (dispatch, getState) => {
|
|
625
|
-
dispatch(setSelectedRegionId(regionId));
|
|
626
|
-
|
|
627
|
-
// TODO: use `selectedRegionSelector`, not sure if it's safe to rely on the state
|
|
628
|
-
// change here
|
|
629
|
-
const regions = regionsSelector(getState() as {app: UiState});
|
|
630
|
-
|
|
631
|
-
if (
|
|
632
|
-
regions &&
|
|
633
|
-
typeof regions === "object" &&
|
|
634
|
-
typeof regions[regionId] === "object" &&
|
|
635
|
-
Array.isArray(regions[regionId].bounds) &&
|
|
636
|
-
regions[regionId].bounds.length === 4
|
|
637
|
-
) {
|
|
638
|
-
dispatch(
|
|
639
|
-
animateMap("map", {
|
|
640
|
-
nearest: true,
|
|
641
|
-
duration: 1000,
|
|
642
|
-
easing: easeOut,
|
|
643
|
-
bounds: regions[regionId].bounds as Extent,
|
|
644
|
-
}),
|
|
645
|
-
);
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
}
|