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.
- package/build/utils/date-util.js +1 -1
- package/build/utils/util.js +2 -0
- package/package.json +1 -1
package/build/utils/date-util.js
CHANGED
|
@@ -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 {
|
package/build/utils/util.js
CHANGED
|
@@ -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());
|