@redneckz/wildless-cms-uni-blocks 0.14.832 → 0.14.834

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 (225) hide show
  1. package/bin/migration-scripts/{0.14.828.js → 0.14.832.js} +3 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +29 -80
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
  6. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -0
  7. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -2
  8. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
  9. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +5 -10
  10. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  11. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -0
  12. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.js +7 -0
  13. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
  14. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -2
  15. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +4 -4
  16. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  17. package/dist/components/Blocks.js +0 -6
  18. package/dist/components/Blocks.js.map +1 -1
  19. package/dist/components/Blocks.mobile.js +0 -4
  20. package/dist/components/Blocks.mobile.js.map +1 -1
  21. package/dist/components/ProductBlock/ProductBlock.js +1 -1
  22. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  23. package/dist/retail/content.js +10 -0
  24. package/dist/retail/content.js.map +1 -1
  25. package/dist/retail/utils/calculateInputs.js +2 -0
  26. package/dist/retail/utils/calculateInputs.js.map +1 -1
  27. package/lib/common.css +1 -1
  28. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
  29. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -6
  30. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  31. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -0
  32. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.js +6 -1
  33. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
  34. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -2
  35. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
  36. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  37. package/lib/components/Blocks.js +0 -6
  38. package/lib/components/Blocks.js.map +1 -1
  39. package/lib/components/Blocks.mobile.js +0 -4
  40. package/lib/components/Blocks.mobile.js.map +1 -1
  41. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +0 -2
  42. package/lib/components/ProductBlock/ProductBlock.js +1 -1
  43. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  44. package/lib/retail/content.js +10 -0
  45. package/lib/retail/content.js.map +1 -1
  46. package/lib/retail/utils/calculateInputs.js +2 -0
  47. package/lib/retail/utils/calculateInputs.js.map +1 -1
  48. package/mobile/bundle/bundle.umd.js +29 -40
  49. package/mobile/bundle/bundle.umd.min.js +1 -1
  50. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
  51. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -0
  52. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -2
  53. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
  54. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +5 -10
  55. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  56. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -0
  57. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.js +7 -0
  58. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
  59. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -2
  60. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +4 -4
  61. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  62. package/mobile/dist/components/Blocks.js +0 -4
  63. package/mobile/dist/components/Blocks.js.map +1 -1
  64. package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -1
  65. package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  66. package/mobile/dist/retail/content.js +10 -0
  67. package/mobile/dist/retail/content.js.map +1 -1
  68. package/mobile/dist/retail/utils/calculateInputs.js +2 -0
  69. package/mobile/dist/retail/utils/calculateInputs.js.map +1 -1
  70. package/mobile/lib/common.css +1 -1
  71. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +0 -5
  72. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -6
  73. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  74. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -0
  75. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.js +6 -1
  76. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.js.map +1 -1
  77. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -2
  78. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
  79. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  80. package/mobile/lib/components/Blocks.js +0 -4
  81. package/mobile/lib/components/Blocks.js.map +1 -1
  82. package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -1
  83. package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  84. package/mobile/lib/retail/content.js +10 -0
  85. package/mobile/lib/retail/content.js.map +1 -1
  86. package/mobile/lib/retail/utils/calculateInputs.js +2 -0
  87. package/mobile/lib/retail/utils/calculateInputs.js.map +1 -1
  88. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +5 -7
  89. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +6 -0
  90. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -2
  91. package/mobile/src/components/Blocks.ts +0 -4
  92. package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -11
  93. package/mobile/src/components/ProductBlock/ProductBlock.tsx +0 -1
  94. package/mobile/src/retail/content.tsx +10 -0
  95. package/mobile/src/retail/utils/calculateInputs.ts +4 -0
  96. package/package.json +1 -1
  97. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +5 -7
  98. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +6 -0
  99. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -2
  100. package/src/components/Blocks.mobile.ts +0 -4
  101. package/src/components/Blocks.ts +0 -6
  102. package/src/components/ProductBlock/ProductBlock.example.json +1 -11
  103. package/src/components/ProductBlock/ProductBlock.fixture.tsx +0 -28
  104. package/src/components/ProductBlock/ProductBlock.tsx +0 -1
  105. package/src/icons/IconName.ts +4 -4
  106. package/src/retail/content.tsx +10 -0
  107. package/src/retail/utils/calculateInputs.ts +4 -0
  108. package/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +0 -5
  109. package/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +0 -43
  110. package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +0 -5
  111. package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +0 -18
  112. package/bundle/components/UnitBlock/UnitBlock.d.ts +0 -6
  113. package/bundle/components/UnitBlock/UnitBlockContent.d.ts +0 -6
  114. package/dist/components/InvestmentInfo/InvestmentInfo.d.ts +0 -5
  115. package/dist/components/InvestmentInfo/InvestmentInfo.js +0 -47
  116. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +0 -1
  117. package/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +0 -43
  118. package/dist/components/InvestmentInfo/InvestmentInfoContent.js +0 -2
  119. package/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +0 -1
  120. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +0 -5
  121. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +0 -26
  122. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +0 -1
  123. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +0 -18
  124. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +0 -2
  125. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +0 -1
  126. package/dist/components/UnitBlock/UnitBlock.d.ts +0 -6
  127. package/dist/components/UnitBlock/UnitBlock.js +0 -11
  128. package/dist/components/UnitBlock/UnitBlock.js.map +0 -1
  129. package/dist/components/UnitBlock/UnitBlockContent.d.ts +0 -6
  130. package/dist/components/UnitBlock/UnitBlockContent.js +0 -2
  131. package/dist/components/UnitBlock/UnitBlockContent.js.map +0 -1
  132. package/lib/components/InvestmentInfo/InvestmentInfo.d.ts +0 -5
  133. package/lib/components/InvestmentInfo/InvestmentInfo.fixture.d.ts +0 -7
  134. package/lib/components/InvestmentInfo/InvestmentInfo.js +0 -45
  135. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +0 -1
  136. package/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +0 -43
  137. package/lib/components/InvestmentInfo/InvestmentInfoContent.js +0 -2
  138. package/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +0 -1
  139. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +0 -5
  140. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.d.ts +0 -5
  141. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.mobile.d.ts +0 -5
  142. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +0 -24
  143. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +0 -1
  144. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +0 -18
  145. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +0 -2
  146. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +0 -1
  147. package/lib/components/UnitBlock/UnitBlock.d.ts +0 -6
  148. package/lib/components/UnitBlock/UnitBlock.fixture.d.ts +0 -6
  149. package/lib/components/UnitBlock/UnitBlock.fixture.mobile.d.ts +0 -6
  150. package/lib/components/UnitBlock/UnitBlock.js +0 -9
  151. package/lib/components/UnitBlock/UnitBlock.js.map +0 -1
  152. package/lib/components/UnitBlock/UnitBlockContent.d.ts +0 -6
  153. package/lib/components/UnitBlock/UnitBlockContent.js +0 -2
  154. package/lib/components/UnitBlock/UnitBlockContent.js.map +0 -1
  155. package/mobile/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +0 -5
  156. package/mobile/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +0 -43
  157. package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +0 -5
  158. package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +0 -18
  159. package/mobile/bundle/components/UnitBlock/UnitBlock.d.ts +0 -6
  160. package/mobile/bundle/components/UnitBlock/UnitBlockContent.d.ts +0 -6
  161. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.d.ts +0 -5
  162. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +0 -47
  163. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +0 -1
  164. package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +0 -43
  165. package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js +0 -2
  166. package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +0 -1
  167. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +0 -5
  168. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +0 -26
  169. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +0 -1
  170. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +0 -18
  171. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +0 -2
  172. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +0 -1
  173. package/mobile/dist/components/UnitBlock/UnitBlock.d.ts +0 -6
  174. package/mobile/dist/components/UnitBlock/UnitBlock.js +0 -11
  175. package/mobile/dist/components/UnitBlock/UnitBlock.js.map +0 -1
  176. package/mobile/dist/components/UnitBlock/UnitBlockContent.d.ts +0 -6
  177. package/mobile/dist/components/UnitBlock/UnitBlockContent.js +0 -2
  178. package/mobile/dist/components/UnitBlock/UnitBlockContent.js.map +0 -1
  179. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.d.ts +0 -5
  180. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +0 -45
  181. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +0 -1
  182. package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +0 -43
  183. package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js +0 -2
  184. package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +0 -1
  185. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +0 -5
  186. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +0 -24
  187. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +0 -1
  188. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +0 -18
  189. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +0 -2
  190. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +0 -1
  191. package/mobile/lib/components/UnitBlock/UnitBlock.d.ts +0 -6
  192. package/mobile/lib/components/UnitBlock/UnitBlock.js +0 -9
  193. package/mobile/lib/components/UnitBlock/UnitBlock.js.map +0 -1
  194. package/mobile/lib/components/UnitBlock/UnitBlockContent.d.ts +0 -6
  195. package/mobile/lib/components/UnitBlock/UnitBlockContent.js +0 -2
  196. package/mobile/lib/components/UnitBlock/UnitBlockContent.js.map +0 -1
  197. package/mobile/src/components/InvestmentInfo/InvestmentInfo.example.json +0 -53
  198. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +0 -131
  199. package/mobile/src/components/InvestmentInfo/InvestmentInfo.ui.json +0 -13
  200. package/mobile/src/components/InvestmentInfo/InvestmentInfoContent.ts +0 -51
  201. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +0 -14
  202. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +0 -94
  203. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +0 -24
  204. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +0 -22
  205. package/mobile/src/components/UnitBlock/UnitBlock.example.json +0 -9
  206. package/mobile/src/components/UnitBlock/UnitBlock.tsx +0 -17
  207. package/mobile/src/components/UnitBlock/UnitBlock.ui.json +0 -1
  208. package/mobile/src/components/UnitBlock/UnitBlockContent.ts +0 -7
  209. package/src/components/InvestmentInfo/InvestmentInfo.example.json +0 -53
  210. package/src/components/InvestmentInfo/InvestmentInfo.fixture.tsx +0 -109
  211. package/src/components/InvestmentInfo/InvestmentInfo.tsx +0 -131
  212. package/src/components/InvestmentInfo/InvestmentInfo.ui.json +0 -13
  213. package/src/components/InvestmentInfo/InvestmentInfoContent.ts +0 -51
  214. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +0 -14
  215. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.mobile.tsx +0 -47
  216. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.tsx +0 -47
  217. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +0 -94
  218. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +0 -24
  219. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +0 -22
  220. package/src/components/UnitBlock/UnitBlock.example.json +0 -9
  221. package/src/components/UnitBlock/UnitBlock.fixture.mobile.tsx +0 -27
  222. package/src/components/UnitBlock/UnitBlock.fixture.tsx +0 -27
  223. package/src/components/UnitBlock/UnitBlock.tsx +0 -17
  224. package/src/components/UnitBlock/UnitBlock.ui.json +0 -1
  225. package/src/components/UnitBlock/UnitBlockContent.ts +0 -7
