@redneckz/wildless-cms-uni-blocks 0.8.19 → 0.8.21

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 (266) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +87 -44
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  5. package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  6. package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
  7. package/bundle/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  8. package/bundle/components/Calculator/constants.d.ts +2 -2
  9. package/bundle/components/Calculator/renderInterestPayment.d.ts +9 -1
  10. package/bundle/components/Calculator/renderPaymentType.d.ts +12 -0
  11. package/bundle/components/Calculator/renderRegistrationType.d.ts +10 -0
  12. package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  13. package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  14. package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  15. package/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  16. package/dist/api/CorporateLeadAPI.js +1 -1
  17. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
  18. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  19. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  20. package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  21. package/dist/components/ApplicationForm/renderBankOffices.js +1 -1
  22. package/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
  23. package/dist/components/ApplicationForm/renderSelects.js +2 -2
  24. package/dist/components/ApplicationForm/renderSelects.js.map +1 -1
  25. package/dist/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
  26. package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  27. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  28. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  29. package/dist/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  30. package/dist/components/Calculator/CreditCalculatorForm.js +7 -15
  31. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  32. package/dist/components/Calculator/DepositCalculatorForm.js +13 -1
  33. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  34. package/dist/components/Calculator/constants.d.ts +2 -2
  35. package/dist/components/Calculator/constants.js +6 -7
  36. package/dist/components/Calculator/constants.js.map +1 -1
  37. package/dist/components/Calculator/rangeHelpers.js +1 -1
  38. package/dist/components/Calculator/rangeHelpers.js.map +1 -1
  39. package/dist/components/Calculator/renderInterestPayment.d.ts +9 -1
  40. package/dist/components/Calculator/renderInterestPayment.js +2 -2
  41. package/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  42. package/dist/components/Calculator/renderPaymentType.d.ts +12 -0
  43. package/dist/components/Calculator/renderPaymentType.js +22 -0
  44. package/dist/components/Calculator/renderPaymentType.js.map +1 -0
  45. package/dist/components/Calculator/renderRegistrationType.d.ts +10 -0
  46. package/dist/components/Calculator/renderRegistrationType.js +22 -0
  47. package/dist/components/Calculator/renderRegistrationType.js.map +1 -0
  48. package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  49. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  50. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  51. package/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  52. package/dist/components/Calculator/useCreditCalculatorParams.js +2 -4
  53. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  54. package/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  55. package/dist/components/Calculator/useDepositCalculatorParams.js +2 -1
  56. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  57. package/dist/components/Footer/Contacts.js +1 -1
  58. package/dist/components/Footer/Contacts.js.map +1 -1
  59. package/dist/components/Footer/Sitemap.js +7 -5
  60. package/dist/components/Footer/Sitemap.js.map +1 -1
  61. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  62. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  63. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  64. package/lib/api/CorporateLeadAPI.js +1 -1
  65. package/lib/common.css +1 -1
  66. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
  67. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  68. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  69. package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  70. package/lib/components/ApplicationForm/renderBankOffices.js +1 -1
  71. package/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
  72. package/lib/components/ApplicationForm/renderSelects.js +2 -2
  73. package/lib/components/ApplicationForm/renderSelects.js.map +1 -1
  74. package/lib/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
  75. package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  76. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  77. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  78. package/lib/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  79. package/lib/components/Calculator/CreditCalculatorForm.js +6 -14
  80. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  81. package/lib/components/Calculator/DepositCalculatorForm.js +13 -1
  82. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  83. package/lib/components/Calculator/constants.d.ts +2 -2
  84. package/lib/components/Calculator/constants.js +6 -7
  85. package/lib/components/Calculator/constants.js.map +1 -1
  86. package/lib/components/Calculator/rangeHelpers.js +1 -1
  87. package/lib/components/Calculator/rangeHelpers.js.map +1 -1
  88. package/lib/components/Calculator/renderInterestPayment.d.ts +9 -1
  89. package/lib/components/Calculator/renderInterestPayment.js +2 -2
  90. package/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  91. package/lib/components/Calculator/renderPaymentType.d.ts +12 -0
  92. package/lib/components/Calculator/renderPaymentType.js +19 -0
  93. package/lib/components/Calculator/renderPaymentType.js.map +1 -0
  94. package/lib/components/Calculator/renderRegistrationType.d.ts +10 -0
  95. package/lib/components/Calculator/renderRegistrationType.js +19 -0
  96. package/lib/components/Calculator/renderRegistrationType.js.map +1 -0
  97. package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  98. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  99. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  100. package/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  101. package/lib/components/Calculator/useCreditCalculatorParams.js +2 -4
  102. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  103. package/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  104. package/lib/components/Calculator/useDepositCalculatorParams.js +2 -1
  105. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  106. package/lib/components/Footer/Contacts.js +1 -1
  107. package/lib/components/Footer/Contacts.js.map +1 -1
  108. package/lib/components/Footer/Sitemap.js +7 -5
  109. package/lib/components/Footer/Sitemap.js.map +1 -1
  110. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  111. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  112. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  113. package/mobile/bundle/bundle.umd.js +2 -2
  114. package/mobile/bundle/bundle.umd.min.js +1 -1
  115. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  116. package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  117. package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
  118. package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  119. package/mobile/bundle/components/Calculator/constants.d.ts +2 -2
  120. package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +9 -1
  121. package/mobile/bundle/components/Calculator/renderPaymentType.d.ts +12 -0
  122. package/mobile/bundle/components/Calculator/renderRegistrationType.d.ts +10 -0
  123. package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  124. package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  125. package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  126. package/mobile/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  127. package/mobile/dist/api/CorporateLeadAPI.js +1 -1
  128. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
  129. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  130. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  131. package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  132. package/mobile/dist/components/ApplicationForm/renderBankOffices.js +1 -1
  133. package/mobile/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
  134. package/mobile/dist/components/ApplicationForm/renderSelects.js +2 -2
  135. package/mobile/dist/components/ApplicationForm/renderSelects.js.map +1 -1
  136. package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
  137. package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  138. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  139. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  140. package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  141. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +7 -15
  142. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  143. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -1
  144. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  145. package/mobile/dist/components/Calculator/constants.d.ts +2 -2
  146. package/mobile/dist/components/Calculator/constants.js +6 -7
  147. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  148. package/mobile/dist/components/Calculator/rangeHelpers.js +1 -1
  149. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
  150. package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +9 -1
  151. package/mobile/dist/components/Calculator/renderInterestPayment.js +2 -2
  152. package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  153. package/mobile/dist/components/Calculator/renderPaymentType.d.ts +12 -0
  154. package/mobile/dist/components/Calculator/renderPaymentType.js +22 -0
  155. package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -0
  156. package/mobile/dist/components/Calculator/renderRegistrationType.d.ts +10 -0
  157. package/mobile/dist/components/Calculator/renderRegistrationType.js +22 -0
  158. package/mobile/dist/components/Calculator/renderRegistrationType.js.map +1 -0
  159. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  160. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  161. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  162. package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  163. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +2 -4
  164. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  165. package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  166. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +2 -1
  167. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  168. package/mobile/dist/components/Footer/Contacts.js +1 -1
  169. package/mobile/dist/components/Footer/Contacts.js.map +1 -1
  170. package/mobile/dist/components/Footer/Sitemap.js +7 -5
  171. package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
  172. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  173. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  174. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  175. package/mobile/lib/api/CorporateLeadAPI.js +1 -1
  176. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
  177. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  178. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  179. package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  180. package/mobile/lib/components/ApplicationForm/renderBankOffices.js +1 -1
  181. package/mobile/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
  182. package/mobile/lib/components/ApplicationForm/renderSelects.js +2 -2
  183. package/mobile/lib/components/ApplicationForm/renderSelects.js.map +1 -1
  184. package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
  185. package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  186. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  187. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  188. package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  189. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +6 -14
  190. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  191. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +13 -1
  192. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  193. package/mobile/lib/components/Calculator/constants.d.ts +2 -2
  194. package/mobile/lib/components/Calculator/constants.js +6 -7
  195. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  196. package/mobile/lib/components/Calculator/rangeHelpers.js +1 -1
  197. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
  198. package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +9 -1
  199. package/mobile/lib/components/Calculator/renderInterestPayment.js +2 -2
  200. package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  201. package/mobile/lib/components/Calculator/renderPaymentType.d.ts +12 -0
  202. package/mobile/lib/components/Calculator/renderPaymentType.js +19 -0
  203. package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -0
  204. package/mobile/lib/components/Calculator/renderRegistrationType.d.ts +10 -0
  205. package/mobile/lib/components/Calculator/renderRegistrationType.js +19 -0
  206. package/mobile/lib/components/Calculator/renderRegistrationType.js.map +1 -0
  207. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  208. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  209. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  210. package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  211. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +2 -4
  212. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  213. package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  214. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +2 -1
  215. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  216. package/mobile/lib/components/Footer/Contacts.js +1 -1
  217. package/mobile/lib/components/Footer/Contacts.js.map +1 -1
  218. package/mobile/lib/components/Footer/Sitemap.js +7 -5
  219. package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
  220. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  221. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  222. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  223. package/mobile/src/api/CorporateLeadAPI.ts +1 -1
  224. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
  225. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
  226. package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
  227. package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +2 -2
  228. package/mobile/src/components/ApplicationForm/renderSelects.tsx +3 -3
  229. package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +2 -2
  230. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +9 -8
  231. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +8 -22
  232. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +22 -8
  233. package/mobile/src/components/Calculator/constants.ts +6 -7
  234. package/mobile/src/components/Calculator/rangeHelpers.ts +1 -1
  235. package/mobile/src/components/Calculator/renderInterestPayment.tsx +21 -9
  236. package/mobile/src/components/Calculator/renderPaymentType.tsx +49 -0
  237. package/mobile/src/components/Calculator/renderRegistrationType.tsx +51 -0
  238. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +4 -3
  239. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +3 -8
  240. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +4 -2
  241. package/mobile/src/components/Footer/Contacts.tsx +1 -1
  242. package/mobile/src/components/Footer/Sitemap.tsx +10 -5
  243. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +9 -2
  244. package/package.json +1 -1
  245. package/src/api/CorporateLeadAPI.ts +1 -1
  246. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
  247. package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
  248. package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
  249. package/src/components/ApplicationForm/renderBankOffices.tsx +2 -2
  250. package/src/components/ApplicationForm/renderSelects.tsx +3 -3
  251. package/src/components/ApplicationForm/renderSubmitButton.tsx +2 -2
  252. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +9 -8
  253. package/src/components/Calculator/CreditCalculatorForm.tsx +8 -22
  254. package/src/components/Calculator/DepositCalculatorForm.tsx +22 -8
  255. package/src/components/Calculator/constants.ts +6 -7
  256. package/src/components/Calculator/rangeHelpers.ts +1 -1
  257. package/src/components/Calculator/renderInterestPayment.tsx +21 -9
  258. package/src/components/Calculator/renderPaymentType.tsx +49 -0
  259. package/src/components/Calculator/renderRegistrationType.tsx +51 -0
  260. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +4 -3
  261. package/src/components/Calculator/useCreditCalculatorParams.ts +3 -8
  262. package/src/components/Calculator/useDepositCalculatorParams.ts +4 -2
  263. package/src/components/Footer/Contacts.tsx +1 -1
  264. package/src/components/Footer/Sitemap.tsx +10 -5
  265. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.tsx +22 -5
  266. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +9 -2
