@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,152 +0,0 @@
|
|
|
1
|
-
import {connect} from "react-redux";
|
|
2
|
-
|
|
3
|
-
import type {Dispatch} from "@reduxjs/toolkit";
|
|
4
|
-
|
|
5
|
-
import type {ActionPath} from "@mapsight/core/lib/base/actions";
|
|
6
|
-
import {set as makeSetAction} from "@mapsight/core/lib/base/actions";
|
|
7
|
-
import {getFeatureSourceStatus} from "@mapsight/core/lib/feature-sources/selectors";
|
|
8
|
-
import type {FeatureSourceState} from "@mapsight/core/lib/feature-sources/types";
|
|
9
|
-
import {setLayerVisibility} from "@mapsight/core/lib/map/actions";
|
|
10
|
-
import type {MapState} from "@mapsight/core/lib/map/types";
|
|
11
|
-
import type {State} from "@mapsight/core/types";
|
|
12
|
-
|
|
13
|
-
import getPath from "@mapsight/lib-js/object/getPath";
|
|
14
|
-
|
|
15
|
-
import {MAP} from "../../config/constants/controllers";
|
|
16
|
-
import SwitcherEntry from "../switcher/SwitcherEntry";
|
|
17
|
-
|
|
18
|
-
function getActiveProps({
|
|
19
|
-
setFeatureSourceIdPath,
|
|
20
|
-
currentlySetFeatureSourceId,
|
|
21
|
-
featureSourceId,
|
|
22
|
-
dispatch,
|
|
23
|
-
layerId,
|
|
24
|
-
visibility,
|
|
25
|
-
locked,
|
|
26
|
-
}: {
|
|
27
|
-
locked: boolean;
|
|
28
|
-
visibility: boolean;
|
|
29
|
-
featureSourceId: string | undefined;
|
|
30
|
-
currentlySetFeatureSourceId: string | undefined;
|
|
31
|
-
dispatch: Dispatch;
|
|
32
|
-
layerId: string;
|
|
33
|
-
setFeatureSourceIdPath?: ActionPath | null;
|
|
34
|
-
}) {
|
|
35
|
-
if (setFeatureSourceIdPath) {
|
|
36
|
-
const isCurrentFeatureSource =
|
|
37
|
-
currentlySetFeatureSourceId === featureSourceId;
|
|
38
|
-
|
|
39
|
-
// this will match in intermediate state; use batching?
|
|
40
|
-
//if (!visibility && isFeatureSourceCurrent) {
|
|
41
|
-
// throw new Error('illegal state');
|
|
42
|
-
//}
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
activeCheckbox: visibility,
|
|
46
|
-
activeText: isCurrentFeatureSource,
|
|
47
|
-
toggleActiveCheckbox: function toggleActiveCheckbox() {
|
|
48
|
-
dispatch(setLayerVisibility(MAP, layerId, !visibility));
|
|
49
|
-
if (isCurrentFeatureSource) {
|
|
50
|
-
dispatch(makeSetAction(setFeatureSourceIdPath, undefined));
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
toggleActiveText: function toggleActiveText() {
|
|
54
|
-
if (featureSourceId) {
|
|
55
|
-
dispatch(
|
|
56
|
-
makeSetAction(setFeatureSourceIdPath, featureSourceId),
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
dispatch(setLayerVisibility(MAP, layerId, true));
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
active: visibility,
|
|
66
|
-
toggleActive: function toggleActive() {
|
|
67
|
-
if (!locked) {
|
|
68
|
-
dispatch(setLayerVisibility(MAP, layerId, !visibility));
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type LayerSwitcherEntryProps = {
|
|
75
|
-
layerId: string;
|
|
76
|
-
titleSelector: (state: MapState) => string;
|
|
77
|
-
lockedSelector: (state: MapState) => boolean;
|
|
78
|
-
layerVisibilitySelector: (state: MapState) => boolean;
|
|
79
|
-
featureSourceSelector: (
|
|
80
|
-
mapState: MapState,
|
|
81
|
-
state: State,
|
|
82
|
-
) => FeatureSourceState | null;
|
|
83
|
-
featureSourceIdSelector: (state: MapState) => string | undefined;
|
|
84
|
-
setFeatureSourceIdPath?: ActionPath | null;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const mapStateToProps = (
|
|
88
|
-
state: State,
|
|
89
|
-
{
|
|
90
|
-
titleSelector,
|
|
91
|
-
lockedSelector,
|
|
92
|
-
layerVisibilitySelector,
|
|
93
|
-
featureSourceSelector,
|
|
94
|
-
featureSourceIdSelector,
|
|
95
|
-
setFeatureSourceIdPath,
|
|
96
|
-
}: LayerSwitcherEntryProps,
|
|
97
|
-
) => {
|
|
98
|
-
const mapState = state[MAP] as MapState;
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
title: titleSelector(mapState),
|
|
102
|
-
locked: lockedSelector(mapState),
|
|
103
|
-
visibility: layerVisibilitySelector(mapState),
|
|
104
|
-
featureSource: featureSourceSelector(mapState, state),
|
|
105
|
-
featureSourceId: featureSourceIdSelector(mapState),
|
|
106
|
-
currentlySetFeatureSourceId: Array.isArray(setFeatureSourceIdPath)
|
|
107
|
-
? (getPath(state, setFeatureSourceIdPath) as string | undefined)
|
|
108
|
-
: undefined,
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
const LayerSwitcherEntry = connect(
|
|
113
|
-
mapStateToProps,
|
|
114
|
-
null,
|
|
115
|
-
// mergeProps:
|
|
116
|
-
(
|
|
117
|
-
stateProps,
|
|
118
|
-
{dispatch},
|
|
119
|
-
{
|
|
120
|
-
// used for active props:
|
|
121
|
-
layerId,
|
|
122
|
-
setFeatureSourceIdPath,
|
|
123
|
-
|
|
124
|
-
// Need to list the selectors here so they do not get passed as attribute props to the element but get filtered:
|
|
125
|
-
lockedSelector: _1,
|
|
126
|
-
titleSelector: _2,
|
|
127
|
-
layerVisibilitySelector: _3,
|
|
128
|
-
featureSourceSelector: _4,
|
|
129
|
-
featureSourceIdSelector: _5,
|
|
130
|
-
|
|
131
|
-
...attributes
|
|
132
|
-
},
|
|
133
|
-
) => ({
|
|
134
|
-
title: stateProps.title,
|
|
135
|
-
status: stateProps.featureSource
|
|
136
|
-
? getFeatureSourceStatus(stateProps.featureSource)
|
|
137
|
-
: undefined,
|
|
138
|
-
locked: stateProps.locked,
|
|
139
|
-
...getActiveProps({
|
|
140
|
-
visibility: stateProps.visibility,
|
|
141
|
-
featureSourceId: stateProps.featureSourceId ?? "",
|
|
142
|
-
currentlySetFeatureSourceId: stateProps.currentlySetFeatureSourceId,
|
|
143
|
-
locked: stateProps.locked,
|
|
144
|
-
dispatch,
|
|
145
|
-
layerId,
|
|
146
|
-
setFeatureSourceIdPath,
|
|
147
|
-
}),
|
|
148
|
-
...attributes,
|
|
149
|
-
}),
|
|
150
|
-
)(SwitcherEntry);
|
|
151
|
-
|
|
152
|
-
export default LayerSwitcherEntry;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {connect} from "react-redux";
|
|
2
|
-
|
|
3
|
-
import type {Selector} from "@mapsight/core/types";
|
|
4
|
-
|
|
5
|
-
import {FEATURE_LIST} from "../../config/constants/controllers";
|
|
6
|
-
import type {RootStateSlice} from "../../store/selectors";
|
|
7
|
-
import {layerSwitcherConfigInternalSelector} from "../../store/selectors";
|
|
8
|
-
import type {LayerSwitcherConfigState} from "../../types";
|
|
9
|
-
import LayerSwitcherContainer from "./LayerSwitcherContainer";
|
|
10
|
-
|
|
11
|
-
const TRUE_SET_FEATURE_SOURCE_PATH = [FEATURE_LIST, "featureSource"] as const;
|
|
12
|
-
|
|
13
|
-
type Props = {
|
|
14
|
-
configSelector?: Selector<LayerSwitcherConfigState | undefined>;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default connect(
|
|
18
|
-
(
|
|
19
|
-
state: RootStateSlice,
|
|
20
|
-
{configSelector = layerSwitcherConfigInternalSelector}: Props,
|
|
21
|
-
) => {
|
|
22
|
-
const setFeatureSourceId = configSelector(state)?.setFeatureSourceId;
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
layerIdsSelector: configSelector(state)?.layerIdsSelector,
|
|
26
|
-
grouped: configSelector(state)?.grouped,
|
|
27
|
-
setFeatureSourceIdPath:
|
|
28
|
-
setFeatureSourceId === true
|
|
29
|
-
? TRUE_SET_FEATURE_SOURCE_PATH
|
|
30
|
-
: setFeatureSourceId,
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
null,
|
|
34
|
-
(
|
|
35
|
-
stateProps,
|
|
36
|
-
_dispatchProps,
|
|
37
|
-
{configSelector: _configSelector, ...ownProps},
|
|
38
|
-
) => ({
|
|
39
|
-
...ownProps,
|
|
40
|
-
...stateProps,
|
|
41
|
-
}),
|
|
42
|
-
)(LayerSwitcherContainer);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {useSelector} from "react-redux";
|
|
2
|
-
|
|
3
|
-
import {makeReplaceableComponent} from "../../helpers/components";
|
|
4
|
-
import {titleSelector} from "../../store/selectors";
|
|
5
|
-
|
|
6
|
-
function TitleBar() {
|
|
7
|
-
const title = useSelector(titleSelector);
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div className="ms3-flex ms3-flex--row ms3-flex-no-shrink">
|
|
11
|
-
<div className="ms3-page-title ms3-flex-grow">
|
|
12
|
-
<h2>{title || ""}</h2>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default makeReplaceableComponent("TitleBar", TitleBar);
|
|
19
|
-
export {TitleBar as NonReplaceableTitleBar};
|
|
20
|
-
|
|
21
|
-
declare module "../../helpers/components" {
|
|
22
|
-
interface ComponentProps {
|
|
23
|
-
TitleBar: unknown;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {memo} from "react";
|
|
2
|
-
import {useSelector} from "react-redux";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
isEmbeddedMapSelector,
|
|
6
|
-
mapVisible,
|
|
7
|
-
viewSelector,
|
|
8
|
-
} from "../../store/selectors";
|
|
9
|
-
|
|
10
|
-
function AppWrapper({children, ...attributes}) {
|
|
11
|
-
const view = useSelector(viewSelector);
|
|
12
|
-
const isEmbeddedMap = useSelector(isEmbeddedMapSelector);
|
|
13
|
-
const isMapVisible = useSelector(mapVisible);
|
|
14
|
-
|
|
15
|
-
const className = `ms3-wrapper ms3-wrapper--${view} ${
|
|
16
|
-
isEmbeddedMap ? "ms3-wrapper--embedded" : ""
|
|
17
|
-
} ${isMapVisible ? "" : "ms3-wrapper--withoutmap"} ${
|
|
18
|
-
attributes.className || ""
|
|
19
|
-
}`;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div className={className} {...attributes}>
|
|
23
|
-
{children}
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default memo(AppWrapper);
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/* eslint-disable n/no-unsupported-features/node-builtins */
|
|
2
|
-
import {useCallback} from "react";
|
|
3
|
-
|
|
4
|
-
import {translate} from "../helpers/i18n";
|
|
5
|
-
|
|
6
|
-
const selectInputContent = (e) =>
|
|
7
|
-
e.target.setSelectionRange(0, e.target.value.length);
|
|
8
|
-
|
|
9
|
-
function LinkShare({
|
|
10
|
-
buttonLabel = translate("shareLink"),
|
|
11
|
-
title = translate("shareLink"),
|
|
12
|
-
url,
|
|
13
|
-
onFinished,
|
|
14
|
-
onError,
|
|
15
|
-
}) {
|
|
16
|
-
const share = useCallback(
|
|
17
|
-
function () {
|
|
18
|
-
if (navigator?.share) {
|
|
19
|
-
navigator
|
|
20
|
-
.share({
|
|
21
|
-
title: title,
|
|
22
|
-
url: url,
|
|
23
|
-
})
|
|
24
|
-
.then(() => {
|
|
25
|
-
if (onFinished) {
|
|
26
|
-
onFinished();
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
.catch((err) => {
|
|
30
|
-
console.error(err);
|
|
31
|
-
if (onError) {
|
|
32
|
-
onError();
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
[onError, onFinished, title, url],
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div className="ms3-link-share">
|
|
42
|
-
{navigator?.share ? (
|
|
43
|
-
<button
|
|
44
|
-
className="ms3-link-share__button"
|
|
45
|
-
type="button"
|
|
46
|
-
onClick={share}
|
|
47
|
-
>
|
|
48
|
-
<svg
|
|
49
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
50
|
-
width="20"
|
|
51
|
-
height="22"
|
|
52
|
-
viewBox="0 0 20 22"
|
|
53
|
-
>
|
|
54
|
-
<path
|
|
55
|
-
fill="#000"
|
|
56
|
-
d="M10.86.91l4.42 4.42-1.33 1.32L11 3v10H9V3L6.06 6.6 4.7 5.37 9.15.9 9.13.87l.84-.84.03.03.03-.03.85.86z"
|
|
57
|
-
/>
|
|
58
|
-
<path
|
|
59
|
-
stroke="#000"
|
|
60
|
-
strokeLinecap="square"
|
|
61
|
-
strokeWidth="2"
|
|
62
|
-
d="M1 21h18M1 21V9M19 21V9M14 9h5M1 9h5"
|
|
63
|
-
/>
|
|
64
|
-
</svg>
|
|
65
|
-
<span className="ms3-visuallyhidden">{buttonLabel}</span>
|
|
66
|
-
</button>
|
|
67
|
-
) : null}
|
|
68
|
-
<input
|
|
69
|
-
className="ms3-link-share__input"
|
|
70
|
-
value={url}
|
|
71
|
-
onClick={selectInputContent}
|
|
72
|
-
readOnly={true}
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export default LinkShare;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {useRef} from "react";
|
|
2
|
-
|
|
3
|
-
import useMapsightPanel from "../../hooks/useMapsightPanel";
|
|
4
|
-
import {useMainPanelContext} from "./context";
|
|
5
|
-
|
|
6
|
-
function MainPanelContainer({children}) {
|
|
7
|
-
const {panelPosition, collapsed} = useMainPanelContext();
|
|
8
|
-
|
|
9
|
-
const containerRef = useRef<HTMLDivElement>(null);
|
|
10
|
-
useMapsightPanel(containerRef, panelPosition, collapsed);
|
|
11
|
-
|
|
12
|
-
const containerClasses = `ms3-panel-container ms3-panel-container--docked-${panelPosition} ${
|
|
13
|
-
collapsed ? "ms3-panel-container--empty" : ""
|
|
14
|
-
}`;
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div className={containerClasses} ref={containerRef}>
|
|
18
|
-
{children}
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default MainPanelContainer;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type {PropsWithChildren} from "react";
|
|
2
|
-
import {createContext, useContext, useMemo} from "react";
|
|
3
|
-
import {useSelector} from "react-redux";
|
|
4
|
-
|
|
5
|
-
import {createMainPanelContentTypeSelector} from "../../store/selectors";
|
|
6
|
-
import type {MainPanelContextOptions, MainPanelContextValue} from "../../types";
|
|
7
|
-
|
|
8
|
-
const MainPanelContext = createContext<MainPanelContextValue>({
|
|
9
|
-
showSelectionInfo: false,
|
|
10
|
-
showList: false,
|
|
11
|
-
collapsible: false,
|
|
12
|
-
panelPosition: "left",
|
|
13
|
-
|
|
14
|
-
feature: null,
|
|
15
|
-
contentType: null,
|
|
16
|
-
collapsed: false,
|
|
17
|
-
});
|
|
18
|
-
MainPanelContext.displayName = "MainPanelContext";
|
|
19
|
-
|
|
20
|
-
export function useMainPanelContext() {
|
|
21
|
-
return useContext(MainPanelContext);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type MainPanelStateProps = Pick<
|
|
25
|
-
MainPanelContextOptions,
|
|
26
|
-
"showSelectionInfo" | "showList" | "collapsible"
|
|
27
|
-
>;
|
|
28
|
-
|
|
29
|
-
function useMainPanelState({
|
|
30
|
-
showSelectionInfo,
|
|
31
|
-
showList,
|
|
32
|
-
collapsible,
|
|
33
|
-
}: MainPanelStateProps) {
|
|
34
|
-
const selector = useMemo(
|
|
35
|
-
() =>
|
|
36
|
-
createMainPanelContentTypeSelector({
|
|
37
|
-
showSelectionInfo: showSelectionInfo,
|
|
38
|
-
showList: showList,
|
|
39
|
-
collapsible: collapsible,
|
|
40
|
-
}),
|
|
41
|
-
[showSelectionInfo, showList, collapsible],
|
|
42
|
-
);
|
|
43
|
-
return useSelector(selector);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
type MainPanelContextProps = PropsWithChildren<
|
|
47
|
-
Partial<MainPanelContextOptions>
|
|
48
|
-
>;
|
|
49
|
-
|
|
50
|
-
export function MainPanelContextProvider({
|
|
51
|
-
showSelectionInfo = false,
|
|
52
|
-
showList = false,
|
|
53
|
-
collapsible = false,
|
|
54
|
-
panelPosition = "left",
|
|
55
|
-
children,
|
|
56
|
-
}: MainPanelContextProps) {
|
|
57
|
-
const options = {
|
|
58
|
-
showSelectionInfo: showSelectionInfo,
|
|
59
|
-
showList: showList,
|
|
60
|
-
collapsible: collapsible,
|
|
61
|
-
panelPosition: panelPosition,
|
|
62
|
-
};
|
|
63
|
-
const state = useMainPanelState(options);
|
|
64
|
-
const value = {...options, ...state};
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<MainPanelContext.Provider value={value}>
|
|
68
|
-
{children}
|
|
69
|
-
</MainPanelContext.Provider>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type {ReactNode} from "react";
|
|
2
|
-
import {useRef} from "react";
|
|
3
|
-
|
|
4
|
-
import FeatureList from "../feature-list";
|
|
5
|
-
import FeatureSelectionInfo from "../feature-selection-info";
|
|
6
|
-
import {useMainPanelContext} from "./context";
|
|
7
|
-
|
|
8
|
-
function MainPanel() {
|
|
9
|
-
const {contentType, panelPosition, collapsed, feature} =
|
|
10
|
-
useMainPanelContext();
|
|
11
|
-
|
|
12
|
-
// we keep using the old content stored in contentRef.current if we do not have any new content
|
|
13
|
-
// to allow for a smooth transition when collapsing the container
|
|
14
|
-
const contentRef = useRef<ReactNode>(null);
|
|
15
|
-
const isShowingSelectionInfoRef = useRef(false);
|
|
16
|
-
|
|
17
|
-
if (contentType) {
|
|
18
|
-
isShowingSelectionInfoRef.current = contentType === "selectionInfo";
|
|
19
|
-
contentRef.current = (
|
|
20
|
-
<>
|
|
21
|
-
<FeatureList enableKeyboardControl={!collapsed} />
|
|
22
|
-
|
|
23
|
-
{isShowingSelectionInfoRef.current && (
|
|
24
|
-
<FeatureSelectionInfo
|
|
25
|
-
feature={feature}
|
|
26
|
-
enableKeyboardControl={!collapsed}
|
|
27
|
-
/>
|
|
28
|
-
)}
|
|
29
|
-
</>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div
|
|
35
|
-
className={`ms3-panel ms3-panel--docked-${panelPosition} ${
|
|
36
|
-
collapsed ? "ms3-panel--empty" : ""
|
|
37
|
-
} ${
|
|
38
|
-
isShowingSelectionInfoRef.current ? "ms3-panel--hide-list" : ""
|
|
39
|
-
}`}
|
|
40
|
-
>
|
|
41
|
-
<div className="ms3-panel__inner">{contentRef.current}</div>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default MainPanel;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {useCallback} from "react";
|
|
2
|
-
import {useDispatch, useSelector} from "react-redux";
|
|
3
|
-
import {translate} from "../../helpers/i18n";
|
|
4
|
-
import {toggleUserPreferenceListVisible} from "../../store/actions";
|
|
5
|
-
|
|
6
|
-
import {userPreferenceListVisibleSelector} from "../../store/selectors";
|
|
7
|
-
|
|
8
|
-
import {useMainPanelContext} from "./context";
|
|
9
|
-
|
|
10
|
-
function MainPanelListToggleButton() {
|
|
11
|
-
const {collapsible, contentType} = useMainPanelContext();
|
|
12
|
-
const dispatch = useDispatch();
|
|
13
|
-
const active = useSelector(userPreferenceListVisibleSelector);
|
|
14
|
-
const handleClick = useCallback(() => {
|
|
15
|
-
dispatch(toggleUserPreferenceListVisible());
|
|
16
|
-
}, [dispatch]);
|
|
17
|
-
|
|
18
|
-
if (collapsible && contentType === "list") {
|
|
19
|
-
return (
|
|
20
|
-
<button
|
|
21
|
-
className={`ms3-button [ ms3-list-toggle-button ${
|
|
22
|
-
active ? "ms3-list-toggle-button--active" : ""
|
|
23
|
-
} ]`}
|
|
24
|
-
type="button"
|
|
25
|
-
role="switch"
|
|
26
|
-
aria-checked={active}
|
|
27
|
-
onClick={handleClick}
|
|
28
|
-
>
|
|
29
|
-
<span className="ms3-visuallyhidden">
|
|
30
|
-
{translate(
|
|
31
|
-
active
|
|
32
|
-
? "ui.main-panel.list-toggle.close"
|
|
33
|
-
: "ui.main-panel.list-toggle.open",
|
|
34
|
-
)}
|
|
35
|
-
</span>
|
|
36
|
-
</button>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default MainPanelListToggleButton;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {object} props props
|
|
3
|
-
* @param {"top-left" | "top-right" | "bottom-right" | "bottom-left"} props.position position
|
|
4
|
-
* @param {React.ReactChildren} props.children children
|
|
5
|
-
* @returns {React.ReactElement} element
|
|
6
|
-
*/
|
|
7
|
-
function MapOverlayArea({position, children}) {
|
|
8
|
-
return (
|
|
9
|
-
<div
|
|
10
|
-
className={`ms3-map-overlay__area ms3-map-overlay__area--${position}`}
|
|
11
|
-
>
|
|
12
|
-
{children}
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default MapOverlayArea;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {memo} from "react";
|
|
2
|
-
|
|
3
|
-
import type {LayerAttributions} from "@mapsight/core/lib/map/selectors";
|
|
4
|
-
|
|
5
|
-
function AttributionEntries({
|
|
6
|
-
children,
|
|
7
|
-
attributions,
|
|
8
|
-
}: {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
attributions?: LayerAttributions;
|
|
11
|
-
}) {
|
|
12
|
-
return (
|
|
13
|
-
<div className="ms3-attribution">
|
|
14
|
-
<ul className="ms3-attribution__entries">
|
|
15
|
-
{attributions &&
|
|
16
|
-
Object.entries(attributions).map(([key, attr]) => (
|
|
17
|
-
<li
|
|
18
|
-
className="ms3-attribution__entry"
|
|
19
|
-
key={key}
|
|
20
|
-
dangerouslySetInnerHTML={{__html: attr}}
|
|
21
|
-
/>
|
|
22
|
-
))}
|
|
23
|
-
{children && (
|
|
24
|
-
<li className="ms3-attribution__entry ms3-attribution__entry--additional">
|
|
25
|
-
{children}
|
|
26
|
-
</li>
|
|
27
|
-
)}
|
|
28
|
-
</ul>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default memo(AttributionEntries);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type {PropsWithChildren} from "react";
|
|
2
|
-
import {useSelector} from "react-redux";
|
|
3
|
-
|
|
4
|
-
import {visibleLayerAttributionsSelector} from "@mapsight/core/lib/map/selectors";
|
|
5
|
-
import type {MapState} from "@mapsight/core/lib/map/types";
|
|
6
|
-
import type {State} from "@mapsight/core/types";
|
|
7
|
-
|
|
8
|
-
import {MAP} from "../../config/constants/controllers";
|
|
9
|
-
import AttributionEntries from "./attribution-entries";
|
|
10
|
-
|
|
11
|
-
function selectVisibleLayerAttributions(state: State) {
|
|
12
|
-
return visibleLayerAttributionsSelector(state[MAP] as MapState);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function Attribution({children}: PropsWithChildren) {
|
|
16
|
-
const attributions = useSelector(selectVisibleLayerAttributions);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<AttributionEntries attributions={attributions ?? undefined}>
|
|
20
|
-
{children}
|
|
21
|
-
</AttributionEntries>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default Attribution;
|