@corpsmap/corpsmap 3.2.71 → 3.2.76

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpsmap/corpsmap",
3
- "version": "3.2.71",
3
+ "version": "3.2.76",
4
4
  "description": "CorpsMap as React Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,28 +17,32 @@
17
17
  "license": "MIT",
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.5.5",
20
+ "@babel/eslint-parser": "^7.28.5",
20
21
  "@babel/plugin-proposal-class-properties": "^7.5.5",
22
+ "@babel/plugin-transform-numeric-separator": "^7.27.1",
21
23
  "@babel/preset-env": "^7.5.5",
22
24
  "@babel/preset-react": "^7.0.0",
23
25
  "babel-plugin-import": "^1.12.2",
24
26
  "concurrently": "^5.3.0",
25
27
  "cross-env": "^5.2.0",
26
- "react": "^16.9.0",
27
- "react-dom": "^16.9.0",
28
- "rollup": "^1.20.2",
29
- "rollup-plugin-babel": "^4.3.3",
30
- "rollup-plugin-commonjs": "^10.1.0",
31
- "rollup-plugin-css-only": "^1.0.0",
32
- "rollup-plugin-json": "^4.0.0",
33
- "rollup-plugin-node-resolve": "^5.2.0",
28
+ "glob": "^9.0.0",
29
+ "react": "^18.3.0",
30
+ "react-dom": "^18.3.0",
31
+ "rollup": "^2.68.0",
32
+ "@rollup/plugin-babel": "^6.0.3",
33
+ "@rollup/plugin-commonjs": "^24.1.0",
34
+ "rollup-plugin-css-only": "^4.5.2",
35
+ "@rollup/plugin-json": "^6.0.0",
36
+ "@rollup/plugin-node-resolve": "^13.0.6",
37
+ "@rollup/plugin-terser": "^0.4.4",
34
38
  "rollup-plugin-postcss": "^2.0.3",
35
- "rollup-plugin-replace": "^2.2.0",
36
- "styled-jsx": "^3.2.1",
39
+ "@rollup/plugin-replace": "^6.0.2",
40
+ "styled-jsx": "^5.1.6",
37
41
  "wait-on": "^5.2.1"
38
42
  },
39
43
  "peerDependencies": {
40
- "react": ">= 16.x.x",
41
- "react-dom": ">=16.x.x"
44
+ "react": ">= 18.x.x",
45
+ "react-dom": ">=18.x.x"
42
46
  },
43
47
  "dependencies": {
44
48
  "@mapbox/togeojson": "^0.16.0",
@@ -72,16 +76,15 @@
72
76
  "ol-esri-style": "^2.0.7",
73
77
  "parse2-kmz": "^1.0.5",
74
78
  "proj4": "^2.4.4",
75
- "react-data-grid": "^6.1.0",
76
- "react-datepicker": "^2.9.6",
79
+ "react-data-grid": "7.0.0-beta.42",
80
+ "react-datepicker": "^6.9.0",
77
81
  "react-dnd": "^9.4.0",
78
82
  "react-dnd-html5-backend": "^9.4.0",
79
- "react-notification-system": "^0.2.17",
80
83
  "react-split": "^2.0.7",
81
84
  "redux-bundler": "^26.0.0",
82
85
  "redux-bundler-react": "^1.2.0",
83
86
  "shpjs": "^3.4.3",
84
- "uuid": "^3.3.3",
87
+ "uuid": "^7.0.0",
85
88
  "xhr": "^2.5.0"
86
89
  }
87
90
  }
package/rollup.config.js CHANGED
@@ -1,12 +1,12 @@
1
- import babel from "rollup-plugin-babel";
2
- import commonjs from "rollup-plugin-commonjs";
3
- import resolve from "rollup-plugin-node-resolve";
4
- import replace from "rollup-plugin-replace";
1
+ import babel from "@rollup/plugin-babel";
2
+ import commonjs from "@rollup/plugin-commonjs";
3
+ import resolve from "@rollup/plugin-node-resolve";
4
+ import replace from "@rollup/plugin-replace";
5
5
  import css from "rollup-plugin-css-only";
