@gravity-ui/page-constructor 1.15.0-alpha.1 → 1.15.0-alpha.11
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/README.md +110 -5
- package/build/cjs/blocks/Banner/Banner.js +3 -2
- package/build/cjs/blocks/Banner/schema.d.ts +27 -0
- package/build/cjs/blocks/Banner/schema.js +3 -1
- package/build/cjs/blocks/CardLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +3 -2
- package/build/cjs/blocks/ContentLayout/schema.d.ts +3 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -2
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +3 -0
- package/build/cjs/blocks/Header/Header.js +6 -5
- package/build/cjs/blocks/Header/schema.d.ts +159 -0
- package/build/cjs/blocks/Header/schema.js +4 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +81 -0
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Info/Info.js +4 -3
- package/build/cjs/blocks/Info/schema.d.ts +3 -0
- package/build/cjs/blocks/Info/schema.js +2 -0
- package/build/cjs/blocks/LinkTable/schema.d.ts +3 -0
- package/build/cjs/blocks/Media/Media.js +3 -2
- package/build/cjs/blocks/Media/MediaContent.js +3 -2
- package/build/cjs/blocks/Media/schema.d.ts +9 -0
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +2 -1
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +3 -2
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +1 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +3 -2
- package/build/cjs/blocks/Preview/Preview.js +3 -2
- package/build/cjs/blocks/Preview/schema.d.ts +3 -0
- package/build/cjs/blocks/Preview/schema.js +3 -1
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +3 -2
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- package/build/cjs/blocks/Questions/Questions.js +3 -2
- package/build/cjs/blocks/Questions/schema.d.ts +3 -0
- package/build/cjs/blocks/Security/Security.js +3 -2
- package/build/cjs/blocks/Security/schema.d.ts +3 -0
- package/build/cjs/blocks/Security/schema.js +3 -1
- package/build/cjs/blocks/Share/Share.d.ts +1 -1
- package/build/cjs/blocks/Share/Share.js +11 -2
- package/build/cjs/blocks/Simple/schema.d.ts +3 -0
- package/build/cjs/blocks/Slider/schema.d.ts +3 -0
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +5 -4
- package/build/cjs/blocks/Tabs/schema.d.ts +3 -0
- package/build/cjs/components/BackLink/BackLink.d.ts +1 -0
- package/build/cjs/components/BackLink/BackLink.js +12 -2
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +2 -1
- package/build/cjs/components/Button/Button.d.ts +1 -0
- package/build/cjs/components/Button/Button.js +11 -3
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +1 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +12 -2
- package/build/cjs/components/CardBase/CardBase.d.ts +3 -2
- package/build/cjs/components/CardBase/CardBase.js +11 -3
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +0 -30
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +4 -11
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +30 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +12 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +27 -0
- package/build/cjs/components/Link/Link.js +12 -4
- package/build/cjs/components/Media/Media.js +4 -2
- package/build/cjs/components/Media/Video/Video.js +5 -3
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +21 -26
- package/build/cjs/components/YandexForm/YandexForm.d.ts +3 -2
- package/build/cjs/components/YandexForm/YandexForm.js +11 -4
- package/build/cjs/constructor-items.d.ts +5 -5
- package/build/cjs/context/analyticsContext/analyticsContext.d.ts +3 -2
- package/build/cjs/hooks/useAnalytics.d.ts +2 -2
- package/build/cjs/hooks/useAnalytics.js +13 -7
- package/build/cjs/models/common.d.ts +8 -13
- package/build/cjs/models/common.js +7 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +11 -0
- package/build/cjs/models/constructor-items/common.d.ts +11 -6
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +6 -3
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +3 -2
- package/build/cjs/schema/validators/common.d.ts +15 -0
- package/build/cjs/schema/validators/common.js +3 -1
- package/build/cjs/schema/validators/event.d.ts +3 -54
- package/build/cjs/schema/validators/event.js +3 -54
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +3 -2
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +3 -2
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +3 -2
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +3 -2
- package/build/cjs/sub-blocks/Content/Content.js +4 -3
- package/build/cjs/sub-blocks/HubspotForm/index.js +9 -3
- package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/cjs/sub-blocks/MediaCard/MediaCard.js +3 -2
- package/build/cjs/sub-blocks/Quote/Quote.js +11 -2
- package/build/cjs/sub-blocks/Quote/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/schema.js +3 -1
- package/build/esm/blocks/Banner/Banner.js +3 -2
- package/build/esm/blocks/Banner/schema.d.ts +27 -0
- package/build/esm/blocks/Banner/schema.js +3 -1
- package/build/esm/blocks/CardLayout/schema.d.ts +6 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +3 -2
- package/build/esm/blocks/ContentLayout/schema.d.ts +3 -0
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -2
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +3 -0
- package/build/esm/blocks/Header/Header.js +6 -5
- package/build/esm/blocks/Header/schema.d.ts +159 -0
- package/build/esm/blocks/Header/schema.js +4 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +81 -0
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Info/Info.js +4 -3
- package/build/esm/blocks/Info/schema.d.ts +3 -0
- package/build/esm/blocks/Info/schema.js +2 -0
- package/build/esm/blocks/LinkTable/schema.d.ts +3 -0
- package/build/esm/blocks/Media/Media.js +3 -2
- package/build/esm/blocks/Media/MediaContent.js +3 -2
- package/build/esm/blocks/Media/schema.d.ts +9 -0
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +2 -1
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +3 -2
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +1 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +3 -2
- package/build/esm/blocks/Preview/Preview.js +3 -2
- package/build/esm/blocks/Preview/schema.d.ts +3 -0
- package/build/esm/blocks/Preview/schema.js +3 -1
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +3 -2
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- package/build/esm/blocks/Questions/Questions.js +3 -2
- package/build/esm/blocks/Questions/schema.d.ts +3 -0
- package/build/esm/blocks/Security/Security.js +3 -2
- package/build/esm/blocks/Security/schema.d.ts +3 -0
- package/build/esm/blocks/Security/schema.js +3 -1
- package/build/esm/blocks/Share/Share.d.ts +1 -1
- package/build/esm/blocks/Share/Share.js +12 -3
- package/build/esm/blocks/Simple/schema.d.ts +3 -0
- package/build/esm/blocks/Slider/schema.d.ts +3 -0
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +5 -4
- package/build/esm/blocks/Tabs/schema.d.ts +3 -0
- package/build/esm/components/BackLink/BackLink.d.ts +1 -0
- package/build/esm/components/BackLink/BackLink.js +12 -2
- package/build/esm/components/BackgroundMedia/BackgroundMedia.js +2 -1
- package/build/esm/components/Button/Button.d.ts +1 -0
- package/build/esm/components/Button/Button.js +12 -4
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +1 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.js +12 -2
- package/build/esm/components/CardBase/CardBase.d.ts +3 -2
- package/build/esm/components/CardBase/CardBase.js +12 -4
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +0 -30
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +4 -11
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +30 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +13 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +24 -0
- package/build/esm/components/Link/Link.js +13 -5
- package/build/esm/components/Media/Media.js +4 -2
- package/build/esm/components/Media/Video/Video.js +5 -3
- package/build/esm/components/ReactPlayer/ReactPlayer.js +22 -27
- package/build/esm/components/YandexForm/YandexForm.d.ts +3 -2
- package/build/esm/components/YandexForm/YandexForm.js +12 -5
- package/build/esm/constructor-items.d.ts +5 -5
- package/build/esm/context/analyticsContext/analyticsContext.d.ts +3 -2
- package/build/esm/hooks/useAnalytics.d.ts +2 -2
- package/build/esm/hooks/useAnalytics.js +13 -7
- package/build/esm/models/common.d.ts +8 -13
- package/build/esm/models/common.js +6 -0
- package/build/esm/models/constructor-items/blocks.d.ts +11 -0
- package/build/esm/models/constructor-items/common.d.ts +11 -6
- package/build/esm/models/constructor-items/sub-blocks.d.ts +6 -3
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +3 -2
- package/build/esm/schema/validators/common.d.ts +15 -0
- package/build/esm/schema/validators/common.js +4 -2
- package/build/esm/schema/validators/event.d.ts +3 -54
- package/build/esm/schema/validators/event.js +2 -53
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +3 -2
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +3 -2
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +3 -2
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +3 -2
- package/build/esm/sub-blocks/Content/Content.js +4 -3
- package/build/esm/sub-blocks/HubspotForm/index.js +9 -3
- package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/esm/sub-blocks/MediaCard/MediaCard.js +3 -2
- package/build/esm/sub-blocks/Quote/Quote.js +13 -4
- package/build/esm/sub-blocks/Quote/schema.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/schema.js +3 -1
- package/package.json +1 -1
- package/server/models/common.d.ts +8 -13
- package/server/models/common.js +7 -1
- package/server/models/constructor-items/blocks.d.ts +11 -0
- package/server/models/constructor-items/common.d.ts +11 -6
- package/server/models/constructor-items/sub-blocks.d.ts +6 -3
|
@@ -144,6 +144,84 @@ export declare const HeaderSliderBlock: {
|
|
|
144
144
|
type: string;
|
|
145
145
|
contentType: string;
|
|
146
146
|
};
|
|
147
|
+
analyticsEvents: {
|
|
148
|
+
anyOf: ({
|
|
149
|
+
type: string;
|
|
150
|
+
additionalProperties: {
|
|
151
|
+
type: string;
|
|
152
|
+
};
|
|
153
|
+
required: string[];
|
|
154
|
+
properties: {
|
|
155
|
+
name: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
type: {
|
|
159
|
+
type: string;
|
|
160
|
+
};
|
|
161
|
+
counters: {
|
|
162
|
+
type: string;
|
|
163
|
+
additionalProperties: boolean;
|
|
164
|
+
required: never[];
|
|
165
|
+
properties: {
|
|
166
|
+
include: {
|
|
167
|
+
type: string;
|
|
168
|
+
items: {
|
|
169
|
+
type: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
exclude: {
|
|
173
|
+
type: string;
|
|
174
|
+
items: {
|
|
175
|
+
type: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
blockName: {
|
|
181
|
+
type: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
} | {
|
|
185
|
+
type: string;
|
|
186
|
+
items: {
|
|
187
|
+
type: string;
|
|
188
|
+
additionalProperties: {
|
|
189
|
+
type: string;
|
|
190
|
+
};
|
|
191
|
+
required: string[];
|
|
192
|
+
properties: {
|
|
193
|
+
name: {
|
|
194
|
+
type: string;
|
|
195
|
+
};
|
|
196
|
+
type: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
counters: {
|
|
200
|
+
type: string;
|
|
201
|
+
additionalProperties: boolean;
|
|
202
|
+
required: never[];
|
|
203
|
+
properties: {
|
|
204
|
+
include: {
|
|
205
|
+
type: string;
|
|
206
|
+
items: {
|
|
207
|
+
type: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
exclude: {
|
|
211
|
+
type: string;
|
|
212
|
+
items: {
|
|
213
|
+
type: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
blockName: {
|
|
219
|
+
type: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
})[];
|
|
224
|
+
};
|
|
147
225
|
};
|
|
148
226
|
};
|
|
149
227
|
imageSize: {
|
|
@@ -433,6 +511,9 @@ export declare const HeaderSliderBlock: {
|
|
|
433
511
|
resetPaddings: {
|
|
434
512
|
type: string;
|
|
435
513
|
};
|
|
514
|
+
blockName: {
|
|
515
|
+
type: string;
|
|
516
|
+
};
|
|
436
517
|
type: {};
|
|
437
518
|
when: {};
|
|
438
519
|
};
|
|
@@ -54,6 +54,9 @@ export declare const IconsProps: {
|
|
|
54
54
|
resetPaddings: {
|
|
55
55
|
type: string;
|
|
56
56
|
};
|
|
57
|
+
blockName: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
57
60
|
type: {};
|
|
58
61
|
when: {};
|
|
59
62
|
};
|
|
@@ -115,6 +118,9 @@ export declare const IconsBlock: {
|
|
|
115
118
|
resetPaddings: {
|
|
116
119
|
type: string;
|
|
117
120
|
};
|
|
121
|
+
blockName: {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
118
124
|
type: {};
|
|
119
125
|
when: {};
|
|
120
126
|
};
|
|
@@ -4,13 +4,14 @@ exports.InfoBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
|
+
const models_1 = require("../../models");
|
|
7
8
|
const grid_1 = require("../../grid");
|
|
8
9
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
9
10
|
const Content_1 = tslib_1.__importDefault(require("../../sub-blocks/Content/Content"));
|
|
10
11
|
const b = (0, utils_1.block)('info-block');
|
|
11
12
|
const sizes = { md: 6, all: 12 };
|
|
12
13
|
const InfoBlock = (props) => {
|
|
13
|
-
const { backgroundColor, theme: blockTheme = 'dark', buttons = [], title, sectionsTitle, links = [], rightContent = {}, leftContent = {}, } = props;
|
|
14
|
+
const { backgroundColor, theme: blockTheme = 'dark', buttons = [], title, sectionsTitle, links = [], rightContent = {}, leftContent = {}, blockName = models_1.BlockType.InfoBlock, } = props;
|
|
14
15
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
15
16
|
const contentTheme = blockTheme === 'dark' ? 'dark' : 'default';
|
|
16
17
|
const rightLinks = [
|
|
@@ -28,9 +29,9 @@ const InfoBlock = (props) => {
|
|
|
28
29
|
react_1.default.createElement(grid_1.Grid, null,
|
|
29
30
|
react_1.default.createElement(grid_1.Row, null,
|
|
30
31
|
react_1.default.createElement(grid_1.Col, { sizes: sizes, className: b('left') },
|
|
31
|
-
react_1.default.createElement(Content_1.default, Object.assign({ title: title || (leftContent === null || leftContent === void 0 ? void 0 : leftContent.title), text: leftContent === null || leftContent === void 0 ? void 0 : leftContent.text, links: leftContent === null || leftContent === void 0 ? void 0 : leftContent.links, buttons: leftButtons, additionalInfo: leftContent === null || leftContent === void 0 ? void 0 : leftContent.additionalInfo }, commonProps))),
|
|
32
|
+
react_1.default.createElement(Content_1.default, Object.assign({ title: title || (leftContent === null || leftContent === void 0 ? void 0 : leftContent.title), text: leftContent === null || leftContent === void 0 ? void 0 : leftContent.text, links: leftContent === null || leftContent === void 0 ? void 0 : leftContent.links, buttons: leftButtons, additionalInfo: leftContent === null || leftContent === void 0 ? void 0 : leftContent.additionalInfo }, commonProps, { blockName: blockName }))),
|
|
32
33
|
react_1.default.createElement(grid_1.Col, { sizes: sizes, className: b('right') },
|
|
33
|
-
react_1.default.createElement(Content_1.default, Object.assign({ title: sectionsTitle || (rightContent === null || rightContent === void 0 ? void 0 : rightContent.title), text: rightContent === null || rightContent === void 0 ? void 0 : rightContent.text, links: rightLinks, buttons: rightContent === null || rightContent === void 0 ? void 0 : rightContent.buttons, additionalInfo: rightContent === null || rightContent === void 0 ? void 0 : rightContent.additionalInfo }, commonProps))))))));
|
|
34
|
+
react_1.default.createElement(Content_1.default, Object.assign({ title: sectionsTitle || (rightContent === null || rightContent === void 0 ? void 0 : rightContent.title), text: rightContent === null || rightContent === void 0 ? void 0 : rightContent.text, links: rightLinks, buttons: rightContent === null || rightContent === void 0 ? void 0 : rightContent.buttons, additionalInfo: rightContent === null || rightContent === void 0 ? void 0 : rightContent.additionalInfo }, commonProps, { blockName: blockName }))))))));
|
|
34
35
|
};
|
|
35
36
|
exports.InfoBlock = InfoBlock;
|
|
36
37
|
exports.default = exports.InfoBlock;
|
|
@@ -22,6 +22,8 @@ exports.InfoBlock = {
|
|
|
22
22
|
}), sectionsTitle: {
|
|
23
23
|
type: 'string',
|
|
24
24
|
contentType: 'text',
|
|
25
|
+
}, blockName: {
|
|
26
|
+
type: 'string',
|
|
25
27
|
}, buttons: (0, utils_1.filteredArray)(common_1.ButtonBlock), theme: common_1.ThemeProps, links: (0, utils_1.filteredArray)(common_1.LinkProps), leftContent: ContentProps, rightContent: ContentProps }),
|
|
26
28
|
},
|
|
27
29
|
};
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
7
|
const grid_1 = require("../../grid");
|
|
8
|
+
const models_1 = require("../../models");
|
|
8
9
|
const Media_1 = tslib_1.__importDefault(require("../../components/Media/Media"));
|
|
9
10
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
10
11
|
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
@@ -12,7 +13,7 @@ const MediaContent_1 = tslib_1.__importDefault(require("./MediaContent"));
|
|
|
12
13
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
13
14
|
const b = (0, utils_1.block)('media-block');
|
|
14
15
|
const MediaBlock = (props) => {
|
|
15
|
-
const { media, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false } = props, mediaContentProps = tslib_1.__rest(props, ["media", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow"]);
|
|
16
|
+
const { media, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false, blockName = models_1.BlockType.MediaBlock } = props, mediaContentProps = tslib_1.__rest(props, ["media", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow", "blockName"]);
|
|
16
17
|
const { title, description } = mediaContentProps;
|
|
17
18
|
const [play, setPlay] = (0, react_1.useState)(false);
|
|
18
19
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
@@ -36,7 +37,7 @@ const MediaBlock = (props) => {
|
|
|
36
37
|
react_1.default.createElement(grid_1.Col, { className: b('content'), sizes: contentSizes }, mediaContent),
|
|
37
38
|
react_1.default.createElement(grid_1.Col, { sizes: mediaSizes },
|
|
38
39
|
react_1.default.createElement("div", { className: b('card', { shadow: !disableShadow }) },
|
|
39
|
-
react_1.default.createElement(Media_1.default, Object.assign({}, mediaThemed, { playVideo: play }))))))));
|
|
40
|
+
react_1.default.createElement(Media_1.default, Object.assign({}, mediaThemed, { playVideo: play, blockName: blockName }))))))));
|
|
40
41
|
};
|
|
41
42
|
exports.MediaBlock = MediaBlock;
|
|
42
43
|
exports.default = exports.MediaBlock;
|
|
@@ -3,12 +3,13 @@ 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 utils_1 = require("../../utils");
|
|
6
|
+
const models_1 = require("../../models");
|
|
6
7
|
const sub_blocks_1 = require("../../sub-blocks");
|
|
7
8
|
const b = (0, utils_1.block)('media-content');
|
|
8
9
|
const MediaContent = (props) => {
|
|
9
|
-
const { title, description, button, links, buttons = [], additionalInfo, size = 'l' } = props;
|
|
10
|
+
const { title, description, button, links, buttons = [], additionalInfo, size = 'l', blockName = models_1.BlockType.MediaBlock, } = props;
|
|
10
11
|
const allButtons = button ? [Object.assign(Object.assign({}, button), { size: 'xl' }), ...buttons] : buttons;
|
|
11
12
|
return (react_1.default.createElement("div", { className: b() },
|
|
12
|
-
react_1.default.createElement(sub_blocks_1.Content, { title: title, text: description, links: links, theme: "default", buttons: allButtons, additionalInfo: additionalInfo, size: size, colSizes: { all: 12, md: 12 } })));
|
|
13
|
+
react_1.default.createElement(sub_blocks_1.Content, { title: title, text: description, links: links, theme: "default", buttons: allButtons, additionalInfo: additionalInfo, size: size, colSizes: { all: 12, md: 12 }, blockName: blockName })));
|
|
13
14
|
};
|
|
14
15
|
exports.default = MediaContent;
|
|
@@ -459,6 +459,9 @@ export declare const MediaBlock: {
|
|
|
459
459
|
};
|
|
460
460
|
};
|
|
461
461
|
};
|
|
462
|
+
blockName: {
|
|
463
|
+
type: string;
|
|
464
|
+
};
|
|
462
465
|
};
|
|
463
466
|
} | {
|
|
464
467
|
type: string;
|
|
@@ -494,6 +497,9 @@ export declare const MediaBlock: {
|
|
|
494
497
|
};
|
|
495
498
|
};
|
|
496
499
|
};
|
|
500
|
+
blockName: {
|
|
501
|
+
type: string;
|
|
502
|
+
};
|
|
497
503
|
};
|
|
498
504
|
};
|
|
499
505
|
})[];
|
|
@@ -597,6 +603,9 @@ export declare const MediaBlock: {
|
|
|
597
603
|
resetPaddings: {
|
|
598
604
|
type: string;
|
|
599
605
|
};
|
|
606
|
+
blockName: {
|
|
607
|
+
type: string;
|
|
608
|
+
};
|
|
600
609
|
type: {};
|
|
601
610
|
when: {};
|
|
602
611
|
};
|
|
@@ -8,6 +8,7 @@ interface MediaContentProps extends Refable<HTMLDivElement> {
|
|
|
8
8
|
switching: boolean;
|
|
9
9
|
isActiveBlock: (id: number, isMediaBlock?: boolean) => boolean;
|
|
10
10
|
showMediaContent: (id: number) => void;
|
|
11
|
+
blockName?: string;
|
|
11
12
|
}
|
|
12
|
-
declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "blockName" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
14
|
export default MediaContent;
|
|
@@ -9,8 +9,9 @@ const PreviewContent_1 = tslib_1.__importDefault(require("./PreviewContent"));
|
|
|
9
9
|
const PreviewMedia_1 = tslib_1.__importDefault(require("./PreviewMedia"));
|
|
10
10
|
const ThemeValueContext_1 = require("../../../context/theme/ThemeValueContext");
|
|
11
11
|
const b = (0, utils_1.block)('preview-media-content-block');
|
|
12
|
+
const COMPONENT_NAME = 'preview-media-content';
|
|
12
13
|
const MediaContent = (0, react_1.forwardRef)((props, ref) => {
|
|
13
|
-
const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, } = props;
|
|
14
|
+
const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, blockName = COMPONENT_NAME, } = props;
|
|
14
15
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
15
16
|
const [mediaSizes, setMediaSizes] = (0, react_1.useState)({ [grid_1.GridColumnSize.All]: 12 });
|
|
16
17
|
const [contentSizes, setContentSizes] = (0, react_1.useState)({ [grid_1.GridColumnSize.All]: 12 });
|
|
@@ -32,7 +33,7 @@ const MediaContent = (0, react_1.forwardRef)((props, ref) => {
|
|
|
32
33
|
const mediaMods = { active: isActiveBlock(id, true) };
|
|
33
34
|
const onClick = () => showMediaContent(id);
|
|
34
35
|
contentComponents.push(react_1.default.createElement(PreviewContent_1.default, Object.assign({ key: id, id: id }, content, { switching: switching, onClick: onClick, mods: contentMods })));
|
|
35
|
-
mediaComponents.push(react_1.default.createElement(PreviewMedia_1.default, { key: id, id: id, media: media && (0, utils_1.getThemedValue)(media, theme), play: isActive, mods: mediaMods }));
|
|
36
|
+
mediaComponents.push(react_1.default.createElement(PreviewMedia_1.default, { key: id, id: id, media: media && (0, utils_1.getThemedValue)(media, theme), play: isActive, mods: mediaMods, blockName: blockName }));
|
|
36
37
|
});
|
|
37
38
|
return (react_1.default.createElement(react_1.Fragment, null,
|
|
38
39
|
react_1.default.createElement(grid_1.Col, { sizes: contentSizes, className: b('content') },
|
|
@@ -5,9 +5,10 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
6
|
const Media_1 = tslib_1.__importDefault(require("../../../components/Media/Media"));
|
|
7
7
|
const b = (0, utils_1.block)('preview-media-block');
|
|
8
|
+
const COMPONENT_NAME = 'preview-media';
|
|
8
9
|
const PreviewMedia = (props) => {
|
|
9
|
-
const { id, media, play, mods } = props;
|
|
10
|
+
const { id, media, play, mods, blockName = COMPONENT_NAME } = props;
|
|
10
11
|
return (react_1.default.createElement("div", { key: id, className: b('media', mods) },
|
|
11
|
-
react_1.default.createElement(Media_1.default, Object.assign({}, media, { playVideo: play }))));
|
|
12
|
+
react_1.default.createElement(Media_1.default, Object.assign({}, media, { playVideo: play, blockName: blockName }))));
|
|
12
13
|
};
|
|
13
14
|
exports.default = PreviewMedia;
|
|
@@ -8,6 +8,7 @@ const breakpointContext_1 = require("../../context/breakpointContext");
|
|
|
8
8
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
9
9
|
const MediaContent_1 = tslib_1.__importDefault(require("./MediaContent/MediaContent"));
|
|
10
10
|
const grid_1 = require("../../grid");
|
|
11
|
+
const models_1 = require("../../models");
|
|
11
12
|
const constants_1 = require("../../constants");
|
|
12
13
|
const useIntersection_1 = require("../../hooks/useIntersection");
|
|
13
14
|
const b = (0, utils_1.block)('preview-block');
|
|
@@ -22,7 +23,7 @@ const INDENT_BETWEEN_TITLE_DESCRIPTION = 16;
|
|
|
22
23
|
const PreviewBlock = (props) => {
|
|
23
24
|
const { direction = 'content-media', animated, items, title, description, ratioMediaContent = '1-1', stopVideo = false,
|
|
24
25
|
// TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
|
|
25
|
-
showImmediately = false, } = props;
|
|
26
|
+
showImmediately = false, blockName = models_1.BlockType.PreviewBlock, } = props;
|
|
26
27
|
const breakpoint = (0, react_1.useContext)(breakpointContext_1.BreakpointContext);
|
|
27
28
|
const isDesktop = breakpoint >= constants_1.BREAKPOINTS.md;
|
|
28
29
|
const menuRef = react_1.default.useRef(null);
|
|
@@ -85,7 +86,7 @@ const PreviewBlock = (props) => {
|
|
|
85
86
|
}, [changeActiveSlide, activeSlide, autoSwitchTimerId]);
|
|
86
87
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), animate: animated },
|
|
87
88
|
react_1.default.createElement(grid_1.Row, { ref: previewRef, className: b('row', { reverse: direction === 'media-content' }) },
|
|
88
|
-
react_1.default.createElement(MediaContent_1.default, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent }))));
|
|
89
|
+
react_1.default.createElement(MediaContent_1.default, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent, blockName: blockName }))));
|
|
89
90
|
};
|
|
90
91
|
exports.PreviewBlock = PreviewBlock;
|
|
91
92
|
function changeMenuScroll(element, nextSlide, activeSlide) {
|
|
@@ -48,6 +48,8 @@ exports.PreviewBlock = {
|
|
|
48
48
|
}, ratioMediaContent: {
|
|
49
49
|
type: 'string',
|
|
50
50
|
enum: previewRatioMediaContent,
|
|
51
|
-
}, items: (0, utils_1.filteredArray)(PreviewItem)
|
|
51
|
+
}, items: (0, utils_1.filteredArray)(PreviewItem), blockName: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
} }),
|
|
52
54
|
},
|
|
53
55
|
};
|
|
@@ -5,6 +5,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
7
|
const YFMWrapper_1 = tslib_1.__importDefault(require("../../components/YFMWrapper/YFMWrapper"));
|
|
8
|
+
const models_1 = require("../../models");
|
|
8
9
|
const Media_1 = tslib_1.__importDefault(require("../../components/Media/Media"));
|
|
9
10
|
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
10
11
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
@@ -17,7 +18,7 @@ const breakpointColumns = {
|
|
|
17
18
|
[constants_1.BREAKPOINTS.sm]: 1,
|
|
18
19
|
};
|
|
19
20
|
const PromoFeaturesBlock = (props) => {
|
|
20
|
-
const { items, title, description, theme, animated = true } = props;
|
|
21
|
+
const { items, title, description, theme, animated = true, blockName = models_1.BlockType.PromoFeaturesBlock, } = props;
|
|
21
22
|
const backgroundTheme = theme || 'default';
|
|
22
23
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b({ [backgroundTheme]: true }), animate: animated },
|
|
23
24
|
react_1.default.createElement(FullWidthBackground_1.default, { className: b('background', { [backgroundTheme]: true }) }),
|
|
@@ -33,7 +34,7 @@ const PromoFeaturesBlock = (props) => {
|
|
|
33
34
|
react_1.default.createElement("h4", { className: b('card-title') }, cardTitle),
|
|
34
35
|
react_1.default.createElement("div", { className: b('card-text') },
|
|
35
36
|
react_1.default.createElement(YFMWrapper_1.default, { content: text, modifiers: { constructor: true } }))),
|
|
36
|
-
media && react_1.default.createElement(Media_1.default, Object.assign({ className: b('card-media') }, media))));
|
|
37
|
+
media && (react_1.default.createElement(Media_1.default, Object.assign({ className: b('card-media'), blockName: blockName }, media)))));
|
|
37
38
|
}))));
|
|
38
39
|
};
|
|
39
40
|
exports.default = PromoFeaturesBlock;
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
+
const models_1 = require("../../models");
|
|
6
7
|
const Link_1 = tslib_1.__importDefault(require("../../components/Link/Link"));
|
|
7
8
|
const components_1 = require("../../components");
|
|
8
9
|
const grid_1 = require("../../grid");
|
|
9
10
|
const sub_blocks_1 = require("../../sub-blocks");
|
|
10
11
|
const b = (0, utils_1.block)('QuestionsBlock');
|
|
11
12
|
const QuestionsBlock = (props) => {
|
|
12
|
-
const { title, text, additionalInfo, links, buttons, items } = props;
|
|
13
|
+
const { title, text, additionalInfo, links, buttons, items, blockName = models_1.BlockType.QuestionsBlock, } = props;
|
|
13
14
|
const [opened, setOpened] = (0, react_1.useState)([0]);
|
|
14
15
|
const toggleItem = (index) => {
|
|
15
16
|
let newState;
|
|
@@ -25,7 +26,7 @@ const QuestionsBlock = (props) => {
|
|
|
25
26
|
react_1.default.createElement(grid_1.Row, null,
|
|
26
27
|
react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: 4 } },
|
|
27
28
|
react_1.default.createElement("div", { className: b('title') },
|
|
28
|
-
react_1.default.createElement(sub_blocks_1.Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))),
|
|
29
|
+
react_1.default.createElement(sub_blocks_1.Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, blockName: blockName }))),
|
|
29
30
|
react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: 8 } }, items.map(({ title: itemTitle, text: itemText, link, listStyle = 'dash' }, index) => {
|
|
30
31
|
const isOpened = opened.includes(index);
|
|
31
32
|
return (react_1.default.createElement("div", { key: itemTitle, className: b('item') },
|
|
@@ -4,11 +4,12 @@ exports.SecurityBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
|
+
const models_1 = require("../../models");
|
|
7
8
|
const components_1 = require("../../components");
|
|
8
9
|
const grid_1 = require("../../grid");
|
|
9
10
|
const b = (0, utils_1.block)('SecurityBlock');
|
|
10
11
|
const SecurityBlock = (props) => {
|
|
11
|
-
const { backgroundColor, theme = 'dark', title, points, media, animated } = props;
|
|
12
|
+
const { backgroundColor, theme = 'dark', title, points, media, animated, blockName = models_1.BlockType.SecurityBlock, } = props;
|
|
12
13
|
return (react_1.default.createElement(components_1.AnimateBlock, { className: b({ theme }), offset: 200, animate: animated },
|
|
13
14
|
react_1.default.createElement("div", { className: b('content') },
|
|
14
15
|
react_1.default.createElement(components_1.FullWidthBackground, { className: b('background'), style: { backgroundColor } }),
|
|
@@ -22,7 +23,7 @@ const SecurityBlock = (props) => {
|
|
|
22
23
|
link && (react_1.default.createElement(components_1.Link, { className: b('point-link'), text: link.text, url: link.url, theme: 'normal', arrow: true }))))))),
|
|
23
24
|
media && (react_1.default.createElement(grid_1.Row, { className: b('media') },
|
|
24
25
|
react_1.default.createElement(grid_1.Col, null,
|
|
25
|
-
react_1.default.createElement(components_1.Media, Object.assign({ className: b('media') }, media)))))))));
|
|
26
|
+
react_1.default.createElement(components_1.Media, Object.assign({ className: b('media') }, media, { blockName: blockName })))))))));
|
|
26
27
|
};
|
|
27
28
|
exports.SecurityBlock = SecurityBlock;
|
|
28
29
|
exports.default = exports.SecurityBlock;
|
|
@@ -4,8 +4,10 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
|
+
const models_1 = require("../../models");
|
|
7
8
|
const locationContext_1 = require("../../context/locationContext");
|
|
8
9
|
const i18n_1 = tslib_1.__importDefault(require("./i18n"));
|
|
10
|
+
const hooks_1 = require("../../hooks");
|
|
9
11
|
const Facebook_1 = require("../../icons/Facebook");
|
|
10
12
|
const Twitter_1 = require("../../icons/Twitter");
|
|
11
13
|
const Linkedin_1 = require("../../icons/Linkedin");
|
|
@@ -19,15 +21,22 @@ const icons = {
|
|
|
19
21
|
telegram: Telegram_1.Telegram,
|
|
20
22
|
};
|
|
21
23
|
const b = (0, utils_1.block)('share-block');
|
|
22
|
-
const Share = ({ items, title }) => {
|
|
24
|
+
const Share = ({ items, title, blockName = models_1.BlockType.ShareBlock }) => {
|
|
23
25
|
const { pathname, hostname } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
26
|
+
const defaultEvent = (0, react_1.useMemo)(() => ({
|
|
27
|
+
name: 'share-button-click',
|
|
28
|
+
type: models_1.PredefinedEventTypes.Default,
|
|
29
|
+
blockName: blockName,
|
|
30
|
+
}), [blockName]);
|
|
31
|
+
const handleAnalytics = (0, hooks_1.useAnalytics)(defaultEvent);
|
|
32
|
+
const handleButtonClick = (0, react_1.useCallback)(() => handleAnalytics(), [handleAnalytics]);
|
|
24
33
|
return (react_1.default.createElement("div", { className: b() },
|
|
25
34
|
react_1.default.createElement("h5", { className: b('title') }, title || (0, i18n_1.default)('constructor-share')),
|
|
26
35
|
react_1.default.createElement("div", { className: b('items') }, items.map((type) => {
|
|
27
36
|
const url = (0, utils_1.getAbsolutePath)(hostname, pathname);
|
|
28
37
|
const socialUrl = (0, utils_1.getShareLink)(url, type);
|
|
29
38
|
const icon = icons[type];
|
|
30
|
-
return (react_1.default.createElement(uikit_1.Button, { key: type, view: "flat", size: "l", target: "_blank", href: socialUrl, className: b('item', { type: type.toLowerCase() }) }, icon && react_1.default.createElement(uikit_1.Icon, { data: icon, size: 24, className: b('icon', { type }) })));
|
|
39
|
+
return (react_1.default.createElement(uikit_1.Button, { key: type, view: "flat", size: "l", target: "_blank", href: socialUrl, className: b('item', { type: type.toLowerCase() }), onClick: handleButtonClick }, icon && react_1.default.createElement(uikit_1.Icon, { data: icon, size: 24, className: b('icon', { type }) })));
|
|
31
40
|
}))));
|
|
32
41
|
};
|
|
33
42
|
exports.default = Share;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TabsBlockProps } from '../../models';
|
|
2
|
-
export declare const TabsBlock: ({ items, title, description, animated, tabsColSizes, centered, direction, }: TabsBlockProps) => JSX.Element;
|
|
2
|
+
export declare const TabsBlock: ({ items, title, description, animated, tabsColSizes, centered, direction, blockName, }: TabsBlockProps) => JSX.Element;
|
|
3
3
|
export default TabsBlock;
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
7
|
const grid_1 = require("../../grid");
|
|
8
|
+
const models_1 = require("../../models");
|
|
8
9
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
9
10
|
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
10
11
|
const FullscreenImage_1 = tslib_1.__importDefault(require("../../components/FullscreenImage/FullscreenImage"));
|
|
@@ -15,7 +16,7 @@ const ButtonTabs_1 = tslib_1.__importDefault(require("../../components/ButtonTab
|
|
|
15
16
|
const sub_blocks_1 = require("../../sub-blocks");
|
|
16
17
|
const VideoBlock_1 = require("../../components/VideoBlock/VideoBlock");
|
|
17
18
|
const b = (0, utils_1.block)('tabs-block');
|
|
18
|
-
const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', }) => {
|
|
19
|
+
const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', blockName = models_1.BlockType.TabsBlock, }) => {
|
|
19
20
|
var _a;
|
|
20
21
|
const [activeTab, setActiveTab] = (0, react_1.useState)(items[0].tabName);
|
|
21
22
|
const [play, setPlay] = (0, react_1.useState)(false);
|
|
@@ -40,12 +41,12 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
|
|
|
40
41
|
react_1.default.createElement(sub_blocks_1.Content, { title: activeTabData.title, text: activeTabData.text, additionalInfo: activeTabData.additionalInfo, size: "s", links: [
|
|
41
42
|
...(activeTabData.link ? [activeTabData.link] : []),
|
|
42
43
|
...(activeTabData.links || []),
|
|
43
|
-
], buttons: activeTabData.buttons, colSizes: { all: 12 } }))));
|
|
44
|
+
], buttons: activeTabData.buttons, colSizes: { all: 12 }, blockName: blockName }))));
|
|
44
45
|
const mediaContent = showMedia && (react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: 8 }, orders: {
|
|
45
46
|
all: grid_1.GridColumnOrderClasses.Last,
|
|
46
47
|
md: grid_1.GridColumnOrderClasses.First,
|
|
47
48
|
}, className: b('col', { centered: centered }) },
|
|
48
|
-
react_1.default.createElement("div", { ref: ref }, (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (react_1.default.createElement(Media_1.default, Object.assign({}, (0, utils_1.getThemedValue)(activeTabData.media, theme), { key: activeTab, className: b('media'), playVideo: play, height: mediaHeight })))),
|
|
49
|
+
react_1.default.createElement("div", { ref: ref }, (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (react_1.default.createElement(Media_1.default, Object.assign({}, (0, utils_1.getThemedValue)(activeTabData.media, theme), { key: activeTab, className: b('media'), playVideo: play, height: mediaHeight, blockName: blockName })))),
|
|
49
50
|
imageProps && (react_1.default.createElement(react_1.Fragment, null,
|
|
50
51
|
react_1.default.createElement(FullscreenImage_1.default, Object.assign({}, imageProps, { imageClassName: b('image') })))),
|
|
51
52
|
(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && react_1.default.createElement("p", { className: b('caption') }, activeTabData.caption)));
|
|
@@ -53,7 +54,7 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
|
|
|
53
54
|
react_1.default.createElement(BlockHeader_1.default, { title: title, description: description, className: b('block-title', { centered: centered }) }),
|
|
54
55
|
react_1.default.createElement(grid_1.Row, null,
|
|
55
56
|
react_1.default.createElement(grid_1.Col, { sizes: tabsColSizes },
|
|
56
|
-
react_1.default.createElement(ButtonTabs_1.default, { items: tabs, onSelectTab: setActiveTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
|
|
57
|
+
react_1.default.createElement(ButtonTabs_1.default, { items: tabs, onSelectTab: setActiveTab, activeTab: activeTab, className: b('tabs', { centered: centered }), blockName: models_1.BlockType.TabsBlock }))),
|
|
57
58
|
activeTabData && (react_1.default.createElement(grid_1.Row, { className: b('row', { reverse: isReverse }) },
|
|
58
59
|
mediaContent,
|
|
59
60
|
textContent))));
|