@corpsmap/corpsmap 3.2.53 → 3.2.55

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 CHANGED
@@ -106317,33 +106317,41 @@ var config = {
106317
106317
  maxZoom: 19,
106318
106318
  attributions: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106319
106319
  visible: true
106320
- }, {
106320
+ },
106321
+ // {
106322
+ // id: "MapBoxStreets",
106323
+ // name: "MapBox Streets",
106324
+ // url:
106325
+ // "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106326
+ // attributions:
106327
+ // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106328
+ // subdomains: "abcd",
106329
+ // accessToken: mapboxToken,
106330
+ // visible: false
106331
+ // },
106332
+ {
106321
106333
  id: "MapBoxStreets",
106322
106334
  name: "MapBox Streets",
106323
- url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106324
- attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106325
- subdomains: "abcd",
106326
- accessToken: mapboxToken,
106327
- visible: false
106328
- }, {
106329
- id: "NEW MapBoxStreets",
106330
- name: "NEW MapBox Streets",
106331
106335
  url: "https://api.mapbox.com/styles/v1/usace/cm938rc8w003b01rc9tge72ew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106332
106336
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106333
106337
  subdomains: "abcd",
106334
106338
  accessToken: mapboxToken,
106335
106339
  visible: false
106336
- }, {
106340
+ },
106341
+ // {
106342
+ // id: "MapBoxAerial",
106343
+ // name: "MapBox Aerial",
106344
+ // url:
106345
+ // "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106346
+ // attributions:
106347
+ // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106348
+ // subdomains: "abcd",
106349
+ // accessToken: mapboxToken,
106350
+ // visible: false
106351
+ // },
106352
+ {
106337
106353
  id: "MapBoxAerial",
106338
106354
  name: "MapBox Aerial",
106339
- url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106340
- attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106341
- subdomains: "abcd",
106342
- accessToken: mapboxToken,
106343
- visible: false
106344
- }, {
106345
- id: "NEW Satellite Streets",
106346
- name: "NEW Satellite Streets",
106347
106355
  url: "https://api.mapbox.com/styles/v1/usace/cm939otin006r01qthub96e0f/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106348
106356
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106349
106357
  subdomains: "abcd",
@@ -106351,10 +106359,10 @@ var config = {
106351
106359
  visible: false
106352
106360
  },
106353
106361
  // {
106354
- // id: "NEW MapBoxAerial",
106355
- // name: "NEW MapMapBoxAerialBox",
106362
+ // id: "MapBoxOutdoor",
106363
+ // name: "MapBox Outdoor",
106356
106364
  // url:
106357
- // "https://api.mapbox.com/styles/v1/usace/standard-satellite/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106365
+ // "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106358
106366
  // attributions:
106359
106367
  // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106360
106368
  // subdomains: "abcd",
@@ -106364,46 +106372,38 @@ var config = {
106364
106372
  {
106365
106373
  id: "MapBoxOutdoor",
106366
106374
  name: "MapBox Outdoor",
106367
- url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106368
- attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106369
- subdomains: "abcd",
106370
- accessToken: mapboxToken,
106371
- visible: false
106372
- }, {
106373
- id: "NEW MapBoxOutdoor",
106374
- name: "NEW MapBox Outdoor",
106375
106375
  url: "https://api.mapbox.com/styles/v1/usace/cm939k4g0007v01qu4q5x0yew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106376
106376
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106377
106377
  subdomains: "abcd",
106378
106378
  accessToken: mapboxToken,
106379
106379
  visible: false
106380
106380
  }, {
106381
- id: "NEW Monochrome Light",
106382
- name: "NEW Monochrome Light",
106381
+ id: "Monochrome Light",
106382
+ name: "Monochrome Light",
106383
106383
  url: "https://api.mapbox.com/styles/v1/usace/cm9394kdo003101ri16n4crq0/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106384
106384
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106385
106385
  subdomains: "abcd",
106386
106386
  accessToken: mapboxToken,
106387
106387
  visible: false
106388
106388
  }, {
106389
- id: "NEW Monochrome Dark",
106390
- name: "NEW Monochrome Dark",
106389
+ id: "Monochrome Dark",
106390
+ name: "Monochrome Dark",
106391
106391
  url: "https://api.mapbox.com/styles/v1/usace/cm939gizu003301r9hn5zcdi7/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106392
106392
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106393
106393
  subdomains: "abcd",
106394
106394
  accessToken: mapboxToken,
106395
106395
  visible: false
106396
106396
  }, {
106397
- id: "NEW Navigation Dark",
106398
- name: "NEW Navigation Dark",
106397
+ id: "Navigation Dark",
106398
+ name: "Navigation Dark",
106399
106399
  url: "https://api.mapbox.com/styles/v1/usace/cm939ltif005101qta6p168vj/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106400
106400
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106401
106401
  subdomains: "abcd",
106402
106402
  accessToken: mapboxToken,
106403
106403
  visible: false
106404
106404
  }, {
106405
- id: "NEW Navigation Light",
106406
- name: "NEW Navigation Light",
106405
+ id: "Navigation Light",
106406
+ name: "Navigation Light",
106407
106407
  url: "https://api.mapbox.com/styles/v1/usace/cm939n8jo007w01qugu58707v/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106408
106408
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106409
106409
  subdomains: "abcd",
@@ -106710,7 +106710,7 @@ var config = {
106710
106710
  };
106711
106711
 
106712
106712
  var name = "@corpsmap/corpsmap";
106713
- var version$1 = "3.2.53";
106713
+ var version$1 = "3.2.55";
106714
106714
  var description = "CorpsMap as React Components";
106715
106715
  var main = "index.js";
106716
106716
  var scripts = {
@@ -137174,16 +137174,29 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137174
137174
  doGetResourceData = _this$props.doGetResourceData,
137175
137175
  resourceItems = _this$props.resourceItems,
137176
137176
  resourceGroups = _this$props.resourceGroups;
137177
+ resourceGroups["999999"] = {
137178
+ groupDescription: 'Additional Resources',
137179
+ groupName: 'Additional Resources'
137180
+ };
137177
137181
  function formatGroupItems(resourceItems, groupId) {
137178
- var wolf = resourceItems.filter(function (item) {
137179
- return item.resources_group_id !== null && item.resources_group_id.toString() === groupId;
137180
- });
137181
- return wolf.map(function (data) {
137182
- return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("table", {
137182
+ var items;
137183
+ if (groupId !== "999999") {
137184
+ items = resourceItems.filter(function (item) {
137185
+ return item.resources_group_id !== null && item.resources_group_id.toString() === groupId;
137186
+ });
137187
+ } else {
137188
+ items = resourceItems.filter(function (item) {
137189
+ return item.resources_group_id === null;
137190
+ });
137191
+ }
137192
+ return items.map(function (data) {
137193
+ return /*#__PURE__*/React$1__default.createElement("div", {
137194
+ key: "DIVID" + data.resource_id
137195
+ }, /*#__PURE__*/React$1__default.createElement("table", {
137183
137196
  className: "table",
137184
- key: "tableID" + data.id
137197
+ key: "tableID" + data.resource_id
137185
137198
  }, /*#__PURE__*/React$1__default.createElement("tbody", null, /*#__PURE__*/React$1__default.createElement("tr", {
137186
- key: data.id + 7777777
137199
+ key: data.resource_id + 7777777
137187
137200
  }, /*#__PURE__*/React$1__default.createElement("td", {
137188
137201
  className: "col-sm-4"
137189
137202
  }, /*#__PURE__*/React$1__default.createElement("a", {
@@ -137195,10 +137208,6 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137195
137208
  }, data.description)))), /*#__PURE__*/React$1__default.createElement("br", null));
137196
137209
  });
137197
137210
  }
137198
-
137199
- // let url = "https://cwbi-app-dev.sec.usace.army.mil/int/fudsmis/fudsmis/resource_group_images/";
137200
- // let src = url + "5213";
137201
-
137202
137211
  var groups = [];
137203
137212
  groups = Object.keys(resourceGroups).map(function (item) {
137204
137213
  var url = "".concat(process.env.REACT_APP_FUDS_RESOURCE_GROUP_IMAGE_URL) + item;
@@ -137214,9 +137223,13 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137214
137223
  }, /*#__PURE__*/React$1__default.createElement("img", {
137215
137224
  key: "imageID" + item,
137216
137225
  src: url,
137217
- alt: "logo",
137218
137226
  width: "50px",
137219
- height: "50px"
137227
+ height: "50px",
137228
+ onError: function onError(_ref) {
137229
+ var currentTarget = _ref.currentTarget;
137230
+ currentTarget.onerror = null;
137231
+ currentTarget.style.display = "none";
137232
+ }
137220
137233
  }), "\xA0\xA0\xA0\xA0\xA0\xA0", resourceGroups[item].groupName), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("div", {
137221
137234
  key: "itemDivID" + item,
137222
137235
  style: {
@@ -137224,9 +137237,6 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137224
137237
  }
137225
137238
  }, formatGroupItems(resourceItems, item)), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null));
137226
137239
  });
137227
-
137228
- // let bob = <img src={src} alt="logo" width="40px" height="40px"/>;
137229
-
137230
137240
  return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
137231
137241
  className: "cm-modal-header " + theme
137232
137242
  }, "Resources"), /*#__PURE__*/React$1__default.createElement("div", {
@@ -137267,7 +137277,7 @@ var createResourceGroup = function createResourceGroup(items) {
137267
137277
  for (var i = 0; i < items.length; i++) {
137268
137278
  var id = items[i].id;
137269
137279
  if (id) {
137270
- groups[items[i].id] = {
137280
+ groups[items[i].resources_group_id] = {
137271
137281
  groupDescription: items[i]["group description"],
137272
137282
  groupName: items[i]["group name"]
137273
137283
  };
@@ -137326,14 +137336,10 @@ var bundle$4 = {
137326
137336
  } else {
137327
137337
  try {
137328
137338
  console.log("Production Resource Data");
137329
- console.log(body);
137330
137339
  var data = JSON.parse(body);
137331
- console.log('data');
137332
- console.log(data);
137333
137340
  var items = data.items;
137334
137341
  var groups = {};
137335
137342
  groups = createResourceGroup(items);
137336
- console.log("ITEMS");
137337
137343
  console.log(items);
137338
137344
  console.log(groups);
137339
137345
  dispatch({
package/lib/prod.js CHANGED
@@ -106231,33 +106231,41 @@ var config = {
106231
106231
  maxZoom: 19,
106232
106232
  attributions: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106233
106233
  visible: true
106234
- }, {
106234
+ },
106235
+ // {
106236
+ // id: "MapBoxStreets",
106237
+ // name: "MapBox Streets",
106238
+ // url:
106239
+ // "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106240
+ // attributions:
106241
+ // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106242
+ // subdomains: "abcd",
106243
+ // accessToken: mapboxToken,
106244
+ // visible: false
106245
+ // },
106246
+ {
106235
106247
  id: "MapBoxStreets",
106236
106248
  name: "MapBox Streets",
106237
- url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106238
- attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106239
- subdomains: "abcd",
106240
- accessToken: mapboxToken,
106241
- visible: false
106242
- }, {
106243
- id: "NEW MapBoxStreets",
106244
- name: "NEW MapBox Streets",
106245
106249
  url: "https://api.mapbox.com/styles/v1/usace/cm938rc8w003b01rc9tge72ew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106246
106250
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106247
106251
  subdomains: "abcd",
106248
106252
  accessToken: mapboxToken,
106249
106253
  visible: false
106250
- }, {
106254
+ },
106255
+ // {
106256
+ // id: "MapBoxAerial",
106257
+ // name: "MapBox Aerial",
106258
+ // url:
106259
+ // "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106260
+ // attributions:
106261
+ // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106262
+ // subdomains: "abcd",
106263
+ // accessToken: mapboxToken,
106264
+ // visible: false
106265
+ // },
106266
+ {
106251
106267
  id: "MapBoxAerial",
106252
106268
  name: "MapBox Aerial",
106253
- url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106254
- attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106255
- subdomains: "abcd",
106256
- accessToken: mapboxToken,
106257
- visible: false
106258
- }, {
106259
- id: "NEW Satellite Streets",
106260
- name: "NEW Satellite Streets",
106261
106269
  url: "https://api.mapbox.com/styles/v1/usace/cm939otin006r01qthub96e0f/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106262
106270
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106263
106271
  subdomains: "abcd",
@@ -106265,10 +106273,10 @@ var config = {
106265
106273
  visible: false
106266
106274
  },
106267
106275
  // {
106268
- // id: "NEW MapBoxAerial",
106269
- // name: "NEW MapMapBoxAerialBox",
106276
+ // id: "MapBoxOutdoor",
106277
+ // name: "MapBox Outdoor",
106270
106278
  // url:
106271
- // "https://api.mapbox.com/styles/v1/usace/standard-satellite/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106279
+ // "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106272
106280
  // attributions:
106273
106281
  // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106274
106282
  // subdomains: "abcd",
@@ -106278,46 +106286,38 @@ var config = {
106278
106286
  {
106279
106287
  id: "MapBoxOutdoor",
106280
106288
  name: "MapBox Outdoor",
106281
- url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106282
- attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106283
- subdomains: "abcd",
106284
- accessToken: mapboxToken,
106285
- visible: false
106286
- }, {
106287
- id: "NEW MapBoxOutdoor",
106288
- name: "NEW MapBox Outdoor",
106289
106289
  url: "https://api.mapbox.com/styles/v1/usace/cm939k4g0007v01qu4q5x0yew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106290
106290
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106291
106291
  subdomains: "abcd",
106292
106292
  accessToken: mapboxToken,
106293
106293
  visible: false
106294
106294
  }, {
106295
- id: "NEW Monochrome Light",
106296
- name: "NEW Monochrome Light",
106295
+ id: "Monochrome Light",
106296
+ name: "Monochrome Light",
106297
106297
  url: "https://api.mapbox.com/styles/v1/usace/cm9394kdo003101ri16n4crq0/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106298
106298
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106299
106299
  subdomains: "abcd",
106300
106300
  accessToken: mapboxToken,
106301
106301
  visible: false
106302
106302
  }, {
106303
- id: "NEW Monochrome Dark",
106304
- name: "NEW Monochrome Dark",
106303
+ id: "Monochrome Dark",
106304
+ name: "Monochrome Dark",
106305
106305
  url: "https://api.mapbox.com/styles/v1/usace/cm939gizu003301r9hn5zcdi7/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106306
106306
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106307
106307
  subdomains: "abcd",
106308
106308
  accessToken: mapboxToken,
106309
106309
  visible: false
106310
106310
  }, {
106311
- id: "NEW Navigation Dark",
106312
- name: "NEW Navigation Dark",
106311
+ id: "Navigation Dark",
106312
+ name: "Navigation Dark",
106313
106313
  url: "https://api.mapbox.com/styles/v1/usace/cm939ltif005101qta6p168vj/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106314
106314
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106315
106315
  subdomains: "abcd",
106316
106316
  accessToken: mapboxToken,
106317
106317
  visible: false
106318
106318
  }, {
106319
- id: "NEW Navigation Light",
106320
- name: "NEW Navigation Light",
106319
+ id: "Navigation Light",
106320
+ name: "Navigation Light",
106321
106321
  url: "https://api.mapbox.com/styles/v1/usace/cm939n8jo007w01qugu58707v/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
106322
106322
  attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
106323
106323
  subdomains: "abcd",
@@ -106624,7 +106624,7 @@ var config = {
106624
106624
  };
106625
106625
 
106626
106626
  var name = "@corpsmap/corpsmap";
106627
- var version$1 = "3.2.53";
106627
+ var version$1 = "3.2.55";
106628
106628
  var description = "CorpsMap as React Components";
106629
106629
  var main = "index.js";
106630
106630
  var scripts = {
@@ -137088,16 +137088,29 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137088
137088
  doGetResourceData = _this$props.doGetResourceData,
137089
137089
  resourceItems = _this$props.resourceItems,
137090
137090
  resourceGroups = _this$props.resourceGroups;
137091
+ resourceGroups["999999"] = {
137092
+ groupDescription: 'Additional Resources',
137093
+ groupName: 'Additional Resources'
137094
+ };
137091
137095
  function formatGroupItems(resourceItems, groupId) {
137092
- var wolf = resourceItems.filter(function (item) {
137093
- return item.resources_group_id !== null && item.resources_group_id.toString() === groupId;
137094
- });
137095
- return wolf.map(function (data) {
137096
- return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("table", {
137096
+ var items;
137097
+ if (groupId !== "999999") {
137098
+ items = resourceItems.filter(function (item) {
137099
+ return item.resources_group_id !== null && item.resources_group_id.toString() === groupId;
137100
+ });
137101
+ } else {
137102
+ items = resourceItems.filter(function (item) {
137103
+ return item.resources_group_id === null;
137104
+ });
137105
+ }
137106
+ return items.map(function (data) {
137107
+ return /*#__PURE__*/React$1__default.createElement("div", {
137108
+ key: "DIVID" + data.resource_id
137109
+ }, /*#__PURE__*/React$1__default.createElement("table", {
137097
137110
  className: "table",
137098
- key: "tableID" + data.id
137111
+ key: "tableID" + data.resource_id
137099
137112
  }, /*#__PURE__*/React$1__default.createElement("tbody", null, /*#__PURE__*/React$1__default.createElement("tr", {
137100
- key: data.id + 7777777
137113
+ key: data.resource_id + 7777777
137101
137114
  }, /*#__PURE__*/React$1__default.createElement("td", {
137102
137115
  className: "col-sm-4"
137103
137116
  }, /*#__PURE__*/React$1__default.createElement("a", {
@@ -137109,10 +137122,6 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137109
137122
  }, data.description)))), /*#__PURE__*/React$1__default.createElement("br", null));
137110
137123
  });
137111
137124
  }
137112
-
137113
- // let url = "https://cwbi-app-dev.sec.usace.army.mil/int/fudsmis/fudsmis/resource_group_images/";
137114
- // let src = url + "5213";
137115
-
137116
137125
  var groups = [];
137117
137126
  groups = Object.keys(resourceGroups).map(function (item) {
137118
137127
  var url = "".concat(process.env.REACT_APP_FUDS_RESOURCE_GROUP_IMAGE_URL) + item;
@@ -137128,9 +137137,13 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137128
137137
  }, /*#__PURE__*/React$1__default.createElement("img", {
137129
137138
  key: "imageID" + item,
137130
137139
  src: url,
137131
- alt: "logo",
137132
137140
  width: "50px",
137133
- height: "50px"
137141
+ height: "50px",
137142
+ onError: function onError(_ref) {
137143
+ var currentTarget = _ref.currentTarget;
137144
+ currentTarget.onerror = null;
137145
+ currentTarget.style.display = "none";
137146
+ }
137134
137147
  }), "\xA0\xA0\xA0\xA0\xA0\xA0", resourceGroups[item].groupName), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("div", {
137135
137148
  key: "itemDivID" + item,
137136
137149
  style: {
@@ -137138,9 +137151,6 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137138
137151
  }
137139
137152
  }, formatGroupItems(resourceItems, item)), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null));
137140
137153
  });
137141
-
137142
- // let bob = <img src={src} alt="logo" width="40px" height="40px"/>;
137143
-
137144
137154
  return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
137145
137155
  className: "cm-modal-header " + theme
137146
137156
  }, "Resources"), /*#__PURE__*/React$1__default.createElement("div", {
@@ -137181,7 +137191,7 @@ var createResourceGroup = function createResourceGroup(items) {
137181
137191
  for (var i = 0; i < items.length; i++) {
137182
137192
  var id = items[i].id;
137183
137193
  if (id) {
137184
- groups[items[i].id] = {
137194
+ groups[items[i].resources_group_id] = {
137185
137195
  groupDescription: items[i]["group description"],
137186
137196
  groupName: items[i]["group name"]
137187
137197
  };
@@ -137240,14 +137250,10 @@ var bundle$4 = {
137240
137250
  } else {
137241
137251
  try {
137242
137252
  console.log("Production Resource Data");
137243
- console.log(body);
137244
137253
  var data = JSON.parse(body);
137245
- console.log('data');
137246
- console.log(data);
137247
137254
  var items = data.items;
137248
137255
  var groups = {};
137249
137256
  groups = createResourceGroup(items);
137250
- console.log("ITEMS");
137251
137257
  console.log(items);
137252
137258
  console.log(groups);
137253
137259
  dispatch({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpsmap/corpsmap",
3
- "version": "3.2.53",
3
+ "version": "3.2.55",
4
4
  "description": "CorpsMap as React Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,20 +31,20 @@ const config = {
31
31
  '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
32
32
  visible: true
33
33
  },
34
+ // {
35
+ // id: "MapBoxStreets",
36
+ // name: "MapBox Streets",
37
+ // url:
38
+ // "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
39
+ // attributions:
40
+ // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
41
+ // subdomains: "abcd",
42
+ // accessToken: mapboxToken,
43
+ // visible: false
44
+ // },
34
45
  {
35
46
  id: "MapBoxStreets",
36
47
  name: "MapBox Streets",
37
- url:
38
- "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
39
- attributions:
40
- 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
41
- subdomains: "abcd",
42
- accessToken: mapboxToken,
43
- visible: false
44
- },
45
- {
46
- id: "NEW MapBoxStreets",
47
- name: "NEW MapBox Streets",
48
48
  url:
49
49
  "https://api.mapbox.com/styles/v1/usace/cm938rc8w003b01rc9tge72ew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
50
50
  attributions:
@@ -53,20 +53,20 @@ const config = {
53
53
  accessToken: mapboxToken,
54
54
  visible: false
55
55
  },
56
+ // {
57
+ // id: "MapBoxAerial",
58
+ // name: "MapBox Aerial",
59
+ // url:
60
+ // "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
61
+ // attributions:
62
+ // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
63
+ // subdomains: "abcd",
64
+ // accessToken: mapboxToken,
65
+ // visible: false
66
+ // },
56
67
  {
57
68
  id: "MapBoxAerial",
58
69
  name: "MapBox Aerial",
59
- url:
60
- "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
61
- attributions:
62
- 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
63
- subdomains: "abcd",
64
- accessToken: mapboxToken,
65
- visible: false
66
- },
67
- {
68
- id: "NEW Satellite Streets",
69
- name: "NEW Satellite Streets",
70
70
  url:
71
71
  "https://api.mapbox.com/styles/v1/usace/cm939otin006r01qthub96e0f/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
72
72
  attributions:
@@ -76,10 +76,10 @@ const config = {
76
76
  visible: false
77
77
  },
78
78
  // {
79
- // id: "NEW MapBoxAerial",
80
- // name: "NEW MapMapBoxAerialBox",
79
+ // id: "MapBoxOutdoor",
80
+ // name: "MapBox Outdoor",
81
81
  // url:
82
- // "https://api.mapbox.com/styles/v1/usace/standard-satellite/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
82
+ // "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
83
83
  // attributions:
84
84
  // 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
85
85
  // subdomains: "abcd",
@@ -89,17 +89,6 @@ const config = {
89
89
  {
90
90
  id: "MapBoxOutdoor",
91
91
  name: "MapBox Outdoor",
92
- url:
93
- "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
94
- attributions:
95
- 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
96
- subdomains: "abcd",
97
- accessToken: mapboxToken,
98
- visible: false
99
- },
100
- {
101
- id: "NEW MapBoxOutdoor",
102
- name: "NEW MapBox Outdoor",
103
92
  url:
104
93
  "https://api.mapbox.com/styles/v1/usace/cm939k4g0007v01qu4q5x0yew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
105
94
  attributions:
@@ -109,8 +98,8 @@ const config = {
109
98
  visible: false
110
99
  },
111
100
  {
112
- id: "NEW Monochrome Light",
113
- name: "NEW Monochrome Light",
101
+ id: "Monochrome Light",
102
+ name: "Monochrome Light",
114
103
  url:
115
104
  "https://api.mapbox.com/styles/v1/usace/cm9394kdo003101ri16n4crq0/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
116
105
  attributions:
@@ -120,8 +109,8 @@ const config = {
120
109
  visible: false
121
110
  },
122
111
  {
123
- id: "NEW Monochrome Dark",
124
- name: "NEW Monochrome Dark",
112
+ id: "Monochrome Dark",
113
+ name: "Monochrome Dark",
125
114
  url:
126
115
  "https://api.mapbox.com/styles/v1/usace/cm939gizu003301r9hn5zcdi7/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
127
116
  attributions:
@@ -131,8 +120,8 @@ const config = {
131
120
  visible: false
132
121
  },
133
122
  {
134
- id: "NEW Navigation Dark",
135
- name: "NEW Navigation Dark",
123
+ id: "Navigation Dark",
124
+ name: "Navigation Dark",
136
125
  url:
137
126
  "https://api.mapbox.com/styles/v1/usace/cm939ltif005101qta6p168vj/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
138
127
  attributions:
@@ -142,8 +131,8 @@ const config = {
142
131
  visible: false
143
132
  },
144
133
  {
145
- id: "NEW Navigation Light",
146
- name: "NEW Navigation Light",
134
+ id: "Navigation Light",
135
+ name: "Navigation Light",
147
136
  url:
148
137
  "https://api.mapbox.com/styles/v1/usace/cm939n8jo007w01qugu58707v/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
149
138
  attributions:
@@ -41,18 +41,12 @@ export default {
41
41
  } else {
42
42
  try {
43
43
  console.log("Production Resource Data")
44
- console.log(body)
45
44
  let data = JSON.parse(body);
46
- console.log('data')
47
- console.log(data)
48
-
49
-
50
- let items = data.items
45
+ let items = data.items;
51
46
  let groups = {};
47
+
52
48
  groups = createResourceGroup(items);
53
-
54
- console.log("ITEMS");
55
- console.log(items)
49
+ console.log(items);
56
50
  console.log(groups)
57
51
  dispatch({
58
52
  type: "RESOURCES_LOAD_PRODUCTION_DATA",
@@ -15,16 +15,27 @@ class ResourcesModal extends React.Component {
15
15
 
16
16
  render() {
17
17
  const { theme, doGetResourceData, resourceItems, resourceGroups} = this.props;
18
-
18
+
19
+ resourceGroups["999999"] = {
20
+ groupDescription: 'Additional Resources',
21
+ groupName: 'Additional Resources'
22
+ }
23
+
19
24
  function formatGroupItems(resourceItems, groupId) {
20
- const wolf = resourceItems.filter(item => item.resources_group_id !== null && item.resources_group_id.toString() === groupId);
25
+ let items;
26
+ if(groupId !== "999999") {
27
+ items = resourceItems.filter(item => item.resources_group_id !== null && item.resources_group_id.toString() === groupId);
28
+ }
29
+ else {
30
+ items = resourceItems.filter(item => item.resources_group_id === null);
31
+ }
21
32
 
22
33
  return (
23
- wolf.map( data =>
24
- <div>
25
- <table className="table" key={"tableID"+data.id} >
34
+ items.map( data =>
35
+ <div key={"DIVID"+data.resource_id}>
36
+ <table className="table" key={"tableID"+data.resource_id} >
26
37
  <tbody>
27
- <tr key={data.id + 7777777}>
38
+ <tr key={data.resource_id + 7777777}>
28
39
  <td className="col-sm-4">
29
40
  <a href={data.url} target="_blank" rel="noreferrer nofollow noopener" >{data.name}</a>
30
41
  </td>
@@ -41,18 +52,17 @@ class ResourcesModal extends React.Component {
41
52
 
42
53
  }
43
54
 
44
- // let url = "https://cwbi-app-dev.sec.usace.army.mil/int/fudsmis/fudsmis/resource_group_images/";
45
- // let src = url + "5213";
46
55
 
47
56
  let groups = [];
48
-
57
+ let unGroupedItems = [];
58
+
49
59
  groups = Object.keys(resourceGroups).map(item => {
50
60
  let url = `${process.env.REACT_APP_FUDS_RESOURCE_GROUP_IMAGE_URL}` + item;
51
-
61
+
52
62
  return (
53
63
  <div key={"image"+item} style={{ paddingLeft: "10px", fontSize: "20px", fontWeight: "bold" }}>
54
64
  <span key={"span"+item}>
55
- <img key={"imageID"+item} src={url} alt="logo" width="50px" height="50px"/>
65
+ <img key={"imageID"+item} src={url} width="50px" height="50px" onError={({ currentTarget}) => { currentTarget.onerror = null; currentTarget.style.display = "none";}}/>
56
66
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
57
67
  {resourceGroups[item].groupName}
58
68
  </span>
@@ -69,10 +79,7 @@ class ResourcesModal extends React.Component {
69
79
 
70
80
  )
71
81
  });
72
-
73
-
74
- // let bob = <img src={src} alt="logo" width="40px" height="40px"/>;
75
-
82
+
76
83
  return (
77
84
  <div>
78
85
  <div className={"cm-modal-header " + theme}>Resources</div>
@@ -11,13 +11,13 @@ const createResourceGroup = (items) => {
11
11
  let id = items[i].id;
12
12
 
13
13
  if(id) {
14
- groups[items[i].id] = {
14
+ groups[items[i].resources_group_id] = {
15
15
  groupDescription: items[i]["group description"],
16
16
  groupName: items[i]["group name"]
17
17
  }
18
18
  }
19
19
  }
20
-
20
+
21
21
  return groups;
22
22
  }
23
23