drapcode-utility 2.6.9 → 2.7.1

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.
@@ -207,7 +207,7 @@ const formatItemDates = (item, fields, dateFormat, reverse) => {
207
207
  }
208
208
  if (dateDisplayType === "datetime-local") {
209
209
  item[fieldName] = (0, moment_1.default)(item[fieldName], dateTimeFormat).isValid()
210
- ? item[fieldName]
210
+ ? (0, moment_1.default)(item[fieldName]).format("YYYY-MM-DDTHH:mm:ss")
211
211
  : "";
212
212
  }
213
213
  else {
@@ -1090,6 +1090,8 @@ const evaluateJSLogic = function (expression, data, user, envConstants) {
1090
1090
  expression = expression
1091
1091
  ? (0, exports.getSpecialCharectorReplacedExpression)(expression)
1092
1092
  : " ";
1093
+ // Changing <br/> to /n for js code
1094
+ expression = expression.replace(/<br\s*\/?>/g, "\n");
1093
1095
  const replacedExpression = (0, exports.replaceDataValueIntoExpression)(expression, data, user, {}, {}, {}, {}, envConstants, {}, {}, {});
1094
1096
  try {
1095
1097
  const replacedExpressionFunction = new Function(replacedExpression.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "2.6.9",
3
+ "version": "2.7.1",
4
4
  "description": "DrapCode Utility",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",