@redneckz/wildless-cms-uni-blocks 0.14.990 → 0.14.992
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/bundle/api/LeadServiceAPI.d.ts +2 -1
- package/bundle/bundle.umd.js +67 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/dist/api/LeadServiceAPI.d.ts +2 -1
- package/dist/api/LeadServiceAPI.js +3 -2
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/retail/components/Fields/MiddleNameField.js +4 -2
- package/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/dist/retail/components/Fields/NameField.js +4 -2
- package/dist/retail/components/Fields/NameField.js.map +1 -1
- package/dist/retail/components/Fields/SurnameField.js +4 -2
- package/dist/retail/components/Fields/SurnameField.js.map +1 -1
- package/dist/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/dist/retail/utils/autoLayoutKeyboard.js +54 -0
- package/dist/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/lib/api/LeadServiceAPI.d.ts +2 -1
- package/lib/api/LeadServiceAPI.js +3 -2
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/retail/components/Fields/MiddleNameField.js +4 -2
- package/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/lib/retail/components/Fields/NameField.js +4 -2
- package/lib/retail/components/Fields/NameField.js.map +1 -1
- package/lib/retail/components/Fields/SurnameField.js +4 -2
- package/lib/retail/components/Fields/SurnameField.js.map +1 -1
- package/lib/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/lib/retail/utils/autoLayoutKeyboard.js +51 -0
- package/lib/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/mobile/bundle/api/LeadServiceAPI.d.ts +2 -1
- package/mobile/bundle/bundle.umd.js +67 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/mobile/dist/api/LeadServiceAPI.d.ts +2 -1
- package/mobile/dist/api/LeadServiceAPI.js +3 -2
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/retail/components/Fields/MiddleNameField.js +4 -2
- package/mobile/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/NameField.js +4 -2
- package/mobile/dist/retail/components/Fields/NameField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/SurnameField.js +4 -2
- package/mobile/dist/retail/components/Fields/SurnameField.js.map +1 -1
- package/mobile/dist/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/mobile/dist/retail/utils/autoLayoutKeyboard.js +54 -0
- package/mobile/dist/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/mobile/lib/api/LeadServiceAPI.d.ts +2 -1
- package/mobile/lib/api/LeadServiceAPI.js +3 -2
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/retail/components/Fields/MiddleNameField.js +4 -2
- package/mobile/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/NameField.js +4 -2
- package/mobile/lib/retail/components/Fields/NameField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/SurnameField.js +4 -2
- package/mobile/lib/retail/components/Fields/SurnameField.js.map +1 -1
- package/mobile/lib/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/mobile/lib/retail/utils/autoLayoutKeyboard.js +51 -0
- package/mobile/lib/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/mobile/src/api/LeadServiceAPI.ts +9 -2
- package/mobile/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +3 -0
- package/mobile/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
- package/mobile/src/retail/components/Fields/MiddleNameField.tsx +4 -2
- package/mobile/src/retail/components/Fields/NameField.tsx +4 -2
- package/mobile/src/retail/components/Fields/SurnameField.tsx +5 -2
- package/mobile/src/retail/utils/autoLayoutKeyboard.ts +57 -0
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +9 -2
- package/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +3 -0
- package/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
- package/src/retail/components/Fields/MiddleNameField.tsx +4 -2
- package/src/retail/components/Fields/NameField.tsx +4 -2
- package/src/retail/components/Fields/SurnameField.tsx +5 -2
- package/src/retail/utils/autoLayoutKeyboard.ts +57 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
4
5
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
5
6
|
import { retailCyrillicPattern } from '../../validator/validators';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -8,8 +9,9 @@ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
|
8
9
|
export const MiddleNameField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
10
|
const onChange = useCallback(
|
|
10
11
|
(value: string) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
13
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
14
|
+
field('middleName')?.onChange?.(translatedValue);
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
[field],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
4
5
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
5
6
|
import { retailCyrillicPattern } from '../../validator/validators';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -8,8 +9,9 @@ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
|
8
9
|
export const NameField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
10
|
const onChange = useCallback(
|
|
10
11
|
(value: string) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
13
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
14
|
+
field('name')?.onChange?.(translatedValue);
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
[field],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
4
5
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
5
6
|
import { retailCyrillicPattern } from '../../validator/validators';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -8,8 +9,10 @@ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
|
8
9
|
export const SurnameField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
10
|
const onChange = useCallback(
|
|
10
11
|
(value: string) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
13
|
+
|
|
14
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
15
|
+
field('surname')?.onChange?.(translatedValue);
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
18
|
[field],
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const autoLayoutKeyboard = (str: string): string => {
|
|
2
|
+
const replacer = {
|
|
3
|
+
q: 'й',
|
|
4
|
+
w: 'ц',
|
|
5
|
+
e: 'у',
|
|
6
|
+
r: 'к',
|
|
7
|
+
t: 'е',
|
|
8
|
+
y: 'н',
|
|
9
|
+
u: 'г',
|
|
10
|
+
|
|
11
|
+
i: 'ш',
|
|
12
|
+
o: 'щ',
|
|
13
|
+
p: 'з',
|
|
14
|
+
'[': 'х',
|
|
15
|
+
']': 'ъ',
|
|
16
|
+
a: 'ф',
|
|
17
|
+
s: 'ы',
|
|
18
|
+
|
|
19
|
+
d: 'в',
|
|
20
|
+
f: 'а',
|
|
21
|
+
g: 'п',
|
|
22
|
+
h: 'р',
|
|
23
|
+
j: 'о',
|
|
24
|
+
k: 'л',
|
|
25
|
+
l: 'д',
|
|
26
|
+
|
|
27
|
+
';': 'ж',
|
|
28
|
+
"'": 'э',
|
|
29
|
+
z: 'я',
|
|
30
|
+
x: 'ч',
|
|
31
|
+
c: 'с',
|
|
32
|
+
v: 'м',
|
|
33
|
+
b: 'и',
|
|
34
|
+
|
|
35
|
+
n: 'т',
|
|
36
|
+
m: 'ь',
|
|
37
|
+
',': 'б',
|
|
38
|
+
'.': 'ю',
|
|
39
|
+
'`': 'ё',
|
|
40
|
+
|
|
41
|
+
'{': 'Х',
|
|
42
|
+
'}': 'Ъ',
|
|
43
|
+
':': 'Ж',
|
|
44
|
+
'~': 'Ё',
|
|
45
|
+
'"': 'Э',
|
|
46
|
+
'<': 'Б',
|
|
47
|
+
'>': 'Ю',
|
|
48
|
+
|
|
49
|
+
'\\': '\\',
|
|
50
|
+
'^': '^',
|
|
51
|
+
_: '_',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return str.replace(/[A-z,`~<.>;:\\'"[{\]}]/g, (x: string) => {
|
|
55
|
+
return x === x.toLowerCase() ? replacer[x] : replacer[x.toLowerCase()].toUpperCase();
|
|
56
|
+
});
|
|
57
|
+
};
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ export type CheckCodeProps = {
|
|
|
24
24
|
reqId: string;
|
|
25
25
|
code: string;
|
|
26
26
|
body: LeadRequest;
|
|
27
|
+
router: Router;
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
type CheckCodeResponse = {
|
|
@@ -51,6 +52,7 @@ export type sendProps = {
|
|
|
51
52
|
|
|
52
53
|
type SubmitBody = PhoneOnly | LeadRequest | CheckCodeProps | VerifiedLeadRequest;
|
|
53
54
|
|
|
55
|
+
// eslint-disable-next-line max-lines-per-function
|
|
54
56
|
export function LeadServiceAPI() {
|
|
55
57
|
async function send({ body, router, endpoint }: sendProps) {
|
|
56
58
|
const calculatedEndpoint = endpoint && getEndpoint(endpoint, body);
|
|
@@ -95,11 +97,16 @@ export function LeadServiceAPI() {
|
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
async function checkCode({
|
|
100
|
+
async function checkCode({
|
|
101
|
+
reqId,
|
|
102
|
+
code,
|
|
103
|
+
body,
|
|
104
|
+
router,
|
|
105
|
+
}: CheckCodeProps): Promise<CheckCodeResponse> {
|
|
99
106
|
const submitBody = {
|
|
100
107
|
requestId: reqId,
|
|
101
108
|
confimationCode: code, // не исправлять опечатку!
|
|
102
|
-
leadRequest: getSubmitBody({ body }),
|
|
109
|
+
leadRequest: getSubmitBody({ body, router }),
|
|
103
110
|
};
|
|
104
111
|
try {
|
|
105
112
|
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
3
3
|
import { LeadServiceAPI, type LeadRequest } from '../../api/LeadServiceAPI';
|
|
4
|
+
import { useRouter } from '../../external/useRouter';
|
|
4
5
|
import { getTimer } from '../../utils/getTimer';
|
|
5
6
|
const API = LeadServiceAPI();
|
|
6
7
|
|
|
@@ -18,6 +19,7 @@ export const useVerifyPhoneDialogSubmit = ({
|
|
|
18
19
|
reqId,
|
|
19
20
|
}: useVerifyPhoneDialogSubmitProps) => {
|
|
20
21
|
const timer = Math.max(getTimer(Date.now()), 0);
|
|
22
|
+
const router = useRouter();
|
|
21
23
|
|
|
22
24
|
const [errorText, setErrorText] = useState('');
|
|
23
25
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
@@ -34,6 +36,7 @@ export const useVerifyPhoneDialogSubmit = ({
|
|
|
34
36
|
code: values.join(''),
|
|
35
37
|
body: formatData,
|
|
36
38
|
reqId,
|
|
39
|
+
router,
|
|
37
40
|
});
|
|
38
41
|
if (response?.errorDesc) {
|
|
39
42
|
setErrorText(response?.errorDesc);
|
|
@@ -46,7 +46,7 @@ export const CaptchaDialog = JSX<CaptchaDialogProps>(({ phoneNumber, sendCode, o
|
|
|
46
46
|
useEffect(handleCreateCaptcha, []);
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
|
-
<Dialog head={<Logo />} onClose={
|
|
49
|
+
<Dialog head={<Logo />} onClose={closeAll}>
|
|
50
50
|
<div className="flex flex-col gap-lg items-center">
|
|
51
51
|
<div className="flex">
|
|
52
52
|
<img className="grow" src={captcha}></img>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
4
5
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
5
6
|
import { retailCyrillicPattern } from '../../validator/validators';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -8,8 +9,9 @@ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
|
8
9
|
export const MiddleNameField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
10
|
const onChange = useCallback(
|
|
10
11
|
(value: string) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
13
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
14
|
+
field('middleName')?.onChange?.(translatedValue);
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
[field],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
4
5
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
5
6
|
import { retailCyrillicPattern } from '../../validator/validators';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -8,8 +9,9 @@ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
|
8
9
|
export const NameField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
10
|
const onChange = useCallback(
|
|
10
11
|
(value: string) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
13
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
14
|
+
field('name')?.onChange?.(translatedValue);
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
[field],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
4
5
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
5
6
|
import { retailCyrillicPattern } from '../../validator/validators';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -8,8 +9,10 @@ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
|
8
9
|
export const SurnameField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
10
|
const onChange = useCallback(
|
|
10
11
|
(value: string) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
13
|
+
|
|
14
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
15
|
+
field('surname')?.onChange?.(translatedValue);
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
18
|
[field],
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const autoLayoutKeyboard = (str: string): string => {
|
|
2
|
+
const replacer = {
|
|
3
|
+
q: 'й',
|
|
4
|
+
w: 'ц',
|
|
5
|
+
e: 'у',
|
|
6
|
+
r: 'к',
|
|
7
|
+
t: 'е',
|
|
8
|
+
y: 'н',
|
|
9
|
+
u: 'г',
|
|
10
|
+
|
|
11
|
+
i: 'ш',
|
|
12
|
+
o: 'щ',
|
|
13
|
+
p: 'з',
|
|
14
|
+
'[': 'х',
|
|
15
|
+
']': 'ъ',
|
|
16
|
+
a: 'ф',
|
|
17
|
+
s: 'ы',
|
|
18
|
+
|
|
19
|
+
d: 'в',
|
|
20
|
+
f: 'а',
|
|
21
|
+
g: 'п',
|
|
22
|
+
h: 'р',
|
|
23
|
+
j: 'о',
|
|
24
|
+
k: 'л',
|
|
25
|
+
l: 'д',
|
|
26
|
+
|
|
27
|
+
';': 'ж',
|
|
28
|
+
"'": 'э',
|
|
29
|
+
z: 'я',
|
|
30
|
+
x: 'ч',
|
|
31
|
+
c: 'с',
|
|
32
|
+
v: 'м',
|
|
33
|
+
b: 'и',
|
|
34
|
+
|
|
35
|
+
n: 'т',
|
|
36
|
+
m: 'ь',
|
|
37
|
+
',': 'б',
|
|
38
|
+
'.': 'ю',
|
|
39
|
+
'`': 'ё',
|
|
40
|
+
|
|
41
|
+
'{': 'Х',
|
|
42
|
+
'}': 'Ъ',
|
|
43
|
+
':': 'Ж',
|
|
44
|
+
'~': 'Ё',
|
|
45
|
+
'"': 'Э',
|
|
46
|
+
'<': 'Б',
|
|
47
|
+
'>': 'Ю',
|
|
48
|
+
|
|
49
|
+
'\\': '\\',
|
|
50
|
+
'^': '^',
|
|
51
|
+
_: '_',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return str.replace(/[A-z,`~<.>;:\\'"[{\]}]/g, (x: string) => {
|
|
55
|
+
return x === x.toLowerCase() ? replacer[x] : replacer[x.toLowerCase()].toUpperCase();
|
|
56
|
+
});
|
|
57
|
+
};
|