@clxmedia/clxforms-client 1.0.30 → 1.0.31

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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CLXFormLayoutConvert = void 0;
4
+ const luxon_1 = require("luxon");
4
5
  const formatResponseValue = (response, question) => {
5
6
  var _a, _b;
6
7
  if (!(response === null || response === void 0 ? void 0 : response.value) ||
@@ -93,12 +94,10 @@ const formatResponseValue = (response, question) => {
93
94
  const dateValue = value;
94
95
  if (dateValue.iso_date_time) {
95
96
  try {
96
- const date = new Date(dateValue.iso_date_time);
97
- const formattedDate = date.toLocaleDateString("en-US", {
98
- year: "numeric",
99
- month: "long",
100
- day: "numeric",
97
+ const dateObj = luxon_1.DateTime.fromISO(dateValue.iso_date_time, {
98
+ zone: dateValue.zone || "utc",
101
99
  });
100
+ const formattedDate = dateObj.toFormat("MMMM dd, yyyy 'at' h:mm a z");
102
101
  return `📅 ${formattedDate}`;
103
102
  }
104
103
  catch (_c) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/clxforms-client",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "CLXperience Forms Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",
@@ -45,16 +45,16 @@
45
45
  "peerDependencies": {},
46
46
  "dependencies": {
47
47
  "@clxmedia/types": "1.0.188",
48
- "luxon": "3.4.4"
48
+ "luxon": "^3.7.2"
49
49
  },
50
50
  "devDependencies": {
51
- "typescript": "^5.2.2",
52
- "@types/node": "^22",
53
51
  "@types/jsonwebtoken": "9.0.6",
52
+ "@types/node": "^22",
54
53
  "jest": "29.7.0",
55
- "ts-jest": "29.1.2",
56
54
  "nock": "13.5.4",
57
- "tslint": "6.1.3"
55
+ "ts-jest": "29.1.2",
56
+ "tslint": "6.1.3",
57
+ "typescript": "^5.2.2"
58
58
  },
59
59
  "jest": {
60
60
  "moduleFileExtensions": [