@doyourjob/gravity-ui-page-constructor 5.31.18 → 5.31.20
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/EventsFeed/EventsFeedRecent/EventsFeedRecent.js +1 -1
- package/build/cjs/blocks/EventsFeed/EventsFeedUpcoming/EventsFeedUpcoming.d.ts +2 -2
- package/build/cjs/blocks/EventsFeed/EventsFeedUpcoming/EventsFeedUpcoming.js +3 -0
- package/build/cjs/blocks/HighlightTable/HighlightTable.css +86 -0
- package/build/cjs/blocks/HighlightTable/HighlightTable.d.ts +3 -0
- package/build/cjs/blocks/HighlightTable/HighlightTable.js +74 -0
- package/build/cjs/blocks/HighlightTable/schema.d.ts +135 -0
- package/build/cjs/blocks/HighlightTable/schema.js +44 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +4 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +17 -2
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/text-transform/config.js +15 -0
- package/build/esm/blocks/EventsFeed/EventsFeedRecent/EventsFeedRecent.js +1 -1
- package/build/esm/blocks/EventsFeed/EventsFeedUpcoming/EventsFeedUpcoming.d.ts +2 -2
- package/build/esm/blocks/EventsFeed/EventsFeedUpcoming/EventsFeedUpcoming.js +3 -0
- package/build/esm/blocks/HighlightTable/HighlightTable.css +86 -0
- package/build/esm/blocks/HighlightTable/HighlightTable.d.ts +4 -0
- package/build/esm/blocks/HighlightTable/HighlightTable.js +70 -0
- package/build/esm/blocks/HighlightTable/schema.d.ts +135 -0
- package/build/esm/blocks/HighlightTable/schema.js +41 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +4 -0
- package/build/esm/models/constructor-items/blocks.d.ts +17 -2
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/schema/constants.js +3 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/text-transform/config.js +15 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +17 -2
- package/server/models/constructor-items/blocks.js +1 -0
- package/server/text-transform/config.js +15 -0
- package/widget/index.js +1 -1
|
@@ -21,7 +21,7 @@ const EventsFeedRecent = () => {
|
|
|
21
21
|
const { recent, page, pageSize, onLoadMore } = (0, react_1.useContext)(eventsContext_1.EventsRecentContext);
|
|
22
22
|
const itemsToShow = recent.slice(0, page * pageSize);
|
|
23
23
|
const hasMore = page < Math.ceil(recent.length / pageSize);
|
|
24
|
-
if (recent.length === 0) {
|
|
24
|
+
if (!recent || recent.length === 0) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
return (react_1.default.createElement("div", { className: b() },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const EventsFeedUpcoming: () => JSX.Element;
|
|
3
|
-
declare const _default: React.MemoExoticComponent<() => JSX.Element>;
|
|
2
|
+
export declare const EventsFeedUpcoming: () => JSX.Element | null;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<() => JSX.Element | null>;
|
|
4
4
|
export default _default;
|
|
@@ -18,6 +18,9 @@ const colSizes = {
|
|
|
18
18
|
};
|
|
19
19
|
const EventsFeedUpcoming = () => {
|
|
20
20
|
const { upcoming } = (0, react_1.useContext)(eventsContext_1.EventsUpcomingContext);
|
|
21
|
+
if (!upcoming || upcoming.length === 0) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
21
24
|
return (react_1.default.createElement("div", { className: b() },
|
|
22
25
|
react_1.default.createElement(components_1.Anchor, { id: "upcoming" }),
|
|
23
26
|
react_1.default.createElement(__1.CardLayoutBlock, { colSizes: colSizes }, upcoming.map((item) => (react_1.default.createElement(sub_blocks_1.FeedCard, Object.assign({ key: item.slug }, item)))))));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.pc-highlight-table-block__title {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* use this for style redefinitions to awoid problems with
|
|
6
|
+
unpredictable css rules order in build */
|
|
7
|
+
.pc-highlight-table-block__description {
|
|
8
|
+
margin-bottom: 16px;
|
|
9
|
+
}
|
|
10
|
+
.pc-highlight-table-block__title {
|
|
11
|
+
font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
|
|
12
|
+
line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
|
|
13
|
+
color: var(--pc-text-header-color);
|
|
14
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
15
|
+
position: sticky;
|
|
16
|
+
display: block;
|
|
17
|
+
margin-bottom: 16px;
|
|
18
|
+
}
|
|
19
|
+
@media (max-width: 576px) {
|
|
20
|
+
.pc-highlight-table-block__title {
|
|
21
|
+
font-size: var(--g-text-display-1-font-size, var(--pc-text-display-1-font-size));
|
|
22
|
+
line-height: var(--g-text-display-1-line-height, var(--pc-text-display-1-line-height));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.pc-highlight-table-block__content {
|
|
26
|
+
padding: 0 8px;
|
|
27
|
+
}
|
|
28
|
+
@media (max-width: 769px) {
|
|
29
|
+
.pc-highlight-table-block__content {
|
|
30
|
+
min-width: 1024px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.pc-highlight-table-block__table {
|
|
34
|
+
overflow: auto;
|
|
35
|
+
}
|
|
36
|
+
@media (max-width: 769px) {
|
|
37
|
+
.pc-highlight-table-block__table {
|
|
38
|
+
margin-right: -48px;
|
|
39
|
+
margin-left: -48px;
|
|
40
|
+
padding: 0 48px 12px;
|
|
41
|
+
scrollbar-width: none;
|
|
42
|
+
}
|
|
43
|
+
.pc-highlight-table-block__table::-webkit-scrollbar {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.pc-highlight-table-block__head {
|
|
48
|
+
color: rgba(0, 0, 0, 0.5);
|
|
49
|
+
}
|
|
50
|
+
.pc-highlight-table-block__body {
|
|
51
|
+
border: 1px solid var(--g-color-private-black-100);
|
|
52
|
+
}
|
|
53
|
+
.pc-highlight-table-block__head, .pc-highlight-table-block__body {
|
|
54
|
+
border-radius: 10px;
|
|
55
|
+
padding: 0 20px;
|
|
56
|
+
margin: 0 -8px;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
.pc-highlight-table-block__row.pc-highlight-table-block__row.pc-highlight-table-block__row.pc-highlight-table-block__row {
|
|
60
|
+
margin: 0 -20px;
|
|
61
|
+
padding: 0 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.pc-highlight-table-block__row + .pc-highlight-table-block__row {
|
|
65
|
+
border-top: 1px solid var(--g-color-private-black-100);
|
|
66
|
+
}
|
|
67
|
+
.pc-highlight-table-block__scrollbar {
|
|
68
|
+
visibility: hidden;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
height: 5px;
|
|
71
|
+
width: 100%;
|
|
72
|
+
margin-top: -5px;
|
|
73
|
+
border-radius: 2px;
|
|
74
|
+
background-color: var(--g-color-private-black-150);
|
|
75
|
+
}
|
|
76
|
+
@media (max-width: 769px) {
|
|
77
|
+
.pc-highlight-table-block__scrollbar {
|
|
78
|
+
visibility: visible;
|
|
79
|
+
}
|
|
80
|
+
.pc-highlight-table-block__scrollbar > div {
|
|
81
|
+
height: 100%;
|
|
82
|
+
border-radius: 2px;
|
|
83
|
+
background-color: var(--g-color-private-black-400);
|
|
84
|
+
transition: transform ease 50ms;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightTableBlock = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
+
const components_1 = require("../../components");
|
|
8
|
+
const grid_1 = require("../../grid");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const b = (0, utils_1.block)('highlight-table-block');
|
|
11
|
+
function getColSize(value) {
|
|
12
|
+
switch (value) {
|
|
13
|
+
case 'xxl':
|
|
14
|
+
return 12;
|
|
15
|
+
case 'xl':
|
|
16
|
+
return 6;
|
|
17
|
+
case 'l':
|
|
18
|
+
return 4;
|
|
19
|
+
case 'm':
|
|
20
|
+
return 3;
|
|
21
|
+
case 's':
|
|
22
|
+
return 2;
|
|
23
|
+
case 'xs':
|
|
24
|
+
return 1;
|
|
25
|
+
default:
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const HighlightTableBlock = (props) => {
|
|
30
|
+
const { title, description, table } = props;
|
|
31
|
+
const firstRow = table.content[0] || [];
|
|
32
|
+
const otherRows = table.content.slice(1);
|
|
33
|
+
const tableRef = (0, react_1.useRef)(null);
|
|
34
|
+
const scrollBarRef = (0, react_1.useRef)(null);
|
|
35
|
+
const scrollThumbRef = (0, react_1.useRef)(null);
|
|
36
|
+
(0, react_1.useEffect)(() => {
|
|
37
|
+
const tableElem = tableRef.current;
|
|
38
|
+
const scrollBar = scrollBarRef.current;
|
|
39
|
+
const scrollThumb = scrollThumbRef.current;
|
|
40
|
+
if (!tableElem || !scrollBar || !scrollThumb)
|
|
41
|
+
return () => { };
|
|
42
|
+
const updateProgress = () => {
|
|
43
|
+
const scrollWidth = Math.round(scrollBar.clientWidth * (tableElem.clientWidth / tableElem.scrollWidth));
|
|
44
|
+
const scrollLeft = Math.round(scrollBar.clientWidth * (tableElem.scrollLeft / tableElem.scrollWidth));
|
|
45
|
+
scrollThumb.style.setProperty('transform', `translateX(${scrollLeft}px)`);
|
|
46
|
+
scrollThumb.style.setProperty('width', `${scrollWidth}px`);
|
|
47
|
+
};
|
|
48
|
+
updateProgress();
|
|
49
|
+
tableElem.addEventListener('scroll', updateProgress);
|
|
50
|
+
return () => {
|
|
51
|
+
tableElem.removeEventListener('scroll', updateProgress);
|
|
52
|
+
};
|
|
53
|
+
}, []);
|
|
54
|
+
const renderRow = (0, react_1.useCallback)((row, index) => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
return (react_1.default.createElement(grid_1.Row, { key: index, className: b('row'), style: { backgroundColor: (_b = (_a = table.highlighter) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : '' } }, row.map((cell, cellIndex) => {
|
|
57
|
+
var _a, _b, _c;
|
|
58
|
+
return (react_1.default.createElement(grid_1.Col, { sizes: getColSize((_a = table.customColumnWidth) === null || _a === void 0 ? void 0 : _a[cellIndex]), key: cellIndex, className: b('cell'), style: { textAlign: (_c = (_b = table.justify) === null || _b === void 0 ? void 0 : _b[cellIndex]) !== null && _c !== void 0 ? _c : 'left' } },
|
|
59
|
+
react_1.default.createElement(components_1.HTML, null, cell)));
|
|
60
|
+
})));
|
|
61
|
+
}, [table.customColumnWidth, table.highlighter, table.justify]);
|
|
62
|
+
return (react_1.default.createElement("div", { className: b() },
|
|
63
|
+
react_1.default.createElement(uikit_1.Text, { className: b('title'), variant: "header-2" }, title),
|
|
64
|
+
description && (react_1.default.createElement("div", { className: b('description') },
|
|
65
|
+
react_1.default.createElement(components_1.YFMWrapper, { content: description, modifiers: { constructor: true } }))),
|
|
66
|
+
react_1.default.createElement("div", { ref: tableRef, className: b('table') },
|
|
67
|
+
react_1.default.createElement(grid_1.Grid, { className: b('content') },
|
|
68
|
+
react_1.default.createElement("div", { className: b('head') }, renderRow(firstRow, 0)),
|
|
69
|
+
react_1.default.createElement("div", { className: b('body') }, otherRows.map(renderRow)))),
|
|
70
|
+
react_1.default.createElement("div", { ref: scrollBarRef, className: b('scrollbar') },
|
|
71
|
+
react_1.default.createElement("div", { ref: scrollThumbRef }))));
|
|
72
|
+
};
|
|
73
|
+
exports.HighlightTableBlock = HighlightTableBlock;
|
|
74
|
+
exports.default = exports.HighlightTableBlock;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export declare const HighlightTableBlock: {
|
|
2
|
+
'highlight-table-block': {
|
|
3
|
+
additionalProperties: boolean;
|
|
4
|
+
required: string[];
|
|
5
|
+
properties: {
|
|
6
|
+
title: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
description: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
table: {
|
|
13
|
+
additionalProperties: boolean;
|
|
14
|
+
required: string[];
|
|
15
|
+
properties: {
|
|
16
|
+
content: {
|
|
17
|
+
type: string;
|
|
18
|
+
items: {
|
|
19
|
+
type: string;
|
|
20
|
+
items: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
justify: {
|
|
26
|
+
type: string;
|
|
27
|
+
items: {
|
|
28
|
+
type: string;
|
|
29
|
+
enum: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
highlighter: {
|
|
33
|
+
type: string;
|
|
34
|
+
items: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
customColumnWidth: {
|
|
39
|
+
type: string;
|
|
40
|
+
items: {
|
|
41
|
+
type: string;
|
|
42
|
+
enum: string[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
type: {};
|
|
46
|
+
when: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
anchor: {
|
|
52
|
+
type: string;
|
|
53
|
+
additionalProperties: boolean;
|
|
54
|
+
required: string[];
|
|
55
|
+
properties: {
|
|
56
|
+
text: {
|
|
57
|
+
type: string;
|
|
58
|
+
contentType: string;
|
|
59
|
+
};
|
|
60
|
+
url: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
urlTitle: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
visibility: {
|
|
69
|
+
oneOf: ({
|
|
70
|
+
type: string;
|
|
71
|
+
enum: string[];
|
|
72
|
+
additionalProperties?: undefined;
|
|
73
|
+
properties?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
type: string;
|
|
76
|
+
additionalProperties: boolean;
|
|
77
|
+
properties: {
|
|
78
|
+
xs: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
sm: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
md: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
lg: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
xl: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
xxl: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
enum?: undefined;
|
|
98
|
+
})[];
|
|
99
|
+
};
|
|
100
|
+
visible: {
|
|
101
|
+
type: string;
|
|
102
|
+
enum: string[];
|
|
103
|
+
};
|
|
104
|
+
hidden: {
|
|
105
|
+
type: string;
|
|
106
|
+
enum: string[];
|
|
107
|
+
};
|
|
108
|
+
resetPaddings: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
context: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
indent: {
|
|
115
|
+
type: string;
|
|
116
|
+
additionalProperties: boolean;
|
|
117
|
+
properties: {
|
|
118
|
+
top: {
|
|
119
|
+
enum: string[];
|
|
120
|
+
};
|
|
121
|
+
bottom: {
|
|
122
|
+
enum: string[];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
backgroundFull: {
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
type: {};
|
|
130
|
+
when: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightTableBlock = void 0;
|
|
4
|
+
const common_1 = require("../../schema/validators/common");
|
|
5
|
+
exports.HighlightTableBlock = {
|
|
6
|
+
'highlight-table-block': {
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
required: ['table'],
|
|
9
|
+
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), { title: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
}, description: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
}, table: {
|
|
14
|
+
additionalProperties: false,
|
|
15
|
+
required: ['content'],
|
|
16
|
+
properties: Object.assign(Object.assign({}, common_1.BaseProps), { content: {
|
|
17
|
+
type: 'array',
|
|
18
|
+
items: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
}, justify: {
|
|
25
|
+
type: 'array',
|
|
26
|
+
items: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: ['left', 'center', 'right'],
|
|
29
|
+
},
|
|
30
|
+
}, highlighter: {
|
|
31
|
+
type: 'array',
|
|
32
|
+
items: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
},
|
|
35
|
+
}, customColumnWidth: {
|
|
36
|
+
type: 'array',
|
|
37
|
+
items: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
enum: ['xxl', 'xl', 'l', 'm', 's', 'xs'],
|
|
40
|
+
},
|
|
41
|
+
} }),
|
|
42
|
+
} }),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -25,3 +25,4 @@ export { default as LinkTableBlock } from './LinkTable/LinkTable';
|
|
|
25
25
|
export { default as EventsFeedBlock } from './EventsFeed/EventsFeed';
|
|
26
26
|
export { default as BlogFeedBlock } from './BlogFeed/BlogFeed';
|
|
27
27
|
export { default as PressReleasesBlock } from './PressReleases/PressReleases';
|
|
28
|
+
export { default as HighlightTableBlock } from './HighlightTable/HighlightTable';
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PressReleasesBlock = exports.BlogFeedBlock = exports.EventsFeedBlock = exports.LinkTableBlock = exports.QuotesBlock = exports.ServicesBlock = exports.SolutionsBlock = exports.MarqueeLinksBlock = exports.FormBlock = exports.FilterBlock = exports.ShareBlock = exports.ContentLayoutBlock = exports.CardLayoutBlock = exports.HeaderSliderBlock = exports.IconsBlock = exports.HeaderBlock = exports.TabsBlock = exports.TableBlock = exports.QuestionsBlock = exports.PromoFeaturesBlock = exports.ExtendedFeaturesBlock = exports.SliderBlock = exports.MapBlock = exports.MediaBlock = exports.InfoBlock = exports.CompaniesBlock = exports.BannerBlock = void 0;
|
|
6
|
+
exports.HighlightTableBlock = exports.PressReleasesBlock = exports.BlogFeedBlock = exports.EventsFeedBlock = exports.LinkTableBlock = exports.QuotesBlock = exports.ServicesBlock = exports.SolutionsBlock = exports.MarqueeLinksBlock = exports.FormBlock = exports.FilterBlock = exports.ShareBlock = exports.ContentLayoutBlock = exports.CardLayoutBlock = exports.HeaderSliderBlock = exports.IconsBlock = exports.HeaderBlock = exports.TabsBlock = exports.TableBlock = exports.QuestionsBlock = exports.PromoFeaturesBlock = exports.ExtendedFeaturesBlock = exports.SliderBlock = exports.MapBlock = exports.MediaBlock = exports.InfoBlock = exports.CompaniesBlock = exports.BannerBlock = void 0;
|
|
7
7
|
var Banner_1 = require("./Banner/Banner");
|
|
8
8
|
Object.defineProperty(exports, "BannerBlock", { enumerable: true, get: function () { return __importDefault(Banner_1).default; } });
|
|
9
9
|
var Companies_1 = require("./Companies/Companies");
|
|
@@ -58,3 +58,5 @@ var BlogFeed_1 = require("./BlogFeed/BlogFeed");
|
|
|
58
58
|
Object.defineProperty(exports, "BlogFeedBlock", { enumerable: true, get: function () { return __importDefault(BlogFeed_1).default; } });
|
|
59
59
|
var PressReleases_1 = require("./PressReleases/PressReleases");
|
|
60
60
|
Object.defineProperty(exports, "PressReleasesBlock", { enumerable: true, get: function () { return __importDefault(PressReleases_1).default; } });
|
|
61
|
+
var HighlightTable_1 = require("./HighlightTable/HighlightTable");
|
|
62
|
+
Object.defineProperty(exports, "HighlightTableBlock", { enumerable: true, get: function () { return __importDefault(HighlightTable_1).default; } });
|
|
@@ -23,6 +23,7 @@ export declare const blockMap: {
|
|
|
23
23
|
"events-feed-block": ({ image, title }: import("./models").EventsFeedBlockProps) => JSX.Element;
|
|
24
24
|
"blog-feed-block": ({ image, title }: import("./models").BlogFeedBlockProps) => JSX.Element;
|
|
25
25
|
"press-releases-block": ({ title }: import("./models").PressReleasesBlockProps) => JSX.Element;
|
|
26
|
+
"highlight-table-block": (props: import("./models").HighlightTableBlockProps) => JSX.Element;
|
|
26
27
|
"link-table-block": ({ title, items }: import("./models").LinkTableBlockProps) => JSX.Element;
|
|
27
28
|
"services-block": ({ title, serviceLinkType }: import("./models").ServicesBlockProps) => JSX.Element;
|
|
28
29
|
"quotes-block": ({ theme: localTheme, items, background, backgroundColor, }: import("./models").QuotesBlockProps) => JSX.Element;
|
|
@@ -33,6 +33,7 @@ exports.blockMap = {
|
|
|
33
33
|
[models_1.BlockType.EventsFeedBlock]: blocks_1.EventsFeedBlock,
|
|
34
34
|
[models_1.BlockType.BlogFeedBlock]: blocks_1.BlogFeedBlock,
|
|
35
35
|
[models_1.BlockType.PressReleasesBlock]: blocks_1.PressReleasesBlock,
|
|
36
|
+
[models_1.BlockType.HighlightTableBlock]: blocks_1.HighlightTableBlock,
|
|
36
37
|
[models_1.BlockType.LinkTableBlock]: blocks_1.LinkTableBlock,
|
|
37
38
|
[models_1.BlockType.ServicesBlock]: blocks_1.ServicesBlock,
|
|
38
39
|
[models_1.BlockType.QuotesBlock]: blocks_1.QuotesBlock,
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css
CHANGED
|
@@ -35,4 +35,8 @@ unpredictable css rules order in build */
|
|
|
35
35
|
}
|
|
36
36
|
.pc-constructor-block.pc-constructor-block.pc-constructor-block.pc-constructor-block_indentBottom_xl {
|
|
37
37
|
padding-bottom: 64px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pc-constructor-block_type_blog-feed-block, .pc-constructor-block_type_events-feed-block {
|
|
41
|
+
z-index: 2;
|
|
38
42
|
}
|
|
@@ -33,7 +33,8 @@ export declare enum BlockType {
|
|
|
33
33
|
EventsFeedBlock = "events-feed-block",
|
|
34
34
|
BlogFeedBlock = "blog-feed-block",
|
|
35
35
|
PressReleasesBlock = "press-releases-block",
|
|
36
|
-
SliderNewBlock = "slider-new-block"
|
|
36
|
+
SliderNewBlock = "slider-new-block",
|
|
37
|
+
HighlightTableBlock = "highlight-table-block"
|
|
37
38
|
}
|
|
38
39
|
export declare const BlockTypes: BlockType[];
|
|
39
40
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -264,6 +265,17 @@ export interface TableBlockProps {
|
|
|
264
265
|
links?: LinkProps[];
|
|
265
266
|
buttons?: ButtonProps[];
|
|
266
267
|
}
|
|
268
|
+
export interface HighlightTableData {
|
|
269
|
+
content: string[][];
|
|
270
|
+
customColumnWidth?: ('xxl' | 'xl' | 'l' | 'm' | 's' | 'xs')[];
|
|
271
|
+
justify?: ('left' | 'right' | 'center')[];
|
|
272
|
+
highlighter?: string[];
|
|
273
|
+
}
|
|
274
|
+
export interface HighlightTableBlockProps {
|
|
275
|
+
title?: string;
|
|
276
|
+
description?: string;
|
|
277
|
+
table: HighlightTableData;
|
|
278
|
+
}
|
|
267
279
|
export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>, WithBorder {
|
|
268
280
|
tabName: string;
|
|
269
281
|
/**
|
|
@@ -468,6 +480,9 @@ export type InfoBlockModel = {
|
|
|
468
480
|
export type TableBlockModel = {
|
|
469
481
|
type: BlockType.TableBlock;
|
|
470
482
|
} & TableBlockProps;
|
|
483
|
+
export type HighlightTableBlockModel = {
|
|
484
|
+
type: BlockType.HighlightTableBlock;
|
|
485
|
+
} & HighlightTableBlockProps;
|
|
471
486
|
export type TabsBlockModel = {
|
|
472
487
|
type: BlockType.TabsBlock;
|
|
473
488
|
} & TabsBlockProps;
|
|
@@ -519,7 +534,7 @@ export type PressReleasesBlockModel = {
|
|
|
519
534
|
export type SliderNewBlockModel = {
|
|
520
535
|
type: BlockType.SliderNewBlock;
|
|
521
536
|
} & SliderNewProps;
|
|
522
|
-
type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel | MarqueeLinksBlockModel | SolutionsBlockModel | ServicesBlockModel | QuotesBlockModel | LinkTableBlockModel | EventsFeedBlockModel | BlogFeedBlockModel | PressReleasesBlockModel;
|
|
537
|
+
type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | HighlightTableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel | MarqueeLinksBlockModel | SolutionsBlockModel | ServicesBlockModel | QuotesBlockModel | LinkTableBlockModel | EventsFeedBlockModel | BlogFeedBlockModel | PressReleasesBlockModel;
|
|
523
538
|
type UnstableBlockModels = SliderNewBlockModel;
|
|
524
539
|
export type Block = (BlockModels | UnstableBlockModels) & BlockBaseProps;
|
|
525
540
|
export {};
|
|
@@ -32,6 +32,7 @@ var BlockType;
|
|
|
32
32
|
BlockType["PressReleasesBlock"] = "press-releases-block";
|
|
33
33
|
// unstable
|
|
34
34
|
BlockType["SliderNewBlock"] = "slider-new-block";
|
|
35
|
+
BlockType["HighlightTableBlock"] = "highlight-table-block";
|
|
35
36
|
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
|
36
37
|
exports.BlockTypes = Object.values(BlockType);
|
|
37
38
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.constructorCardSchemaNames = exports.constructorBlockSchemaNames = exports.cardSchemas = exports.blockSchemas = void 0;
|
|
4
4
|
const blocks_1 = require("./validators/blocks");
|
|
5
5
|
const sub_blocks_1 = require("./validators/sub-blocks");
|
|
6
|
-
exports.blockSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.Divider), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.SliderBlock), blocks_1.QuestionsBlock), blocks_1.HeaderBlock), blocks_1.BannerBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.MapBlock), blocks_1.InfoBlock), blocks_1.TableBlock), blocks_1.TabsBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), blocks_1.ShareBlock), blocks_1.FilterBlock), blocks_1.FormBlock), blocks_1.SliderNewBlock), blocks_1.MarqueeLinksBlock), blocks_1.SolutionsBlock), blocks_1.ServicesBlock), blocks_1.QuotesBlock), blocks_1.LinkTableBlock), blocks_1.EventsFeedBlock), blocks_1.BlogFeedBlock), blocks_1.PressReleasesBlock);
|
|
6
|
+
exports.blockSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.Divider), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.SliderBlock), blocks_1.QuestionsBlock), blocks_1.HeaderBlock), blocks_1.BannerBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.MapBlock), blocks_1.InfoBlock), blocks_1.TableBlock), blocks_1.HighlightTableBlock), blocks_1.TabsBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), blocks_1.ShareBlock), blocks_1.FilterBlock), blocks_1.FormBlock), blocks_1.SliderNewBlock), blocks_1.MarqueeLinksBlock), blocks_1.SolutionsBlock), blocks_1.ServicesBlock), blocks_1.QuotesBlock), blocks_1.LinkTableBlock), blocks_1.EventsFeedBlock), blocks_1.BlogFeedBlock), blocks_1.PressReleasesBlock);
|
|
7
7
|
exports.cardSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.MediaCardBlock), blocks_1.BannerCard), sub_blocks_1.PriceDetailedBlock), sub_blocks_1.BackgroundCard), sub_blocks_1.Quote), sub_blocks_1.BasicCard), sub_blocks_1.PriceCardBlock), sub_blocks_1.ImageCard), sub_blocks_1.ContentLayoutCard), sub_blocks_1.Card), sub_blocks_1.PostCard), sub_blocks_1.FeedCard);
|
|
8
8
|
exports.constructorBlockSchemaNames = [
|
|
9
9
|
'divider',
|
|
@@ -39,6 +39,7 @@ exports.constructorBlockSchemaNames = [
|
|
|
39
39
|
'link-table-block',
|
|
40
40
|
'events-feed-block',
|
|
41
41
|
'blog-feed-block',
|
|
42
|
+
'highlight-table-block',
|
|
42
43
|
];
|
|
43
44
|
exports.constructorCardSchemaNames = [
|
|
44
45
|
'media-card',
|
|
@@ -29,3 +29,4 @@ tslib_1.__exportStar(require("../../blocks/LinkTable/schema"), exports);
|
|
|
29
29
|
tslib_1.__exportStar(require("../../blocks/EventsFeed/schema"), exports);
|
|
30
30
|
tslib_1.__exportStar(require("../../blocks/BlogFeed/schema"), exports);
|
|
31
31
|
tslib_1.__exportStar(require("../../blocks/PressReleases/schema"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("../../blocks/HighlightTable/schema"), exports);
|
|
@@ -10,6 +10,10 @@ function parseTableBlock(transformer, content) {
|
|
|
10
10
|
const legend = content === null || content === void 0 ? void 0 : content.legend;
|
|
11
11
|
return Object.assign(Object.assign({}, (content || {})), { legend: legend && legend.map((string) => transformer(string)) });
|
|
12
12
|
}
|
|
13
|
+
function parseHighlightTableBlock(transformer, content) {
|
|
14
|
+
const rows = (content === null || content === void 0 ? void 0 : content.content) || [];
|
|
15
|
+
return Object.assign(Object.assign({}, (content || {})), { content: rows.map((row) => row.map((col) => transformer(col))) });
|
|
16
|
+
}
|
|
13
17
|
function parseFeatures(transformer, items) {
|
|
14
18
|
return items.map((_a) => {
|
|
15
19
|
var { title, text } = _a, rest = tslib_1.__rest(_a, ["title", "text"]);
|
|
@@ -257,6 +261,17 @@ exports.config = {
|
|
|
257
261
|
parser: parseTableBlock,
|
|
258
262
|
},
|
|
259
263
|
],
|
|
264
|
+
[models_1.BlockType.HighlightTableBlock]: [
|
|
265
|
+
{
|
|
266
|
+
fields: ['description'],
|
|
267
|
+
transformer: common_1.yfmTransformer,
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
fields: ['table'],
|
|
271
|
+
transformer: common_1.yfmTransformer,
|
|
272
|
+
parser: parseHighlightTableBlock,
|
|
273
|
+
},
|
|
274
|
+
],
|
|
260
275
|
[models_1.BlockType.HeaderSliderBlock]: [
|
|
261
276
|
{
|
|
262
277
|
fields: ['items'],
|
|
@@ -18,7 +18,7 @@ export const EventsFeedRecent = () => {
|
|
|
18
18
|
const { recent, page, pageSize, onLoadMore } = useContext(EventsRecentContext);
|
|
19
19
|
const itemsToShow = recent.slice(0, page * pageSize);
|
|
20
20
|
const hasMore = page < Math.ceil(recent.length / pageSize);
|
|
21
|
-
if (recent.length === 0) {
|
|
21
|
+
if (!recent || recent.length === 0) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
return (React.createElement("div", { className: b() },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './EventsFeedUpcoming.css';
|
|
3
|
-
export declare const EventsFeedUpcoming: () => JSX.Element;
|
|
4
|
-
declare const _default: React.MemoExoticComponent<() => JSX.Element>;
|
|
3
|
+
export declare const EventsFeedUpcoming: () => JSX.Element | null;
|
|
4
|
+
declare const _default: React.MemoExoticComponent<() => JSX.Element | null>;
|
|
5
5
|
export default _default;
|
|
@@ -15,6 +15,9 @@ const colSizes = {
|
|
|
15
15
|
};
|
|
16
16
|
export const EventsFeedUpcoming = () => {
|
|
17
17
|
const { upcoming } = useContext(EventsUpcomingContext);
|
|
18
|
+
if (!upcoming || upcoming.length === 0) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
18
21
|
return (React.createElement("div", { className: b() },
|
|
19
22
|
React.createElement(Anchor, { id: "upcoming" }),
|
|
20
23
|
React.createElement(CardLayoutBlock, { colSizes: colSizes }, upcoming.map((item) => (React.createElement(FeedCard, Object.assign({ key: item.slug }, item)))))));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.pc-highlight-table-block__title {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* use this for style redefinitions to awoid problems with
|
|
6
|
+
unpredictable css rules order in build */
|
|
7
|
+
.pc-highlight-table-block__description {
|
|
8
|
+
margin-bottom: 16px;
|
|
9
|
+
}
|
|
10
|
+
.pc-highlight-table-block__title {
|
|
11
|
+
font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
|
|
12
|
+
line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
|
|
13
|
+
color: var(--pc-text-header-color);
|
|
14
|
+
font-weight: var(--g-text-accent-font-weight);
|
|
15
|
+
position: sticky;
|
|
16
|
+
display: block;
|
|
17
|
+
margin-bottom: 16px;
|
|
18
|
+
}
|
|
19
|
+
@media (max-width: 576px) {
|
|
20
|
+
.pc-highlight-table-block__title {
|
|
21
|
+
font-size: var(--g-text-display-1-font-size, var(--pc-text-display-1-font-size));
|
|
22
|
+
line-height: var(--g-text-display-1-line-height, var(--pc-text-display-1-line-height));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.pc-highlight-table-block__content {
|
|
26
|
+
padding: 0 8px;
|
|
27
|
+
}
|
|
28
|
+
@media (max-width: 769px) {
|
|
29
|
+
.pc-highlight-table-block__content {
|
|
30
|
+
min-width: 1024px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.pc-highlight-table-block__table {
|
|
34
|
+
overflow: auto;
|
|
35
|
+
}
|
|
36
|
+
@media (max-width: 769px) {
|
|
37
|
+
.pc-highlight-table-block__table {
|
|
38
|
+
margin-right: -48px;
|
|
39
|
+
margin-left: -48px;
|
|
40
|
+
padding: 0 48px 12px;
|
|
41
|
+
scrollbar-width: none;
|
|
42
|
+
}
|
|
43
|
+
.pc-highlight-table-block__table::-webkit-scrollbar {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.pc-highlight-table-block__head {
|
|
48
|
+
color: rgba(0, 0, 0, 0.5);
|
|
49
|
+
}
|
|
50
|
+
.pc-highlight-table-block__body {
|
|
51
|
+
border: 1px solid var(--g-color-private-black-100);
|
|
52
|
+
}
|
|
53
|
+
.pc-highlight-table-block__head, .pc-highlight-table-block__body {
|
|
54
|
+
border-radius: 10px;
|
|
55
|
+
padding: 0 20px;
|
|
56
|
+
margin: 0 -8px;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
.pc-highlight-table-block__row.pc-highlight-table-block__row.pc-highlight-table-block__row.pc-highlight-table-block__row {
|
|
60
|
+
margin: 0 -20px;
|
|
61
|
+
padding: 0 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.pc-highlight-table-block__row + .pc-highlight-table-block__row {
|
|
65
|
+
border-top: 1px solid var(--g-color-private-black-100);
|
|
66
|
+
}
|
|
67
|
+
.pc-highlight-table-block__scrollbar {
|
|
68
|
+
visibility: hidden;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
height: 5px;
|
|
71
|
+
width: 100%;
|
|
72
|
+
margin-top: -5px;
|
|
73
|
+
border-radius: 2px;
|
|
74
|
+
background-color: var(--g-color-private-black-150);
|
|
75
|
+
}
|
|
76
|
+
@media (max-width: 769px) {
|
|
77
|
+
.pc-highlight-table-block__scrollbar {
|
|
78
|
+
visibility: visible;
|
|
79
|
+
}
|
|
80
|
+
.pc-highlight-table-block__scrollbar > div {
|
|
81
|
+
height: 100%;
|
|
82
|
+
border-radius: 2px;
|
|
83
|
+
background-color: var(--g-color-private-black-400);
|
|
84
|
+
transition: transform ease 50ms;
|
|
85
|
+
}
|
|
86
|
+
}
|