@redneckz/wildless-cms-uni-blocks 0.14.904 → 0.14.905

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.
Files changed (93) hide show
  1. package/bundle/bundle.umd.js +88 -85
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  4. package/dist/components/ApplicationForm/ApplicationForm.js +3 -2
  5. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  6. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  7. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  8. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  9. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  10. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  11. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  12. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  13. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  14. package/dist/retail/utils/latinFieldsUtils.js +74 -77
  15. package/dist/retail/utils/latinFieldsUtils.js.map +1 -1
  16. package/dist/ui-kit/Input/Input.js.map +1 -1
  17. package/dist/ui-kit/Select/Select.js.map +1 -1
  18. package/dist/ui-kit/Select/SelectPopup.js +1 -1
  19. package/dist/ui-kit/Select/SelectPopup.js.map +1 -1
  20. package/lib/common.css +1 -1
  21. package/lib/components/ApplicationForm/ApplicationForm.js +3 -2
  22. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  23. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  24. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  25. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  26. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  27. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  28. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  29. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  30. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  31. package/lib/retail/utils/latinFieldsUtils.js +74 -77
  32. package/lib/retail/utils/latinFieldsUtils.js.map +1 -1
  33. package/lib/ui-kit/Input/Input.js.map +1 -1
  34. package/lib/ui-kit/Select/Select.js.map +1 -1
  35. package/lib/ui-kit/Select/SelectPopup.js +1 -1
  36. package/lib/ui-kit/Select/SelectPopup.js.map +1 -1
  37. package/mobile/bundle/bundle.umd.js +88 -85
  38. package/mobile/bundle/bundle.umd.min.js +1 -1
  39. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  40. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +3 -2
  41. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  42. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  43. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  44. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  45. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  46. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  47. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  48. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  49. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  50. package/mobile/dist/retail/utils/latinFieldsUtils.js +74 -77
  51. package/mobile/dist/retail/utils/latinFieldsUtils.js.map +1 -1
  52. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  53. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  54. package/mobile/dist/ui-kit/Select/SelectPopup.js +1 -1
  55. package/mobile/dist/ui-kit/Select/SelectPopup.js.map +1 -1
  56. package/mobile/lib/common.css +1 -1
  57. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +3 -2
  58. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  59. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  60. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  61. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  62. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  63. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  64. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  65. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  66. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  67. package/mobile/lib/retail/utils/latinFieldsUtils.js +74 -77
  68. package/mobile/lib/retail/utils/latinFieldsUtils.js.map +1 -1
  69. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  70. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  71. package/mobile/lib/ui-kit/Select/SelectPopup.js +1 -1
  72. package/mobile/lib/ui-kit/Select/SelectPopup.js.map +1 -1
  73. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +3 -5
  74. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +3 -2
  75. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -1
  76. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -1
  77. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +4 -1
  78. package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +26 -23
  79. package/mobile/src/retail/utils/latinFieldsUtils.ts +76 -78
  80. package/mobile/src/ui-kit/Input/Input.tsx +0 -1
  81. package/mobile/src/ui-kit/Select/Select.tsx +2 -2
  82. package/mobile/src/ui-kit/Select/SelectPopup.tsx +1 -1
  83. package/package.json +1 -1
  84. package/src/components/ApplicationForm/ApplicationForm.tsx +3 -5
  85. package/src/components/ApplicationForm/ApplicationFormContent.ts +3 -2
  86. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -1
  87. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -1
  88. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +4 -1
  89. package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +26 -23
  90. package/src/retail/utils/latinFieldsUtils.ts +76 -78
  91. package/src/ui-kit/Input/Input.tsx +0 -1
  92. package/src/ui-kit/Select/Select.tsx +2 -2
  93. package/src/ui-kit/Select/SelectPopup.tsx +1 -1
@@ -2,82 +2,80 @@ const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
2
2
 
3
3
  export const isLatin = (_ = '') => latinPattern.test(_);
4
4
 
