@alfalab/core-components-phone-input 7.2.9 → 7.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Component.js CHANGED
@@ -25,10 +25,10 @@ var mask = [
25
25
  /\d/,
26
26
  /\d/,
27
27
  /\d/,
28
- '-',
28
+ ' ',
29
29
  /\d/,
30
30
  /\d/,
31
- '-',
31
+ ' ',
32
32
  /\d/,
33
33
  /\d/,
34
34
  ];
package/cssm/Component.js CHANGED
@@ -25,10 +25,10 @@ var mask = [
25
25
  /\d/,
26
26
  /\d/,
27
27
  /\d/,
28
- '-',
28
+ ' ',
29
29
  /\d/,
30
30
  /\d/,
31
- '-',
31
+ ' ',
32
32
  /\d/,
33
33
  /\d/,
34
34
  ];
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
  * @param phone Номер телефона
8
8
  */
9
9
  var deleteFormatting = function (phone) {
10
- return phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '').replace(/-/g, '');
10
+ return phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '');
11
11
  };
12
12
  function setCaretPosition(_a) {
13
13
  var position = _a.position, inputRef = _a.inputRef;
package/esm/Component.js CHANGED
@@ -16,10 +16,10 @@ var mask = [
16
16
  /\d/,
17
17
  /\d/,
18
18
  /\d/,
19
- '-',
19
+ ' ',
20
20
  /\d/,
21
21
  /\d/,
22
- '-',
22
+ ' ',
23
23
  /\d/,
24
24
  /\d/,
25
25
  ];
@@ -3,7 +3,7 @@
3
3
  * @param phone Номер телефона
4
4
  */
5
5
  var deleteFormatting = function (phone) {
6
- return phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '').replace(/-/g, '');
6
+ return phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '');
7
7
  };
8
8
  function setCaretPosition(_a) {
9
9
  var position = _a.position, inputRef = _a.inputRef;
@@ -16,10 +16,10 @@ const mask = [
16
16
  /\d/,
17
17
  /\d/,
18
18
  /\d/,
19
- '-',
19
+ ' ',
20
20
  /\d/,
21
21
  /\d/,
22
- '-',
22
+ ' ',
23
23
  /\d/,
24
24
  /\d/,
25
25
  ];
@@ -2,7 +2,7 @@
2
2
  * Удаляет форматирование номера телефона
3
3
  * @param phone Номер телефона
4
4
  */
5
- const deleteFormatting = (phone) => phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '').replace(/-/g, '');
5
+ const deleteFormatting = (phone) => phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '');
6
6
  function setCaretPosition({ position, inputRef, }) {
7
7
  window.requestAnimationFrame(() => {
8
8
  if (inputRef === null || !inputRef.current)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-phone-input",
3
- "version": "7.2.9",
3
+ "version": "7.2.10",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-masked-input": "^6.2.8",
17
+ "@alfalab/core-components-masked-input": "^6.2.9",
18
18
  "react-merge-refs": "^1.1.0",
19
19
  "text-mask-core": "^5.1.2",
20
20
  "tslib": "^2.4.0"
package/src/Component.tsx CHANGED
@@ -18,10 +18,10 @@ const mask = [
18
18
  /\d/,
19
19
  /\d/,
20
20
  /\d/,
21
- '-',
21
+ ' ',
22
22
  /\d/,
23
23
  /\d/,
24
- '-',
24
+ ' ',
25
25
  /\d/,
26
26
  /\d/,
27
27
  ];
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  export const deleteFormatting = (phone: string) =>
7
- phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '').replace(/-/g, '');
7
+ phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '');
8
8
 
9
9
  export function setCaretPosition({
10
10
  position,
package/utils/index.js CHANGED
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
  * @param phone Номер телефона
8
8
  */
9
9
  var deleteFormatting = function (phone) {
10
- return phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '').replace(/-/g, '');
10
+ return phone.replace('+', '').replace(/^7/, '').replace(/\s/g, '');
11
11
  };
12
12
  function setCaretPosition(_a) {
13
13
  var position = _a.position, inputRef = _a.inputRef;