react-currency-input-field
Advanced tools
Comparing version 3.8.0 to 4.0.0-alpha.1
@@ -1,46 +0,2 @@ | ||
import { IntlConfig } from '../CurrencyInputProps'; | ||
export type FormatValueOptions = { | ||
/** | ||
* Value to format | ||
*/ | ||
value: string | undefined; | ||
/** | ||
* Decimal separator | ||
* | ||
* Default = '.' | ||
*/ | ||
decimalSeparator?: string; | ||
/** | ||
* Group separator | ||
* | ||
* Default = ',' | ||
*/ | ||
groupSeparator?: string; | ||
/** | ||
* Turn off separators | ||
* | ||
* This will override Group separators | ||
* | ||
* Default = false | ||
*/ | ||
disableGroupSeparators?: boolean; | ||
/** | ||
* Intl locale currency config | ||
*/ | ||
intlConfig?: IntlConfig; | ||
/** | ||
* Specify decimal scale for padding/trimming | ||
* | ||
* Eg. 1.5 -> 1.50 or 1.234 -> 1.23 | ||
*/ | ||
decimalScale?: number; | ||
/** | ||
* Prefix | ||
*/ | ||
prefix?: string; | ||
/** | ||
* Suffix | ||
*/ | ||
suffix?: string; | ||
}; | ||
import { FormatValueOptions } from './formatValue.types'; | ||
/** | ||
@@ -47,0 +3,0 @@ * Format value with decimal separator, group separator and prefix |
@@ -1,8 +0,10 @@ | ||
export * from './cleanValue'; | ||
export * from './fixedDecimalValue'; | ||
export * from './formatValue'; | ||
export * from './getLocaleConfig'; | ||
export * from './getSuffix'; | ||
export * from './isNumber'; | ||
export * from './padTrimValue'; | ||
export * from './repositionCursor'; | ||
export { cleanValue } from './cleanValue'; | ||
export type { CleanValueOptions } from './cleanValue'; | ||
export { fixedDecimalValue } from './fixedDecimalValue'; | ||
export { formatValue } from './formatValue'; | ||
export type { FormatValueOptions } from './formatValue.types'; | ||
export { getLocaleConfig } from './getLocaleConfig'; | ||
export { getSuffix } from './getSuffix'; | ||
export { isNumber } from './isNumber'; | ||
export { padTrimValue } from './padTrimValue'; | ||
export { repositionCursor } from './repositionCursor'; |
import CurrencyInput from './components/CurrencyInput'; | ||
export { CurrencyInputProps, CurrencyInputOnChangeValues } from './components/CurrencyInputProps'; | ||
export default CurrencyInput; | ||
export type { CurrencyInputProps, CurrencyInputOnChangeValues, } from './components/CurrencyInputProps'; | ||
export { CurrencyInput } from './components/CurrencyInput'; | ||
export { formatValue } from './components/utils/formatValue'; | ||
export { cleanValue } from './components/utils/cleanValue'; | ||
export default CurrencyInput; |
{ | ||
"name": "react-currency-input-field", | ||
"version": "3.8.0", | ||
"version": "4.0.0-alpha.1", | ||
"description": "React <input/> component for formatting currency and numbers.", | ||
"sideEffects": false, | ||
"files": [ | ||
@@ -9,3 +10,10 @@ "dist/**/*", | ||
], | ||
"main": "dist/index.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
} | ||
}, | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.js", | ||
@@ -15,3 +23,5 @@ "types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc && rollup -c", | ||
"build:types": "tsc", | ||
"build:js": "node esbuild.mjs", | ||
"build": "rm -rf dist && pnpm build:js && pnpm build:types", | ||
"start": "parcel src/examples/index.html --open", | ||
@@ -23,4 +33,4 @@ "test": "LANG=en_GB jest", | ||
"gh-predeploy": "parcel build src/examples/index.html --dist-dir demo/examples --public-url ./", | ||
"gh-deploy": "yarn gh-predeploy && gh-pages -d demo/examples", | ||
"ci": "yarn && yarn build", | ||
"gh-deploy": "pnpm gh-predeploy && gh-pages -d demo/examples", | ||
"ci": "pnpm && pnpm build", | ||
"codecov": "codecov", | ||
@@ -54,7 +64,4 @@ "semantic-release": "semantic-release" | ||
"@playwright/test": "^1.40.1", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@rollup/plugin-typescript": "^8.2.1", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/changelog": "^6.0.3", | ||
"@semantic-release/git": "^10.0.1", | ||
"@testing-library/dom": "^9.3.3", | ||
@@ -72,2 +79,3 @@ "@testing-library/jest-dom": "^6.1.6", | ||
"cross-env": "^7.0.3", | ||
"esbuild": "^0.24.0", | ||
"eslint": "^8.56.0", | ||
@@ -79,3 +87,4 @@ "eslint-config-prettier": "^9.1.0", | ||
"full-icu": "^1.3.4", | ||
"gh-pages": "^3.1.0", | ||
"gh-pages": "^5.0.0", | ||
"glob": "^11.0.0", | ||
"husky": "^8.0.3", | ||
@@ -90,4 +99,3 @@ "jest": "^29.7.0", | ||
"react-dom": "18.2.0", | ||
"rollup": "^2.52.7", | ||
"semantic-release": "^17.4.3", | ||
"semantic-release": "^24.2.0", | ||
"ts-jest": "^29.1.1", | ||
@@ -106,3 +114,4 @@ "ts-node": "^10.9.2", | ||
"types": false | ||
} | ||
}, | ||
"packageManager": "pnpm@10.0.0-alpha.0+sha512.856941ef22665d2f3e41c04e8d86ed757ef057fb2bc35011698bfa988ef5817cc1cdd28bb883e7f23f0568c75de5544d4750211d4276b9ba6d55369eb207a549" | ||
} |
@@ -1,57 +0,5 @@ | ||
import { IntlConfig } from '../CurrencyInputProps'; | ||
import { escapeRegExp } from './escapeRegExp'; | ||
import { getSuffix } from './getSuffix'; | ||
import { FormatValueOptions } from './formatValue.types'; | ||
export type FormatValueOptions = { | ||
/** | ||
* Value to format | ||
*/ | ||
value: string | undefined; | ||
/** | ||
* Decimal separator | ||
* | ||
* Default = '.' | ||
*/ | ||
decimalSeparator?: string; | ||
/** | ||
* Group separator | ||
* | ||
* Default = ',' | ||
*/ | ||
groupSeparator?: string; | ||
/** | ||
* Turn off separators | ||
* | ||
* This will override Group separators | ||
* | ||
* Default = false | ||
*/ | ||
disableGroupSeparators?: boolean; | ||
/** | ||
* Intl locale currency config | ||
*/ | ||
intlConfig?: IntlConfig; | ||
/** | ||
* Specify decimal scale for padding/trimming | ||
* | ||
* Eg. 1.5 -> 1.50 or 1.234 -> 1.23 | ||
*/ | ||
decimalScale?: number; | ||
/** | ||
* Prefix | ||
*/ | ||
prefix?: string; | ||
/** | ||
* Suffix | ||
*/ | ||
suffix?: string; | ||
}; | ||
/** | ||
@@ -58,0 +6,0 @@ * Format value with decimal separator, group separator and prefix |
@@ -1,8 +0,10 @@ | ||
export * from './cleanValue'; | ||
export * from './fixedDecimalValue'; | ||
export * from './formatValue'; | ||
export * from './getLocaleConfig'; | ||
export * from './getSuffix'; | ||
export * from './isNumber'; | ||
export * from './padTrimValue'; | ||
export * from './repositionCursor'; | ||
export { cleanValue } from './cleanValue'; | ||
export type { CleanValueOptions } from './cleanValue'; | ||
export { fixedDecimalValue } from './fixedDecimalValue'; | ||
export { formatValue } from './formatValue'; | ||
export type { FormatValueOptions } from './formatValue.types'; | ||
export { getLocaleConfig } from './getLocaleConfig'; | ||
export { getSuffix } from './getSuffix'; | ||
export { isNumber } from './isNumber'; | ||
export { padTrimValue } from './padTrimValue'; | ||
export { repositionCursor } from './repositionCursor'; |
import CurrencyInput from './components/CurrencyInput'; | ||
export { CurrencyInputProps, CurrencyInputOnChangeValues } from './components/CurrencyInputProps'; | ||
export default CurrencyInput; | ||
export type { | ||
CurrencyInputProps, | ||
CurrencyInputOnChangeValues, | ||
} from './components/CurrencyInputProps'; | ||
export { CurrencyInput } from './components/CurrencyInput'; | ||
export { formatValue } from './components/utils/formatValue'; | ||
export { cleanValue } from './components/utils/cleanValue'; | ||
export default CurrencyInput; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40
146
284935
4447
10