@corpsmap/corpsmap 3.2.45 → 3.2.47

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
@@ -106658,7 +106658,7 @@ var config = {
106658
106658
  };
106659
106659
 
106660
106660
  var name = "@corpsmap/corpsmap";
106661
- var version$1 = "3.2.45";
106661
+ var version$1 = "3.2.47";
106662
106662
  var description = "CorpsMap as React Components";
106663
106663
  var main = "index.js";
106664
106664
  var scripts = {
@@ -135988,6 +135988,20 @@ var formatColumns = function formatColumns(value, formatType) {
135988
135988
  var dateObject = new Date(milliseconds);
135989
135989
  value = dateObject.toLocaleString();
135990
135990
  }
135991
+ if (formatType === "UNIXDATE_NOTIME") {
135992
+ if (value === null || value === "null") {
135993
+ return null;
135994
+ }
135995
+ var _unixTimestamp = value;
135996
+ var _milliseconds = _unixTimestamp; // * 1000 in some cases.
135997
+ var _dateObject = new Date(_milliseconds);
135998
+ var dateFormatted = new Intl.DateTimeFormat("en-US", {
135999
+ year: "numeric",
136000
+ month: "2-digit",
136001
+ day: "2-digit"
136002
+ }).format(_dateObject);
136003
+ value = dateFormatted;
136004
+ }
135991
136005
  if (formatType === "ICEJAM") {
135992
136006
  var url = "https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:".concat(value);
135993
136007
  var result = "<span><a href=\"".concat(url, "\" target=\"_blank\"> ").concat(value, " </a></span>");
@@ -137114,7 +137128,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137114
137128
  href: data.url,
137115
137129
  target: "_blank",
137116
137130
  rel: "noreferrer nofollow noopener"
137117
- }, data.name))) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137131
+ }, data.name), "\xA0\xA0\xA0\xA0\xA0\xA0\xA0", data.description)) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137118
137132
  });
137119
137133
  return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
137120
137134
  className: "cm-modal-header " + theme
@@ -137127,7 +137141,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137127
137141
  left: 0,
137128
137142
  right: 0
137129
137143
  }
137130
- }, /*#__PURE__*/React$1__default.createElement("div", {
137144
+ }, /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("br", null)), /*#__PURE__*/React$1__default.createElement("div", {
137131
137145
  className: "cm-form-group"
137132
137146
  }, /*#__PURE__*/React$1__default.createElement("div", {
137133
137147
  style: {
@@ -137241,7 +137255,7 @@ var bundle$4 = {
137241
137255
  return state.resources.items;
137242
137256
  },
137243
137257
  reactRenderResourceModal: function reactRenderResourceModal(state) {
137244
- if (state.resources.renderModal) return {
137258
+ if (state.resources.renderModal === true) return {
137245
137259
  actionCreator: "doOpenModalResources"
137246
137260
  };
137247
137261
  }
@@ -137271,7 +137285,7 @@ var ResourcesButton = /*#__PURE__*/function (_React$Component) {
137271
137285
  key: "handleClick",
137272
137286
  value: function handleClick() {
137273
137287
  var doGetResourceData = this.props.doGetResourceData;
137274
- this.openModalResources();
137288
+ // this.openModalResources(); just for testing
137275
137289
  doGetResourceData();
137276
137290
  }
137277
137291
  }, {
package/lib/prod.js CHANGED
@@ -106572,7 +106572,7 @@ var config = {
106572
106572
  };
106573
106573
 
106574
106574
  var name = "@corpsmap/corpsmap";
106575
- var version$1 = "3.2.45";
106575
+ var version$1 = "3.2.47";
106576
106576
  var description = "CorpsMap as React Components";
106577
106577
  var main = "index.js";
106578
106578
  var scripts = {
@@ -135902,6 +135902,20 @@ var formatColumns = function formatColumns(value, formatType) {
135902
135902
  var dateObject = new Date(milliseconds);
135903
135903
  value = dateObject.toLocaleString();
135904
135904
  }
135905
+ if (formatType === "UNIXDATE_NOTIME") {
135906
+ if (value === null || value === "null") {
135907
+ return null;
135908
+ }
135909
+ var _unixTimestamp = value;
135910
+ var _milliseconds = _unixTimestamp; // * 1000 in some cases.
135911
+ var _dateObject = new Date(_milliseconds);
135912
+ var dateFormatted = new Intl.DateTimeFormat("en-US", {
135913
+ year: "numeric",
135914
+ month: "2-digit",
135915
+ day: "2-digit"
135916
+ }).format(_dateObject);
135917
+ value = dateFormatted;
135918
+ }
135905
135919
  if (formatType === "ICEJAM") {
135906
135920
  var url = "https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:".concat(value);
135907
135921
  var result = "<span><a href=\"".concat(url, "\" target=\"_blank\"> ").concat(value, " </a></span>");
@@ -137028,7 +137042,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137028
137042
  href: data.url,
137029
137043
  target: "_blank",
137030
137044
  rel: "noreferrer nofollow noopener"
137031
- }, data.name))) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137045
+ }, data.name), "\xA0\xA0\xA0\xA0\xA0\xA0\xA0", data.description)) : null, /*#__PURE__*/React$1__default.createElement("br", null));
137032
137046
  });
