@corpsmap/corpsmap 3.2.42 → 3.2.45

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 CHANGED
@@ -1,112 +1,3 @@
1
- .loading-container {
2
- height: 100px;
3
- display: flex;
4
- flex-direction: column;
5
- justify-content: center;
6
- align-items: center;
7
- }
8
-
9
- .loading-text {
10
- font-size: 18px;
11
- margin-top: 15px;
12
- }
13
-
14
- .loading-spinner {
15
- font-size: 12px;
16
- height: 12px;
17
- width: 12px;
18
- margin: 0 auto;
19
- background-color: red;
20
- -webkit-animation: move 3s linear infinite; /* Safari */
21
- animation: move 3s linear infinite;
22
- animation-play-state: running;
23
- }
24
-
25
- @keyframes move {
26
- 0%,
27
- 100% {
28
- transform: translate(-10px, -10px);
29
- background-color: #f5f5f5;
30
- border-radius: 40%;
31
- }
32
- 25% {
33
- transform: translate(10px, -10px);
34
- border-radius: 20%;
35
- }
36
- 50% {
37
- transform: translate(10px, 10px);
38
- background-color: #4d4c4e;
39
- border-radius: 0%;
40
- }
41
- 75% {
42
- transform: translate(-10px, 10px);
43
- border-radius: 20%;
44
- }
45
- }
46
-
47
- /* Safari */
48
- @-webkit-keyframes move {
49
- 0%,
50
- 100% {
51
- -webkit-transform: translate(-10px, -10px);
52
- background-color: #f5f5f5;
53
- border-radius: 40%;
54
- }
55
- 25% {
56
- -webkit-transform: translate(10px, -10px);
57
- border-radius: 20%;
58
- }
59
- 50% {
60
- -webkit-transform: translate(10px, 10px);
61
- background-color: #4d4c4e;
62
- border-radius: 0%;
63
- }
64
- 75% {
65
- -webkit-transform: translate(-10px, 10px);
66
- border-radius: 20%;
67
- }
68
- }
69
-
70
- .cm-map-loading-container {
71
- display: flex;
72
- flex-direction: column;
73
- justify-content: center;
74
- align-items: center;
75
- }
76
- .cm-loading-indicator {
77
- margin: 5px;
78
- border: 2px solid #f3f3f3;
79
- border-radius: 50%;
80
- border-top: 2px solid #3498db;
81
- width: 25px;
82
- height: 25px;
83
- -webkit-animation: spin 1s linear infinite; /* Safari */
84
- animation: spin 1s linear infinite;
85
- }
86
- .cm-map-ready {
87
- padding: 5px;
88
- width: 25px;
89
- height: 25px;
90
- }
91
-
92
- /* Safari */
93
- @-webkit-keyframes spin {
94
- 0% {
95
- -webkit-transform: rotate(0deg);
96
- }
97
- 100% {
98
- -webkit-transform: rotate(360deg);
99
- }
100
- }
101
-
102
- @keyframes spin {
103
- 0% {
104
- transform: rotate(0deg);
105
- }
106
- 100% {
107
- transform: rotate(360deg);
108
- }
109
- }
110
1
  .corpsmap .sidebar {
111
2
  display: flex;
112
3
  position: absolute;
@@ -278,6 +169,115 @@
278
169
  outline: 0;
279
170
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
280
171
  }
