@doyourjob/gravity-ui-page-constructor 5.31.40 → 5.31.41-b

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 (30) hide show
  1. package/build/cjs/blocks/Header/Header.js +2 -2
  2. package/build/cjs/blocks/Header/HeaderStock/HeaderStock.d.ts +4 -2
  3. package/build/cjs/blocks/Header/HeaderStock/HeaderStock.js +3 -3
  4. package/build/cjs/blocks/Header/HeaderStockShares/HeaderStockShares.js +1 -1
  5. package/build/cjs/blocks/Header/schema.d.ts +122 -23
  6. package/build/cjs/blocks/Header/schema.js +51 -1
  7. package/build/cjs/blocks/HeaderSlider/schema.d.ts +50 -1
  8. package/build/cjs/components/BlockBase/BlockBase.css +3 -0
  9. package/build/cjs/components/BlockBase/BlockBase.js +11 -7
  10. package/build/cjs/containers/PageConstructor/PageConstructor.js +1 -4
  11. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -0
  12. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +19 -4
  13. package/build/cjs/models/constructor-items/blocks.d.ts +13 -10
  14. package/build/esm/blocks/Header/Header.js +2 -2
  15. package/build/esm/blocks/Header/HeaderStock/HeaderStock.d.ts +4 -2
  16. package/build/esm/blocks/Header/HeaderStock/HeaderStock.js +3 -3
  17. package/build/esm/blocks/Header/HeaderStockShares/HeaderStockShares.js +1 -1
  18. package/build/esm/blocks/Header/schema.d.ts +122 -23
  19. package/build/esm/blocks/Header/schema.js +51 -1
  20. package/build/esm/blocks/HeaderSlider/schema.d.ts +50 -1
  21. package/build/esm/components/BlockBase/BlockBase.css +3 -0
  22. package/build/esm/components/BlockBase/BlockBase.js +12 -8
  23. package/build/esm/containers/PageConstructor/PageConstructor.js +1 -4
  24. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -0
  25. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +19 -4
  26. package/build/esm/models/constructor-items/blocks.d.ts +13 -10
  27. package/package.json +1 -1
  28. package/schema/index.js +1 -1
  29. package/server/models/constructor-items/blocks.d.ts +13 -10
  30. package/widget/index.js +1 -1
@@ -28,7 +28,7 @@ const Background = ({ background, isMobile }) => {
28
28
  const FullWidthBackground = ({ background }) => (react_1.default.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
29
29
  // eslint-disable-next-line complexity
30
30
  const HeaderBlock = (props) => {
31
- const { title, topTags, bottomTags, overtitle, description, buttons, stock, image, video, width = 's', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, renderTitle, children, mediaView = 'full', } = props;
31
+ const { title, topTags, bottomTags, overtitle, description, buttons, stock, stockPrice, stockShares, image, video, width = 's', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, renderTitle, children, mediaView = 'full', } = props;
32
32
  const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
33
33
  const { backButton, blockTag } = (0, react_1.useContext)(headerContext_1.HeaderContext);
34
34
  const theme = (0, theme_1.useTheme)();
@@ -80,7 +80,7 @@ const HeaderBlock = (props) => {
80
80
  buttons && (react_1.default.createElement("div", { className: b('buttons'), "data-qa": "header-buttons" }, buttons.map((button, index) => (react_1.default.createElement(components_1.RouterLink, { href: button.url, key: index },
81
81
  react_1.default.createElement(components_1.Button, Object.assign({ key: index, className: b('button'), size: "xl", extraProps: Object.assign({ 'aria-describedby': titleId }, button.extraProps) }, button))))))),
82
82
  children),
83
- stock && react_1.default.createElement(HeaderStock_1.default, { type: stock, theme: textTheme })),
83
+ stock && (react_1.default.createElement(HeaderStock_1.default, { type: stock, stockPrice: stockPrice, stockShares: stockShares, theme: textTheme }))),
84
84
  react_1.default.createElement(HeaderTags_1.default, { theme: textTheme, tags: bottomTags, className: b('tags', { bottom: true }), sizes: titleSizes }))),
85
85
  hasRightSideImage && (react_1.default.createElement(components_1.Media, { className: b('media', { [curImageSize]: true }), videoClassName: b('video'), imageClassName: b('image'), video: videoThemed, image: imageThemed })))))));