6
- import postcss from 'rollup-plugin-postcss';
7
- import json from 'rollup-plugin-json';
8
- import pkg from './package.json';
9
-
6
+ import postcss from "rollup-plugin-postcss";
7
+ import json from "@rollup/plugin-json";
8
+ import pkg from "./package.json";
9
+ import path from "path";
10
10
 
11
11
  const NODE_ENV = process.env.NODE_ENV || "development";
12
12
  const outputFile = NODE_ENV === "production" ? "./lib/prod.js" : "./lib/dev.js";
@@ -15,36 +15,38 @@ export default {
15
15
  input: "./src/index.js",
16
16
  output: {
17
17
  file: outputFile,
18
- format: "cjs"
18
+ format: "cjs",
19
19
  },
20
20
  plugins: [
21
21
  replace({
22
- "process.env.NODE_ENV": JSON.stringify(NODE_ENV)
22
+ "process.env.NODE_ENV": JSON.stringify(NODE_ENV),
23
23
  }),
24
24
  babel({
25
- plugins:[['import', { libraryName: 'antd', style: true }]],
26
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
27
- exclude: "node_modules/**"
25
+ plugins: [["import", { libraryName: "antd", style: true }]],
26
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
27
+ exclude: "node_modules/**",
28
+ babelHelpers: "bundled",
28
29
  }),
29
30
  css({
30
- output: "./css/corpsmap.css"
31
+ // output: "./css/corpsmap.css",
32
+ extract: path.resolve("./css/corpsmap.css"),
31
33
  }),
32
34
  resolve({
33
35
  module: true,
34
36
  jsnext: true,
35
37
  customResolveOptions: {
36
- moduleDirectory: 'node_modules'
37
- }
38
+ moduleDirectory: "node_modules",
39
+ },
38
40
  }),
39
41
  json(),
40
42
  commonjs(),
41
43
  postcss({
42
- extensions: ['.css', '.scss', '.less'],
43
- use: ['sass', ['less', { javascriptEnabled: true }]],
44
- })
44
+ extensions: [".css", ".scss", ".less"],
45
+ use: ["sass", ["less", { javascriptEnabled: true }]],
46
+ }),
45
47
  ],
46
48
  external: [
47
49
  ...Object.keys(pkg.devDependencies || {}),
48
- ...Object.keys(pkg.peerDependencies || {})
49
- ]
50
+ ...Object.keys(pkg.peerDependencies || {}),
51
+ ],
50
52
  };
@@ -1,4 +1,4 @@
1
- import v4 from "uuid";
1
+ import { v4 } from "uuid";
2
2
  import GeoJSON from "ol/format/GeoJSON";
3
3
  import { getLayer } from "../../openlayers-utils/layer-utilities";
4
4
  import shp from "shpjs";
@@ -1,56 +1,27 @@
1
1
  import ChangeLogModal from "./change-log-modal";
2
2
  const url = `${process.env.REACT_APP_FUDS_CHANGE_LOG_URL}`;
3
3
 
