@doyourjob/gravity-ui-page-constructor 5.31.267 → 5.31.268
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/build/cjs/blocks/Header/Header.css +1 -11
- package/build/cjs/blocks/Header/Header.js +11 -4
- package/build/cjs/blocks/Header/schema.d.ts +308 -12
- package/build/cjs/blocks/Header/schema.js +8 -6
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +154 -6
- package/build/cjs/components/Title/TitleItem.d.ts +3 -0
- package/build/cjs/components/Title/TitleItem.js +3 -2
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -2
- package/build/cjs/text-transform/config.js +1 -6
- package/build/esm/blocks/Header/Header.css +1 -11
- package/build/esm/blocks/Header/Header.js +12 -4
- package/build/esm/blocks/Header/schema.d.ts +308 -12
- package/build/esm/blocks/Header/schema.js +9 -7
- package/build/esm/blocks/HeaderSlider/schema.d.ts +154 -6
- package/build/esm/components/Title/TitleItem.d.ts +3 -0
- package/build/esm/components/Title/TitleItem.js +3 -2
- package/build/esm/models/constructor-items/blocks.d.ts +1 -2
- package/build/esm/text-transform/config.js +1 -6
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -2
- package/server/text-transform/config.js +1 -6
- package/widget/255.index.js +1 -1
- package/widget/index.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-header-block__title_size_xl, .pc-header-block__title_size_l, .pc-header-block__title_size_m, .pc-header-block__title_size_s, .pc-header-block__title_size_xs
|
|
1
|
+
.pc-header-block__title_size_xl, .pc-header-block__title_size_l, .pc-header-block__title_size_m, .pc-header-block__title_size_s, .pc-header-block__title_size_xs {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -100,18 +100,8 @@ unpredictable css rules order in build */
|
|
|
100
100
|
z-index: 10;
|
|
101
101
|
}
|
|
102
102
|
.pc-header-block__title {
|
|
103
|
-
font-size: var(--g-text-display-4-font-size, var(--pc-text-display-4-font-size));
|
|
104
|
-
line-height: var(--g-text-display-4-line-height, var(--pc-text-display-4-line-height));
|
|
105
|
-
color: var(--pc-text-header-color);
|
|
106
|
-
font-weight: var(--g-text-accent-font-weight);
|
|
107
103
|
position: relative;
|
|
108
104
|
}
|
|
109
|
-
@media (max-width: 577px) {
|
|
110
|
-
.pc-header-block__title {
|
|
111
|
-
font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
|
|
112
|
-
line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
105
|
.pc-header-block__title a {
|
|
116
106
|
outline: none;
|
|
117
107
|
color: var(--g-color-text-link);
|
|
@@ -6,6 +6,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
7
|
const components_1 = require("../../components");
|
|
8
8
|
const utils_1 = require("../../components/Media/Image/utils");
|
|
9
|
+
const TitleItem_1 = tslib_1.__importDefault(require("../../components/Title/TitleItem"));
|
|
9
10
|
const headerContext_1 = require("../../context/headerContext");
|
|
10
11
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
11
12
|
const theme_1 = require("../../context/theme");
|
|
@@ -30,7 +31,7 @@ const Background = ({ background, isMobile }) => {
|
|
|
30
31
|
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 } }));
|
|
31
32
|
// eslint-disable-next-line complexity
|
|
32
33
|
const HeaderBlock = (props) => {
|
|
33
|
-
const { title,
|
|
34
|
+
const { title, switchingTitle, topTags, bottomTags, overtitle, description, buttons, stock, stockPrice, stockShares, image, video, width = 's', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', verticalOffsetTop, verticalOffsetBottom, className, breadcrumbs, status, renderTitle, children, mediaView = 'full', backgroundEffect, headerSpace, backLink, unicorn, unicornSdkUrl, } = props;
|
|
34
35
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
35
36
|
const { backButton, blockTag } = (0, react_1.useContext)(headerContext_1.HeaderContext);
|
|
36
37
|
const theme = (0, theme_1.useTheme)();
|
|
@@ -54,6 +55,12 @@ const HeaderBlock = (props) => {
|
|
|
54
55
|
}
|
|
55
56
|
return undefined;
|
|
56
57
|
}, [backButton, backLink, breadcrumbs, verticalOffset]);
|
|
58
|
+
const _a = (0, react_1.useMemo)(() => !title || typeof title === 'string'
|
|
59
|
+
? { text: title, textSize: 'l' }
|
|
60
|
+
: Object.assign({ textSize: 'l' }, title), [title]), { text, textSize = 'l' } = _a, titleItemProps = tslib_1.__rest(_a, ["text", "textSize"]);
|
|
61
|
+
const titlePrefix = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
62
|
+
react_1.default.createElement(HeaderTag_1.default, { tag: blockTag }),
|
|
63
|
+
status));
|
|
57
64
|
return (react_1.default.createElement("header", { ref: headerRef, className: b({
|
|
58
65
|
['has-media']: hasRightSideImage,
|
|
59
66
|
['has-background']: hasBackground,
|
|
@@ -85,13 +92,13 @@ const HeaderBlock = (props) => {
|
|
|
85
92
|
react_1.default.createElement("div", null,
|
|
86
93
|
overtitle && (react_1.default.createElement("div", { className: b('overtitle') },
|
|
87
94
|
react_1.default.createElement(components_1.HTML, null, overtitle))),
|
|
88
|
-
react_1.default.createElement((0, utils_2.getHeaderTag)(
|
|
95
|
+
switchingTitle || renderTitle ? (react_1.default.createElement((0, utils_2.getHeaderTag)(textSize), {
|
|
89
96
|
className: b('title', {
|
|
90
97
|
'pre-wrap': Boolean(switchingTitle),
|
|
91
|
-
size:
|
|
98
|
+
size: textSize,
|
|
92
99
|
}),
|
|
93
100
|
id: titleId,
|
|
94
|
-
},
|
|
101
|
+
}, titlePrefix, switchingTitle ? (react_1.default.createElement(SwitchingTtitle_1.default, Object.assign({}, switchingTitle))) : (renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle(text)))) : (react_1.default.createElement(TitleItem_1.default, Object.assign({ text: text, textSize: textSize, resetMargin: true, className: b('title'), id: titleId, prefix: titlePrefix }, titleItemProps))),
|
|
95
102
|
react_1.default.createElement(HeaderDescription_1.default, { className: b('description', { theme: textTheme }), description: description, theme: textTheme }),
|
|
96
103
|
react_1.default.createElement(HeaderButtons_1.default, { buttons: buttons, titleId: titleId }),
|
|
97
104
|
children),
|
|
@@ -320,12 +320,160 @@ export declare const HeaderBackgroundProps: {
|
|
|
320
320
|
};
|
|
321
321
|
export declare const HeaderProperties: {
|
|
322
322
|
title: {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
oneOf: ({
|
|
324
|
+
type: string;
|
|
325
|
+
contentType: string;
|
|
326
|
+
optionName: string;
|
|
327
|
+
} | {
|
|
328
|
+
optionName: string;
|
|
329
|
+
type: string;
|
|
330
|
+
additionalProperties: boolean;
|
|
331
|
+
required: string[];
|
|
332
|
+
properties: {
|
|
333
|
+
text: {
|
|
334
|
+
type: string;
|
|
335
|
+
contentType: string;
|
|
336
|
+
};
|
|
337
|
+
link: {
|
|
338
|
+
type: string;
|
|
339
|
+
additionalProperties: boolean;
|
|
340
|
+
required: string[];
|
|
341
|
+
properties: {
|
|
342
|
+
text: {
|
|
343
|
+
type: string;
|
|
344
|
+
contentType: string;
|
|
345
|
+
};
|
|
346
|
+
url: {
|
|
347
|
+
type: string;
|
|
348
|
+
};
|
|
349
|
+
urlTitle: {
|
|
350
|
+
type: string;
|
|
351
|
+
};
|
|
352
|
+
arrow: {
|
|
353
|
+
type: string;
|
|
354
|
+
};
|
|
355
|
+
theme: {
|
|
356
|
+
type: string;
|
|
357
|
+
enum: string[];
|
|
358
|
+
};
|
|
359
|
+
textSize: {
|
|
360
|
+
type: string;
|
|
361
|
+
enum: string[];
|
|
362
|
+
};
|
|
363
|
+
target: {
|
|
364
|
+
type: string;
|
|
365
|
+
enum: string[];
|
|
366
|
+
};
|
|
367
|
+
analyticsEvents: {
|
|
368
|
+
oneOf: ({
|
|
369
|
+
optionName: string;
|
|
370
|
+
type: string;
|
|
371
|
+
additionalProperties: {
|
|
372
|
+
type: string;
|
|
373
|
+
};
|
|
374
|
+
required: string[];
|
|
375
|
+
properties: {
|
|
376
|
+
name: {
|
|
377
|
+
type: string;
|
|
378
|
+
};
|
|
379
|
+
type: {
|
|
380
|
+
type: string;
|
|
381
|
+
};
|
|
382
|
+
counters: {
|
|
383
|
+
type: string;
|
|
384
|
+
additionalProperties: boolean;
|
|
385
|
+
required: never[];
|
|
386
|
+
properties: {
|
|
387
|
+
include: {
|
|
388
|
+
type: string;
|
|
389
|
+
items: {
|
|
390
|
+
type: string;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
exclude: {
|
|
394
|
+
type: string;
|
|
395
|
+
items: {
|
|
396
|
+
type: string;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
context: {
|
|
402
|
+
type: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
items?: undefined;
|
|
406
|
+
} | {
|
|
407
|
+
type: string;
|
|
408
|
+
items: {
|
|
409
|
+
type: string;
|
|
410
|
+
additionalProperties: {
|
|
411
|
+
type: string;
|
|
412
|
+
};
|
|
413
|
+
required: string[];
|
|
414
|
+
properties: {
|
|
415
|
+
name: {
|
|
416
|
+
type: string;
|
|
417
|
+
};
|
|
418
|
+
type: {
|
|
419
|
+
type: string;
|
|
420
|
+
};
|
|
421
|
+
counters: {
|
|
422
|
+
type: string;
|
|
423
|
+
additionalProperties: boolean;
|
|
424
|
+
required: never[];
|
|
425
|
+
properties: {
|
|
426
|
+
include: {
|
|
427
|
+
type: string;
|
|
428
|
+
items: {
|
|
429
|
+
type: string;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
exclude: {
|
|
433
|
+
type: string;
|
|
434
|
+
items: {
|
|
435
|
+
type: string;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
context: {
|
|
441
|
+
type: string;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
optionName: string;
|
|
446
|
+
})[];
|
|
447
|
+
};
|
|
448
|
+
type: {};
|
|
449
|
+
when: {
|
|
450
|
+
type: string;
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
textSize: {
|
|
455
|
+
type: string;
|
|
456
|
+
enum: string[];
|
|
457
|
+
};
|
|
458
|
+
bottomSpace: {
|
|
459
|
+
type: string;
|
|
460
|
+
enum: string[];
|
|
461
|
+
};
|
|
462
|
+
centered: {
|
|
463
|
+
type: string;
|
|
464
|
+
};
|
|
465
|
+
url: {
|
|
466
|
+
type: string;
|
|
467
|
+
};
|
|
468
|
+
urlTitle: {
|
|
469
|
+
type: string;
|
|
470
|
+
};
|
|
471
|
+
resetMargin: {
|
|
472
|
+
type: string;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
contentType?: undefined;
|
|
476
|
+
})[];
|
|
329
477
|
};
|
|
330
478
|
switchingTitle: {
|
|
331
479
|
type: string;
|
|
@@ -1042,12 +1190,160 @@ export declare const HeaderBlock: {
|
|
|
1042
1190
|
required: string[];
|
|
1043
1191
|
properties: {
|
|
1044
1192
|
title: {
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1193
|
+
oneOf: ({
|
|
1194
|
+
type: string;
|
|
1195
|
+
contentType: string;
|
|
1196
|
+
optionName: string;
|
|
1197
|
+
} | {
|
|
1198
|
+
optionName: string;
|
|
1199
|
+
type: string;
|
|
1200
|
+
additionalProperties: boolean;
|
|
1201
|
+
required: string[];
|
|
1202
|
+
properties: {
|
|
1203
|
+
text: {
|
|
1204
|
+
type: string;
|
|
1205
|
+
contentType: string;
|
|
1206
|
+
};
|
|
1207
|
+
link: {
|
|
1208
|
+
type: string;
|
|
1209
|
+
additionalProperties: boolean;
|
|
1210
|
+
required: string[];
|
|
1211
|
+
properties: {
|
|
1212
|
+
text: {
|
|
1213
|
+
type: string;
|
|
1214
|
+
contentType: string;
|
|
1215
|
+
};
|
|
1216
|
+
url: {
|
|
1217
|
+
type: string;
|
|
1218
|
+
};
|
|
1219
|
+
urlTitle: {
|
|
1220
|
+
type: string;
|
|
1221
|
+
};
|
|
1222
|
+
arrow: {
|
|
1223
|
+
type: string;
|
|
1224
|
+
};
|
|
1225
|
+
theme: {
|
|
1226
|
+
type: string;
|
|
1227
|
+
enum: string[];
|
|
1228
|
+
};
|
|
1229
|
+
textSize: {
|
|
1230
|
+
type: string;
|
|
1231
|
+
enum: string[];
|
|
1232
|
+
};
|
|
1233
|
+
target: {
|
|
1234
|
+
type: string;
|
|
1235
|
+
enum: string[];
|
|
1236
|
+
};
|
|
1237
|
+
analyticsEvents: {
|
|
1238
|
+
oneOf: ({
|
|
1239
|
+
optionName: string;
|
|
1240
|
+
type: string;
|
|
1241
|
+
additionalProperties: {
|
|
1242
|
+
type: string;
|
|
1243
|
+
};
|
|
1244
|
+
required: string[];
|
|
1245
|
+
properties: {
|
|
1246
|
+
name: {
|
|
1247
|
+
type: string;
|
|
1248
|
+
};
|
|
1249
|
+
type: {
|
|
1250
|
+
type: string;
|
|
1251
|
+
};
|
|
1252
|
+
counters: {
|
|
1253
|
+
type: string;
|
|
1254
|
+
additionalProperties: boolean;
|
|
1255
|
+
required: never[];
|
|
1256
|
+
properties: {
|
|
1257
|
+
include: {
|
|
1258
|
+
type: string;
|
|
1259
|
+
items: {
|
|
1260
|
+
type: string;
|
|
1261
|
+
};
|
|
1262
|
+
};
|
|
1263
|
+
exclude: {
|
|
1264
|
+
type: string;
|
|
1265
|
+
items: {
|
|
1266
|
+
type: string;
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
context: {
|
|
1272
|
+
type: string;
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
items?: undefined;
|
|
1276
|
+
} | {
|
|
1277
|
+
type: string;
|
|
1278
|
+
items: {
|
|
1279
|
+
type: string;
|
|
1280
|
+
additionalProperties: {
|
|
1281
|
+
type: string;
|
|
1282
|
+
};
|
|
1283
|
+
required: string[];
|
|
1284
|
+
properties: {
|
|
1285
|
+
name: {
|
|
1286
|
+
type: string;
|
|
1287
|
+
};
|
|
1288
|
+
type: {
|
|
1289
|
+
type: string;
|
|
1290
|
+
};
|
|
1291
|
+
counters: {
|
|
1292
|
+
type: string;
|
|
1293
|
+
additionalProperties: boolean;
|
|
1294
|
+
required: never[];
|
|
1295
|
+
properties: {
|
|
1296
|
+
include: {
|
|
1297
|
+
type: string;
|
|
1298
|
+
items: {
|
|
1299
|
+
type: string;
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
exclude: {
|
|
1303
|
+
type: string;
|
|
1304
|
+
items: {
|
|
1305
|
+
type: string;
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
context: {
|
|
1311
|
+
type: string;
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
optionName: string;
|
|
1316
|
+
})[];
|
|
1317
|
+
};
|
|
1318
|
+
type: {};
|
|
1319
|
+
when: {
|
|
1320
|
+
type: string;
|
|
1321
|
+
};
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
textSize: {
|
|
1325
|
+
type: string;
|
|
1326
|
+
enum: string[];
|
|
1327
|
+
};
|
|
1328
|
+
bottomSpace: {
|
|
1329
|
+
type: string;
|
|
1330
|
+
enum: string[];
|
|
1331
|
+
};
|
|
1332
|
+
centered: {
|
|
1333
|
+
type: string;
|
|
1334
|
+
};
|
|
1335
|
+
url: {
|
|
1336
|
+
type: string;
|
|
1337
|
+
};
|
|
1338
|
+
urlTitle: {
|
|
1339
|
+
type: string;
|
|
1340
|
+
};
|
|
1341
|
+
resetMargin: {
|
|
1342
|
+
type: string;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
contentType?: undefined;
|
|
1346
|
+
})[];
|
|
1051
1347
|
};
|
|
1052
1348
|
switchingTitle: {
|
|
1053
1349
|
type: string;
|
|
@@ -13,12 +13,14 @@ exports.HeaderBackgroundProps = {
|
|
|
13
13
|
};
|
|
14
14
|
exports.HeaderProperties = {
|
|
15
15
|
title: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
oneOf: [
|
|
17
|
+
{
|
|
18
|
+
type: 'string',
|
|
19
|
+
contentType: 'text',
|
|
20
|
+
optionName: 'text',
|
|
21
|
+
},
|
|
22
|
+
Object.assign(Object.assign({}, common_1.TitleProps), { optionName: 'options' }),
|
|
23
|
+
],
|
|
22
24
|
},
|
|
23
25
|
switchingTitle: {
|
|
24
26
|
type: 'object',
|
|
@@ -11,12 +11,160 @@ export declare const HeaderSliderBlock: {
|
|
|
11
11
|
required: string[];
|
|
12
12
|
properties: {
|
|
13
13
|
title: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
oneOf: ({
|
|
15
|
+
type: string;
|
|
16
|
+
contentType: string;
|
|
17
|
+
optionName: string;
|
|
18
|
+
} | {
|
|
19
|
+
optionName: string;
|
|
20
|
+
type: string;
|
|
21
|
+
additionalProperties: boolean;
|
|
22
|
+
required: string[];
|
|
23
|
+
properties: {
|
|
24
|
+
text: {
|
|
25
|
+
type: string;
|
|
26
|
+
contentType: string;
|
|
27
|
+
};
|
|
28
|
+
link: {
|
|
29
|
+
type: string;
|
|
30
|
+
additionalProperties: boolean;
|
|
31
|
+
required: string[];
|
|
32
|
+
properties: {
|
|
33
|
+
text: {
|
|
34
|
+
type: string;
|
|
35
|
+
contentType: string;
|
|
36
|
+
};
|
|
37
|
+
url: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
urlTitle: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
arrow: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
theme: {
|
|
47
|
+
type: string;
|
|
48
|
+
enum: string[];
|
|
49
|
+
};
|
|
50
|
+
textSize: {
|
|
51
|
+
type: string;
|
|
52
|
+
enum: string[];
|
|
53
|
+
};
|
|
54
|
+
target: {
|
|
55
|
+
type: string;
|
|
56
|
+
enum: string[];
|
|
57
|
+
};
|
|
58
|
+
analyticsEvents: {
|
|
59
|
+
oneOf: ({
|
|
60
|
+
optionName: string;
|
|
61
|
+
type: string;
|
|
62
|
+
additionalProperties: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
required: string[];
|
|
66
|
+
properties: {
|
|
67
|
+
name: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
type: {
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
73
|
+
counters: {
|
|
74
|
+
type: string;
|
|
75
|
+
additionalProperties: boolean;
|
|
76
|
+
required: never[];
|
|
77
|
+
properties: {
|
|
78
|
+
include: {
|
|
79
|
+
type: string;
|
|
80
|
+
items: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
exclude: {
|
|
85
|
+
type: string;
|
|
86
|
+
items: {
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
context: {
|
|
93
|
+
type: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
items?: undefined;
|
|
97
|
+
} | {
|
|
98
|
+
type: string;
|
|
99
|
+
items: {
|
|
100
|
+
type: string;
|
|
101
|
+
additionalProperties: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
required: string[];
|
|
105
|
+
properties: {
|
|
106
|
+
name: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
type: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
counters: {
|
|
113
|
+
type: string;
|
|
114
|
+
additionalProperties: boolean;
|
|
115
|
+
required: never[];
|
|
116
|
+
properties: {
|
|
117
|
+
include: {
|
|
118
|
+
type: string;
|
|
119
|
+
items: {
|
|
120
|
+
type: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
exclude: {
|
|
124
|
+
type: string;
|
|
125
|
+
items: {
|
|
126
|
+
type: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
context: {
|
|
132
|
+
type: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
optionName: string;
|
|
137
|
+
})[];
|
|
138
|
+
};
|
|
139
|
+
type: {};
|
|
140
|
+
when: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
textSize: {
|
|
146
|
+
type: string;
|
|
147
|
+
enum: string[];
|
|
148
|
+
};
|
|
149
|
+
bottomSpace: {
|
|
150
|
+
type: string;
|
|
151
|
+
enum: string[];
|
|
152
|
+
};
|
|
153
|
+
centered: {
|
|
154
|
+
type: string;
|
|
155
|
+
};
|
|
156
|
+
url: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
urlTitle: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
resetMargin: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
contentType?: undefined;
|
|
167
|
+
})[];
|
|
20
168
|
};
|
|
21
169
|
switchingTitle: {
|
|
22
170
|
type: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { QAProps, TitleItemProps, TitleTextSize } from '../../models';
|
|
2
3
|
export declare function getArrowSize(size: TitleTextSize, isMobile: boolean): 16 | 20 | 24 | 13 | 22 | 26 | 38;
|
|
3
4
|
export interface TitleItemFullProps extends TitleItemProps, QAProps {
|
|
4
5
|
className?: string;
|
|
6
|
+
id?: string;
|
|
5
7
|
onClick?: () => void;
|
|
8
|
+
prefix?: ReactNode;
|
|
6
9
|
resetMargin?: boolean;
|
|
7
10
|
}
|
|
8
11
|
declare const TitleItem: (props: TitleItemFullProps) => JSX.Element;
|
|
@@ -28,7 +28,7 @@ function getArrowSize(size, isMobile) {
|
|
|
28
28
|
exports.getArrowSize = getArrowSize;
|
|
29
29
|
const TitleItem = (props) => {
|
|
30
30
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
31
|
-
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, urlTitle, } = props;
|
|
31
|
+
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, urlTitle, id, prefix, } = props;
|
|
32
32
|
const { hostname } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
33
33
|
const textMarkup = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
34
|
react_1.default.createElement(__1.HTML, { className: b('text') }, text),
|
|
@@ -54,6 +54,7 @@ const TitleItem = (props) => {
|
|
|
54
54
|
react_1.default.createElement((0, utils_1.getHeaderTag)(textSize), {
|
|
55
55
|
className: b({ size: textSize, justify, 'reset-margin': resetMargin }, className),
|
|
56
56
|
'data-qa': `${qa}-header`,
|
|
57
|
-
|
|
57
|
+
id,
|
|
58
|
+
}, prefix, content)));
|
|
58
59
|
};
|
|
59
60
|
exports.default = TitleItem;
|
|
@@ -203,8 +203,7 @@ export interface SwitchingTitleProps {
|
|
|
203
203
|
}
|
|
204
204
|
export type HeaderButtonType = Pick<ButtonProps, 'url' | 'text' | 'img' | 'theme' | 'primary' | 'size' | 'extraProps'>;
|
|
205
205
|
export interface HeaderBlockProps {
|
|
206
|
-
title: string;
|
|
207
|
-
titleSize?: TitleTextSize;
|
|
206
|
+
title: TitleItemProps | string;
|
|
208
207
|
switchingTitle?: SwitchingTitleProps;
|
|
209
208
|
topTags?: HeaderTag[];
|
|
210
209
|
bottomTags?: HeaderTag[];
|
|
@@ -355,12 +355,7 @@ exports.config = {
|
|
|
355
355
|
parser: parsePriceDetailedBlock,
|
|
356
356
|
},
|
|
357
357
|
],
|
|
358
|
-
[models_1.BlockType.HeaderBlock]: [
|
|
359
|
-
{
|
|
360
|
-
fields: ['description'],
|
|
361
|
-
transformer: common_1.yfmTransformer,
|
|
362
|
-
},
|
|
363
|
-
],
|
|
358
|
+
[models_1.BlockType.HeaderBlock]: [...exports.blockHeaderTransformer],
|
|
364
359
|
[models_1.BlockType.HeaderMinifyBlock]: [
|
|
365
360
|
{
|
|
366
361
|
fields: ['title', 'description'],
|