86
86
  };
@@ -1,8 +1,10 @@
1
1
  import { Theme } from '@gravity-ui/uikit';
2
- import { HeaderStockType } from '../../../models';
2
+ import { HeaderBlockProps, HeaderStockType } from '../../../models';
3
3
  type HeaderStockProps = {
4
4
  type: HeaderStockType;
5
+ stockPrice?: HeaderBlockProps['stockPrice'];
6
+ stockShares?: HeaderBlockProps['stockShares'];
5
7
  theme: Theme;
6
8
  };
7
- export declare const HeaderStock: ({ type, theme }: HeaderStockProps) => JSX.Element | null;
9
+ export declare const HeaderStock: ({ type, stockPrice, stockShares, theme }: HeaderStockProps) => JSX.Element | null;
8
10
  export default HeaderStock;
@@ -7,13 +7,13 @@ const headerStockContext_1 = require("../../../context/headerStockContext");
7
7
  const models_1 = require("../../../models");
8
8
  const HeaderStockPrice_1 = tslib_1.__importDefault(require("../HeaderStockPrice/HeaderStockPrice"));
9
9
  const HeaderStockShares_1 = tslib_1.__importDefault(require("../HeaderStockShares/HeaderStockShares"));
10
- const HeaderStock = ({ type, theme }) => {
10
+ const HeaderStock = ({ type, stockPrice, stockShares, theme }) => {
11
11
  const { price, shares } = (0, react_1.useContext)(headerStockContext_1.HeaderStockContext);
12
12
  switch (type) {
13
13
  case models_1.HeaderStockType.Price:
14
- return price ? react_1.default.createElement(HeaderStockPrice_1.default, Object.assign({}, price, { theme: theme })) : null;
14
+ return price ? react_1.default.createElement(HeaderStockPrice_1.default, Object.assign({}, price, stockPrice, { theme: theme })) : null;
15
15
  case models_1.HeaderStockType.Shares:
16
- return shares ? react_1.default.createElement(HeaderStockShares_1.default, Object.assign({}, shares, { theme: theme })) : null;
16
+ return shares ? react_1.default.createElement(HeaderStockShares_1.default, Object.assign({}, shares, stockShares, { theme: theme })) : null;
17
17
  default:
18
18
  return null;
19
19
  }
@@ -14,7 +14,7 @@ const HeaderStockShares = ({ date, total, text, included, description, theme })
14
14
  react_1.default.createElement("div", { className: b('text') }, text),
15
15
  react_1.default.createElement("div", { className: b('included') },
16
16
  react_1.default.createElement("div", { className: b('label') }, "Including:"),
17
- react_1.default.createElement("div", { className: b('items') }, included.map((item) => (react_1.default.createElement("div", { key: item.text, className: b('item') },
17
+ react_1.default.createElement("div", { className: b('items') }, included === null || included === void 0 ? void 0 : included.map((item) => (react_1.default.createElement("div", { key: item.text, className: b('item') },
18
18
  react_1.default.createElement("div", { className: b('item-total') }, item.title),
19
19
  react_1.default.createElement("div", { className: b('item-text') }, item.text)))))),
20
20
  react_1.default.createElement("div", { className: b('description') }, description)));
@@ -1,3 +1,4 @@
1
+ import { HeaderStockType } from '../../models';
1
2
  export declare const HeaderBackgroundProps: {
2
3
  type: string;
3
4
  additionalProperties: boolean;
@@ -140,7 +141,7 @@ export declare const HeaderBackgroundProps: {
140
141
  };
141
142
  controls: {
142
143
  type: string;
143
- enum: import("../..").MediaVideoControlsType[];
144
+ enum: import("../../models").MediaVideoControlsType[];
144
145
  };
145
146
  customControlsOptions: {
146
147
  type: string;
@@ -148,14 +149,14 @@ export declare const HeaderBackgroundProps: {
148
149
  properties: {
149
150
  type: {
150
151
  type: string;
151
- enum: import("../..").CustomControlsType[];
152
+ enum: import("../../models").CustomControlsType[];
152
153
  };
153
154
  muteButtonShown: {
154
155
  type: string;
155
156
  };
156
157
  positioning: {
157
158
  type: string;
158
- enum: import("../..").CustomControlsButtonPositioning[];
159
+ enum: import("../../models").CustomControlsButtonPositioning[];
159
160
  };
160
161
  };
161
162
  };
@@ -379,7 +380,7 @@ export declare const HeaderProperties: {
379
380
  }) | {
380
381
  type: string;
381
382
  additionalProperties: boolean;
382
- required: import("../..").Theme[];
383
+ required: import("../../models").Theme[];
383
384
  properties: {};
384
385
  optionName: string;
385
386
  })[];
@@ -448,7 +449,7 @@ export declare const HeaderProperties: {
448
449
  };
449
450
  controls: {
450
451
  type: string;
451
- enum: import("../..").MediaVideoControlsType[];
452
+ enum: import("../../models").MediaVideoControlsType[];
452
453
  };
453
454
  customControlsOptions: {
454
455
  type: string;
@@ -456,14 +457,14 @@ export declare const HeaderProperties: {
456
457
  properties: {
457
458
  type: {
458
459
  type: string;
459
- enum: import("../..").CustomControlsType[];
460
+ enum: import("../../models").CustomControlsType[];
460
461
  };
461
462
  muteButtonShown: {
462
463
  type: string;
463
464
  };
464
465
  positioning: {
465
466
  type: string;
466
- enum: import("../..").CustomControlsButtonPositioning[];
467
+ enum: import("../../models").CustomControlsButtonPositioning[];
467
468
  };
468
469
  };
469
470
  };
@@ -479,7 +480,7 @@ export declare const HeaderProperties: {
479
480
  }) | {
480
481
  type: string;
481
482
  additionalProperties: boolean;
482
- required: import("../..").Theme[];
483
+ required: import("../../models").Theme[];
483
484
  properties: {};
484
485
  optionName: string;
485
486
  })[];
@@ -488,9 +489,58 @@ export declare const HeaderProperties: {
488
489
  type: string;
489
490
  enum: string[];
490
491
  };
492
+ stockPrice: {
493
+ type: string;
494
+ additionalProperties: boolean;
495
+ properties: {
496
+ type: {
497
+ type: string;
498
+ };
499
+ name: {
500
+ type: string;
501
+ };
502
+ delayed: {
503
+ type: string;
504
+ };
505
+ };
506
+ };
507
+ stockShares: {
508
+ type: string;
509
+ additionalProperties: boolean;
510
+ properties: {
511
+ date: {
512
+ type: string;
513
+ };
514
+ total: {
515
+ type: string;
516
+ };
517
+ text: {
518
+ type: string;
519
+ };
520
+ included: {
521
+ type: string;
522
+ items: {
523
+ type: string;
524
+ additionalProperties: boolean;
525
+ required: boolean;
526
+ properties: {
527
+ title: {
528
+ type: string;
529
+ };
530
+ text: {
531
+ type: string;
532
+ };
533
+ };
534
+ };
535
+ };
536
+ description: {
537
+ type: string;
538
+ };
539
+ };
540
+ };
491
541
  stock: {
492
542
  type: string;
493
- enum: string[];
543
+ enum: HeaderStockType[];
494
544
  };
495
545
  backLink: {
496
546
  type: string;
@@ -656,7 +706,7 @@ export declare const HeaderProperties: {
656
706
  };
657
707
  controls: {
658
708
  type: string;
659
- enum: import("../..").MediaVideoControlsType[];
709
+ enum: import("../../models").MediaVideoControlsType[];
660
710
  };
661
711
  customControlsOptions: {
662
712
  type: string;
@@ -664,14 +714,14 @@ export declare const HeaderProperties: {
664
714
  properties: {
665
715
  type: {
666
716
  type: string;
667
- enum: import("../..").CustomControlsType[];
717
+ enum: import("../../models").CustomControlsType[];
668
718
  };
669
719
  muteButtonShown: {
670
720
  type: string;
671
721
  };
672
722
  positioning: {
673
723
  type: string;
674
- enum: import("../..").CustomControlsButtonPositioning[];
724
+ enum: import("../../models").CustomControlsButtonPositioning[];
675
725
  };
676
726
  };
677
727
  };
@@ -834,7 +884,7 @@ export declare const HeaderProperties: {
834
884
  }) | {
835
885
  type: string;
836
886
  additionalProperties: boolean;
837
- required: import("../..").Theme[];
887
+ required: import("../../models").Theme[];
838
888
  properties: {};
839
889
  optionName: string;
840
890
  })[];
@@ -990,7 +1040,7 @@ export declare const HeaderBlock: {
990
1040
  }) | {
991
1041
  type: string;
992
1042
  additionalProperties: boolean;
993
- required: import("../..").Theme[];
1043
+ required: import("../../models").Theme[];
994
1044
  properties: {};
995
1045
  optionName: string;
996
1046
  })[];
@@ -1059,7 +1109,7 @@ export declare const HeaderBlock: {
1059
1109
  };
1060
1110
  controls: {
1061
1111
  type: string;
1062
- enum: import("../..").MediaVideoControlsType[];
1112
+ enum: import("../../models").MediaVideoControlsType[];
1063
1113
  };
1064
1114
  customControlsOptions: {
1065
1115
  type: string;
@@ -1067,14 +1117,14 @@ export declare const HeaderBlock: {
1067
1117
  properties: {
1068
1118
  type: {
1069
1119
  type: string;
1070
- enum: import("../..").CustomControlsType[];
1120
+ enum: import("../../models").CustomControlsType[];
1071
1121
  };
1072
1122
  muteButtonShown: {
1073
1123
  type: string;
1074
1124
  };
1075
1125
  positioning: {
1076
1126
  type: string;
1077
- enum: import("../..").CustomControlsButtonPositioning[];
1127
+ enum: import("../../models").CustomControlsButtonPositioning[];
1078
1128
  };
1079
1129
  };
1080
1130
  };
@@ -1090,7 +1140,7 @@ export declare const HeaderBlock: {
1090
1140
  }) | {
1091
1141
  type: string;
1092
1142
  additionalProperties: boolean;
1093
- required: import("../..").Theme[];
1143
+ required: import("../../models").Theme[];
1094
1144
  properties: {};
1095
1145
  optionName: string;
1096
1146
  })[];
