@corpsmap/corpsmap 3.2.96 → 3.2.98
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/dist/corpsmap.es.js +34436 -34129
- package/dist/corpsmap.umd.js +149 -149
- package/package.json +12 -2
- 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
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../utils/redux-bundler-react";
|
|
3
|
+
import CatalogList from "./catalog-list";
|
|
4
|
+
import { SearchInput } from "../../application-controls";
|
|
5
|
+
import _ from "lodash";
|
|
6
|
+
|
|
7
|
+
class Catalog extends React.Component {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
|
|
11
|
+
this.state = {
|
|
12
|
+
height: window.innerHeight * 0.75,
|
|
13
|
+
items: [],
|
|
14
|
+
filterString: "",
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
this.close = this.close.bind(this);
|
|
18
|
+
this.updateFilterString = this.updateFilterString.bind(this);
|
|
19
|
+
this.queryCatalog = this.queryCatalog.bind(this);
|
|
20
|
+
|
|
21
|
+
this.debouncedQuery = _.debounce(this.queryCatalog, 200);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
componentDidMount() {
|
|
25
|
+
this.searchInput.setFocus();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
close() {
|
|
29
|
+
const { doModalClose } = this.props;
|
|
30
|
+
doModalClose();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
updateAddedLayers = () => {
|
|
34
|
+
// this.setState({
|
|
35
|
+
// addedLayers: _.flatten(app.actions.getCorpsMapLayerIds())
|
|
36
|
+
// })
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
updateFilterString(val) {
|
|
40
|
+
this.setState(
|
|
41
|
+
{
|
|
42
|
+
filterString: val,
|
|
43
|
+
},
|
|
44
|
+
this.debouncedQuery
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
queryCatalog() {
|
|
49
|
+
const { doCatalogQuery } = this.props;
|
|
50
|
+
const { filterString } = this.state;
|
|
51
|
+
if (filterString.length > 2) {
|
|
52
|
+
doCatalogQuery(filterString);
|
|
53
|
+
} else {
|
|
54
|
+
doCatalogQuery("");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
render() {
|
|
59
|
+
const { theme } = this.props;
|
|
60
|
+
const { height, filterString } = this.state;
|
|
61
|
+
return (
|
|
62
|
+
<div>
|
|
63
|
+
<div className={"modal-header " + theme}>CorpsMap Data Catalog</div>
|
|
64
|
+
<div
|
|
65
|
+
className="modal-body"
|
|
66
|
+
style={{ height: height, top: 0, bottom: 0, left: 0, right: 0 }}
|
|
67
|
+
>
|
|
68
|
+
<p>
|
|
69
|
+
Search for datasets using the input below, click on a dataset to add
|
|
70
|
+
it to the map, once added, the dataset will be highlighted. Remove
|
|
71
|
+
datasets from the map using the controls in the layer tree.
|
|
72
|
+
</p>
|
|
73
|
+
<SearchInput
|
|
74
|
+
ref={(el) => {
|
|
75
|
+
this.searchInput = el;
|
|
76
|
+
}}
|
|
77
|
+
filterString={filterString}
|
|
78
|
+
onUpdate={this.updateFilterString}
|
|
79
|
+
theme={theme}
|
|
80
|
+
placeholder="Search dataset name, team names and descriptions here..."
|
|
81
|
+
size="small"
|
|
82
|
+
/>
|
|
83
|
+
<CatalogList onSetSearchTerm={this.updateFilterString} />
|
|
84
|
+
</div>
|
|
85
|
+
<div className="modal-footer">
|
|
86
|
+
<button className={"btn btn-theme " + theme} onClick={this.close}>
|
|
87
|
+
Close
|
|
88
|
+
</button>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default connect(
|
|
96
|
+
"selectTheme",
|
|
97
|
+
"doModalClose",
|
|
98
|
+
"doCatalogQuery",
|
|
99
|
+
Catalog
|
|
100
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import CatalogButton from './catalog-button';
|
|
2
|
+
import bundle from './bundle';
|
|
3
|
+
|
|
4
|
+
const plugin = {
|
|
5
|
+
pluginName: 'Catalog',
|
|
6
|
+
enabled: true,
|
|
7
|
+
bundle: bundle,
|
|
8
|
+
components:[{
|
|
9
|
+
component: CatalogButton,
|
|
10
|
+
region: 'left-sidebar-top',
|
|
11
|
+
sortOrder: 40
|
|
12
|
+
}]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default plugin;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import ChangeLogModal from "./change-log-modal";
|
|
2
|
+
// const url = `${process.env.REACT_APP_FUDS_CHANGE_LOG_URL}`;
|
|
3
|
+
const url = `${import.meta.env.VITE_APP_FUDS_CHANGE_LOG_URL}`;
|
|
4
|
+
export default {
|
|
5
|
+
name: "changeLog",
|
|
6
|
+
|
|
7
|
+
getReducer: () => {
|
|
8
|
+
const initialData = {
|
|
9
|
+
items: [],
|
|
10
|
+
allItems: [],
|
|
11
|
+
renderModal: false,
|
|
12
|
+
districtFilter: { label: "All Districts", value: "All" },
|
|
13
|
+
searchBarFilter: "",
|
|
14
|
+
executeSearch: false,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (state = initialData, { type, payload }) => {
|
|
18
|
+
switch (type) {
|
|
19
|
+
case "CHANGE_LOG_LOAD_ALL_DATA":
|
|
20
|
+
case "CHANGE_LOG_MODAL_WINDOW_OPENED":
|
|
21
|
+
case "CHANGE_LOG_LOAD_SELECTED_DATA":
|
|
22
|
+
case "CHANGE_LOG_SET_DISTRICT_FILTER":
|
|
23
|
+
case "CHANGE_LOG_SET_SEARCH_BAR_FILTER":
|
|
24
|
+
case "CHANGE_LOG_EXECUTE_SEARCH":
|
|
25
|
+
return Object.assign({}, state, payload);
|
|
26
|
+
default:
|
|
27
|
+
return state;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
doSearchChangeLogData:
|
|
33
|
+
() =>
|
|
34
|
+
({ dispatch, store }) => {
|
|
35
|
+
dispatch({
|
|
36
|
+
type: "CHANGE_LOG_EXECUTE_SEARCH",
|
|
37
|
+
payload: { executeSearch: false },
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
let logData = store.selectAllChangeLogItems();
|
|
41
|
+
let districtFilter = store.selectDistrictFilter();
|
|
42
|
+
let targetValue = store.selectSearchBarFilter().trim().toUpperCase();
|
|
43
|
+
let filteredChangeLogData = [];
|
|
44
|
+
|
|
45
|
+
if (districtFilter.value !== "All") {
|
|
46
|
+
filteredChangeLogData = logData.filter(
|
|
47
|
+
(log) => log.district_code === districtFilter.value
|
|
48
|
+
);
|
|
49
|
+
} else {
|
|
50
|
+
filteredChangeLogData = logData;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (targetValue.length > 0) {
|
|
54
|
+
const wkLogData = [];
|
|
55
|
+
filteredChangeLogData.forEach((item) => {
|
|
56
|
+
let wkKey = {};
|
|
57
|
+
let displayRecord = null;
|
|
58
|
+
|
|
59
|
+
for (const [key, value] of Object.entries(item)) {
|
|
60
|
+
if (typeof value == "string") {
|
|
61
|
+
let newObj = value.trim().toUpperCase().includes(targetValue)
|
|
62
|
+
? item
|
|
63
|
+
: false;
|
|
64
|
+
if (newObj) {
|
|
65
|
+
displayRecord = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (displayRecord) {
|
|
70
|
+
wkLogData.push(item);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
console.log("SELECTED ITEMS");
|
|
75
|
+
console.log(wkLogData);
|
|
76
|
+
dispatch({
|
|
77
|
+
type: "CHANGE_LOG_LOAD_SELECTED_DATA",
|
|
78
|
+
payload: { items: wkLogData },
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
dispatch({
|
|
82
|
+
type: "CHANGE_LOG_LOAD_SELECTED_DATA",
|
|
83
|
+
payload: { items: filteredChangeLogData },
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
doGetChangeLogData:
|
|
89
|
+
() =>
|
|
90
|
+
({ dispatch, store, anonGet }) => {
|
|
91
|
+
anonGet(url, (err, response, body) => {
|
|
92
|
+
if (err || response.statusCode !== 200) {
|
|
93
|
+
} else {
|
|
94
|
+
try {
|
|
95
|
+
console.log("Production Change Log Data");
|
|
96
|
+
console.log(body);
|
|
97
|
+
let data = JSON.parse(body);
|
|
98
|
+
console.log("data");
|
|
99
|
+
console.log(data);
|
|
100
|
+
let items = data.items;
|
|
101
|
+
console.log("ITEMS");
|
|
102
|
+
console.log(items);
|
|
103
|
+
dispatch({
|
|
104
|
+
type: "CHANGE_LOG_LOAD_ALL_DATA",
|
|
105
|
+
payload: { allItems: items, renderModal: false },
|
|
106
|
+
});
|
|
107
|
+
dispatch({
|
|
108
|
+
type: "CHANGE_LOG_LOAD_SELECTED_DATA",
|
|
109
|
+
payload: { items: items, renderModal: true },
|
|
110
|
+
});
|
|
111
|
+
} catch (err) {
|
|
112
|
+
// alert(" ! ! ! ERROR IN CATCH BLOCK ! ! ! ")
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
doOpenModalLog:
|
|
119
|
+
() =>
|
|
120
|
+
({ dispatch, store }) => {
|
|
121
|
+
store.doModalOpen({
|
|
122
|
+
children: [ChangeLogModal],
|
|
123
|
+
options: {},
|
|
124
|
+
openedBy: "ChangeLogButton",
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
dispatch({
|
|
128
|
+
type: "CHANGE_LOG_MODAL_WINDOW_OPENED",
|
|
129
|
+
payload: { renderModal: false },
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
doSetDistrictFilter:
|
|
134
|
+
(opts) =>
|
|
135
|
+
({ dispatch }) => {
|
|
136
|
+
dispatch({
|
|
137
|
+
type: "CHANGE_LOG_SET_DISTRICT_FILTER",
|
|
138
|
+
payload: { districtFilter: opts },
|
|
139
|
+
});
|
|
140
|
+
dispatch({
|
|
141
|
+
type: "CHANGE_LOG_EXECUTE_SEARCH",
|
|
142
|
+
payload: { executeSearch: true },
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
doSetSearchBarFilter:
|
|
147
|
+
(text) =>
|
|
148
|
+
({ dispatch }) => {
|
|
149
|
+
dispatch({
|
|
150
|
+
type: "CHANGE_LOG_SET_SEARCH_BAR_FILTER",
|
|
151
|
+
payload: { searchBarFilter: text },
|
|
152
|
+
});
|
|
153
|
+
dispatch({
|
|
154
|
+
type: "CHANGE_LOG_EXECUTE_SEARCH",
|
|
155
|
+
payload: { executeSearch: true },
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
selectChangeLogItems: (state) => {
|
|
160
|
+
return state.changeLog.items;
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
selectAllChangeLogItems: (state) => {
|
|
164
|
+
return state.changeLog.allItems;
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
selectDistrictFilter: (state) => {
|
|
168
|
+
return state.changeLog.districtFilter;
|
|
169
|
+
},
|
|
170
|
+
selectSearchBarFilter: (state) => {
|
|
171
|
+
return state.changeLog.searchBarFilter;
|
|
172
|
+
},
|
|
173
|
+
reactRenderChangeLogModal: (state) => {
|
|
174
|
+
if (state.changeLog.renderModal) return { actionCreator: "doOpenModalLog" };
|
|
175
|
+
},
|
|
176
|
+
reactDoSearchChangeLogData: (state) => {
|
|
177
|
+
if (state.changeLog.executeSearch)
|
|
178
|
+
return { actionCreator: "doSearchChangeLogData" };
|
|
179
|
+
},
|
|
180
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
import { SidebarButton } from "../../application-controls/index";
|
|
4
|
+
import ChangeLogModal from "./change-log-modal";
|
|
5
|
+
|
|
6
|
+
class ChangeLogButton extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.handleClick = this.handleClick.bind(this);
|
|
10
|
+
this.openModalLog = this.openModalLog.bind(this);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
openModalLog() {
|
|
14
|
+
const { doModalOpen } = this.props;
|
|
15
|
+
doModalOpen({
|
|
16
|
+
children: [ChangeLogModal],
|
|
17
|
+
options: {},
|
|
18
|
+
openedBy: "ChangeLogButton",
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
handleClick() {
|
|
23
|
+
const { doGetChangeLogData } = this.props;
|
|
24
|
+
this.openModalLog();
|
|
25
|
+
doGetChangeLogData();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
render() {
|
|
29
|
+
return (
|
|
30
|
+
<SidebarButton
|
|
31
|
+
iconClass="mdi mdi-exclamation"
|
|
32
|
+
label="Change Log"
|
|
33
|
+
title="Change Log"
|
|
34
|
+
onClick={this.handleClick}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default connect("doModalOpen", "doGetChangeLogData", ChangeLogButton);
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
import { SearchInput, SearchResultsList } from "../../application-controls";
|
|
4
|
+
import SelectDistrict from "./select-district";
|
|
5
|
+
|
|
6
|
+
class ChangeLogModal extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
|
|
10
|
+
this.handleChange = this.handleChange.bind(this);
|
|
11
|
+
this.close = this.close.bind(this);
|
|
12
|
+
this.fomatDate = this.formatDate.bind(this);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
handleChange(event) {
|
|
16
|
+
const { doSetSearchBarFilter } = this.props;
|
|
17
|
+
doSetSearchBarFilter(event.target.value);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
close() {
|
|
21
|
+
const { doModalClose } = this.props;
|
|
22
|
+
doModalClose();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
formatDate(oldDate) {
|
|
26
|
+
let newDate = new Date(oldDate);
|
|
27
|
+
newDate = newDate.toLocaleDateString("default", {
|
|
28
|
+
month: "long",
|
|
29
|
+
day: "numeric",
|
|
30
|
+
year: "numeric",
|
|
31
|
+
});
|
|
32
|
+
return newDate;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
render() {
|
|
36
|
+
const {
|
|
37
|
+
theme,
|
|
38
|
+
doGetChangeLogData,
|
|
39
|
+
changeLogItems,
|
|
40
|
+
allChangeLogItems,
|
|
41
|
+
searchBarFilter,
|
|
42
|
+
} = this.props;
|
|
43
|
+
const loginDataWk = changeLogItems;
|
|
44
|
+
let districtCodes = [
|
|
45
|
+
...new Set(allChangeLogItems.map((feature) => feature.district_code)),
|
|
46
|
+
];
|
|
47
|
+
let options = [];
|
|
48
|
+
|
|
49
|
+
districtCodes.sort().forEach((item, index) => {
|
|
50
|
+
if (item) {
|
|
51
|
+
options.push({
|
|
52
|
+
label: `${item}`,
|
|
53
|
+
value: `${item}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
options.unshift({ label: "All Districts", value: "All" });
|
|
59
|
+
|
|
60
|
+
const arrayDataItems = loginDataWk.map((data) => (
|
|
61
|
+
<div
|
|
62
|
+
key={data.id + data.id + 9876}
|
|
63
|
+
style={
|
|
64
|
+
Object.keys(data).length > 0
|
|
65
|
+
? { listStyleType: "disc" }
|
|
66
|
+
: { listStyleType: "none" }
|
|
67
|
+
}
|
|
68
|
+
>
|
|
69
|
+
{data.change_date ? (
|
|
70
|
+
<li key={data.change_date + data.id}>
|
|
71
|
+
<b>{this.formatDate(data.change_date)}</b>
|
|
72
|
+
</li>
|
|
73
|
+
) : null}
|
|
74
|
+
{data.environment ? (
|
|
75
|
+
<li
|
|
76
|
+
key={data.environment + data.id}
|
|
77
|
+
style={{ listStyleType: "none" }}
|
|
78
|
+
>
|
|
79
|
+
<b>Environment:</b> {data.environment}{" "}
|
|
80
|
+
</li>
|
|
81
|
+
) : null}
|
|
82
|
+
{data.change_type ? (
|
|
83
|
+
<li
|
|
84
|
+
key={data.change_type + data.id}
|
|
85
|
+
style={{ listStyleType: "none" }}
|
|
86
|
+
>
|
|
87
|
+
<b>Change Type:</b> {data.change_type}
|
|
88
|
+
</li>
|
|
89
|
+
) : null}
|
|
90
|
+
{data.district_code ? (
|
|
91
|
+
<li
|
|
92
|
+
key={data.district_code + data.id}
|
|
93
|
+
style={{ listStyleType: "none" }}
|
|
94
|
+
>
|
|
95
|
+
<b>District:</b> {data.district_code}
|
|
96
|
+
</li>
|
|
97
|
+
) : null}
|
|
98
|
+
{data.description ? (
|
|
99
|
+
<li
|
|
100
|
+
key={data.description + data.id}
|
|
101
|
+
style={{ listStyleType: "none" }}
|
|
102
|
+
>
|
|
103
|
+
<b>Description:</b> {data.description}
|
|
104
|
+
</li>
|
|
105
|
+
) : null}
|
|
106
|
+
<br></br>
|
|
107
|
+
</div>
|
|
108
|
+
));
|
|
109
|
+
|
|
110
|
+
const filterStyle = {
|
|
111
|
+
display: "flex",
|
|
112
|
+
justifyContent: "center",
|
|
113
|
+
// alignItems: "center",
|
|
114
|
+
gap: "40px",
|
|
115
|
+
width: "700px",
|
|
116
|
+
alignItems: "flex-end",
|
|
117
|
+
padding: "5px",
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<div>
|
|
122
|
+
<div className={"cm-modal-header " + theme}>Change Log</div>
|
|
123
|
+
|
|
124
|
+
<div className="cm-modal-body">
|
|
125
|
+
<div style={filterStyle}>
|
|
126
|
+
<label style={{ fontSize: "18px", fontWeight: "bold" }}>
|
|
127
|
+
Change Log
|
|
128
|
+
</label>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div style={filterStyle}>
|
|
132
|
+
<label htmlFor="select-district">
|
|
133
|
+
<b>Filter by District:</b>
|
|
134
|
+
</label>
|
|
135
|
+
<SelectDistrict options={options} />
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div style={filterStyle}>
|
|
139
|
+
<label htmlFor="select-district">
|
|
140
|
+
<b>Search:</b>
|
|
141
|
+
</label>
|
|
142
|
+
|
|
143
|
+
<input
|
|
144
|
+
placeholder="Change Log Search..."
|
|
145
|
+
style={{ width: "200px" }}
|
|
146
|
+
value={searchBarFilter}
|
|
147
|
+
onChange={this.handleChange}
|
|
148
|
+
></input>
|
|
149
|
+
</div>
|
|
150
|
+
<div
|
|
151
|
+
style={{
|
|
152
|
+
overflow: "auto scroll",
|
|
153
|
+
width: "875px",
|
|
154
|
+
height: "400px",
|
|
155
|
+
whiteSpace: "pre-wrap",
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<ul>{arrayDataItems}</ul>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div className="cm-modal-footer">
|
|
162
|
+
<br></br>
|
|
163
|
+
<br></br>
|
|
164
|
+
<br></br>
|
|
165
|
+
<button
|
|
166
|
+
style={{ textAlign: "left" }}
|
|
167
|
+
type="Close"
|
|
168
|
+
className={"cm-btn cm-btn-theme " + theme}
|
|
169
|
+
onClick={this.close}
|
|
170
|
+
>
|
|
171
|
+
Close
|
|
172
|
+
</button>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export default connect(
|
|
180
|
+
"selectTheme",
|
|
181
|
+
"selectChangeLogItems",
|
|
182
|
+
"selectAllChangeLogItems",
|
|
183
|
+
"selectSearchBarFilter",
|
|
184
|
+
"doModalClose",
|
|
185
|
+
"doSubmitNotification",
|
|
186
|
+
"doGetChangeLogData",
|
|
187
|
+
"doSearchChangeLogData",
|
|
188
|
+
"doSetSearchBarFilter",
|
|
189
|
+
ChangeLogModal
|
|
190
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import bundle from './bundle';
|
|
2
|
+
import changeLogButton from './change-log-button';
|
|
3
|
+
|
|
4
|
+
const plugin = {
|
|
5
|
+
pluginName: 'changeLog',
|
|
6
|
+
enabled: true,
|
|
7
|
+
bundle: bundle,
|
|
8
|
+
components:[{
|
|
9
|
+
component: changeLogButton,
|
|
10
|
+
region: 'right-sidebar-top',
|
|
11
|
+
sortOrder: 120,
|
|
12
|
+
}],
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default plugin;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
import Select from "react-select";
|
|
4
|
+
|
|
5
|
+
class SelectDistrict extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
handleSelect(opts) {
|
|
11
|
+
const { doSetDistrictFilter } = this.props;
|
|
12
|
+
doSetDistrictFilter(opts);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
render() {
|
|
16
|
+
const { options, districtFilter } = this.props;
|
|
17
|
+
const { label, value } = districtFilter;
|
|
18
|
+
|
|
19
|
+
const customStyles = {
|
|
20
|
+
control: (base) => ({
|
|
21
|
+
...base,
|
|
22
|
+
minHeight: "25px", // Smaller height for the control
|
|
23
|
+
height: "25px",
|
|
24
|
+
fontSize: "14px", // Smaller font size for the selected value
|
|
25
|
+
width: "150px",
|
|
26
|
+
}),
|
|
27
|
+
dropdownIndicator: (base) => ({
|
|
28
|
+
...base,
|
|
29
|
+
paddingTop: 0,
|
|
30
|
+
paddingBottom: 0,
|
|
31
|
+
}),
|
|
32
|
+
clearIndicator: (base) => ({
|
|
33
|
+
...base,
|
|
34
|
+
paddingTop: 0,
|
|
35
|
+
paddingBottom: 0,
|
|
36
|
+
}),
|
|
37
|
+
valueContainer: (base) => ({
|
|
38
|
+
...base,
|
|
39
|
+
padding: "0 8px", // Adjust padding within the value container
|
|
40
|
+
}),
|
|
41
|
+
input: (base) => ({
|
|
42
|
+
...base,
|
|
43
|
+
margin: 0, // Remove default margin for the input
|
|
44
|
+
padding: 0,
|
|
45
|
+
}),
|
|
46
|
+
menu: (base) => ({
|
|
47
|
+
...base,
|
|
48
|
+
fontSize: "14px", // Smaller font size for menu items
|
|
49
|
+
}),
|
|
50
|
+
option: (base) => ({
|
|
51
|
+
...base,
|
|
52
|
+
padding: "5px 14px", // Adjust padding for individual options
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
return (
|
|
56
|
+
<Select
|
|
57
|
+
id={"select-district"}
|
|
58
|
+
options={options}
|
|
59
|
+
onChange={(opts) => {
|
|
60
|
+
this.handleSelect(opts);
|
|
61
|
+
}}
|
|
62
|
+
styles={customStyles}
|
|
63
|
+
value={{ label: label, value: value }}
|
|
64
|
+
defaultValue={{ label: label, value: value }}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export default connect(
|
|
70
|
+
"doSetDistrictFilter",
|
|
71
|
+
"selectDistrictFilter",
|
|
72
|
+
SelectDistrict
|
|
73
|
+
);
|