@synerise/ds-input-number 0.8.17 → 0.8.18

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.8.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-input-number@0.8.17...@synerise/ds-input-number@0.8.18) (2023-08-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **input-number:** extend formatNumber for value type null ([812cc1c](https://github.com/Synerise/synerise-design/commit/812cc1c22e72a22e9617c34a69071dc416d7af31))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.8.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-input-number@0.8.16...@synerise/ds-input-number@0.8.17) (2023-07-27)
7
18
 
8
19
 
@@ -1,4 +1,4 @@
1
1
  import { ReactText } from 'react';
2
2
  import { NumberToFormatOptions, Delimiter } from '@synerise/ds-data-format';
3
- export declare const formatNumber: (value: string | number | undefined, formatValue: (value: number, options: NumberToFormatOptions) => string, notationThousandDelimiter: Delimiter, notationDecimalDelimiter: Delimiter, valueFormatOptions?: NumberToFormatOptions | undefined) => string;
3
+ export declare const formatNumber: (value: string | number | undefined | null, formatValue: (value: number, options: NumberToFormatOptions) => string, notationThousandDelimiter: Delimiter, notationDecimalDelimiter: Delimiter, valueFormatOptions?: NumberToFormatOptions | undefined) => string;
4
4
  export declare const parseFormattedNumber: (value: string | undefined, formatValue: (value: number, options: NumberToFormatOptions) => string, notationThousandDelimiter: Delimiter, notationDecimalDelimiter: Delimiter) => ReactText;
@@ -11,7 +11,7 @@ import { MAXIMUM_FRACTION_DIGITS, MAXIMUM_NUMBER_DIGITS, NUMBER_DELIMITER } from
11
11
  export var formatNumber = function formatNumber(value, formatValue, notationThousandDelimiter, notationDecimalDelimiter, valueFormatOptions) {
12
12
  var _value$match, _value$match2;
13
13
 
14
- if (value === undefined || value === '') return '';
14
+ if (value === undefined || value === '' || value === null) return '';
15
15
  if (value === '-') return '-';
16
16
 
17
17
  var formatOptions = _objectSpread({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-input-number",
3
- "version": "0.8.17",
3
+ "version": "0.8.18",
4
4
  "description": "Input-Number UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@types/uuid": "7.0.0"
47
47
  },
48
- "gitHead": "17f1b9fd56fd6bae3d8c500ebb4406c8b35ef712"
48
+ "gitHead": "3879c41ef7a22df15d5cd80ceaa41ec56e551429"
49
49
  }