@@ -1099,9 +1149,58 @@ export declare const HeaderBlock: {
1099
1149
  type: string;
1100
1150
  enum: string[];
1101
1151
  };
1152
+ stockPrice: {
1153
+ type: string;
1154
+ additionalProperties: boolean;
1155
+ properties: {
1156
+ type: {
1157
+ type: string;
1158
+ };
1159
+ name: {
1160
+ type: string;
1161
+ };
1162
+ delayed: {
1163
+ type: string;
1164
+ };
1165
+ };
1166
+ };
1167
+ stockShares: {
1168
+ type: string;
1169
+ additionalProperties: boolean;
1170
+ properties: {
1171
+ date: {
1172
+ type: string;
1173
+ };
1174
+ total: {
1175
+ type: string;
1176
+ };
1177
+ text: {
1178
+ type: string;
1179
+ };
1180
+ included: {
1181
+ type: string;
1182
+ items: {
1183
+ type: string;
1184
+ additionalProperties: boolean;
1185
+ required: boolean;
1186
+ properties: {
1187
+ title: {
1188
+ type: string;
1189
+ };
1190
+ text: {
1191
+ type: string;
1192
+ };
1193
+ };
1194
+ };
1195
+ };
1196
+ description: {
1197
+ type: string;
1198
+ };
1199
+ };
1200
+ };
1102
1201
  stock: {
1103
1202
  type: string;
1104
- enum: string[];
1203
+ enum: HeaderStockType[];
1105
1204
  };
