dtable-ui-component 0.3.10-beta.1 → 0.3.10
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.
|
@@ -140,11 +140,19 @@ var FormulaFormatter = /*#__PURE__*/function (_React$Component) {
|
|
|
140
140
|
if (Array.isArray(value)) {
|
|
141
141
|
value = getFormulaArrayValue(value);
|
|
142
142
|
|
|
143
|
-
if (array_type === CellType.
|
|
143
|
+
if (array_type === CellType.DATE || resultType === FORMULA_RESULT_TYPE.DATE) {
|
|
144
|
+
value = value.map(function (item) {
|
|
145
|
+
return item.replace('T', ' ').replace('Z', '');
|
|
146
|
+
});
|
|
147
|
+
} else if (array_type === CellType.LONG_TEXT) {
|
|
144
148
|
value = value.map(function (item) {
|
|
145
149
|
return convertValueToDtableLongTextValue(item);
|
|
146
150
|
});
|
|
147
151
|
}
|
|
152
|
+
} else {
|
|
153
|
+
if (resultType === FORMULA_RESULT_TYPE.DATE) {
|
|
154
|
+
value = value.replace('T', ' ').replace('Z', '');
|
|
155
|
+
}
|
|
148
156
|
}
|
|
149
157
|
|
|
150
158
|
if (resultType === FORMULA_RESULT_TYPE.ARRAY) {
|
|
@@ -119,6 +119,7 @@ var EditorFormatter = /*#__PURE__*/function (_React$Component) {
|
|
|
119
119
|
|
|
120
120
|
case CellType.GEOLOCATION:
|
|
121
121
|
{
|
|
122
|
+
if (typeof cellValue !== 'object') return null;
|
|
122
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
123
124
|
className: "geolocation-formatter-container"
|
|
124
125
|
}, /*#__PURE__*/React.createElement(GeolocationFormatter, {
|
|
@@ -143,11 +143,19 @@ var RowExpandFormulaFormatter = /*#__PURE__*/function (_React$Component) {
|
|
|
143
143
|
if (Array.isArray(value)) {
|
|
144
144
|
value = getFormulaArrayValue(value);
|
|
145
145
|
|
|
146
|
-
if (array_type === CellType.
|
|
146
|
+
if (array_type === CellType.DATE || result_type === FORMULA_RESULT_TYPE.DATE) {
|
|
147
|
+
value = value.map(function (item) {
|
|
148
|
+
return item.replace('T', ' ').replace('Z', '');
|
|
149
|
+
});
|
|
150
|
+
} else if (array_type === CellType.LONG_TEXT) {
|
|
147
151
|
value = value.map(function (item) {
|
|
148
152
|
return convertValueToDtableLongTextValue(item);
|
|
149
153
|
});
|
|
150
154
|
}
|
|
155
|
+
} else {
|
|
156
|
+
if (result_type === FORMULA_RESULT_TYPE.DATE && typeof value === 'string') {
|
|
157
|
+
value = value.replace('T', ' ').replace('Z', '');
|
|
158
|
+
}
|
|
151
159
|
}
|
|
152
160
|
|
|
153
161
|
if (result_type === FORMULA_RESULT_TYPE.ARRAY) {
|
|
@@ -82,7 +82,7 @@ var RowExpandLinkFormatter = /*#__PURE__*/function (_Component) {
|
|
|
82
82
|
|
|
83
83
|
return /*#__PURE__*/React.createElement(DateFormatter, {
|
|
84
84
|
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
85
|
-
value: value,
|
|
85
|
+
value: value.replace('T', ' ').replace('Z', ''),
|
|
86
86
|
format: format,
|
|
87
87
|
containerClassName: "row-expand-link-item"
|
|
88
88
|
});
|