@corpsmap/corpsmap 3.2.76 → 3.2.78
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/.babelrc +10 -2
- package/lib/dev.js +58298 -58392
- package/lib/prod.js +43837 -43931
- package/package.json +22 -18
- package/src/application-bundles/api-bundle.js +34 -32
- package/src/application-bundles/map-layers-bundle.js +38 -33
- package/src/application-bundles/notification-bundle.js +35 -31
- package/src/application-bundles/south-region-bundle.js +48 -41
- package/src/application-bundles-old/ui-bundle.js +239 -179
- package/src/core-plugins/coordinate-display/bundle.js +189 -166
- package/src/core-plugins/basemap-switcher/basemap-switcher-list-item copy.js +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpsmap/corpsmap",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.78",
|
|
4
4
|
"description": "CorpsMap as React Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,27 +16,30 @@
|
|
|
16
16
|
"author": "willbreitkreutz",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@babel/
|
|
20
|
-
"@babel/
|
|
21
|
-
"@babel/
|
|
19
|
+
"@babel/cli": "^7.28.3",
|
|
20
|
+
"@babel/core": "^7.28.5",
|
|
21
|
+
"@babel/eslint-parser": "^7.26.10",
|
|
22
|
+
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
22
23
|
"@babel/plugin-transform-numeric-separator": "^7.27.1",
|
|
23
|
-
"@babel/preset-env": "^7.
|
|
24
|
-
"@babel/preset-react": "^7.
|
|
25
|
-
"
|
|
24
|
+
"@babel/preset-env": "^7.28.5",
|
|
25
|
+
"@babel/preset-react": "^7.28.5",
|
|
26
|
+
"@rollup/plugin-babel": "^6.0.3",
|
|
27
|
+
"@rollup/plugin-commonjs": "^28.0.9",
|
|
28
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
29
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
30
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
31
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
32
|
+
"babel-loader": "^10.0.0",
|
|
33
|
+
"babel-plugin-import": "^1.13.8",
|
|
26
34
|
"concurrently": "^5.3.0",
|
|
27
35
|
"cross-env": "^5.2.0",
|
|
28
36
|
"glob": "^9.0.0",
|
|
29
37
|
"react": "^18.3.0",
|
|
30
38
|
"react-dom": "^18.3.0",
|
|
39
|
+
"react-select": "^5.10.2",
|
|
31
40
|
"rollup": "^2.68.0",
|
|
32
|
-
"@rollup/plugin-babel": "^6.0.3",
|
|
33
|
-
"@rollup/plugin-commonjs": "^24.1.0",
|
|
34
41
|
"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",
|
|
38
42
|
"rollup-plugin-postcss": "^2.0.3",
|
|
39
|
-
"@rollup/plugin-replace": "^6.0.2",
|
|
40
43
|
"styled-jsx": "^5.1.6",
|
|
41
44
|
"wait-on": "^5.2.1"
|
|
42
45
|
},
|
|
@@ -46,11 +49,11 @@
|
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
48
51
|
"@mapbox/togeojson": "^0.16.0",
|
|
49
|
-
"@turf/bbox": "^
|
|
50
|
-
"@turf/bbox-polygon": "^
|
|
51
|
-
"@turf/boolean-crosses": "^
|
|
52
|
-
"@turf/boolean-disjoint": "^
|
|
53
|
-
"@turf/boolean-point-in-polygon": "^
|
|
52
|
+
"@turf/bbox": "^7.2.0",
|
|
53
|
+
"@turf/bbox-polygon": "^7.2.0",
|
|
54
|
+
"@turf/boolean-crosses": "^7.2.0",
|
|
55
|
+
"@turf/boolean-disjoint": "^7.2.0",
|
|
56
|
+
"@turf/boolean-point-in-polygon": "^7.2.0",
|
|
54
57
|
"@turf/buffer": "^5.1.5",
|
|
55
58
|
"@turf/center-of-mass": "^6.0.1",
|
|
56
59
|
"@turf/centroid": "^6.0.2",
|
|
@@ -78,6 +81,7 @@
|
|
|
78
81
|
"proj4": "^2.4.4",
|
|
79
82
|
"react-data-grid": "7.0.0-beta.42",
|
|
80
83
|
"react-datepicker": "^6.9.0",
|
|
84
|
+
"react-select": "^5.10.2",
|
|
81
85
|
"react-dnd": "^9.4.0",
|
|
82
86
|
"react-dnd-html5-backend": "^9.4.0",
|
|
83
87
|
"react-split": "^2.0.7",
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
import xhr from
|
|
1
|
+
import xhr from "xhr";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
name:
|
|
4
|
+
name: "api",
|
|
5
5
|
|
|
6
6
|
getReducer: () => {
|
|
7
|
+
const root = `${process.env.REACT_APP_CM_ENV}`;
|
|
7
8
|
const initialData = {
|
|
8
|
-
root:
|
|
9
|
-
}
|
|
9
|
+
root: root === "undefined" ? "development" : root,
|
|
10
|
+
};
|
|
10
11
|
|
|
11
12
|
return (state = initialData, { type, payload }) => {
|
|
12
13
|
return state;
|
|
13
|
-
}
|
|
14
|
+
};
|
|
14
15
|
},
|
|
15
16
|
|
|
16
17
|
selectApiRoot: (state) => {
|
|
17
|
-
return process.env.NODE_ENV===
|
|
18
|
+
return process.env.NODE_ENV === "development"
|
|
19
|
+
? state.api.root
|
|
20
|
+
: state.windowLocation.origin;
|
|
18
21
|
},
|
|
19
22
|
|
|
20
23
|
getExtraArgs: (store) => {
|
|
21
|
-
|
|
22
24
|
return {
|
|
23
25
|
anonGet: (path, callback) => {
|
|
24
26
|
const options = {
|
|
25
|
-
url: path
|
|
26
|
-
}
|
|
27
|
-
xhr.get(options, callback)
|
|
27
|
+
url: path,
|
|
28
|
+
};
|
|
29
|
+
xhr.get(options, callback);
|
|
28
30
|
},
|
|
29
31
|
|
|
30
32
|
apiGet: (path, callback) => {
|
|
31
33
|
// const token = store.selectTokenRaw();
|
|
32
34
|
const token = null;
|
|
33
35
|
const options = {
|
|
34
|
-
url: path
|
|
35
|
-
}
|
|
36
|
-
if(token){
|
|
36
|
+
url: path,
|
|
37
|
+
};
|
|
38
|
+
if (token) {
|
|
37
39
|
options.headers = {
|
|
38
|
-
Authorization: "Bearer " + token
|
|
39
|
-
}
|
|
40
|
+
Authorization: "Bearer " + token,
|
|
41
|
+
};
|
|
40
42
|
}
|
|
41
|
-
xhr.get(options, callback)
|
|
43
|
+
xhr.get(options, callback);
|
|
42
44
|
},
|
|
43
45
|
|
|
44
46
|
apiPost: (path, payload, callback) => {
|
|
@@ -46,29 +48,29 @@ export default {
|
|
|
46
48
|
const token = null;
|
|
47
49
|
const options = {
|
|
48
50
|
url: path,
|
|
49
|
-
json: payload
|
|
50
|
-
}
|
|
51
|
-
if(token){
|
|
51
|
+
json: payload,
|
|
52
|
+
};
|
|
53
|
+
if (token) {
|
|
52
54
|
options.headers = {
|
|
53
|
-
Authorization: "Bearer " + token
|
|
54
|
-
}
|
|
55
|
+
Authorization: "Bearer " + token,
|
|
56
|
+
};
|
|
55
57
|
}
|
|
56
|
-
xhr.post(options, callback)
|
|
58
|
+
xhr.post(options, callback);
|
|
57
59
|
},
|
|
58
60
|
|
|
59
61
|
apiDel: (path, callback) => {
|
|
60
62
|
// const token = store.selectTokenRaw();
|
|
61
63
|
const token = null;
|
|
62
64
|
const options = {
|
|
63
|
-
url: path
|
|
64
|
-
}
|
|
65
|
-
if(token){
|
|
65
|
+
url: path,
|
|
66
|
+
};
|
|
67
|
+
if (token) {
|
|
66
68
|
options.headers = {
|
|
67
|
-
Authorization: "Bearer " + token
|
|
68
|
-
}
|
|
69
|
+
Authorization: "Bearer " + token,
|
|
70
|
+
};
|
|
69
71
|
}
|
|
70
|
-
xhr.del(options, callback)
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
72
|
+
xhr.del(options, callback);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getLayer } from "../openlayers-utils/layer-utilities";
|
|
2
|
-
import v4 from "uuid/v4";
|
|
2
|
+
import { v4 } from "uuid/v4";
|
|
3
3
|
import { createSelector } from "redux-bundler";
|
|
4
4
|
import scaleToMapZoom from "../utils/scale-to-zoom-level";
|
|
5
5
|
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
109
109
|
favoriteLayers: [],
|
|
110
110
|
userDefaultLayers: [],
|
|
111
111
|
overrideSortLayerOrder: false,
|
|
112
|
-
sortOrderStatus: false
|
|
112
|
+
sortOrderStatus: false,
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
return (state = initialData, { type, payload }) => {
|
|
@@ -133,7 +133,7 @@ export default {
|
|
|
133
133
|
resetNeeded: false,
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
if (type === "LAYERS_ORDER_OVERRIDE_SORT_ORDER") {
|
|
138
138
|
return Object.assign({}, state, payload);
|
|
139
139
|
}
|
|
@@ -196,21 +196,24 @@ export default {
|
|
|
196
196
|
Object.keys(layers).forEach((uid) => {
|
|
197
197
|
const lyr = layers[uid];
|
|
198
198
|
lyr.passFilter = false;
|
|
199
|
-
const hasString =
|
|
200
|
-
|
|
199
|
+
const hasString =
|
|
200
|
+
lyr.displayName.toUpperCase().indexOf(filterString.toUpperCase()) !==
|
|
201
|
+
-1;
|
|
201
202
|
|
|
202
203
|
if (lyr.groupTag && lyr.groupTag.length > 0) {
|
|
203
204
|
lyr.groupTag.forEach((tag) => {
|
|
204
|
-
const hasTag =
|
|
205
|
+
const hasTag =
|
|
206
|
+
tag &&
|
|
207
|
+
tag.toUpperCase().indexOf(filterString.toUpperCase()) !== -1;
|
|
205
208
|
if (hasTag) {
|
|
206
209
|
lyr.passFilter = true;
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
|
-
}
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
210
213
|
|
|
211
214
|
if (hasString) {
|
|
212
215
|
lyr.passFilter = true;
|
|
213
|
-
}
|
|
216
|
+
}
|
|
214
217
|
});
|
|
215
218
|
|
|
216
219
|
Object.keys(layers).forEach((uid) => {
|
|
@@ -534,16 +537,15 @@ export default {
|
|
|
534
537
|
type: "LAYERS_LIST_UPDATED",
|
|
535
538
|
payload: Object.assign({}, layers),
|
|
536
539
|
});
|
|
537
|
-
|
|
538
|
-
if(node.visible && node.layerFunction && node.layerParams) {
|
|
540
|
+
|
|
541
|
+
if (node.visible && node.layerFunction && node.layerParams) {
|
|
539
542
|
const params = node.layerParams;
|
|
540
543
|
const layerFunction = node.layerFunction;
|
|
541
544
|
const storeFunction = store[layerFunction];
|
|
542
|
-
if(storeFunction) {
|
|
545
|
+
if (storeFunction) {
|
|
543
546
|
storeFunction(params);
|
|
544
547
|
}
|
|
545
548
|
}
|
|
546
|
-
|
|
547
549
|
},
|
|
548
550
|
|
|
549
551
|
doLayerSetLabels:
|
|
@@ -612,10 +614,9 @@ export default {
|
|
|
612
614
|
function setOrder(node) {
|
|
613
615
|
let sortOrder = o--;
|
|
614
616
|
if (node.mapLayer) {
|
|
615
|
-
if(overrideSortOrder) {
|
|
617
|
+
if (overrideSortOrder) {
|
|
616
618
|
node.mapLayer.setZIndex(node.sortOrder);
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
+
} else {
|
|
619
620
|
node.sortOrder = sortOrder;
|
|
620
621
|
node.mapLayer.setZIndex(sortOrder);
|
|
621
622
|
}
|
|
@@ -704,25 +705,29 @@ export default {
|
|
|
704
705
|
payload: Object.assign({}, layers),
|
|
705
706
|
});
|
|
706
707
|
},
|
|
707
|
-
|
|
708
|
-
doOverrideSortOrder:
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
payload: {
|
|
712
|
-
overrideSortLayerOrder: setting,
|
|
713
|
-
},
|
|
714
|
-
});
|
|
715
|
-
},
|
|
716
|
-
doShowLayerSortOrder: (bool) => ({ dispatch }) => {
|
|
717
|
-
if(bool){
|
|
708
|
+
|
|
709
|
+
doOverrideSortOrder:
|
|
710
|
+
(setting) =>
|
|
711
|
+
({ dispatch }) => {
|
|
718
712
|
dispatch({
|
|
719
|
-
type: "
|
|
713
|
+
type: "LAYERS_ORDER_OVERRIDE_SORT_ORDER",
|
|
720
714
|
payload: {
|
|
721
|
-
|
|
715
|
+
overrideSortLayerOrder: setting,
|
|
722
716
|
},
|
|
723
717
|
});
|
|
724
|
-
}
|
|
725
|
-
|
|
718
|
+
},
|
|
719
|
+
doShowLayerSortOrder:
|
|
720
|
+
(bool) =>
|
|
721
|
+
({ dispatch }) => {
|
|
722
|
+
if (bool) {
|
|
723
|
+
dispatch({
|
|
724
|
+
type: "SORT_ORDER_NOW_SHOWING",
|
|
725
|
+
payload: {
|
|
726
|
+
sortOrderStatus: true,
|
|
727
|
+
},
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
},
|
|
726
731
|
selectSortOrderStatus: (state) => {
|
|
727
732
|
return state.layers.sortOrderStatus;
|
|
728
733
|
},
|
|
@@ -797,7 +802,7 @@ export default {
|
|
|
797
802
|
selectLayerShowFilter: (state) => {
|
|
798
803
|
return state.layers.showFilter;
|
|
799
804
|
},
|
|
800
|
-
|
|
805
|
+
|
|
801
806
|
selectOverrideSortOrder: (state) => {
|
|
802
807
|
return state.layers.overrideSortLayerOrder;
|
|
803
808
|
},
|
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import v4 from
|
|
1
|
+
import { v4 } from "uuid/v4";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
name:
|
|
4
|
+
name: "notifications",
|
|
5
5
|
|
|
6
|
-
getReducer(){
|
|
7
|
-
const initialData = {}
|
|
6
|
+
getReducer() {
|
|
7
|
+
const initialData = {};
|
|
8
8
|
|
|
9
9
|
return (state = initialData, { type, payload }) => {
|
|
10
|
-
if(payload && payload.notification){
|
|
10
|
+
if (payload && payload.notification) {
|
|
11
11
|
const uid = v4();
|
|
12
12
|
payload.notification.uid = uid;
|
|
13
13
|
return Object.assign({}, state, {
|
|
14
|
-
[uid]: payload.notification
|
|
15
|
-
})
|
|
14
|
+
[uid]: payload.notification,
|
|
15
|
+
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
switch(type){
|
|
19
|
-
case
|
|
20
|
-
case
|
|
18
|
+
switch (type) {
|
|
19
|
+
case "NOTIFICATIONS_FIRED":
|
|
20
|
+
case "NOTIFICATIONS_DISMISSED":
|
|
21
21
|
return Object.assign({}, state, payload);
|
|
22
22
|
default:
|
|
23
23
|
return state;
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
doNotificationsFire:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
doNotificationsFire:
|
|
29
|
+
(options) =>
|
|
30
|
+
({ dispatch, store }) => {
|
|
31
|
+
const uid = v4();
|
|
32
|
+
options.uid = uid;
|
|
33
|
+
dispatch({
|
|
34
|
+
type: "NOTIFICATIONS_FIRED",
|
|
35
|
+
payload: {
|
|
36
|
+
[uid]: options,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
},
|
|
38
40
|
|
|
39
|
-
doNotificationsDismiss:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
doNotificationsDismiss:
|
|
42
|
+
(uid) =>
|
|
43
|
+
({ dispatch, store }) => {
|
|
44
|
+
const state = store.selectNotifications();
|
|
45
|
+
delete state[uid];
|
|
46
|
+
dispatch({
|
|
47
|
+
type: "NOTIFICATIONS_DISMISSED",
|
|
48
|
+
payload: state,
|
|
49
|
+
});
|
|
50
|
+
},
|
|
47
51
|
|
|
48
52
|
selectNotifications: (state) => {
|
|
49
53
|
return state.notifications;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import v4 from "uuid/v4";
|
|
1
|
+
import { v4 } from "uuid/v4";
|
|
2
2
|
import { createSelector } from "redux-bundler";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -23,51 +23,59 @@ export default {
|
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
25
|
|
|
26
|
-
doSouthRegionOpen:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
doSouthRegionOpen:
|
|
27
|
+
(options) =>
|
|
28
|
+
({ dispatch, store }) => {
|
|
29
|
+
const children = store.selectSouthRegionChildrenObj();
|
|
30
|
+
const uid = v4();
|
|
31
|
+
options.uid = uid;
|
|
32
|
+
dispatch({
|
|
33
|
+
type: "SOUTH_REGION_OPENED",
|
|
34
|
+
payload: {
|
|
35
|
+
children: { ...children, [uid]: options },
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
doSouthRegionClose:
|
|
40
|
+
() =>
|
|
41
|
+
({ dispatch, store }) => {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: "SOUTH_REGION_CLOSED",
|
|
44
|
+
payload: {
|
|
45
|
+
children: {},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
},
|
|
45
49
|
|
|
46
|
-
doSouthRegionCloseTab:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
doSouthRegionCloseTab:
|
|
51
|
+
(uid) =>
|
|
52
|
+
({ dispatch, store }) => {
|
|
53
|
+
const children = store.selectSouthRegionChildrenObj();
|
|
54
|
+
delete children[uid];
|
|
55
|
+
dispatch({
|
|
56
|
+
type: "SOUTH_REGION_TAB_CLOSED",
|
|
57
|
+
payload: {
|
|
58
|
+
children: { ...children },
|
|
59
|
+
_shouldTryToCloseRegion: true,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
},
|
|
57
63
|
|
|
58
|
-
doSouthRegionTryClose:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
doSouthRegionTryClose:
|
|
65
|
+
() =>
|
|
66
|
+
({ dispatch, store }) => {
|
|
67
|
+
dispatch({
|
|
68
|
+
type: "SOUTH_REGION_TRY_CLOSE",
|
|
69
|
+
payload: { _shouldTryToCloseRegion: false },
|
|
70
|
+
});
|
|
71
|
+
const children = store.selectSouthRegionChildren();
|
|
72
|
+
if (!children.length) store.doSouthRegionClose();
|
|
73
|
+
},
|
|
66
74
|
|
|
67
75
|
selectSouthRegionChildrenObj: (state) => {
|
|
68
76
|
return state.southRegion.children;
|
|
69
77
|
},
|
|
70
|
-
|
|
78
|
+
|
|
71
79
|
selectSouthRegionChildren: createSelector(
|
|
72
80
|
"selectSouthRegionChildrenObj",
|
|
73
81
|
(children) => {
|
|
@@ -84,5 +92,4 @@ export default {
|
|
|
84
92
|
if (state.southRegion._shouldTryToCloseRegion)
|
|
85
93
|
return { actionCreator: "doSouthRegionTryClose" };
|
|
86
94
|
},
|
|
87
|
-
|
|
88
95
|
};
|