1106
1205
  backLink: {
1107
1206
  type: string;
@@ -1267,7 +1366,7 @@ export declare const HeaderBlock: {
1267
1366
  };
1268
1367
  controls: {
1269
1368
  type: string;
1270
- enum: import("../..").MediaVideoControlsType[];
1369
+ enum: import("../../models").MediaVideoControlsType[];
1271
1370
  };
1272
1371
  customControlsOptions: {
1273
1372
  type: string;
@@ -1275,14 +1374,14 @@ export declare const HeaderBlock: {
1275
1374
  properties: {
1276
1375
  type: {
1277
1376
  type: string;
1278
- enum: import("../..").CustomControlsType[];
1377
+ enum: import("../../models").CustomControlsType[];
1279
1378
  };
1280
1379
  muteButtonShown: {
1281
1380
  type: string;
1282
1381
  };
1283
1382
  positioning: {
1284
1383
  type: string;
1285
- enum: import("../..").CustomControlsButtonPositioning[];
1384
+ enum: import("../../models").CustomControlsButtonPositioning[];
1286
1385
  };
1287
1386
  };
1288
1387
  };
@@ -1445,7 +1544,7 @@ export declare const HeaderBlock: {
1445
1544
  }) | {
1446
1545
  type: string;
1447
1546
  additionalProperties: boolean;
1448
- required: import("../..").Theme[];
1547
+ required: import("../../models").Theme[];
1449
1548
  properties: {};
1450
1549
  optionName: string;
1451
1550
  })[];
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HeaderBlock = exports.HeaderProperties = exports.HeaderBackgroundProps = void 0;
4
4
  const schema_1 = require("../../components/Image/schema");
