@corpsmap/corpsmap 3.1.10 → 3.2.0
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/lib/dev.js +144 -9
- package/lib/prod.js +144 -9
- package/package.json +1 -1
- package/src/application-bundles/map-layers-bundle.js +18 -1
- package/src/core-plugins/identify/bundle.js +14 -0
- package/src/core-plugins/identify-arcgis-rest/bundle.js +37 -4
- package/src/core-plugins/identify-vector/bundle.js +32 -1
- package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.js +11 -0
package/lib/dev.js
CHANGED
|
@@ -79454,6 +79454,7 @@ var createNode$1 = function createNode(options, map) {
|
|
|
79454
79454
|
info: options.info,
|
|
79455
79455
|
identifyType: options.identifyType,
|
|
79456
79456
|
identifyFields: options.identifyFields,
|
|
79457
|
+
identifyRenameColums: options.identifyRenameColums,
|
|
79457
79458
|
legend: options.legend,
|
|
79458
79459
|
passFilter: true,
|
|
79459
79460
|
zoomTo: !!options.zoomTo,
|
|
@@ -79513,7 +79514,8 @@ var mapLayersBundle = {
|
|
|
79513
79514
|
showFilter: false,
|
|
79514
79515
|
favoriteLayers: [],
|
|
79515
79516
|
userDefaultLayers: [],
|
|
79516
|
-
overrideSortLayerOrder: false
|
|
79517
|
+
overrideSortLayerOrder: false,
|
|
79518
|
+
sortOrderStatus: false
|
|
79517
79519
|
};
|
|
79518
79520
|
return function () {
|
|
79519
79521
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
@@ -79563,6 +79565,10 @@ var mapLayersBundle = {
|
|
|
79563
79565
|
return Object.assign({}, state, payload);
|
|
79564
79566
|
}
|
|
79565
79567
|
|
|
79568
|
+
if (type === "SORT_ORDER_NOW_SHOWING") {
|
|
79569
|
+
return Object.assign({}, state, payload);
|
|
79570
|
+
}
|
|
79571
|
+
|
|
79566
79572
|
return state;
|
|
79567
79573
|
};
|
|
79568
79574
|
},
|
|
@@ -80157,6 +80163,23 @@ var mapLayersBundle = {
|
|
|
80157
80163
|
});
|
|
80158
80164
|
};
|
|
80159
80165
|
},
|
|
80166
|
+
doShowLayerSortOrder: function doShowLayerSortOrder(bool) {
|
|
80167
|
+
return function (_ref26) {
|
|
80168
|
+
var dispatch = _ref26.dispatch;
|
|
80169
|
+
|
|
80170
|
+
if (bool) {
|
|
80171
|
+
dispatch({
|
|
80172
|
+
type: "SORT_ORDER_NOW_SHOWING",
|
|
80173
|
+
payload: {
|
|
80174
|
+
sortOrderStatus: true
|
|
80175
|
+
}
|
|
80176
|
+
});
|
|
80177
|
+
}
|
|
80178
|
+
};
|
|
80179
|
+
},
|
|
80180
|
+
selectSortOrderStatus: function selectSortOrderStatus(state) {
|
|
80181
|
+
return state.layers.sortOrderStatus;
|
|
80182
|
+
},
|
|
80160
80183
|
selectFavoriteLayers: function selectFavoriteLayers(state) {
|
|
80161
80184
|
return state.layers.favoriteLayers;
|
|
80162
80185
|
},
|
|
@@ -106531,7 +106554,7 @@ var config = {
|
|
|
106531
106554
|
};
|
|
106532
106555
|
|
|
106533
106556
|
var name = "@corpsmap/corpsmap";
|
|
106534
|
-
var version$1 = "3.
|
|
106557
|
+
var version$1 = "3.2.0";
|
|
106535
106558
|
var description = "CorpsMap as React Components";
|
|
106536
106559
|
var main = "index.js";
|
|
106537
106560
|
var scripts = {
|
|
@@ -132926,7 +132949,56 @@ var bundle$1 = {
|
|
|
132926
132949
|
cb("Error for ".concat(visibleLayer.displayName));
|
|
132927
132950
|
} else {
|
|
132928
132951
|
try {
|
|
132929
|
-
var data = JSON.parse(body);
|
|
132952
|
+
var data = JSON.parse(body); //Column Filtering
|
|
132953
|
+
|
|
132954
|
+
if (visibleLayer.identifyFields) {
|
|
132955
|
+
data.results.forEach(function (result) {
|
|
132956
|
+
if (result.attributes) {
|
|
132957
|
+
var _loop = function _loop() {
|
|
132958
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
132959
|
+
key = _Object$entries$_i[0],
|
|
132960
|
+
value = _Object$entries$_i[1];
|
|
132961
|
+
|
|
132962
|
+
var reducedProperties = {};
|
|
132963
|
+
visibleLayer.identifyFields.forEach(function (property) {
|
|
132964
|
+
if (result.attributes[property]) {
|
|
132965
|
+
reducedProperties[property] = result.attributes[property];
|
|
132966
|
+
}
|
|
132967
|
+
});
|
|
132968
|
+
result.attributes = reducedProperties;
|
|
132969
|
+
};
|
|
132970
|
+
|
|
132971
|
+
for (var _i = 0, _Object$entries = Object.entries(result.attributes); _i < _Object$entries.length; _i++) {
|
|
132972
|
+
_loop();
|
|
132973
|
+
}
|
|
132974
|
+
}
|
|
132975
|
+
});
|
|
132976
|
+
} // Column Renaming
|
|
132977
|
+
|
|
132978
|
+
|
|
132979
|
+
if (visibleLayer.identifyRenameColums) {
|
|
132980
|
+
data.results.forEach(function (result) {
|
|
132981
|
+
if (result.attributes) {
|
|
132982
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(result.attributes); _i2 < _Object$entries2.length; _i2++) {
|
|
132983
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
|
132984
|
+
featureKey = _Object$entries2$_i[0],
|
|
132985
|
+
featureValue = _Object$entries2$_i[1];
|
|
132986
|
+
|
|
132987
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(visibleLayer.identifyRenameColums); _i3 < _Object$entries3.length; _i3++) {
|
|
132988
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
|
132989
|
+
key = _Object$entries3$_i[0],
|
|
132990
|
+
value = _Object$entries3$_i[1];
|
|
132991
|
+
|
|
132992
|
+
if (featureKey === key) {
|
|
132993
|
+
result.attributes[value] = result.attributes[featureKey];
|
|
132994
|
+
delete result.attributes[featureKey];
|
|
132995
|
+
}
|
|
132996
|
+
}
|
|
132997
|
+
}
|
|
132998
|
+
}
|
|
132999
|
+
});
|
|
133000
|
+
}
|
|
133001
|
+
|
|
132930
133002
|
cb(null, {
|
|
132931
133003
|
dataset: visibleLayer.uid,
|
|
132932
133004
|
layerName: visibleLayer.displayName,
|
|
@@ -132946,7 +133018,7 @@ var bundle$1 = {
|
|
|
132946
133018
|
})
|
|
132947
133019
|
});
|
|
132948
133020
|
} catch (err) {
|
|
132949
|
-
cb("Error for ".concat(visibleLayer.displayName));
|
|
133021
|
+
cb("Error for ".concat(visibleLayer.displayName), err);
|
|
132950
133022
|
}
|
|
132951
133023
|
}
|
|
132952
133024
|
});
|
|
@@ -142186,6 +142258,13 @@ var bundle$6 = {
|
|
|
142186
142258
|
return function (_ref4) {
|
|
142187
142259
|
var dispatch = _ref4.dispatch,
|
|
142188
142260
|
store = _ref4.store;
|
|
142261
|
+
var map = store.selectMap(); // https://jira.il2.dso.mil/browse/CWBI-16638
|
|
142262
|
+
|
|
142263
|
+
map.interactions.array_.forEach(function (mapItem) {
|
|
142264
|
+
if (mapItem.ol_uid == "43") {
|
|
142265
|
+
mapItem.values_.active = false;
|
|
142266
|
+
}
|
|
142267
|
+
});
|
|
142189
142268
|
e.preventDefault();
|
|
142190
142269
|
e.stopPropagation();
|
|
142191
142270
|
var selectBy = e.currentTarget.dataset.selectby;
|
|
@@ -142386,7 +142465,13 @@ var bundle$6 = {
|
|
|
142386
142465
|
} // close identify menu
|
|
142387
142466
|
|
|
142388
142467
|
|
|
142389
|
-
store.doBasicToolbarDeactivate();
|
|
142468
|
+
store.doBasicToolbarDeactivate(); // https://jira.il2.dso.mil/browse/CWBI-16638
|
|
142469
|
+
|
|
142470
|
+
map.interactions.array_.forEach(function (mapItem) {
|
|
142471
|
+
if (mapItem.ol_uid == "43") {
|
|
142472
|
+
mapItem.values_.active = true;
|
|
142473
|
+
}
|
|
142474
|
+
});
|
|
142390
142475
|
dispatch({
|
|
142391
142476
|
type: "IDENTIFY_UI_STOPPED",
|
|
142392
142477
|
payload: {
|
|
@@ -161744,7 +161829,8 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161744
161829
|
treeViewDownloadEnabled = props.treeViewDownloadEnabled,
|
|
161745
161830
|
primaryPanelShowFavoritesBtn = props.primaryPanelShowFavoritesBtn,
|
|
161746
161831
|
primaryPanelShowUserDefaultLayersBtn = props.primaryPanelShowUserDefaultLayersBtn,
|
|
161747
|
-
treeRootNode = props.treeRootNode
|
|
161832
|
+
treeRootNode = props.treeRootNode,
|
|
161833
|
+
sortOrderStatus = props.sortOrderStatus;
|
|
161748
161834
|
var listClass = classnames({
|
|
161749
161835
|
"sidebar-list": !primaryPanelShowClose,
|
|
161750
161836
|
"thin-scrollbar": true,
|
|
@@ -161778,7 +161864,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161778
161864
|
title: "Source for ".concat(treeViewSelectedItem.displayName),
|
|
161779
161865
|
href: url,
|
|
161780
161866
|
target: "_blank"
|
|
161781
|
-
}, "Source", " ")), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer(s):"), " ", treeViewSelectedItem.layerList, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Service Type:"), " ", treeViewSelectedItem.type, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Identify Type:"), " ", treeViewSelectedItem.identifyType, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Min Zoom:"), " ", treeViewSelectedItem.minzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Max Zoom:"), " ", treeViewSelectedItem.maxzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Current Zoom:"), " ", Math.floor(mapZoom), " "), treeViewSelectedItem.attributions ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Credits:"), " ", treeViewSelectedItem.attributions, " ") : null, treeViewSelectedItem.layerDescription ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer Description:"), " ", treeViewSelectedItem.layerDescription, " ") : null, primaryPanelShowFavoritesBtn ? /*#__PURE__*/React$1__default.createElement(FavoritesToggle$1, {
|
|
161867
|
+
}, "Source", " ")), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer(s):"), " ", treeViewSelectedItem.layerList, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Service Type:"), " ", treeViewSelectedItem.type, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Identify Type:"), " ", treeViewSelectedItem.identifyType, " "), /*#__PURE__*/React$1__default.createElement("div", null, sortOrderStatus ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Sort Order:"), " ", treeViewSelectedItem.sortOrder, " ") : null), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Min Zoom:"), " ", treeViewSelectedItem.minzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Max Zoom:"), " ", treeViewSelectedItem.maxzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Current Zoom:"), " ", Math.floor(mapZoom), " "), treeViewSelectedItem.attributions ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Credits:"), " ", treeViewSelectedItem.attributions, " ") : null, treeViewSelectedItem.layerDescription ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer Description:"), " ", treeViewSelectedItem.layerDescription, " ") : null, primaryPanelShowFavoritesBtn ? /*#__PURE__*/React$1__default.createElement(FavoritesToggle$1, {
|
|
161782
161868
|
layer: treeViewSelectedItem
|
|
161783
161869
|
}) : null, /*#__PURE__*/React$1__default.createElement("p", null), primaryPanelShowUserDefaultLayersBtn ? /*#__PURE__*/React$1__default.createElement(DefaultsToggle$1, {
|
|
161784
161870
|
layer: treeViewSelectedItem
|
|
@@ -161789,7 +161875,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161789
161875
|
})));
|
|
161790
161876
|
};
|
|
161791
161877
|
|
|
161792
|
-
var LayerSubpanel$1 = connect("selectTreeViewSelectedItem", "selectPrimaryPanelShowClose", "selectMapZoom", "selectTreeViewDownloadEnabled", "selectPrimaryPanelShowFavoritesBtn", "selectPrimaryPanelShowUserDefaultLayersBtn", "selectTreeRootNode", "doRenderTreeView", LayerSubpanel);
|
|
161878
|
+
var LayerSubpanel$1 = connect("selectSortOrderStatus", "selectTreeViewSelectedItem", "selectPrimaryPanelShowClose", "selectMapZoom", "selectTreeViewDownloadEnabled", "selectPrimaryPanelShowFavoritesBtn", "selectPrimaryPanelShowUserDefaultLayersBtn", "selectTreeRootNode", "doRenderTreeView", LayerSubpanel);
|
|
161793
161879
|
|
|
161794
161880
|
var treeView = function treeView(controls) {
|
|
161795
161881
|
return {
|
|
@@ -162591,7 +162677,56 @@ var bundle$e = {
|
|
|
162591
162677
|
dataProjection: "EPSG:4326"
|
|
162592
162678
|
});
|
|
162593
162679
|
if (!booleanDisjoint(identifyFeature, geoJsonFeature)) outFeatures.push(geoJsonFeature);
|
|
162594
|
-
});
|
|
162680
|
+
}); //Column Filtering
|
|
162681
|
+
|
|
162682
|
+
if (layers[0].identifyFields) {
|
|
162683
|
+
outFeatures.forEach(function (feature) {
|
|
162684
|
+
if (feature.properties) {
|
|
162685
|
+
var _loop = function _loop() {
|
|
162686
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
162687
|
+
key = _Object$entries$_i[0],
|
|
162688
|
+
value = _Object$entries$_i[1];
|
|
162689
|
+
|
|
162690
|
+
var reducedProperties = {};
|
|
162691
|
+
layers[0].identifyFields.forEach(function (property) {
|
|
162692
|
+
if (feature.properties[property]) {
|
|
162693
|
+
reducedProperties[property] = feature.properties[property];
|
|
162694
|
+
}
|
|
162695
|
+
});
|
|
162696
|
+
feature.properties = reducedProperties;
|
|
162697
|
+
};
|
|
162698
|
+
|
|
162699
|
+
for (var _i = 0, _Object$entries = Object.entries(feature.properties); _i < _Object$entries.length; _i++) {
|
|
162700
|
+
_loop();
|
|
162701
|
+
}
|
|
162702
|
+
}
|
|
162703
|
+
});
|
|
162704
|
+
} //Column Renaming
|
|
162705
|
+
|
|
162706
|
+
|
|
162707
|
+
if (layers[0].identifyRenameColums) {
|
|
162708
|
+
outFeatures.forEach(function (feature) {
|
|
162709
|
+
if (feature.properties) {
|
|
162710
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(feature.properties); _i2 < _Object$entries2.length; _i2++) {
|
|
162711
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
|
162712
|
+
featureKey = _Object$entries2$_i[0],
|
|
162713
|
+
featureValue = _Object$entries2$_i[1];
|
|
162714
|
+
|
|
162715
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(layers[0].identifyRenameColums); _i3 < _Object$entries3.length; _i3++) {
|
|
162716
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
|
162717
|
+
key = _Object$entries3$_i[0],
|
|
162718
|
+
value = _Object$entries3$_i[1];
|
|
162719
|
+
|
|
162720
|
+
if (featureKey === key) {
|
|
162721
|
+
feature.properties[value] = feature.properties[featureKey];
|
|
162722
|
+
delete feature.properties[featureKey];
|
|
162723
|
+
}
|
|
162724
|
+
}
|
|
162725
|
+
}
|
|
162726
|
+
}
|
|
162727
|
+
});
|
|
162728
|
+
}
|
|
162729
|
+
|
|
162595
162730
|
out.push({
|
|
162596
162731
|
dataset: lyr.uid,
|
|
162597
162732
|
layerName: lyr.displayName,
|
package/lib/prod.js
CHANGED
|
@@ -79368,6 +79368,7 @@ var createNode$1 = function createNode(options, map) {
|
|
|
79368
79368
|
info: options.info,
|
|
79369
79369
|
identifyType: options.identifyType,
|
|
79370
79370
|
identifyFields: options.identifyFields,
|
|
79371
|
+
identifyRenameColums: options.identifyRenameColums,
|
|
79371
79372
|
legend: options.legend,
|
|
79372
79373
|
passFilter: true,
|
|
79373
79374
|
zoomTo: !!options.zoomTo,
|
|
@@ -79427,7 +79428,8 @@ var mapLayersBundle = {
|
|
|
79427
79428
|
showFilter: false,
|
|
79428
79429
|
favoriteLayers: [],
|
|
79429
79430
|
userDefaultLayers: [],
|
|
79430
|
-
overrideSortLayerOrder: false
|
|
79431
|
+
overrideSortLayerOrder: false,
|
|
79432
|
+
sortOrderStatus: false
|
|
79431
79433
|
};
|
|
79432
79434
|
return function () {
|
|
79433
79435
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
@@ -79477,6 +79479,10 @@ var mapLayersBundle = {
|
|
|
79477
79479
|
return Object.assign({}, state, payload);
|
|
79478
79480
|
}
|
|
79479
79481
|
|
|
79482
|
+
if (type === "SORT_ORDER_NOW_SHOWING") {
|
|
79483
|
+
return Object.assign({}, state, payload);
|
|
79484
|
+
}
|
|
79485
|
+
|
|
79480
79486
|
return state;
|
|
79481
79487
|
};
|
|
79482
79488
|
},
|
|
@@ -80071,6 +80077,23 @@ var mapLayersBundle = {
|
|
|
80071
80077
|
});
|
|
80072
80078
|
};
|
|
80073
80079
|
},
|
|
80080
|
+
doShowLayerSortOrder: function doShowLayerSortOrder(bool) {
|
|
80081
|
+
return function (_ref26) {
|
|
80082
|
+
var dispatch = _ref26.dispatch;
|
|
80083
|
+
|
|
80084
|
+
if (bool) {
|
|
80085
|
+
dispatch({
|
|
80086
|
+
type: "SORT_ORDER_NOW_SHOWING",
|
|
80087
|
+
payload: {
|
|
80088
|
+
sortOrderStatus: true
|
|
80089
|
+
}
|
|
80090
|
+
});
|
|
80091
|
+
}
|
|
80092
|
+
};
|
|
80093
|
+
},
|
|
80094
|
+
selectSortOrderStatus: function selectSortOrderStatus(state) {
|
|
80095
|
+
return state.layers.sortOrderStatus;
|
|
80096
|
+
},
|
|
80074
80097
|
selectFavoriteLayers: function selectFavoriteLayers(state) {
|
|
80075
80098
|
return state.layers.favoriteLayers;
|
|
80076
80099
|
},
|
|
@@ -106445,7 +106468,7 @@ var config = {
|
|
|
106445
106468
|
};
|
|
106446
106469
|
|
|
106447
106470
|
var name = "@corpsmap/corpsmap";
|
|
106448
|
-
var version$1 = "3.
|
|
106471
|
+
var version$1 = "3.2.0";
|
|
106449
106472
|
var description = "CorpsMap as React Components";
|
|
106450
106473
|
var main = "index.js";
|
|
106451
106474
|
var scripts = {
|
|
@@ -132840,7 +132863,56 @@ var bundle$1 = {
|
|
|
132840
132863
|
cb("Error for ".concat(visibleLayer.displayName));
|
|
132841
132864
|
} else {
|
|
132842
132865
|
try {
|
|
132843
|
-
var data = JSON.parse(body);
|
|
132866
|
+
var data = JSON.parse(body); //Column Filtering
|
|
132867
|
+
|
|
132868
|
+
if (visibleLayer.identifyFields) {
|
|
132869
|
+
data.results.forEach(function (result) {
|
|
132870
|
+
if (result.attributes) {
|
|
132871
|
+
var _loop = function _loop() {
|
|
132872
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
132873
|
+
key = _Object$entries$_i[0],
|
|
132874
|
+
value = _Object$entries$_i[1];
|
|
132875
|
+
|
|
132876
|
+
var reducedProperties = {};
|
|
132877
|
+
visibleLayer.identifyFields.forEach(function (property) {
|
|
132878
|
+
if (result.attributes[property]) {
|
|
132879
|
+
reducedProperties[property] = result.attributes[property];
|
|
132880
|
+
}
|
|
132881
|
+
});
|
|
132882
|
+
result.attributes = reducedProperties;
|
|
132883
|
+
};
|
|
132884
|
+
|
|
132885
|
+
for (var _i = 0, _Object$entries = Object.entries(result.attributes); _i < _Object$entries.length; _i++) {
|
|
132886
|
+
_loop();
|
|
132887
|
+
}
|
|
132888
|
+
}
|
|
132889
|
+
});
|
|
132890
|
+
} // Column Renaming
|
|
132891
|
+
|
|
132892
|
+
|
|
132893
|
+
if (visibleLayer.identifyRenameColums) {
|
|
132894
|
+
data.results.forEach(function (result) {
|
|
132895
|
+
if (result.attributes) {
|
|
132896
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(result.attributes); _i2 < _Object$entries2.length; _i2++) {
|
|
132897
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
|
132898
|
+
featureKey = _Object$entries2$_i[0],
|
|
132899
|
+
featureValue = _Object$entries2$_i[1];
|
|
132900
|
+
|
|
132901
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(visibleLayer.identifyRenameColums); _i3 < _Object$entries3.length; _i3++) {
|
|
132902
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
|
132903
|
+
key = _Object$entries3$_i[0],
|
|
132904
|
+
value = _Object$entries3$_i[1];
|
|
132905
|
+
|
|
132906
|
+
if (featureKey === key) {
|
|
132907
|
+
result.attributes[value] = result.attributes[featureKey];
|
|
132908
|
+
delete result.attributes[featureKey];
|
|
132909
|
+
}
|
|
132910
|
+
}
|
|
132911
|
+
}
|
|
132912
|
+
}
|
|
132913
|
+
});
|
|
132914
|
+
}
|
|
132915
|
+
|
|
132844
132916
|
cb(null, {
|
|
132845
132917
|
dataset: visibleLayer.uid,
|
|
132846
132918
|
layerName: visibleLayer.displayName,
|
|
@@ -132860,7 +132932,7 @@ var bundle$1 = {
|
|
|
132860
132932
|
})
|
|
132861
132933
|
});
|
|
132862
132934
|
} catch (err) {
|
|
132863
|
-
cb("Error for ".concat(visibleLayer.displayName));
|
|
132935
|
+
cb("Error for ".concat(visibleLayer.displayName), err);
|
|
132864
132936
|
}
|
|
132865
132937
|
}
|
|
132866
132938
|
});
|
|
@@ -142100,6 +142172,13 @@ var bundle$6 = {
|
|
|
142100
142172
|
return function (_ref4) {
|
|
142101
142173
|
var dispatch = _ref4.dispatch,
|
|
142102
142174
|
store = _ref4.store;
|
|
142175
|
+
var map = store.selectMap(); // https://jira.il2.dso.mil/browse/CWBI-16638
|
|
142176
|
+
|
|
142177
|
+
map.interactions.array_.forEach(function (mapItem) {
|
|
142178
|
+
if (mapItem.ol_uid == "43") {
|
|
142179
|
+
mapItem.values_.active = false;
|
|
142180
|
+
}
|
|
142181
|
+
});
|
|
142103
142182
|
e.preventDefault();
|
|
142104
142183
|
e.stopPropagation();
|
|
142105
142184
|
var selectBy = e.currentTarget.dataset.selectby;
|
|
@@ -142300,7 +142379,13 @@ var bundle$6 = {
|
|
|
142300
142379
|
} // close identify menu
|
|
142301
142380
|
|
|
142302
142381
|
|
|
142303
|
-
store.doBasicToolbarDeactivate();
|
|
142382
|
+
store.doBasicToolbarDeactivate(); // https://jira.il2.dso.mil/browse/CWBI-16638
|
|
142383
|
+
|
|
142384
|
+
map.interactions.array_.forEach(function (mapItem) {
|
|
142385
|
+
if (mapItem.ol_uid == "43") {
|
|
142386
|
+
mapItem.values_.active = true;
|
|
142387
|
+
}
|
|
142388
|
+
});
|
|
142304
142389
|
dispatch({
|
|
142305
142390
|
type: "IDENTIFY_UI_STOPPED",
|
|
142306
142391
|
payload: {
|
|
@@ -161658,7 +161743,8 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161658
161743
|
treeViewDownloadEnabled = props.treeViewDownloadEnabled,
|
|
161659
161744
|
primaryPanelShowFavoritesBtn = props.primaryPanelShowFavoritesBtn,
|
|
161660
161745
|
primaryPanelShowUserDefaultLayersBtn = props.primaryPanelShowUserDefaultLayersBtn,
|
|
161661
|
-
treeRootNode = props.treeRootNode
|
|
161746
|
+
treeRootNode = props.treeRootNode,
|
|
161747
|
+
sortOrderStatus = props.sortOrderStatus;
|
|
161662
161748
|
var listClass = classnames({
|
|
161663
161749
|
"sidebar-list": !primaryPanelShowClose,
|
|
161664
161750
|
"thin-scrollbar": true,
|
|
@@ -161692,7 +161778,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161692
161778
|
title: "Source for ".concat(treeViewSelectedItem.displayName),
|
|
161693
161779
|
href: url,
|
|
161694
161780
|
target: "_blank"
|
|
161695
|
-
}, "Source", " ")), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer(s):"), " ", treeViewSelectedItem.layerList, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Service Type:"), " ", treeViewSelectedItem.type, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Identify Type:"), " ", treeViewSelectedItem.identifyType, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Min Zoom:"), " ", treeViewSelectedItem.minzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Max Zoom:"), " ", treeViewSelectedItem.maxzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Current Zoom:"), " ", Math.floor(mapZoom), " "), treeViewSelectedItem.attributions ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Credits:"), " ", treeViewSelectedItem.attributions, " ") : null, treeViewSelectedItem.layerDescription ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer Description:"), " ", treeViewSelectedItem.layerDescription, " ") : null, primaryPanelShowFavoritesBtn ? /*#__PURE__*/React$1__default.createElement(FavoritesToggle$1, {
|
|
161781
|
+
}, "Source", " ")), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer(s):"), " ", treeViewSelectedItem.layerList, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Service Type:"), " ", treeViewSelectedItem.type, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Identify Type:"), " ", treeViewSelectedItem.identifyType, " "), /*#__PURE__*/React$1__default.createElement("div", null, sortOrderStatus ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Sort Order:"), " ", treeViewSelectedItem.sortOrder, " ") : null), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Min Zoom:"), " ", treeViewSelectedItem.minzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Max Zoom:"), " ", treeViewSelectedItem.maxzoom, " "), /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Current Zoom:"), " ", Math.floor(mapZoom), " "), treeViewSelectedItem.attributions ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Credits:"), " ", treeViewSelectedItem.attributions, " ") : null, treeViewSelectedItem.layerDescription ? /*#__PURE__*/React$1__default.createElement("p", null, /*#__PURE__*/React$1__default.createElement("b", null, "Layer Description:"), " ", treeViewSelectedItem.layerDescription, " ") : null, primaryPanelShowFavoritesBtn ? /*#__PURE__*/React$1__default.createElement(FavoritesToggle$1, {
|
|
161696
161782
|
layer: treeViewSelectedItem
|
|
161697
161783
|
}) : null, /*#__PURE__*/React$1__default.createElement("p", null), primaryPanelShowUserDefaultLayersBtn ? /*#__PURE__*/React$1__default.createElement(DefaultsToggle$1, {
|
|
161698
161784
|
layer: treeViewSelectedItem
|
|
@@ -161703,7 +161789,7 @@ var LayerSubpanel = function LayerSubpanel(props) {
|
|
|
161703
161789
|
})));
|
|
161704
161790
|
};
|
|
161705
161791
|
|
|
161706
|
-
var LayerSubpanel$1 = connect("selectTreeViewSelectedItem", "selectPrimaryPanelShowClose", "selectMapZoom", "selectTreeViewDownloadEnabled", "selectPrimaryPanelShowFavoritesBtn", "selectPrimaryPanelShowUserDefaultLayersBtn", "selectTreeRootNode", "doRenderTreeView", LayerSubpanel);
|
|
161792
|
+
var LayerSubpanel$1 = connect("selectSortOrderStatus", "selectTreeViewSelectedItem", "selectPrimaryPanelShowClose", "selectMapZoom", "selectTreeViewDownloadEnabled", "selectPrimaryPanelShowFavoritesBtn", "selectPrimaryPanelShowUserDefaultLayersBtn", "selectTreeRootNode", "doRenderTreeView", LayerSubpanel);
|
|
161707
161793
|
|
|
161708
161794
|
var treeView = function treeView(controls) {
|
|
161709
161795
|
return {
|
|
@@ -162505,7 +162591,56 @@ var bundle$e = {
|
|
|
162505
162591
|
dataProjection: "EPSG:4326"
|
|
162506
162592
|
});
|
|
162507
162593
|
if (!booleanDisjoint(identifyFeature, geoJsonFeature)) outFeatures.push(geoJsonFeature);
|
|
162508
|
-
});
|
|
162594
|
+
}); //Column Filtering
|
|
162595
|
+
|
|
162596
|
+
if (layers[0].identifyFields) {
|
|
162597
|
+
outFeatures.forEach(function (feature) {
|
|
162598
|
+
if (feature.properties) {
|
|
162599
|
+
var _loop = function _loop() {
|
|
162600
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
162601
|
+
key = _Object$entries$_i[0],
|
|
162602
|
+
value = _Object$entries$_i[1];
|
|
162603
|
+
|
|
162604
|
+
var reducedProperties = {};
|
|
162605
|
+
layers[0].identifyFields.forEach(function (property) {
|
|
162606
|
+
if (feature.properties[property]) {
|
|
162607
|
+
reducedProperties[property] = feature.properties[property];
|
|
162608
|
+
}
|
|
162609
|
+
});
|
|
162610
|
+
feature.properties = reducedProperties;
|
|
162611
|
+
};
|
|
162612
|
+
|
|
162613
|
+
for (var _i = 0, _Object$entries = Object.entries(feature.properties); _i < _Object$entries.length; _i++) {
|
|
162614
|
+
_loop();
|
|
162615
|
+
}
|
|
162616
|
+
}
|
|
162617
|
+
});
|
|
162618
|
+
} //Column Renaming
|
|
162619
|
+
|
|
162620
|
+
|
|
162621
|
+
if (layers[0].identifyRenameColums) {
|
|
162622
|
+
outFeatures.forEach(function (feature) {
|
|
162623
|
+
if (feature.properties) {
|
|
162624
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(feature.properties); _i2 < _Object$entries2.length; _i2++) {
|
|
162625
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
|
162626
|
+
featureKey = _Object$entries2$_i[0],
|
|
162627
|
+
featureValue = _Object$entries2$_i[1];
|
|
162628
|
+
|
|
162629
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(layers[0].identifyRenameColums); _i3 < _Object$entries3.length; _i3++) {
|
|
162630
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
|
162631
|
+
key = _Object$entries3$_i[0],
|
|
162632
|
+
value = _Object$entries3$_i[1];
|
|
162633
|
+
|
|
162634
|
+
if (featureKey === key) {
|
|
162635
|
+
feature.properties[value] = feature.properties[featureKey];
|
|
162636
|
+
delete feature.properties[featureKey];
|
|
162637
|
+
}
|
|
162638
|
+
}
|
|
162639
|
+
}
|
|
162640
|
+
}
|
|
162641
|
+
});
|
|
162642
|
+
}
|
|
162643
|
+
|
|
162509
162644
|
out.push({
|
|
162510
162645
|
dataset: lyr.uid,
|
|
162511
162646
|
layerName: lyr.displayName,
|
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ const createNode = (options, map) => {
|
|
|
41
41
|
info: options.info,
|
|
42
42
|
identifyType: options.identifyType,
|
|
43
43
|
identifyFields: options.identifyFields,
|
|
44
|
+
identifyRenameColums: options.identifyRenameColums,
|
|
44
45
|
legend: options.legend,
|
|
45
46
|
passFilter: true,
|
|
46
47
|
zoomTo: !!options.zoomTo,
|
|
@@ -100,6 +101,7 @@ export default {
|
|
|
100
101
|
favoriteLayers: [],
|
|
101
102
|
userDefaultLayers: [],
|
|
102
103
|
overrideSortLayerOrder: false,
|
|
104
|
+
sortOrderStatus: false
|
|
103
105
|
};
|
|
104
106
|
|
|
105
107
|
return (state = initialData, { type, payload }) => {
|
|
@@ -143,6 +145,9 @@ export default {
|
|
|
143
145
|
if (type === "LAYERS_USER_DEFAULT_LAYERS_LIST_UPDATED") {
|
|
144
146
|
return Object.assign({}, state, payload);
|
|
145
147
|
}
|
|
148
|
+
if (type === "SORT_ORDER_NOW_SHOWING") {
|
|
149
|
+
return Object.assign({}, state, payload);
|
|
150
|
+
}
|
|
146
151
|
|
|
147
152
|
return state;
|
|
148
153
|
};
|
|
@@ -684,7 +689,19 @@ export default {
|
|
|
684
689
|
},
|
|
685
690
|
});
|
|
686
691
|
},
|
|
687
|
-
|
|
692
|
+
doShowLayerSortOrder: (bool) => ({ dispatch }) => {
|
|
693
|
+
if(bool){
|
|
694
|
+
dispatch({
|
|
695
|
+
type: "SORT_ORDER_NOW_SHOWING",
|
|
696
|
+
payload: {
|
|
697
|
+
sortOrderStatus: true,
|
|
698
|
+
},
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
selectSortOrderStatus: (state) => {
|
|
703
|
+
return state.layers.sortOrderStatus;
|
|
704
|
+
},
|
|
688
705
|
selectFavoriteLayers: (state) => {
|
|
689
706
|
return state.layers.favoriteLayers;
|
|
690
707
|
},
|
|
@@ -184,6 +184,13 @@ export default {
|
|
|
184
184
|
doStartIdentify:
|
|
185
185
|
(e) =>
|
|
186
186
|
({ dispatch, store }) => {
|
|
187
|
+
const map = store.selectMap();
|
|
188
|
+
// https://jira.il2.dso.mil/browse/CWBI-16638
|
|
189
|
+
map.interactions.array_.forEach((mapItem) =>{
|
|
190
|
+
if (mapItem.ol_uid == "43" ){
|
|
191
|
+
mapItem.values_.active = false
|
|
192
|
+
}
|
|
193
|
+
});
|
|
187
194
|
e.preventDefault();
|
|
188
195
|
e.stopPropagation();
|
|
189
196
|
const selectBy = e.currentTarget.dataset.selectby;
|
|
@@ -373,6 +380,13 @@ export default {
|
|
|
373
380
|
// close identify menu
|
|
374
381
|
store.doBasicToolbarDeactivate();
|
|
375
382
|
|
|
383
|
+
// https://jira.il2.dso.mil/browse/CWBI-16638
|
|
384
|
+
map.interactions.array_.forEach((mapItem) =>{
|
|
385
|
+
if (mapItem.ol_uid == "43" ){
|
|
386
|
+
mapItem.values_.active = true
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
|
|
376
390
|
dispatch({ type: "IDENTIFY_UI_STOPPED", payload: { selectBy: null } });
|
|
377
391
|
},
|
|
378
392
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import async from "async";
|
|
2
|
-
import { formatArcgisrest
|
|
2
|
+
import { formatArcgisrest} from "../../openlayers-utils/format-utilities";
|
|
3
3
|
|
|
4
4
|
function formatUrl(options) {
|
|
5
5
|
let url = `${options.root}/identify?`;
|
|
@@ -91,8 +91,40 @@ export default {
|
|
|
91
91
|
cb(`Error for ${visibleLayer.displayName}`);
|
|
92
92
|
} else {
|
|
93
93
|
try {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
const data = JSON.parse(body);
|
|
95
|
+
//Column Filtering
|
|
96
|
+
if (visibleLayer.identifyFields) {
|
|
97
|
+
data.results.forEach((result) => {
|
|
98
|
+
if(result.attributes){
|
|
99
|
+
for (const [key, value] of Object.entries(result.attributes)) {
|
|
100
|
+
let reducedProperties = {};
|
|
101
|
+
visibleLayer.identifyFields.forEach((property) => {
|
|
102
|
+
if (result.attributes[property]) {
|
|
103
|
+
reducedProperties[property] =
|
|
104
|
+
result.attributes[property];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
result.attributes = reducedProperties;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
// Column Renaming
|
|
113
|
+
if (visibleLayer.identifyRenameColums) {
|
|
114
|
+
data.results.forEach((result) => {
|
|
115
|
+
if(result.attributes){
|
|
116
|
+
for (const [featureKey, featureValue] of Object.entries(result.attributes)) {
|
|
117
|
+
for (const [key, value] of Object.entries(visibleLayer.identifyRenameColums)){
|
|
118
|
+
if (featureKey === key) {
|
|
119
|
+
result.attributes[value] = result.attributes[featureKey];
|
|
120
|
+
delete result.attributes[featureKey];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
cb(null, {
|
|
96
128
|
dataset: visibleLayer.uid,
|
|
97
129
|
layerName: visibleLayer.displayName,
|
|
98
130
|
err: null,
|
|
@@ -113,7 +145,8 @@ export default {
|
|
|
113
145
|
},
|
|
114
146
|
});
|
|
115
147
|
} catch (err) {
|
|
116
|
-
|
|
148
|
+
|
|
149
|
+
cb(`Error for ${visibleLayer.displayName}`,err);
|
|
117
150
|
}
|
|
118
151
|
}
|
|
119
152
|
});
|
|
@@ -77,7 +77,38 @@ export default {
|
|
|
77
77
|
if (!disjoint(identifyFeature, geoJsonFeature))
|
|
78
78
|
outFeatures.push(geoJsonFeature);
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
//Column Filtering
|
|
81
|
+
if (layers[0].identifyFields) {
|
|
82
|
+
outFeatures.forEach((feature) => {
|
|
83
|
+
if(feature.properties){
|
|
84
|
+
for (const [key, value] of Object.entries(feature.properties)) {
|
|
85
|
+
let reducedProperties = {};
|
|
86
|
+
layers[0].identifyFields.forEach((property) => {
|
|
87
|
+
if (feature.properties[property]) {
|
|
88
|
+
reducedProperties[property] =
|
|
89
|
+
feature.properties[property];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
feature.properties = reducedProperties;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
//Column Renaming
|
|
98
|
+
if (layers[0].identifyRenameColums) {
|
|
99
|
+
outFeatures.forEach((feature) => {
|
|
100
|
+
if(feature.properties){
|
|
101
|
+
for (const [featureKey, featureValue] of Object.entries(feature.properties)) {
|
|
102
|
+
for (const [key, value] of Object.entries(layers[0].identifyRenameColums)){
|
|
103
|
+
if (featureKey === key) {
|
|
104
|
+
feature.properties[value] = feature.properties[featureKey];
|
|
105
|
+
delete feature.properties[featureKey];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
}
|
|
81
112
|
out.push({
|
|
82
113
|
dataset: lyr.uid,
|
|
83
114
|
layerName: lyr.displayName,
|
|
@@ -17,7 +17,9 @@ const LayerSubpanel = (props) => {
|
|
|
17
17
|
primaryPanelShowFavoritesBtn,
|
|
18
18
|
primaryPanelShowUserDefaultLayersBtn,
|
|
19
19
|
treeRootNode,
|
|
20
|
+
sortOrderStatus
|
|
20
21
|
} = props;
|
|
22
|
+
|
|
21
23
|
const listClass = classnames({
|
|
22
24
|
"sidebar-list": !primaryPanelShowClose,
|
|
23
25
|
"thin-scrollbar": true,
|
|
@@ -80,6 +82,13 @@ const LayerSubpanel = (props) => {
|
|
|
80
82
|
<p>
|
|
81
83
|
<b>Identify Type:</b> {treeViewSelectedItem.identifyType}{" "}
|
|
82
84
|
</p>
|
|
85
|
+
<div>
|
|
86
|
+
{sortOrderStatus ?
|
|
87
|
+
<p>
|
|
88
|
+
<b>Sort Order:</b> {treeViewSelectedItem.sortOrder}{" "}
|
|
89
|
+
</p>
|
|
90
|
+
: null}
|
|
91
|
+
</div>
|
|
83
92
|
<p>
|
|
84
93
|
<b>Min Zoom:</b> {treeViewSelectedItem.minzoom}{" "}
|
|
85
94
|
</p>
|
|
@@ -90,6 +99,7 @@ const LayerSubpanel = (props) => {
|
|
|
90
99
|
<b>Current Zoom:</b> {Math.floor(mapZoom)}{" "}
|
|
91
100
|
</p>
|
|
92
101
|
|
|
102
|
+
|
|
93
103
|
{treeViewSelectedItem.attributions ? (
|
|
94
104
|
<p>
|
|
95
105
|
<b>Credits:</b> {treeViewSelectedItem.attributions}{" "}
|
|
@@ -121,6 +131,7 @@ const LayerSubpanel = (props) => {
|
|
|
121
131
|
};
|
|
122
132
|
|
|
123
133
|
export default connect(
|
|
134
|
+
"selectSortOrderStatus",
|
|
124
135
|
"selectTreeViewSelectedItem",
|
|
125
136
|
"selectPrimaryPanelShowClose",
|
|
126
137
|
"selectMapZoom",
|