@clxmedia/clxforms-client 1.0.33 → 1.0.35

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.
@@ -74,16 +74,16 @@ const formatResponseValue = (response, question) => {
74
74
  if (typeof value === "string") {
75
75
  let cleanValue = value
76
76
  .replace(/ /g, " ")
77
- .replace(/<br\s*\/?>/gi, " \n")
77
+ .replace(/<br\s*\/?>/gi, "\n")
78
+ .replace(/<p[^>]*>\s*<\/p>/gi, "\n")
78
79
  .replace(/<\/p>\s*<p[^>]*>/gi, "\n\n")
79
80
  .replace(/<\/?p[^>]*>/gi, "")
80
- .replace(/<\/?(?:strong|b)(?:\s[^>]*)?>([^<]*)/gi, "**$1")
81
- .replace(/([^>]*)<\/(?:strong|b)>/gi, "$1**")
82
- .replace(/<\/?(?:em|i)(?:\s[^>]*)?>([^<]*)/gi, "*$1")
83
- .replace(/([^>]*)<\/(?:em|i)>/gi, "$1*")
81
+ .replace(/<(strong|b)(?:\s[^>]*)?>(.*?)<\/(strong|b)>/gi, "**$2**")
82
+ .replace(/<(em|i)(?:\s[^>]*)?>(.*?)<\/(em|i)>/gi, "*$2*")
84
83
  .replace(/<a\s+href="([^"]*)"[^>]*>([^<]*)<\/a>/gi, "[$2]($1)")
85
84
  .replace(/<[^>]*>/g, "")
86
- .replace(/\s+/g, " ")
85
+ .replace(/\n{3,}/g, "\n\n")
86
+ .replace(/[ \t]+/g, " ")
87
87
  .trim();
88
88
  if (((_b = (_a = question === null || question === void 0 ? void 0 : question.response_options) === null || _a === void 0 ? void 0 : _a.field) === null || _b === void 0 ? void 0 : _b.type) === "select" &&
89
89
  "options" in question.response_options.field &&
@@ -93,7 +93,16 @@ const formatResponseValue = (response, question) => {
93
93
  cleanValue = option.label;
94
94
  }
95
95
  }
96
- return cleanValue ? `📋 ${cleanValue}` : "🔹 *Not provided*";
96
+ if (cleanValue) {
97
+ const blockquotedContent = cleanValue
98
+ .split("\n")
99
+ .map((line) => `> ${line}`)
100
+ .join("\n");
101
+ return `${blockquotedContent}`;
102
+ }
103
+ else {
104
+ return "🔹 *Not provided*";
105
+ }
97
106
  }
98
107
  return "🔹 *Not provided*";
99
108
  case "NUMBER":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/clxforms-client",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "CLXperience Forms Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",
@@ -44,8 +44,8 @@
44
44
  "bugs": "https://github.com/adsupnow/xperience-library/clxforms-client",
45
45
  "peerDependencies": {},
46
46
  "dependencies": {
47
- "@clxmedia/types": "1.0.188",
48
- "luxon": "^3.7.2"
47
+ "@clxmedia/types": "1.7.0",
48
+ "luxon": "3.4.4"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/jsonwebtoken": "9.0.6",