5
+ const models_1 = require("../../models");
5
6
  const common_1 = require("../../schema/validators/common");
6
7
  const utils_1 = require("../../schema/validators/utils");
7
8
  exports.HeaderBackgroundProps = {
@@ -39,9 +40,58 @@ exports.HeaderProperties = {
39
40
  type: 'string',
40
41
  enum: common_1.mediaView,
41
42
  },
43
+ stockPrice: {
44
+ type: 'object',
45
+ additionalProperties: false,
46
+ properties: {
47
+ type: {
48
+ type: 'string',
49
+ },
50
+ name: {
51
+ type: 'string',
52
+ },
53
+ delayed: {
54
+ type: 'string',
55
+ },
56
+ },
57
+ },
58
+ stockShares: {
59
+ type: 'object',
60
+ additionalProperties: false,
61
+ properties: {
62
+ date: {
63
+ type: 'string',
64
+ },
65
+ total: {
66
+ type: 'string',
67
+ },
68
+ text: {
69
+ type: 'string',
70
+ },
71
+ included: {
72
+ type: 'array',
73
+ items: {
74
+ type: 'object',
75
+ additionalProperties: false,
76
+ required: true,
77
+ properties: {
78
+ title: {
79
+ type: 'string',
80
+ },
81
+ text: {
82
+ type: 'string',
83
+ },
84
+ },
85
+ },
86
+ },
87
+ description: {
88
+ type: 'string',
89
+ },
90
+ },
91
+ },
42
92
  stock: {
43
93
  type: 'string',
44
- enum: ['price', 'shares'],
94
+ enum: [models_1.HeaderStockType.Price, models_1.HeaderStockType.Shares],
45
95
  },
46
96
  backLink: {
47
97
  type: 'object',
@@ -183,9 +183,58 @@ export declare const HeaderSliderBlock: {
183
183
  type: string;
184
184
  enum: string[];
185
185
  };
186
+ stockPrice: {
187
+ type: string;
188
+ additionalProperties: boolean;
189
+ properties: {
190
+ type: {
191
+ type: string;
192
+ };
193
+ name: {
194
+ type: string;
195
+ };
196
+ delayed: {
197
+ type: string;
198
+ };
199
+ };
200
+ };
201
+ stockShares: {
202
+ type: string;
203
+ additionalProperties: boolean;
204
+ properties: {
205
+ date: {
206
+ type: string;
207
+ };
208
+ total: {
209
+ type: string;
210
+ };
211
+ text: {
212
+ type: string;
213
+ };
214
+ included: {
215
+ type: string;
216
+ items: {
217
+ type: string;
218
+ additionalProperties: boolean;
219
+ required: boolean;
220
+ properties: {
221
+ title: {
222
+ type: string;
223
+ };
224
+ text: {
225
+ type: string;
226
+ };
227
+ };
228
+ };
229
+ };
230
+ description: {
231
+ type: string;
232
+ };
233
+ };
234
+ };
186
235
  stock: {
187
236
  type: string;
188
- enum: string[];
237
+ enum: import("../..").HeaderStockType[];
189
238
  };
190
239
  backLink: {
191
240
  type: string;
@@ -84,6 +84,9 @@ unpredictable css rules order in build */
84
84
  }
85
85
  }
86
86
 
87
+ .pc-block-base__wrap_no-horizontal-scroll {
88
+ overflow-x: hidden;
89
+ }
87
90
  .pc-block-base__background-full {
88
91
  position: absolute;
89
92
  background-size: cover;
@@ -3,19 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
5
  const grid_1 = require("../../grid");
6
+ const models_1 = require("../../models");
6
7
  const utils_1 = require("../../utils");
7
8
  const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
8
9
  const b = (0, utils_1.block)('block-base');
9
10
  const BlockBase = (props) => {
10
- const { anchor, visibility, indent, backgroundFull, visible, hidden, children, className, resetPaddings, qa, } = props;
11
+ const { type, anchor, visibility, indent, backgroundFull, visible, hidden, children, className, resetPaddings, qa, } = props;
11
12
  const { top, bottom } = indent || (resetPaddings ? { top: '0', bottom: '0' } : { top: 'l', bottom: 'l' });
12
13
  const isBackgroundUrl = /^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(backgroundFull || '');
13
14
  const visibilityClasses = (0, utils_1.getBlockVisibilityClasses)(visibility);
14
- return (react_1.default.createElement(grid_1.Col, { className: b(Object.assign({ ['reset-paddings']: resetPaddings, indentTop: top, indentBottom: bottom }, visibilityClasses), className), hidden: hidden, visible: visible, reset: true, qa: qa },
15
- anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
16
- backgroundFull && (react_1.default.createElement("div", { className: b('background-full', { top }), style: isBackgroundUrl
17
- ? { backgroundImage: `url(${backgroundFull})` }
18
- : { backgroundColor: backgroundFull } })),
19
- children));
15
+ return (react_1.default.createElement(grid_1.Grid, { className: b('wrap', { 'no-horizontal-scroll': type === models_1.BlockType.QuotesBlock }) },
16
+ react_1.default.createElement(grid_1.Row, null,
17
+ react_1.default.createElement(grid_1.Col, null,
18
+ react_1.default.createElement(grid_1.Col, { className: b(Object.assign({ ['reset-paddings']: resetPaddings, indentTop: top, indentBottom: bottom }, visibilityClasses), className), hidden: hidden, visible: visible, reset: true, qa: qa },
19
+ anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
20
+ backgroundFull && (react_1.default.createElement("div", { className: b('background-full', { top }), style: isBackgroundUrl
21
+ ? { backgroundImage: `url(${backgroundFull})` }
22
+ : { backgroundColor: backgroundFull } })),
23
+ children)))));
20
24
  };
21
25
  exports.default = BlockBase;
@@ -12,13 +12,11 @@ const animateContext_1 = require("../../context/animateContext");
12
12
  const innerContext_1 = require("../../context/innerContext");
13
13
  const projectSettingsContext_1 = require("../../context/projectSettingsContext");
14
14
  const theme_1 = require("../../context/theme");
15
- const grid_1 = require("../../grid");
16
15
  const models_1 = require("../../models");
17
16
  const Layout_1 = tslib_1.__importDefault(require("../../navigation/containers/Layout/Layout"));
18
17
  const utils_1 = require("../../utils");
19
18
  const ConstructorBlocks_1 = require("./components/ConstructorBlocks");
20
19
  const ConstructorItem_1 = require("./components/ConstructorItem");
21
- const ConstructorRow_1 = require("./components/ConstructorRow");
22
20
  const b = (0, utils_1.block)('page-constructor');
23
21
  const Constructor = (props) => {
24
22
  const { content: { blocks = [], background } = {}, renderMenu, shouldRenderBlock, navigation, custom, isBranded, microdata, } = props;
@@ -52,8 +50,7 @@ const Constructor = (props) => {
52
50
  react_1.default.createElement(Layout_1.default, { navigation: navigation },
53
51
  renderMenu && renderMenu(),
54
52
  header && (react_1.default.createElement(ConstructorItem_1.ConstructorHeader, { data: header, blockKey: models_1.BlockType.HeaderBlock })),
55
- react_1.default.createElement(grid_1.Grid, null, restBlocks && (react_1.default.createElement(ConstructorRow_1.ConstructorRow, null,
56
- react_1.default.createElement(ConstructorBlocks_1.ConstructorBlocks, { items: restBlocks }))))),
53
+ restBlocks && react_1.default.createElement(ConstructorBlocks_1.ConstructorBlocks, { items: restBlocks })),
57
54
  isBranded && react_1.default.createElement(BrandFooter_1.default, null)))));