@@ -1,109 +0,0 @@
1
- import '../../setup-fixture';
2
-
3
- import { InvestmentInfo } from './InvestmentInfo';
4
- import { type InvestmentInfoContent } from './InvestmentInfoContent';
5
-
6
- export const INVESTMENT_INFO: InvestmentInfoContent = {
7
- __html: `
8
- <ul>
9
- <li>Пример с ежегодным взносом 400 000 ₽</li>
10
- <li>Срок использования ИИС вы определяете сами. Но для получения налоговых вычетов он должен быть открыт не менее 3 лет</li>
11
- <li>Вы можете возвращать до 52 000 ₽ каждый год</li>
12
- </ul>
13
- `,
14
- investmentZeroColumn: {
15
- title: 'Открытие ИИС',
16
- },
17
- investmentColumns: [
18
- {
19
- title: '1 января года, следующего за годом открытия ИИС',
20
- cells: [
21
- {
22
- text: 'Потенциальный доход инвестиций',
23
- cellColor: 'green-light',
24
- },
25
- {
26
- text: 'Первый взнос 400 000 ₽',
27
- cellColor: 'green-dark',
28
- cellSize: 'S',
29
- },
30
- ],
31
- },
32
- {
33
- title: '1 января второго года после открытия ИИС',
34
- cells: [
35
- {
36
- text: 'Налоговый вычет за 1 год 52 000 ₽',
37
- cellColor: 'yellow',
38
- },
39
- {
40
- text: 'Потенциальный доход инвестиций за 2 года',
41
- cellColor: 'green-light',
42
- cellSize: 'S',
43
- },
44
- {
45
- text: 'Второй взнос 400 000 ₽',
46
- cellColor: 'green',
47
- cellSize: 'S',
48
- },
49
- {
50
- text: 'Первый взнос 400 000 ₽',
51
- cellColor: 'green-dark',
52
- cellSize: 'S',
53
- },
54
- ],
55
- },
56
- {
57
- title: '1 января третьего года после открытия ИИС',
58
- cells: [
59
- {
60
- text: 'Налоговый вычет за 2 год 52 000 ₽',
61
- cellColor: 'yellow',
62
- },
63
- {
64
- text: 'Потенциальный доход инвестиций за 3 года',
65
- cellColor: 'green-light',
66
- cellSize: 'M',
67
- },
68
- {
69
- text: 'Третий взнос — 0 ₽',
70
- cellColor: 'green',
71
- cellSize: 'S',
72
- },
73
- {
74
- text: 'Первый и второй взносы 800 000 ₽',
75
- cellColor: 'green-dark',
76
- cellSize: 'L',
77
- },
78
- ],
79
- },
80
- {
81
- title: 'Возможный вывод средств, закрытие ИИС',
82
- cells: [
83
- {
84
- text: 'Налоговый вычет за 3 года 156 000 ₽',
85
- cellColor: 'yellow',
86
- cellSize: 'S',
87
- },
88
- {
89
- text: 'Потенциальный доход инвестиций за 3 года',
90
- cellColor: 'green-light',
91
- cellSize: 'M',
92
- },
93
- {
94
- text: 'Сумма инвестиций за 3 года 1 200 000 ₽',
95
- cellColor: 'green-dark',
96
- cellSize: 'XL',
97
- },
98
- ],
99
- },
100
- ],
101
- };
102
-
103
- export default {
104
- default: (
105
- <div className="container grid grid-cols-12">
106
- <InvestmentInfo className="col-span-12" {...INVESTMENT_INFO} />
107
- </div>
108
- ),
109
- };
@@ -1,131 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
3
- import { RichText } from '../../ui-kit/RichText/RichText';
4
- import { Text } from '../../ui-kit/Text/Text';
5
- import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
6
- import { joinList } from '../../utils/joinList';
7
- import {
8
- type InvestmentCell,
9
- type InvestmentCellColor,
10
- type InvestmentCellSize,
11
- type InvestmentColumn,
12
- type InvestmentInfoContent,
13
- type InvestmentZeroColumn,
14
- } from './InvestmentInfoContent';
15
-
16
- const investmentCellColorMap: Record<InvestmentCellColor, string> = {
17
- yellow: 'bg-yellow',
18
- green: 'bg-green',
19
- 'green-light': 'bg-green-light',
20
- 'green-dark': 'bg-green-dark',
21
- };
22
-
23
- const investmentCellSizeMap: Record<InvestmentCellSize, string> = {
24
- XS: 'h-10',
25
- S: 'h-16',
26
- M: 'h-24',
27
- L: 'h-32',
28
- XL: 'h-52',
29
- };
30
-
31
- export interface InvestmentInfoProps extends InvestmentInfoContent, UniBlockProps {}
32
-
33
- export const InvestmentInfo = JSX<InvestmentInfoProps>((props) => {
34
- const {
35
- className = '',
36
- __html,
37
- isDotted,
38
- investmentZeroColumn,
39
- investmentColumns,
40
- ...rest
41
- } = props;
42
- const columns = investmentColumns ? [...investmentColumns] : [];
43
- if (investmentZeroColumn) {
44
- columns.unshift(investmentZeroColumn);
45
- }
46
-
47
- return (
48
- <BlockWrapper className={className} defaultPadding="p-4xl" {...rest}>
49
- <div className="container text-m font-light space-y-4xl">
50
- {columns?.length ? (
51
- <div>
52
- <div className="flex items-end relative pl-3xl pr-lg text-white">
53
- {joinList(<div className="w-px h-4 bg-gray" />)(columns.map(renderInvestmentColumn))}
54
- <div className="absolute right-3xl w-px h-4 bg-gray" />
55
- </div>
56
- <div className="border-t border-gray -mt-xs mx-3xl" />
57
- <div className="flex justify-between text-primary-text mt-s -mx-5xl">
58
- {columns.map(renderInvestmentColumnTitle)}
59
- </div>
60
- </div>
61
- ) : null}
62
- {__html ? (
63
- <div className="max-w-2xl font-light text-base">
64
- <RichText __html={__html} isDotted={isDotted} itemSize="list-s" />
65
- </div>
66
- ) : null}
67
- </div>
68
- </BlockWrapper>
69
- );
70
- });
71
-
72
- const renderInvestmentColumn = (
73
- column: InvestmentColumn | InvestmentZeroColumn,
74
- i: number,
75
- arr: Array<InvestmentColumn>,
76
- ) => {
77
- const isSecondColumn = i === 1;
78
- const isLastColumn = i === arr.length - 1;
79
- const reversedCells = column.cells?.reverse() || [];
80
-
81
- return (
82
- <div
83
- key={`column_${i}`}
84
- className={`${getColumnClasses(isSecondColumn, isLastColumn, column.cells)}`}
85
- >
86
- {reversedCells.length ? (
87
- <div
88
- className={`w-full ${
89
- isLastColumn ? 'border-4 border-green-more-dark p-1.5 min-w-72' : ''
90
- }`}
91
- >
92
- {reversedCells.map(renderInvestmentCell)}
93
- </div>
94
- ) : null}
95
- </div>
96
- );
97
- };
98
-
99
- const getColumnClasses = (
100
- isSecondColumn: boolean,
101
- isLastColumn: boolean,
102
- cells: InvestmentCell[] = [],
103
- ): string =>
104
- [
105
- cells.length ? 'flex-1' : 'flex-0',
106
- cells.length && !isSecondColumn && !isLastColumn ? 'pl-s' : '',
107
- cells.length && !isLastColumn ? 'pr-s pb-3xl' : 'pb-xl',
108
- ].join(' ');
109
-
110
- const renderInvestmentCell = (cell: InvestmentCell, i: number) => {
111
- const cellSize = cell.cellSize || 'XS';
112
- const cellColor = cell.cellColor || 'green';
113
-
114
- return cell.text ? (
115
- <div
116
- key={`cell_${i}`}
117
- className={`flex-1 flex items-center justify-center relative py-xs ${
118
- investmentCellSizeMap[cellSize]
119
- } ${investmentCellColorMap[cellColor]} ${cellSize === 'XS' ? 'px-s' : 'px-5xl'}`}
120
- >
121
- <Text align="text-center">{cell.text}</Text>
122
- </div>
123
- ) : null;
124
- };
125
-
126
- const renderInvestmentColumnTitle = (column: InvestmentColumn | InvestmentZeroColumn, i: number) =>
127
- column?.title ? (
128
- <div key={`title_${i}`} className="flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52">
129
- {column.title}
130
- </div>
131
- ) : null;
@@ -1,13 +0,0 @@
1
- {
2
- "content": {
3
- "__html": {
4
- "ui:widget": "html"
5
- }
6
- },
7
- "style": {
8
- "ui:options": {
9
- "minCols": 12,
10
- "maxCols": 12
11
- }
12
- }
13
- }
@@ -1,51 +0,0 @@
1
- import { type BulletsProps } from '../../model/Bullets';
2
- import { type TextProps, type TitleProps } from '../../model/HeadlineType';
3
- import { type RichTextProps } from '../../ui-kit/RichText/RichTextProps';
4
- import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
5
-
6
- /**
7
- * @title Цвет
8
- * @enumNames ["Оранжевый", "Светло-зеленый", "Зеленый", "Тёмно-зеленый"]
9
- */
10
- export type InvestmentCellColor = 'yellow' | 'green-light' | 'green' | 'green-dark';
11
-
12
- /**
13
- * @title Высота
14
- */
15
- export type InvestmentCellSize = 'XL' | 'L' | 'M' | 'S' | 'XS';
16
-
17
- /**
18
- * @title Ячейка
19
- */
20
- export type InvestmentCell = TextProps & {
21
- cellColor?: InvestmentCellColor;
22
- cellSize?: InvestmentCellSize;
23
- };
24
-
25
- /**
26
- * @title Элемент данных 1
27
- */
28
- export type InvestmentZeroColumn = TitleProps & {
29
- /** @hidden */
30
- cells?: InvestmentCell[];
31
- };
32
-
33
- /**
34
- * @title Элемент данных
35
- */
36
- export type InvestmentColumn = TitleProps & {
37
- /** @title Ячейки */
38
- cells?: InvestmentCell[];
39
- };
40
-
41
- /**
42
- * @title Блок инвестиций
43
- */
44
- export type InvestmentInfoContent = UniBlockContent &
45
- RichTextProps &
46
- BulletsProps & {
47
- /** @title Элемент данных 1 */
48
- investmentZeroColumn?: InvestmentZeroColumn;
49
- /** @title Остальные элементы данных */
50
- investmentColumns?: InvestmentColumn[];
51
- };
@@ -1,14 +0,0 @@
1
- {
2
- "content": {
3
- "version": "primary",
4
- "padding": "",
5
- "title": "Заголовок",
6
- "description": "Описание",
7
- "__html": "<p>Описание</p>",
8
- "richVersion": "",
9
- "button": {
10
- "text": "Информация о регионе",
11
- "version": "link"
12
- }
13
- }
14
- }
@@ -1,47 +0,0 @@
1
- import '../../setup-fixture';
2
-
3
- import { type Picture } from '../../model/Picture';
4
- import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
5
- import { RepresentativeOfficeInfo } from './RepresentativeOfficeInfo';
6
-
7
- const BUTTON: LinkButtonContent = {
8
- text: 'Информация о регионе',
9
- target: '_blank',
10
- version: 'secondary',
11
- icon: { icon: 'ArrowTopRightIcon', iconVersion: 'color' },
12
- };
13
-
14
- const ICON: Picture = {
15
- icon: 'BelarusianFlag',
16
- iconVersion: 'color',
17
- };
18
-
19
- const DESCRIPTION = `
20
- <p><strong>Представительство АО «Россельхозбанк» в Республике Беларусь (г. Минск) зарегистрировано в октябре 2008 года</strong></p>
21
- <br>
22
- <p class="text-slate-600/50 mb-s">Основными задачи Представительства</p>
23
- <ul>
24
- <li>установление и развитие деловых связей с белорусскими финансовыми институтами и компаниями АПК для реализации совместных проектов;</li>
25
- <li>организация взаимодействия с государственными органами власти и международными организациями, находящимися в Республике Беларусь;</li>
26
- <li>продвижение и сопровождение в Республике Беларусь российских инвестиционных проектов;</li>
27
- <li>мониторинг реализации двусторонних и многосторонних соглашений, участником которых является АО «Россельхозбанк».</li>
28
- </ul>
29
- `;
30
-
31
- export default {
32
- default: (
33
- <div className="container grid grid-cols-12">
34
- <RepresentativeOfficeInfo
35
- className="col-span-12"
36
- title="Представительство в Республике Беларусь"
37
- __html={DESCRIPTION}
38
- address="Республика Беларусь, 220004, г. Минск, ул. Немига, д. 40"
39
- telephone="(+375-17)-226-4578"
40
- email="prshbrb@mail.ru"
41
- button={BUTTON}
42
- icon={ICON}
43
- version="primary"
44
- />
45
- </div>
46
- ),
47
- };
@@ -1,47 +0,0 @@
1
- import '../../setup-fixture';
2
-
3
- import { type Picture } from '../../model/Picture';
4
- import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
5
- import { RepresentativeOfficeInfo } from './RepresentativeOfficeInfo';
6
-
7
- const BUTTON: LinkButtonContent = {
8
- text: 'Информация о регионе',
9
- target: '_blank',
10
- version: 'link',
11
- iconRight: { icon: 'ArrowTopRightIcon', iconVersion: 'color' },
12
- };
13
-
14
- const ICON: Picture = {
15
- icon: 'BelarusianFlag',
16
- iconVersion: 'color',
17
- };
18
-
19
- const DESCRIPTION = `
20
- <p><strong>Представительство АО «Россельхозбанк» в Республике Беларусь (г. Минск) зарегистрировано в октябре 2008 года</strong></p>
21
- <br>
22
- <p class="text-slate-600/50 mb-s">Основными задачи Представительства</p>
23
- <ul>
24
- <li>установление и развитие деловых связей с белорусскими финансовыми институтами и компаниями АПК для реализации совместных проектов;</li>
25
- <li>организация взаимодействия с государственными органами власти и международными организациями, находящимися в Республике Беларусь;</li>
26
- <li>продвижение и сопровождение в Республике Беларусь российских инвестиционных проектов;</li>
27
- <li>мониторинг реализации двусторонних и многосторонних соглашений, участником которых является АО «Россельхозбанк».</li>
28
- </ul>
29
- `;
30
-
31
- export default {
32
- default: (
33
- <div className="container grid grid-cols-12">
34
- <RepresentativeOfficeInfo
35
- className="col-span-6"
36
- title="Представительство в Республике Беларусь"
37
- __html={DESCRIPTION}
38
- address="Республика Беларусь, 220004, г. Минск, ул. Немига, д. 40"
39
- telephone="(+375-17)-226-4578"
40
- email="prshbrb@mail.ru"
41
- button={BUTTON}
42
- icon={ICON}
43
- version="primary"
44
- />
45
- </div>
46
- ),
47
- };
@@ -1,94 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { type IconName } from '../../icons/IconName';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
- import { Heading } from '../../ui-kit/Heading/Heading';
5
- import { Icon } from '../../ui-kit/Icon/Icon';
6
- import { Img } from '../../ui-kit/Img/Img';
7
- import { renderButtonsSection } from '../../ui-kit/LinkButton/renderButtonsSection';
8
- import { RichText } from '../../ui-kit/RichText/RichText';
9
- import { type RichTextProps } from '../../ui-kit/RichText/RichTextProps';
10
- import { Text } from '../../ui-kit/Text/Text';
11
- import { type TextColor } from '../../ui-kit/Text/TextProps';
12
- import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
13
- import { isIcon } from '../../utils/isIcon';
14
- import { style } from '../../utils/style';
15
- import { type RepresentativeOfficeInfoContent } from './RepresentativeOfficeInfoContent';
16
-
17
- export interface RepresentativeOfficeInfoProps
18
- extends RepresentativeOfficeInfoContent,
19
- UniBlockProps {}
20
-
21
- export const RepresentativeOfficeInfo = JSX<RepresentativeOfficeInfoProps>(
22
- ({
23
- address,
24
- email,
25
- telephone,
26
- button,
27
- className = '',
28
- __html,
29
- richVersion,
30
- icon,
31
- title,
32
- version = 'primary',
33
- ...rest
34
- }) => (
35
- <BlockWrapper
36
- className={style('box-border text-left space-y-s', className)}
37
- version={version}
38
- {...rest}
39
- >
40
- <div className="w-full flex justify-between flex-row-reverse">
41
- {isIcon(icon) ? (
42
- <div className={'w-10 h-7 sm:w-24 sm:h-16'}>
43
- <Img image={icon} />
44
- </div>
45
- ) : null}
46
- {title ? <Heading headingType="h3" as="h3" title={title} /> : null}
47
- </div>
48
- <div className="w-full space-y-m">
49
- {__html ? renderDescriptionBlock({ __html, richVersion }) : null}
50
- {renderBlock({
51
- label: 'Адрес',
52
- data: address,
53
- iconName: 'GeolocationIcon',
54
- })}
55
- {renderBlock({ label: 'Телефон(факс)', data: telephone, iconName: 'PhoneIcon' })}
56
- {renderBlock({
57
- label: 'E-mail',
58
- data: email,
59
- iconName: 'MailIcon',
60
- dataColor: 'text-primary-main',
61
- })}
62
- {button?.text ? renderButtonsSection([button]) : null}
63
- </div>
64
- </BlockWrapper>
65
- ),
66
- );
67
-
68
- const renderDescriptionBlock = (props: RichTextProps) => (
69
- <div className="border-b border-main-divider pb-lg">
70
- <RichText {...props} itemSize="list-s" />
71
- </div>
72
- );
73
-
74
- interface renderBlockProps {
75
- label?: string;
76
- data?: string;
77
- iconName?: IconName;
78
- dataColor?: TextColor;
79
- }
80
-
81
- const renderBlock = ({ label, data, iconName, dataColor = '' }: renderBlockProps) =>
82
- data ? (
83
- <div className="flex gap-s">
84
- <Icon iconVersion="black" name={iconName} width="24" height="24" />
85
- <div className="flex flex-col gap-2xs">
86
- <Text size="text-m" font="font-light" color="text-secondary-text">
87
- {label}
88
- </Text>
89
- <Text size="text-xl" color={dataColor}>
90
- {data}
91
- </Text>
92
- </div>
93
- </div>
94
- ) : null;
@@ -1,24 +0,0 @@
1
- {
2
- "content": {
3
- "__html": {
4
- "ui:widget": "html"
5
- },
6
- "button": {
7
- "href": {
8
- "ui:field": "attachmentHref"
9
- },
10
- "icon": {
11
- "ui:field": "icon"
12
- },
13
- "iconRight": {
14
- "ui:field": "icon"
15
- }
16
- }
17
- },
18
- "style": {
19
- "ui:options": {
20
- "minCols": 6,
21
- "maxCols": 6
22
- }
23
- }
24
- }
@@ -1,22 +0,0 @@
1
- import { type TitleProps } from '../../model/HeadlineType';
2
- import { type IconProps } from '../../model/Picture';
3
- import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
4
- import { type RichTextProps } from '../../ui-kit/RichText/RichTextProps';
5
- import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
6
-
7
- /**
8
- * @title Блок с информацией о представительстве
9
- */
10
- export type RepresentativeOfficeInfoContent = UniBlockContent &
11
- TitleProps &
12
- RichTextProps &
13
- IconProps & {
14
- /** @title Адрес */
15
- address?: string;
16
- /** @title Телефон (факс) */
17
- telephone?: string;
18
- /** @title E-mail */
19
- email?: string;
20
- /** @title Кнопка */
21
- button?: LinkButtonContent;
22
- };
@@ -1,9 +0,0 @@
1
- {
2
- "content": {
3
- "version": "primary",
4
- "padding": "",
5
- "prefix": "префикс",
6
- "unit": 1,
7
- "suffix": "суффикс"
8
- }
9
- }
@@ -1,27 +0,0 @@
1
- import '../../setup-fixture';
2
- import { type UnitProps } from '../../ui-kit/Unit/UnitProps';
3
- import { UnitBlock } from './UnitBlock';
4
-
5
- const UNIT_CONTENT_FULL: UnitProps = {
6
- prefix: 'от',
7
- unit: 1.5,
8
- suffix: 'баллов',
9
- };
10
-
11
- const UNIT_CONTENT_NO_PREFIX: UnitProps = {
12
- unit: 0.5,
13
- suffix: 'балла',
14
- };
15
-
16
- export default {
17
- default: (
18
- <div className="container grid grid-cols-12">
19
- <UnitBlock className="col-span-12" {...UNIT_CONTENT_FULL} />
20
- </div>
21
- ),
22
- 'no-prefix': (
23
- <div className="container grid grid-cols-12">
24
- <UnitBlock className="col-span-12" {...UNIT_CONTENT_NO_PREFIX} />
25
- </div>
26
- ),
27
- };
@@ -1,27 +0,0 @@
1
- import '../../setup-fixture';
2
- import { type UnitProps } from '../../ui-kit/Unit/UnitProps';
3
- import { UnitBlock } from './UnitBlock';
4
-
5
- const UNIT_CONTENT_FULL: UnitProps = {
6
- prefix: 'от',
7
- unit: 1.5,
8
- suffix: 'баллов',
9
- };
10
-
11
- const UNIT_CONTENT_NO_PREFIX: UnitProps = {
12
- unit: 0.5,
13
- suffix: 'балла',
14
- };
15
-
16
- export default {
17
- default: (
18
- <div className="container grid grid-cols-12">
19
- <UnitBlock className="col-span-12" {...UNIT_CONTENT_FULL} />
20
- </div>
21
- ),
22
- 'no-prefix': (
23
- <div className="container grid grid-cols-12">
24
- <UnitBlock className="col-span-12" {...UNIT_CONTENT_NO_PREFIX} />
25
- </div>
26
- ),
27
- };
@@ -1,17 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
3
- import { Unit } from '../../ui-kit/Unit/Unit';
4
- import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
5
- import { type UnitBlockContent } from './UnitBlockContent';
6
-
7
- interface UnitBlockProps extends UnitBlockContent, UniBlockProps {}
8
-
9
- export const UnitBlock = JSX<UnitBlockProps>((props) => {
10
- const { prefix, unit, suffix, ...rest } = props;
11
-
12
- return (
13
- <BlockWrapper defaultPadding="p-0" {...rest}>
14
- <Unit prefix={prefix} unit={unit} suffix={suffix} />
15
- </BlockWrapper>
16
- );
17
- });
@@ -1,7 +0,0 @@
1
- import { type UnitProps } from '../../ui-kit/Unit/UnitProps';
2
- import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
3
-
4
- /**
5
- * @title Показатель
6
- */
7
- export type UnitBlockContent = UniBlockContent & UnitProps;