Browse Source

disabled search country in phone number input

pull/7/head
YaroslavBerkuta 9 months ago
parent
commit
93854ef2fd
  1. 4
      src/containers/Profile/components/form-user/form-user.component.tsx
  2. 1
      src/containers/auth/components/fields/PhoneField.tsx
  3. 1
      src/shared/components/fields/input-mask-field.component.tsx
  4. 166
      yarn.lock

4
src/containers/Profile/components/form-user/form-user.component.tsx

@ -200,13 +200,11 @@ export const FormUser: FC<IProps> = ({ @@ -200,13 +200,11 @@ export const FormUser: FC<IProps> = ({
name="innerPhoneNumber"
control={control}
render={({ field: { value, onChange }, fieldState }) => (
<InputMaskField
<InputField
error={fieldState?.error?.message}
label={"Телефон внутрішній"}
value={value}
placeholder={"00 000"}
mask="99 9999"
enableCopy={true}
onChange={(val: string) =>
onChange(val.replace(/[^\d]/g, ""))
}

1
src/containers/auth/components/fields/PhoneField.tsx

@ -25,6 +25,7 @@ export const PhoneField = (props: IProps) => { @@ -25,6 +25,7 @@ export const PhoneField = (props: IProps) => {
value={props.value}
placeholder={"+38 (0xx) xxx xx xx"}
mask="+38 (999) 999 99 99"
style={{ width: "auto" }}
onChange={(text) => {
props.onChange(text.replace(/[^+\d]/g, ""));
}}

1
src/shared/components/fields/input-mask-field.component.tsx

@ -53,6 +53,7 @@ export const InputMaskField: FC<IProps> = ({ @@ -53,6 +53,7 @@ export const InputMaskField: FC<IProps> = ({
display: "flex",
}}
country={"ua"}
enableSearch={false}
value={value}
buttonStyle={{
position: "relative",

166
yarn.lock

@ -8995,171 +8995,6 @@ jest@^26.0.0, jest@26.6.0: @@ -8995,171 +8995,6 @@ jest@^26.0.0, jest@26.6.0:
integrity sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA==
dependencies:
"@jest/core" "^26.6.0"
<<<<<<< HEAD
"import-local" "^3.0.2"
"jest-cli" "^26.6.0"
"jet-tools@^1.3.0":
"integrity" "sha512-m+jiMpaTIhqkaeDVlqtw51BANUKVkbokuAXbwXlA7egsL2TROIulTqCvXgsL+r0N4qs3kibEcBExoClQT7HUEw=="
"resolved" "https://registry.npmjs.org/jet-tools/-/jet-tools-1.3.0.tgz"
"version" "1.3.0"
dependencies:
"lodash" "^4.17.21"
"react" "^17.0.2"
"validatorjs" "^3.22.1"
"jquery@>= 1.11.0", "jquery@>=1.8.0", "jquery@1.9.1 - 3":
"integrity" "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
"resolved" "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz"
"version" "3.6.0"
"js-base64@^3.7.6":
"integrity" "sha512-NPrWuHFxFUknr1KqJRDgUQPexQF0uIJWjeT+2KjEePhitQxQEx5EJBG1lVn5/hc8aLycTpXrDOgPQ6Zq+EDiTA=="
"resolved" "https://registry.npmjs.org/js-base64/-/js-base64-3.7.6.tgz"
"version" "3.7.6"
"js-tokens@^3.0.0 || ^4.0.0", "js-tokens@^4.0.0":
"integrity" "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
"resolved" "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
"version" "4.0.0"
"js-tokens@^3.0.2":
"integrity" "sha1-mGbfOVECEw449/mWvOtlRDIJwls= sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg=="
"resolved" "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz"
"version" "3.0.2"
"js-yaml@^3.13.1":
"integrity" "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="
"resolved" "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz"
"version" "3.14.1"
dependencies:
"argparse" "^1.0.7"
"esprima" "^4.0.0"
"jsdom@^16.4.0":
"integrity" "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw=="
"resolved" "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz"
"version" "16.7.0"
dependencies:
"abab" "^2.0.5"
"acorn" "^8.2.4"
"acorn-globals" "^6.0.0"
"cssom" "^0.4.4"
"cssstyle" "^2.3.0"
"data-urls" "^2.0.0"
"decimal.js" "^10.2.1"
"domexception" "^2.0.1"
"escodegen" "^2.0.0"
"form-data" "^3.0.0"
"html-encoding-sniffer" "^2.0.1"
"http-proxy-agent" "^4.0.1"
"https-proxy-agent" "^5.0.0"
"is-potential-custom-element-name" "^1.0.1"
"nwsapi" "^2.2.0"
"parse5" "6.0.1"
"saxes" "^5.0.1"
"symbol-tree" "^3.2.4"
"tough-cookie" "^4.0.0"
"w3c-hr-time" "^1.0.2"
"w3c-xmlserializer" "^2.0.0"
"webidl-conversions" "^6.1.0"
"whatwg-encoding" "^1.0.5"
"whatwg-mimetype" "^2.3.0"
"whatwg-url" "^8.5.0"
"ws" "^7.4.6"
"xml-name-validator" "^3.0.0"
"jsesc@^1.3.0":
"integrity" "sha1-RsP+yMGJKxKwgz25vHYiF226s0s= sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA=="
"resolved" "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz"
"version" "1.3.0"
"jsesc@^2.5.1":
"integrity" "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
"resolved" "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz"
"version" "2.5.2"
"jsesc@~0.5.0":
"integrity" "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA=="
"resolved" "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz"
"version" "0.5.0"
"json-loader@^0.5.4":
"integrity" "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w=="
"resolved" "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz"
"version" "0.5.7"
"json-parse-better-errors@^1.0.1", "json-parse-better-errors@^1.0.2":
"integrity" "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
"resolved" "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz"
"version" "1.0.2"
"json-parse-even-better-errors@^2.3.0":
"integrity" "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
"resolved" "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz"
"version" "2.3.1"
"json-schema-traverse@^0.3.0":
"integrity" "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= sha512-4JD/Ivzg7PoW8NzdrBSr3UFwC9mHgvI7Z6z3QGBsSHgKaRTUDmyZAAKJo2UbG1kUVfS9WS8bi36N49U1xw43DA=="
"resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz"
"version" "0.3.1"
"json-schema-traverse@^0.4.1":
"integrity" "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
"resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz"
"version" "0.4.1"
"json-schema-traverse@^1.0.0":
"integrity" "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
"resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz"
"version" "1.0.0"
"json-stable-stringify-without-jsonify@^1.0.1":
"integrity" "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="
"resolved" "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz"
"version" "1.0.1"
"json-stable-stringify@^1.0.1":
"integrity" "sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg=="
"resolved" "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz"
"version" "1.0.1"
dependencies:
"jsonify" "~0.0.0"
"json2mq@^0.2.0":
"integrity" "sha1-tje9O6nqvhIsg+lyBIOusQ0skEo= sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA=="
"resolved" "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz"
"version" "0.2.0"
dependencies:
"string-convert" "^0.2.0"
"json5@^0.5.0":
"integrity" "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw=="
"resolved" "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz"
"version" "0.5.1"
"json5@^0.5.1":
"integrity" "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw=="
"resolved" "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz"
"version" "0.5.1"
"json5@^1.0.1":
"integrity" "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow=="
"resolved" "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz"
"version" "1.0.1"
dependencies:
"minimist" "^1.2.0"
"json5@^2.1.2", "json5@^2.2.1":
"integrity" "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
"resolved" "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz"
"version" "2.2.1"
"jsonfile@^4.0.0":
"integrity" "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="
"resolved" "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz"
"version" "4.0.0"
=======
import-local "^3.0.2"
jest-cli "^26.6.0"
@ -9323,7 +9158,6 @@ jsonfile@^4.0.0: @@ -9323,7 +9158,6 @@ jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz"
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==
>>>>>>> 7a017640142541f09c2823dc94eaa78936181509
optionalDependencies:
graceful-fs "^4.1.6"

Loading…
Cancel
Save