172
+ .loading-container {
173
+ height: 100px;
174
+ display: flex;
175
+ flex-direction: column;
176
+ justify-content: center;
177
+ align-items: center;
178
+ }
179
+
180
+ .loading-text {
181
+ font-size: 18px;
182
+ margin-top: 15px;
183
+ }
184
+
185
+ .loading-spinner {
186
+ font-size: 12px;
187
+ height: 12px;
188
+ width: 12px;
189
+ margin: 0 auto;
190
+ background-color: red;
191
+ -webkit-animation: move 3s linear infinite; /* Safari */
192
+ animation: move 3s linear infinite;
193
+ animation-play-state: running;
194
+ }
195
+
196
+ @keyframes move {
197
+ 0%,
198
+ 100% {
199
+ transform: translate(-10px, -10px);
200
+ background-color: #f5f5f5;
201
+ border-radius: 40%;
202
+ }
203
+ 25% {
204
+ transform: translate(10px, -10px);
205
+ border-radius: 20%;
206
+ }
207
+ 50% {
208
+ transform: translate(10px, 10px);
209
+ background-color: #4d4c4e;
210
+ border-radius: 0%;
211
+ }
212
+ 75% {
213
+ transform: translate(-10px, 10px);
214
+ border-radius: 20%;
215
+ }
216
+ }
217
+
218
+ /* Safari */
219
+ @-webkit-keyframes move {
220
+ 0%,
221
+ 100% {
222
+ -webkit-transform: translate(-10px, -10px);
223
+ background-color: #f5f5f5;
224
+ border-radius: 40%;
225
+ }
226
+ 25% {
227
+ -webkit-transform: translate(10px, -10px);
228
+ border-radius: 20%;
229
+ }
230
+ 50% {
231
+ -webkit-transform: translate(10px, 10px);
232
+ background-color: #4d4c4e;
233
+ border-radius: 0%;
234
+ }
235
+ 75% {
236
+ -webkit-transform: translate(-10px, 10px);
237
+ border-radius: 20%;
238
+ }
239
+ }
240
+
241
+ .cm-map-loading-container {
242
+ display: flex;
243
+ flex-direction: column;
244
+ justify-content: center;
245
+ align-items: center;
246
+ }
247
+ .cm-loading-indicator {
248
+ margin: 5px;
249
+ border: 2px solid #f3f3f3;
250
+ border-radius: 50%;
251
+ border-top: 2px solid #3498db;
252
+ width: 25px;
253
+ height: 25px;
254
+ -webkit-animation: spin 1s linear infinite; /* Safari */
255
+ animation: spin 1s linear infinite;
256
+ }
257
+ .cm-map-ready {
258
+ padding: 5px;
259
+ width: 25px;
260
+ height: 25px;
261
+ }
262
+
263
+ /* Safari */
264
+ @-webkit-keyframes spin {
265
+ 0% {
266
+ -webkit-transform: rotate(0deg);
267
+ }
268
+ 100% {
269
+ -webkit-transform: rotate(360deg);
270
+ }
271
+ }
272
+
273
+ @keyframes spin {
274
+ 0% {
275
+ transform: rotate(0deg);
276
+ }
277
+ 100% {
278
+ transform: rotate(360deg);
279
+ }
280
+ }
281
281
  @import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");
282
282
 
283
283
  /*!
package/lib/dev.js CHANGED
@@ -153,6 +153,9 @@ function _possibleConstructorReturn(t, e) {
153
153
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
154
154
  return _assertThisInitialized(t);
155
155
  }
156
+ function _readOnlyError(r) {
157
+ throw new TypeError('"' + r + '" is read-only');
158
+ }
156
159
  function _setPrototypeOf(t, e) {
157
160
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
158
161
  return t.__proto__ = e, t;
@@ -106655,7 +106658,7 @@ var config = {
106655
106658
  };
106656
106659
 
106657
106660
  var name = "@corpsmap/corpsmap";
106658
- var version$1 = "3.2.42";
106661
+ var version$1 = "3.2.45";
106659
106662
  var description = "CorpsMap as React Components";
106660
106663
  var main = "index.js";
106661
106664
  var scripts = {
@@ -135858,6 +135861,9 @@ var formatArcgisrest = function formatArcgisrest(attributes) {
135858
135861
  key = _Object$entries$_i[0],
135859
135862
  value = _Object$entries$_i[1];
135860
135863
  var result = String(value).includes("https:") || String(value).includes("http:") ? value : null;
135864
+ if (String(value).includes("<a href")) {
135865
+ _readOnlyError("result");
135866
+ }
135861
135867
  if (result) {
135862
135868
  attributes[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
135863
135869
  }
@@ -135871,17 +135877,12 @@ var formatArcgisVector = function formatArcgisVector(results) {
135871
135877
  key = _Object$entries2$_i[0],
135872
135878
  value = _Object$entries2$_i[1];
135873
135879
  var result = String(value).includes("https:") || String(value).includes("http:") ? value : null;
135880
+ if (String(value).includes("<a href")) {
135881
+ result = null;
135882
+ }
135874
135883
  if (result) {
135875
135884
  feat.properties[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
135876
135885
  }
135877
- // Format UNIX Date
135878
-
135879
- // if ((key === "fromdate" || key === "todate" || key === "referencedate") && Number.isInteger(feat.properties[key])) {
135880
- // const unixTimestamp = feat.properties[key];
135881
- // const milliseconds = unixTimestamp // * 1000 in some cases.
135882
- // const dateObject = new Date(milliseconds);
135883
- // feat.properties[key] = dateObject.toLocaleString();
135884
- // }
135885
135886
  }
135886
135887
  });
135887
135888
  return results;
@@ -135987,6 +135988,11 @@ var formatColumns = function formatColumns(value, formatType) {
135987
135988
  var dateObject = new Date(milliseconds);
135988
135989
  value = dateObject.toLocaleString();
135989
135990
  }
135991
+ if (formatType === "ICEJAM") {
135992
+ var url = "https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:".concat(value);
135993
+ var result = "<span><a href=\"".concat(url, "\" target=\"_blank\"> ").concat(value, " </a></span>");
135994
+ return result;
135995
+ }
135990
135996
  return value;
135991
135997
  };
135992
135998
 
@@ -136798,19 +136804,25 @@ var ChangeLogModal = /*#__PURE__*/function (_React$Component) {
136798
136804
  } : {
136799
136805
  listStyleType: "none"
136800
136806
  }
