@redneckz/wildless-cms-uni-blocks 0.9.9 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.9.9.js +0 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +30 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/bundle/components/Filtration/FiltrationContent.d.ts +18 -8
- package/bundle/components/Footer/SocialMedia.d.ts +1 -1
- package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/dist/components/Filtration/Filtration.js +1 -1
- package/dist/components/Filtration/Filtration.js.map +1 -1
- package/dist/components/Filtration/FiltrationContent.d.ts +18 -8
- package/dist/components/Filtration/FiltrationInner.js +9 -5
- package/dist/components/Filtration/FiltrationInner.js.map +1 -1
- package/dist/components/Filtration/renderFormItem.js +6 -5
- package/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +6 -7
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.js +2 -2
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/lib/components/Filtration/Filtration.js +1 -1
- package/lib/components/Filtration/Filtration.js.map +1 -1
- package/lib/components/Filtration/FiltrationContent.d.ts +18 -8
- package/lib/components/Filtration/FiltrationInner.js +9 -5
- package/lib/components/Filtration/FiltrationInner.js.map +1 -1
- package/lib/components/Filtration/renderFormItem.js +6 -5
- package/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +6 -7
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.js +2 -2
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/bundle/bundle.umd.js +7 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/bundle/components/Filtration/FiltrationContent.d.ts +18 -8
- package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/dist/components/Filtration/Filtration.js +1 -1
- package/mobile/dist/components/Filtration/Filtration.js.map +1 -1
- package/mobile/dist/components/Filtration/FiltrationContent.d.ts +18 -8
- package/mobile/dist/components/Filtration/FiltrationInner.js +9 -5
- package/mobile/dist/components/Filtration/FiltrationInner.js.map +1 -1
- package/mobile/dist/components/Filtration/renderFormItem.js +6 -5
- package/mobile/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.js +6 -7
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/lib/components/Filtration/Filtration.js +1 -1
- package/mobile/lib/components/Filtration/Filtration.js.map +1 -1
- package/mobile/lib/components/Filtration/FiltrationContent.d.ts +18 -8
- package/mobile/lib/components/Filtration/FiltrationInner.js +9 -5
- package/mobile/lib/components/Filtration/FiltrationInner.js.map +1 -1
- package/mobile/lib/components/Filtration/renderFormItem.js +6 -5
- package/mobile/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.js +6 -7
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
- package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
- package/mobile/src/components/Filtration/Filtration.example.json +39 -19
- package/mobile/src/components/Filtration/Filtration.tsx +3 -8
- package/mobile/src/components/Filtration/FiltrationContent.ts +19 -8
- package/mobile/src/components/Filtration/FiltrationInner.tsx +31 -12
- package/mobile/src/components/Filtration/renderFormItem.tsx +20 -20
- package/mobile/src/components/Footer/MediaButton.tsx +7 -10
- package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
- package/mobile/src/components/PictureText/PictureText.example.json +3 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
- package/mobile/src/components/RichTextBlock/RichTextBlock.example.json +1 -1
- package/mobile/src/components/Tile/Tile.example.json +3 -1
- package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/src/components/Carousel/Carousel.fixture.tsx +18 -5
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
- package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
- package/src/components/Filtration/Filtration.example.json +39 -19
- package/src/components/Filtration/Filtration.fixture.tsx +36 -20
- package/src/components/Filtration/Filtration.tsx +3 -8
- package/src/components/Filtration/FiltrationContent.ts +19 -8
- package/src/components/Filtration/FiltrationInner.tsx +31 -12
- package/src/components/Filtration/renderFormItem.tsx +20 -20
- package/src/components/Footer/MediaButton.tsx +7 -10
- package/src/components/Footer/SocialMedia.tsx +3 -11
- package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
- package/src/components/PictureText/PictureText.example.json +3 -1
- package/src/components/ProductBlock/ProductBlock.example.json +3 -1
- package/src/components/ProductTile/ProductTile.example.json +3 -1
- package/src/components/RichTextBlock/RichTextBlock.example.json +1 -1
- package/src/components/Tile/Tile.example.json +3 -1
- package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
|
@@ -26,6 +26,7 @@ export const CarouselProductCard = JSX<CarouselProductCardProps>(
|
|
|
26
26
|
href,
|
|
27
27
|
icon,
|
|
28
28
|
isDotted = true,
|
|
29
|
+
isFullWidth = true,
|
|
29
30
|
items = [],
|
|
30
31
|
target,
|
|
31
32
|
title,
|
|
@@ -50,7 +51,10 @@ export const CarouselProductCard = JSX<CarouselProductCardProps>(
|
|
|
50
51
|
{renderItems(items, isDotted, version)}
|
|
51
52
|
{renderAdditionalDescription(additionalDescription)}
|
|
52
53
|
</LinkWrapper>
|
|
53
|
-
{renderButtonsSection([button], {
|
|
54
|
+
{renderButtonsSection([button], {
|
|
55
|
+
className: style('p-6 pt-0', isFullWidth ? '' : 'justify-center'),
|
|
56
|
+
isVertical: isFullWidth ? true : false,
|
|
57
|
+
})}
|
|
54
58
|
</BlockWrapper>
|
|
55
59
|
);
|
|
56
60
|
},
|
|
@@ -3,35 +3,55 @@
|
|
|
3
3
|
"filtrationSchema": {
|
|
4
4
|
"propertyType": {
|
|
5
5
|
"title": "Тип недвижимости",
|
|
6
|
-
"type": "
|
|
7
|
-
"
|
|
8
|
-
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": ["flat", "apartment", "house", "storeRoom", "parkingSpace"],
|
|
10
|
+
"enumNames": ["Квартира", "Апартаменты", "Жилой дом", "Кладовая", "Машино-место"]
|
|
11
|
+
}
|
|
9
12
|
},
|
|
10
13
|
"stage": {
|
|
11
14
|
"title": "Этап строительства",
|
|
12
|
-
"type": "
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["built", "inProgress"],
|
|
19
|
+
"enumNames": ["Готовое жильё", "Строящиеся"]
|
|
20
|
+
}
|
|
15
21
|
},
|
|
16
22
|
"categories": {
|
|
17
23
|
"title": "Категории",
|
|
18
|
-
"type": "
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["salaryClient", "IT", "youngFamily", "military", "medicalWorker", "scientist"],
|
|
28
|
+
"enumNames": [
|
|
29
|
+
"Зарплатный клиент",
|
|
30
|
+
"IT-специалист",
|
|
31
|
+
"Молодая семья",
|
|
32
|
+
"Военнослужащий",
|
|
33
|
+
"Медицинский работник",
|
|
34
|
+
"Научный сотрудник"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
28
37
|
},
|
|
29
38
|
"extraOptions": {
|
|
30
39
|
"title": "Дополнительно",
|
|
31
|
-
"type": "
|
|
32
|
-
"
|
|
33
|
-
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["preferentialMortgage", "children"],
|
|
44
|
+
"enumNames": ["Льготная ипотека", "Дети"]
|
|
45
|
+
}
|
|
34
46
|
}
|
|
47
|
+
},
|
|
48
|
+
"resetButton": {
|
|
49
|
+
"text": "Очистить фильтры",
|
|
50
|
+
"version": "secondary"
|
|
51
|
+
},
|
|
52
|
+
"notFound": {
|
|
53
|
+
"title": "Нет подходящей ипотечной программы",
|
|
54
|
+
"description": "Попробуйте очистить фильтры"
|
|
35
55
|
}
|
|
36
56
|
}
|
|
37
57
|
}
|
|
@@ -15,19 +15,14 @@ export const Filtration: JSXBlock<FiltrationProps> = JSX<FiltrationProps>(
|
|
|
15
15
|
const { formState, register, resetForm } = useForm();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<BlockWrapper className={style(
|
|
19
|
-
<form className="flex justify-between">
|
|
18
|
+
<BlockWrapper className={style(className)} version="transparent" {...rest}>
|
|
19
|
+
<form className="flex justify-between bg-white p-9 mb-1">
|
|
20
20
|
<div className="flex gap-11">
|
|
21
21
|
{Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, register))}
|
|
22
22
|
</div>
|
|
23
23
|
{resetButton ? (
|
|
24
24
|
<div>
|
|
25
|
-
<Button
|
|
26
|
-
className="w-72"
|
|
27
|
-
text={resetButton.text}
|
|
28
|
-
version={resetButton.buttonVersion}
|
|
29
|
-
onClick={resetForm}
|
|
30
|
-
/>
|
|
25
|
+
<Button className="w-72" onClick={resetForm} {...resetButton} />
|
|
31
26
|
</div>
|
|
32
27
|
) : null}
|
|
33
28
|
</form>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
2
|
+
import type { DescriptionProps, TitleProps } from '../../model/HeadlineType';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @title Заголовок
|
|
@@ -33,6 +34,7 @@ export type StringArray = {
|
|
|
33
34
|
* @hidden
|
|
34
35
|
*/
|
|
35
36
|
type?: 'array';
|
|
37
|
+
/** @title */
|
|
36
38
|
items?: {
|
|
37
39
|
/**
|
|
38
40
|
* @default string
|
|
@@ -47,13 +49,13 @@ export type StringArray = {
|
|
|
47
49
|
// TODO: Make customizable to implement arbitrary filtration blocks
|
|
48
50
|
export type FiltrationSchema = {
|
|
49
51
|
/** @title Тип недвижимости */
|
|
50
|
-
propertyType?:
|
|
52
|
+
propertyType?: StringArray;
|
|
51
53
|
/** @title Этап строительства */
|
|
52
|
-
stage?:
|
|
54
|
+
stage?: StringArray;
|
|
53
55
|
/** @title Категории */
|
|
54
|
-
categories?:
|
|
56
|
+
categories?: StringArray;
|
|
55
57
|
/** @title Дополнительно */
|
|
56
|
-
extraOptions?:
|
|
58
|
+
extraOptions?: StringArray;
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
/**
|
|
@@ -67,14 +69,24 @@ export type ResetButton = {
|
|
|
67
69
|
/**
|
|
68
70
|
* @title Цвет кнопки
|
|
69
71
|
*/
|
|
70
|
-
|
|
72
|
+
version: ButtonVersion;
|
|
71
73
|
};
|
|
72
74
|
|
|
75
|
+
/**
|
|
76
|
+
* @title Плитка "Не найдено"
|
|
77
|
+
*/
|
|
78
|
+
export type NotFound = TitleProps & DescriptionProps;
|
|
79
|
+
|
|
73
80
|
export interface FiltrationInnerContent {
|
|
74
|
-
/** @title Название кнопки */
|
|
81
|
+
/** @title Название сворачивающейся кнопки */
|
|
75
82
|
label?: string;
|
|
76
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* @title Количество отображаемых предметов
|
|
85
|
+
* @minimum 1
|
|
86
|
+
*/
|
|
77
87
|
topItemsCount?: number;
|
|
88
|
+
resetButton?: ResetButton;
|
|
89
|
+
notFound?: NotFound;
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
/**
|
|
@@ -83,5 +95,4 @@ export interface FiltrationInnerContent {
|
|
|
83
95
|
export interface FiltrationContent extends FiltrationInnerContent {
|
|
84
96
|
/** @title Параметры фильтрации */
|
|
85
97
|
filtrationSchema?: FiltrationSchema;
|
|
86
|
-
resetButton?: ResetButton;
|
|
87
98
|
}
|
|
@@ -5,10 +5,11 @@ import type { UniBlockProps } from '../../model/JSXBlock';
|
|
|
5
5
|
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
6
6
|
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
7
7
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
8
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
9
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
8
10
|
import { style } from '../../utils/style';
|
|
9
|
-
import { ErrorBlock } from '../ErrorBlock/ErrorBlock';
|
|
10
11
|
import { checkShouldRenderBlock } from './checkShouldRenderBlock';
|
|
11
|
-
import type { FiltrationInnerContent } from './FiltrationContent';
|
|
12
|
+
import type { FiltrationInnerContent, NotFound } from './FiltrationContent';
|
|
12
13
|
|
|
13
14
|
const ICONS: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
14
15
|
|
|
@@ -19,7 +20,7 @@ interface FiltrationInnerProps extends FiltrationInnerContent, UniBlockProps {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export const FiltrationInner = JSX<FiltrationInnerProps>(
|
|
22
|
-
({ label = '', filtrationState = {}, topItemsCount = 0, block, ...rest }) => {
|
|
23
|
+
({ label = '', filtrationState = {}, topItemsCount = 0, block, notFound, ...rest }) => {
|
|
23
24
|
const blocksToRender =
|
|
24
25
|
block?.blocks?.filter((b) => checkShouldRenderBlock(filtrationState, b.content || {})) || [];
|
|
25
26
|
|
|
@@ -30,28 +31,27 @@ export const FiltrationInner = JSX<FiltrationInnerProps>(
|
|
|
30
31
|
|
|
31
32
|
return (
|
|
32
33
|
<div>
|
|
33
|
-
<div className={style(blocksToRender.length ? 'hidden' : '')}>
|
|
34
|
-
|
|
35
|
-
error={{ errorContentType: 'Image' }}
|
|
36
|
-
title="Нет подходящей ипотечной программы"
|
|
37
|
-
subtitle="Попробуйте очистить фильтры"
|
|
38
|
-
/>
|
|
34
|
+
<div className={style(blocksToRender.length ? 'hidden' : 'block')}>
|
|
35
|
+
{notFound ? renderNotFound(notFound) : null}
|
|
39
36
|
</div>
|
|
40
37
|
<div className={style(blocksToRender.length ? '' : 'hidden')}>
|
|
41
|
-
<div className={resultsGridStyle}>
|
|
38
|
+
<div className={style('mb-1', resultsGridStyle)}>
|
|
42
39
|
{renderBlocksList(visibleBlocks, { ...rest.options, parent: block })}
|
|
43
40
|
</div>
|
|
44
41
|
<Foldable
|
|
45
42
|
renderFoldableSection={({ isUnfolded }) => {
|
|
46
43
|
return (
|
|
47
|
-
<FoldableSection
|
|
44
|
+
<FoldableSection
|
|
45
|
+
className={style(resultsGridStyle, isUnfolded ? 'mb-1' : '')}
|
|
46
|
+
isUnfolded={isUnfolded}
|
|
47
|
+
>
|
|
48
48
|
{renderBlocksList(hiddenBlocks, { ...rest.options, parent: block })}
|
|
49
49
|
</FoldableSection>
|
|
50
50
|
);
|
|
51
51
|
}}
|
|
52
52
|
renderFoldButton={({ isUnfolded, onToggle }) => (
|
|
53
53
|
<DefaultFoldButton
|
|
54
|
-
className={style(
|
|
54
|
+
className={style(topItemsCount < 1 ? 'hidden' : '')}
|
|
55
55
|
disabled={!hiddenBlocks?.length}
|
|
56
56
|
label={label}
|
|
57
57
|
icon={ICONS[Number(isUnfolded)]}
|
|
@@ -65,3 +65,22 @@ export const FiltrationInner = JSX<FiltrationInnerProps>(
|
|
|
65
65
|
);
|
|
66
66
|
},
|
|
67
67
|
);
|
|
68
|
+
|
|
69
|
+
function renderNotFound({ title, description }: NotFound) {
|
|
70
|
+
return (
|
|
71
|
+
<div className="bg-white py-20">
|
|
72
|
+
{title ? (
|
|
73
|
+
<div className="mb-2">
|
|
74
|
+
<Paragraph align="text-center">
|
|
75
|
+
<Text size="text-h4">{title}</Text>
|
|
76
|
+
</Paragraph>
|
|
77
|
+
</div>
|
|
78
|
+
) : null}
|
|
79
|
+
{description ? (
|
|
80
|
+
<Paragraph size="text-xl" font="font-light" align="text-center">
|
|
81
|
+
{description}
|
|
82
|
+
</Paragraph>
|
|
83
|
+
) : null}
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FormElementRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { SlideCheckboxGroup } from '../../ui-kit/SlideCheckboxGroup/SlideCheckboxGroup';
|
|
3
3
|
import { Text } from '../../ui-kit/Text/Text';
|
|
4
|
-
import type { FiltrationSchema,
|
|
4
|
+
import type { FiltrationSchema, StringArray } from './FiltrationContent';
|
|
5
5
|
|
|
6
6
|
export const renderFormItem =
|
|
7
7
|
(filtrationSchema: FiltrationSchema, register: FormElementRegisterer) => (key: string) => {
|
|
@@ -9,28 +9,28 @@ export const renderFormItem =
|
|
|
9
9
|
const type = item?.type;
|
|
10
10
|
|
|
11
11
|
switch (type) {
|
|
12
|
-
case '
|
|
13
|
-
return
|
|
12
|
+
case 'array':
|
|
13
|
+
return renderCheckboxes(key, register)(item);
|
|
14
14
|
default:
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const renderCheckboxes = (key: string, register: FormElementRegisterer) => (item?: StringArray) => {
|
|
20
|
+
const options =
|
|
21
|
+
item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
22
|
+
[];
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
return (
|
|
25
|
+
<div key={key}>
|
|
26
|
+
{item?.title ? (
|
|
27
|
+
<div className="mb-4">
|
|
28
|
+
<Text size="text-m" font="font-light" color="text-secondary-text">
|
|
29
|
+
{item.title}
|
|
30
|
+
</Text>
|
|
31
|
+
</div>
|
|
32
|
+
) : null}
|
|
33
|
+
<SlideCheckboxGroup items={options} multiple {...register(key)} />
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -62,17 +62,15 @@ const buttonStylesWithText = (text: string, buttonSize: string) =>
|
|
|
62
62
|
: `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
|
|
63
63
|
|
|
64
64
|
export const MediaButton = JSX<MediaButtonProps>(
|
|
65
|
-
({
|
|
66
|
-
const { href, version, text
|
|
65
|
+
({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
|
|
66
|
+
const { href, version, text = '' } = rest;
|
|
67
67
|
|
|
68
68
|
const { iconMapped, label } =
|
|
69
69
|
ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
70
70
|
|
|
71
|
-
const iconCustom = icon ?? iconMapped;
|
|
71
|
+
const iconCustom = getFilteredIcon(icon) ?? iconMapped;
|
|
72
72
|
|
|
73
|
-
const iconWithVersion = iconCustom
|
|
74
|
-
? { ...getIconWithVersion(iconCustom), iconVersion }
|
|
75
|
-
: undefined;
|
|
73
|
+
const iconWithVersion = iconCustom ? getIconWithVersion(iconCustom) : undefined;
|
|
76
74
|
|
|
77
75
|
return (
|
|
78
76
|
<Button
|
|
@@ -83,11 +81,8 @@ export const MediaButton = JSX<MediaButtonProps>(
|
|
|
83
81
|
'hover:bg-primary-main hover:text-black',
|
|
84
82
|
'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover',
|
|
85
83
|
'group-data-gray:border-green',
|
|
86
|
-
buttonStylesWithText(text
|
|
84
|
+
buttonStylesWithText(text, buttonSize),
|
|
87
85
|
)}
|
|
88
|
-
aboveText={aboveText}
|
|
89
|
-
appendLeft={appendLeft}
|
|
90
|
-
appendRight={appendRight}
|
|
91
86
|
aria-label={label}
|
|
92
87
|
rel="noopener noreferrer"
|
|
93
88
|
target="_blank"
|
|
@@ -108,3 +103,5 @@ export const MediaButton = JSX<MediaButtonProps>(
|
|
|
108
103
|
);
|
|
109
104
|
},
|
|
110
105
|
);
|
|
106
|
+
|
|
107
|
+
const getFilteredIcon = (icon: Picture | undefined) => (icon?.src || icon?.icon ? icon : undefined);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"content": {
|
|
3
|
-
"__html": "<
|
|
3
|
+
"__html": "<h1>Заголовок 1</h1>\n<h2>Заголовок 2</h2>\n<h3>Заголовок 3</h3>\n<h4>Заголовок 4</h4>\n<h5>Заголовок 5</h5>\n<h6>Заголовок 6</h6>\n<p>Параграф, в котором много текста и даже <a href=\"#\">ссылка</a></p>\n<p><strong>Жирный текст</strong>, <em>Наклонный текст</em></p>\n<ul>\n <li>Список с точками</li>\n <li>Список с точками</li>\n</ul>\n<ol>\n <li>Нумерованный список</li>\n <li>Нумерованный список</li>\n</ol>\n"
|
|
4
4
|
}
|
|
5
5
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AlignTypeWithStretch } from '../../model/AlignType';
|
|
2
|
-
import type { ColorPalette } from '../../model/ContentPageDef';
|
|
3
2
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
4
3
|
import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
|
|
5
4
|
|
|
@@ -7,7 +6,6 @@ import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
|
|
|
7
6
|
* @title Вертикальный компоновщик
|
|
8
7
|
*/
|
|
9
8
|
export type VerticalLayoutContent = UniBlockContent & {
|
|
10
|
-
colorPalette?: ColorPalette;
|
|
11
9
|
align?: AlignTypeWithStretch;
|
|
12
10
|
gap?: GapVersion;
|
|
13
11
|
/** @title Внутренний отступ компоновщика */
|
package/package.json
CHANGED
|
@@ -87,7 +87,7 @@ export const ApplicationFormCredit = JSX<ApplicationFormsProps>((props) => {
|
|
|
87
87
|
{renderCreditParameters({ amount, term, handleChange })}
|
|
88
88
|
<Heading headingType="h6" title="Данные организации" className="text-center mb-4" />
|
|
89
89
|
{renderDataOrganization({ fullName, inn, name, phone, mail, annualRevenue, handleChange })}
|
|
90
|
-
<Heading headingType="h6" title="Офис
|
|
90
|
+
<Heading headingType="h6" title="Офис Банка" className="text-center mb-4" />
|
|
91
91
|
{renderBankOffices({
|
|
92
92
|
regions,
|
|
93
93
|
region: selectedRegion,
|
|
@@ -6,7 +6,10 @@ import { CARD, CARD_MINI, CARD_NEW } from '../CarouselCard/CarouselCard.fixture'
|
|
|
6
6
|
import { CATALOG_CARD } from '../CarouselCatalogCard/CarouselCatalogCard.fixture';
|
|
7
7
|
import { CAROUSEL_EVENT_CARD } from '../CarouselEventCard/CarouselEventCard.fixture';
|
|
8
8
|
import { INVESTMENT_CARD_WITH_SINGLE_COLUMN } from '../CarouselInvestmentCard/CarouselInvestmentCard.fixture';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
PRODUCT_CARD,
|
|
11
|
+
PRODUCT_CARD_SMALL,
|
|
12
|
+
} from '../CarouselProductCard/CarouselProductCard.fixture';
|
|
10
13
|
import { BUSINESS_CARD } from '../CarouselProgramsCard/CarouselProgramsCard.fixture';
|
|
11
14
|
import {
|
|
12
15
|
CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
|
|
@@ -118,10 +121,20 @@ export default {
|
|
|
118
121
|
isBlur={true}
|
|
119
122
|
block={{
|
|
120
123
|
type: 'Carousel',
|
|
121
|
-
blocks:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
blocks: [
|
|
125
|
+
{
|
|
126
|
+
type: 'CarouselProductCard',
|
|
127
|
+
content: PRODUCT_CARD,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'CarouselProductCard',
|
|
131
|
+
content: PRODUCT_CARD_SMALL,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'CarouselProductCard',
|
|
135
|
+
content: PRODUCT_CARD_SMALL,
|
|
136
|
+
},
|
|
137
|
+
],
|
|
125
138
|
}}
|
|
126
139
|
options={options}
|
|
127
140
|
/>
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { CarouselBankHistoryCard } from './CarouselBankHistoryCard';
|
|
2
|
+
import type { CarouselBankHistoryCardContent } from './CarouselBankHistoryCardContent';
|
|
2
3
|
|
|
3
|
-
export const BANK_HISTORY_CARD = {
|
|
4
|
+
export const BANK_HISTORY_CARD: CarouselBankHistoryCardContent = {
|
|
4
5
|
title: '1796г.',
|
|
5
6
|
description:
|
|
6
7
|
"Россельхозбанк стал одним из ключевых участников Приоритетного национального проекта 'Развитие АПК' целью которого развитие агропромышленного сектора российской экономики",
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
export const ACTIVE_BANK_HISTORY_CARD = {
|
|
10
|
-
title: '1796г.',
|
|
11
|
-
description:
|
|
12
|
-
"Россельхозбанк стал одним из ключевых участников Приоритетного национального проекта 'Развитие АПК' целью которого развитие агропромышленного сектора российской экономики",
|
|
13
|
-
isActive: true,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
10
|
export default {
|
|
17
11
|
default: <CarouselBankHistoryCard {...BANK_HISTORY_CARD} />,
|
|
18
|
-
active: <CarouselBankHistoryCard {...ACTIVE_BANK_HISTORY_CARD} />,
|
|
19
12
|
};
|
|
@@ -20,12 +20,12 @@ export const CarouselBankHistoryCard = JSX<CarouselBankHistoryCardProps>(
|
|
|
20
20
|
{isActive ? (
|
|
21
21
|
<div className="relative flex items-center w-full">
|
|
22
22
|
<Headline
|
|
23
|
-
headlineVersion="
|
|
23
|
+
headlineVersion="M"
|
|
24
24
|
title={title}
|
|
25
25
|
description={description}
|
|
26
26
|
align="text-left"
|
|
27
27
|
className={style(
|
|
28
|
-
'absolute z-10 h-[385px] w-[440px] text-white shadow-dark-blue',
|
|
28
|
+
'absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue',
|
|
29
29
|
getActiveBlockPosition(orderNumber, blocksLength),
|
|
30
30
|
getBackgroundColor(orderNumber),
|
|
31
31
|
)}
|
|
@@ -57,7 +57,6 @@ const getBackgroundColor = (orderNumber: number) => {
|
|
|
57
57
|
return 'bg-green-light';
|
|
58
58
|
case 2:
|
|
59
59
|
return 'bg-yellow-light';
|
|
60
|
-
|
|
61
60
|
default:
|
|
62
61
|
return 'bg-primary-main';
|
|
63
62
|
}
|
|
@@ -70,7 +69,6 @@ const getTextColor = (orderNumber: number) => {
|
|
|
70
69
|
return 'gradient-color-text-on-yellow';
|
|
71
70
|
case 2:
|
|
72
71
|
return 'gradient-color-text-on-yellow';
|
|
73
|
-
|
|
74
72
|
default:
|
|
75
73
|
return 'gradient-color-text-on-green';
|
|
76
74
|
}
|
|
@@ -19,11 +19,11 @@ export const CarouselEventCard = JSX<CarouselEventCardProps>(
|
|
|
19
19
|
{icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
|
|
20
20
|
{icon?.src ? <Img image={icon} /> : null}
|
|
21
21
|
{title ? (
|
|
22
|
-
<Heading headingType="h6" as="h4" className="text-left mb-2" title={title} />
|
|
22
|
+
<Heading headingType="h6" as="h4" className="text-left pt-3 mb-2" title={title} />
|
|
23
23
|
) : null}
|
|
24
24
|
{description ? (
|
|
25
25
|
<div className="mb-4">
|
|
26
|
-
<Text font="font-light" size="text-
|
|
26
|
+
<Text font="font-light" size="text-m" color="text-secondary-text">
|
|
27
27
|
{description}
|
|
28
28
|
</Text>
|
|
29
29
|
</div>
|