@@ -21,4 +21,4 @@ export const checkRangeByKeys = <
21
21
  value: number,
22
22
  [minKey, maxKey]: [MinKey, MaxKey],
23
23
  sourceBookRow: T,
24
- ): boolean => value >= sourceBookRow[minKey] && value < sourceBookRow[maxKey];
24
+ ): boolean => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
@@ -1,3 +1,4 @@
1
+ import { ListOrientation } from '../../model/ListOrientation';
1
2
  import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
2
3
  import { Text } from '../../ui-kit/Text/Text';
3
4
 
@@ -15,21 +16,32 @@ const depositTypeItems = [
15
16
  },
16
17
  ];
17
18
 
18
- export function renderInterestPayment(
19
- isMonthlyInterestPayment: boolean,
20
- callback?: (value: boolean) => void,
21
- title?: string,
22
- ) {
19
+ interface InterestPaymentProps {
20
+ isMonthlyInterestPayment: boolean;
21
+ callback?: (value: boolean) => void;
22
+ title?: string;
23
+ orientation?: ListOrientation;
24
+ }
25
+
26
+ export function renderInterestPayment({
27
+ isMonthlyInterestPayment,
28
+ callback,
29
+ title,
30
+ orientation = 'horizontal',
31
+ }: InterestPaymentProps) {
23
32
  return (
24
33
  <div>
25
34
  {title ? (
26
- <Text color="text-secondary-text" font="font-light">
27
- {title}
28
- </Text>
35
+ <div className="mb-3">
36
+ <Text color="text-secondary-text" font="font-light">
37
+ {title}
38
+ </Text>
39
+ </div>
29
40
  ) : null}
30
41
 
31
- <div className="mt-3">
42
+ <div>
32
43
  <RadioButtonGroup
44
+ orientation={orientation}
33
45
  items={depositTypeItems}
34
46
  checkedItem={isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM}
35
47
  onChange={(text: string) => callback && callback(text === EVERY_MONTH)}
@@ -0,0 +1,49 @@
1
+ import { ListOrientation } from '../../model/ListOrientation';
2
+ import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
3
+ import { Text } from '../../ui-kit/Text/Text';
4
+
5
+ export const ANNUITY = 'annuity';
6
+ export const DIFFERENTIAL = 'differential';
7
+
8
+ const paymentTypeItems = [
9
+ {
10
+ id: ANNUITY,
11
+ text: 'Аннуитетный',
12
+ },
13
+ {
14
+ id: DIFFERENTIAL,
15
+ text: 'Дифференцированный',
16
+ },
17
+ ];
18
+
19
+ interface PaymentTypeProps {
20
+ isAnnuity: boolean;
21
+ callback?: (value: boolean) => void;
22
+ title?: string;
23
+ orientation?: ListOrientation;
24
+ }
25
+
26
+ export function renderPaymentType({
27
+ isAnnuity,
28
+ callback,
29
+ title,
30
+ orientation = 'horizontal',
31
+ }: PaymentTypeProps) {
32
+ return (
33
+ <div>
34
+ {title ? (
35
+ <div className="mb-3">
36
+ <Text color="text-secondary-text" font="font-light">
37
+ {title}
38
+ </Text>
39
+ </div>
40
+ ) : null}
41
+ <RadioButtonGroup
42
+ orientation={orientation}
43
+ items={paymentTypeItems}
44
+ checkedItem={isAnnuity ? ANNUITY : DIFFERENTIAL}
45
+ onChange={(text: string) => callback && callback(text === ANNUITY)}
46
+ />
47
+ </div>
48
+ );
49
+ }
@@ -0,0 +1,51 @@
1
+ import { ListOrientation } from '../../model/ListOrientation';
2
+ import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
3
+ import { Text } from '../../ui-kit/Text/Text';
4
+
5
+ const REMOTE_REGISTRATION = 'remote';
6
+ const OFFICE_REGISTRATION = 'office';
7
+
8
+ const registrationTypeItems = [
9
+ {
10
+ id: OFFICE_REGISTRATION,
11
+ text: 'Офис Банка',
12
+ },
13
+ {
14
+ id: REMOTE_REGISTRATION,
15
+ text: 'Дистанционно',
16
+ },
17
+ ];
18
+
19
+ interface RegistrationTypeProps {
20
+ isRemoteRegistration: boolean;
21
+ callback?: (value: boolean) => void;
22
+ title?: string;
23
+ orientation?: ListOrientation;
24
+ }
25
+
26
+ export function renderRegistrationType({
27
+ isRemoteRegistration,
28
+ callback,
29
+ title,
30
+ orientation = 'horizontal',
31
+ }: RegistrationTypeProps) {
32
+ return (
33
+ <div>
34
+ {title ? (
35
+ <div className="mb-3">
36
+ <Text color="text-secondary-text" font="font-light">
37
+ {title}
38
+ </Text>
39
+ </div>
40
+ ) : null}
41
+ <div>
42
+ <RadioButtonGroup
43
+ orientation={orientation}
44
+ items={registrationTypeItems}
45
+ checkedItem={isRemoteRegistration ? REMOTE_REGISTRATION : OFFICE_REGISTRATION}
46
+ onChange={(text: string) => callback && callback(text === REMOTE_REGISTRATION)}
47
+ />
48
+ </div>
49
+ </div>
50
+ );
51
+ }
@@ -7,9 +7,9 @@ import {
7
7
  } from './constants';
8
8
  import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
9
9
  import { useCalculatorParams } from './useCalculatorParams';
10
- import type { CommonDepositParams } from './useDepositCalculatorParams';
11
10
 
12
- export interface BusinessCommonDepositParams extends CommonDepositParams {
11
+ export interface BusinessCommonDepositParams {
12
+ isMonthlyInterestPayment: boolean;
13
13
  isReplenished: boolean;
14
14
  isPartialWithdrawal: boolean;
15
15
  isSmallBusiness: boolean;
@@ -34,6 +34,7 @@ export interface BusinessDepositCalculatorParams
34
34
  income?: number;
35
35
  finalSum?: number;
36
36
  isDisabledOperatingDeposit?: boolean;
37
+ isShowUnknownRate?: boolean;
37
38
  }
38
39
 
39
40
  export type BusinessDepositCalculatorData = {
@@ -65,7 +66,7 @@ export const useBusinessDepositCalculatorParams = (
65
66
  ...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
66
67
  ...userInputParams,
67
68
  isDisabledOperatingDeposit,
68
- rate: 0,
69
+ isShowUnknownRate: true,
69
70
  };
70
71
  }
71
72
  const businessDepositCalculatorSourceBookParams =
@@ -13,9 +13,7 @@ export interface CreditCalculatorSourceBookParams extends CommonCreditParams {
13
13
  maxSum: number;
14
14
  minMonths: number;
15
15
  maxMonths: number;
16
- rateBottomRange: number;
17
- rateTopRange: number;
18
- sumBorder: number;
16
+ rate: number;
19
17
  }
20
18
 
21
19
  export interface CreditCalculatorUserInputParams extends CommonCreditParams {
@@ -28,7 +26,6 @@ export interface CreditCalculatorParams
28
26
  extends CreditCalculatorSourceBookParams,
29
27
  CreditCalculatorUserInputParams {
30
28
  monthlyPayment: number;
31
- finalRate: number;
32
29
  }
33
30
 
34
31
  export type CreditCalculatorData = {
@@ -53,9 +50,8 @@ export const useCreditCalculatorParams = (
53
50
  );
54
51
  }) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
55
52
 
56
- const { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
57
- const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
58
- const monthlyPayment = getMonthlyPayment(finalRate, userInputParams);
53
+ const { rate } = creditCalculatorSourceBookParams;
54
+ const monthlyPayment = getMonthlyPayment(rate, userInputParams);
59
55
  const sourceBookRows = data?.rows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
60
56
 
61
57
  return {
@@ -63,7 +59,6 @@ export const useCreditCalculatorParams = (
63
59
  ...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
64
60
  ...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
65
61
  ...userInputParams,
66
- finalRate,
67
62
  monthlyPayment,
68
63
  };
69
64
  };
@@ -4,6 +4,7 @@ import { useCalculatorParams } from './useCalculatorParams';
4
4
 
5
5
  export interface CommonDepositParams {
6
6
  isMonthlyInterestPayment: boolean;
7
+ isRemoteRegistration: boolean;
7
8
  }
8
9
 
9
10
  export interface DepositCalculatorSourceBookParams extends CommonDepositParams {
@@ -34,7 +35,8 @@ export const useDepositCalculatorParams = (
34
35
  userInputParams: DepositCalculatorUserInputParams,
35
36
  sourceBookDir?: string,
36
37
  ): DepositCalculatorParams => {
37
- const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
38
+ const { isMonthlyInterestPayment, isRemoteRegistration, moneyValue, monthsValue } =
39
+ userInputParams;
38
40
 
39
41
  const data = useCalculatorParams<DepositCalculatorData>(
40
42
  sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR,
@@ -44,12 +46,12 @@ export const useDepositCalculatorParams = (
44
46
  data?.rows?.find(
45
47
  (_) =>
46
48
  isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
49
+ isRemoteRegistration === _.isRemoteRegistration &&
47
50
  checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
48
51
  checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _),
49
52
  ) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
50
53
 
51
54
  const { rate } = depositCalculatorSourceBookParams;
52
-
53
55
  const income = getDepositIncome(rate, userInputParams);
54
56
  const finalSum = moneyValue + income;
55
57
  const sourceBookRows = data?.rows || [DEFAULT_DEPOSIT_CALCULATOR_PARAMS];
@@ -15,7 +15,7 @@ export const Contacts = JSX<ContactsProps>(({ className = '', items, hasButton }
15
15
  <Button
16
16
  version="primary"
17
17
  className="mb-6 w-full"
18
- href="/"
18
+ href="https://www.rshb.ru/feedback/question/"
19
19
  target="_blank"
20
20
  ariaLabel="Обратная связь"
21
21
  text="Обратная связь"
@@ -5,6 +5,7 @@ import type { LinkProps } from '../../model/LinkProps';
5
5
  import { projectSettings } from '../../ProjectSettings';
6
6
  import type { SitemapDataProps, TopMenuItem } from '../../services/sitemap/SitemapProps';
7
7
  import { useSWRResource } from '../../services/sitemap/useSWRResource';
8
+ import { joinPath } from '../../utils/url';
8
9
 
9
10
  export interface SitemapProps {
10
11
  className?: string;
@@ -12,7 +13,7 @@ export interface SitemapProps {
12
13
  }
13
14
 
14
15
  export const Sitemap = JSX<SitemapProps>(({ className = '', fallback }) => {
15
- const link = useLink();
16
+ const link = useLink(true);
16
17
  const sitemap = useSWRResource<SitemapDataProps>(projectSettings.SITEMAP || 'sitemap', fallback);
17
18
 
18
19
  return (
@@ -36,24 +37,28 @@ const renderColumn = (menuItem: TopMenuItem & { onClick: () => void }, index: nu
36
37
  {text || `Раздел ${index}`}
37
38
  </a>
38
39
  {items?.map((_, i) => (
39
- <ColumnItem key={String(i)} {..._} index={i} />
40
+ <ColumnItem key={String(i)} {..._} basePath={href} index={i} />
40
41
  ))}
41
42
  </div>
42
43
  );
43
44
  };
44
45
 
45
46
  interface ColumnItemProps extends LinkProps {
47
+ basePath?: string;
46
48
  index?: number;
47
49
  }
48
50
 
49
- const ColumnItem = JSX<ColumnItemProps>(({ text, index, ...rest }) => {
50
- const link = useLink();
51
+ const ColumnItem = JSX<ColumnItemProps>(({ text, index, basePath, ...rest }) => {
52
+ const isAnotherPortal =
53
+ projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
54
+
55
+ const link = useLink(isAnotherPortal);
51
56
  const { href, target, onClick } = link(rest);
52
57
 
53
58
  return (
54
59
  <a
55
60
  className="block text-l-light text-secondary-text hover:text-primary-main no-underline"
56
- href={href}
61
+ href={isAnotherPortal ? joinPath(basePath, href) : href}
57
62
  target={target || '_self'}
58
63
  onClick={onClick}
59
64
  >
@@ -1,4 +1,5 @@
1
1
  import '../../setup-fixture';
2
+ import { Text } from '../Text/Text';
2
3
  import { RadioButtonGroup } from './RadioButtonGroup';
3
4
 
4
5
  const items = [
@@ -15,11 +16,27 @@ const items = [
15
16
  export default {
16
17
  default: (
17
18
  <div>
18
- <RadioButtonGroup
19
- items={items}
20
- checkedItem={'Аннуитетный'}
21
- onChange={(text) => console.log('Выбран пункт меню: ', text)}
22
- />
19
+ <div className="mb-5">
20
+ <Text color="text-secondary-text" font="font-light">
21
+ Горизонтальный
22
+ </Text>
23
+ <RadioButtonGroup
24
+ items={items}
25
+ checkedItem={'Аннуитетный'}
26
+ onChange={(text) => console.log('Выбран пункт меню: ', text)}
27
+ />
28
+ </div>
29
+ <div>
30
+ <Text color="text-secondary-text" font="font-light">
31
+ Вертикальный
32
+ </Text>
33
+ <RadioButtonGroup
34
+ items={items}
35
+ orientation="vertical"
36
+ checkedItem={'Аннуитетный'}
37
+ onChange={(text) => console.log('Выбран пункт меню: ', text)}
38
+ />
39
+ </div>
23
40
  </div>
24
41
  ),
25
42
  };
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { ListOrientation } from '../../model/ListOrientation';
2
3
  import { Checkbox } from '../Checkbox/Checkbox';
3
4
 
4
5
  export interface RadioButtonItem {
@@ -10,11 +11,17 @@ interface RadioButtonGroupProps {
10
11
  items?: RadioButtonItem[];
11
12
  checkedItem?: string;
12
13
  onChange?: (id: string) => void;
14
+ orientation?: ListOrientation;
13
15
  }
14
16
 
17
+ const orientationStyleMap: Record<ListOrientation, string> = {
18
+ horizontal: 'gap-10',
19
+ vertical: 'flex-col gap-3',
20
+ };
21
+
15
22
  export const RadioButtonGroup = JSX<RadioButtonGroupProps>(
16
- ({ items, checkedItem, onChange: onChangeCheckedItem }) => (
17
- <div className="flex flex-col gap-3">
23
+ ({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (
24
+ <div className={`flex ${orientationStyleMap[orientation]}`}>
18
25
  {items?.map(({ id, text }) => (
19
26
  <Checkbox
20
27
  key={String(id)}