136801
- }, data.change_date ? /*#__PURE__*/React$1__default.createElement("li", null, /*#__PURE__*/React$1__default.createElement("b", null, _this2.formatDate(data.change_date))) : null, data.environment ? /*#__PURE__*/React$1__default.createElement("li", {
136807
+ }, data.change_date ? /*#__PURE__*/React$1__default.createElement("li", {
136808
+ key: data.change_date
136809
+ }, /*#__PURE__*/React$1__default.createElement("b", null, _this2.formatDate(data.change_date))) : null, data.environment ? /*#__PURE__*/React$1__default.createElement("li", {
136810
+ key: data.environment,
136802
136811
  style: {
136803
136812
  listStyleType: "none"
136804
136813
  }
136805
136814
  }, /*#__PURE__*/React$1__default.createElement("b", null, "Environment:"), " ", data.environment, " ") : null, data.change_type ? /*#__PURE__*/React$1__default.createElement("li", {
136815
+ key: data.change_date,
136806
136816
  style: {
136807
136817
  listStyleType: "none"
136808
136818
  }
136809
136819
  }, /*#__PURE__*/React$1__default.createElement("b", null, "Change Type:"), " ", data.change_type) : null, data.district_code ? /*#__PURE__*/React$1__default.createElement("li", {
136820
+ key: data.district_code,
136810
136821
  style: {
136811
136822
  listStyleType: "none"
136812
136823
  }
136813
136824
  }, /*#__PURE__*/React$1__default.createElement("b", null, "District:"), " ", data.district_code) : null, data.description ? /*#__PURE__*/React$1__default.createElement("li", {
136825
+ key: data.description,
136814
136826
  style: {
136815
136827
  listStyleType: "none"
136816
136828
  }
@@ -136862,7 +136874,7 @@ var ChangeLogModal = /*#__PURE__*/function (_React$Component) {
136862
136874
  var ChangeLogModal$1 = connect("selectTheme", "selectChangeLogItems", "doModalClose", "doSubmitNotification", "doGetChangeLogData", "doSearchChangeLogData", ChangeLogModal);
136863
136875
 
136864
136876
  var url$1 = "".concat(process.env.REACT_APP_FUDS_CHANGE_LOG_URL);
136865
- var testData$1 = [{
136877
+ var testData = [{
136866
136878
  "id": 4713,
136867
136879
  "environment": "Public and Internal GIS",
136868
136880
  "district_code": "MVN",
@@ -136891,7 +136903,7 @@ var bundle$3 = {
136891
136903
  name: 'changeLog',
136892
136904
  getReducer: function getReducer() {
136893
136905
  var initialData = {
136894
- items: testData$1,
136906
+ items: testData,
136895
136907
  renderModal: false
136896
136908
  };
136897
136909
  return function () {
@@ -136957,7 +136969,7 @@ var bundle$3 = {
136957
136969
  dispatch({
136958
136970
  type: "CHANGE_LOG_LOAD_TEST_DATA",
136959
136971
  payload: {
136960
- items: testData$1,
136972
+ items: testData,
136961
136973
  renderModal: true
136962
136974
  }
136963
136975
  });
@@ -137094,7 +137106,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137094
137106
  } : {
137095
137107
  listStyleType: "none"
137096
137108
  }
137097
- }, data.resource ? /*#__PURE__*/React$1__default.createElement("li", {
137109
+ }, data.name ? /*#__PURE__*/React$1__default.createElement("li", {
137098
137110
  style: {
137099
137111
  listStyleType: "none"
137100
137112
  }
@@ -137102,7 +137114,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137102
137114
  href: data.url,
137103
137115
  target: "_blank",
137104
137116
  rel: "noreferrer nofollow noopener"
137105
- }, data.resource))) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137117
+ }, data.name))) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137106
137118
  });
137107
137119
  return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
137108
137120
  className: "cm-modal-header " + theme
@@ -137141,10 +137153,10 @@ var ResourcesModal$1 = connect("selectTheme", "selectResourceItems", "doModalClo
137141
137153
 
137142
137154
  var url$2 = "".concat(process.env.REACT_APP_FUDS_RESOURCES_URL);
137143
137155
  var defaultHtml = [{
137144
- "resource": "FUDSMIS Portal",
137156
+ "name": "FUDSMIS Portal - Default",
137145
137157
  "url": "https://fudsportal.usace.army.mil/"
137146
137158
  }, {
137147
- "resource": "IPaC Information for Planning and Consultation",
137159
+ "name": "IPaC Information for Planning and Consultation - Default",
137148
137160
  "url": "https://ipac.ecosphere.fws.gov/"
137149
137161
  }];
137150
137162
  var bundle$4 = {
@@ -137180,7 +137192,7 @@ var bundle$4 = {
137180
137192
  dispatch({
137181
137193
  type: "RESOURCES_LOAD_TEST_DATA",
137182
137194
  payload: {
137183
- items: testData,
137195
+ items: defaultHtml,
137184
137196
  renderModal: true
137185
137197
  }
137186
137198
  });
package/lib/prod.js CHANGED
@@ -153,6 +153,9 @@ function _possibleConstructorReturn(t, e) {
153
153
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
154
154
  return _assertThisInitialized(t);
155
155
  }
156
+ function _readOnlyError(r) {
157
+ throw new TypeError('"' + r + '" is read-only');
158
+ }
156
159
  function _setPrototypeOf(t, e) {
157
160
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
158
161
  return t.__proto__ = e, t;
@@ -106569,7 +106572,7 @@ var config = {
106569
106572
  };
106570
106573
 
106571
106574
  var name = "@corpsmap/corpsmap";
106572
- var version$1 = "3.2.42";
106575
+ var version$1 = "3.2.45";
106573
106576
  var description = "CorpsMap as React Components";
106574
106577
  var main = "index.js";
106575
106578
  var scripts = {
@@ -135772,6 +135775,9 @@ var formatArcgisrest = function formatArcgisrest(attributes) {
135772
135775
  key = _Object$entries$_i[0],
135773
135776
  value = _Object$entries$_i[1];
135774
135777
  var result = String(value).includes("https:") || String(value).includes("http:") ? value : null;
135778
+ if (String(value).includes("<a href")) {
135779
+ _readOnlyError("result");
135780
+ }
135775
135781
  if (result) {
135776
135782
  attributes[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
135777
135783
  }
@@ -135785,17 +135791,12 @@ var formatArcgisVector = function formatArcgisVector(results) {
135785
135791
  key = _Object$entries2$_i[0],
135786
135792
  value = _Object$entries2$_i[1];
135787
135793
  var result = String(value).includes("https:") || String(value).includes("http:") ? value : null;
135794
+ if (String(value).includes("<a href")) {
135795
+ result = null;
135796
+ }
135788
135797
  if (result) {
135789
135798
  feat.properties[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
135790
135799
  }
135791
- // Format UNIX Date
135792
-
135793
- // if ((key === "fromdate" || key === "todate" || key === "referencedate") && Number.isInteger(feat.properties[key])) {
135794
- // const unixTimestamp = feat.properties[key];
135795
- // const milliseconds = unixTimestamp // * 1000 in some cases.
135796
- // const dateObject = new Date(milliseconds);
135797
- // feat.properties[key] = dateObject.toLocaleString();
135798
- // }
135799
135800
  }
135800
135801
  });
135801
135802
  return results;
@@ -135901,6 +135902,11 @@ var formatColumns = function formatColumns(value, formatType) {
135901
135902
  var dateObject = new Date(milliseconds);
135902
135903
  value = dateObject.toLocaleString();
135903
135904
  }
135905
+ if (formatType === "ICEJAM") {
135906
+ var url = "https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:".concat(value);
135907
+ var result = "<span><a href=\"".concat(url, "\" target=\"_blank\"> ").concat(value, " </a></span>");
135908
+ return result;
135909
+ }
135904
135910
  return value;
135905
135911
  };
135906
135912
 
@@ -136712,19 +136718,25 @@ var ChangeLogModal = /*#__PURE__*/function (_React$Component) {
136712
136718
  } : {
136713
136719
  listStyleType: "none"
136714
136720
  }
136715
- }, data.change_date ? /*#__PURE__*/React$1__default.createElement("li", null, /*#__PURE__*/React$1__default.createElement("b", null, _this2.formatDate(data.change_date))) : null, data.environment ? /*#__PURE__*/React$1__default.createElement("li", {
136721
+ }, data.change_date ? /*#__PURE__*/React$1__default.createElement("li", {
136722
+ key: data.change_date
136723
+ }, /*#__PURE__*/React$1__default.createElement("b", null, _this2.formatDate(data.change_date))) : null, data.environment ? /*#__PURE__*/React$1__default.createElement("li", {
136724
+ key: data.environment,
136716
136725
  style: {
136717
136726
  listStyleType: "none"
136718
136727
  }
136719
136728
  }, /*#__PURE__*/React$1__default.createElement("b", null, "Environment:"), " ", data.environment, " ") : null, data.change_type ? /*#__PURE__*/React$1__default.createElement("li", {
136729
+ key: data.change_date,
136720
136730
  style: {
136721
136731
  listStyleType: "none"
136722
136732
  }
136723
136733
  }, /*#__PURE__*/React$1__default.createElement("b", null, "Change Type:"), " ", data.change_type) : null, data.district_code ? /*#__PURE__*/React$1__default.createElement("li", {
136734
+ key: data.district_code,
136724
136735
  style: {
136725
136736
  listStyleType: "none"
136726
136737
  }
136727
136738
  }, /*#__PURE__*/React$1__default.createElement("b", null, "District:"), " ", data.district_code) : null, data.description ? /*#__PURE__*/React$1__default.createElement("li", {
136739
+ key: data.description,
136728
136740
  style: {
136729
136741
  listStyleType: "none"
136730
136742
  }
@@ -136776,7 +136788,7 @@ var ChangeLogModal = /*#__PURE__*/function (_React$Component) {
136776
136788
  var ChangeLogModal$1 = connect("selectTheme", "selectChangeLogItems", "doModalClose", "doSubmitNotification", "doGetChangeLogData", "doSearchChangeLogData", ChangeLogModal);
136777
136789
 
136778
136790
  var url$1 = "".concat(process.env.REACT_APP_FUDS_CHANGE_LOG_URL);
136779
- var testData$1 = [{
136791
+ var testData = [{
136780
136792
  "id": 4713,
136781
136793
  "environment": "Public and Internal GIS",
136782
136794
  "district_code": "MVN",
@@ -136805,7 +136817,7 @@ var bundle$3 = {
136805
136817
  name: 'changeLog',
136806
136818
  getReducer: function getReducer() {
136807
136819
  var initialData = {
136808
- items: testData$1,
136820
+ items: testData,
136809
136821
  renderModal: false
136810
136822
  };
136811
136823
  return function () {
@@ -136871,7 +136883,7 @@ var bundle$3 = {
136871
136883
  dispatch({
136872
136884
  type: "CHANGE_LOG_LOAD_TEST_DATA",
136873
136885
  payload: {
136874
- items: testData$1,
136886
+ items: testData,
136875
136887
  renderModal: true
136876
136888
  }
136877
136889
  });
@@ -137008,7 +137020,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137008
137020
  } : {
137009
137021
  listStyleType: "none"
137010
137022
  }
137011
- }, data.resource ? /*#__PURE__*/React$1__default.createElement("li", {
137023
+ }, data.name ? /*#__PURE__*/React$1__default.createElement("li", {
137012
137024
  style: {
137013
137025
  listStyleType: "none"
137014
137026
  }
@@ -137016,7 +137028,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137016
137028
  href: data.url,
137017
137029
  target: "_blank",
137018
137030
  rel: "noreferrer nofollow noopener"
137019
- }, data.resource))) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137031
+ }, data.name))) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137020
137032
  });
137021
137033
  return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
137022
137034
  className: "cm-modal-header " + theme
@@ -137055,10 +137067,10 @@ var ResourcesModal$1 = connect("selectTheme", "selectResourceItems", "doModalClo
137055
137067
 
137056
137068
  var url$2 = "".concat(process.env.REACT_APP_FUDS_RESOURCES_URL);
137057
137069
  var defaultHtml = [{
137058
- "resource": "FUDSMIS Portal",
137070
+ "name": "FUDSMIS Portal - Default",
137059
137071
  "url": "https://fudsportal.usace.army.mil/"
137060
137072
  }, {
137061
- "resource": "IPaC Information for Planning and Consultation",
137073
+ "name": "IPaC Information for Planning and Consultation - Default",
137062
137074
  "url": "https://ipac.ecosphere.fws.gov/"
137063
137075
  }];
137064
137076
  var bundle$4 = {
@@ -137094,7 +137106,7 @@ var bundle$4 = {
137094
137106
  dispatch({
137095
137107
  type: "RESOURCES_LOAD_TEST_DATA",
137096
137108
  payload: {
137097
- items: testData,
137109
+ items: defaultHtml,
137098
137110
  renderModal: true
137099
137111
  }
137100
137112
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpsmap/corpsmap",
3
- "version": "3.2.42",
3
+ "version": "3.2.45",
4
4
  "description": "CorpsMap as React Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,14 +37,16 @@ class ChangeLogModal extends React.Component {
37
37
  const { theme, doGetChangeLogData, changeLogItems } = this.props;
38
38
  const loginDataWk = changeLogItems;
39
39
  const arrayDataItems = loginDataWk.map( data =>
40
+
40
41
  <li style={Object.keys(data).length > 0 ? {listStyleType: "disc"}: {listStyleType: "none"} }>
41
- {data.change_date ? <li><b>{this.formatDate(data.change_date)}</b></li> : null}
42
- {data.environment ? <li style={{listStyleType: "none"}}><b>Environment:</b> {data.environment} </li> : null}
43
- {data.change_type ? <li style={{listStyleType: "none"}}><b>Change Type:</b> {data.change_type}</li> : null}
44
- {data.district_code ? <li style={{listStyleType: "none"}}><b>District:</b> {data.district_code}</li> : null}
45
- {data.description ? <li style={{listStyleType: "none"}}><b>Description:</b> {data.description}</li> : null}
42
+ {data.change_date ? <li key={data.change_date}><b>{this.formatDate(data.change_date)}</b></li> : null}
43
+ {data.environment ? <li key={data.environment} style={{listStyleType: "none"}}><b>Environment:</b> {data.environment} </li> : null}
44
+ {data.change_type ? <li key={data.change_date} style={{listStyleType: "none"}}><b>Change Type:</b> {data.change_type}</li> : null}
45
+ {data.district_code ? <li key={data.district_code} style={{listStyleType: "none"}}><b>District:</b> {data.district_code}</li> : null}
46
+ {data.description ? <li key={data.description} style={{listStyleType: "none"}}><b>Description:</b> {data.description}</li> : null}
46
47
  <br></br>
47
48
  </li>
49
+
48
50
  )
49
51
 
50
52
  return (
@@ -2,8 +2,8 @@ import ResourcesModal from './resources-modal';
2
2
 
3
3
  const url = `${process.env.REACT_APP_FUDS_RESOURCES_URL}`;
4
4
  const defaultHtml = [
5
- {"resource": "FUDSMIS Portal", "url": "https://fudsportal.usace.army.mil/"},
6
- {"resource": "IPaC Information for Planning and Consultation", "url": "https://ipac.ecosphere.fws.gov/"},
5
+ {"name": "FUDSMIS Portal - Default", "url": "https://fudsportal.usace.army.mil/"},
6
+ {"name": "IPaC Information for Planning and Consultation - Default", "url": "https://ipac.ecosphere.fws.gov/"},
7
7
  ];
8
8
 
9
9
  export default {
@@ -33,11 +33,12 @@ export default {
33
33
  // On Error Load Test Data
34
34
  dispatch({
35
35
  type: "RESOURCES_LOAD_TEST_DATA",
36
- payload: { items: testData, renderModal: true },
36
+ payload: { items: defaultHtml, renderModal: true },
37
37
  });
38
38
 
39
39
  } else {
40
40
  try {
41
+
41
42
  console.log("Production Resource Data")
42
43
  console.log(body)
43
44
  let data = JSON.parse(body);
@@ -4,14 +4,10 @@ import { connect } from "redux-bundler-react";
4
4
  class ResourcesModal extends React.Component {
5
5
  constructor(props) {
6
6
  super(props);
7
-
8
- this.state = {
9
- };
7
+ this.state = {};
10
8
  this.close = this.close.bind(this);
11
9
  }
12
10
 
13
-
14
-
15
11
  close() {
16
12
  const { doModalClose } = this.props;
17
13
  doModalClose();
@@ -23,11 +19,9 @@ class ResourcesModal extends React.Component {
23
19
  const arrayDataItems = resourceItems.map( data =>
24
20
  <li style={Object.keys(data).length > 0 ? {listStyleType: "disc"}: {listStyleType: "none"} }>
25
21
 
26
- {data.resource ? <li style={{listStyleType: "none"}}>
27
-
28
- <span><a href={data.url} target="_blank" rel="noreferrer nofollow noopener" >{data.resource}</a></span>
22
+ {data.name ? <li style={{listStyleType: "none"}}>
23
+ <span><a href={data.url} target="_blank" rel="noreferrer nofollow noopener" >{data.name}</a></span>
29
24
  </li> : null}
30
-
31
25
  <br></br>
32
26
  </li>
33
27
  )
@@ -5,9 +5,13 @@ const formatArcgisrest = function (attributes) {
5
5
  ? value
6
6
  : null;
7
7
 
8
- if (result) {
9
- attributes[key] = `<a href="${value}" target="_new" > ${value} </a>`;
10
- }
8
+ if(String(value).includes("<a href")) {
9
+ result = null;
10
+ }
11
+
12
+ if (result) {
13
+ attributes[key] = `<a href="${value}" target="_new" > ${value} </a>`;
14
+ }
11
15
  }
12
16
  return attributes;
13
17
  };
@@ -15,24 +19,20 @@ const formatArcgisrest = function (attributes) {
15
19
  const formatArcgisVector = function (results) {
16
20
  results.map((feat) => {
17
21
  for (const [key, value] of Object.entries(feat.properties)) {
18
- const result =
22
+ let result =
19
23
  String(value).includes("https:") || String(value).includes("http:")
20
24
  ? value
21
25
  : null;
22
26
 
27
+ if(String(value).includes("<a href")) {
28
+ result = null;
29
+ }
30
+
23
31
  if (result) {
24
32
  feat.properties[
25
33
  key
26
34
  ] = `<a href="${value}" target="_new" > ${value} </a>`;
27
35
  }
28
- // Format UNIX Date
29
-
30
- // if ((key === "fromdate" || key === "todate" || key === "referencedate") && Number.isInteger(feat.properties[key])) {
31
- // const unixTimestamp = feat.properties[key];
32
- // const milliseconds = unixTimestamp // * 1000 in some cases.
33
- // const dateObject = new Date(milliseconds);
34
- // feat.properties[key] = dateObject.toLocaleString();
35
- // }
36
36
 
37
37
  }
38
38
  });
@@ -136,6 +136,12 @@ const formatColumns = function (value, formatType) {
136
136
  const dateObject = new Date(milliseconds);
137
137
  value = dateObject.toLocaleString();
138
138
  }
139
+ if (formatType === "ICEJAM") {
140
+ let url = `https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:${value}`;
141
+ let result = `<span><a href="${url}" target="_blank"> ${value} </a></span>`;
142
+ return result;
143
+ }
144
+
139
145
  return value;
140
146
  };
141
147