@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.
Files changed (169) hide show
  1. package/bin/migration-scripts/0.14.31.js +66 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +27 -34
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/model/JSXBlock.d.ts +2 -2
  6. package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
  7. package/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -0
  8. package/dist/components/Blocks.js +0 -4
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/Blocks.mobile.js +0 -4
  11. package/dist/components/Blocks.mobile.js.map +1 -1
  12. package/dist/components/ProductBlock/ProductBlock.js +1 -13
  13. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  14. package/dist/model/JSXBlock.d.ts +2 -2
  15. package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
  16. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
  17. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  18. package/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -0
  19. package/dist/ui-kit/BaseTile/BaseTile.js +16 -5
  20. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  21. package/lib/common.css +1 -1
  22. package/lib/components/Blocks.js +0 -4
  23. package/lib/components/Blocks.js.map +1 -1
  24. package/lib/components/Blocks.mobile.js +0 -4
  25. package/lib/components/Blocks.mobile.js.map +1 -1
  26. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
  27. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +2 -0
  28. package/lib/components/ProductBlock/ProductBlock.js +2 -14
  29. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  30. package/lib/model/JSXBlock.d.ts +2 -2
  31. package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
  32. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
  33. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  34. package/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -0
  35. package/lib/ui-kit/BaseTile/BaseTile.js +16 -5
  36. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  37. package/mobile/bundle/bundle.umd.js +27 -34
  38. package/mobile/bundle/bundle.umd.min.js +1 -1
  39. package/mobile/bundle/model/JSXBlock.d.ts +2 -2
  40. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
  41. package/mobile/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -0
  42. package/mobile/dist/components/Blocks.js +0 -4
  43. package/mobile/dist/components/Blocks.js.map +1 -1
  44. package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -13
  45. package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  46. package/mobile/dist/model/JSXBlock.d.ts +2 -2
  47. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
  48. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
  49. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  50. package/mobile/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -0
  51. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +16 -5
  52. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  53. package/mobile/lib/common.css +1 -1
  54. package/mobile/lib/components/Blocks.js +0 -4
  55. package/mobile/lib/components/Blocks.js.map +1 -1
  56. package/mobile/lib/components/ProductBlock/ProductBlock.js +2 -14
  57. package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  58. package/mobile/lib/model/JSXBlock.d.ts +2 -2
  59. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
  60. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
  61. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  62. package/mobile/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -0
  63. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +16 -5
  64. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  65. package/mobile/src/common.css +4 -0
  66. package/mobile/src/components/Blocks.ts +0 -4
  67. package/mobile/src/components/ProductBlock/ProductBlock.tsx +13 -32
  68. package/mobile/src/model/JSXBlock.ts +2 -2
  69. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
  70. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +48 -35
  71. package/package.json +1 -1
  72. package/src/common.css +4 -0
  73. package/src/components/Blocks.mobile.ts +0 -4
  74. package/src/components/Blocks.ts +0 -4
  75. package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +5 -5
  76. package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +5 -5
  77. package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +15 -15
  78. package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +8 -8
  79. package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +8 -8
  80. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +41 -0
  81. package/src/components/ProductBlock/ProductBlock.fixture.tsx +40 -0
  82. package/src/components/ProductBlock/ProductBlock.tsx +13 -32
  83. package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.mobile.tsx +9 -9
  84. package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +11 -11
  85. package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +3 -3
  86. package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +9 -10
  87. package/src/model/JSXBlock.ts +2 -2
  88. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
  89. package/src/ui-kit/BaseTile/BaseTile.tsx +48 -35
  90. package/bundle/components/ProductTile/ProductTile.d.ts +0 -5
  91. package/bundle/components/ProductTile/ProductTileContent.d.ts +0 -7
  92. package/bundle/components/Tile/Tile.d.ts +0 -5
  93. package/bundle/components/Tile/TileContent.d.ts +0 -6
  94. package/dist/components/ProductTile/ProductTile.d.ts +0 -5
  95. package/dist/components/ProductTile/ProductTile.js +0 -9
  96. package/dist/components/ProductTile/ProductTile.js.map +0 -1
  97. package/dist/components/ProductTile/ProductTileContent.d.ts +0 -7
  98. package/dist/components/ProductTile/ProductTileContent.js +0 -2
  99. package/dist/components/ProductTile/ProductTileContent.js.map +0 -1
  100. package/dist/components/Tile/Tile.d.ts +0 -5
  101. package/dist/components/Tile/Tile.js +0 -8
  102. package/dist/components/Tile/Tile.js.map +0 -1
  103. package/dist/components/Tile/TileContent.d.ts +0 -6
  104. package/dist/components/Tile/TileContent.js +0 -2
  105. package/dist/components/Tile/TileContent.js.map +0 -1
  106. package/lib/components/ProductTile/ProductTile.d.ts +0 -5
  107. package/lib/components/ProductTile/ProductTile.fixture.d.ts +0 -17
  108. package/lib/components/ProductTile/ProductTile.fixture.mobile.d.ts +0 -16
  109. package/lib/components/ProductTile/ProductTile.js +0 -7
  110. package/lib/components/ProductTile/ProductTile.js.map +0 -1
  111. package/lib/components/ProductTile/ProductTileContent.d.ts +0 -7
  112. package/lib/components/ProductTile/ProductTileContent.js +0 -2
  113. package/lib/components/ProductTile/ProductTileContent.js.map +0 -1
  114. package/lib/components/Tile/Tile.d.ts +0 -5
  115. package/lib/components/Tile/Tile.fixture.d.ts +0 -15
  116. package/lib/components/Tile/Tile.fixture.mobile.d.ts +0 -9
  117. package/lib/components/Tile/Tile.js +0 -6
  118. package/lib/components/Tile/Tile.js.map +0 -1
  119. package/lib/components/Tile/TileContent.d.ts +0 -6
  120. package/lib/components/Tile/TileContent.js +0 -2
  121. package/lib/components/Tile/TileContent.js.map +0 -1
  122. package/mobile/bundle/components/ProductTile/ProductTile.d.ts +0 -5
  123. package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +0 -7
  124. package/mobile/bundle/components/Tile/Tile.d.ts +0 -5
  125. package/mobile/bundle/components/Tile/TileContent.d.ts +0 -6
  126. package/mobile/dist/components/ProductTile/ProductTile.d.ts +0 -5
  127. package/mobile/dist/components/ProductTile/ProductTile.js +0 -9
  128. package/mobile/dist/components/ProductTile/ProductTile.js.map +0 -1
  129. package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +0 -7
  130. package/mobile/dist/components/ProductTile/ProductTileContent.js +0 -2
  131. package/mobile/dist/components/ProductTile/ProductTileContent.js.map +0 -1
  132. package/mobile/dist/components/Tile/Tile.d.ts +0 -5
  133. package/mobile/dist/components/Tile/Tile.js +0 -8
  134. package/mobile/dist/components/Tile/Tile.js.map +0 -1
  135. package/mobile/dist/components/Tile/TileContent.d.ts +0 -6
  136. package/mobile/dist/components/Tile/TileContent.js +0 -2
  137. package/mobile/dist/components/Tile/TileContent.js.map +0 -1
  138. package/mobile/lib/components/ProductTile/ProductTile.d.ts +0 -5
  139. package/mobile/lib/components/ProductTile/ProductTile.js +0 -7
  140. package/mobile/lib/components/ProductTile/ProductTile.js.map +0 -1
  141. package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +0 -7
  142. package/mobile/lib/components/ProductTile/ProductTileContent.js +0 -2
  143. package/mobile/lib/components/ProductTile/ProductTileContent.js.map +0 -1
  144. package/mobile/lib/components/Tile/Tile.d.ts +0 -5
  145. package/mobile/lib/components/Tile/Tile.js +0 -6
  146. package/mobile/lib/components/Tile/Tile.js.map +0 -1
  147. package/mobile/lib/components/Tile/TileContent.d.ts +0 -6
  148. package/mobile/lib/components/Tile/TileContent.js +0 -2
  149. package/mobile/lib/components/Tile/TileContent.js.map +0 -1
  150. package/mobile/src/components/ProductTile/ProductTile.example.json +0 -44
  151. package/mobile/src/components/ProductTile/ProductTile.tsx +0 -40
  152. package/mobile/src/components/ProductTile/ProductTile.ui.json +0 -17
  153. package/mobile/src/components/ProductTile/ProductTileContent.ts +0 -10
  154. package/mobile/src/components/Tile/Tile.example.json +0 -28
  155. package/mobile/src/components/Tile/Tile.tsx +0 -23
  156. package/mobile/src/components/Tile/Tile.ui.json +0 -17
  157. package/mobile/src/components/Tile/TileContent.ts +0 -7
  158. package/src/components/ProductTile/ProductTile.example.json +0 -44
  159. package/src/components/ProductTile/ProductTile.fixture.mobile.tsx +0 -217
  160. package/src/components/ProductTile/ProductTile.fixture.tsx +0 -227
  161. package/src/components/ProductTile/ProductTile.tsx +0 -40
  162. package/src/components/ProductTile/ProductTile.ui.json +0 -17
  163. package/src/components/ProductTile/ProductTileContent.ts +0 -10
  164. package/src/components/Tile/Tile.example.json +0 -28
  165. package/src/components/Tile/Tile.fixture.mobile.tsx +0 -48
  166. package/src/components/Tile/Tile.fixture.tsx +0 -146
  167. package/src/components/Tile/Tile.tsx +0 -23
  168. package/src/components/Tile/Tile.ui.json +0 -17
  169. 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, children, }) => (_jsxs("div", { className: style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className), children: [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, {
10
- className: style('@xl:justify-self-end @xl:col-start-2', buttons ? rowSpanStyle(isImageAlwaysOnRight) : '', positionStyle(isImageAlwaysOnRight), imageSecondaryStyle(isImageSecondary)),
11
- imageAlign,
12
- }), renderButtons(buttons)] })] })] })));
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 ? 'justify-self-end col-start-2 self-center' : '';
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;AAIxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAa1C,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,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,QAAQ,GACT,EAAE,EAAE,CAAC,CACJ,eACE,SAAS,EAAE,KAAK,CACd,gDAAgD,EAChD,OAAO,IAAI,cAAc,EACzB,SAAS,CACV,aAEA,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,EAA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AC,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"}
@@ -204,6 +204,10 @@ html {
204
204
  @apply text-h1;
205
205
  }
