@redneckz/wildless-cms-uni-blocks 0.14.49 → 0.14.51
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.14.31.js +66 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +47 -58
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +7 -3
- package/bundle/components/Bonus/BonusContent.d.ts +7 -3
- package/bundle/components/Calculator/CalculatorContent.d.ts +14 -5
- package/bundle/components/LinkDocs/LinkDocsContent.d.ts +9 -5
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +7 -3
- package/bundle/components/TariffsTable/TariffsTableContent.d.ts +7 -3
- package/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +5 -2
- package/bundle/model/EmptyOptionType.d.ts +1 -3
- package/bundle/model/JSXBlock.d.ts +2 -2
- package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +7 -3
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -4
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +1 -1
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/Bonus/BonusContent.d.ts +7 -3
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +14 -5
- package/dist/components/LinkDocs/LinkDocs.js +3 -0
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +9 -5
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +7 -3
- package/dist/components/ProductBlock/ProductBlock.js +1 -13
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.js +1 -8
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +7 -3
- package/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +5 -2
- package/dist/components/TariffsTable/TariffsTableRenderCell.js +14 -14
- package/dist/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/dist/model/EmptyOptionType.d.ts +1 -3
- package/dist/model/JSXBlock.d.ts +2 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/dist/ui-kit/BaseTile/BaseTile.js +16 -5
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +7 -3
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -4
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +1 -1
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/Bonus/BonusContent.d.ts +7 -3
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +14 -5
- package/lib/components/LinkDocs/LinkDocs.js +3 -0
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +9 -5
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +7 -3
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +2 -0
- package/lib/components/ProductBlock/ProductBlock.js +2 -14
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.js +2 -9
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +7 -3
- package/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +5 -1
- package/lib/components/TariffsTable/TariffsTableRenderCell.js +13 -12
- package/lib/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/lib/model/EmptyOptionType.d.ts +1 -3
- package/lib/model/JSXBlock.d.ts +2 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/lib/ui-kit/BaseTile/BaseTile.js +16 -5
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +47 -58
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +7 -3
- package/mobile/bundle/components/Bonus/BonusContent.d.ts +7 -3
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +14 -5
- package/mobile/bundle/components/LinkDocs/LinkDocsContent.d.ts +9 -5
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +7 -3
- package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +7 -3
- package/mobile/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +5 -2
- package/mobile/bundle/model/EmptyOptionType.d.ts +1 -3
- package/mobile/bundle/model/JSXBlock.d.ts +2 -2
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/mobile/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +7 -3
- package/mobile/dist/components/Blocks.js +0 -4
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/Bonus/BonusContent.d.ts +7 -3
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +14 -5
- package/mobile/dist/components/LinkDocs/LinkDocs.js +3 -0
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +9 -5
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +7 -3
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -13
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +1 -8
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +7 -3
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +5 -2
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js +14 -14
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/mobile/dist/model/EmptyOptionType.d.ts +1 -3
- package/mobile/dist/model/JSXBlock.d.ts +2 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +16 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +7 -3
- package/mobile/lib/components/Blocks.js +0 -4
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +1 -1
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/Bonus/BonusContent.d.ts +7 -3
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +14 -5
- package/mobile/lib/components/LinkDocs/LinkDocs.js +3 -0
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +9 -5
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +7 -3
- package/mobile/lib/components/ProductBlock/ProductBlock.js +2 -14
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +2 -9
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +7 -3
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +5 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js +13 -12
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/mobile/lib/model/EmptyOptionType.d.ts +1 -3
- package/mobile/lib/model/JSXBlock.d.ts +2 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +16 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/src/common.css +4 -0
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +8 -3
- package/mobile/src/components/Blocks.ts +0 -4
- package/mobile/src/components/Bonus/Bonus.tsx +1 -1
- package/mobile/src/components/Bonus/BonusContent.ts +8 -3
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +1 -1
- package/mobile/src/components/Calculator/CalculatorContent.ts +16 -5
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +3 -0
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +10 -5
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +8 -3
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +13 -32
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +14 -11
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +8 -3
- package/mobile/src/components/TariffsTable/TariffsTableRenderCell.tsx +22 -18
- package/mobile/src/model/EmptyOptionType.ts +1 -3
- package/mobile/src/model/JSXBlock.ts +2 -2
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +48 -35
- package/package.json +1 -1
- package/src/common.css +4 -0
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +8 -3
- package/src/components/Blocks.mobile.ts +0 -4
- package/src/components/Blocks.ts +0 -4
- package/src/components/Bonus/Bonus.tsx +1 -1
- package/src/components/Bonus/BonusContent.ts +8 -3
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +1 -1
- package/src/components/Calculator/CalculatorContent.ts +16 -5
- package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +5 -5
- package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +5 -5
- package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +15 -15
- package/src/components/LinkDocs/LinkDocs.tsx +3 -0
- package/src/components/LinkDocs/LinkDocsContent.ts +10 -5
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +8 -8
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +8 -8
- package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +8 -3
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +41 -0
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +40 -0
- package/src/components/ProductBlock/ProductBlock.tsx +13 -32
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.mobile.tsx +9 -9
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +11 -11
- package/src/components/TariffsTable/TariffsTableCell.tsx +14 -11
- package/src/components/TariffsTable/TariffsTableContent.ts +8 -3
- package/src/components/TariffsTable/TariffsTableRenderCell.tsx +22 -18
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +3 -3
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +9 -10
- package/src/model/EmptyOptionType.ts +1 -3
- package/src/model/JSXBlock.ts +2 -2
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
- package/src/ui-kit/BaseTile/BaseTile.tsx +48 -35
- package/bundle/components/ProductTile/ProductTile.d.ts +0 -5
- package/bundle/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/bundle/components/Tile/Tile.d.ts +0 -5
- package/bundle/components/Tile/TileContent.d.ts +0 -6
- package/dist/components/ProductTile/ProductTile.d.ts +0 -5
- package/dist/components/ProductTile/ProductTile.js +0 -9
- package/dist/components/ProductTile/ProductTile.js.map +0 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/dist/components/ProductTile/ProductTileContent.js +0 -2
- package/dist/components/ProductTile/ProductTileContent.js.map +0 -1
- package/dist/components/Tile/Tile.d.ts +0 -5
- package/dist/components/Tile/Tile.js +0 -8
- package/dist/components/Tile/Tile.js.map +0 -1
- package/dist/components/Tile/TileContent.d.ts +0 -6
- package/dist/components/Tile/TileContent.js +0 -2
- package/dist/components/Tile/TileContent.js.map +0 -1
- package/lib/components/ProductTile/ProductTile.d.ts +0 -5
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +0 -17
- package/lib/components/ProductTile/ProductTile.fixture.mobile.d.ts +0 -16
- package/lib/components/ProductTile/ProductTile.js +0 -7
- package/lib/components/ProductTile/ProductTile.js.map +0 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/lib/components/ProductTile/ProductTileContent.js +0 -2
- package/lib/components/ProductTile/ProductTileContent.js.map +0 -1
- package/lib/components/Tile/Tile.d.ts +0 -5
- package/lib/components/Tile/Tile.fixture.d.ts +0 -15
- package/lib/components/Tile/Tile.fixture.mobile.d.ts +0 -9
- package/lib/components/Tile/Tile.js +0 -6
- package/lib/components/Tile/Tile.js.map +0 -1
- package/lib/components/Tile/TileContent.d.ts +0 -6
- package/lib/components/Tile/TileContent.js +0 -2
- package/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/bundle/components/ProductTile/ProductTile.d.ts +0 -5
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/mobile/bundle/components/Tile/Tile.d.ts +0 -5
- package/mobile/bundle/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/components/ProductTile/ProductTile.d.ts +0 -5
- package/mobile/dist/components/ProductTile/ProductTile.js +0 -9
- package/mobile/dist/components/ProductTile/ProductTile.js.map +0 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/mobile/dist/components/ProductTile/ProductTileContent.js +0 -2
- package/mobile/dist/components/ProductTile/ProductTileContent.js.map +0 -1
- package/mobile/dist/components/Tile/Tile.d.ts +0 -5
- package/mobile/dist/components/Tile/Tile.js +0 -8
- package/mobile/dist/components/Tile/Tile.js.map +0 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/components/Tile/TileContent.js +0 -2
- package/mobile/dist/components/Tile/TileContent.js.map +0 -1
- package/mobile/lib/components/ProductTile/ProductTile.d.ts +0 -5
- package/mobile/lib/components/ProductTile/ProductTile.js +0 -7
- package/mobile/lib/components/ProductTile/ProductTile.js.map +0 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/mobile/lib/components/ProductTile/ProductTileContent.js +0 -2
- package/mobile/lib/components/ProductTile/ProductTileContent.js.map +0 -1
- package/mobile/lib/components/Tile/Tile.d.ts +0 -5
- package/mobile/lib/components/Tile/Tile.js +0 -6
- package/mobile/lib/components/Tile/Tile.js.map +0 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +0 -6
- package/mobile/lib/components/Tile/TileContent.js +0 -2
- package/mobile/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +0 -44
- package/mobile/src/components/ProductTile/ProductTile.tsx +0 -40
- package/mobile/src/components/ProductTile/ProductTile.ui.json +0 -17
- package/mobile/src/components/ProductTile/ProductTileContent.ts +0 -10
- package/mobile/src/components/Tile/Tile.example.json +0 -28
- package/mobile/src/components/Tile/Tile.tsx +0 -23
- package/mobile/src/components/Tile/Tile.ui.json +0 -17
- package/mobile/src/components/Tile/TileContent.ts +0 -7
- package/src/components/ProductTile/ProductTile.example.json +0 -44
- package/src/components/ProductTile/ProductTile.fixture.mobile.tsx +0 -217
- package/src/components/ProductTile/ProductTile.fixture.tsx +0 -227
- package/src/components/ProductTile/ProductTile.tsx +0 -40
- package/src/components/ProductTile/ProductTile.ui.json +0 -17
- package/src/components/ProductTile/ProductTileContent.ts +0 -10
- package/src/components/Tile/Tile.example.json +0 -28
- package/src/components/Tile/Tile.fixture.mobile.tsx +0 -48
- package/src/components/Tile/Tile.fixture.tsx +0 -146
- package/src/components/Tile/Tile.tsx +0 -23
- package/src/components/Tile/Tile.ui.json +0 -17
- package/src/components/Tile/TileContent.ts +0 -7
|
@@ -1,44 +1,25 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import { useRouter } from '../../hooks/useRouter';
|
|
4
2
|
import { type UniBlockProps } from '../../model/JSXBlock';
|
|
5
3
|
import { BaseProductTile } from '../../ui-kit/BaseProductTile/BaseProductTile';
|
|
6
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
|
-
import { type PreventableEvent } from '../../ui-kit/PreventableEvent';
|
|
8
5
|
import { getBorderStyle } from '../../utils/getBorderStyle';
|
|
9
6
|
import { style } from '../../utils/style';
|
|
10
7
|
import { type ProductBlockContent } from './ProductBlockContent';
|
|
11
|
-
import { renderBackwardButton } from './renderBackwardButton';
|
|
12
8
|
|
|
13
9
|
export interface ProductBlockProps extends UniBlockProps, ProductBlockContent {}
|
|
14
10
|
|
|
15
11
|
export const ProductBlock = JSX<ProductBlockProps>(
|
|
16
|
-
({ className, padding,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)}
|
|
30
|
-
defaultPadding="p-6xl"
|
|
31
|
-
padding={padding}
|
|
32
|
-
{...rest}
|
|
33
|
-
>
|
|
34
|
-
{backwardButton
|
|
35
|
-
? renderBackwardButton(
|
|
36
|
-
!rest.version || rest.version === 'primary' ? 'primary' : 'white',
|
|
37
|
-
handleClick,
|
|
38
|
-
)
|
|
39
|
-
: null}
|
|
40
|
-
<BaseProductTile className="grow h-full" {...rest} />
|
|
41
|
-
</BlockWrapper>
|
|
42
|
-
);
|
|
43
|
-
},
|
|
12
|
+
({ className, padding, showBorder, ...rest }) => (
|
|
13
|
+
<BlockWrapper
|
|
14
|
+
className={style(
|
|
15
|
+
'overflow-hidden flex flex-col gap-3xl box-border',
|
|
16
|
+
getBorderStyle(showBorder),
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
padding="p-0"
|
|
20
|
+
{...rest}
|
|
21
|
+
>
|
|
22
|
+
<BaseProductTile defaultPadding="p-6xl" padding={padding} className="grow h-full" {...rest} />
|
|
23
|
+
</BlockWrapper>
|
|
24
|
+
),
|
|
44
25
|
);
|
|
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { type UniBlockProps } from '../../model/JSXBlock';
|
|
3
3
|
import { type TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
|
|
4
4
|
import { type CellDef } from './TariffsTableContent';
|
|
5
|
-
import {
|
|
5
|
+
import { RenderCellInner } from './TariffsTableRenderCell';
|
|
6
6
|
|
|
7
7
|
export interface TariffTableContentProps {
|
|
8
8
|
openTableInnerIdx?: number;
|
|
@@ -30,16 +30,19 @@ export const TariffsTableCell = JSX<TariffsTableCellProps>(
|
|
|
30
30
|
return (
|
|
31
31
|
<div className="w-80 flex-grow flex flex-col gap-m @4xl:gap-lg" role="cell">
|
|
32
32
|
{cells?.length
|
|
33
|
-
? cells.map(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
? cells.map((_, i) => (
|
|
34
|
+
<RenderCellInner
|
|
35
|
+
key={String(i)}
|
|
36
|
+
cell={_}
|
|
37
|
+
fieldIdx={i}
|
|
38
|
+
rowIdx={rowIdx}
|
|
39
|
+
cellIdx={cellIdx}
|
|
40
|
+
setTableInner={setTableInner}
|
|
41
|
+
tableInner={tableInner}
|
|
42
|
+
openTableInnerIdx={openTableInnerIdx}
|
|
43
|
+
setOpenTableInnerIdx={setOpenTableInnerIdx}
|
|
44
|
+
/>
|
|
45
|
+
))
|
|
43
46
|
: null}
|
|
44
47
|
</div>
|
|
45
48
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type EmptyOption } from '../../model/EmptyOptionType';
|
|
2
1
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
3
2
|
import { type UniBlockContent, type UniBlockProps } from '../../model/JSXBlock';
|
|
4
3
|
import { type IconProps } from '../../model/Picture';
|
|
@@ -89,12 +88,18 @@ export type InnerTableBlockDef = TariffsTableInnerContent & {
|
|
|
89
88
|
tableCellType: 'Table';
|
|
90
89
|
};
|
|
91
90
|
|
|
91
|
+
/** @title Не выбрано * */
|
|
92
|
+
export type EmptyCellType = {
|
|
93
|
+
/** @default "" */
|
|
94
|
+
tableCellType: '';
|
|
95
|
+
};
|
|
96
|
+
|
|
92
97
|
/**
|
|
93
98
|
* @title Содержимое ячейки
|
|
94
|
-
* @default
|
|
99
|
+
* @default { "tableCellType": "" }
|
|
95
100
|
*/
|
|
96
101
|
export type CellDef =
|
|
97
|
-
|
|
|
102
|
+
| EmptyCellType
|
|
98
103
|
| ImageCellDef
|
|
99
104
|
| ButtonsCellDef
|
|
100
105
|
| LabelDescriptionCellDef
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
1
2
|
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { type TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
|
|
3
4
|
import { EmbeddableCellData } from './EmbeddableCellData';
|
|
@@ -22,16 +23,22 @@ interface CellProps {
|
|
|
22
23
|
displayTable: (props: TariffsTableInnerContent) => void;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
export
|
|
26
|
+
export interface RenderCellInnerProps extends TariffTableCellInnerProps {
|
|
27
|
+
cell: CellDef;
|
|
28
|
+
fieldIdx: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const RenderCellInner = JSX<RenderCellInnerProps>(
|
|
26
32
|
({
|
|
33
|
+
cell,
|
|
34
|
+
fieldIdx,
|
|
27
35
|
rowIdx,
|
|
28
36
|
cellIdx,
|
|
29
37
|
setTableInner,
|
|
30
38
|
tableInner,
|
|
31
39
|
openTableInnerIdx,
|
|
32
40
|
setOpenTableInnerIdx,
|
|
33
|
-
}
|
|
34
|
-
(cell: CellDef, i: number) => {
|
|
41
|
+
}) => {
|
|
35
42
|
const [isVisible, setVisibility] = useState(true);
|
|
36
43
|
|
|
37
44
|
useEffect(() => {
|
|
@@ -46,21 +53,18 @@ export const renderCellInner =
|
|
|
46
53
|
setTableInner(props);
|
|
47
54
|
};
|
|
48
55
|
|
|
49
|
-
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
56
|
+
return renderCell({
|
|
57
|
+
cell,
|
|
58
|
+
cellProps: {
|
|
59
|
+
rowIdx,
|
|
60
|
+
cellIdx,
|
|
61
|
+
fieldIdx,
|
|
62
|
+
displayTable,
|
|
63
|
+
isVisible,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
);
|
|
64
68
|
|
|
65
69
|
const renderCell = ({ cell, cellProps }: RenderCellProps) => {
|
|
66
70
|
if (!cell) {
|
|
@@ -9,9 +9,9 @@ import { type VNode } from './VNode';
|
|
|
9
9
|
/**
|
|
10
10
|
* @title Внутренний отступ
|
|
11
11
|
* @default ""
|
|
12
|
-
* @enumNames ["По умолчанию", "Большой", "Средний", "Маленький", "Оч. маленький", "Нулевой"]
|
|
12
|
+
* @enumNames ["По умолчанию", "Оч. Большой", "Большой", "Средний", "Маленький", "Оч. маленький", "Нулевой"]
|
|
13
13
|
*/
|
|
14
|
-
export type UniBlockPadding = '' | 'p-3xl' | 'p-xl' | 'p-m' | 'p-xs' | 'p-0';
|
|
14
|
+
export type UniBlockPadding = '' | 'p-6xl' | 'p-3xl' | 'p-xl' | 'p-m' | 'p-xs' | 'p-0';
|
|
15
15
|
|
|
16
16
|
export interface UniBlockContent {
|
|
17
17
|
version?: BlockVersion;
|
|
@@ -14,7 +14,9 @@ import { Tags } from '../Tags/Tags';
|
|
|
14
14
|
import { type TextAlign } from '../Text/TextProps';
|
|
15
15
|
import { type BaseProductTileContent } from './BaseProductTileContent';
|
|
16
16
|
|
|
17
|
-
interface BaseProductTileProps extends UniBlockProps, BaseProductTileContent {
|
|
17
|
+
interface BaseProductTileProps extends UniBlockProps, BaseProductTileContent {
|
|
18
|
+
backwardButton?: boolean;
|
|
19
|
+
}
|
|
18
20
|
|
|
19
21
|
export const BaseProductTile = JSX<BaseProductTileProps>(
|
|
20
22
|
({
|
|
@@ -43,6 +45,7 @@ export const BaseProductTile = JSX<BaseProductTileProps>(
|
|
|
43
45
|
isImageAlwaysOnRight,
|
|
44
46
|
isImageSecondary = false,
|
|
45
47
|
} = {},
|
|
48
|
+
backwardButton,
|
|
46
49
|
children,
|
|
47
50
|
}) => {
|
|
48
51
|
const img = image?.src ? <Img image={image} /> : null;
|
|
@@ -62,6 +65,7 @@ export const BaseProductTile = JSX<BaseProductTileProps>(
|
|
|
62
65
|
imageAlign={imageAlign}
|
|
63
66
|
isImageAlwaysOnRight={isImageAlwaysOnRight}
|
|
64
67
|
buttons={renderButtonsSection(buttons)}
|
|
68
|
+
backwardButton={backwardButton}
|
|
65
69
|
>
|
|
66
70
|
<div className="flex flex-col sm:gap-xl gap-4xl">
|
|
67
71
|
{filteredBenefits?.length ? (
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { renderBackwardButton } from '../../components/ProductBlock/renderBackwardButton';
|
|
4
|
+
import { useRouter } from '../../hooks/useRouter';
|
|
2
5
|
import { type Align } from '../../model/Align';
|
|
3
6
|
import { type UniBlockProps } from '../../model/JSXBlock';
|
|
4
7
|
import { type VNode } from '../../model/VNode';
|
|
5
8
|
import { style } from '../../utils/style';
|
|
9
|
+
import { type PreventableEvent } from '../PreventableEvent';
|
|
6
10
|
|
|
7
11
|
interface BaseTileProps extends UniBlockProps {
|
|
8
12
|
title?: VNode;
|
|
@@ -13,6 +17,7 @@ interface BaseTileProps extends UniBlockProps {
|
|
|
13
17
|
buttons?: VNode;
|
|
14
18
|
isImageAlwaysOnRight?: boolean;
|
|
15
19
|
isImageSecondary?: boolean;
|
|
20
|
+
backwardButton?: boolean;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
const imageAlignmentMap: Record<Align, string> = {
|
|
@@ -24,6 +29,7 @@ const imageAlignmentMap: Record<Align, string> = {
|
|
|
24
29
|
export const BaseTile = JSX<BaseTileProps>(
|
|
25
30
|
({
|
|
26
31
|
className,
|
|
32
|
+
version = 'primary',
|
|
27
33
|
defaultPadding,
|
|
28
34
|
padding,
|
|
29
35
|
title = '',
|
|
@@ -34,55 +40,62 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
34
40
|
imageAlign,
|
|
35
41
|
isImageAlwaysOnRight = false,
|
|
36
42
|
isImageSecondary = false,
|
|
43
|
+
backwardButton,
|
|
37
44
|
children,
|
|
38
|
-
}) =>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className={
|
|
49
|
-
'grow relative flex flex-col @xl:flex-row gap-3xl',
|
|
50
|
-
leftImage ? 'self-start' : '',
|
|
51
|
-
)}
|
|
52
|
-
>
|
|
53
|
-
{renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' })}
|
|
45
|
+
}) => {
|
|
46
|
+
const router = useRouter();
|
|
47
|
+
const handleClick = useCallback((ev?: PreventableEvent) => {
|
|
48
|
+
ev?.preventDefault();
|
|
49
|
+
router.back();
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div className={getStyle(padding, defaultPadding, className)}>
|
|
54
|
+
{backwardButton ? renderBackwardButton(version, handleClick) : null}
|
|
55
|
+
{title ? <div className="relative">{title}</div> : null}
|
|
54
56
|
<div
|
|
55
57
|
className={style(
|
|
56
|
-
'
|
|
57
|
-
|
|
58
|
-
leftImage ? '' : 'grow',
|
|
58
|
+
'grow relative flex flex-col @xl:flex-row gap-3xl',
|
|
59
|
+
leftImage ? 'self-start' : '',
|
|
59
60
|
)}
|
|
60
61
|
>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
62
|
+
{renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' })}
|
|
63
|
+
<div
|
|
64
|
+
className={style(
|
|
65
|
+
'grid gap-3xl',
|
|
66
|
+
rightImage ? '@xl:grid-cols-2' : '',
|
|
67
|
+
leftImage ? '' : 'grow',
|
|
68
|
+
)}
|
|
69
|
+
>
|
|
70
|
+
<div className="grow space-y-lg min-w-fit">
|
|
71
|
+
{insetTitle}
|
|
72
|
+
{children}
|
|
73
|
+
</div>
|
|
74
|
+
{renderImageContainer(rightImage, {
|
|
75
|
+
className: style(
|
|
76
|
+
'@xl:justify-self-end @xl:col-start-2',
|
|
77
|
+
buttons ? rowSpanStyle(isImageAlwaysOnRight) : '',
|
|
78
|
+
positionStyle(isImageAlwaysOnRight),
|
|
79
|
+
imageSecondaryStyle(isImageSecondary),
|
|
80
|
+
),
|
|
81
|
+
imageAlign,
|
|
82
|
+
})}
|
|
83
|
+
{renderButtons(buttons)}
|
|
64
84
|
</div>
|
|
65
|
-
{renderImageContainer(rightImage, {
|
|
66
|
-
className: style(
|
|
67
|
-
'@xl:justify-self-end @xl:col-start-2',
|
|
68
|
-
buttons ? rowSpanStyle(isImageAlwaysOnRight) : '',
|
|
69
|
-
positionStyle(isImageAlwaysOnRight),
|
|
70
|
-
imageSecondaryStyle(isImageSecondary),
|
|
71
|
-
),
|
|
72
|
-
imageAlign,
|
|
73
|
-
})}
|
|
74
|
-
{renderButtons(buttons)}
|
|
75
85
|
</div>
|
|
76
86
|
</div>
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
);
|
|
88
|
+
},
|
|
79
89
|
);
|
|
80
90
|
|
|
91
|
+
const getStyle = (padding = '', defaultPadding = '', className = '') =>
|
|
92
|
+
style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className);
|
|
93
|
+
|
|
81
94
|
const rowSpanStyle = (isImageAlwaysOnRight: boolean) =>
|
|
82
95
|
isImageAlwaysOnRight ? 'row-span-2' : '@xl:row-span-2';
|
|
83
96
|
|
|
84
97
|
const positionStyle = (isImageAlwaysOnRight: boolean) =>
|
|
85
|
-
isImageAlwaysOnRight ? '
|
|
98
|
+
isImageAlwaysOnRight ? 'col-start-2 self-center' : '';
|
|
86
99
|
|
|
87
100
|
const renderButtons = (buttons: VNode) =>
|
|
88
101
|
buttons ? <div className="self-end">{buttons}</div> : null;
|
package/package.json
CHANGED
package/src/common.css
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type EmptyOption } from '../../model/EmptyOptionType';
|
|
2
1
|
import { type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
3
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
4
3
|
import { type IconProps } from '../../model/Picture';
|
|
@@ -25,11 +24,17 @@ export type ListBenefitDef = ListContent & {
|
|
|
25
24
|
benefitType?: 'list';
|
|
26
25
|
};
|
|
27
26
|
|
|
27
|
+
/** @title Не выбрано * */
|
|
28
|
+
export type EmptyDescription = {
|
|
29
|
+
/** @default "" */
|
|
30
|
+
benefitType: '';
|
|
31
|
+
};
|
|
32
|
+
|
|
28
33
|
/**
|
|
29
34
|
* @title Вид контента
|
|
30
|
-
* @default
|
|
35
|
+
* @default { "benefitType": "" }
|
|
31
36
|
*/
|
|
32
|
-
export type DescriptionDef =
|
|
37
|
+
export type DescriptionDef = EmptyDescription | TextBenefitDef | ListBenefitDef;
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
40
|
* @title Преимущество
|
|
@@ -29,7 +29,6 @@ import { OfficesAtmsMap } from './OfficesAtmsMap/OfficesAtmsMap';
|
|
|
29
29
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
30
30
|
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
31
31
|
import { ProductGallery } from './ProductGallery/ProductGallery';
|
|
32
|
-
import { ProductTile } from './ProductTile/ProductTile';
|
|
33
32
|
import { RepresentativeOfficeInfo } from './RepresentativeOfficeInfo/RepresentativeOfficeInfo';
|
|
34
33
|
import { RichTextBlock } from './RichTextBlock/RichTextBlock';
|
|
35
34
|
import { RollupItem } from './RollupItem/RollupItem';
|
|
@@ -39,7 +38,6 @@ import { StickyBottomMenu } from './StickyBottomMenu/StickyBottomMenu';
|
|
|
39
38
|
import { Tabs } from './Tabs/Tabs';
|
|
40
39
|
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
41
40
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
42
|
-
import { Tile } from './Tile/Tile';
|
|
43
41
|
import { VerticalLayout } from './VerticalLayout/VerticalLayout';
|
|
44
42
|
|
|
45
43
|
export const Blocks: BlocksRegistry = {
|
|
@@ -73,7 +71,6 @@ export const Blocks: BlocksRegistry = {
|
|
|
73
71
|
Placeholder,
|
|
74
72
|
ProductBlock,
|
|
75
73
|
ProductGallery,
|
|
76
|
-
ProductTile,
|
|
77
74
|
RepresentativeOfficeInfo,
|
|
78
75
|
RichTextBlock,
|
|
79
76
|
RollupItem,
|
|
@@ -83,6 +80,5 @@ export const Blocks: BlocksRegistry = {
|
|
|
83
80
|
Tabs,
|
|
84
81
|
TariffsTable,
|
|
85
82
|
TextBlock,
|
|
86
|
-
Tile,
|
|
87
83
|
VerticalLayout,
|
|
88
84
|
};
|
package/src/components/Blocks.ts
CHANGED
|
@@ -36,7 +36,6 @@ import { ParagraphBlock } from './ParagraphBlock/ParagraphBlock';
|
|
|
36
36
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
37
37
|
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
38
38
|
import { ProductGallery } from './ProductGallery/ProductGallery';
|
|
39
|
-
import { ProductTile } from './ProductTile/ProductTile';
|
|
40
39
|
import { RepresentativeOfficeInfo } from './RepresentativeOfficeInfo/RepresentativeOfficeInfo';
|
|
41
40
|
import { RichTextBlock } from './RichTextBlock/RichTextBlock';
|
|
42
41
|
import { RollupItem } from './RollupItem/RollupItem';
|
|
@@ -47,7 +46,6 @@ import { SwipeListControlBlock } from './SwipeListControlBlock/SwipeListControlB
|
|
|
47
46
|
import { Tabs } from './Tabs/Tabs';
|
|
48
47
|
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
49
48
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
50
|
-
import { Tile } from './Tile/Tile';
|
|
51
49
|
import { VerticalLayout } from './VerticalLayout/VerticalLayout';
|
|
52
50
|
import { Video } from './Video/Video';
|
|
53
51
|
|
|
@@ -89,7 +87,6 @@ export const Blocks: BlocksRegistry = {
|
|
|
89
87
|
Placeholder,
|
|
90
88
|
ProductBlock,
|
|
91
89
|
ProductGallery,
|
|
92
|
-
ProductTile,
|
|
93
90
|
RepresentativeOfficeInfo,
|
|
94
91
|
RichTextBlock,
|
|
95
92
|
RollupItem,
|
|
@@ -100,7 +97,6 @@ export const Blocks: BlocksRegistry = {
|
|
|
100
97
|
Tabs,
|
|
101
98
|
TariffsTable,
|
|
102
99
|
TextBlock,
|
|
103
|
-
Tile,
|
|
104
100
|
VerticalLayout,
|
|
105
101
|
Video,
|
|
106
102
|
};
|
|
@@ -27,7 +27,7 @@ export const Bonus = JSX<BonusProps>(
|
|
|
27
27
|
? bonusItems.map((_, i) => (
|
|
28
28
|
<div
|
|
29
29
|
key={String(i)}
|
|
30
|
-
className="w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow
|
|
30
|
+
className="w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray"
|
|
31
31
|
>
|
|
32
32
|
<div className="grow">
|
|
33
33
|
<Headline
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type EmptyOption } from '../../model/EmptyOptionType';
|
|
2
1
|
import { type HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
4
3
|
import { type ButtonsSectionContent } from '../../ui-kit/Button/ButtonsSectionContent';
|
|
@@ -25,11 +24,17 @@ export type BonusCountDef = {
|
|
|
25
24
|
bonusName?: string;
|
|
26
25
|
};
|
|
27
26
|
|
|
27
|
+
/** @title Не выбрано * */
|
|
28
|
+
export type EmptyBonusItemContent = {
|
|
29
|
+
/** @default "" */
|
|
30
|
+
bonusType: '';
|
|
31
|
+
};
|
|
32
|
+
|
|
28
33
|
/**
|
|
29
34
|
* @title Вид контента
|
|
30
|
-
* @default
|
|
35
|
+
* @default { "bonusType": "" }
|
|
31
36
|
*/
|
|
32
|
-
export type BonusItemContentDef =
|
|
37
|
+
export type BonusItemContentDef = EmptyBonusItemContent | BonusImageDef | BonusCountDef;
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
40
|
* @title Плитка
|
|
@@ -34,7 +34,7 @@ export const BusinessDepositCalculatorForm = JSX<BusinessDepositCalculatorProp>(
|
|
|
34
34
|
|
|
35
35
|
const calculatorParams = useBusinessDepositCalculatorParams(
|
|
36
36
|
userInputParams,
|
|
37
|
-
rateParams?.sourceBookDir,
|
|
37
|
+
rateParams?.rateType && rateParams.sourceBookDir,
|
|
38
38
|
);
|
|
39
39
|
const { income, finalSum, rate, isUnavailableByTerm, depositeName } = calculatorParams;
|
|
40
40
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Align } from '../../model/Align';
|
|
2
|
-
import { type EmptyOption } from '../../model/EmptyOptionType';
|
|
3
2
|
import { type Footnote } from '../../model/Footnote';
|
|
4
3
|
import { type HeadlineCommonProps, type TitleProps } from '../../model/HeadlineType';
|
|
5
4
|
import { type IconProps } from '../../model/Picture';
|
|
@@ -26,11 +25,17 @@ export type IPRateDef = RateParams & {
|
|
|
26
25
|
rateType: 'IP';
|
|
27
26
|
};
|
|
28
27
|
|
|
28
|
+
/** @title Не выбрано * */
|
|
29
|
+
export type EmptyRateParams = {
|
|
30
|
+
/** @default "" */
|
|
31
|
+
rateType: '';
|
|
32
|
+
};
|
|
33
|
+
|
|
29
34
|
/**
|
|
30
35
|
* @title Назначение ставки
|
|
31
|
-
* @default
|
|
36
|
+
* @default {"rateType": ""}
|
|
32
37
|
*/
|
|
33
|
-
export type RateParamsDef =
|
|
38
|
+
export type RateParamsDef = EmptyRateParams | ULRateDef | IPRateDef;
|
|
34
39
|
|
|
35
40
|
export type CommonCalculatorProps = Footnote &
|
|
36
41
|
ButtonsSectionContent & {
|
|
@@ -153,12 +158,18 @@ export type RefinancingCalculatorParamsDef = TitleProps &
|
|
|
153
158
|
calcType: 'RefinancingCalculatorForm';
|
|
154
159
|
};
|
|
155
160
|
|
|
161
|
+
/** @title Не выбрано * */
|
|
162
|
+
export type EmptyCalculatorBlock = {
|
|
163
|
+
/** @default "" */
|
|
164
|
+
calcType: '';
|
|
165
|
+
};
|
|
166
|
+
|
|
156
167
|
/**
|
|
157
168
|
* @title Настройки калькулятора
|
|
158
|
-
* @default
|
|
169
|
+
* @default { "calcType": "" }
|
|
159
170
|
*/
|
|
160
171
|
export type CalculatorBlockDef =
|
|
161
|
-
|
|
|
172
|
+
| EmptyCalculatorBlock
|
|
162
173
|
| CreditCalculatorParamsDef
|
|
163
174
|
| DepositCalculatorParamsDef
|
|
164
175
|
| BusinessDepositCalculatorParamsDef
|
|
@@ -2,7 +2,7 @@ import '../../setup-fixture';
|
|
|
2
2
|
|
|
3
3
|
import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
|
|
4
4
|
import { Blocks } from '../Blocks';
|
|
5
|
-
import {
|
|
5
|
+
import { PRODUCT_BLOCK_WITH_IMAGE } from '../ProductBlock/ProductBlock.fixture';
|
|
6
6
|
import { DepositFiltration } from './DepositFiltration';
|
|
7
7
|
import { type DepositFiltrationContent } from './DepositFiltrationContent';
|
|
8
8
|
|
|
@@ -43,7 +43,7 @@ const PERCENTS_EACH_MONTH = {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const generateBlock = (...presets: any[]) => ({
|
|
46
|
-
type: '
|
|
46
|
+
type: 'ProductBlock',
|
|
47
47
|
style: ['col-span-6'],
|
|
48
48
|
content: { ...presets.reduce((acc, p) => ({ ...acc, ...p })) },
|
|
49
49
|
});
|
|
@@ -115,7 +115,7 @@ export default {
|
|
|
115
115
|
type: 'DepositFiltration',
|
|
116
116
|
blocks: [
|
|
117
117
|
generateBlock(
|
|
118
|
-
{ ...
|
|
118
|
+
{ ...PRODUCT_BLOCK_WITH_IMAGE, title: 'Карточка 1' },
|
|
119
119
|
CURRENCY_RUB,
|
|
120
120
|
OPTIONS_WITHDRAWAL,
|
|
121
121
|
OPTIONS_PENSIONER,
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
),
|
|
130
130
|
generateBlock(
|
|
131
|
-
{ ...
|
|
131
|
+
{ ...PRODUCT_BLOCK_WITH_IMAGE, title: 'Карточка 2' },
|
|
132
132
|
CURRENCY_USD,
|
|
133
133
|
OPTIONS_ADD,
|
|
134
134
|
OPTIONS_ONLINE,
|
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
},
|
|
142
142
|
),
|
|
143
143
|
generateBlock(
|
|
144
|
-
{ ...
|
|
144
|
+
{ ...PRODUCT_BLOCK_WITH_IMAGE, title: 'Карточка 3' },
|
|
145
145
|
CURRENCY_EUR,
|
|
146
146
|
OPTIONS_ADD,
|
|
147
147
|
OPTIONS_ONLINE,
|
|
@@ -2,7 +2,7 @@ import '../../setup-fixture';
|
|
|
2
2
|
|
|
3
3
|
import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
|
|
4
4
|
import { Blocks } from '../Blocks';
|
|
5
|
-
import {
|
|
5
|
+
import { PRODUCT_BLOCK_WITH_IMAGE } from '../ProductBlock/ProductBlock.fixture';
|
|
6
6
|
import { DepositFiltration } from './DepositFiltration';
|
|
7
7
|
import { type DepositFiltrationContent } from './DepositFiltrationContent';
|
|
8
8
|
|
|
@@ -43,7 +43,7 @@ const PERCENTS_EACH_MONTH = {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const generateBlock = (...presets: any[]) => ({
|
|
46
|
-
type: '
|
|
46
|
+
type: 'ProductBlock',
|
|
47
47
|
style: ['col-span-6'],
|
|
48
48
|
content: { ...presets.reduce((acc, p) => ({ ...acc, ...p })) },
|
|
49
49
|
});
|
|
@@ -115,7 +115,7 @@ export default {
|
|
|
115
115
|
type: 'DepositFiltration',
|
|
116
116
|
blocks: [
|
|
117
117
|
generateBlock(
|
|
118
|
-
{ ...
|
|
118
|
+
{ ...PRODUCT_BLOCK_WITH_IMAGE, title: 'Карточка 1' },
|
|
119
119
|
CURRENCY_RUB,
|
|
120
120
|
OPTIONS_WITHDRAWAL,
|
|
121
121
|
OPTIONS_PENSIONER,
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
),
|
|
130
130
|
generateBlock(
|
|
131
|
-
{ ...
|
|
131
|
+
{ ...PRODUCT_BLOCK_WITH_IMAGE, title: 'Карточка 2' },
|
|
132
132
|
CURRENCY_USD,
|
|
133
133
|
OPTIONS_ADD,
|
|
134
134
|
OPTIONS_ONLINE,
|
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
},
|
|
142
142
|
),
|
|
143
143
|
generateBlock(
|
|
144
|
-
{ ...
|
|
144
|
+
{ ...PRODUCT_BLOCK_WITH_IMAGE, title: 'Карточка 3' },
|
|
145
145
|
CURRENCY_EUR,
|
|
146
146
|
OPTIONS_ADD,
|
|
147
147
|
OPTIONS_ONLINE,
|