@agilemotion/oui-react-js 1.8.55 → 1.8.56

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/dist/DynamicJS.js CHANGED
@@ -105,6 +105,7 @@ class DynamicJS {
105
105
  if (printError) {
106
106
  console.error(e);
107
107
  console.error("Error Executing script : ", scriptConfig?.lines);
108
+ console.error("Parsed script : ", parsedScript);
108
109
  }
109
110
  throw new Error(e.message);
110
111
  }
@@ -157,7 +157,7 @@ const TableCellContent = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.de
157
157
  }
158
158
  }
159
159
  if (props.columnConfig.cellFormat === 'CURRENCY' || props.columnConfig.cellFormat === 'NUMBER') {
160
- return props.cellFormatter ? _DynamicJS.default.executeScriptFunction(props.cellFormatter, contentValue) : _Utils.default.isNull(contentValue) ? '' : props.columnConfig.cellFormat === 'CURRENCY' ? formatter.format(contentValue) : contentValue.toFixed(2);
160
+ return props.cellFormatter ? _DynamicJS.default.executeScriptFunction(props.cellFormatter, contentValue) : _Utils.default.isNull(contentValue) ? '' : props.columnConfig.cellFormat === 'CURRENCY' ? formatter.format(Math.round((contentValue + Number.EPSILON) * 100) / 100) : Math.round((contentValue + Number.EPSILON) * 100) / 100;
161
161
  } else {
162
162
  if (_Utils.default.isNull(contentValue)) {
163
163
  displayValue = '';
@@ -219,7 +219,7 @@ const TableCellContent = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.de
219
219
  handle: props.handle,
220
220
  values: formValue,
221
221
  valueChangeHandler: value => {
222
- editorValue.current = value[editor.dataBinding || editor.id];
222
+ editorValue.current = value ? value[editor.dataBinding || editor.id] : null;
223
223
  valueChangeHandler(editorValue.current);
224
224
  },
225
225
  viewId: props.viewId
@@ -96,7 +96,7 @@ const CurrencyField = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defau
96
96
  }
97
97
  if (inbound) {
98
98
  const numValue = parseFloat(value);
99
- return isNaN(numValue) ? null : numValue;
99
+ return isNaN(numValue) ? null : Math.round((numValue + Number.EPSILON) * 100) / 100;
100
100
  } else {
101
101
  return value;
102
102
  }
@@ -79,11 +79,12 @@ const GridFieldWrapper = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.de
79
79
  }
80
80
  _react.default.useEffect(() => {
81
81
  if (!_Utils.default.isNull(base.value) && !initialValueSet.current) {
82
- setNewRows(base.value);
82
+ setNewRows(!_Utils.default.isNull(base.value) ? base.value : []);
83
83
  }
84
84
  }, [base.value]);
85
85
  _react.default.useEffect(() => {
86
86
  initialValueSet.current = false;
87
+ setNewRows(!_Utils.default.isNull(base.valueObject[base.valueProperty]) ? base.valueObject[base.valueProperty] : []);
87
88
  }, [base.valueObject[base.valueProperty]]);
88
89
  return /*#__PURE__*/_react.default.createElement("div", {
89
90
  className: "MuiFormControl-root MuiTextField-root MuiFormControl-marginDense",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemotion/oui-react-js",
3
- "version": "1.8.55",
3
+ "version": "1.8.56",
4
4
  "description": "AgileMotion React UI Component Library - A comprehensive collection of dashboard components, forms, media controls, and more",
5
5
  "license": "ISC",
6
6
  "author": "",