5
- // eslint-disable-next-line max-lines-per-function
6
- export const autoTranslateToLatin = (str: string): string => {
7
- const replacer = {
8
- А: 'A',
9
- Б: 'B',
10
- В: 'V',
11
- Г: 'G',
12
- Д: 'D',
13
- Е: 'E',
14
- Ё: 'E',
15
- Ж: 'ZH',
16
- З: 'Z',
17
- И: 'I',
18
- Й: 'I',
19
- К: 'K',
20
- Л: 'L',
21
- М: 'M',
22
- Н: 'N',
23
- О: 'O',
24
- П: 'P',
25
- Р: 'R',
26
- С: 'S',
27
- Т: 'T',
28
- У: 'U',
29
- Ф: 'F',
30
- Х: 'KH',
31
- Ц: 'TS',
32
- Ч: 'CH',
33
- Ш: 'SH',
34
- Щ: 'SHCH',
35
- Ъ: 'IE',
36
- Ы: 'Y',
37
- Ь: '',
38
- Э: 'E',
39
- Ю: 'YU',
40
- Я: 'YA',
41
- '': '',
42
- // Lower case
43
- а: 'A',
44
- б: 'B',
45
- в: 'V',
46
- г: 'G',
47
- д: 'D',
48
- е: 'E',
49
- ё: 'E',
50
- ж: 'ZH',
51
- з: 'Z',
52
- и: 'I',
53
- й: 'I',
54
- к: 'K',
55
- л: 'L',
56
- м: 'M',
57
- н: 'N',
58
- о: 'O',
59
- п: 'P',
60
- р: 'R',
61
- с: 'S',
62
- т: 'T',
63
- у: 'U',
64
- ф: 'F',
65
- х: 'KH',
66
- ц: 'TS',
67
- ч: 'CH',
68
- ш: 'SH',
69
- щ: 'SHCH',
70
- ъ: 'IE',
71
- ы: 'Y',
72
- ь: '',
73
- э: 'E',
74
- ю: 'YU',
75
- я: 'YA',
76
- '.': '.',
77
- ',': ',',
78
- '-': '-',
79
- ' ': ' ',
80
- };
81
-
82
- return str.replace(/[А-ЯЁа-яё,. -]/g, (_) => replacer[_.toLowerCase()].toUpperCase() || '');
5
+ const REPLACER = {
6
+ А: 'A',
7
+ Б: 'B',
8
+ В: 'V',
9
+ Г: 'G',
10
+ Д: 'D',
11
+ Е: 'E',
12
+ Ё: 'E',
13
+ Ж: 'ZH',
14
+ З: 'Z',
15
+ И: 'I',
16
+ Й: 'I',
17
+ К: 'K',
18
+ Л: 'L',
19
+ М: 'M',
20
+ Н: 'N',
21
+ О: 'O',
22
+ П: 'P',
23
+ Р: 'R',
24
+ С: 'S',
25
+ Т: 'T',
26
+ У: 'U',
27
+ Ф: 'F',
28
+ Х: 'KH',
29
+ Ц: 'TS',
30
+ Ч: 'CH',
31
+ Ш: 'SH',
32
+ Щ: 'SHCH',
33
+ Ъ: 'IE',
34
+ Ы: 'Y',
35
+ Ь: '',
36
+ Э: 'E',
37
+ Ю: 'YU',
38
+ Я: 'YA',
39
+ '': '',
40
+ // Lower case
41
+ а: 'A',
42
+ б: 'B',
43
+ в: 'V',
44
+ г: 'G',
45
+ д: 'D',
46
+ е: 'E',
47
+ ё: 'E',
48
+ ж: 'ZH',
49
+ з: 'Z',
50
+ и: 'I',
51
+ й: 'I',
52
+ к: 'K',
53
+ л: 'L',
54
+ м: 'M',
55
+ н: 'N',
56
+ о: 'O',
57
+ п: 'P',
58
+ р: 'R',
59
+ с: 'S',
60
+ т: 'T',
61
+ у: 'U',
62
+ ф: 'F',
63
+ х: 'KH',
64
+ ц: 'TS',
65
+ ч: 'CH',
66
+ ш: 'SH',
67
+ щ: 'SHCH',
68
+ ъ: 'IE',
69
+ ы: 'Y',
70
+ ь: '',
71
+ э: 'E',
72
+ ю: 'YU',
73
+ я: 'YA',
74
+ '.': '.',
75
+ ',': ',',
76
+ '-': '-',
77
+ ' ': ' ',
83
78
  };
79
+
80
+ export const autoTranslateToLatin = (str: string): string =>
81
+ str.replace(/[А-ЯЁа-яё,. -]/g, (_) => REPLACER[_.toLowerCase()].toUpperCase() || '');
@@ -44,7 +44,6 @@ export const Input = JSX<InputProps>(
44
44
 
45
45
  const paddingStyle = children ? 'pr-3xl' : '';
46
46
  const validStyle = getValidStyle(valid);
47
-
48
47
  const ariaLabel = label ?? name ?? id;
49
48
 
50
49
  return (
@@ -4,6 +4,7 @@ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
4
4
  import { type ControlProps } from '../../model/ControlProps';
5
5
  import { type DefaultControlType } from '../../model/DefaultControlType';
6
6
  import { type IconVersion } from '../../model/IconVersion';
7
+ import { type PlaceholderProps } from '../../model/PlaceholderProps';
7
8
  import { debounce } from '../../utils/debounce';
8
9
  import { style } from '../../utils/style';
9
10
  import { Icon } from '../Icon/Icon';
@@ -23,11 +24,10 @@ export interface SelectProps extends DefaultControlType, ControlProps<Option> {
23
24
  onSearchQuery?: (value: string) => void;
24
25
  }
25
26
 
26
- type renderOptionTextProps = {
27
+ type renderOptionTextProps = PlaceholderProps & {
27
28
  isManualInput?: boolean;
28
29
  query?: string;
29
30
  value?: Option;
30
- placeholder?: string;
31
31
  };
32
32
 
33
33
  export const Select = JSX<SelectProps>(
@@ -59,7 +59,7 @@ export const SelectPopup = JSX<SelectPopupProps>(
59
59
  width="16"
60
60
  height="16"
61
61
  iconVersion={iconVersion}
62
- className={style('absolute right-4 pt-3xs', {
62
+ className={style('absolute right-4 pt-3xs sm:pt-2xs sm:right-2', {
63
63
  hidden: option.key !== value?.key,
64
64
  })}
65
65
  />