@corpsmap/corpsmap 3.2.68 → 3.2.70
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 +9753 -9753
- package/lib/dev.js +59493 -63306
- package/lib/prod.js +47146 -49749
- package/package.json +19 -20
- package/rollup.config.js +22 -118
- package/src/core-plugins/change-log/bundle.js +3 -4
- package/src/core-plugins/identify/listeners/geojson.js +99 -106
- package/src/core-plugins/identify-geojson/bundle.js +109 -131
- package/lib/corpsmap.css +0 -10185
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpsmap/corpsmap",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.70",
|
|
4
4
|
"description": "CorpsMap as React Components",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
6
|
"scripts": {
|
|
8
7
|
"prepublishOnly": "npm run release",
|
|
9
8
|
"release": "npm run build:dev && npm run build:prod",
|
|
@@ -24,22 +23,22 @@
|
|
|
24
23
|
"babel-plugin-import": "^1.12.2",
|
|
25
24
|
"concurrently": "^5.3.0",
|
|
26
25
|
"cross-env": "^5.2.0",
|
|
27
|
-
"react": "^
|
|
28
|
-
"react-dom": "^
|
|
29
|
-
"rollup": "
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"rollup-plugin-css-only": "
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"rollup-plugin-postcss": "^
|
|
36
|
-
"
|
|
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",
|
|
34
|
+
"rollup-plugin-postcss": "^2.0.3",
|
|
35
|
+
"rollup-plugin-replace": "^2.2.0",
|
|
37
36
|
"styled-jsx": "^3.2.1",
|
|
38
37
|
"wait-on": "^5.2.1"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
41
|
-
"react": ">=
|
|
42
|
-
"react-dom": ">=
|
|
40
|
+
"react": ">= 16.x.x",
|
|
41
|
+
"react-dom": ">=16.x.x"
|
|
43
42
|
},
|
|
44
43
|
"dependencies": {
|
|
45
44
|
"@mapbox/togeojson": "^0.16.0",
|
|
@@ -69,17 +68,17 @@
|
|
|
69
68
|
"markdown-it": "^12.0.3",
|
|
70
69
|
"moment": "^2.29.4",
|
|
71
70
|
"money-clip": "^3.0.1",
|
|
72
|
-
"ol": "^6.
|
|
73
|
-
"ol-esri-style": "^2.
|
|
71
|
+
"ol": "^6.4.3",
|
|
72
|
+
"ol-esri-style": "^2.0.7",
|
|
74
73
|
"parse2-kmz": "^1.0.5",
|
|
75
74
|
"proj4": "^2.4.4",
|
|
76
|
-
"react-data-grid": "
|
|
77
|
-
"react-datepicker": "^
|
|
75
|
+
"react-data-grid": "^6.1.0",
|
|
76
|
+
"react-datepicker": "^2.9.6",
|
|
78
77
|
"react-dnd": "^9.4.0",
|
|
79
78
|
"react-dnd-html5-backend": "^9.4.0",
|
|
80
|
-
"react-notification-system
|
|
79
|
+
"react-notification-system": "^0.2.17",
|
|
81
80
|
"react-split": "^2.0.7",
|
|
82
|
-
"redux-bundler": "^
|
|
81
|
+
"redux-bundler": "^26.0.0",
|
|
83
82
|
"redux-bundler-react": "^1.2.0",
|
|
84
83
|
"shpjs": "^3.4.3",
|
|
85
84
|
"uuid": "^3.3.3",
|
package/rollup.config.js
CHANGED
|
@@ -1,102 +1,12 @@
|
|
|
1
|
-
import babel from "
|
|
2
|
-
import commonjs from "
|
|
3
|
-
import resolve from "
|
|
4
|
-
import replace from "
|
|
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
|
|
7
|
-
import json from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// const pkg = require("./package.json");
|
|
11
|
-
const pkg = {
|
|
12
|
-
name: "@corpsmap/corpsmap",
|
|
13
|
-
version: "3.2.65",
|
|
14
|
-
description: "CorpsMap as React Components",
|
|
15
|
-
main: "index.js",
|
|
16
|
-
type: "module",
|
|
17
|
-
scripts: {
|
|
18
|
-
prepublishOnly: "npm run release",
|
|
19
|
-
release: "npm run build:dev && npm run build:prod",
|
|
20
|
-
"build:dev": "cross-env NODE_ENV=development rollup -c",
|
|
21
|
-
"build:prod": "cross-env NODE_ENV=production rollup -c",
|
|
22
|
-
dev: "cross-env NODE_ENV=development rollup -c --watch",
|
|
23
|
-
test: 'echo "Error: no test specified" && exit 1',
|
|
24
|
-
"sample-app":
|
|
25
|
-
"wait-on file:lib/dev.js && (cd ../corpsmap-test-app && npm run start)",
|
|
26
|
-
"dev-n-sample": 'concurrently "npm run dev" "npm run sample-app"',
|
|
27
|
-
},
|
|
28
|
-
author: "willbreitkreutz",
|
|
29
|
-
license: "MIT",
|
|
30
|
-
devDependencies: {
|
|
31
|
-
"@babel/core": "^7.5.5",
|
|
32
|
-
"@babel/plugin-proposal-class-properties": "^7.5.5",
|
|
33
|
-
"@babel/preset-env": "^7.5.5",
|
|
34
|
-
"@babel/preset-react": "^7.0.0",
|
|
35
|
-
"babel-plugin-import": "^1.12.2",
|
|
36
|
-
concurrently: "^5.3.0",
|
|
37
|
-
"cross-env": "^5.2.0",
|
|
38
|
-
react: "^17.0.2",
|
|
39
|
-
"react-dom": "^17.0.2",
|
|
40
|
-
rollup: "4.5.2",
|
|
41
|
-
"@rollup/plugin-babel": "^6.1.0",
|
|
42
|
-
"@rollup/plugin-commonjs": "^25.0.2",
|
|
43
|
-
"rollup-plugin-css-only": "4.5.5",
|
|
44
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
45
|
-
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
46
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
47
|
-
"@rollup/plugin-replace": "^6.0.2",
|
|
48
|
-
"styled-jsx": "^3.2.1",
|
|
49
|
-
"wait-on": "^5.2.1",
|
|
50
|
-
},
|
|
51
|
-
peerDependencies: {
|
|
52
|
-
react: ">= 17.x.x",
|
|
53
|
-
"react-dom": ">=17.x.x",
|
|
54
|
-
},
|
|
55
|
-
dependencies: {
|
|
56
|
-
"@mapbox/togeojson": "^0.16.0",
|
|
57
|
-
"@turf/bbox": "^6.0.1",
|
|
58
|
-
"@turf/bbox-polygon": "^6.0.1",
|
|
59
|
-
"@turf/boolean-crosses": "^6.0.1",
|
|
60
|
-
"@turf/boolean-disjoint": "^6.0.2",
|
|
61
|
-
"@turf/boolean-point-in-polygon": "^6.0.1",
|
|
62
|
-
"@turf/buffer": "^5.1.5",
|
|
63
|
-
"@turf/center-of-mass": "^6.0.1",
|
|
64
|
-
"@turf/centroid": "^6.0.2",
|
|
65
|
-
"@turf/distance": "^6.0.1",
|
|
66
|
-
"@turf/flatten": "^5.1.5",
|
|
67
|
-
"@turf/helpers": "^6.1.4",
|
|
68
|
-
"@turf/length": "^6.0.2",
|
|
69
|
-
"@turf/line-slice": "^5.1.5",
|
|
70
|
-
async: "^2.6.1",
|
|
71
|
-
classnames: "^2.2.5",
|
|
72
|
-
css: "^2.2.4",
|
|
73
|
-
decompress: "^4.2.1",
|
|
74
|
-
"extract-files": "^12.0.0",
|
|
75
|
-
"file-saver": "^2.0.2",
|
|
76
|
-
"is-html": "^2.0.0",
|
|
77
|
-
jspdf: "^1.5.3",
|
|
78
|
-
kmljs: "0.0.1",
|
|
79
|
-
lodash: "^4.17.15",
|
|
80
|
-
"markdown-it": "^12.0.3",
|
|
81
|
-
moment: "^2.29.4",
|
|
82
|
-
"money-clip": "^3.0.1",
|
|
83
|
-
ol: "^6.4.3",
|
|
84
|
-
"ol-esri-style": "^2.0.7",
|
|
85
|
-
"parse2-kmz": "^1.0.5",
|
|
86
|
-
proj4: "^2.4.4",
|
|
87
|
-
"react-data-grid": "7.0.0-beta.15",
|
|
88
|
-
"react-datepicker": "^3.0.0",
|
|
89
|
-
"react-dnd": "^9.4.0",
|
|
90
|
-
"react-dnd-html5-backend": "^9.4.0",
|
|
91
|
-
"react-notification-system-17": "^1.0.1",
|
|
92
|
-
"react-split": "^2.0.7",
|
|
93
|
-
"redux-bundler": "^29.1.0",
|
|
94
|
-
"redux-bundler-react": "^1.2.0",
|
|
95
|
-
shpjs: "^3.4.3",
|
|
96
|
-
uuid: "^3.3.3",
|
|
97
|
-
xhr: "^2.5.0",
|
|
98
|
-
},
|
|
99
|
-
};
|
|
6
|
+
import postcss from 'rollup-plugin-postcss';
|
|
7
|
+
import json from 'rollup-plugin-json';
|
|
8
|
+
import pkg from './package.json';
|
|
9
|
+
|
|
100
10
|
|
|
101
11
|
const NODE_ENV = process.env.NODE_ENV || "development";
|
|
102
12
|
const outputFile = NODE_ENV === "production" ? "./lib/prod.js" : "./lib/dev.js";
|
|
@@ -105,42 +15,36 @@ export default {
|
|
|
105
15
|
input: "./src/index.js",
|
|
106
16
|
output: {
|
|
107
17
|
file: outputFile,
|
|
108
|
-
format: "cjs"
|
|
18
|
+
format: "cjs"
|
|
109
19
|
},
|
|
110
20
|
plugins: [
|
|
111
21
|
replace({
|
|
112
|
-
"process.env.NODE_ENV": JSON.stringify(NODE_ENV)
|
|
113
|
-
//JB Added below
|
|
114
|
-
preventAssignment: true,
|
|
22
|
+
"process.env.NODE_ENV": JSON.stringify(NODE_ENV)
|
|
115
23
|
}),
|
|
116
24
|
babel({
|
|
117
|
-
plugins:
|
|
118
|
-
extensions: [
|
|
119
|
-
exclude: "node_modules/**"
|
|
25
|
+
plugins:[['import', { libraryName: 'antd', style: true }]],
|
|
26
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
27
|
+
exclude: "node_modules/**"
|
|
120
28
|
}),
|
|
121
29
|
css({
|
|
122
|
-
|
|
123
|
-
// output: "./css/corpsmap.css",
|
|
124
|
-
output: "corpsmap.css",
|
|
30
|
+
output: "./css/corpsmap.css"
|
|
125
31
|
}),
|
|
126
32
|
resolve({
|
|
127
33
|
module: true,
|
|
128
34
|
jsnext: true,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
// },
|
|
133
|
-
moduleDirectories: ["node_modules"],
|
|
35
|
+
customResolveOptions: {
|
|
36
|
+
moduleDirectory: 'node_modules'
|
|
37
|
+
}
|
|
134
38
|
}),
|
|
135
39
|
json(),
|
|
136
40
|
commonjs(),
|
|
137
41
|
postcss({
|
|
138
|
-
extensions: [
|
|
139
|
-
use: [
|
|
140
|
-
})
|
|
42
|
+
extensions: ['.css', '.scss', '.less'],
|
|
43
|
+
use: ['sass', ['less', { javascriptEnabled: true }]],
|
|
44
|
+
})
|
|
141
45
|
],
|
|
142
46
|
external: [
|
|
143
47
|
...Object.keys(pkg.devDependencies || {}),
|
|
144
|
-
...Object.keys(pkg.peerDependencies || {})
|
|
145
|
-
]
|
|
48
|
+
...Object.keys(pkg.peerDependencies || {})
|
|
49
|
+
]
|
|
146
50
|
};
|
|
@@ -55,17 +55,16 @@ export default {
|
|
|
55
55
|
},
|
|
56
56
|
|
|
57
57
|
doSearchChangeLogData: (evt) => ({dispatch, store}) => {
|
|
58
|
-
const targetValue = evt.target.value
|
|
59
|
-
// let logData = store.selectChangeLogItems();
|
|
58
|
+
const targetValue = evt.target.value.trim().toUpperCase();
|
|
60
59
|
let logData = store.selectAllChangeLogItems();
|
|
61
|
-
if(targetValue.length >
|
|
60
|
+
if(targetValue.length > 1){
|
|
62
61
|
const wkLogData = []
|
|
63
62
|
logData.forEach((item) =>{
|
|
64
63
|
let wkKey = {}
|
|
65
64
|
let displayRecord = null;
|
|
66
65
|
for (const [key, value] of Object.entries(item)){
|
|
67
66
|
if (typeof value == "string"){
|
|
68
|
-
let newObj = value.includes(targetValue) ? item: false;
|
|
67
|
+
let newObj = value.trim().toUpperCase().includes(targetValue) ? item: false;
|
|
69
68
|
if (newObj){
|
|
70
69
|
displayRecord = true;
|
|
71
70
|
}
|
|
@@ -2,8 +2,7 @@ import buffer from "@turf/buffer";
|
|
|
2
2
|
import { point } from "@turf/helpers";
|
|
3
3
|
import { polygon } from "@turf/helpers";
|
|
4
4
|
import disjoint from "@turf/boolean-disjoint";
|
|
5
|
-
|
|
6
|
-
// import { join } from "path";
|
|
5
|
+
import { join } from "path";
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
8
|
name: "geojsonIdent",
|
|
@@ -34,116 +33,110 @@ export default {
|
|
|
34
33
|
};
|
|
35
34
|
},
|
|
36
35
|
|
|
37
|
-
doGeojsonIdentRegister:
|
|
38
|
-
(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
doGeojsonIdentRemoveFeatures:
|
|
50
|
-
(uid) =>
|
|
51
|
-
({ dispatch, store }) => {
|
|
52
|
-
dispatch({
|
|
53
|
-
type: "GEOJSON_IDENT_HANDLED_REMOVE",
|
|
54
|
-
payload: { shouldHandleRemove: false },
|
|
55
|
-
});
|
|
56
|
-
const uid = store.selectGeojsonRemovedUid();
|
|
57
|
-
const data = store.selectGeojsonIdentFeatures();
|
|
58
|
-
delete data[uid];
|
|
59
|
-
dispatch({
|
|
60
|
-
type: "GEOJSON_IDENT_REMOVED_FEATURES",
|
|
61
|
-
payload: { data: Object.assign({}, data), removedUid: null },
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
doGeojsonIdentAddFeatures:
|
|
66
|
-
(uid, geojson, mapLayer) =>
|
|
67
|
-
({ dispatch, store }) => {
|
|
68
|
-
const data = store.selectGeojsonIdentFeatures();
|
|
69
|
-
|
|
70
|
-
if (!data[uid])
|
|
71
|
-
data[uid] = {
|
|
72
|
-
features: [],
|
|
73
|
-
maplayer: null,
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
if (geojson) {
|
|
77
|
-
let newFeatures = [];
|
|
78
|
-
if (geojson.length) {
|
|
79
|
-
newFeatures = geojson;
|
|
80
|
-
} else if (geojson.features) {
|
|
81
|
-
newFeatures = geojson.features;
|
|
82
|
-
} else {
|
|
83
|
-
newFeatures = [geojson];
|
|
84
|
-
}
|
|
85
|
-
data[uid].features = [...data[uid].features, ...newFeatures];
|
|
86
|
-
}
|
|
36
|
+
doGeojsonIdentRegister: () => ({ dispatch, store }) => {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: "GEOJSON_IDENT_REGISTERED",
|
|
39
|
+
payload: { shouldRegister: false },
|
|
40
|
+
});
|
|
41
|
+
store.doIdentifyAddCollection({
|
|
42
|
+
onIdentify: store.doGeojsonIdentFire,
|
|
43
|
+
});
|
|
44
|
+
},
|
|
87
45
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
46
|
+
doGeojsonIdentRemoveFeatures: (uid) => ({ dispatch, store }) => {
|
|
47
|
+
dispatch({
|
|
48
|
+
type: "GEOJSON_IDENT_HANDLED_REMOVE",
|
|
49
|
+
payload: { shouldHandleRemove: false },
|
|
50
|
+
});
|
|
51
|
+
const uid = store.selectGeojsonRemovedUid();
|
|
52
|
+
const data = store.selectGeojsonIdentFeatures();
|
|
53
|
+
delete data[uid];
|
|
54
|
+
dispatch({
|
|
55
|
+
type: "GEOJSON_IDENT_REMOVED_FEATURES",
|
|
56
|
+
payload: { data: Object.assign({}, data), removedUid: null },
|
|
57
|
+
});
|
|
58
|
+
},
|
|
91
59
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
units: "kilometers",
|
|
111
|
-
});
|
|
60
|
+
doGeojsonIdentAddFeatures: (uid, geojson, mapLayer) => ({
|
|
61
|
+
dispatch,
|
|
62
|
+
store,
|
|
63
|
+
}) => {
|
|
64
|
+
const data = store.selectGeojsonIdentFeatures();
|
|
65
|
+
|
|
66
|
+
if (!data[uid])
|
|
67
|
+
data[uid] = {
|
|
68
|
+
features: [],
|
|
69
|
+
maplayer: null,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
if (geojson) {
|
|
73
|
+
let newFeatures = [];
|
|
74
|
+
if (geojson.length) {
|
|
75
|
+
newFeatures = geojson;
|
|
76
|
+
} else if (geojson.features) {
|
|
77
|
+
newFeatures = geojson.features;
|
|
112
78
|
} else {
|
|
113
|
-
|
|
79
|
+
newFeatures = [geojson];
|
|
114
80
|
}
|
|
81
|
+
data[uid].features = [...data[uid].features, ...newFeatures];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (mapLayer) {
|
|
85
|
+
data[uid].mapLayer = mapLayer;
|
|
86
|
+
}
|
|
115
87
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
88
|
+
dispatch({
|
|
89
|
+
type: "GEOJSON_IDENT_ADDED_FEATURES",
|
|
90
|
+
payload: { data: Object.assign({}, data) },
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
doGeojsonIdentFire: (callback) => ({ dispatch, store }) => {
|
|
95
|
+
const coords = store.selectIdentifyCoordinates();
|
|
96
|
+
const resolution = store.selectResolution();
|
|
97
|
+
const data = store.selectGeojsonIdentFeatures();
|
|
98
|
+
let identifyFeature = null;
|
|
99
|
+
|
|
100
|
+
if (typeof coords[0] === "number") {
|
|
101
|
+
const pt = point(coords);
|
|
102
|
+
const radius = (resolution * 5) / 1000;
|
|
103
|
+
identifyFeature = buffer(pt, radius, {
|
|
104
|
+
units: "kilometers",
|
|
105
|
+
});
|
|
106
|
+
} else {
|
|
107
|
+
identifyFeature = polygon(coords);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
const out = [];
|
|
112
|
+
|
|
113
|
+
Object.keys(data).forEach((key) => {
|
|
114
|
+
const outFeatures = [];
|
|
115
|
+
const inFeatures = data[key].features;
|
|
116
|
+
const mapLayer = data[key].mapLayer;
|
|
117
|
+
if (mapLayer.getVisible()) {
|
|
118
|
+
inFeatures.forEach((feature) => {
|
|
119
|
+
if (!disjoint(identifyFeature, feature)) outFeatures.push(feature);
|
|
120
|
+
});
|
|
121
|
+
out.push({
|
|
122
|
+
dataset: key,
|
|
123
|
+
err: null,
|
|
124
|
+
result: {
|
|
125
|
+
[key]: {
|
|
126
|
+
type: "FeatureCollection",
|
|
127
|
+
features: outFeatures,
|
|
136
128
|
},
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
callback(null, out);
|
|
135
|
+
} catch (err) {
|
|
136
|
+
console.log(err);
|
|
137
|
+
callback(err);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
147
140
|
|
|
148
141
|
selectGeojsonIdentFeatures: (state) => {
|
|
149
142
|
return state.geojsonIdent.data;
|