@redneckz/wildless-cms-uni-blocks 0.9.4 → 0.9.6
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.8.29.js +1 -0
- package/bin/migration-scripts/0.9.1.js +5 -4
- package/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/bundle/BlockRenderer/renderBlock.d.ts +5 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +92 -58
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
- package/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/bundle/ui-kit/BlockWrapper.d.ts +0 -1
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/dist/BlockRenderer/renderBlock.d.ts +5 -1
- package/dist/BlockRenderer/renderBlock.js +2 -2
- package/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +15 -1
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/dist/components/Calculator/CreditCalculatorForm.js +19 -4
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/dist/components/Calculator/constants.js +1 -0
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +11 -13
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/StepsBlock/renderStep.js +3 -7
- package/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +6 -2
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.d.ts +0 -1
- package/dist/ui-kit/BlockWrapper.js +2 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/lib/BlockRenderer/renderBlock.d.ts +5 -1
- package/lib/BlockRenderer/renderBlock.js +2 -2
- package/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +15 -1
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/lib/components/Calculator/CreditCalculatorForm.js +19 -4
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/lib/components/Calculator/constants.js +1 -0
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +11 -13
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/StepsBlock/renderStep.js +3 -7
- package/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +6 -2
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.d.ts +0 -1
- package/lib/ui-kit/BlockWrapper.js +2 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/mobile/bundle/BlockRenderer/renderBlock.d.ts +5 -1
- package/mobile/bundle/bundle.umd.js +10 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
- package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/mobile/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/bundle/ui-kit/BlockWrapper.d.ts +0 -1
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/mobile/dist/BlockRenderer/renderBlock.d.ts +5 -1
- package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +15 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +19 -4
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/dist/components/Calculator/constants.js +1 -0
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +11 -13
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStep.js +3 -7
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +6 -2
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.d.ts +0 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/mobile/lib/BlockRenderer/renderBlock.d.ts +5 -1
- package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +15 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +19 -4
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/lib/components/Calculator/constants.js +1 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +11 -13
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStep.js +3 -7
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +6 -2
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.d.ts +0 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/mobile/src/BlockRenderer/BlockRendererOptions.ts +0 -2
- package/mobile/src/BlockRenderer/renderBlock.tsx +7 -3
- package/mobile/src/components/Calculator/Calculator.example.json +6 -0
- package/mobile/src/components/Calculator/CalculatorContent.ts +16 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
- package/mobile/src/components/Calculator/constants.ts +1 -0
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
- package/mobile/src/components/Carousel/Carousel.tsx +9 -11
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
- package/mobile/src/components/StepsBlock/renderStep.tsx +6 -5
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
- package/mobile/src/ui-kit/BlockWrapper.tsx +3 -6
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
- package/package.json +1 -1
- package/src/BlockRenderer/BlockRendererOptions.ts +0 -2
- package/src/BlockRenderer/renderBlock.tsx +7 -3
- package/src/components/Calculator/Calculator.example.json +6 -0
- package/src/components/Calculator/Calculator.fixture.tsx +6 -0
- package/src/components/Calculator/CalculatorContent.ts +16 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
- package/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
- package/src/components/Calculator/constants.ts +1 -0
- package/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
- package/src/components/Carousel/Carousel.tsx +9 -11
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +3 -3
- package/src/components/StepsBlock/renderStep.tsx +6 -5
- package/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
- package/src/ui-kit/BlockWrapper.tsx +3 -6
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
|
@@ -7,6 +7,20 @@ export declare type CommonCalculatorProps = Footnote & ButtonContent & {
|
|
|
7
7
|
/** @title Адрес справочника */
|
|
8
8
|
sourceBookDir?: string;
|
|
9
9
|
};
|
|
10
|
+
export interface CreditCalculatorParamsViewSettings {
|
|
11
|
+
/** @title Получаю зарплату на счёт в Россельхозбанке */
|
|
12
|
+
isShowSalaryClient?: boolean;
|
|
13
|
+
/** @title Работаю в бюджетной организации */
|
|
14
|
+
isShowStateEmployee?: boolean;
|
|
15
|
+
/** @title Получаю пенсию на карту Россельхозбанка */
|
|
16
|
+
isShowPensionClient?: boolean;
|
|
17
|
+
/** @title Комплексная страховая защита */
|
|
18
|
+
isShowInsurance?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface CreditCalculatorProps extends CommonCalculatorProps {
|
|
21
|
+
/** @title Настройка отображения чекбоксов */
|
|
22
|
+
paramsViewSettings?: CreditCalculatorParamsViewSettings;
|
|
23
|
+
}
|
|
10
24
|
export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
|
|
11
25
|
/** @title Сноска снизу блока */
|
|
12
26
|
bottomFootnote?: string;
|
|
@@ -46,7 +60,7 @@ export interface CalculatorParams {
|
|
|
46
60
|
* @title Кредитный калькулятор
|
|
47
61
|
* @default {"calcType": "CreditCalculatorForm"}
|
|
48
62
|
*/
|
|
49
|
-
export declare type CreditCalculatorParamsDef = TitleProps &
|
|
63
|
+
export declare type CreditCalculatorParamsDef = TitleProps & CreditCalculatorProps & {
|
|
50
64
|
calcType: 'CreditCalculatorForm';
|
|
51
65
|
};
|
|
52
66
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CreditCalculatorProp extends
|
|
1
|
+
import type { CreditCalculatorProps } from './CalculatorContent';
|
|
2
|
+
export interface CreditCalculatorProp extends CreditCalculatorProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const CreditCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<CreditCalculatorProp, any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonCalculatorProps
|
|
2
|
-
export interface DepositCalculatorProp extends
|
|
1
|
+
import { CommonCalculatorProps } from './CalculatorContent';
|
|
2
|
+
export interface DepositCalculatorProp extends CommonCalculatorProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const DepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<DepositCalculatorProp, any, any>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { CreditCalculatorParamsViewSettings } from './CalculatorContent';
|
|
1
2
|
export interface CommonCreditParams {
|
|
2
3
|
isInsurance: boolean;
|
|
3
4
|
isSalaryClient: boolean;
|
|
5
|
+
isPensionClient: boolean;
|
|
4
6
|
isStateEmployee: boolean;
|
|
5
7
|
}
|
|
6
8
|
export interface CreditCalculatorSourceBookParams extends CommonCreditParams {
|
|
@@ -21,4 +23,4 @@ export interface CreditCalculatorParams extends CreditCalculatorSourceBookParams
|
|
|
21
23
|
export declare type CreditCalculatorData = {
|
|
22
24
|
rows: CreditCalculatorSourceBookParams[];
|
|
23
25
|
};
|
|
24
|
-
export declare const useCreditCalculatorParams: (userInputParams: CreditCalculatorUserInputParams, sourceBookDir?: string) => CreditCalculatorParams;
|
|
26
|
+
export declare const useCreditCalculatorParams: (userInputParams: CreditCalculatorUserInputParams, sourceBookDir?: string, paramsViewSettings?: CreditCalculatorParamsViewSettings) => CreditCalculatorParams;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CarouselEventCardContent } from './CarouselEventCardContent';
|
|
2
1
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
+
import type { CarouselEventCardContent } from './CarouselEventCardContent';
|
|
3
3
|
export interface CarouselEventCardProps extends CarouselEventCardContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const CarouselEventCard: import("@redneckz/uni-jsx").UNIComponent<CarouselEventCardProps, any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CarouselProductCardContent } from './CarouselProductCardContent';
|
|
2
1
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
+
import type { CarouselProductCardContent } from './CarouselProductCardContent';
|
|
3
3
|
export interface CarouselProductCardProps extends CarouselProductCardContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const CarouselProductCard: import("@redneckz/uni-jsx").UNIComponent<CarouselProductCardProps, any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
|
|
2
1
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
+
import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
|
|
3
3
|
export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const CarouselRecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -3,7 +3,6 @@ import type { UniBlockProps } from '../model/JSXBlock';
|
|
|
3
3
|
interface BlockWrapperProps extends UniBlockProps {
|
|
4
4
|
tag?: keyof HTMLElementTagNameMap;
|
|
5
5
|
role?: string;
|
|
6
|
-
extraProps?: Record<string, any>;
|
|
7
6
|
}
|
|
8
7
|
export declare const blockStyles: Record<BlockVersion, string>;
|
|
9
8
|
export declare const BlockWrapper: import("@redneckz/uni-jsx").UNIComponent<BlockWrapperProps, any, any>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { BlockDef } from '../model/ContentPageDef';
|
|
2
2
|
import type { BlockRendererOptions } from './BlockRendererOptions';
|
|
3
|
-
|
|
3
|
+
declare type ExtraProps = Partial<Record<string, any> & {
|
|
4
|
+
className: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function renderBlock(block: BlockDef, options: BlockRendererOptions, { className, ...extraProps }?: ExtraProps): any;
|
|
7
|
+
export {};
|
|
@@ -5,8 +5,8 @@ const style_1 = require("../utils/style");
|
|
|
5
5
|
const defaultBlockDecorator_1 = require("./defaultBlockDecorator");
|
|
6
6
|
const DEFAULT_ANCESTORS = [];
|
|
7
7
|
const defaultStyle = 'col-span-12';
|
|
8
|
-
function renderBlock(block, options) {
|
|
9
|
-
const { key, blockDecorator = defaultBlockDecorator_1.defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS,
|
|
8
|
+
function renderBlock(block, options, { className, ...extraProps } = {}) {
|
|
9
|
+
const { key, blockDecorator = defaultBlockDecorator_1.defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, } = options;
|
|
10
10
|
const { type } = block;
|
|
11
11
|
if (!(type && type in blocksRegistry)) {
|
|
12
12
|
console.warn(`No block with "${type}" is registered`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBlock.js","sourceRoot":"","sources":["../../src/BlockRenderer/renderBlock.tsx"],"names":[],"mappings":";;;AAEA,0CAAuC;AAEvC,mEAAgE;AAEhE,MAAM,iBAAiB,GAAmB,EAAE,CAAC;AAE7C,MAAM,YAAY,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"renderBlock.js","sourceRoot":"","sources":["../../src/BlockRenderer/renderBlock.tsx"],"names":[],"mappings":";;;AAEA,0CAAuC;AAEvC,mEAAgE;AAEhE,MAAM,iBAAiB,GAAmB,EAAE,CAAC;AAE7C,MAAM,YAAY,GAAG,aAAa,CAAC;AAInC,SAAgB,WAAW,CACzB,KAAe,EACf,OAA6B,EAC7B,EAAE,SAAS,EAAE,GAAG,UAAU,KAAiB,EAAE;IAE7C,MAAM,EACJ,GAAG,EACH,cAAc,GAAG,6CAAqB,EACtC,cAAc,GAAG,EAAE,EACnB,SAAS,GAAG,iBAAiB,GAC9B,GAAG,OAAO,CAAC;IACZ,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,cAAc,CAAC,EAAE;QACrC,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,CAAC;KACvD;IAED,MAAM,cAAc,GAAG,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAEpD,OAAO,cAAc,CACnB;QACE,cAAc,EAAE,IAAA,aAAK,EACnB,cAAc,EAAE,4BAA4B;QAC5C,SAAS,EACT,KAAK,CAAC,KAAK,IAAI,YAAY,CAC5B;QACD,KAAK;QACL,SAAS;QACT,iDAAiD;QACjD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,EAAE,EAAE;YAC3E,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC;YAElC,OAAO,cAAc,CAAC,CAAC,CAAC,CACtB,uBAAC,cAAc,IAEb,SAAS,EAAE,sBAAsB,EACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,KACZ,OAAO,KACP,UAAU,IALT,GAAG,CAMR,CACH,CAAC,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;KACF,EACD,GAAG,CACJ,CAAC;AACJ,CAAC;AA9CD,kCA8CC"}
|
|
@@ -7,6 +7,20 @@ export declare type CommonCalculatorProps = Footnote & ButtonContent & {
|
|
|
7
7
|
/** @title Адрес справочника */
|
|
8
8
|
sourceBookDir?: string;
|
|
9
9
|
};
|
|
10
|
+
export interface CreditCalculatorParamsViewSettings {
|
|
11
|
+
/** @title Получаю зарплату на счёт в Россельхозбанке */
|
|
12
|
+
isShowSalaryClient?: boolean;
|
|
13
|
+
/** @title Работаю в бюджетной организации */
|
|
14
|
+
isShowStateEmployee?: boolean;
|
|
15
|
+
/** @title Получаю пенсию на карту Россельхозбанка */
|
|
16
|
+
isShowPensionClient?: boolean;
|
|
17
|
+
/** @title Комплексная страховая защита */
|
|
18
|
+
isShowInsurance?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface CreditCalculatorProps extends CommonCalculatorProps {
|
|
21
|
+
/** @title Настройка отображения чекбоксов */
|
|
22
|
+
paramsViewSettings?: CreditCalculatorParamsViewSettings;
|
|
23
|
+
}
|
|
10
24
|
export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
|
|
11
25
|
/** @title Сноска снизу блока */
|
|
12
26
|
bottomFootnote?: string;
|
|
@@ -46,7 +60,7 @@ export interface CalculatorParams {
|
|
|
46
60
|
* @title Кредитный калькулятор
|
|
47
61
|
* @default {"calcType": "CreditCalculatorForm"}
|
|
48
62
|
*/
|
|
49
|
-
export declare type CreditCalculatorParamsDef = TitleProps &
|
|
63
|
+
export declare type CreditCalculatorParamsDef = TitleProps & CreditCalculatorProps & {
|
|
50
64
|
calcType: 'CreditCalculatorForm';
|
|
51
65
|
};
|
|
52
66
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface CreditCalculatorProp extends
|
|
1
|
+
import type { CreditCalculatorProps } from './CalculatorContent';
|
|
2
|
+
export interface CreditCalculatorProp extends CreditCalculatorProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const CreditCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<CreditCalculatorProp, any, any>;
|
|
@@ -14,11 +14,16 @@ const renderMonthsInput_1 = require("./renderMonthsInput");
|
|
|
14
14
|
const renderPaymentType_1 = require("./renderPaymentType");
|
|
15
15
|
const renderWantedSumInput_1 = require("./renderWantedSumInput");
|
|
16
16
|
const useCreditCalculatorParams_1 = require("./useCreditCalculatorParams");
|
|
17
|
-
exports.CreditCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
17
|
+
exports.CreditCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
18
18
|
const [isAnnuity, toggleIsAnnuity] = (0, hooks_1.useState)(false);
|
|
19
|
-
const [isInsurance, toggleIsInsurance] = (0, hooks_1.useState)(true);
|
|
20
19
|
const [isSalaryClient, toggleIsSalaryClient] = (0, hooks_1.useState)(false);
|
|
20
|
+
const handleIsSalaryClient = (0, hooks_1.useCallback)((_) => toggleIsSalaryClient(_), []);
|
|
21
21
|
const [isStateEmployee, toggleIsStateEmployee] = (0, hooks_1.useState)(false);
|
|
22
|
+
const handleIsStateEmployee = (0, hooks_1.useCallback)((_) => toggleIsStateEmployee(_), []);
|
|
23
|
+
const [isPensionClient, toggleIsPensionClient] = (0, hooks_1.useState)(false);
|
|
24
|
+
const handleIsPensionClient = (0, hooks_1.useCallback)((_) => toggleIsPensionClient(_), []);
|
|
25
|
+
const [isInsurance, toggleIsInsurance] = (0, hooks_1.useState)(true);
|
|
26
|
+
const handleIsInsurance = (0, hooks_1.useCallback)((_) => toggleIsInsurance(_), []);
|
|
22
27
|
const [moneyValue, setMoneyValue] = (0, hooks_1.useState)(constants_1.DEFAULT_SUM);
|
|
23
28
|
const handleMoneyValue = (0, hooks_1.useCallback)((_) => setMoneyValue(_), []);
|
|
24
29
|
const [monthsValue, setMonthsValue] = (0, hooks_1.useState)(constants_1.DEFAULT_MONTHS);
|
|
@@ -27,15 +32,25 @@ exports.CreditCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', sourceBookD
|
|
|
27
32
|
isAnnuity,
|
|
28
33
|
isInsurance,
|
|
29
34
|
isSalaryClient,
|
|
35
|
+
isPensionClient,
|
|
30
36
|
isStateEmployee,
|
|
31
37
|
moneyValue,
|
|
32
38
|
monthsValue,
|
|
33
39
|
};
|
|
34
|
-
const calculatorParams = (0, useCreditCalculatorParams_1.useCreditCalculatorParams)(userInputParams, sourceBookDir);
|
|
35
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: (0, style_1.style)('flex justify-between', className), children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), (0, renderMonthsInput_1.renderMonthsInput)('Срок кредита, месяцев', calculatorParams, handleMonthsValue), (0, jsx_runtime_1.
|
|
40
|
+
const calculatorParams = (0, useCreditCalculatorParams_1.useCreditCalculatorParams)(userInputParams, sourceBookDir, paramsViewSettings);
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: (0, style_1.style)('flex justify-between', className), children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), (0, renderMonthsInput_1.renderMonthsInput)('Срок кредита, месяцев', calculatorParams, handleMonthsValue), (0, jsx_runtime_1.jsx)("div", { className: "mt-7", children: renderCreditParamsForm({
|
|
42
|
+
...calculatorParams,
|
|
43
|
+
...paramsViewSettings,
|
|
44
|
+
handleIsSalaryClient,
|
|
45
|
+
handleIsStateEmployee,
|
|
46
|
+
handleIsPensionClient,
|
|
47
|
+
handleIsInsurance,
|
|
48
|
+
}) })] }), renderRate(calculatorParams.rate), (0, jsx_runtime_1.jsxs)("div", { className: "w-full max-w-[350px]", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), (0, renderPaymentType_1.renderPaymentType)({
|
|
36
49
|
isAnnuity,
|
|
37
50
|
orientation: 'vertical',
|
|
38
51
|
callback: toggleIsAnnuity,
|
|
39
52
|
}), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { className: 'mt-7', isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
|
|
40
53
|
});
|
|
54
|
+
const renderRate = (rate) => ((0, jsx_runtime_1.jsx)(Rate_1.Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
|
|
55
|
+
const renderCreditParamsForm = ({ isSalaryClient, isStateEmployee, isPensionClient, isInsurance, isShowSalaryClient, isShowStateEmployee, isShowPensionClient, isShowInsurance, handleIsSalaryClient, handleIsStateEmployee, handleIsPensionClient, handleIsInsurance, }) => ((0, jsx_runtime_1.jsxs)("div", { children: [isShowSalaryClient ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: handleIsSalaryClient })) : null, isShowStateEmployee ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: handleIsStateEmployee })) : null, isShowPensionClient ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isPensionClient, onChange: handleIsPensionClient })) : null, isShowInsurance ? ((0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: handleIsInsurance })) : null] }));
|
|
41
56
|
//# sourceMappingURL=CreditCalculatorForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/CreditCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AACpE,mFAAgF;AAChF,6DAA0D;AAC1D,6CAA0C;
|
|
1
|
+
{"version":3,"file":"CreditCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/CreditCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AACpE,mFAAgF;AAChF,6DAA0D;AAC1D,6CAA0C;AAK1C,iEAA8D;AAC9D,2CAA0D;AAC1D,iCAA8B;AAC9B,qDAAkD;AAClD,2DAAwD;AACxD,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AAC,CAAC,CACjB,uBAAC,mBAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,gKAA8B,EACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,iBAAiB,GAC3B,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonCalculatorProps
|
|
2
|
-
export interface DepositCalculatorProp extends
|
|
1
|
+
import { CommonCalculatorProps } from './CalculatorContent';
|
|
2
|
+
export interface DepositCalculatorProp extends CommonCalculatorProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const DepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<DepositCalculatorProp, any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":";;AAKa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,WAAW,GAAG,CAAC,uBAAe,GAAG,uBAAe,CAAC,GAAG,CAAC,CAAC;AACtD,QAAA,kBAAkB,GAAG,EAAE,CAAC;AACxB,QAAA,kBAAkB,GAAG,EAAE,CAAC;AACxB,QAAA,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,0BAAkB,GAAG,0BAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3E,QAAA,oBAAoB,GAAG,MAAM,CAAC;AAC9B,QAAA,iBAAiB,GAAG,CAAC,CAAC;AACtB,QAAA,iBAAiB,GAAG,IAAI,CAAC;AACzB,QAAA,sBAAsB,GAAG,EAAE,CAAC,CAAC,wDAAwD;AACrF,QAAA,2BAA2B,GAAG,EAAE,CAAC;AACjC,QAAA,2BAA2B,GAAG,GAAG,CAAC;AAClC,QAAA,qBAAqB,GAAG,EAAE,CAAC;AAC3B,QAAA,cAAc,GAAG,EAAE,CAAC;A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AAE5B,QAAA,+BAA+B,GAAoC;IAC9E,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,CAAC;IAChB,mBAAmB,EAAE,KAAK;IAC1B,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEW,QAAA,iCAAiC,GAAsC;IAClF,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;IAC9B,oBAAoB,EAAE,IAAI;CAC3B,CAAC;AAEW,QAAA,0CAA0C,GACrD;IACE,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,yBAAiB;IAC1B,OAAO,EAAE,yBAAiB;IAC1B,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;IAC9B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAES,QAAA,uBAAuB,GAAG,wBAAwB,CAAC;AACnD,QAAA,sBAAsB,GAAG,uBAAuB,CAAC;AACjD,QAAA,wBAAwB,GAAG,yBAAyB,CAAC;AACrD,QAAA,iCAAiC,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { CreditCalculatorParamsViewSettings } from './CalculatorContent';
|
|
1
2
|
export interface CommonCreditParams {
|
|
2
3
|
isInsurance: boolean;
|
|
3
4
|
isSalaryClient: boolean;
|
|
5
|
+
isPensionClient: boolean;
|
|
4
6
|
isStateEmployee: boolean;
|
|
5
7
|
}
|
|
6
8
|
export interface CreditCalculatorSourceBookParams extends CommonCreditParams {
|
|
@@ -21,4 +23,4 @@ export interface CreditCalculatorParams extends CreditCalculatorSourceBookParams
|
|
|
21
23
|
export declare type CreditCalculatorData = {
|
|
22
24
|
rows: CreditCalculatorSourceBookParams[];
|
|
23
25
|
};
|
|
24
|
-
export declare const useCreditCalculatorParams: (userInputParams: CreditCalculatorUserInputParams, sourceBookDir?: string) => CreditCalculatorParams;
|
|
26
|
+
export declare const useCreditCalculatorParams: (userInputParams: CreditCalculatorUserInputParams, sourceBookDir?: string, paramsViewSettings?: CreditCalculatorParamsViewSettings) => CreditCalculatorParams;
|
|
@@ -4,15 +4,40 @@ const constants_1 = require("./constants");
|
|
|
4
4
|
const getMonthlyPayment_1 = require("./getMonthlyPayment");
|
|
5
5
|
const rangeHelpers_1 = require("./rangeHelpers");
|
|
6
6
|
const useCalculatorParams_1 = require("./useCalculatorParams");
|
|
7
|
-
const useCreditCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
8
|
-
const {
|
|
7
|
+
const useCreditCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
|
|
8
|
+
const { moneyValue, monthsValue } = userInputParams;
|
|
9
9
|
const data = (0, useCalculatorParams_1.useCalculatorParams)(sourceBookDir || constants_1.CREDIT_CALC_DEFAULT_DIR);
|
|
10
|
-
const creditCalculatorSourceBookParams = data?.rows?.find((
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const creditCalculatorSourceBookParams = data?.rows?.find((row) => {
|
|
11
|
+
const isExcludeSalaryClient = !paramsViewSettings?.isShowSalaryClient;
|
|
12
|
+
const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
|
|
13
|
+
const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
|
|
14
|
+
const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
|
|
15
|
+
return (checkRowByParam({
|
|
16
|
+
row,
|
|
17
|
+
userInputParams,
|
|
18
|
+
paramKey: 'isSalaryClient',
|
|
19
|
+
isExclude: isExcludeSalaryClient,
|
|
20
|
+
}) &&
|
|
21
|
+
checkRowByParam({
|
|
22
|
+
row,
|
|
23
|
+
userInputParams,
|
|
24
|
+
paramKey: 'isStateEmployee',
|
|
25
|
+
isExclude: isExcludeStateEmployee,
|
|
26
|
+
}) &&
|
|
27
|
+
checkRowByParam({
|
|
28
|
+
row,
|
|
29
|
+
userInputParams,
|
|
30
|
+
paramKey: 'isPensionClient',
|
|
31
|
+
isExclude: isExcludePensionClient,
|
|
32
|
+
}) &&
|
|
33
|
+
checkRowByParam({
|
|
34
|
+
row,
|
|
35
|
+
userInputParams,
|
|
36
|
+
paramKey: 'isInsurance',
|
|
37
|
+
isExclude: isExcludeInsurance,
|
|
38
|
+
}) &&
|
|
39
|
+
(0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], row) &&
|
|
40
|
+
(0, rangeHelpers_1.checkRangeByKeys)(monthsValue, ['minMonths', 'maxMonths'], row));
|
|
16
41
|
}) || constants_1.DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
17
42
|
const { rate } = creditCalculatorSourceBookParams;
|
|
18
43
|
const monthlyPayment = (0, getMonthlyPayment_1.getMonthlyPayment)(rate, userInputParams);
|
|
@@ -26,4 +51,5 @@ const useCreditCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
|
26
51
|
};
|
|
27
52
|
};
|
|
28
53
|
exports.useCreditCalculatorParams = useCreditCalculatorParams;
|
|
54
|
+
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
|
|
29
55
|
//# sourceMappingURL=useCreditCalculatorParams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreditCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useCreditCalculatorParams.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useCreditCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useCredit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CAAC,EAAE,GAAG,CAAC,CAC/D,CAAC;IACJ,CAAC,CAAC,IAAI,4CAAgC,CAAC;IAEzC,MAAM,EAAE,IAAI,EAAE,GAAG,gCAAgC,CAAC;IAClD,MAAM,cAAc,GAAG,IAAA,qCAAiB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAChE,MAAM,cAAc,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC,4CAAgC,CAAC,CAAC;IAExE,OAAO;QACL,GAAG,gCAAgC;QACnC,GAAG,IAAA,6BAAc,EAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC;QACvD,GAAG,IAAA,6BAAc,EAAC,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC;QAC7D,GAAG,eAAe;QAClB,cAAc;KACf,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,yBAAyB,6BAuDpC;AASF,MAAM,eAAe,GAAG,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAC9F,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ exports.Carousel = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const renderBlock_1 = require("../../BlockRenderer/renderBlock");
|
|
6
7
|
const renderChildren_1 = require("../../BlockRenderer/renderChildren");
|
|
7
8
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
8
9
|
const SwipeListContainer_1 = require("../../ui-kit/SwipeListControl/SwipeListContainer");
|
|
@@ -10,7 +11,7 @@ const useSwipeListScroll_1 = require("../../ui-kit/SwipeListControl/useSwipeList
|
|
|
10
11
|
const style_1 = require("../../utils/style");
|
|
11
12
|
const CarouselScrollButtons_1 = require("./CarouselScrollButtons");
|
|
12
13
|
const ITEMS_GAP = 4;
|
|
13
|
-
exports.Carousel = (0, uni_jsx_1.JSX)(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true,
|
|
14
|
+
exports.Carousel = (0, uni_jsx_1.JSX)(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, ...rest }) => {
|
|
14
15
|
const { blocks: childBlocks } = rest.block || {};
|
|
15
16
|
const count = itemCount || childBlocks?.length || 0;
|
|
16
17
|
const [activeIndex, setActiveIndex] = (0, hooks_1.useState)(Math.floor((visibleItemCount || 0) / 2));
|
|
@@ -21,18 +22,15 @@ exports.Carousel = (0, uni_jsx_1.JSX)(({ className = '', itemCount, visibleItemC
|
|
|
21
22
|
isCyclic,
|
|
22
23
|
});
|
|
23
24
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative max-w-full", children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
options
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
: (0, renderChildren_1.renderChildren)({ ...rest, options }) }), (0, jsx_runtime_1.jsx)(CarouselScrollButtons_1.CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative max-w-full", children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: (0, renderChildren_1.renderChildren)({
|
|
26
|
+
...rest,
|
|
27
|
+
renderProps: isBankHistoryCarousel
|
|
28
|
+
? (block, options) => (0, renderBlock_1.renderBlock)(block, options, {
|
|
29
|
+
blocksLength: childBlocks?.length,
|
|
30
|
+
activeIndex: activeIndex,
|
|
31
|
+
})
|
|
32
|
+
: renderBlock_1.renderBlock,
|
|
33
|
+
}) }), (0, jsx_runtime_1.jsx)(CarouselScrollButtons_1.CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
|
|
36
34
|
});
|
|
37
35
|
exports.Carousel.childrenTypes = [
|
|
38
36
|
'CarouselCard',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AACpE,uEAAoE;AAEpE,4DAAyD;AACzD,yFAAsF;AACtF,yFAAsF;AACtF,6CAA0C;AAE1C,mEAAgE;AAMhE,MAAM,SAAS,GAAG,CAAC,CAAC;AAEP,QAAA,QAAQ,GAA4B,IAA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AAqB;IACrB,wBAAwB;IACxB,qBAAqB;IACrB,sBAAsB;IACtB,4BAA4B;IAC5B,qBAAqB;IACrB,wBAAwB;IACxB,mBAAmB;CACpB,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAkB,EAAU,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -13,5 +13,5 @@ const cardStyleMap = {
|
|
|
13
13
|
white: 'bg-white',
|
|
14
14
|
};
|
|
15
15
|
exports.CarouselCatalogCard = (0, uni_jsx_1.JSX)(({ className = '', title, description, image, price, button, colors, ...rest }) => ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${className}`, ...rest, children: [image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mb-5 flex justify-center", image: image }) : null, title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? ((0, jsx_runtime_1.jsx)("div", { className: "mb-4", children: (0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-m", align: "text-left", font: "font-light", children: description }) })) : null, colors?.length ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex mb-4 text-s-light text-secondary-text", children: [(0, jsx_runtime_1.jsx)("div", { className: "mr-1.5", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }) }), colors.map(renderColorOption)] })) : null, price ? ((0, jsx_runtime_1.jsxs)(Text_1.Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, (0, renderButtonsSection_1.renderButtonsSection)([button], { buttonClassName: 'mt-5 w-full' })] })));
|
|
16
|
-
const renderColorOption = (color, i) => ((0, jsx_runtime_1.jsx)("
|
|
16
|
+
const renderColorOption = (color, i) => ((0, jsx_runtime_1.jsx)("div", { role: "figure", className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
17
17
|
//# sourceMappingURL=CarouselCatalogCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselCatalogCard.js","sourceRoot":"","sources":["../../../src/components/CarouselCatalogCard/CarouselCatalogCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,gEAA6D;AAC7D,iDAA8C;AAK9C,MAAM,YAAY,GAAwC;IACxD,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,UAAU;CAClB,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACjF,wBAAC,2BAAY,IACX,SAAS,EAAE,qFAAqF,SAAS,EAAE,KACvG,IAAI,aAEP,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,SAAS,EAAC,0BAA0B,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC9E,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,KAAK,GAAI,CAChF,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,qBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,IAAI,EAAC,YAAY,YACzD,WAAW,GACF,GACR,CACP,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,iCAAK,SAAS,EAAC,4CAA4C,aACzD,gCAAK,SAAS,EAAC,QAAQ,YACrB,uBAAC,WAAI,0GAAyB,GAC1B,EACL,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAC1B,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,wBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,WAAW,aACnC,KAAK,oBACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,IACtD,CAChB,CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAA0B,EAAE,CAAS,EAAE,EAAE,CAAC,CACnE,
|
|
1
|
+
{"version":3,"file":"CarouselCatalogCard.js","sourceRoot":"","sources":["../../../src/components/CarouselCatalogCard/CarouselCatalogCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,gEAA6D;AAC7D,iDAA8C;AAK9C,MAAM,YAAY,GAAwC;IACxD,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,UAAU;CAClB,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACjF,wBAAC,2BAAY,IACX,SAAS,EAAE,qFAAqF,SAAS,EAAE,KACvG,IAAI,aAEP,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,SAAS,EAAC,0BAA0B,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC9E,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,KAAK,GAAI,CAChF,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,qBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,IAAI,EAAC,YAAY,YACzD,WAAW,GACF,GACR,CACP,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,iCAAK,SAAS,EAAC,4CAA4C,aACzD,gCAAK,SAAS,EAAC,QAAQ,YACrB,uBAAC,WAAI,0GAAyB,GAC1B,EACL,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAC1B,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,wBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,WAAW,aACnC,KAAK,oBACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,IACtD,CAChB,CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAA0B,EAAE,CAAS,EAAE,EAAE,CAAC,CACnE,gCACE,IAAI,EAAC,QAAQ,EAEb,SAAS,EAAE,qEAAqE,YAAY,CAAC,KAAK,CAAC,EAAE,IADhG,MAAM,CAAC,CAAC,CAAC,CAEd,CACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CarouselEventCardContent } from './CarouselEventCardContent';
|
|
2
1
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
+
import type { CarouselEventCardContent } from './CarouselEventCardContent';
|
|
3
3
|
export interface CarouselEventCardProps extends CarouselEventCardContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const CarouselEventCard: import("@redneckz/uni-jsx").UNIComponent<CarouselEventCardProps, any, any>;
|
|
@@ -3,16 +3,13 @@ exports.CarouselEventCard = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const getIconWithVersion_1 = require("../../utils/getIconWithVersion");
|
|
7
6
|
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
7
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
|
-
const
|
|
8
|
+
const LinkWrapper_1 = require("../../ui-kit/LinkWrapper/LinkWrapper");
|
|
10
9
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
11
|
-
const
|
|
10
|
+
const getIconWithVersion_1 = require("../../utils/getIconWithVersion");
|
|
11
|
+
const style_1 = require("../../utils/style");
|
|
12
12
|
exports.CarouselEventCard = (0, uni_jsx_1.JSX)(({ className = '', icon, title, description, href, target, ...rest }) => {
|
|
13
|
-
|
|
14
|
-
const adjustedProps = link({ href, target });
|
|
15
|
-
const tagName = href ? 'a' : 'section';
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('flex flex-col w-[365px]', className), extraProps: adjustedProps, tag: tagName, ...rest, children: [icon?.icon ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: (0, getIconWithVersion_1.getIconWithVersion)(icon), asSVG: true }) : null, icon?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: icon }) : null, title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h6", as: "h4", className: "text-left mb-2", title: title })) : null, description ? ((0, jsx_runtime_1.jsx)("div", { className: "mb-4", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { font: "font-light", size: "text-s", color: "text-secondary-text", children: description }) })) : null] }));
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('w-[365px]', className), ...rest, children: (0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [icon?.icon ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: (0, getIconWithVersion_1.getIconWithVersion)(icon), asSVG: true }) : null, icon?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: icon }) : null, title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h6", as: "h4", className: "text-left mb-2", title: title })) : null, description ? ((0, jsx_runtime_1.jsx)("div", { className: "mb-4", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { font: "font-light", size: "text-s", color: "text-secondary-text", children: description }) })) : null] }) }));
|
|
17
14
|
});
|
|
18
15
|
//# sourceMappingURL=CarouselEventCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselEventCard.js","sourceRoot":"","sources":["../../../src/components/CarouselEventCard/CarouselEventCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"CarouselEventCard.js","sourceRoot":"","sources":["../../../src/components/CarouselEventCard/CarouselEventCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,0DAAuD;AACvD,8CAA2C;AAC3C,sEAAmE;AACnE,iDAA8C;AAC9C,uEAAoE;AACpE,6CAA0C;AAK7B,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACtE,OAAO,CACL,uBAAC,2BAAY,IAAC,SAAS,EAAE,IAAA,aAAK,EAAC,WAAW,EAAE,SAAS,CAAC,KAAM,IAAI,YAC9D,wBAAC,yBAAW,IAAC,SAAS,EAAC,eAAe,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAC9D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,KAAK,EAAE,IAAA,uCAAkB,EAAC,IAAI,CAAC,EAAE,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,EAClE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,KAAK,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,EACvC,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,gBAAgB,EAAC,KAAK,EAAE,KAAK,GAAI,CAC9E,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,WAAI,IAAC,IAAI,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,qBAAqB,YAC9D,WAAW,GACP,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACI,GACD,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CarouselProductCardContent } from './CarouselProductCardContent';
|
|
2
1
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
+
import type { CarouselProductCardContent } from './CarouselProductCardContent';
|
|
3
3
|
export interface CarouselProductCardProps extends CarouselProductCardContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const CarouselProductCard: import("@redneckz/uni-jsx").UNIComponent<CarouselProductCardProps, any, any>;
|
|
@@ -3,22 +3,19 @@ exports.CarouselProductCard = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const
|
|
6
|
+
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
7
7
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
8
|
+
const LinkWrapper_1 = require("../../ui-kit/LinkWrapper/LinkWrapper");
|
|
8
9
|
const List_1 = require("../../ui-kit/List/List");
|
|
9
10
|
const Paragraph_1 = require("../../ui-kit/Paragraph/Paragraph");
|
|
10
|
-
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
11
|
-
const style_1 = require("../../utils/style");
|
|
12
11
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
13
|
-
const
|
|
12
|
+
const style_1 = require("../../utils/style");
|
|
13
|
+
const headlineVersionStyles_1 = require("../Headline/headlineVersionStyles");
|
|
14
14
|
exports.CarouselProductCard = (0, uni_jsx_1.JSX)(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, items = [], target, title, version = 'primary', ...rest }) => {
|
|
15
|
-
|
|
16
|
-
const adjustedProps = link({ href, target });
|
|
17
|
-
const tagName = href ? 'a' : 'section';
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6', 'box-border border-solid border border-gray', align, className), extraProps: adjustedProps, tag: tagName, version: version, ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col h-full", children: [renderImage(icon), renderCardTitle(headlineSmallVersion, title), renderDescription(description, title), renderItems(items, isDotted, version), renderAdditionalDescription(additionalDescription)] }), (0, renderButtonsSection_1.renderButtonsSection)([button], { buttonClassName: 'mt-6 w-full' })] }));
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [(0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage(icon), renderCardTitle(headlineSmallVersion, title), renderDescription(description, title), renderItems(items, isDotted, version), renderAdditionalDescription(additionalDescription)] }), (0, renderButtonsSection_1.renderButtonsSection)([button], { className: 'p-6 pt-0', isVertical: true })] }));
|
|
19
16
|
});
|
|
20
17
|
const renderImage = (image) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-center", children: [image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mb-5", image: image }) : null, image?.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image, asSVG: true })) : null] }));
|
|
21
|
-
const renderCardTitle = (headlineSmallVersion, title) => title ? (0, jsx_runtime_1.jsx)(Text_1.Text, { size: headlineVersionStyles_1.HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
18
|
+
const renderCardTitle = (headlineSmallVersion, title) => title ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: headlineVersionStyles_1.HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) })) : null;
|
|
22
19
|
const renderDescription = (description, title) => description ? ((0, jsx_runtime_1.jsx)("div", { className: title ? 'mt-2' : '', children: (0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-l", children: description }) })) : null;
|
|
23
20
|
const renderAdditionalDescription = (additionalDescription) => additionalDescription ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-auto", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", children: additionalDescription }) })) : null;
|
|
24
21
|
const renderItems = (items, isDotted, version = 'primary') => items?.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted })) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselProductCard.js","sourceRoot":"","sources":["../../../src/components/CarouselProductCard/CarouselProductCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"CarouselProductCard.js","sourceRoot":"","sources":["../../../src/components/CarouselProductCard/CarouselProductCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,4DAAyD;AACzD,mFAAgF;AAChF,8CAA2C;AAC3C,sEAAmE;AACnE,iDAA8C;AAC9C,gEAA6D;AAC7D,iDAA8C;AAC9C,6CAA0C;AAC1C,6EAA2E;AAK9D,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EACC,qBAAqB,EACrB,KAAK,GAAG,aAAa,EACrB,MAAM,GAAG,EAAE,EACX,SAAS,GAAG,EAAE,EACd,WAAW,EACX,oBAAoB,GAAG,IAAI,EAC3B,IAAI,EACJ,IAAI,EACJ,QAAQ,GAAG,IAAI,EACf,KAAK,GAAG,EAAE,EACV,MAAM,EACN,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,wBAAC,2BAAY,IACX,SAAS,EAAE,IAAA,aAAK,EACd,+BAA+B,EAC/B,4CAA4C,EAC5C,KAAK,EACL,SAAS,CACV,EACD,OAAO,EAAE,OAAO,KACZ,IAAI,aAER,wBAAC,yBAAW,IAAC,SAAS,EAAC,KAAK,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aACpD,WAAW,CAAC,IAAI,CAAC,EACjB,eAAe,CAAC,oBAAoB,EAAE,KAAK,CAAC,EAC5C,iBAAiB,CAAC,WAAW,E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B,CAAC,CAAC,CAAC,CACtB,gCAAK,SAAS,EAAC,SAAS,YACtB,uBAAC,WAAI,IACH,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,wDAAwD,YAE7D,qBAAqB,GACjB,GACH,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AAEX,MAAM,WAAW,GAAG,CAAC,KAAkB,EAAE,QAAiB,EAAE,UAAwB,SAAS,EAAE,EAAE,CAC/F,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,uBAAC,WAAI,IACH,SAAS,EAAE,6BAA6B,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,EAAE,EAC7F,aAAa,EAAC,WAAW,EACzB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAc,CAAC,EAC5E,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -5,14 +5,11 @@ const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
6
|
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
7
7
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
8
|
+
const LinkWrapper_1 = require("../../ui-kit/LinkWrapper/LinkWrapper");
|
|
8
9
|
const getIconWithVersion_1 = require("../../utils/getIconWithVersion");
|
|
9
|
-
const useLink_1 = require("../../hooks/useLink");
|
|
10
10
|
const style_1 = require("../../utils/style");
|
|
11
11
|
exports.CarouselProgramsCard = (0, uni_jsx_1.JSX)(({ className = '', title, icon, list = [], href, target, ...rest }) => {
|
|
12
|
-
|
|
13
|
-
const adjustedProps = link({ href, target });
|
|
14
|
-
const tagName = href ? 'a' : 'section';
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { tag: tagName, className: (0, style_1.style)('border border-gray flex min-w-[536px]', className), extraProps: adjustedProps, ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: (0, getIconWithVersion_1.getIconWithVersion)(icon), asSVG: true }) : null, icon?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: icon }) : null] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-8 pl-3 w-full", children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { className: " mb-3.5", headingType: "h5", title: title }) : null, list.length ? (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-3", children: list?.map(renderList) }) : null] })] }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('border border-gray min-w-[536px]', className), ...rest, children: (0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { className: "flex", href: href, target: target, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: (0, getIconWithVersion_1.getIconWithVersion)(icon), asSVG: true }) : null, icon?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: icon }) : null] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-8 pl-3 w-full", children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { className: " mb-3.5", headingType: "h5", title: title }) : null, list.length ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-3", children: list?.map(renderList) })) : null] })] }) }));
|
|
16
13
|
});
|
|
17
14
|
const renderList = (_, i) => ((0, jsx_runtime_1.jsxs)("div", { className: "break-words", children: [_.title ? (0, jsx_runtime_1.jsx)("div", { className: `text-h6`, children: _.title }) : null, _.description ? (0, jsx_runtime_1.jsx)("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
|
|
18
15
|
//# sourceMappingURL=CarouselProgramsCard.js.map
|