@trackunit/react-table-helpers 2.7.15 → 2.7.16
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 +4 -2
- package/index.esm.js +4 -2
- package/package.json +3 -3
package/index.cjs.js
CHANGED
|
@@ -142,7 +142,9 @@ const customFieldToCell = (customField, unitTranslation, unitPreference, languag
|
|
|
142
142
|
return jsxRuntime.jsx(reactTableBaseComponents.TextCell, { content: customField.jsonValue?.toString() ?? "" });
|
|
143
143
|
case "NumberFieldValueAndDefinition": {
|
|
144
144
|
const unitType = unitPreference === "SI" ? customField.definition.unitSi : customField.definition.unitUs;
|
|
145
|
-
const value = customField.numberValue !== null && customField.numberValue !== undefined
|
|
145
|
+
const value = customField.numberValue !== null && customField.numberValue !== undefined
|
|
146
|
+
? `${customField.numberValue}`
|
|
147
|
+
: undefined;
|
|
146
148
|
const updatedValue = irisAppRuntimeCore.getCustomFieldValueForDisplayInUI(value, unitType, unitPreference, language);
|
|
147
149
|
return jsxRuntime.jsx(reactTableBaseComponents.NumberCell, { unit: unitTranslation(unitType), value: updatedValue });
|
|
148
150
|
}
|
|
@@ -199,7 +201,7 @@ const customFieldToExportString = (customField, unitTranslation, unitPreference,
|
|
|
199
201
|
return customField.jsonValue?.toString() ?? "";
|
|
200
202
|
case "NumberFieldValueAndDefinition": {
|
|
201
203
|
const unitType = unitPreference === "SI" ? customField.definition.unitSi : customField.definition.unitUs;
|
|
202
|
-
const value = Boolean(customField.numberValue) ? customField.numberValue
|
|
204
|
+
const value = Boolean(customField.numberValue) ? `${customField.numberValue}` : undefined;
|
|
203
205
|
const updatedValue = irisAppRuntimeCore.getCustomFieldValueForDisplayInUI(value, unitType, unitPreference, language);
|
|
204
206
|
const unit = unitTranslation(unitType);
|
|
205
207
|
return unit ? `${updatedValue} ${unit}` : `${updatedValue}`;
|
package/index.esm.js
CHANGED
|
@@ -140,7 +140,9 @@ const customFieldToCell = (customField, unitTranslation, unitPreference, languag
|
|
|
140
140
|
return jsx(TextCell, { content: customField.jsonValue?.toString() ?? "" });
|
|
141
141
|
case "NumberFieldValueAndDefinition": {
|
|
142
142
|
const unitType = unitPreference === "SI" ? customField.definition.unitSi : customField.definition.unitUs;
|
|
143
|
-
const value = customField.numberValue !== null && customField.numberValue !== undefined
|
|
143
|
+
const value = customField.numberValue !== null && customField.numberValue !== undefined
|
|
144
|
+
? `${customField.numberValue}`
|
|
145
|
+
: undefined;
|
|
144
146
|
const updatedValue = getCustomFieldValueForDisplayInUI(value, unitType, unitPreference, language);
|
|
145
147
|
return jsx(NumberCell, { unit: unitTranslation(unitType), value: updatedValue });
|
|
146
148
|
}
|
|
@@ -197,7 +199,7 @@ const customFieldToExportString = (customField, unitTranslation, unitPreference,
|
|
|
197
199
|
return customField.jsonValue?.toString() ?? "";
|
|
198
200
|
case "NumberFieldValueAndDefinition": {
|
|
199
201
|
const unitType = unitPreference === "SI" ? customField.definition.unitSi : customField.definition.unitUs;
|
|
200
|
-
const value = Boolean(customField.numberValue) ? customField.numberValue
|
|
202
|
+
const value = Boolean(customField.numberValue) ? `${customField.numberValue}` : undefined;
|
|
201
203
|
const updatedValue = getCustomFieldValueForDisplayInUI(value, unitType, unitPreference, language);
|
|
202
204
|
const unit = unitTranslation(unitType);
|
|
203
205
|
return unit ? `${updatedValue} ${unit}` : `${updatedValue}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table-helpers",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.16",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@trackunit/date-and-time-utils": "1.14.5",
|
|
11
11
|
"@trackunit/filters-filter-bar": "2.4.11",
|
|
12
|
-
"@trackunit/filters-graphql-hook": "2.6.
|
|
12
|
+
"@trackunit/filters-graphql-hook": "2.6.19",
|
|
13
13
|
"@trackunit/i18n-library-translation": "2.3.6",
|
|
14
|
-
"@trackunit/custom-field-components": "2.6.
|
|
14
|
+
"@trackunit/custom-field-components": "2.6.18",
|
|
15
15
|
"@trackunit/iris-app-runtime-core": "1.18.4",
|
|
16
16
|
"@trackunit/iris-app-runtime-core-api": "1.17.4",
|
|
17
17
|
"@trackunit/react-table-base-components": "2.4.10",
|