137033
137047
  return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
137034
137048
  className: "cm-modal-header " + theme
@@ -137041,7 +137055,7 @@ var ResourcesModal = /*#__PURE__*/function (_React$Component) {
137041
137055
  left: 0,
137042
137056
  right: 0
137043
137057
  }
137044
- }, /*#__PURE__*/React$1__default.createElement("div", {
137058
+ }, /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("br", null)), /*#__PURE__*/React$1__default.createElement("div", {
137045
137059
  className: "cm-form-group"
137046
137060
  }, /*#__PURE__*/React$1__default.createElement("div", {
137047
137061
  style: {
@@ -137155,7 +137169,7 @@ var bundle$4 = {
137155
137169
  return state.resources.items;
137156
137170
  },
137157
137171
  reactRenderResourceModal: function reactRenderResourceModal(state) {
137158
- if (state.resources.renderModal) return {
137172
+ if (state.resources.renderModal === true) return {
137159
137173
  actionCreator: "doOpenModalResources"
137160
137174
  };
137161
137175
  }
@@ -137185,7 +137199,7 @@ var ResourcesButton = /*#__PURE__*/function (_React$Component) {
137185
137199
  key: "handleClick",
137186
137200
  value: function handleClick() {
137187
137201
  var doGetResourceData = this.props.doGetResourceData;
137188
- this.openModalResources();
137202
+ // this.openModalResources(); just for testing
137189
137203
  doGetResourceData();
137190
137204
  }
137191
137205
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpsmap/corpsmap",
3
- "version": "3.2.45",
3
+ "version": "3.2.47",
4
4
  "description": "CorpsMap as React Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -38,7 +38,6 @@ export default {
38
38
 
39
39
  } else {
40
40
  try {
41
-
42
41
  console.log("Production Resource Data")
43
42
  console.log(body)
44
43
  let data = JSON.parse(body);
@@ -79,7 +78,7 @@ export default {
79
78
  },
80
79
 
81
80
  reactRenderResourceModal: (state) => {
82
- if (state.resources.renderModal)
81
+ if (state.resources.renderModal === true)
83
82
  return { actionCreator: "doOpenModalResources" };
84
83
  },
85
84
 
@@ -21,7 +21,7 @@ class ResourcesButton extends React.Component {
21
21
 
22
22
  handleClick(){
23
23
  const { doGetResourceData } = this.props;
24
- this.openModalResources();
24
+ // this.openModalResources(); just for testing
25
25
  doGetResourceData();
26
26
  }
27
27
 
@@ -20,8 +20,12 @@ class ResourcesModal extends React.Component {
20
20
  <li style={Object.keys(data).length > 0 ? {listStyleType: "disc"}: {listStyleType: "none"} }>
21
21
 
22
22
  {data.name ? <li style={{listStyleType: "none"}}>
23
- <span><a href={data.url} target="_blank" rel="noreferrer nofollow noopener" >{data.name}</a></span>
23
+ <span><a href={data.url} target="_blank" rel="noreferrer nofollow noopener" >{data.name}</a>
24
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
25
+ {data.description}
26
+ </span>
24
27
  </li> : null}
28
+
25
29
  <br></br>
26
30
  </li>
27
31
  )
@@ -34,6 +38,7 @@ class ResourcesModal extends React.Component {
34
38
  className="cm-modal-body"
35
39
  style={{ height: 290, top: 0, bottom: 0, left: 0, right: 0 }}
36
40
  >
41
+ <div><br></br></div>
37
42
  <div className="cm-form-group">
38
43
  <div style={{
39
44
  overflow: "auto scroll",
@@ -136,6 +136,20 @@ const formatColumns = function (value, formatType) {
136
136
  const dateObject = new Date(milliseconds);
137
137
  value = dateObject.toLocaleString();
138
138
  }
139
+ if (formatType === "UNIXDATE_NOTIME") {
140
+ if (value === null || value === "null") {
141
+ return null;
142
+ }
143
+ const unixTimestamp = value;
144
+ const milliseconds = unixTimestamp // * 1000 in some cases.
145
+ const dateObject = new Date(milliseconds);
146
+ const dateFormatted = new Intl.DateTimeFormat("en-US", {
147
+ year: "numeric",
148
+ month: "2-digit",
149
+ day: "2-digit"
150
+ }).format(dateObject);
151
+ value = dateFormatted;
152
+ }
139
153
  if (formatType === "ICEJAM") {
140
154
  let url = `https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:${value}`;
141
155
  let result = `<span><a href="${url}" target="_blank"> ${value} </a></span>`;