@corpsmap/corpsmap 3.2.83 → 3.2.90
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/css/corpsmap.css +113 -112
- package/lib/dev.js +47043 -46560
- package/lib/prod.js +47042 -46559
- package/package.json +11 -12
- package/rollup.config.js +20 -21
- package/src/core-plugins/change-log/change-log-modal.js +197 -195
- package/src/core-plugins/resources/resources-modal.js +79 -49
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpsmap/corpsmap",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.90",
|
|
4
4
|
"description": "CorpsMap as React Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,15 +25,14 @@
|
|
|
25
25
|
"cross-env": "^5.2.0",
|
|
26
26
|
"react": "^16.9.0",
|
|
27
27
|
"react-dom": "^16.9.0",
|
|
28
|
-
"rollup": "^
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"rollup-plugin-css-only": "^
|
|
32
|
-
"
|
|
33
|
-
"
|
|
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",
|
|
34
34
|
"rollup-plugin-postcss": "^2.0.3",
|
|
35
35
|
"rollup-plugin-replace": "^2.2.0",
|
|
36
|
-
"rollup-plugin-peer-deps-external": "^2.0.0",
|
|
37
36
|
"styled-jsx": "^3.2.1",
|
|
38
37
|
"wait-on": "^5.2.1"
|
|
39
38
|
},
|
|
@@ -43,17 +42,17 @@
|
|
|
43
42
|
},
|
|
44
43
|
"dependencies": {
|
|
45
44
|
"@mapbox/togeojson": "^0.16.0",
|
|
46
|
-
"@turf/bbox": "^6.
|
|
45
|
+
"@turf/bbox": "^6.0.1",
|
|
47
46
|
"@turf/bbox-polygon": "^6.0.1",
|
|
48
47
|
"@turf/boolean-crosses": "^6.0.1",
|
|
49
|
-
"@turf/boolean-disjoint": "^6.
|
|
48
|
+
"@turf/boolean-disjoint": "^6.0.2",
|
|
50
49
|
"@turf/boolean-point-in-polygon": "^6.0.1",
|
|
51
50
|
"@turf/buffer": "^5.1.5",
|
|
52
|
-
"@turf/center-of-mass": "^6.
|
|
51
|
+
"@turf/center-of-mass": "^6.0.1",
|
|
53
52
|
"@turf/centroid": "^6.0.2",
|
|
54
53
|
"@turf/distance": "^6.0.1",
|
|
55
54
|
"@turf/flatten": "^5.1.5",
|
|
56
|
-
"@turf/helpers": "^6.
|
|
55
|
+
"@turf/helpers": "^6.1.4",
|
|
57
56
|
"@turf/length": "^6.0.2",
|
|
58
57
|
"@turf/line-slice": "^5.1.5",
|
|
59
58
|
"async": "^2.6.1",
|
package/rollup.config.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import babel from "
|
|
2
|
-
import commonjs from "
|
|
3
|
-
import resolve from "
|
|
1
|
+
import babel from "rollup-plugin-babel";
|
|
2
|
+
import commonjs from "rollup-plugin-commonjs";
|
|
3
|
+
import resolve from "rollup-plugin-node-resolve";
|
|
4
4
|
import replace from "rollup-plugin-replace";
|
|
5
5
|
import css from "rollup-plugin-css-only";
|
|
6
|
-
import postcss from
|
|
7
|
-
import json from
|
|
8
|
-
import pkg from
|
|
6
|
+
import postcss from 'rollup-plugin-postcss';
|
|
7
|
+
import json from 'rollup-plugin-json';
|
|
8
|
+
import pkg from './package.json';
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
const NODE_ENV = process.env.NODE_ENV || "development";
|
|
11
12
|
const outputFile = NODE_ENV === "production" ? "./lib/prod.js" : "./lib/dev.js";
|
|
@@ -14,38 +15,36 @@ export default {
|
|
|
14
15
|
input: "./src/index.js",
|
|
15
16
|
output: {
|
|
16
17
|
file: outputFile,
|
|
17
|
-
format: "cjs"
|
|
18
|
+
format: "cjs"
|
|
18
19
|
},
|
|
19
20
|
plugins: [
|
|
20
21
|
replace({
|
|
21
|
-
"process.env.NODE_ENV": JSON.stringify(NODE_ENV)
|
|
22
|
+
"process.env.NODE_ENV": JSON.stringify(NODE_ENV)
|
|
22
23
|
}),
|
|
23
24
|
babel({
|
|
24
|
-
plugins:
|
|
25
|
-
extensions: [
|
|
26
|
-
exclude: "node_modules/**"
|
|
27
|
-
babelHelpers: "bundled",
|
|
28
|
-
// presets: ['@babel/preset-env'] This may be needed
|
|
25
|
+
plugins:[['import', { libraryName: 'antd', style: true }]],
|
|
26
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
27
|
+
exclude: "node_modules/**"
|
|
29
28
|
}),
|
|
30
29
|
css({
|
|
31
|
-
output: "./css/corpsmap.css"
|
|
30
|
+
output: "./css/corpsmap.css"
|
|
32
31
|
}),
|
|
33
32
|
resolve({
|
|
34
33
|
module: true,
|
|
35
34
|
jsnext: true,
|
|
36
35
|
customResolveOptions: {
|
|
37
|
-
moduleDirectory:
|
|
38
|
-
}
|
|
36
|
+
moduleDirectory: 'node_modules'
|
|
37
|
+
}
|
|
39
38
|
}),
|
|
40
39
|
json(),
|
|
41
40
|
commonjs(),
|
|
42
41
|
postcss({
|
|
43
|
-
extensions: [
|
|
44
|
-
use: [
|
|
45
|
-
})
|
|
42
|
+
extensions: ['.css', '.scss', '.less'],
|
|
43
|
+
use: ['sass', ['less', { javascriptEnabled: true }]],
|
|
44
|
+
})
|
|
46
45
|
],
|
|
47
46
|
external: [
|
|
48
47
|
...Object.keys(pkg.devDependencies || {}),
|
|
49
|
-
...Object.keys(pkg.peerDependencies || {})
|
|
50
|
-
]
|
|
48
|
+
...Object.keys(pkg.peerDependencies || {})
|
|
49
|
+
]
|
|
51
50
|
};
|
|
@@ -1,195 +1,197 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<div className="cm-modal-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<br></br>
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "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
|
+
let offset = newDate.getTimezoneOffset() * 60000;
|
|
28
|
+
let newDate2 = new Date(newDate.getTime() + offset);
|
|
29
|
+
newDate2 = newDate2.toLocaleDateString("default", {
|
|
30
|
+
month: "long",
|
|
31
|
+
day: "numeric",
|
|
32
|
+
year: "numeric",
|
|
33
|
+
});
|
|
34
|
+
return newDate2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
render() {
|
|
38
|
+
const {
|
|
39
|
+
theme,
|
|
40
|
+
doGetChangeLogData,
|
|
41
|
+
changeLogItems,
|
|
42
|
+
allChangeLogItems,
|
|
43
|
+
searchBarFilter,
|
|
44
|
+
} = this.props;
|
|
45
|
+
const loginDataWk = changeLogItems;
|
|
46
|
+
let districtCodes = [
|
|
47
|
+
...new Set(allChangeLogItems.map((feature) => feature.district_code)),
|
|
48
|
+
];
|
|
49
|
+
let options = [];
|
|
50
|
+
|
|
51
|
+
districtCodes.sort().forEach((item, index) => {
|
|
52
|
+
if (item) {
|
|
53
|
+
options.push({
|
|
54
|
+
label: `${item}`,
|
|
55
|
+
value: `${item}`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
options.unshift({ label: "All Districts", value: "All" });
|
|
61
|
+
|
|
62
|
+
const arrayDataItems = loginDataWk.map((data) => (
|
|
63
|
+
<div
|
|
64
|
+
key={data.id + data.id + 9876}
|
|
65
|
+
style={
|
|
66
|
+
Object.keys(data).length > 0
|
|
67
|
+
? { listStyleType: "disc" }
|
|
68
|
+
: { listStyleType: "none" }
|
|
69
|
+
}
|
|
70
|
+
>
|
|
71
|
+
{data.change_date ? (
|
|
72
|
+
<li key={data.change_date + data.id}>
|
|
73
|
+
<b>{this.formatDate(data.change_date)}</b>
|
|
74
|
+
</li>
|
|
75
|
+
) : null}
|
|
76
|
+
{data.environment ? (
|
|
77
|
+
<li
|
|
78
|
+
key={data.environment + data.id}
|
|
79
|
+
style={{ listStyleType: "none" }}
|
|
80
|
+
>
|
|
81
|
+
<b>Environment:</b> {data.environment}{" "}
|
|
82
|
+
</li>
|
|
83
|
+
) : null}
|
|
84
|
+
{data.change_type ? (
|
|
85
|
+
<li
|
|
86
|
+
key={data.change_type + data.id}
|
|
87
|
+
style={{ listStyleType: "none" }}
|
|
88
|
+
>
|
|
89
|
+
<b>Change Type:</b> {data.change_type}
|
|
90
|
+
</li>
|
|
91
|
+
) : null}
|
|
92
|
+
{data.district_code ? (
|
|
93
|
+
<li
|
|
94
|
+
key={data.district_code + data.id}
|
|
95
|
+
style={{ listStyleType: "none" }}
|
|
96
|
+
>
|
|
97
|
+
<b>District:</b> {data.district_code}
|
|
98
|
+
</li>
|
|
99
|
+
) : null}
|
|
100
|
+
{data.description ? (
|
|
101
|
+
<li
|
|
102
|
+
key={data.description + data.id}
|
|
103
|
+
style={{ listStyleType: "none" }}
|
|
104
|
+
>
|
|
105
|
+
<b>Description:</b> {data.description}
|
|
106
|
+
</li>
|
|
107
|
+
) : null}
|
|
108
|
+
<br></br>
|
|
109
|
+
</div>
|
|
110
|
+
));
|
|
111
|
+
|
|
112
|
+
const filterStyle = {
|
|
113
|
+
// paddingLeft: "25px",
|
|
114
|
+
display: "flex",
|
|
115
|
+
justifyContent: "center",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
gap: "40px",
|
|
118
|
+
width: "700px",
|
|
119
|
+
alignItems: "flex-end",
|
|
120
|
+
// textAlign: "right",
|
|
121
|
+
// alignItems: "flex-end" /* Aligns content to the right */,
|
|
122
|
+
// width: 300px; /* Example width for the container */
|
|
123
|
+
// border: "1px solid lightgray" /* For visualization */,
|
|
124
|
+
padding: "5px",
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<div>
|
|
129
|
+
<div className={"cm-modal-header " + theme}>Change Log</div>
|
|
130
|
+
|
|
131
|
+
<div className="cm-modal-body">
|
|
132
|
+
<div style={filterStyle}>
|
|
133
|
+
<label style={{ fontSize: "18px", fontWeight: "bold" }}>
|
|
134
|
+
Change Log
|
|
135
|
+
</label>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div style={filterStyle}>
|
|
139
|
+
<label htmlFor="select-district">
|
|
140
|
+
<b>Filter by District:</b>
|
|
141
|
+
</label>
|
|
142
|
+
<SelectDistrict options={options} />
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div style={filterStyle}>
|
|
146
|
+
<label htmlFor="select-district">
|
|
147
|
+
<b>Search:</b>
|
|
148
|
+
</label>
|
|
149
|
+
|
|
150
|
+
<input
|
|
151
|
+
placeholder="Change Log Search..."
|
|
152
|
+
style={{ width: "200px" }}
|
|
153
|
+
value={searchBarFilter}
|
|
154
|
+
onChange={this.handleChange}
|
|
155
|
+
></input>
|
|
156
|
+
</div>
|
|
157
|
+
<div
|
|
158
|
+
style={{
|
|
159
|
+
overflow: "auto scroll",
|
|
160
|
+
width: "875px",
|
|
161
|
+
height: "400px",
|
|
162
|
+
whiteSpace: "pre-wrap",
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
<ul>{arrayDataItems}</ul>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div className="cm-modal-footer">
|
|
169
|
+
<br></br>
|
|
170
|
+
<br></br>
|
|
171
|
+
<br></br>
|
|
172
|
+
<button
|
|
173
|
+
style={{ textAlign: "left" }}
|
|
174
|
+
type="Close"
|
|
175
|
+
className={"cm-btn cm-btn-theme " + theme}
|
|
176
|
+
onClick={this.close}
|
|
177
|
+
>
|
|
178
|
+
Close
|
|
179
|
+
</button>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export default connect(
|
|
187
|
+
"selectTheme",
|
|
188
|
+
"selectChangeLogItems",
|
|
189
|
+
"selectAllChangeLogItems",
|
|
190
|
+
"selectSearchBarFilter",
|
|
191
|
+
"doModalClose",
|
|
192
|
+
"doSubmitNotification",
|
|
193
|
+
"doGetChangeLogData",
|
|
194
|
+
"doSearchChangeLogData",
|
|
195
|
+
"doSetSearchBarFilter",
|
|
196
|
+
ChangeLogModal
|
|
197
|
+
);
|