@trackunit/react-table-helpers 1.19.22 → 1.19.24

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/index.cjs.js CHANGED
@@ -201,7 +201,8 @@ const customFieldToExportString = (customField, unitTranslation, unitPreference,
201
201
  const unitType = unitPreference === "SI" ? customField.definition.unitSi : customField.definition.unitUs;
202
202
  const value = Boolean(customField.numberValue) ? customField.numberValue + "" : undefined;
203
203
  const updatedValue = irisAppRuntimeCore.getCustomFieldValueForDisplayInUI(value, unitType, unitPreference, language);
204
- return `${updatedValue} ${unitTranslation(unitType)}`;
204
+ const unit = unitTranslation(unitType);
205
+ return unit ? `${updatedValue} ${unit}` : `${updatedValue}`;
205
206
  }
206
207
  case "MonetaryFieldValueAndDefinition":
207
208
  return customField.monetaryValue?.toString() ?? "";
package/index.esm.js CHANGED
@@ -199,7 +199,8 @@ const customFieldToExportString = (customField, unitTranslation, unitPreference,
199
199
  const unitType = unitPreference === "SI" ? customField.definition.unitSi : customField.definition.unitUs;
200
200
  const value = Boolean(customField.numberValue) ? customField.numberValue + "" : undefined;
201
201
  const updatedValue = getCustomFieldValueForDisplayInUI(value, unitType, unitPreference, language);
202
- return `${updatedValue} ${unitTranslation(unitType)}`;
202
+ const unit = unitTranslation(unitType);
203
+ return unit ? `${updatedValue} ${unit}` : `${updatedValue}`;
203
204
  }
204
205
  case "MonetaryFieldValueAndDefinition":
205
206
  return customField.monetaryValue?.toString() ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-helpers",
3
- "version": "1.19.22",
3
+ "version": "1.19.24",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -15,7 +15,7 @@
15
15
  "@trackunit/iris-app-runtime-core": "1.14.10",
16
16
  "@trackunit/iris-app-runtime-core-api": "1.13.10",
17
17
  "@trackunit/react-table-base-components": "1.17.15",
18
- "@trackunit/react-table": "1.17.20",
18
+ "@trackunit/react-table": "1.17.21",
19
19
  "@trackunit/react-components": "1.20.13",
20
20
  "@trackunit/react-core-hooks": "1.14.12",
21
21
  "@trackunit/react-graphql-hooks": "1.18.15",