@corpsmap/corpsmap 3.2.45 → 3.2.46

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.46";
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>");
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.46";
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>");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpsmap/corpsmap",
3
- "version": "3.2.45",
3
+ "version": "3.2.46",
4
4
  "description": "CorpsMap as React Components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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>`;