@vuu-ui/vuu-utils 4.0.0-beta.2 → 4.0.0-beta.3

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.0.0-beta.2",
2
+ "version": "4.0.0-beta.3",
3
3
  "author": "heswell",
4
4
  "main": "./src/index.js",
5
5
  "license": "Apache-2.0",
@@ -15,14 +15,14 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@dnd-kit/react": "^0.1.21",
18
- "@vuu-ui/vuu-data-types": "4.0.0-beta.2",
19
- "@vuu-ui/vuu-table-types": "4.0.0-beta.2",
20
- "@vuu-ui/vuu-filter-types": "4.0.0-beta.2",
21
- "@vuu-ui/vuu-protocol-types": "4.0.0-beta.2"
18
+ "@vuu-ui/vuu-data-types": "4.0.0-beta.3",
19
+ "@vuu-ui/vuu-table-types": "4.0.0-beta.3",
20
+ "@vuu-ui/vuu-filter-types": "4.0.0-beta.3",
21
+ "@vuu-ui/vuu-protocol-types": "4.0.0-beta.3"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@internationalized/date": "^3.0.0",
25
- "@vuu-ui/vuu-filter-parser": "4.0.0-beta.2",
25
+ "@vuu-ui/vuu-filter-parser": "4.0.0-beta.3",
26
26
  "clsx": "^2.0.0",
27
27
  "react": "^19.2.3",
28
28
  "react-dom": "^19.2.3"
@@ -52,7 +52,8 @@ const numericFormatter = ({ align = "right", serverDataType, type })=>{
52
52
  {
53
53
  const { alignOnDecimals = false, decimals, roundingRule, useLocaleString, zeroPad = false } = type.formatting ?? DEFAULT_NUMERIC_FORMAT;
54
54
  return (value)=>{
55
- if (serverDataType?.startsWith("scaleddecimal")) if ("string" == typeof value) return roundScaledDecimal(value, align, decimals, zeroPad, alignOnDecimals, useLocaleString, roundingRule);
55
+ if (serverDataType?.startsWith("scaleddecimal")) if (null == value) return "";
56
+ else if ("string" == typeof value) return roundScaledDecimal(value, align, decimals, zeroPad, alignOnDecimals, useLocaleString, roundingRule);
56
57
  else throw Error(`[formatting-utils] numericFormatter, invalid data for ${serverDataType}: '${value}'`);
57
58
  if ("string" == typeof value && (value.startsWith("Σ") || value.startsWith("["))) return value;
58
59
  const number = "number" == typeof value ? value : "string" == typeof value ? parseFloat(value) : void 0;