@redneckz/wildless-cms-uni-blocks 0.14.49 → 0.14.50
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 +27 -34
- package/bundle/bundle.umd.min.js +1 -1
- 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/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/ProductBlock/ProductBlock.js +1 -13
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- 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/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/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/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 +27 -34
- package/mobile/bundle/bundle.umd.min.js +1 -1
- 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/Blocks.js +0 -4
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -13
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- 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/Blocks.js +0 -4
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +2 -14
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- 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/Blocks.ts +0 -4
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +13 -32
- 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/Blocks.mobile.ts +0 -4
- package/src/components/Blocks.ts +0 -4
- 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/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +8 -8
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +8 -8
- 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/VerticalLayout/VerticalLayout.fixture.mobile.tsx +3 -3
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +9 -10
- 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,17 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { renderBackwardButton } from '../../components/ProductBlock/renderBackwardButton.js';
|
|
5
|
+
import { useRouter } from '../../hooks/useRouter.js';
|
|
3
6
|
import { style } from '../../utils/style.js';
|
|
4
7
|
const imageAlignmentMap = {
|
|
5
8
|
start: '@xl:self-start',
|
|
6
9
|
center: '@xl:self-center',
|
|
7
10
|
end: '@xl:self-end',
|
|
8
11
|
};
|
|
9
|
-
export const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary = false,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
export const BaseTile = JSX(({ className, version = 'primary', defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary = false, backwardButton, children, }) => {
|
|
13
|
+
const router = useRouter();
|
|
14
|
+
const handleClick = useCallback((ev) => {
|
|
15
|
+
ev?.preventDefault();
|
|
16
|
+
router.back();
|
|
17
|
+
}, []);
|
|
18
|
+
return (_jsxs("div", { className: getStyle(padding, defaultPadding, className), children: [backwardButton ? renderBackwardButton(version, handleClick) : null, title ? _jsx("div", { className: "relative", children: title }) : null, _jsxs("div", { className: style('grow relative flex flex-col @xl:flex-row gap-3xl', leftImage ? 'self-start' : ''), children: [renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' }), _jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [_jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] }), renderImageContainer(rightImage, {
|
|
19
|
+
className: style('@xl:justify-self-end @xl:col-start-2', buttons ? rowSpanStyle(isImageAlwaysOnRight) : '', positionStyle(isImageAlwaysOnRight), imageSecondaryStyle(isImageSecondary)),
|
|
20
|
+
imageAlign,
|
|
21
|
+
}), renderButtons(buttons)] })] })] }));
|
|
22
|
+
});
|
|
23
|
+
const getStyle = (padding = '', defaultPadding = '', className = '') => style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className);
|
|
13
24
|
const rowSpanStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'row-span-2' : '@xl:row-span-2';
|
|
14
|
-
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? '
|
|
25
|
+
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'col-start-2 self-center' : '';
|
|
15
26
|
const renderButtons = (buttons) => buttons ? _jsx("div", { className: "self-end", children: buttons }) : null;
|
|
16
27
|
const renderImageContainer = (image, { className, imageAlign }) => image ? (_jsx("div", { className: style('shrink-1/2 justify-self-center', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
17
28
|
const imageSecondaryStyle = (isImageSecondary) => isImageSecondary ? 'hidden @xl:block' : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseTile/BaseTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseTile/BaseTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAe1C,MAAM,iBAAiB,GAA0B;IAC/C,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,iBAAiB;IACzB,GAAG,EAAE,cAAc;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,cAAc,EACd,OAAO,EACP,KAAK,GAAG,EAAE,EACV,UAAU,GAAG,EAAE,EACf,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,GAAG,KAAK,EACxB,cAAc,EACd,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,EAAqB,EAAE,EAAE;QACxD,EAAE,EAAE,cAAc,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,eAAK,SAAS,EAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,aACzD,cAAc,CAAC,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAClE,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,UAAU,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,EACvD,eACE,SAAS,EAAE,KAAK,CACd,kDAAkD,EAClD,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAC9B,aAEA,oBAAoB,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EACtE,eACE,SAAS,EAAE,KAAK,CACd,cAAc,EACd,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EACnC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CACxB,aAED,eAAK,SAAS,EAAC,2BAA2B,aACvC,UAAU,EACV,QAAQ,IACL,EACL,oBAAoB,CAAC,UAAU,EAAE;gCAChC,SAAS,EAAE,KAAK,CACd,sCAAsC,EACtC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAAE,EACjD,aAAa,CAAC,oBAAoB,CAAC,EACnC,mBAAmB,CAAC,gBAAgB,CAAC,CACtC;gCACD,UAAU;6BACX,CAAC,EACD,aAAa,CAAC,OAAO,CAAC,IACnB,IACF,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,cAAc,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,CACrE,KAAK,CAAC,gDAAgD,EAAE,OAAO,IAAI,cAAc,EAAE,SAAS,CAAC,CAAC;AAEhG,MAAM,YAAY,GAAG,CAAC,oBAA6B,EAAE,EAAE,CACrD,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC;AAEzD,MAAM,aAAa,GAAG,CAAC,oBAA6B,EAAE,EAAE,CACtD,oBAAoB,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,CAAC;AAExD,MAAM,aAAa,GAAG,CAAC,OAAc,EAAE,EAAE,CACvC,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,UAAU,YAAE,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAE7D,MAAM,oBAAoB,GAAG,CAC3B,KAAwB,EACxB,EAAE,SAAS,EAAE,UAAU,EAA8C,EACrE,EAAE,CACF,KAAK,CAAC,CAAC,CAAC,CACN,cACE,SAAS,EAAE,KAAK,CACd,gCAAgC,EAChC,UAAU,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAC3C,SAAS,CACV,YAEA,KAAK,GACF,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AAEX,MAAM,mBAAmB,GAAG,CAAC,gBAAyB,EAAE,EAAE,CACxD,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC"}
|
package/mobile/src/common.css
CHANGED
|
@@ -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
|
};
|
|
@@ -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
|
);
|
|
@@ -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
|
@@ -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
|
};
|
|
@@ -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,
|
|
@@ -3,7 +3,7 @@ import '../../setup-fixture';
|
|
|
3
3
|
import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
|
|
4
4
|
import { Blocks } from '../Blocks';
|
|
5
5
|
import { type LinkDocsContent } from '../LinkDocs/LinkDocsContent';
|
|
6
|
-
import {
|
|
6
|
+
import { PRODUCT_BLOCK_WITH_IMAGE } from '../ProductBlock/ProductBlock.fixture';
|
|
7
7
|
import { HorizontalLayout } from './HorizontalLayout';
|
|
8
8
|
|
|
9
9
|
export const linkDocsExample: LinkDocsContent = {
|
|
@@ -27,8 +27,8 @@ export default {
|
|
|
27
27
|
block={{
|
|
28
28
|
type: 'HorizontalLayout',
|
|
29
29
|
blocks: [
|
|
30
|
-
{ type: '
|
|
31
|
-
{ type: '
|
|
30
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
31
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
32
32
|
],
|
|
33
33
|
}}
|
|
34
34
|
options={options}
|
|
@@ -43,8 +43,8 @@ export default {
|
|
|
43
43
|
block={{
|
|
44
44
|
type: 'HorizontalLayout',
|
|
45
45
|
blocks: [
|
|
46
|
-
{ type: '
|
|
47
|
-
{ type: '
|
|
46
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
47
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
48
48
|
],
|
|
49
49
|
}}
|
|
50
50
|
options={options}
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
className="col-span-12"
|
|
59
59
|
block={{
|
|
60
60
|
type: 'HorizontalLayout',
|
|
61
|
-
blocks: [{ type: '
|
|
61
|
+
blocks: [{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE }],
|
|
62
62
|
}}
|
|
63
63
|
options={options}
|
|
64
64
|
/>
|
|
@@ -71,9 +71,9 @@ export default {
|
|
|
71
71
|
block={{
|
|
72
72
|
type: 'HorizontalLayout',
|
|
73
73
|
blocks: [
|
|
74
|
-
{ type: '
|
|
75
|
-
{ type: '
|
|
76
|
-
{ type: '
|
|
74
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-4'] },
|
|
75
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-4'] },
|
|
76
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-4'] },
|
|
77
77
|
],
|
|
78
78
|
}}
|
|
79
79
|
options={options}
|
|
@@ -90,12 +90,12 @@ export default {
|
|
|
90
90
|
block={{
|
|
91
91
|
type: 'HorizontalLayout',
|
|
92
92
|
blocks: [
|
|
93
|
-
{ type: '
|
|
94
|
-
{ type: '
|
|
95
|
-
{ type: '
|
|
96
|
-
{ type: '
|
|
97
|
-
{ type: '
|
|
98
|
-
{ type: '
|
|
93
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
94
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
95
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
96
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
97
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
98
|
+
{ type: 'ProductBlock', content: PRODUCT_BLOCK_WITH_IMAGE, style: ['col-span-6'] },
|
|
99
99
|
],
|
|
100
100
|
}}
|
|
101
101
|
options={options}
|
|
@@ -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 { MortgageFiltration } from './MortgageFiltration';
|
|
7
7
|
import {
|
|
8
8
|
type MortgageFiltrationContent,
|
|
@@ -46,7 +46,7 @@ const CATEGORY_SALARY = {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
const generateBlock = (...presets: any[]) => ({
|
|
49
|
-
type: '
|
|
49
|
+
type: 'ProductBlock',
|
|
50
50
|
style: ['col-span-6'],
|
|
51
51
|
content: { ...presets.reduce((acc, p) => ({ ...acc, ...p })) },
|
|
52
52
|
});
|
|
@@ -155,42 +155,42 @@ export default {
|
|
|
155
155
|
type: 'MortgageFiltration',
|
|
156
156
|
blocks: [
|
|
157
157
|
generateBlock(
|
|
158
|
-
|
|
158
|
+
PRODUCT_BLOCK_WITH_IMAGE,
|
|
159
159
|
PROPERTY_APARTMENT,
|
|
160
160
|
STAGE_IN_PROGRESS,
|
|
161
161
|
EXTRA_MORTGAGE,
|
|
162
162
|
CATEGORY_IT,
|
|
163
163
|
),
|
|
164
164
|
generateBlock(
|
|
165
|
-
|
|
165
|
+
PRODUCT_BLOCK_WITH_IMAGE,
|
|
166
166
|
PROPERTY_APARTMENT,
|
|
167
167
|
STAGE_BUILT,
|
|
168
168
|
EXTRA_CHILDREN,
|
|
169
169
|
CATEGORY_SALARY,
|
|
170
170
|
),
|
|
171
171
|
generateBlock(
|
|
172
|
-
|
|
172
|
+
PRODUCT_BLOCK_WITH_IMAGE,
|
|
173
173
|
PROPERTY_FLAT,
|
|
174
174
|
STAGE_IN_PROGRESS,
|
|
175
175
|
EXTRA_MORTGAGE,
|
|
176
176
|
CATEGORY_SALARY,
|
|
177
177
|
),
|
|
178
178
|
generateBlock(
|
|
179
|
-
|
|
179
|
+
PRODUCT_BLOCK_WITH_IMAGE,
|
|
180
180
|
PROPERTY_FLAT,
|
|
181
181
|
STAGE_BUILT,
|
|
182
182
|
EXTRA_MORTGAGE,
|
|
183
183
|
CATEGORY_SALARY,
|
|
184
184
|
),
|
|
185
185
|
generateBlock(
|
|
186
|
-
|
|
186
|
+
PRODUCT_BLOCK_WITH_IMAGE,
|
|
187
187
|
PROPERTY_APARTMENT,
|
|
188
188
|
STAGE_BUILT,
|
|
189
189
|
EXTRA_CHILDREN,
|
|
190
190
|
CATEGORY_IT,
|
|
191
191
|
),
|
|
192
192
|
generateBlock(
|
|
193
|
-
|
|
193
|
+
PRODUCT_BLOCK_WITH_IMAGE,
|
|
194
194
|
PROPERTY_HOUSE,
|
|
195
195
|
STAGE_BUILT,
|
|
196
196
|
EXTRA_MORTGAGE,
|