@corpsmap/corpsmap 4.0.36 → 4.1.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 +33 -0
- package/dist/corpsmap.css +1 -0
- package/dist/corpsmap.es.js +63856 -0
- package/dist/corpsmap.umd.js +384 -0
- package/dist/vite.svg +1 -0
- package/package.json +73 -32
- package/src/App.css +42 -0
- package/src/App.jsx +12 -0
- package/src/application-bundles/_create-container-bundle.js +102 -0
- package/src/application-bundles/api-bundle.js +76 -0
- package/src/application-bundles/basic-toolbar-bundle.js +57 -0
- package/src/application-bundles/config-bundle.js +38 -0
- package/src/application-bundles/create-ol-map-bundle.jsx +278 -0
- package/src/application-bundles/export-bundle.js +125 -0
- package/src/application-bundles/identify-bundle.js +119 -0
- package/src/application-bundles/index.js +53 -0
- package/src/application-bundles/map-basemap-bundle.js +73 -0
- package/src/application-bundles/map-core-bundle.js +25 -0
- package/src/application-bundles/map-drawing-bundle.js +120 -0
- package/src/application-bundles/map-interaction-bundle.js +50 -0
- package/src/application-bundles/map-layers-bundle.js +816 -0
- package/src/application-bundles/map-proj-bundle.js +144 -0
- package/src/application-bundles/map-view-bundle.jsx +334 -0
- package/src/application-bundles/modal-window-bundle.js +5 -0
- package/src/application-bundles/notification-bundle.js +56 -0
- package/src/application-bundles/plugin-bundle.js +180 -0
- package/src/application-bundles/primary-panel-bundle.js +85 -0
- package/src/application-bundles/search-bundle.js +122 -0
- package/src/application-bundles/south-region-bundle.js +96 -0
- package/src/application-bundles/theme-bundle.js +45 -0
- package/src/application-bundles/vertical-layout-bundle.js +88 -0
- package/src/application-bundles/viewport-bundle.js +43 -0
- package/src/application-bundles/window-location-bundle.js +90 -0
- package/src/application-bundles-old/auth-bundle.js +130 -0
- package/src/application-bundles-old/config-bundle.js +29 -0
- package/src/application-bundles-old/ui-bundle.js +406 -0
- package/src/application-containers/basic-toolbar.jsx +24 -0
- package/src/application-containers/corpsmap.jsx +91 -0
- package/src/application-containers/left-sidebar.jsx +43 -0
- package/src/application-containers/lower-right-toolbar.jsx +29 -0
- package/src/application-containers/map.jsx +57 -0
- package/src/application-containers/modal-window.jsx +34 -0
- package/src/application-containers/north-region.jsx +26 -0
- package/src/application-containers/notification-pane.jsx +37 -0
- package/src/application-containers/notification-quadrant.jsx +20 -0
- package/src/application-containers/notification.jsx +91 -0
- package/src/application-containers/primary-panel.jsx +94 -0
- package/src/application-containers/right-sidebar.jsx +44 -0
- package/src/application-containers/south-region-tab.jsx +60 -0
- package/src/application-containers/south-region.jsx +75 -0
- package/src/application-containers/upper-right-toolbar.jsx +28 -0
- package/src/application-controls/basic-toolbar-button.jsx +124 -0
- package/src/application-controls/basic-toolbar-menu-divider.jsx +11 -0
- package/src/application-controls/basic-toolbar-menu-item.jsx +91 -0
- package/src/application-controls/basic-toolbar-menu-up.jsx +13 -0
- package/src/application-controls/basic-toolbar-menu.jsx +13 -0
- package/src/application-controls/basic-toolbar-submenu.jsx +14 -0
- package/src/application-controls/index.jsx +35 -0
- package/src/application-controls/loading-indicator.jsx +19 -0
- package/src/application-controls/search-input.jsx +55 -0
- package/src/application-controls/search-results-list-item.jsx +50 -0
- package/src/application-controls/search-results-list.jsx +19 -0
- package/src/application-controls/sidebar-button.jsx +69 -0
- package/src/application-controls/sidebar-panel-opener.jsx +63 -0
- package/src/application-controls/tree-list-folder.jsx +46 -0
- package/src/application-controls/tree-list-item.jsx +83 -0
- package/src/application-controls/tree-list.jsx +35 -0
- package/src/application-controls/tree-view.jsx +42 -0
- package/src/application-exports/map-provider.jsx +122 -0
- package/src/assets/react.svg +1 -0
- package/src/config/default-config.js +593 -0
- package/src/core-plugins/add-data/add-data-button.jsx +34 -0
- package/src/core-plugins/add-data/add-geojson.jsx +47 -0
- package/src/core-plugins/add-data/add-kmlfile.jsx +46 -0
- package/src/core-plugins/add-data/add-shapefile.jsx +47 -0
- package/src/core-plugins/add-data/bundle.js +226 -0
- package/src/core-plugins/add-data/index.js +15 -0
- package/src/core-plugins/basemap-switcher/basemap-switcher-button.jsx +18 -0
- package/src/core-plugins/basemap-switcher/basemap-switcher-list-item.jsx +48 -0
- package/src/core-plugins/basemap-switcher/basemap-switcher-list.jsx +37 -0
- package/src/core-plugins/basemap-switcher/index.js +13 -0
- package/src/core-plugins/bookmarks/bookmark-button.jsx +18 -0
- package/src/core-plugins/bookmarks/bookmark-list-item.jsx +79 -0
- package/src/core-plugins/bookmarks/bookmark-list.jsx +31 -0
- package/src/core-plugins/bookmarks/bookmark-panel.jsx +191 -0
- package/src/core-plugins/bookmarks/bundle.js +92 -0
- package/src/core-plugins/bookmarks/index.js +15 -0
- package/src/core-plugins/catalog/bundle.js +109 -0
- package/src/core-plugins/catalog/catalog-button.jsx +33 -0
- package/src/core-plugins/catalog/catalog-error-item.jsx +14 -0
- package/src/core-plugins/catalog/catalog-list-item-loader.jsx +12 -0
- package/src/core-plugins/catalog/catalog-list-item.jsx +118 -0
- package/src/core-plugins/catalog/catalog-list.jsx +78 -0
- package/src/core-plugins/catalog/catalog-modal-window.jsx +100 -0
- package/src/core-plugins/catalog/index.js +15 -0
- package/src/core-plugins/change-log/bundle.js +180 -0
- package/src/core-plugins/change-log/change-log-button.jsx +40 -0
- package/src/core-plugins/change-log/change-log-modal.jsx +190 -0
- package/src/core-plugins/change-log/index.js +15 -0
- package/src/core-plugins/change-log/select-district.jsx +73 -0
- package/src/core-plugins/contact-form/bundle.js +239 -0
- package/src/core-plugins/contact-form/index.js +17 -0
- package/src/core-plugins/contact-form/question-button.jsx +36 -0
- package/src/core-plugins/contact-form/question-modal.jsx +215 -0
- package/src/core-plugins/coordinate-display/bundle.jsx +269 -0
- package/src/core-plugins/coordinate-display/coordinate-display-bar.jsx +66 -0
- package/src/core-plugins/coordinate-display/coordinate-display-proj-item.jsx +60 -0
- package/src/core-plugins/coordinate-display/coordinate-display-settings.jsx +173 -0
- package/src/core-plugins/coordinate-display/coordinate-interaction-bar.jsx +60 -0
- package/src/core-plugins/coordinate-display/coordinate-lat-lon-input.jsx +35 -0
- package/src/core-plugins/coordinate-display/coordinate-popup.jsx +27 -0
- package/src/core-plugins/coordinate-display/index.js +20 -0
- package/src/core-plugins/draw-tools/create-draw-bundle.js +242 -0
- package/src/core-plugins/draw-tools/draw-button.jsx +204 -0
- package/src/core-plugins/draw-tools/draw-label-bundle.js +116 -0
- package/src/core-plugins/draw-tools/draw-modify-bundle.js +156 -0
- package/src/core-plugins/draw-tools/draw-save-bundle.jsx +181 -0
- package/src/core-plugins/draw-tools/draw-styles.js +110 -0
- package/src/core-plugins/draw-tools/draw-tool-item.jsx +67 -0
- package/src/core-plugins/draw-tools/index.js +34 -0
- package/src/core-plugins/draw-tools-old/create-draw-bundle.js +222 -0
- package/src/core-plugins/draw-tools-old/draw-button.js +189 -0
- package/src/core-plugins/draw-tools-old/draw-label-bundle.js +116 -0
- package/src/core-plugins/draw-tools-old/draw-modify-bundle.js +156 -0
- package/src/core-plugins/draw-tools-old/draw-styles.js +110 -0
- package/src/core-plugins/draw-tools-old/draw-tool-item.js +67 -0
- package/src/core-plugins/draw-tools-old/index.js +32 -0
- package/src/core-plugins/editor/bundle.js +472 -0
- package/src/core-plugins/editor/date-editor.js +63 -0
- package/src/core-plugins/editor/date-formatter.js +17 -0
- package/src/core-plugins/editor/editor-base.js +29 -0
- package/src/core-plugins/editor/editor-button.js +224 -0
- package/src/core-plugins/editor/editor-table.js +151 -0
- package/src/core-plugins/editor/index.js +15 -0
- package/src/core-plugins/editor/number-editor.js +57 -0
- package/src/core-plugins/editor/string-editor.js +42 -0
- package/src/core-plugins/geocoder/bundle.jsx +186 -0
- package/src/core-plugins/geocoder/index.js +15 -0
- package/src/core-plugins/geocoder/overlay.jsx +30 -0
- package/src/core-plugins/geocoder/search-bar.js copy.save +123 -0
- package/src/core-plugins/geocoder/search-bar.jsx +121 -0
- package/src/core-plugins/identify/bundle.jsx +709 -0
- package/src/core-plugins/identify/identify-buffer-section.jsx +52 -0
- package/src/core-plugins/identify/identify-buffer-settings.jsx +48 -0
- package/src/core-plugins/identify/identify-button.jsx +100 -0
- package/src/core-plugins/identify/identify-details-table.jsx +121 -0
- package/src/core-plugins/identify/identify-details.js +69 -0
- package/src/core-plugins/identify/identify-popup.jsx +136 -0
- package/src/core-plugins/identify/identify-sidebar-list-item.jsx +106 -0
- package/src/core-plugins/identify/identify-sidebar-list.jsx +63 -0
- package/src/core-plugins/identify/identify-sidebar.jsx +103 -0
- package/src/core-plugins/identify/identify-table-cell.jsx +49 -0
- package/src/core-plugins/identify/identify-table.jsx +319 -0
- package/src/core-plugins/identify/index.js +27 -0
- package/src/core-plugins/identify/listeners/arcgis.js +158 -0
- package/src/core-plugins/identify/listeners/geojson.jsx +164 -0
- package/src/core-plugins/identify/listeners/raster.js +89 -0
- package/src/core-plugins/identify/listeners/vector.jsx +106 -0
- package/src/core-plugins/identify-arcgis-rest/bundle.js +169 -0
- package/src/core-plugins/identify-arcgis-rest/index.js +10 -0
- package/src/core-plugins/identify-cm/bundle.js +82 -0
- package/src/core-plugins/identify-cm/index.js +10 -0
- package/src/core-plugins/identify-geojson/bundle.js +164 -0
- package/src/core-plugins/identify-geojson/index.js +10 -0
- package/src/core-plugins/identify-raster/bundle.js +89 -0
- package/src/core-plugins/identify-raster/index.js +10 -0
- package/src/core-plugins/identify-vector/bundle.jsx +135 -0
- package/src/core-plugins/identify-vector/index.js +10 -0
- package/src/core-plugins/identify-wms/bundle.js +138 -0
- package/src/core-plugins/identify-wms/index.js +10 -0
- package/src/core-plugins/legend/bundle.js +1044 -0
- package/src/core-plugins/legend/index.js +17 -0
- package/src/core-plugins/legend/legend-button.jsx +18 -0
- package/src/core-plugins/legend/legend-header.jsx +43 -0
- package/src/core-plugins/legend/legend-item-multiple.jsx +32 -0
- package/src/core-plugins/legend/legend-item.jsx +20 -0
- package/src/core-plugins/legend/legend-panel.jsx +73 -0
- package/src/core-plugins/login/index.js +13 -0
- package/src/core-plugins/login/login-button.jsx +49 -0
- package/src/core-plugins/map-loading-indicator/bundle.js +31 -0
- package/src/core-plugins/map-loading-indicator/index.js +17 -0
- package/src/core-plugins/map-loading-indicator/loading-indicator.jsx +30 -0
- package/src/core-plugins/measure-tools/bundle.js +286 -0
- package/src/core-plugins/measure-tools/index.js +15 -0
- package/src/core-plugins/measure-tools/measure-options.jsx +89 -0
- package/src/core-plugins/measure-tools/measure-tools-button.jsx +129 -0
- package/src/core-plugins/measure-tools/measure-utils.js +76 -0
- package/src/core-plugins/permalink/bundle.js +57 -0
- package/src/core-plugins/permalink/index.js +15 -0
- package/src/core-plugins/permalink/permalink-button.jsx +38 -0
- package/src/core-plugins/permalink/permalink-modal.jsx +67 -0
- package/src/core-plugins/print-map/bundle.jsx +316 -0
- package/src/core-plugins/print-map/button.jsx +17 -0
- package/src/core-plugins/print-map/index.js +17 -0
- package/src/core-plugins/resources/bundle.js +96 -0
- package/src/core-plugins/resources/index.js +15 -0
- package/src/core-plugins/resources/resources-button.jsx +40 -0
- package/src/core-plugins/resources/resources-modal.jsx +151 -0
- package/src/core-plugins/rotate-north/index.js +13 -0
- package/src/core-plugins/rotate-north/rotate-north-button.jsx +38 -0
- package/src/core-plugins/theme-switcher/bundle.js +16 -0
- package/src/core-plugins/theme-switcher/index.js +15 -0
- package/src/core-plugins/theme-switcher/theme-list-item.jsx +25 -0
- package/src/core-plugins/theme-switcher/theme-list.jsx +28 -0
- package/src/core-plugins/theme-switcher/theme-switcher-button.jsx +18 -0
- package/src/core-plugins/theme-switcher/themes.js +121 -0
- package/src/core-plugins/three-d/index.js +13 -0
- package/src/core-plugins/three-d/three-d-button.jsx +44 -0
- package/src/core-plugins/tree-view/boundary-drop-target.jsx +42 -0
- package/src/core-plugins/tree-view/bundle.js +513 -0
- package/src/core-plugins/tree-view/dataset-info-modal.jsx +141 -0
- package/src/core-plugins/tree-view/dataset-legend.jsx +122 -0
- package/src/core-plugins/tree-view/defaults-container.jsx +27 -0
- package/src/core-plugins/tree-view/download-bundle.js +156 -0
- package/src/core-plugins/tree-view/favorites-container.jsx +27 -0
- package/src/core-plugins/tree-view/index.js +25 -0
- package/src/core-plugins/tree-view/layer-subpanel/defaults-toggle.jsx +28 -0
- package/src/core-plugins/tree-view/layer-subpanel/download-layer.jsx +54 -0
- package/src/core-plugins/tree-view/layer-subpanel/favorites-toggle.jsx +28 -0
- package/src/core-plugins/tree-view/layer-subpanel/label-toggle.jsx +39 -0
- package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.jsx +179 -0
- package/src/core-plugins/tree-view/layer-subpanel/natick-rgb-options.jsx +66 -0
- package/src/core-plugins/tree-view/layer-subpanel/natick-rgb.jsx +112 -0
- package/src/core-plugins/tree-view/layer-subpanel/opacity-slider.jsx +51 -0
- package/src/core-plugins/tree-view/layer-subpanel/remove-layer.jsx +75 -0
- package/src/core-plugins/tree-view/tree-list-container.jsx +22 -0
- package/src/core-plugins/tree-view/tree-list-item-dataset.jsx +174 -0
- package/src/core-plugins/tree-view/tree-list-item-folder.jsx +161 -0
- package/src/core-plugins/tree-view/tree-list-item.jsx +35 -0
- package/src/core-plugins/tree-view/tree-list.jsx +37 -0
- package/src/core-plugins/tree-view/tree-view-button.jsx +18 -0
- package/src/core-plugins/tree-view/tree-view-panel.jsx +139 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/add-all.jsx +28 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/defaults.jsx +40 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/favorites.jsx +40 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/remove-all.jsx +28 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/toggle-expand.jsx +47 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/toggle-filter.jsx +39 -0
- package/src/core-plugins/vector-search/bundle.js +96 -0
- package/src/core-plugins/vector-search/index.js +10 -0
- package/src/core-plugins/zoom-home/bundle.js +77 -0
- package/src/core-plugins/zoom-home/index.js +19 -0
- package/src/core-plugins/zoom-home/zoom-home-button.jsx +57 -0
- package/src/core-plugins/zoom-in-out/index.js +23 -0
- package/src/core-plugins/zoom-in-out/zoom-in-button.jsx +28 -0
- package/src/core-plugins/zoom-in-out/zoom-out-button.jsx +28 -0
- package/src/core-plugins/zoom-level/bundle.js +35 -0
- package/src/core-plugins/zoom-level/index.js +17 -0
- package/src/core-plugins/zoom-level/zoom-indicator.jsx +34 -0
- package/src/core-plugins/zoom-to-box/bundle.js +80 -0
- package/src/core-plugins/zoom-to-box/index.jsx +15 -0
- package/src/core-plugins/zoom-to-box/zoom-to-box-button.jsx +53 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-paper.css +7606 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-paper.min.css +8083 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-simplex.min.css +7328 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.css +587 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.css.map +1 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.min.css +6 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.min.css.map +1 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.css +7137 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.css.map +142 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.min.css +7132 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.min.css.map +143 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/css/_deprecated_bootstrap/js/bootstrap.js +2377 -0
- package/src/css/_deprecated_bootstrap/js/bootstrap.min.js +7 -0
- package/src/css/_deprecated_bootstrap/js/npm.js +13 -0
- package/src/css/_deprecated_maki/css/maki.css +304 -0
- package/src/css/_deprecated_maki/fonts/maki.eot +0 -0
- package/src/css/_deprecated_maki/fonts/maki.svg +98 -0
- package/src/css/_deprecated_maki/fonts/maki.ttf +0 -0
- package/src/css/_deprecated_maki/fonts/maki.woff +0 -0
- package/src/css/bg-colors.css +121 -0
- package/src/css/cm-icons/css/cm-icons.css +90 -0
- package/src/css/cm-icons/fonts/cm.eot +0 -0
- package/src/css/cm-icons/fonts/cm.svg +27 -0
- package/src/css/cm-icons/fonts/cm.ttf +0 -0
- package/src/css/cm-icons/fonts/cm.woff +0 -0
- package/src/css/corpsmap-namespaced.css +9505 -0
- package/src/css/corpsmap.css +10178 -0
- package/src/css/loading-indicator.css +109 -0
- package/src/css/mapskin/OFL.txt +94 -0
- package/src/css/mapskin/css/mapskin.css +815 -0
- package/src/css/mapskin/css/mapskin.min.css +8 -0
- package/src/css/mapskin/fonts/mapskin.eot +0 -0
- package/src/css/mapskin/fonts/mapskin.svg +282 -0
- package/src/css/mapskin/fonts/mapskin.ttf +0 -0
- package/src/css/mapskin/fonts/mapskin.woff +0 -0
- package/src/css/mdi/.github/ISSUE_TEMPLATE.md +3 -0
- package/src/css/mdi/README.md +24 -0
- package/src/css/mdi/bower.json +22 -0
- package/src/css/mdi/css/materialdesignicons.css +18654 -0
- package/src/css/mdi/css/materialdesignicons.css.map +16 -0
- package/src/css/mdi/css/materialdesignicons.min.css +3 -0
- package/src/css/mdi/css/materialdesignicons.min.css.map +16 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.eot +0 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.ttf +0 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.woff +0 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/src/css/mdi/license.md +97 -0
- package/src/css/mdi/package.json +37 -0
- package/src/css/mdi/preview.html +717 -0
- package/src/css/mdi/scss/_animated.scss +27 -0
- package/src/css/mdi/scss/_core.scss +10 -0
- package/src/css/mdi/scss/_extras.scss +65 -0
- package/src/css/mdi/scss/_functions.scss +20 -0
- package/src/css/mdi/scss/_icons.scss +10 -0
- package/src/css/mdi/scss/_path.scss +10 -0
- package/src/css/mdi/scss/_variables.scss +4606 -0
- package/src/css/mdi/scss/materialdesignicons.scss +8 -0
- package/src/css/navigation.css +174 -0
- package/src/css/parse-css.js +26 -0
- package/src/css/reset.css +48 -0
- package/src/index.css +68 -0
- package/src/index.jsx +113 -0
- package/src/main.jsx +3 -0
- package/src/openlayers-utils/format-utilities.js +178 -0
- package/src/openlayers-utils/interaction-creator.js +31 -0
- package/src/openlayers-utils/layer-utilities.js +309 -0
- package/src/openlayers-utils/map-utils.js +25 -0
- package/src/openlayers-utils/resource-utilities.js +38 -0
- package/src/openlayers-utils/vector-style.js +131 -0
- package/src/utils/cache.js +6 -0
- package/src/utils/check-webgl.js +6 -0
- package/src/utils/error-boundary.js +26 -0
- package/src/utils/load-plugins.js +32 -0
- package/src/utils/load-plugins.test.js +36 -0
- package/src/utils/plugin-region.jsx +26 -0
- package/src/utils/redux-bundler-react.jsx +69 -0
- package/src/utils/scale-to-zoom-level.js +37 -0
- package/src/utils/vector-styles.js +7 -0
- package/.babelrc +0 -7
- package/config/basemaps.js +0 -22
- package/css/corpsmap.css +0 -7982
- package/index.js +0 -5
- package/lib/dev.js +0 -41440
- package/lib/prod.js +0 -41406
- package/rollup.config.js +0 -30
- package/src/bundles/DEPRECATE_map-view-bundle.js +0 -34
- package/src/bundles/_template-bundle-creator.js +0 -49
- package/src/bundles/create-basemap-bundle-old.js +0 -107
- package/src/bundles/create-basemap-bundle.js +0 -133
- package/src/bundles/create-ol-map-bundle.js +0 -166
- package/src/bundles/create-ol-view-bundle.js +0 -79
- package/src/bundles/map-basemap-bundle.js +0 -42
- package/src/bundles/map-bundle.js +0 -90
- package/src/bundles/map-interaction-bundle.js +0 -57
- package/src/bundles/map-measure-bundle.js +0 -61
- package/src/components/BasemapSwitcherLight/BasemapMenu.js +0 -26
- package/src/components/BasemapSwitcherLight/BasemapMenuItem.js +0 -31
- package/src/components/BasemapSwitcherLight/index.js +0 -25
- package/src/components/Control-Regions/BtnContainer.js +0 -20
- package/src/components/Control-Regions/Right.js +0 -30
- package/src/components/Control-Regions/Top.js +0 -19
- package/src/components/Control-Regions/index.js +0 -4
- package/src/components/LayerTree/index.js +0 -10
- package/src/components/Map.js +0 -56
- package/src/components/MeasureTool/Content.js +0 -53
- package/src/components/MeasureTool/index.js +0 -169
- package/src/components/MeasureTool/measure-utils.js +0 -69
- package/src/components/Zoom/index.js +0 -48
- package/src/components/index.js +0 -3
- package/src/index.js +0 -10
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
import BookmarkList from "./bookmark-list";
|
|
4
|
+
import classnames from "classnames";
|
|
5
|
+
|
|
6
|
+
class BookmarkPanel extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.state = {
|
|
10
|
+
name: "",
|
|
11
|
+
delay: 3000,
|
|
12
|
+
animating: false,
|
|
13
|
+
animIdx: 0,
|
|
14
|
+
};
|
|
15
|
+
this.updateName = this.updateName.bind(this);
|
|
16
|
+
this.updateDelay = this.updateDelay.bind(this);
|
|
17
|
+
this.handleKeyUp = this.handleKeyUp.bind(this);
|
|
18
|
+
this.save = this.save.bind(this);
|
|
19
|
+
this.play = this.play.bind(this);
|
|
20
|
+
this.stop = this.stop.bind(this);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
handleKeyUp(e) {
|
|
24
|
+
if (e.keyCode === 13) {
|
|
25
|
+
this.save();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
updateName(e) {
|
|
30
|
+
const val = e.currentTarget.value;
|
|
31
|
+
this.setState({
|
|
32
|
+
name: val,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
updateDelay(e) {
|
|
37
|
+
const val = e.currentTarget.value;
|
|
38
|
+
this.setState({
|
|
39
|
+
delay: val,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
save() {
|
|
44
|
+
const { name } = this.state;
|
|
45
|
+
const { doSaveBookmark, viewState } = this.props;
|
|
46
|
+
const newBookmark = Object.assign({ name: name }, viewState);
|
|
47
|
+
this.setState(
|
|
48
|
+
{
|
|
49
|
+
name: "",
|
|
50
|
+
},
|
|
51
|
+
() => {
|
|
52
|
+
doSaveBookmark(newBookmark);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
componentWillUnmount() {
|
|
58
|
+
this.stop();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
UNSAFE_componentWillReceiveProps(newProps) {
|
|
62
|
+
const { bookmarkAnimationIdx, bookmarksIsAnimating } = newProps;
|
|
63
|
+
if (
|
|
64
|
+
bookmarksIsAnimating &&
|
|
65
|
+
bookmarkAnimationIdx !== this.props.bookmarkAnimationIdx
|
|
66
|
+
)
|
|
67
|
+
this.goToBookmark(bookmarkAnimationIdx);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// componentDidUpdate(){
|
|
71
|
+
// const { bookmarkAnimationIdx, bookmarksIsAnimating } = this.props;
|
|
72
|
+
// if(bookmarksIsAnimating) this.goToBookmark(bookmarkAnimationIdx);
|
|
73
|
+
// }
|
|
74
|
+
|
|
75
|
+
goToBookmark(idx) {
|
|
76
|
+
const { bookmarks, doGoToBookmark } = this.props;
|
|
77
|
+
doGoToBookmark(bookmarks[idx]);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
play(e) {
|
|
81
|
+
if (e.currentTarget.disabled) return;
|
|
82
|
+
const {
|
|
83
|
+
doIncrementBookmarkAnimation,
|
|
84
|
+
doStartBookmarkAnimation,
|
|
85
|
+
bookmarkAnimationIdx,
|
|
86
|
+
} = this.props;
|
|
87
|
+
const { delay } = this.state;
|
|
88
|
+
doStartBookmarkAnimation();
|
|
89
|
+
this.counter = window.setInterval(doIncrementBookmarkAnimation, delay);
|
|
90
|
+
this.goToBookmark(bookmarkAnimationIdx);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
stop() {
|
|
94
|
+
const { doStopBookmarkAnimation } = this.props;
|
|
95
|
+
window.clearInterval(this.counter);
|
|
96
|
+
doStopBookmarkAnimation();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
render() {
|
|
100
|
+
const { name, delay } = this.state;
|
|
101
|
+
const { bookmarksLength, bookmarksIsAnimating } = this.props;
|
|
102
|
+
const disabled = name === "";
|
|
103
|
+
const btnClass = classnames({
|
|
104
|
+
"cm-btn": true,
|
|
105
|
+
"cm-btn-default": true,
|
|
106
|
+
"cm-btn-sm": true,
|
|
107
|
+
disabled: disabled,
|
|
108
|
+
});
|
|
109
|
+
return (
|
|
110
|
+
<div>
|
|
111
|
+
<div className="cm-form-group">
|
|
112
|
+
<div className="cm-input-group">
|
|
113
|
+
<input
|
|
114
|
+
onChange={this.updateName}
|
|
115
|
+
onKeyUp={this.handleKeyUp}
|
|
116
|
+
value={name}
|
|
117
|
+
type="text"
|
|
118
|
+
className="cm-form-control cm-input-sm"
|
|
119
|
+
placeholder="Name Bookmark..."
|
|
120
|
+
></input>
|
|
121
|
+
<span className="cm-input-group-btn">
|
|
122
|
+
<button
|
|
123
|
+
disabled={disabled}
|
|
124
|
+
onClick={this.save}
|
|
125
|
+
className={btnClass}
|
|
126
|
+
type="button"
|
|
127
|
+
>
|
|
128
|
+
<i className="mdi mdi-map-marker-plus icon-inline"></i>
|
|
129
|
+
Add New
|
|
130
|
+
</button>
|
|
131
|
+
</span>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<BookmarkList />
|
|
136
|
+
|
|
137
|
+
<div
|
|
138
|
+
className="cm-form-group"
|
|
139
|
+
style={{ position: "absolute", bottom: 0, left: 10, right: 12 }}
|
|
140
|
+
>
|
|
141
|
+
<div className="cm-input-group">
|
|
142
|
+
<input
|
|
143
|
+
disabled={bookmarksLength < 2 || bookmarksIsAnimating}
|
|
144
|
+
onChange={this.updateDelay}
|
|
145
|
+
value={delay}
|
|
146
|
+
type="number"
|
|
147
|
+
min={1000}
|
|
148
|
+
className="cm-form-control cm-input-sm"
|
|
149
|
+
placeholder="Delay..."
|
|
150
|
+
title="Animation Delay in Milliseconds"
|
|
151
|
+
></input>
|
|
152
|
+
<span className="cm-input-group-btn">
|
|
153
|
+
<button
|
|
154
|
+
disabled={bookmarksLength < 2 || bookmarksIsAnimating}
|
|
155
|
+
onClick={this.play}
|
|
156
|
+
className={btnClass}
|
|
157
|
+
type="button"
|
|
158
|
+
>
|
|
159
|
+
<i className="mdi mdi-play"></i>
|
|
160
|
+
</button>
|
|
161
|
+
</span>
|
|
162
|
+
<span className="cm-input-group-btn">
|
|
163
|
+
<button
|
|
164
|
+
disabled={bookmarksLength < 2 || !bookmarksIsAnimating}
|
|
165
|
+
onClick={this.stop}
|
|
166
|
+
className={btnClass}
|
|
167
|
+
type="button"
|
|
168
|
+
>
|
|
169
|
+
<i className="mdi mdi-stop"></i>
|
|
170
|
+
</button>
|
|
171
|
+
</span>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export default connect(
|
|
180
|
+
"selectViewState",
|
|
181
|
+
"selectBookmarks",
|
|
182
|
+
"selectBookmarksLength",
|
|
183
|
+
"selectBookmarksIsAnimating",
|
|
184
|
+
"selectBookmarkAnimationIdx",
|
|
185
|
+
"doSaveBookmark",
|
|
186
|
+
"doGoToBookmark",
|
|
187
|
+
"doStartBookmarkAnimation",
|
|
188
|
+
"doStopBookmarkAnimation",
|
|
189
|
+
"doIncrementBookmarkAnimation",
|
|
190
|
+
BookmarkPanel
|
|
191
|
+
);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'bookmarks',
|
|
3
|
+
|
|
4
|
+
getReducer: () => {
|
|
5
|
+
const initialData = {
|
|
6
|
+
data: [],
|
|
7
|
+
animIdx: 0,
|
|
8
|
+
isAnimating: false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return (state = initialData, { type, payload }) => {
|
|
12
|
+
|
|
13
|
+
if(type === 'BOOKMARK_SAVED'){
|
|
14
|
+
return Object.assign({}, state, payload);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if(type === 'BOOKMARK_DELETED'){
|
|
18
|
+
return Object.assign({}, state, payload);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if(type === 'BOOKMARK_ANIMATION_INCREMENT'){
|
|
22
|
+
return Object.assign({}, state, payload);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if(type === 'BOOKMARK_ANIMATION_STARTED'){
|
|
26
|
+
return Object.assign({}, state, {
|
|
27
|
+
isAnimating: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if(type === 'BOOKMARK_ANIMATION_STOPPED'){
|
|
32
|
+
return Object.assign({}, state, {
|
|
33
|
+
animIdx: 0,
|
|
34
|
+
isAnimating: false
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return state;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
doSaveBookmark: (bookmark) => ({ dispatch, store }) => {
|
|
43
|
+
const bookmarks = store.selectBookmarks().slice()
|
|
44
|
+
bookmarks.push(bookmark);
|
|
45
|
+
dispatch({type: 'BOOKMARK_SAVED', payload: { data: bookmarks }});
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
doDeleteBookmark: (bookmark) => ({ dispatch, store }) => {
|
|
49
|
+
const bookmarks = store.selectBookmarks().slice();
|
|
50
|
+
const idx = bookmarks.indexOf(bookmark);
|
|
51
|
+
bookmarks.splice(idx, 1);
|
|
52
|
+
dispatch({type: 'BOOKMARK_DELETED', payload: { data: bookmarks }});
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
doGoToBookmark: (bookmark) => ({ dispatch, store }) => {
|
|
56
|
+
store.doSetView(bookmark);
|
|
57
|
+
dispatch({type: 'BOOKMARK_NAVIGATED'})
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
doIncrementBookmarkAnimation: () => ({dispatch, store}) => {
|
|
61
|
+
const len = store.selectBookmarksLength();
|
|
62
|
+
const currentIdx = store.selectBookmarkAnimationIdx();
|
|
63
|
+
const newIdx = (currentIdx + 1) % len;
|
|
64
|
+
dispatch({type: 'BOOKMARK_ANIMATION_INCREMENT', payload: { animIdx: newIdx }})
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
doStartBookmarkAnimation: () => ({dispatch}) => {
|
|
68
|
+
dispatch({type: 'BOOKMARK_ANIMATION_STARTED'});
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
doStopBookmarkAnimation: () => ({dispatch}) => {
|
|
72
|
+
dispatch({type: 'BOOKMARK_ANIMATION_STOPPED'});
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
selectBookmarks: (state) => {
|
|
76
|
+
return state.bookmarks.data;
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
selectBookmarksLength: (state) => {
|
|
80
|
+
return state.bookmarks.data.length;
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
selectBookmarksIsAnimating: (state) => {
|
|
84
|
+
return state.bookmarks.isAnimating;
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
selectBookmarkAnimationIdx: (state) => {
|
|
88
|
+
return state.bookmarks.animIdx;
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
persistActions: ['BOOKMARK_SAVED', 'BOOKMARK_DELETED']
|
|
92
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import BookmarkButton from './bookmark-button';
|
|
2
|
+
import bundle from './bundle';
|
|
3
|
+
|
|
4
|
+
const plugin = {
|
|
5
|
+
pluginName: 'Bookmarks',
|
|
6
|
+
enabled: true,
|
|
7
|
+
bundle: bundle,
|
|
8
|
+
components:[{
|
|
9
|
+
component: BookmarkButton,
|
|
10
|
+
region: 'left-sidebar-top',
|
|
11
|
+
sortOrder: 40
|
|
12
|
+
}]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default plugin;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
name: 'catalog',
|
|
5
|
+
|
|
6
|
+
getReducer(){
|
|
7
|
+
const initialData = {
|
|
8
|
+
filter: '',
|
|
9
|
+
limit: 10,
|
|
10
|
+
offset: 0,
|
|
11
|
+
items: [],
|
|
12
|
+
shouldQuery: true,
|
|
13
|
+
loading: false,
|
|
14
|
+
err: null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return (state = initialData, { type, payload }) => {
|
|
18
|
+
|
|
19
|
+
if(type === 'CATALOG_API_LOADING'){
|
|
20
|
+
return Object.assign({}, state, payload);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if(type === 'CATALOG_API_ERROR'){
|
|
24
|
+
return Object.assign({}, state, payload);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if(type === 'CATALOG_API_LOADED'){
|
|
28
|
+
return Object.assign({}, state, payload);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if(type === 'CATALOG_QUERIED'){
|
|
32
|
+
return Object.assign({}, state, payload);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if(type === 'CATALOG_PAGED_UP'){
|
|
36
|
+
return Object.assign({}, state, payload);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if(type === 'AUTH_LOGGED_IN'){
|
|
40
|
+
return Object.assign({}, state, {
|
|
41
|
+
shouldQuery: true
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if(type === 'AUTH_LOGGED_OUT'){
|
|
46
|
+
return Object.assign({}, state, {
|
|
47
|
+
shouldQuery: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return state;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
doLoadCatalog: () => ({ dispatch, store, apiGet }) => {
|
|
56
|
+
dispatch({type:'CATALOG_API_LOADING', payload: { shouldQuery: false, loading: true }});
|
|
57
|
+
const root = store.selectApiRoot();
|
|
58
|
+
const { limit, offset, filter, items } = store.selectCatalogState();
|
|
59
|
+
apiGet(`${root}/metadata/catalogsearch?limit=${limit}&offset=${offset}&q=${filter}`,
|
|
60
|
+
(err, response, body) => {
|
|
61
|
+
if(err){
|
|
62
|
+
dispatch({type:'CATALOG_API_ERROR', payload: { loading: false, err: { err, response }}});
|
|
63
|
+
}else{
|
|
64
|
+
const json = JSON.parse(body);
|
|
65
|
+
if(json){
|
|
66
|
+
dispatch({type:'CATALOG_API_LOADED', payload: { loading: false, items: items.concat(_.flatten(json))}});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
doCatalogQuery: (filter) => ({ dispatch }) => {
|
|
73
|
+
dispatch({type: 'CATALOG_QUERIED', payload: { shouldQuery: true, filter: filter, items: [], offset: 0 }});
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
doCatalogPageUp: () => ({ dispatch, store }) => {
|
|
77
|
+
const { limit, offset } = store.selectCatalogState();
|
|
78
|
+
dispatch({type: 'CATALOG_PAGED_UP', payload: { shouldQuery: true, offset: offset + limit }})
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
selectCatalogState: (state) => {
|
|
82
|
+
return state.catalog;
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
selectCatalogFilter: (state) => {
|
|
86
|
+
return state.catalog.filter;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
selectCatalogLimit: (state) => {
|
|
90
|
+
return state.catalog.limit;
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
selectCatalogOffset: (state) => {
|
|
94
|
+
return state.catalog.offset;
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
selectCatalogItems: (state) => {
|
|
98
|
+
return state.catalog.items;
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
selectCatalogIsLoading: (state) => {
|
|
102
|
+
return state.catalog.loading;
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
reactShouldQuery: (state) => {
|
|
106
|
+
if(state.catalog.shouldQuery) return { actionCreator: 'doLoadCatalog' };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../utils/redux-bundler-react";
|
|
3
|
+
import { SidebarButton } from "../../application-controls/index";
|
|
4
|
+
import Catalog from "./catalog-modal-window";
|
|
5
|
+
|
|
6
|
+
class CatalogButton extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.handleClick = this.handleClick.bind(this);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
handleClick() {
|
|
13
|
+
const { doModalOpen } = this.props;
|
|
14
|
+
doModalOpen({
|
|
15
|
+
children: [Catalog],
|
|
16
|
+
options: {},
|
|
17
|
+
openedBy: "Catalog",
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return (
|
|
23
|
+
<SidebarButton
|
|
24
|
+
iconClass="mdi mdi-database-plus"
|
|
25
|
+
label="Data Catalog"
|
|
26
|
+
title="Data Catalog"
|
|
27
|
+
onClick={this.handleClick}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default connect("doModalOpen", CatalogButton);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
class CatalogErrorItem extends React.Component{
|
|
4
|
+
render(){
|
|
5
|
+
return (
|
|
6
|
+
<li className="cm-list-group-item" style={{textAlign:'center'}}>
|
|
7
|
+
<h5>Error getting catalog data</h5>
|
|
8
|
+
<p>It looks like we're having some network problems querying the catalog, if this persists please let the CorpsMap team know</p>
|
|
9
|
+
</li>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default CatalogErrorItem;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoadingIndicator } from '../../application-controls';
|
|
3
|
+
|
|
4
|
+
class CatalogListItemLoader extends React.Component {
|
|
5
|
+
render(){
|
|
6
|
+
return (
|
|
7
|
+
<LoadingIndicator text="Loading" />
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default CatalogListItemLoader;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* eslint jsx-a11y/anchor-is-valid: 0 */
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { connect } from "../utils/redux-bundler-react";
|
|
4
|
+
import classnames from "classnames";
|
|
5
|
+
import moment from "moment";
|
|
6
|
+
|
|
7
|
+
class CatalogListItem extends React.Component {
|
|
8
|
+
handleClick = (e) => {
|
|
9
|
+
const { active, item, doAddLayer, treeViewRootId } = this.props;
|
|
10
|
+
if (!active) {
|
|
11
|
+
item.parentUid = treeViewRootId;
|
|
12
|
+
item.visible = true;
|
|
13
|
+
doAddLayer(item);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
setSearchTerm = (e) => {
|
|
18
|
+
e.stopPropagation();
|
|
19
|
+
const val = e.currentTarget.innerText;
|
|
20
|
+
const { onSetSearchTerm } = this.props;
|
|
21
|
+
onSetSearchTerm(val);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
render() {
|
|
25
|
+
const { active, item, theme } = this.props;
|
|
26
|
+
const { keywords } = item;
|
|
27
|
+
const keywordArray = keywords ? keywords.split(",") : [];
|
|
28
|
+
if (item.nationalData) keywordArray.push("National Data");
|
|
29
|
+
|
|
30
|
+
const iconClass = classnames({
|
|
31
|
+
"dataset-list-icon": true,
|
|
32
|
+
"pull-left": true,
|
|
33
|
+
"dataset-national": item.national,
|
|
34
|
+
ms: true,
|
|
35
|
+
"ms-points": item.geometryType === "POINT",
|
|
36
|
+
"ms-line": item.geometryType === "LINE",
|
|
37
|
+
"ms-polygon": item.geometryType === "POLYGON",
|
|
38
|
+
"ms ms-shp": item.geometryType === "SERVICE",
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const listItemClass = classnames({
|
|
42
|
+
"cm-list-group-item": true,
|
|
43
|
+
"dataset-list-item": true,
|
|
44
|
+
[theme]: active,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const Rows = (
|
|
48
|
+
<span className="info-item">
|
|
49
|
+
{item.numRows ? `(${item.numRows})` : null}
|
|
50
|
+
</span>
|
|
51
|
+
);
|
|
52
|
+
const DateAdded = (
|
|
53
|
+
<span className="info-item">
|
|
54
|
+
{moment(item.createDate, "YYYY-MM-DDTh:mm:ssZ").fromNow()}
|
|
55
|
+
</span>
|
|
56
|
+
);
|
|
57
|
+
const AddedBy = (
|
|
58
|
+
<span
|
|
59
|
+
title={"Added to " + item.teamName + " by " + item.createdByUsername}
|
|
60
|
+
className="info-item"
|
|
61
|
+
>
|
|
62
|
+
{item.createdByUsername}
|
|
63
|
+
</span>
|
|
64
|
+
);
|
|
65
|
+
const AddedTo = (
|
|
66
|
+
<a
|
|
67
|
+
onClick={this.setSearchTerm}
|
|
68
|
+
title={"Added to " + item.teamName + " by " + item.createdByUsername}
|
|
69
|
+
data-filter="true"
|
|
70
|
+
key={item.id + "-teamName"}
|
|
71
|
+
className="keyword-pill"
|
|
72
|
+
>
|
|
73
|
+
{item.teamName}
|
|
74
|
+
</a>
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<li onClick={this.handleClick} className={listItemClass}>
|
|
79
|
+
<div className="row">
|
|
80
|
+
<span className="col-xs-1">
|
|
81
|
+
<i className={iconClass}></i>
|
|
82
|
+
</span>
|
|
83
|
+
<span className="col-xs-5 dataset-display-name">
|
|
84
|
+
{item.displayName}
|
|
85
|
+
<div className="dataset-list-description">{item.description}</div>
|
|
86
|
+
</span>
|
|
87
|
+
<span className="col-xs-6 align-right">
|
|
88
|
+
{Rows}
|
|
89
|
+
{DateAdded}
|
|
90
|
+
{AddedBy}
|
|
91
|
+
{AddedTo}
|
|
92
|
+
<div>
|
|
93
|
+
{keywordArray.map((keyword, i) => {
|
|
94
|
+
return (
|
|
95
|
+
<span
|
|
96
|
+
onClick={this.setSearchTerm}
|
|
97
|
+
key={i}
|
|
98
|
+
className="label label-default"
|
|
99
|
+
style={{ marginRight: "3px" }}
|
|
100
|
+
>
|
|
101
|
+
{keyword}
|
|
102
|
+
</span>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</div>
|
|
106
|
+
</span>
|
|
107
|
+
</div>
|
|
108
|
+
</li>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default connect(
|
|
114
|
+
"selectTheme",
|
|
115
|
+
"selectTreeViewRootId",
|
|
116
|
+
"doAddLayer",
|
|
117
|
+
CatalogListItem
|
|
118
|
+
);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
import CatalogErrorItem from "./catalog-error-item";
|
|
4
|
+
import CatalogListItem from "./catalog-list-item";
|
|
5
|
+
import CatalogListItemLoader from "./catalog-list-item-loader";
|
|
6
|
+
|
|
7
|
+
class CatalogList extends React.Component {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.amidonescrolling = this.amidonescrolling.bind(this);
|
|
11
|
+
this.addItems = this.addItems.bind(this);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
amidonescrolling() {
|
|
15
|
+
const clientHeight = this.el.clientHeight;
|
|
16
|
+
const scrollTop = this.el.scrollTop;
|
|
17
|
+
const scrollHeight = this.el.scrollHeight;
|
|
18
|
+
const isDone = scrollHeight - (clientHeight + scrollTop) === 0;
|
|
19
|
+
if (isDone) this.addItems();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
addItems() {
|
|
23
|
+
const { doCatalogPageUp } = this.props;
|
|
24
|
+
doCatalogPageUp();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
componentDidMount() {
|
|
28
|
+
this.el.addEventListener("scroll", this.amidonescrolling.bind(this));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
componentWillUnmount() {
|
|
32
|
+
this.el.removeEventListener("scroll", this.amidonescrolling.bind(this));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
render() {
|
|
36
|
+
const { catalogItems, catalogIsLoading, onSetSearchTerm, cmLayers } =
|
|
37
|
+
this.props;
|
|
38
|
+
return (
|
|
39
|
+
<ul
|
|
40
|
+
ref={(el) => {
|
|
41
|
+
this.el = el;
|
|
42
|
+
}}
|
|
43
|
+
className="cm-list-group thin-scrollbar"
|
|
44
|
+
style={{
|
|
45
|
+
position: "absolute",
|
|
46
|
+
top: "95px",
|
|
47
|
+
bottom: 0,
|
|
48
|
+
left: 0,
|
|
49
|
+
right: 0,
|
|
50
|
+
margin: "15px",
|
|
51
|
+
overflow: "auto",
|
|
52
|
+
border: "1px solid #dddddd",
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{catalogItems.map((item, i) => {
|
|
56
|
+
if (item === "error") return <CatalogErrorItem key={i} />;
|
|
57
|
+
return (
|
|
58
|
+
<CatalogListItem
|
|
59
|
+
key={i + item.displayName}
|
|
60
|
+
active={cmLayers.indexOf(item.teamDatasetId) !== -1}
|
|
61
|
+
item={item}
|
|
62
|
+
onSetSearchTerm={onSetSearchTerm}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
66
|
+
{catalogIsLoading ? <CatalogListItemLoader /> : null}
|
|
67
|
+
</ul>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default connect(
|
|
73
|
+
"selectCatalogIsLoading",
|
|
74
|
+
"selectCatalogItems",
|
|
75
|
+
"selectCmLayers",
|
|
76
|
+
"doCatalogPageUp",
|
|
77
|
+
CatalogList
|
|
78
|
+
);
|