Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-phone-number-input

Package Overview
Dependencies
Maintainers
1
Versions
360
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-phone-number-input - npm Package Compare versions

Comparing version 3.2.12 to 3.2.13

7

commonjs/react-hook-form/ReactHookFormInput.js

@@ -92,5 +92,8 @@ "use strict";

// }
}, [ref, setRef]);
}, [ref, setRef]); // This function may not work correctly when `defaultValues` are set for the input
// and the user clears the input value manually: the default value may re-appear as a result.
// https://github.com/catamphetamine/react-phone-number-input/issues/405#issuecomment-1295885201
var onChangeCombined = (0, _react.useCallback)(function (value) {
// `feact-hook-form` doesn't know how to properly handle `undefined` values.
// `react-hook-form` doesn't know how to properly handle `undefined` values.
// https://github.com/react-hook-form/react-hook-form/issues/2990

@@ -97,0 +100,0 @@ if (value === undefined) {

@@ -19,3 +19,3 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent`.

type PhoneInputComponentType<InputComponentProps = DefaultInputComponentProps> = (props: Props<InputComponentProps>) => JSX.Element;
type PhoneInputComponentType = <InputComponentProps = DefaultInputComponentProps>(props: Props<InputComponentProps>) => JSX.Element;

@@ -22,0 +22,0 @@ declare const PhoneInput: PhoneInputComponentType;

@@ -42,3 +42,3 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent`.

type PhoneInputComponentType<InputComponentProps = DefaultInputComponentProps> = (props: Props<InputComponentProps>) => JSX.Element;
type PhoneInputComponentType = <InputComponentProps = DefaultInputComponentProps>(props: Props<InputComponentProps>) => JSX.Element;

@@ -45,0 +45,0 @@ declare const PhoneInput: PhoneInputComponentType;

@@ -75,5 +75,8 @@ var _excluded = ["Component", "name", "defaultValue", "shouldUnregister", "control", "rules", "onChange", "onBlur"],

// }
}, [ref, setRef]);
}, [ref, setRef]); // This function may not work correctly when `defaultValues` are set for the input
// and the user clears the input value manually: the default value may re-appear as a result.
// https://github.com/catamphetamine/react-phone-number-input/issues/405#issuecomment-1295885201
var onChangeCombined = useCallback(function (value) {
// `feact-hook-form` doesn't know how to properly handle `undefined` values.
// `react-hook-form` doesn't know how to properly handle `undefined` values.
// https://github.com/react-hook-form/react-hook-form/issues/2990

@@ -80,0 +83,0 @@ if (value === undefined) {

{
"name": "react-phone-number-input",
"version": "3.2.12",
"version": "3.2.13",
"description": "Telephone number input React component",

@@ -5,0 +5,0 @@ "main": "min/index.cjs",

@@ -27,3 +27,3 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent` (`React.FC`).

type PhoneInputWithCountrySelectComponentType<InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues> = (props: Props<InputComponentProps, FormValues>) => JSX.Element;
type PhoneInputWithCountrySelectType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;

@@ -34,6 +34,6 @@ // Could also export the component that would accept custom "generics",

// https://github.com/catamphetamine/react-phone-number-input/issues/414#issuecomment-1220679025
// type PhoneInputWithCountrySelectComponentType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;
// type PhoneInputWithCountrySelectType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;
declare const PhoneInputWithCountrySelect: PhoneInputWithCountrySelectComponentType;
declare const PhoneInputWithCountrySelect: PhoneInputWithCountrySelectType;
export default PhoneInputWithCountrySelect;

@@ -28,3 +28,3 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent` (`React.FC`).

type PhoneInputComponentType<InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues> = (props: Props<InputComponentProps, FormValues>) => JSX.Element;
type PhoneInputType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;

@@ -35,6 +35,6 @@ // Could also export the component that would accept custom "generics",

// https://github.com/catamphetamine/react-phone-number-input/issues/414#issuecomment-1220679025
// type PhoneInputComponentType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;
// type PhoneInputType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;
declare const PhoneInput: PhoneInputComponentType;
declare const PhoneInput: PhoneInputType;
export default PhoneInput;

@@ -28,3 +28,3 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent` (`React.FC`).

type PhoneInputType<InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues> = (props: Props<InputComponentProps, FormValues>) => JSX.Element;
type PhoneInputType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;

@@ -31,0 +31,0 @@ // Could also export the component that would accept custom "generics",

@@ -37,5 +37,7 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent` (`React.FC`).

// `DefaultFormValues` are imported in:
// * `react-hook-form-core/index.d.ts`
export type DefaultFormValues = Record<string, any>;
type PhoneInputWithCountrySelectType<InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues> = React.ComponentClass<Props<InputComponentProps, FormValues>, State<Props<InputComponentProps, FormValues>>>
type PhoneInputWithCountrySelectType = <InputComponentProps = DefaultInputComponentProps, FormValues = DefaultFormValues>(props: Props<InputComponentProps, FormValues>) => JSX.Element;

@@ -42,0 +44,0 @@ // Could also export the component that would accept custom "generics", if the component was a function,

@@ -44,3 +44,3 @@ // React TypeScript Cheatsheet doesn't recommend using `React.FunctionalComponent`.

type PhoneInputComponentType<InputComponentProps = DefaultInputComponentProps> = (props: Props<InputComponentProps>) => JSX.Element;
type PhoneInputComponentType = <InputComponentProps = DefaultInputComponentProps>(props: Props<InputComponentProps>) => JSX.Element;

@@ -47,0 +47,0 @@ declare const PhoneInput: PhoneInputComponentType;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc