跳到主要内容

ui/build/data-renderer/phone\_number/phone\_number.utils

ui/build/data-renderer/phone_number/phone_number.utils

Functions

changePhoneCountry()

function changePhoneCountry(
   value,
   currentCountry,
   nextCountry): string;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:17

Parameters

Parameter Type
value string
currentCountry CountryCode
nextCountry CountryCode

Returns

string


formatPhoneDisplay()

function formatPhoneDisplay(value, country): string;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:16

Parameters

Parameter Type
value string
country CountryCode

Returns

string


formatPhoneInput()

function formatPhoneInput(value, country): string;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:11

Parameters

Parameter Type
value string
country CountryCode

Returns

string


normalizePhoneValue()

function normalizePhoneValue(value, country): string | null;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:15

Parameters

Parameter Type
value string
country CountryCode

Returns

string | null


phoneCountryFromLocale()

function phoneCountryFromLocale(locale): CountryCode;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:8

Parameters

Parameter Type
locale string

Returns

CountryCode


phoneCountryOptions()

function phoneCountryOptions(locale): PhoneCountryOption[];

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:9

Parameters

Parameter Type
locale string

Returns

PhoneCountryOption[]


phoneInputPlaceholder()

function phoneInputPlaceholder(country, fallback?): string;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:14

Parameters

Parameter Type
country CountryCode
fallback? string

Returns

string


resolvePhoneCountry()

function resolvePhoneCountry(value, fallback): CountryCode;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:10

Parameters

Parameter Type
value string
fallback CountryCode

Returns

CountryCode


sanitizePhoneInput()

function sanitizePhoneInput(value): string;

Defined in: apps/website/.api-docs-entry/ui/build/data-renderer/phone_number/phone_number.utils.d.ts:13

Keep only an optional leading plus and the E.164 maximum of 15 digits.

Parameters

Parameter Type
value string

Returns

string