206
206
 
207
+ .md-container blockquote {
208
+ @apply text-m font-light group-data-primary:text-secondary-text;
209
+ }
210
+
207
211
  .md-container p.h2 {
208
212
  @apply text-h2;
209
213
  }
@@ -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, backwardButton, showBorder, ...rest }) => {
17
- const router = useRouter();
18
- const handleClick = useCallback((ev?: PreventableEvent) => {
19
- ev?.preventDefault();
20
- router.back();
21
- }, []);
22
-
23
- return (
24
- <BlockWrapper
25
- className={style(
26
- 'overflow-hidden flex flex-col gap-3xl box-border',
27
- getBorderStyle(showBorder),
28
- className,
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
- <div
40
- className={style(
41
- 'relative flex flex-col gap-3xl overflow-hidden',
42
- padding || defaultPadding,
43
- className,
44
- )}
45
- >
46
- {title ? <div className="relative">{title}</div> : null}
47
- <div
48
- className={style(
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
- 'grid gap-3xl',
57
- rightImage ? '@xl:grid-cols-2' : '',
58
- leftImage ? '' : 'grow',
58
+ 'grow relative flex flex-col @xl:flex-row gap-3xl',
59
+ leftImage ? 'self-start' : '',
59
60
  )}
60
61
  >
61
- <div className="grow space-y-lg min-w-fit">
62
- {insetTitle}
63
- {children}
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
- </div>
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 ? 'justify-self-end col-start-2 self-center' : '';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.49",
3
+ "version": "0.14.50",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
package/src/common.css CHANGED
@@ -204,6 +204,10 @@ html {
204
204
  @apply text-h1;
205
205
  }
206
206
 
207
+ .md-container blockquote {
208
+ @apply text-m font-light group-data-primary:text-secondary-text;
209
+ }
210
+
207
211
  .md-container p.h2 {
208
212
  @apply text-h2;
209
213
  }
@@ -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
  };
@@ -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 { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
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: 'ProductTile',
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
- { ...PRODUCT_TILE, title: 'Карточка 1' },
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
- { ...PRODUCT_TILE, title: 'Карточка 2' },
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
- { ...PRODUCT_TILE, title: 'Карточка 3' },
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 { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
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: 'ProductTile',
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
- { ...PRODUCT_TILE, title: 'Карточка 1' },
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
- { ...PRODUCT_TILE, title: 'Карточка 2' },
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
- { ...PRODUCT_TILE, title: 'Карточка 3' },
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 { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
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: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
31
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
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: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
47
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
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: 'ProductTile', content: PRODUCT_TILE }],
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: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-4'] },
75
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-4'] },
76
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-4'] },
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: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
94
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
95
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
96
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
97
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
98
- { type: 'ProductTile', content: PRODUCT_TILE, style: ['col-span-6'] },
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 { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
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: 'ProductTile',
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
- PRODUCT_TILE,
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
- PRODUCT_TILE,
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
- PRODUCT_TILE,
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
- PRODUCT_TILE,
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
- PRODUCT_TILE,
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
- PRODUCT_TILE,
193
+ PRODUCT_BLOCK_WITH_IMAGE,
194
194
  PROPERTY_HOUSE,
195
195
  STAGE_BUILT,
196
196
  EXTRA_MORTGAGE,