4
- let testData = [
5
- {
6
- id: 4713,
7
- environment: "Public and Internal GIS",
8
- district_code: "MVN",
9
- change_type: "Data Change",
10
- description:
11
- "Update locations for project at Pyote AAF Ground Gunnery Range (K06TX0146)\r\n\r\nOLD COORDINATES:\r\nBombing Range (01) 31.5575 -102.879444\r\nGround Gunnery Range (02) 31.585556 -102.898056\r\nSkeet Range (03) 31.553056 -102.875278\r\n\r\nNEW COORDINATES:\r\nBOMBING RANGE (01) 31.501163 -103.137657\r\nGROUND GUNNERY RANGE (02) 31.586237 -103.101082\r\nSKEET RANGE (03) 31.553096 -103.124618",
12
- create_date: "2023-08-23T15:41:24Z",
13
- change_date: "2023-08-23T15:41:24Z",
14
- },
15
- {
16
- id: 4714,
17
- environment: "Public and Internal GIS",
18
- district_code: "MVD",
19
- change_type: "Data Change",
20
- description:
21
- "Update locations for project at Pyote AAF Ground Gunnery Range (K07TX0146)\r\n\r\nOLD COORDINATES:\r\nBombing Range (01) 31.5575 -102.879444\r\nGround Gunnery Range (02) 31.585556 -102.898056\r\nSkeet Range (03) 31.553056 -102.875278\r\n\r\nNEW COORDINATES:\r\nBOMBING RANGE (01) 31.501163 -103.137657\r\nGROUND GUNNERY RANGE (02) 31.586237 -103.101082\r\nSKEET RANGE (03) 31.553096 -103.124618",
22
- create_date: "2023-07-23T15:41:24Z",
23
- change_date: "2023-07-23T15:41:24Z",
24
- },
25
- {
26
- id: 4715,
27
- environment: "Public and Internal GIS",
28
- district_code: "MVQ",
29
- change_type: "Data Change",
30
- description:
31
- "Update locations for project at Pyote AAF Ground Gunnery Range (K08TX0146)\r\n\r\nOLD COORDINATES:\r\nBombing Range (01) 31.5575 -102.879444\r\nGround Gunnery Range (02) 31.585556 -102.898056\r\nSkeet Range (03) 31.553056 -102.875278\r\n\r\nNEW COORDINATES:\r\nBOMBING RANGE (01) 31.501163 -103.137657\r\nGROUND GUNNERY RANGE (02) 31.586237 -103.101082\r\nSKEET RANGE (03) 31.553096 -103.124618",
32
- create_date: "2023-07-13T15:41:24Z",
33
- change_date: "2023-07-13T15:41:24Z",
34
- },
35
- ];
36
- testData = [];
37
-
38
4
  export default {
39
5
  name: "changeLog",
40
6
 
41
7
  getReducer: () => {
42
8
  const initialData = {
43
- items: testData,
44
- allItems: testData,
9
+ items: [],
10
+ allItems: [],
45
11
  renderModal: false,
12
+ districtFilter: { label: "All Districts", value: "All" },
13
+ searchBarFilter: "",
14
+ executeSearch: false,
46
15
  };
47
16
 
48
17
  return (state = initialData, { type, payload }) => {
49
18
  switch (type) {
50
- case "CHANGE_LOG_LOAD_TEST_DATA":
51
19
  case "CHANGE_LOG_LOAD_ALL_DATA":
52
20
  case "CHANGE_LOG_MODAL_WINDOW_OPENED":
53
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":
54
25
  return Object.assign({}, state, payload);
55
26
  default:
56
27
  return state;
@@ -59,15 +30,32 @@ export default {
59
30
  },
60
31
 
61
32
  doSearchChangeLogData:
62
- (evt) =>
33
+ () =>
63
34
  ({ dispatch, store }) => {
64
- const targetValue = evt.target.value.trim().toUpperCase();
35
+ dispatch({
36
+ type: "CHANGE_LOG_EXECUTE_SEARCH",
37
+ payload: { executeSearch: false },
38
+ });
39
+
65
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
+
66
53
  if (targetValue.length > 0) {
67
54
  const wkLogData = [];
68
- logData.forEach((item) => {
55
+ filteredChangeLogData.forEach((item) => {
69
56
  let wkKey = {};
70
57
  let displayRecord = null;
58
+
71
59
  for (const [key, value] of Object.entries(item)) {
72
60
  if (typeof value == "string") {
73
61
  let newObj = value.trim().toUpperCase().includes(targetValue)
@@ -83,7 +71,6 @@ export default {
83
71
  }
84
72
  });
85
73
 
86
- // logData = wkLogData;
87
74
  console.log("SELECTED ITEMS");
88
75
  console.log(wkLogData);
89
76
  dispatch({
@@ -93,7 +80,7 @@ export default {
93
80
  } else {
94
81
  dispatch({
95
82
  type: "CHANGE_LOG_LOAD_SELECTED_DATA",
96
- payload: { items: logData },
83
+ payload: { items: filteredChangeLogData },
97
84
  });
98
85
  }
99
86
  },
@@ -103,11 +90,6 @@ export default {
103
90
  ({ dispatch, store, anonGet }) => {
104
91
  anonGet(url, (err, response, body) => {
105
92
  if (err || response.statusCode !== 200) {
106
- // On Error Load Test Data
107
- // dispatch({
108
- // type: "CHANGE_LOG_LOAD_TEST_DATA",
109
- // payload: { items: testData, renderModal: true },
110
- // });
111
93
  } else {
112
94
  try {
113
95
  console.log("Production Change Log Data");
@@ -148,6 +130,32 @@ export default {
148
130
  });
149
131
  },
150
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
+
151
159
  selectChangeLogItems: (state) => {
152
160
  return state.changeLog.items;
153
161
  },
@@ -156,7 +164,17 @@ export default {
156
164
  return state.changeLog.allItems;
157
165
  },
158
166
 
167
+ selectDistrictFilter: (state) => {
168
+ return state.changeLog.districtFilter;
169
+ },
170
+ selectSearchBarFilter: (state) => {
171
+ return state.changeLog.searchBarFilter;
172
+ },
159
173
  reactRenderChangeLogModal: (state) => {
160
174
  if (state.changeLog.renderModal) return { actionCreator: "doOpenModalLog" };
161
175
  },
176
+ reactDoSearchChangeLogData: (state) => {
177
+ if (state.changeLog.executeSearch)
178
+ return { actionCreator: "doSearchChangeLogData" };
179
+ },
162
180
  };
@@ -1,85 +1,172 @@
1
1
  import React from "react";
2
2
  import { connect } from "redux-bundler-react";
3
3
  import { SearchInput, SearchResultsList } from "../../application-controls";
4
+ import SelectDistrict from "./select-district";
4
5
 
5
6
  class ChangeLogModal extends React.Component {
6
7
  constructor(props) {
7
8
  super(props);
8
9
 
9
- this.state = {
10
- searchBarStatus: "",
11
- };
12
10
  this.handleChange = this.handleChange.bind(this);
13
11
  this.close = this.close.bind(this);
14
12
  this.fomatDate = this.formatDate.bind(this);
15
13
  }
16
14
 
17
- handleChange(event){
18
- const {doSearchChangeLogData } = this.props;
19
- doSearchChangeLogData(event);
20
- this.setState({
21
- searchBarStatus: event.target.value
22
- })
15
+ handleChange(event) {
16
+ const { doSetSearchBarFilter } = this.props;
17
+ doSetSearchBarFilter(event.target.value);
23
18
  }
24
-
19
+
25
20
  close() {
26
21
  const { doModalClose } = this.props;
27
22
  doModalClose();
28
23
  }
29
24
 
30
- formatDate(oldDate){
25
+ formatDate(oldDate) {
31
26
  let newDate = new Date(oldDate);
32
- newDate = newDate.toLocaleDateString('default', { month: 'long', day: 'numeric', year: 'numeric'});
33
- return newDate
34
- }
35
-
27
+ newDate = newDate.toLocaleDateString("default", {
28
+ month: "long",
29
+ day: "numeric",
30
+ year: "numeric",
31
+ });
32
+ return newDate;
33
+ }
34
+
36
35
  render() {
37
- const { theme, doGetChangeLogData, changeLogItems } = this.props;
36
+ const {
37
+ theme,
38
+ doGetChangeLogData,
39
+ changeLogItems,
40
+ allChangeLogItems,
41
+ searchBarFilter,
42
+ } = this.props;
38
43
  const loginDataWk = changeLogItems;
39
- const arrayDataItems = loginDataWk.map( data =>
40
-
41
- <div key={data.id+data.id+9876} style={Object.keys(data).length > 0 ? {listStyleType: "disc"}: {listStyleType: "none"} }>
42
- {data.change_date ? <li key={data.change_date + data.id}><b>{this.formatDate(data.change_date)}</b></li> : null}
43
- {data.environment ? <li key={data.environment + data.id} style={{listStyleType: "none"}}><b>Environment:</b> {data.environment} </li> : null}
44
- {data.change_type ? <li key={data.change_type + data.id} style={{listStyleType: "none"}}><b>Change Type:</b> {data.change_type}</li> : null}
45
- {data.district_code ? <li key={data.district_code + data.id} style={{listStyleType: "none"}}><b>District:</b> {data.district_code}</li> : null}
46
- {data.description ? <li key={data.description + data.id} style={{listStyleType: "none"}}><b>Description:</b> {data.description}</li> : null}
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}
47
106
  <br></br>
48
107
  </div>
49
-
50
- )
51
-
108
+ ));
109
+
110
+ const filterStyle = {
111
+ // paddingLeft: "25px",
112
+ display: "flex",
113
+ justifyContent: "center",
114
+ alignItems: "center",
115
+ gap: "40px",
116
+ width: "700px",
117
+ alignItems: "flex-end",
118
+ // textAlign: "right",
119
+ // alignItems: "flex-end" /* Aligns content to the right */,
120
+ // width: 300px; /* Example width for the container */
121
+ // border: "1px solid lightgray" /* For visualization */,
122
+ padding: "5px",
123
+ };
124
+
52
125
  return (
53
126
  <div>
54
127
  <div className={"cm-modal-header " + theme}>Change Log</div>
55
- <div
56
- className="cm-modal-body"
57
- style={{ height: 290, top: 0, bottom: 0, left: 0, right: 0 }}
58
- >
59
- <div className="cm-form-group">
60
- <input
61
- placeholder="Change Log Search..."
62
- style={{border: "none", width: 600}}
63
- value={this.state.searchBarStatus}
64
- onChange={this.handleChange}
128
+
129
+ <div className="cm-modal-body">
130
+ <div style={filterStyle}>
131
+ <label style={{ fontSize: "18px", fontWeight: "bold" }}>
132
+ Change Log Filter
133
+ </label>
134
+ </div>
135
+
136
+ <div style={filterStyle}>
137
+ <label htmlFor="select-district">
138
+ <b>Filter by District:</b>
139
+ </label>
140
+ <SelectDistrict options={options} />
141
+ </div>
142
+
143
+ <div style={filterStyle}>
144
+ <label htmlFor="select-district">
145
+ <b>Change Log Search:</b>
146
+ </label>
147
+
148
+ <input
149
+ placeholder="Change Log Search..."
150
+ style={{ width: "200px" }}
151
+ value={searchBarFilter}
152
+ onChange={this.handleChange}
65
153
  ></input>
66
154
  </div>
67
- <div className="cm-form-group">
68
- <div style={{
69
- overflow: "auto scroll",
70
- width: "875px",
71
- height: "300px",
72
- whiteSpace: "pre-wrap",}}>
73
- <ul>{arrayDataItems}</ul>
74
-
75
- </div>
155
+ <div
156
+ style={{
157
+ overflow: "auto scroll",
158
+ width: "875px",
159
+ height: "400px",
160
+ whiteSpace: "pre-wrap",
161
+ }}
162
+ >
163
+ <ul>{arrayDataItems}</ul>
76
164
  </div>
77
165
  </div>
78
166
  <div className="cm-modal-footer">
79
167
  <br></br>
80
168
  <br></br>
81
169
  <br></br>
82
-
83
170
  <button
84
171
  style={{ textAlign: "left" }}
85
172
  type="Close"
@@ -90,7 +177,6 @@ class ChangeLogModal extends React.Component {
90
177
  </button>
91
178
  </div>
92
179
  </div>
93
-
94
180
  );
95
181
  }
96
182
  }
@@ -99,9 +185,11 @@ export default connect(
99
185
  "selectTheme",
100
186
  "selectChangeLogItems",
101
187
  "selectAllChangeLogItems",
188
+ "selectSearchBarFilter",
102
189
  "doModalClose",
103
190
  "doSubmitNotification",
104
191
  "doGetChangeLogData",
105
192
  "doSearchChangeLogData",
193
+ "doSetSearchBarFilter",
106
194
  ChangeLogModal
107
- );
195
+ );
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import { connect } from "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
+ );