@redneckz/wildless-cms-uni-blocks 0.2.79 → 0.2.83

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 (152) hide show
  1. package/bundle/bundle.umd.js +158 -9
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/ProjectSettings.d.ts +1 -0
  4. package/dist/ProjectSettings.js.map +1 -1
  5. package/dist/components/Blocks.d.ts +1 -0
  6. package/dist/components/Blocks.js +2 -0
  7. package/dist/components/Blocks.js.map +1 -1
  8. package/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -1
  9. package/dist/components/CreditCalculator/CreditCalculator.js +43 -15
  10. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  11. package/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +15 -0
  12. package/dist/components/CreditCalculator/CreditCalculatorContent.js +2 -0
  13. package/dist/components/CreditCalculator/CreditCalculatorContent.js.map +1 -0
  14. package/dist/components/CreditCalculator/constants.d.ts +7 -0
  15. package/dist/components/CreditCalculator/constants.js +10 -0
  16. package/dist/components/CreditCalculator/constants.js.map +1 -0
  17. package/dist/components/CreditCalculator/getCalculatorParams.d.ts +7 -0
  18. package/dist/components/CreditCalculator/getCalculatorParams.js +11 -0
  19. package/dist/components/CreditCalculator/getCalculatorParams.js.map +1 -0
  20. package/dist/components/CreditCalculator/getCreditRate.d.ts +7 -0
  21. package/dist/components/CreditCalculator/getCreditRate.js +13 -0
  22. package/dist/components/CreditCalculator/getCreditRate.js.map +1 -0
  23. package/dist/components/CreditCalculator/getCreditTermYears.d.ts +1 -0
  24. package/dist/components/CreditCalculator/getCreditTermYears.js +15 -0
  25. package/dist/components/CreditCalculator/getCreditTermYears.js.map +1 -0
  26. package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +11 -0
  27. package/dist/components/CreditCalculator/getMonthlyPayment.js +19 -0
  28. package/dist/components/CreditCalculator/getMonthlyPayment.js.map +1 -0
  29. package/dist/components/Footer/SocialMedia.js +11 -5
  30. package/dist/components/Footer/SocialMedia.js.map +1 -1
  31. package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  32. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  33. package/dist/hooks/useCreditCalculatorData.d.ts +3 -0
  34. package/dist/hooks/useCreditCalculatorData.js +15 -0
  35. package/dist/hooks/useCreditCalculatorData.js.map +1 -0
  36. package/dist/ui-kit/Icon/Icon.js +1 -1
  37. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  38. package/dist/ui-kit/InputRange/InputRange.js +3 -2
  39. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  40. package/dist/utils/addSpacesBetweenNumbers.d.ts +1 -0
  41. package/dist/utils/addSpacesBetweenNumbers.js +5 -0
  42. package/dist/utils/addSpacesBetweenNumbers.js.map +1 -0
  43. package/lib/ProjectSettings.d.ts +1 -0
  44. package/lib/ProjectSettings.js.map +1 -1
  45. package/lib/common.css +1 -1
  46. package/lib/components/Accordion/Accordion.fixture.d.ts +4 -0
  47. package/lib/components/BenefitsBlock/BenefitsBlock.fixture.d.ts +2 -0
  48. package/lib/components/Blocks.d.ts +1 -0
  49. package/lib/components/Blocks.js +2 -0
  50. package/lib/components/Blocks.js.map +1 -1
  51. package/lib/components/ComparisonTable/ComparisonTable.fixture.d.ts +8 -0
  52. package/lib/components/ContentPage/ContentPage.fixture.d.ts +6 -0
  53. package/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -1
  54. package/lib/components/CreditCalculator/CreditCalculator.fixture.d.ts +2 -0
  55. package/lib/components/CreditCalculator/CreditCalculator.js +43 -15
  56. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  57. package/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +15 -0
  58. package/lib/components/CreditCalculator/CreditCalculatorContent.js +2 -0
  59. package/lib/components/CreditCalculator/CreditCalculatorContent.js.map +1 -0
  60. package/lib/components/CreditCalculator/constants.d.ts +7 -0
  61. package/lib/components/CreditCalculator/constants.js +8 -0
  62. package/lib/components/CreditCalculator/constants.js.map +1 -0
  63. package/lib/components/CreditCalculator/getCalculatorParams.d.ts +7 -0
  64. package/lib/components/CreditCalculator/getCalculatorParams.js +8 -0
  65. package/lib/components/CreditCalculator/getCalculatorParams.js.map +1 -0
  66. package/lib/components/CreditCalculator/getCreditRate.d.ts +7 -0
  67. package/lib/components/CreditCalculator/getCreditRate.js +10 -0
  68. package/lib/components/CreditCalculator/getCreditRate.js.map +1 -0
  69. package/lib/components/CreditCalculator/getCreditTermYears.d.ts +1 -0
  70. package/lib/components/CreditCalculator/getCreditTermYears.js +12 -0
  71. package/lib/components/CreditCalculator/getCreditTermYears.js.map +1 -0
  72. package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +11 -0
  73. package/lib/components/CreditCalculator/getMonthlyPayment.js +16 -0
  74. package/lib/components/CreditCalculator/getMonthlyPayment.js.map +1 -0
  75. package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.d.ts +4 -0
  76. package/lib/components/Footer/Footer.fixture.d.ts +2 -0
  77. package/lib/components/Footer/SocialMedia.js +11 -5
  78. package/lib/components/Footer/SocialMedia.js.map +1 -1
  79. package/lib/components/Gallery/Gallery.fixture.d.ts +9 -0
  80. package/lib/components/Header/Header.fixture.d.ts +2 -0
  81. package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
  82. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  83. package/lib/components/LikeControl/LikeControl.fixture.d.ts +2 -0
  84. package/lib/components/MiniGallery/MiniGallery.fixture.d.ts +5 -0
  85. package/lib/components/MobileAppTile/MobileAppTile.fixture.d.ts +4 -0
  86. package/lib/components/Placeholder/Placeholder.fixture.d.ts +2 -0
  87. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +5 -0
  88. package/lib/components/ProductGallery/ProductGallery.fixture.d.ts +2 -0
  89. package/lib/components/ProductTile/ProductTile.fixture.d.ts +7 -0
  90. package/lib/components/PromoTile/PromoTile.fixture.d.ts +4 -0
  91. package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -0
  92. package/lib/components/TextBlock/TextBlock.fixture.d.ts +2 -0
  93. package/lib/components/Tile/Tile.fixture.d.ts +8 -0
  94. package/lib/cosmos.decorator.d.ts +4 -0
  95. package/lib/hooks/useCreditCalculatorData.d.ts +3 -0
  96. package/lib/hooks/useCreditCalculatorData.js +12 -0
  97. package/lib/hooks/useCreditCalculatorData.js.map +1 -0
  98. package/lib/setup-fixture.d.ts +3 -0
  99. package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +3 -0
  100. package/lib/ui-kit/Button/Button.fixture.d.ts +13 -0
  101. package/lib/ui-kit/Button/LikeButton.fixture.d.ts +5 -0
  102. package/lib/ui-kit/HeaderItem/HeaderItem.fixture.d.ts +6 -0
  103. package/lib/ui-kit/Icon/Icon.fixture.d.ts +5 -0
  104. package/lib/ui-kit/Icon/Icon.js +2 -2
  105. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  106. package/lib/ui-kit/InputRange/InputRange.js +3 -2
  107. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  108. package/lib/ui-kit/Logo/Logo.fixture.d.ts +3 -0
  109. package/lib/ui-kit/TopItem/TopItem.fixture.d.ts +6 -0
  110. package/lib/utils/addSpacesBetweenNumbers.d.ts +1 -0
  111. package/lib/utils/addSpacesBetweenNumbers.js +2 -0
  112. package/lib/utils/addSpacesBetweenNumbers.js.map +1 -0
  113. package/package.json +3 -2
  114. package/src/ProjectSettings.ts +1 -0
  115. package/src/components/Blocks.ts +2 -0
  116. package/src/components/ContentPage/ContentPage.page.json +7 -0
  117. package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +1 -1
  118. package/src/components/CreditCalculator/CreditCalculator.tsx +132 -85
  119. package/src/components/CreditCalculator/CreditCalculatorContent.ts +17 -0
  120. package/src/components/CreditCalculator/constants.ts +8 -0
  121. package/src/components/CreditCalculator/getCalculatorParams.ts +16 -0
  122. package/src/components/CreditCalculator/getCreditRate.ts +18 -0
  123. package/src/components/CreditCalculator/getCreditTermYears.spec.ts +10 -0
  124. package/src/components/CreditCalculator/getCreditTermYears.ts +15 -0
  125. package/src/components/CreditCalculator/getMonthlyPayment.ts +32 -0
  126. package/src/components/Footer/Footer.fixture.tsx +1 -1
  127. package/src/components/Footer/SocialMedia.tsx +26 -7
  128. package/src/components/Header/HeaderSecondaryMenu.tsx +6 -2
  129. package/src/hooks/useCreditCalculatorData.ts +23 -0
  130. package/src/icons/ActualBalanceIcon.svg +1 -0
  131. package/src/icons/AppleIcon.svg +1 -1
  132. package/src/icons/CalendarIcon.svg +1 -1
  133. package/src/icons/ClockIcon.svg +1 -0
  134. package/src/icons/ComfortableCompIcon.svg +1 -0
  135. package/src/icons/DollarIcon.svg +1 -1
  136. package/src/icons/EmptyWalletIcon.svg +1 -1
  137. package/src/icons/EuroIcon.svg +1 -1
  138. package/src/icons/GlassIcon.svg +1 -1
  139. package/src/icons/GridIcon.svg +2 -2
  140. package/src/icons/LoupeIcon.svg +1 -1
  141. package/src/icons/NewDocIcon.svg +1 -0
  142. package/src/icons/OkIcon.svg +1 -2
  143. package/src/icons/PassSendIcon.svg +1 -0
  144. package/src/icons/PercentageSquareIcon.svg +1 -1
  145. package/src/icons/PlayMarketIcon.svg +1 -1
  146. package/src/icons/ProfileIcon.svg +1 -1
  147. package/src/icons/SignDocsIcon.svg +1 -0
  148. package/src/icons/TelegramIcon.svg +1 -2
  149. package/src/icons/VKIcon.svg +1 -2
  150. package/src/ui-kit/Icon/Icon.tsx +8 -7
  151. package/src/ui-kit/InputRange/InputRange.tsx +3 -2
  152. package/src/utils/addSpacesBetweenNumbers.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"InputRange.js","sourceRoot":"","sources":["../../../src/ui-kit/InputRange/InputRange.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,CAAC,MAAM,UAAU,GAAG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,EAAC,gCAAgC,YAC5C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,eAAsB,SAAS,EAAC,kCAAkC,YAC/D,IAAI,IADI,MAAM,CAAC,CAAC,CAAC,CAEb,CACR,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import '../../setup-fixture';
2
+ declare const _default: any;
3
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import '../../setup-fixture';
2
+ declare const _default: {
3
+ default: any;
4
+ active: any;
5
+ };
6
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const addSpacesBetweenNumbers: (number: number) => string;
@@ -0,0 +1,2 @@
1
+ export const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
2
+ //# sourceMappingURL=addSpacesBetweenNumbers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addSpacesBetweenNumbers.js","sourceRoot":"","sources":["../../src/utils/addSpacesBetweenNumbers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAc,EAAE,EAAE,CACxD,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,wBAAwB,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.2.79",
3
+ "version": "0.2.83",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -79,7 +79,7 @@
79
79
  "scripts": {
80
80
  "start": "npm run cosmos",
81
81
  "build": "npm run build:lib && npm run build:commonjs && npm run bundle && npm run build:style && npm run build:icons",
82
- "postbuild": "npm run size",
82
+ "postbuild": "npm run size && npm run cosmos:export && copyfiles --up 1 \"./docs/**/*\" ./build",
83
83
  "build:lib": "rimraf ./lib && tsc --build --verbose",
84
84
  "postbuild:lib": "replace-in-file --configFile=replace-config.lib.cjs --verbose",
85
85
  "build:commonjs": "rimraf ./dist && tsc --module commonjs --noImplicitUseStrict --outDir dist",
@@ -121,6 +121,7 @@
121
121
  "@size-limit/file": "^7.0.8",
122
122
  "@types/jest": "^28.1.1",
123
123
  "autoprefixer": "^10.4.7",
124
+ "copyfiles": "^2.4.1",
124
125
  "css-loader": "^6.7.1",
125
126
  "cssnano": "^5.1.11",
126
127
  "html-webpack-plugin": "^5.5.0",
@@ -6,6 +6,7 @@ export interface ProjectSettings {
6
6
  ENABLE_ASSIST?: boolean;
7
7
  SITEMAP?: string;
8
8
  CDN?: string; // Should ends with "/"
9
+ CREDIT_CALCULATOR?: string;
9
10
  }
10
11
 
11
12
  export const projectSettings = new (class implements ProjectSettings {
@@ -15,6 +15,7 @@ import { TextBlock } from './TextBlock/TextBlock';
15
15
  import { Tile } from './Tile/Tile';
16
16
  import { ComparisonTable } from './ComparisonTable/ComparisonTable';
17
17
  import { Accordion } from './Accordion/Accordion';
18
+ import { CreditCalculator } from './CreditCalculator/CreditCalculator';
18
19
 
19
20
  export const Blocks = {
20
21
  Header,
@@ -34,4 +35,5 @@ export const Blocks = {
34
35
  MiniGallery,
35
36
  ComparisonTable,
36
37
  Accordion,
38
+ CreditCalculator,
37
39
  };
@@ -1360,6 +1360,13 @@
1360
1360
  ]
1361
1361
  }
1362
1362
  },
1363
+ {
1364
+ "type": "CreditCalculator",
1365
+ "style": ["col-span-12"],
1366
+ "content": {
1367
+ "directoryName": "credit-calculator-data"
1368
+ }
1369
+ },
1363
1370
  {
1364
1371
  "type": "Footer",
1365
1372
  "style": ["col-span-12"],
@@ -1,4 +1,4 @@
1
1
  import { CreditCalculator } from './CreditCalculator';
2
2
  import { context } from '../../setup-fixture';
3
3
 
4
- export default <CreditCalculator context={context} />;
4
+ export default <CreditCalculator context={context} directoryName="credit-calculator-data" />;
@@ -1,106 +1,153 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCreditCalculatorData } from '../../hooks/useCreditCalculatorData';
2
3
  import { UniBlockProps } from '../../types';
3
4
  import { Button } from '../../ui-kit/Button/Button';
4
5
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
5
6
  import { InputRange } from '../../ui-kit/InputRange/InputRange';
7
+ import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
6
8
  import { clamp } from '../../utils/clamp';
9
+ import {
10
+ DEFAULT_MAX_MONTHS,
11
+ DEFAULT_MAX_SUM,
12
+ DEFAULT_MIN_MONTHS,
13
+ DEFAULT_MIN_SUM,
14
+ DEFAULT_MONTHS,
15
+ DEFAULT_SUM,
16
+ MONTHS_IN_YEAR,
17
+ } from './constants';
18
+ import { CreditCalculatorContent } from './CreditCalculatorContent';
19
+ import { getCalculatorParams } from './getCalculatorParams';
20
+ import { getCreditRate } from './getCreditRate';
21
+ import { getCreditTermYears } from './getCreditTermYears';
22
+ import { getMonthlyPayment } from './getMonthlyPayment';
7
23
 
8
- export interface CreditCalculatorProps extends UniBlockProps {}
24
+ export interface CreditCalculatorProps extends CreditCalculatorContent, UniBlockProps {}
25
+
26
+ const STEP_MONEY = 1000;
27
+ const STEP_MONTHS = 1;
28
+ const DEFAULT_PAYMENT_TYPE = 'annuity';
9
29
 
10
30
  const borderStyle = 'border-solid border-3 border-primary-main rounded-md';
11
31
 
12
- const MIN_MONEY = 50000;
13
- const MAX_MONEY = 3000000;
14
- const STEP_MONEY = 1000;
32
+ export const CreditCalculator = JSX<CreditCalculatorProps>(
33
+ ({ context, className, directoryName }) => {
34
+ const [moneyValue, setMoneyValue] = context.useState<number | undefined>(undefined);
35
+ const [monthsValue, setMonthsValue] = context.useState<number | undefined>(undefined);
36
+ const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
37
+ const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
15
38
 
16
- const CREDIT_TERM_YEARS = [2, 3, 4, 5, 6, 7];
39
+ const tableRows = useCreditCalculatorData(context.useAsyncData, directoryName).rows;
17
40
 
18
- const MIN_MONTHS = 1;
19
- const MAX_MONTHS = 84;
20
- const STEP_MONTHS = 1;
41
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuityChecked });
21
42
 
22
- const MONTHS_IN_YEAR = 12;
43
+ const defaultSum =
44
+ calculatorParams.maxSum && calculatorParams.minSum
45
+ ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
46
+ : DEFAULT_SUM;
23
47
 
24
- export const CreditCalculator = JSX<CreditCalculatorProps>(({ context, className }) => {
25
- const [moneyValue, setMoneyValue] = context.useState(350000);
26
- const [monthsValue, setMonthsValue] = context.useState(12);
27
- const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
28
- const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
48
+ const defaultMonths =
49
+ calculatorParams.maxMonths && calculatorParams.minMonths
50
+ ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
51
+ : DEFAULT_MONTHS;
29
52
 
30
- const handleButtonClick = (value: number) => {
31
- setMonthsValue(clamp(value * MONTHS_IN_YEAR, MIN_MONTHS, MAX_MONTHS));
32
- };
53
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
54
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
55
+ const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
56
+ const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
33
57
 
34
- return (
35
- <section className={`font-sans text-primary-text bg-white p-4 ${className}`}>
36
- <div className={`box-border p-12 flex flex-col justify-between ${borderStyle}`}>
37
- <div className="flex justify-between">
38
- <div className="grow mr-11">
39
- <InputRange
40
- title="Желаемая сумма кредита, ₽"
41
- items={['От 50 000 рублей', 'До 3 000 000 рублей']}
42
- min={MIN_MONEY}
43
- max={MAX_MONEY}
44
- step={STEP_MONEY}
45
- value={moneyValue}
46
- onChange={setMoneyValue}
47
- />
48
- <InputRange
49
- title="Срок кредита, месяцев"
50
- items={['Или выберите из предложенных вариантов ниже']}
51
- min={MIN_MONTHS}
52
- max={MAX_MONTHS}
53
- step={STEP_MONTHS}
54
- value={monthsValue}
55
- onChange={setMonthsValue}
56
- />
57
- <div className="flex mb-7">
58
- {CREDIT_TERM_YEARS.map((number, i) => renderButton(number, i, handleButtonClick))}
58
+ const rate = getCreditRate({ calculatorParams, isInsurance: isInsuranceChecked });
59
+
60
+ const montlyPayment = getMonthlyPayment({
61
+ calculatorParams,
62
+ paymentType: DEFAULT_PAYMENT_TYPE,
63
+ rate,
64
+ sum: moneyValue || defaultSum,
65
+ months: monthsValue || defaultMonths,
66
+ });
67
+
68
+ const creditTermYears = getCreditTermYears(minMonths, maxMonths);
69
+
70
+ function handleButtonClick(value: number) {
71
+ setMonthsValue(clamp(value * MONTHS_IN_YEAR, minMonths, maxMonths));
72
+ }
73
+
74
+ return (
75
+ <section className={`font-sans text-primary-text bg-white p-4 ${className}`}>
76
+ <div className={`box-border p-12 flex flex-col justify-between ${borderStyle}`}>
77
+ <div className="flex justify-between">
78
+ <div className="grow mr-11">
79
+ <InputRange
80
+ title="Желаемая сумма кредита, ₽"
81
+ items={[
82
+ `От ${addSpacesBetweenNumbers(minSum)} рублей`,
83
+ `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
84
+ ]}
85
+ min={minSum}
86
+ max={maxSum}
87
+ step={STEP_MONEY}
88
+ value={moneyValue || defaultSum}
89
+ onChange={setMoneyValue}
90
+ />
91
+ <InputRange
92
+ title="Срок кредита, месяцев"
93
+ items={['Или выберите из предложенных вариантов ниже']}
94
+ min={minMonths}
95
+ max={maxMonths}
96
+ step={STEP_MONTHS}
97
+ value={monthsValue || defaultMonths}
98
+ onChange={setMonthsValue}
99
+ />
100
+ <div className="flex mb-7">
101
+ {creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick))}
102
+ </div>
103
+ <Checkbox
104
+ text="Получаю пенсию на карту Россельхозбанка"
105
+ checked={isAnnuityChecked}
106
+ onChange={setIsAnnuityChecked}
107
+ />
108
+ <Checkbox
109
+ className="mb-4"
110
+ text="Комплексная страховая защита"
111
+ checked={isInsuranceChecked}
112
+ onChange={setIsInsuranceChecked}
113
+ />
114
+ </div>
115
+ <div className="p-9 bg-primary-main rounded-md text-white">
116
+ <div className="text-base mb-5">Наше предложение</div>
117
+ <div className="text-sm opacity-60">Ежемесячный платёж</div>
118
+ <div className="text-lg mb-3">
119
+ {addSpacesBetweenNumbers(Math.round(montlyPayment))} ₽
120
+ </div>
121
+ <div className="text-sm opacity-60">Ставка</div>
122
+ <div className="text-lg">{rate} %</div>
59
123
  </div>
60
- <Checkbox
61
- text="Получаю пенсию на карту Россельхозбанка"
62
- checked={isAnnuityChecked}
63
- onChange={setIsAnnuityChecked}
64
- />
65
- <Checkbox
66
- className="mb-4"
67
- text="Комплексная страховая защита"
68
- checked={isInsuranceChecked}
69
- onChange={setIsInsuranceChecked}
70
- />
71
- </div>
72
- <div className="p-9 bg-primary-main rounded-md text-white">
73
- <div className="text-base mb-5">Наше предложение</div>
74
- <div className="text-sm opacity-60">Ежемесячный платёж</div>
75
- <div className="text-lg mb-3">26 827 ₽</div>
76
- <div className="text-sm opacity-60">Ставка</div>
77
- <div className="text-lg">16,9 %</div>
78
124
  </div>
79
- </div>
80
- <div className="flex items-center">
81
- <Button className="mr-3" text="Отправить заявку" version="primary" href="#" />
82
- <div
83
- className="w-80 text-xxs leading-4 text-secondary-text"
84
- aria-label="Соглашение на обработку персональных данных"
85
- >
86
- Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
87
- требованиям ФЗ «О персональных данных»
125
+ <div className="flex items-center">
126
+ <Button className="mr-3" text="Отправить заявку" version="primary" href="#" />
127
+ <div
128
+ className="w-80 text-xxs leading-4 text-secondary-text"
129
+ aria-label="Соглашение на обработку персональных данных"
130
+ >
131
+ Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
132
+ требованиям ФЗ «О персональных данных»
133
+ </div>
88
134
  </div>
89
135
  </div>
90
- </div>
91
- </section>
92
- );
93
- });
94
-
95
- const renderButton = (number: number, i: number, handleClick: (number: number) => void) => (
96
- <div
97
- key={String(i)}
98
- className="bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer"
99
- role="button"
100
- onClick={() => handleClick(number)}
101
- >
102
- <span className="font-medium text-sm">
103
- {number} {number > 4 ? 'лет' : 'года'}
104
- </span>
105
- </div>
136
+ </section>
137
+ );
138
+ },
106
139
  );
140
+
141
+ function renderButton(number: number, i: number, handleClick: (number: number) => void) {
142
+ return (
143
+ <button
144
+ key={String(i)}
145
+ className="bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none"
146
+ onClick={() => handleClick(number)}
147
+ >
148
+ <span className="font-semibold text-sm">
149
+ {number} {number === 1 ? 'год' : number > 4 ? 'лет' : 'года'}
150
+ </span>
151
+ </button>
152
+ );
153
+ }
@@ -0,0 +1,17 @@
1
+ export interface CalculatorParams {
2
+ isAnnuity?: boolean;
3
+ minSum?: number;
4
+ maxSum?: number;
5
+ minMonths?: number;
6
+ maxMonths?: number;
7
+ rateWithInsurance?: number;
8
+ rateWithoutInsurance?: number;
9
+ }
10
+
11
+ export interface CreditCalculatorData {
12
+ rows?: CalculatorParams[];
13
+ }
14
+
15
+ export interface CreditCalculatorContent {
16
+ directoryName?: string;
17
+ }
@@ -0,0 +1,8 @@
1
+ export const DEFAULT_MIN_SUM = 30000;
2
+ export const DEFAULT_MAX_SUM = 3000000;
3
+ export const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
4
+ export const DEFAULT_MIN_MONTHS = 1;
5
+ export const DEFAULT_MAX_MONTHS = 84;
6
+ export const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
7
+
8
+ export const MONTHS_IN_YEAR = 12;
@@ -0,0 +1,16 @@
1
+ import { CalculatorParams } from './CreditCalculatorContent';
2
+
3
+ interface GetCalculatorParamsParams {
4
+ tableRows?: CalculatorParams[];
5
+ isAnnuity?: boolean;
6
+ }
7
+
8
+ export const getCalculatorParams = (params: GetCalculatorParamsParams) => {
9
+ const { tableRows, isAnnuity = false } = params;
10
+
11
+ if (!tableRows) return {};
12
+
13
+ const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
14
+
15
+ return calculatorParams || {};
16
+ };
@@ -0,0 +1,18 @@
1
+ import { CalculatorParams } from './CreditCalculatorContent';
2
+
3
+ const DEFAULT_RATE = 5;
4
+
5
+ interface GetCreditRateParams {
6
+ calculatorParams?: CalculatorParams;
7
+ isInsurance: boolean;
8
+ }
9
+
10
+ export const getCreditRate = (params: GetCreditRateParams) => {
11
+ const { calculatorParams, isInsurance } = params;
12
+
13
+ if (!calculatorParams) return DEFAULT_RATE;
14
+
15
+ return isInsurance
16
+ ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
17
+ : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
18
+ };
@@ -0,0 +1,10 @@
1
+ import { getCreditTermYears } from './getCreditTermYears';
2
+
3
+ describe('getCreditTermYears', () => {
4
+ it('should return array starts from min year plus one and ends with max year', () => {
5
+ const minMonths = 12;
6
+ const maxMonths = 96;
7
+ const items = [2, 3, 4, 5, 6, 8];
8
+ expect(getCreditTermYears(minMonths, maxMonths)).toEqual(items);
9
+ });
10
+ });
@@ -0,0 +1,15 @@
1
+ import { MONTHS_IN_YEAR } from './constants';
2
+
3
+ const MAX_YEARS_LENGTH = 5;
4
+
5
+ export const getCreditTermYears = (minMonths: number, maxMonths: number) => {
6
+ const totalYears = Math.ceil((maxMonths - minMonths) / 12);
7
+ const firstYear = Math.floor(minMonths / MONTHS_IN_YEAR) + 1;
8
+
9
+ const result = new Array(Math.min(totalYears - 1, MAX_YEARS_LENGTH))
10
+ .fill(0)
11
+ .map((_, i) => firstYear + i);
12
+
13
+ const maxYear = totalYears + firstYear - 1;
14
+ return result.concat(maxYear);
15
+ };
@@ -0,0 +1,32 @@
1
+ import { clamp } from '../../utils/clamp';
2
+ import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM, MONTHS_IN_YEAR } from './constants';
3
+ import { CalculatorParams } from './CreditCalculatorContent';
4
+
5
+ type PaymentType = 'annuity' | 'differentiated';
6
+
7
+ interface GetMonthlyPaymentParams {
8
+ calculatorParams?: CalculatorParams;
9
+ paymentType: PaymentType;
10
+ rate: number;
11
+ sum: number;
12
+ months: number;
13
+ }
14
+
15
+ export const getMonthlyPayment = (params: GetMonthlyPaymentParams) => {
16
+ const { calculatorParams, paymentType, rate, sum, months } = params;
17
+
18
+ if (!calculatorParams) return 0;
19
+
20
+ const finalSum = clamp(
21
+ sum,
22
+ calculatorParams.minSum || DEFAULT_MIN_SUM,
23
+ calculatorParams.maxSum || DEFAULT_MAX_SUM,
24
+ );
25
+
26
+ if (paymentType === 'annuity') {
27
+ const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
28
+ return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
29
+ } else {
30
+ return finalSum / months + finalSum * (Number(rate) / 12);
31
+ }
32
+ };
@@ -188,7 +188,7 @@ export default (
188
188
  ],
189
189
  },
190
190
  ]}
191
- socialMedia={[{ href: 'https://vk.com' }, { href: 'https://ok.ru' }, { href: 'https://t.me' }]}
191
+ socialMedia={[{ href: 'https://t.me' }, { href: 'https://vk.com' }, { href: 'https://ok.ru' }]}
192
192
  contacts={[
193
193
  {
194
194
  text: '+7 (495) 787-7-787',
@@ -6,10 +6,22 @@ import type { IconName } from '../../ui-kit/Icon/IconProps';
6
6
  import { useLink } from '../../hooks/useLink';
7
7
  import { Button } from '../../ui-kit/Button/Button';
8
8
 
9
- const ICONS_MAP: Array<{ origins: string[]; icon: IconName; label: string }> = [
10
- { origins: ['t.me', 'telegram.org'], icon: 'TelegramIcon', label: 'Телеграм' },
11
- { origins: ['vk.com'], icon: 'VKIcon', label: 'ВКонтакте' },
12
- { origins: ['ok.ru'], icon: 'OkIcon', label: 'Одноклассники' },
9
+ const ICONS_MAP: Array<{
10
+ origins: string[];
11
+ icon: IconName;
12
+ label: string;
13
+ width: string;
14
+ height: string;
15
+ }> = [
16
+ {
17
+ origins: ['t.me', 'telegram.org'],
18
+ icon: 'TelegramIcon',
19
+ label: 'Телеграм',
20
+ width: '20px',
21
+ height: '16px',
22
+ },
23
+ { origins: ['vk.com'], icon: 'VKIcon', label: 'ВКонтакте', width: '24px', height: '12px' },
24
+ { origins: ['ok.ru'], icon: 'OkIcon', label: 'Одноклассники', width: '12px', height: '20px' },
13
25
  ];
14
26
 
15
27
  export interface SocialMediaProps extends UniBlockProps {
@@ -33,7 +45,7 @@ interface MediaButtonProps {
33
45
  }
34
46
 
35
47
  const MediaButton = JSX<MediaButtonProps>(({ href }) => {
36
- const { icon, label } =
48
+ const { icon, label, width, height } =
37
49
  ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
38
50
 
39
51
  if (!icon) return null;
@@ -45,8 +57,15 @@ const MediaButton = JSX<MediaButtonProps>(({ href }) => {
45
57
  target="_blank"
46
58
  rel="noopener noreferrer"
47
59
  aria-label={label}
48
- className="border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:text-primary-main"
49
- appendLeft={<Icon name={icon} />}
60
+ className="border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:fill-primary-main"
61
+ appendLeft={
62
+ <Icon
63
+ name={icon}
64
+ width={width}
65
+ height={height}
66
+ className="[&>*]:fill-primary-text [&>*]:hover:fill-primary-main"
67
+ />
68
+ }
50
69
  />
51
70
  );
52
71
  });
@@ -45,10 +45,14 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
45
45
  <Icon name="ProfileIcon" aria-hidden="true" />
46
46
  </HeaderSecondaryMenuButton>
47
47
  <HeaderSecondaryMenuButton
48
- className="mr-5 text-secondary-light hover:text-secondary-active min-w-[32px] min-h-[32px]"
48
+ className="mr-5 text-secondary-light hover:text-primary-main min-w-[32px] min-h-[32px]"
49
49
  ariaLabel="Дополнительные ссылки"
50
50
  >
51
- <Icon name="GridIcon" aria-hidden="true" />
51
+ <Icon
52
+ name="GridIcon"
53
+ aria-hidden="true"
54
+ className="[&>*]:fill-secondary-light [&>*]:hover:fill-primary-main"
55
+ />
52
56
  </HeaderSecondaryMenuButton>
53
57
  </div>
54
58
  );
@@ -0,0 +1,23 @@
1
+ import type { AsyncDataHook } from '../components/ContentPage/ContentPageContext';
2
+ import { CreditCalculatorData } from '../components/CreditCalculator/CreditCalculatorContent';
3
+
4
+ export function useCreditCalculatorData(
5
+ useAsyncData: AsyncDataHook,
6
+ directoryName: string | undefined,
7
+ ): CreditCalculatorData {
8
+ const { data } = useAsyncData(creditCalculatorUrl(directoryName), () =>
9
+ fetchCreditCalculatorData(directoryName),
10
+ );
11
+ return data || {};
12
+ }
13
+
14
+ async function fetchCreditCalculatorData(
15
+ directoryName: string | undefined,
16
+ ): Promise<CreditCalculatorData> {
17
+ const response = await fetch(creditCalculatorUrl(directoryName));
18
+ return await response.json();
19
+ }
20
+
21
+ function creditCalculatorUrl(directoryName: string | undefined) {
22
+ return `/wcms-resources/${directoryName || 'credit-calculator-data'}.json`;
23
+ }
@@ -1,4 +1,5 @@
1
1
  <svg
2
+ id="icon"
2
3
  width="48"
3
4
  height="48"
4
5
  viewBox="0 0 70 70"
@@ -1 +1 @@
1
- <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 24"><path d="M18.406 12.761c-.023-3.028 2.793-4.511 2.93-4.572-1.603-2.073-4.075-2.357-4.968-2.377-2.083-.204-4.098 1.117-5.174 1.117-1.076 0-2.725-1.097-4.488-1.056-2.266.04-4.395 1.198-5.563 3.007-2.404 3.698-.618 9.124 1.694 12.09 1.145 1.464 2.496 3.09 4.259 3.028 1.717-.06 2.358-.975 4.441-.975 2.06 0 2.656.975 4.465.935 1.854-.02 3.022-1.463 4.12-2.947 1.329-1.666 1.855-3.332 1.878-3.413 0 0-3.549-1.2-3.594-4.837Zm-3.389-8.92c.916-1.037 1.557-2.419 1.374-3.841-1.35.061-3.022.833-3.984 1.829-.847.894-1.625 2.337-1.42 3.698 1.512.102 3.069-.67 4.03-1.686Z" fill="#42AB44"/></svg>
1
+ <svg id="icon" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 24"><path d="M18.406 12.761c-.023-3.028 2.793-4.511 2.93-4.572-1.603-2.073-4.075-2.357-4.968-2.377-2.083-.204-4.098 1.117-5.174 1.117-1.076 0-2.725-1.097-4.488-1.056-2.266.04-4.395 1.198-5.563 3.007-2.404 3.698-.618 9.124 1.694 12.09 1.145 1.464 2.496 3.09 4.259 3.028 1.717-.06 2.358-.975 4.441-.975 2.06 0 2.656.975 4.465.935 1.854-.02 3.022-1.463 4.12-2.947 1.329-1.666 1.855-3.332 1.878-3.413 0 0-3.549-1.2-3.594-4.837Zm-3.389-8.92c.916-1.037 1.557-2.419 1.374-3.841-1.35.061-3.022.833-3.984 1.829-.847.894-1.625 2.337-1.42 3.698 1.512.102 3.069-.67 4.03-1.686Z" fill="#42AB44"/></svg>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
1
+ <svg id="icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
2
2
  <path
3
3
  stroke="#1C1C1C"
4
4
  stroke-linecap="round"
@@ -1,4 +1,5 @@
1
1
  <svg
2
+ id='icon'
2
3
  width="70"
3
4
  height="70"
4
5
  viewBox="0 0 70 70"
@@ -1,4 +1,5 @@
1
1
  <svg
2
+ id="icon"
2
3
  width="70"
3
4
  height="70"
4
5
  viewBox="0 0 70 70"
@@ -1,4 +1,4 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg id="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path
3
3
  d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z"
4
4
  fill="#46B448"
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
1
+ <svg id="icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
2
2
  <path
3
3
  stroke="#292D32"
4
4
  stroke-linecap="round"
@@ -1,4 +1,4 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg id="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path
3
3
  d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z"
4
4
  fill="#3060BF"