@corpsmap/corpsmap 3.0.11 → 3.0.12
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 +15 -6
- package/lib/dev.js +4839 -1102
- package/lib/prod.js +4839 -1102
- package/package.json +3 -1
- package/src/application-bundles/map-layers-bundle.js +12 -13
- package/src/core-plugins/add-data/add-data-button.js +7 -8
- package/src/core-plugins/add-data/add-geojson.js +23 -19
- package/src/core-plugins/add-data/add-kmlfile.js +46 -0
- package/src/core-plugins/add-data/bundle.js +171 -111
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpsmap/corpsmap",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"description": "CorpsMap as React Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"react-dom": ">=16.x.x"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@mapbox/togeojson": "^0.16.0",
|
|
44
45
|
"@turf/bbox": "^6.0.1",
|
|
45
46
|
"@turf/bbox-polygon": "^6.0.1",
|
|
46
47
|
"@turf/boolean-crosses": "^6.0.1",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"file-saver": "^2.0.2",
|
|
61
62
|
"is-html": "^2.0.0",
|
|
62
63
|
"jspdf": "^1.5.3",
|
|
64
|
+
"kmljs": "0.0.1",
|
|
63
65
|
"lodash": "^4.17.15",
|
|
64
66
|
"markdown-it": "^12.0.3",
|
|
65
67
|
"moment": "^2.24.0",
|
|
@@ -240,25 +240,24 @@ export default {
|
|
|
240
240
|
|
|
241
241
|
dispatch({ type: "LAYERS_LIST_UPDATED", payload: newLayers });
|
|
242
242
|
},
|
|
243
|
-
doActivateUserDefaultLayers:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
243
|
+
doActivateUserDefaultLayers:
|
|
244
|
+
() =>
|
|
245
|
+
({ dispatch, store }) => {
|
|
246
|
+
const userDefaultLayers = store.selectUserDefaultLayers();
|
|
247
|
+
const layers = store.selectLayers();
|
|
248
|
+
userDefaultLayers.forEach((lyr) => {
|
|
249
249
|
const node = layers[lyr.uid];
|
|
250
250
|
if (node && node.mapLayer) {
|
|
251
251
|
node.visible = true;
|
|
252
252
|
node.mapLayer.setVisible(true);
|
|
253
253
|
}
|
|
254
254
|
});
|
|
255
|
-
|
|
255
|
+
|
|
256
256
|
dispatch({
|
|
257
257
|
type: "LAYERS_LIST_UPDATED",
|
|
258
258
|
payload: Object.assign({}, layers),
|
|
259
259
|
});
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
},
|
|
262
261
|
|
|
263
262
|
doAddLayersBulk:
|
|
264
263
|
(optionsCollection) =>
|
|
@@ -620,14 +619,14 @@ export default {
|
|
|
620
619
|
payload: Object.assign({}, layers),
|
|
621
620
|
});
|
|
622
621
|
},
|
|
623
|
-
|
|
622
|
+
|
|
624
623
|
doUpdateUserDefaultLayers:
|
|
625
624
|
(type, lyr) =>
|
|
626
625
|
({ dispatch, store }) => {
|
|
627
626
|
const userDefaultLayers = store.selectUserDefaultLayers();
|
|
628
627
|
const layers = store.selectLayers();
|
|
629
628
|
const node = layers[lyr.uid];
|
|
630
|
-
|
|
629
|
+
|
|
631
630
|
if (type === "add") {
|
|
632
631
|
userDefaultLayers.push(node);
|
|
633
632
|
} else {
|
|
@@ -646,7 +645,7 @@ export default {
|
|
|
646
645
|
},
|
|
647
646
|
});
|
|
648
647
|
},
|
|
649
|
-
|
|
648
|
+
|
|
650
649
|
doLayerSetUserDefaultLayers:
|
|
651
650
|
(nodeId, userDefaultLayer) =>
|
|
652
651
|
({ dispatch, store }) => {
|
|
@@ -658,7 +657,7 @@ export default {
|
|
|
658
657
|
type: "LAYERS_LIST_UPDATED",
|
|
659
658
|
payload: Object.assign({}, layers),
|
|
660
659
|
});
|
|
661
|
-
|
|
660
|
+
},
|
|
662
661
|
|
|
663
662
|
selectFavoriteLayers: (state) => {
|
|
664
663
|
return state.layers.favoriteLayers;
|
|
@@ -2,16 +2,17 @@ import React from "react";
|
|
|
2
2
|
import { connect } from "redux-bundler-react";
|
|
3
3
|
import {
|
|
4
4
|
BasicToolbarButton,
|
|
5
|
-
BasicToolbarMenu
|
|
5
|
+
BasicToolbarMenu,
|
|
6
6
|
} from "../../application-controls";
|
|
7
7
|
import AddGeoJsonButton from "./add-geojson";
|
|
8
8
|
import AddShapefileButton from "./add-shapefile";
|
|
9
|
+
import AddKmlFileButton from "./add-kmlfile";
|
|
9
10
|
|
|
10
11
|
class AddDataButton extends React.Component {
|
|
11
12
|
constructor(props) {
|
|
12
13
|
super(props);
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
|
|
15
16
|
render() {
|
|
16
17
|
return (
|
|
17
18
|
<BasicToolbarButton
|
|
@@ -21,15 +22,13 @@ class AddDataButton extends React.Component {
|
|
|
21
22
|
onDeactivate={() => {}}
|
|
22
23
|
>
|
|
23
24
|
<BasicToolbarMenu>
|
|
24
|
-
<AddGeoJsonButton/>
|
|
25
|
-
<AddShapefileButton/>
|
|
25
|
+
<AddGeoJsonButton />
|
|
26
|
+
<AddShapefileButton />
|
|
27
|
+
<AddKmlFileButton />
|
|
26
28
|
</BasicToolbarMenu>
|
|
27
29
|
</BasicToolbarButton>
|
|
28
30
|
);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
export default connect(
|
|
33
|
-
"doNotificationsFire",
|
|
34
|
-
AddDataButton
|
|
35
|
-
);
|
|
34
|
+
export default connect("doNotificationsFire", AddDataButton);
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { BasicToolbarMenuItem } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BasicToolbarMenuItem } from "../../application-controls";
|
|
3
|
+
import { connect } from "redux-bundler-react";
|
|
5
4
|
|
|
6
5
|
class AddGeoJsonButton extends React.Component {
|
|
7
|
-
constructor(props){
|
|
6
|
+
constructor(props) {
|
|
8
7
|
super(props);
|
|
9
8
|
this.handleClick = this.handleClick.bind(this);
|
|
10
9
|
this.handleFile = this.handleFile.bind(this);
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
handleClick(e){
|
|
12
|
+
handleClick(e) {
|
|
14
13
|
this.geojsonInput.click();
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
handleFile(e){
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
handleFile(e) {
|
|
17
|
+
const { doAddDataFile } = this.props;
|
|
18
|
+
const file = this.geojsonInput.files[0];
|
|
19
|
+
doAddDataFile(file);
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
render(){
|
|
22
|
+
render() {
|
|
24
23
|
return (
|
|
25
24
|
<BasicToolbarMenuItem
|
|
26
|
-
active={
|
|
25
|
+
active={false}
|
|
27
26
|
iconClass="ms ms-geojson icon-inline"
|
|
28
27
|
title="Add Local GeoJSON File"
|
|
29
28
|
text="Add Local GeoJSON File"
|
|
30
|
-
onClick={
|
|
29
|
+
onClick={this.handleClick}
|
|
31
30
|
passProps={{}}
|
|
32
31
|
disableSubmenu={true}
|
|
33
32
|
>
|
|
34
|
-
<input
|
|
33
|
+
<input
|
|
34
|
+
onChange={this.handleFile}
|
|
35
|
+
accept=".geojson,.json"
|
|
36
|
+
className="hidden"
|
|
37
|
+
type="file"
|
|
38
|
+
ref={(el) => {
|
|
39
|
+
this.geojsonInput = el;
|
|
40
|
+
}}
|
|
41
|
+
/>
|
|
35
42
|
</BasicToolbarMenuItem>
|
|
36
|
-
)
|
|
43
|
+
);
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
export default connect(
|
|
41
|
-
'doAddDataFile',
|
|
42
|
-
AddGeoJsonButton
|
|
43
|
-
);
|
|
47
|
+
export default connect("doAddDataFile", AddGeoJsonButton);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BasicToolbarMenuItem } from "../../application-controls";
|
|
3
|
+
import { connect } from "redux-bundler-react";
|
|
4
|
+
|
|
5
|
+
class AddKmlFileButton extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.handleClick = this.handleClick.bind(this);
|
|
9
|
+
this.handleFile = this.handleFile.bind(this);
|
|
10
|
+
}
|
|
11
|
+
handleClick(e) {
|
|
12
|
+
this.geojsonInput.click();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
handleFile(e) {
|
|
16
|
+
const { doAddDataFile } = this.props;
|
|
17
|
+
const file = this.geojsonInput.files[0];
|
|
18
|
+
doAddDataFile(file);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return (
|
|
23
|
+
<BasicToolbarMenuItem
|
|
24
|
+
active={false}
|
|
25
|
+
iconClass="ms ms-kml icon-inline"
|
|
26
|
+
title="Add Local KML File"
|
|
27
|
+
text="Add Local KML File"
|
|
28
|
+
onClick={this.handleClick}
|
|
29
|
+
passProps={{}}
|
|
30
|
+
disableSubmenu={true}
|
|
31
|
+
>
|
|
32
|
+
<input
|
|
33
|
+
onChange={this.handleFile}
|
|
34
|
+
accept=".kml"
|
|
35
|
+
className="hidden"
|
|
36
|
+
type="file"
|
|
37
|
+
ref={(el) => {
|
|
38
|
+
this.geojsonInput = el;
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
</BasicToolbarMenuItem>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default connect("doAddDataFile", AddKmlFileButton);
|
|
@@ -2,6 +2,7 @@ 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";
|
|
5
|
+
import KMLConvert from "@mapbox/togeojson";
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
name: "addData",
|
|
@@ -29,120 +30,179 @@ export default {
|
|
|
29
30
|
};
|
|
30
31
|
},
|
|
31
32
|
|
|
32
|
-
doDispatchNotification:
|
|
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
|
-
|
|
33
|
+
doDispatchNotification:
|
|
34
|
+
(message) =>
|
|
35
|
+
({ dispatch, store }) => {
|
|
36
|
+
store.doNotificationsFire({
|
|
37
|
+
title: "Add Data Error",
|
|
38
|
+
message: message,
|
|
39
|
+
level: "danger",
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
doAddDataFile:
|
|
44
|
+
(file) =>
|
|
45
|
+
({ dispatch, store }) => {
|
|
46
|
+
store.doBasicToolbarDeactivate();
|
|
47
|
+
let uid, options;
|
|
48
|
+
let reader = new FileReader();
|
|
49
|
+
|
|
50
|
+
if (file && file.name.match(/\.(geojson|json)$/)) {
|
|
51
|
+
reader.onload = function () {
|
|
52
|
+
try {
|
|
53
|
+
const data = JSON.parse(reader.result);
|
|
54
|
+
store.doAddDataGeojson(file.name, data);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
store.doDispatchNotification(err.message || "Error adding data");
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
reader.readAsText(file);
|
|
60
|
+
} else if (file && file.name.match(/\.(zip)$/)) {
|
|
61
|
+
reader.onload = function (e) {
|
|
62
|
+
try {
|
|
63
|
+
const buffer = e.currentTarget.result;
|
|
64
|
+
shp(buffer)
|
|
65
|
+
.then((geojson) => {
|
|
66
|
+
console.log(geojson);
|
|
67
|
+
store.doAddDataGeojson(file.name, geojson);
|
|
68
|
+
})
|
|
69
|
+
.catch((err) => {
|
|
70
|
+
store.doDispatchNotification(
|
|
71
|
+
err.message || "Error adding data"
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
} catch (err) {
|
|
75
|
+
store.doDispatchNotification(err.message || "Error adding data");
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
reader.readAsArrayBuffer(file);
|
|
79
|
+
} else if (file && file.name.match(/\.(kml)$/)) {
|
|
80
|
+
reader.onload = function (e) {
|
|
81
|
+
try {
|
|
82
|
+
let fileInfo = e.currentTarget.result;
|
|
83
|
+
let utf8decoder = new TextDecoder();
|
|
84
|
+
let u8arr = new Uint8Array(fileInfo);
|
|
85
|
+
let decodedFileInfo = utf8decoder.decode(u8arr);
|
|
86
|
+
console.log(decodedFileInfo);
|
|
87
|
+
|
|
88
|
+
// read in our KML file and then parse it
|
|
89
|
+
const parsedKML = new DOMParser().parseFromString(
|
|
90
|
+
decodedFileInfo,
|
|
91
|
+
"text/html"
|
|
92
|
+
);
|
|
93
|
+
// convert our kml to geojson and store the results
|
|
94
|
+
const geojson = KMLConvert.kml(parsedKML);
|
|
95
|
+
store.doAddDataGeojson(file.name, geojson);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
store.doDispatchNotification(err.message || "Error adding data");
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
reader.readAsArrayBuffer(file);
|
|
101
|
+
} else if (file && file.name.match(/\.(kmz)$/)) {
|
|
102
|
+
reader.onload = function (e) {
|
|
103
|
+
try {
|
|
104
|
+
let fileInfo = e.currentTarget.result;
|
|
105
|
+
let utf8decoder = new TextDecoder();
|
|
106
|
+
let u8arr = new Uint8Array(fileInfo);
|
|
107
|
+
let decodedFileInfo = utf8decoder.decode(u8arr);
|
|
108
|
+
console.log(decodedFileInfo);
|
|
109
|
+
|
|
110
|
+
// read in our KML file and then parse it
|
|
111
|
+
const parsedKMZ = new DOMParser().parseFromString(decodedFileInfo);
|
|
112
|
+
|
|
113
|
+
// // convert our kml to geojson and store the results
|
|
114
|
+
// const geojson = KMLConvert.kml(parsedKML);
|
|
115
|
+
|
|
116
|
+
// store.doAddDataGeojson(file.name, geojson);
|
|
117
|
+
console.log(parsedKMZ);
|
|
118
|
+
} catch (err) {
|
|
119
|
+
store.doDispatchNotification(err.message || "Error adding data");
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
reader.readAsArrayBuffer(file);
|
|
124
|
+
} else {
|
|
125
|
+
if (file) {
|
|
126
|
+
store.doDispatchNotification(
|
|
127
|
+
`${file.name} is not a supported GeoJSON or shapfile file type`
|
|
128
|
+
);
|
|
68
129
|
}
|
|
69
|
-
};
|
|
70
|
-
reader.readAsArrayBuffer(file);
|
|
71
|
-
} else {
|
|
72
|
-
if (file) {
|
|
73
|
-
store.doDispatchNotification(
|
|
74
|
-
`${file.name} is not a supported GeoJSON or shapfile file type`
|
|
75
|
-
);
|
|
76
130
|
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
store
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
uid: uid,
|
|
103
|
-
displayName: filename,
|
|
104
|
-
parentUid: parentUid,
|
|
105
|
-
mapLayer: mapLayer,
|
|
106
|
-
serviceType: "LocalVector",
|
|
107
|
-
visible: true,
|
|
108
|
-
zoomTo: true,
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
store.doSetCursor();
|
|
112
|
-
dispatch({ type: "ADD_DATA_ADDED_GEOJSON", payload: { key: uid } });
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
doMapDropDataFile: (e) => ({ dispatch, store }) => {
|
|
116
|
-
e.preventDefault();
|
|
117
|
-
e.stopPropagation();
|
|
118
|
-
const files = e.dataTransfer.files;
|
|
119
|
-
const file = files[0];
|
|
120
|
-
store.doAddDataFile(file);
|
|
121
|
-
},
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
doAddDataGeojson:
|
|
134
|
+
(filename, geojson) =>
|
|
135
|
+
({ dispatch, store }) => {
|
|
136
|
+
store.doSetCursor("wait");
|
|
137
|
+
const parentUid = store.selectTreeViewRootId();
|
|
138
|
+
const uid = v4();
|
|
139
|
+
|
|
140
|
+
const mapLayer = getLayer({
|
|
141
|
+
serviceType: "LocalVector",
|
|
142
|
+
visible: true,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const features = new GeoJSON().readFeatures(geojson, {
|
|
146
|
+
dataProjection: "EPSG:4326",
|
|
147
|
+
featureProjection: "EPSG:3857",
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
const src = mapLayer.getSource();
|
|
151
|
+
src.addFeatures(features);
|
|
152
|
+
|
|
153
|
+
if (store.hasOwnProperty("doGeojsonIdentAddFeatures")) {
|
|
154
|
+
store.doGeojsonIdentAddFeatures(uid, geojson, mapLayer);
|
|
155
|
+
}
|
|
122
156
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
157
|
+
store.doAddLayer({
|
|
158
|
+
uid: uid,
|
|
159
|
+
displayName: filename,
|
|
160
|
+
parentUid: parentUid,
|
|
161
|
+
mapLayer: mapLayer,
|
|
162
|
+
serviceType: "LocalVector",
|
|
163
|
+
visible: true,
|
|
164
|
+
zoomTo: true,
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
store.doSetCursor();
|
|
168
|
+
dispatch({ type: "ADD_DATA_ADDED_GEOJSON", payload: { key: uid } });
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
doMapDropDataFile:
|
|
172
|
+
(e) =>
|
|
173
|
+
({ dispatch, store }) => {
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
e.stopPropagation();
|
|
176
|
+
const files = e.dataTransfer.files;
|
|
177
|
+
const file = files[0];
|
|
178
|
+
store.doAddDataFile(file);
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
doAddMapDragDropListeners:
|
|
182
|
+
() =>
|
|
183
|
+
({ dispatch, store }) => {
|
|
184
|
+
dispatch({ type: "TURN_OFF_ADD_LISTENERS" });
|
|
185
|
+
const olMap = store.selectMap();
|
|
186
|
+
const map = olMap.getTargetElement();
|
|
187
|
+
|
|
188
|
+
map.addEventListener(
|
|
189
|
+
"dragleave",
|
|
190
|
+
function (e) {
|
|
191
|
+
e = e || event;
|
|
192
|
+
e.preventDefault();
|
|
193
|
+
},
|
|
194
|
+
false
|
|
195
|
+
);
|
|
196
|
+
map.addEventListener(
|
|
197
|
+
"dragover",
|
|
198
|
+
function (e) {
|
|
199
|
+
e = e || event;
|
|
200
|
+
e.preventDefault();
|
|
201
|
+
},
|
|
202
|
+
false
|
|
203
|
+
);
|
|
204
|
+
map.addEventListener("drop", store.doMapDropDataFile, false);
|
|
205
|
+
},
|
|
146
206
|
|
|
147
207
|
reactshouldAddListeners: (state) => {
|
|
148
208
|
if (state.addData.shouldAddListeners)
|