58
55
  };
59
56
  exports.Constructor = Constructor;
@@ -11,6 +11,7 @@ const b = (0, utils_1.block)('constructor-block');
11
11
  const ConstructorBlock = ({ index = 0, data, children, }) => {
12
12
  const { type } = data;
13
13
  const blockBaseProps = (0, react_1.useMemo)(() => (0, pick_1.default)(data, [
14
+ 'type',
14
15
  'anchor',
15
16
  'visible',
16
17
  'hidden',
@@ -37,10 +37,25 @@ const ConstructorBlocks = ({ items }) => {
37
37
  }
38
38
  itemElement = (react_1.default.createElement(ConstructorItem_1.ConstructorItem, { data: item, key: blockId, blockKey: blockId }, children));
39
39
  }
40
- return blockTypes.includes(item.type) ? (
41
- //TODO: replace ConstructorBlock (and delete it) with BlockBase when all
42
- // components relying on constructor inner structure like Slider or blog-constructor will be refactored
43
- react_1.default.createElement(ConstructorBlock_1.ConstructorBlock, { data: item, key: blockId, index: index }, itemElement)) : (itemElement);
40
+ if (blockTypes.includes(item.type)) {
41
+ if (parentId) {
42
+ return (react_1.default.createElement(ConstructorBlock_1.ConstructorBlock, { key: blockId, data: item, index: index }, itemElement));
43
+ }
44
+ return (react_1.default.createElement("div", { key: blockId, className: "test-constructor-blog" },
45
+ react_1.default.createElement(ConstructorBlock_1.ConstructorBlock, { data: item, index: index }, itemElement)));
46
+ }
47
+ return itemElement;
48
+ // return blockTypes.includes(item.type) ? (
49
+ // //TODO: replace ConstructorBlock (and delete it) with BlockBase when all
50
+ // // components relying on constructor inner structure like Slider or blog-constructor will be refactored
51
+ // <div key={blockId} className="test-constructor-blog">
52
+ // <ConstructorBlock data={item} index={index}>
53
+ // {itemElement}
54
+ // </ConstructorBlock>
55
+ // </div>
56
+ // ) : (
57
+ // itemElement
58
+ // );
44
59
  };
45
60
  return react_1.default.createElement(react_1.Fragment, null, items.map(renderer.bind(null, '')));
46
61
  };
@@ -47,6 +47,7 @@ export type VisibilityPreset = 'mobile' | 'desktop';
47
47
  export type VisibilityMap = Partial<Record<Breakpoint, boolean>>;
48
48
  export type VisibilityProp = VisibilityPreset | VisibilityMap;
49
49
  export interface BlockBaseProps {
50
+ type?: string;
50
51
  anchor?: AnchorProps;
51
52
  visibility?: VisibilityProp;
52
53
  /** @deprecated */
@@ -138,21 +139,21 @@ export declare enum HeaderStockType {
138
139
  Shares = "shares"
139
140
  }
140
141
  export interface HeaderStockPriceProps {
141
- name: string;
142
- percent: string;
143
- price: string;
144
- update: string;
145
- delayed: string;
142
+ name?: string;
143
+ percent?: string;
144
+ price?: string;
145
+ update?: string;
146
+ delayed?: string;
146
147
  }
147
148
  export interface HeaderStockSharesProps {
148
- date: string;
149
- total: string;
150
- text: string;
151
- included: {
149
+ date?: string;
150
+ total?: string;
151
+ text?: string;
152
+ included?: {
152
153
  title: string;
153
154
  text: string;
154
155
  }[];
155
- description: string;
156
+ description?: string;
156
157
  }
157
158
  export interface HeaderBlockProps {
158
159
  title: string;
@@ -162,6 +163,8 @@ export interface HeaderBlockProps {
162
163
  description?: string;
163
164
  buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];
164
165
  stock?: HeaderStockType;
166
+ stockPrice?: Pick<HeaderStockPriceProps, 'name' | 'delayed'>;
167
+ stockShares?: HeaderStockSharesProps;
165
168
  width?: HeaderWidth;
166
169
  /** @deprecated imageSize now depends on width */
167
170
  imageSize?: HeaderImageSize;