🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@flywire/react-headlessui

Package Overview
Dependencies
Maintainers
12
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flywire/react-headlessui - npm Package Compare versions

Comparing version

to
0.0.14-1

15

dist/cjs/hooks/useMoneyInput/useMoneyInput.js

@@ -76,5 +76,4 @@ "use strict";

setValue((value) => {
const _value = value === NO_VALUE ? value : format(value);
onValueBlur === null || onValueBlur === void 0 ? void 0 : onValueBlur(parse(_value));
return _value;
onValueBlur === null || onValueBlur === void 0 ? void 0 : onValueBlur(parse(value));
return value;
});

@@ -95,7 +94,9 @@ }

function parse(value) {
return hasCustomFormatter
? (0, utils_1.toNumber)(value.toString(), {
const _value = value === NO_VALUE ? value : format(value);
if (hasCustomFormatter) {
return (0, utils_1.toNumber)(_value, {
decimal: decimalMark,
})
: (0, utils_1.parseNumber)(value);
});
}
return (0, utils_1.parseNumber)(_value);
}

@@ -102,0 +103,0 @@ (0, react_1.useEffect)(() => setValue(initialValue === NO_VALUE ? NO_VALUE : format(initialValue)), [initialValue, decimals]);

@@ -51,5 +51,4 @@ import { useEffect, useState, } from 'react';

setValue((value) => {
const _value = value === NO_VALUE ? value : format(value);
onValueBlur === null || onValueBlur === void 0 ? void 0 : onValueBlur(parse(_value));
return _value;
onValueBlur === null || onValueBlur === void 0 ? void 0 : onValueBlur(parse(value));
return value;
});

@@ -70,7 +69,9 @@ }

function parse(value) {
return hasCustomFormatter
? toNumber(value.toString(), {
const _value = value === NO_VALUE ? value : format(value);
if (hasCustomFormatter) {
return toNumber(_value, {
decimal: decimalMark,
})
: parseNumber(value);
});
}
return parseNumber(_value);
}

@@ -77,0 +78,0 @@ useEffect(() => setValue(initialValue === NO_VALUE ? NO_VALUE : format(initialValue)), [initialValue, decimals]);

@@ -85,5 +85,4 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

setValue((value) => {
const _value = value === NO_VALUE ? value : format(value);
onValueBlur === null || onValueBlur === void 0 ? void 0 : onValueBlur(parse(_value));
return _value;
onValueBlur === null || onValueBlur === void 0 ? void 0 : onValueBlur(parse(value));
return value;
});

@@ -104,7 +103,9 @@ }

function parse(value) {
return hasCustomFormatter
? (0, utils_1.toNumber)(value.toString(), {
const _value = value === NO_VALUE ? value : format(value);
if (hasCustomFormatter) {
return (0, utils_1.toNumber)(_value, {
decimal: decimalMark,
})
: (0, utils_1.parseNumber)(value);
});
}
return (0, utils_1.parseNumber)(_value);
}

@@ -111,0 +112,0 @@ (0, react_1.useEffect)(() => setValue(initialValue === NO_VALUE ? NO_VALUE : format(initialValue)), [initialValue, decimals]);

{
"name": "@flywire/react-headlessui",
"version": "0.0.13",
"version": "0.0.14-1",
"description": "Headless UI components",

@@ -5,0 +5,0 @@ "main": "./dist/umd/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet