@doyourjob/gravity-ui-page-constructor 5.31.237 → 5.31.239
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/HeaderMinify/HeaderMinify.css +2 -2
- package/build/cjs/blocks/Tabs/Tabs.js +7 -1
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.js +9 -3
- package/build/cjs/blocks/Tabs/schema.d.ts +4 -0
- package/build/cjs/blocks/Tabs/schema.js +3 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/blocks/HeaderMinify/HeaderMinify.css +2 -2
- package/build/esm/blocks/Tabs/Tabs.js +8 -2
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.js +9 -3
- package/build/esm/blocks/Tabs/schema.d.ts +4 -0
- package/build/esm/blocks/Tabs/schema.js +3 -0
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/widget/index.js +1 -1
|
@@ -18,8 +18,8 @@ unpredictable css rules order in build */
|
|
|
18
18
|
height: 100%;
|
|
19
19
|
}
|
|
20
20
|
.pc-header-minify-block__container {
|
|
21
|
-
padding-top:
|
|
22
|
-
padding-bottom:
|
|
21
|
+
padding-top: 105px;
|
|
22
|
+
padding-bottom: 135px;
|
|
23
23
|
}
|
|
24
24
|
.pc-header-minify-block__title {
|
|
25
25
|
font-size: var(--g-text-display-4-font-size, var(--pc-text-display-4-font-size));
|
|
@@ -65,7 +65,13 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
|
|
|
65
65
|
const showText = Boolean(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.text);
|
|
66
66
|
const border = (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.border) || 'shadow';
|
|
67
67
|
const textContent = showText && (react_1.default.createElement(TabsTextContent_1.default, { showMedia: showMedia, data: activeTabData, imageProps: imageProps ? imageProps : undefined, isReverse: isReverse, contentSize: contentSize, centered: centered }));
|
|
68
|
-
const
|
|
68
|
+
const mediaContentSizes = (0, react_1.useMemo)(() => {
|
|
69
|
+
if (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.contentColumns) {
|
|
70
|
+
return { all: 12, md: 12 - activeTabData.contentColumns };
|
|
71
|
+
}
|
|
72
|
+
return { all: 12, md: 8 };
|
|
73
|
+
}, [activeTabData]);
|
|
74
|
+
const mediaContent = showMedia && (react_1.default.createElement(grid_1.Col, { sizes: mediaContentSizes, orders: {
|
|
69
75
|
all: grid_1.GridColumnOrderClasses.Last,
|
|
70
76
|
md: grid_1.GridColumnOrderClasses.First,
|
|
71
77
|
}, className: b('col', { centered: centered }) },
|
|
@@ -2,17 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TabsTextContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const grid_1 = require("../../../grid");
|
|
7
7
|
const sub_blocks_1 = require("../../../sub-blocks");
|
|
8
8
|
const utils_1 = require("../../../utils");
|
|
9
9
|
const b = (0, utils_1.block)('tabs-block-text-content');
|
|
10
10
|
const TabsTextContent = ({ centered, contentSize = 's', showMedia, data, imageProps, isReverse, }) => {
|
|
11
|
+
const { media, title, text, additionalInfo, link, links, buttons, list, contentColumns } = data || {};
|
|
12
|
+
const sizes = (0, react_1.useMemo)(() => {
|
|
13
|
+
if (contentColumns) {
|
|
14
|
+
return { all: 12, md: contentColumns };
|
|
15
|
+
}
|
|
16
|
+
return { all: 12, md: showMedia ? 4 : 8 };
|
|
17
|
+
}, [contentColumns, showMedia]);
|
|
11
18
|
if (!data) {
|
|
12
19
|
return null;
|
|
13
20
|
}
|
|
14
|
-
|
|
15
|
-
return (react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: showMedia ? 4 : 8 }, className: b({ centered: centered }) },
|
|
21
|
+
return (react_1.default.createElement(grid_1.Col, { sizes: sizes, className: b({ centered: centered }) },
|
|
16
22
|
react_1.default.createElement("div", { className: b('wrapper', {
|
|
17
23
|
reverse: isReverse,
|
|
18
24
|
'no-image': !(media || imageProps),
|
|
@@ -14,6 +14,9 @@ exports.tabsItem = {
|
|
|
14
14
|
required: ['tabName'],
|
|
15
15
|
properties: Object.assign(Object.assign({}, TabsItemContentProps), { tabName: {
|
|
16
16
|
type: 'string',
|
|
17
|
+
}, contentColumns: {
|
|
18
|
+
type: 'number',
|
|
19
|
+
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
17
20
|
}, caption: {
|
|
18
21
|
type: 'string',
|
|
19
22
|
contentType: 'text',
|
|
@@ -476,6 +476,7 @@ export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSize
|
|
|
476
476
|
image?: ThemedImage;
|
|
477
477
|
caption?: string;
|
|
478
478
|
media?: ThemedMediaProps;
|
|
479
|
+
contentColumns?: number;
|
|
479
480
|
}
|
|
480
481
|
export interface TabsBlockProps extends Animatable {
|
|
481
482
|
title?: TitleItemProps | string;
|
|
@@ -18,8 +18,8 @@ unpredictable css rules order in build */
|
|
|
18
18
|
height: 100%;
|
|
19
19
|
}
|
|
20
20
|
.pc-header-minify-block__container {
|
|
21
|
-
padding-top:
|
|
22
|
-
padding-bottom:
|
|
21
|
+
padding-top: 105px;
|
|
22
|
+
padding-bottom: 135px;
|
|
23
23
|
}
|
|
24
24
|
.pc-header-minify-block__title {
|
|
25
25
|
font-size: var(--g-text-display-4-font-size, var(--pc-text-display-4-font-size));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { useUniqId } from '@gravity-ui/uikit';
|
|
3
3
|
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
|
|
4
4
|
import ButtonTabs from '../../components/ButtonTabs/ButtonTabs';
|
|
@@ -62,7 +62,13 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
|
|
|
62
62
|
const showText = Boolean(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.text);
|
|
63
63
|
const border = (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.border) || 'shadow';
|
|
64
64
|
const textContent = showText && (React.createElement(TabsTextContent, { showMedia: showMedia, data: activeTabData, imageProps: imageProps ? imageProps : undefined, isReverse: isReverse, contentSize: contentSize, centered: centered }));
|
|
65
|
-
const
|
|
65
|
+
const mediaContentSizes = useMemo(() => {
|
|
66
|
+
if (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.contentColumns) {
|
|
67
|
+
return { all: 12, md: 12 - activeTabData.contentColumns };
|
|
68
|
+
}
|
|
69
|
+
return { all: 12, md: 8 };
|
|
70
|
+
}, [activeTabData]);
|
|
71
|
+
const mediaContent = showMedia && (React.createElement(Col, { sizes: mediaContentSizes, orders: {
|
|
66
72
|
all: GridColumnOrderClasses.Last,
|
|
67
73
|
md: GridColumnOrderClasses.First,
|
|
68
74
|
}, className: b('col', { centered: centered }) },
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { Col } from '../../../grid';
|
|
3
3
|
import { Content } from '../../../sub-blocks';
|
|
4
4
|
import { block } from '../../../utils';
|
|
5
5
|
import './TabsTextContent.css';
|
|
6
6
|
const b = block('tabs-block-text-content');
|
|
7
7
|
export const TabsTextContent = ({ centered, contentSize = 's', showMedia, data, imageProps, isReverse, }) => {
|
|
8
|
+
const { media, title, text, additionalInfo, link, links, buttons, list, contentColumns } = data || {};
|
|
9
|
+
const sizes = useMemo(() => {
|
|
10
|
+
if (contentColumns) {
|
|
11
|
+
return { all: 12, md: contentColumns };
|
|
12
|
+
}
|
|
13
|
+
return { all: 12, md: showMedia ? 4 : 8 };
|
|
14
|
+
}, [contentColumns, showMedia]);
|
|
8
15
|
if (!data) {
|
|
9
16
|
return null;
|
|
10
17
|
}
|
|
11
|
-
|
|
12
|
-
return (React.createElement(Col, { sizes: { all: 12, md: showMedia ? 4 : 8 }, className: b({ centered: centered }) },
|
|
18
|
+
return (React.createElement(Col, { sizes: sizes, className: b({ centered: centered }) },
|
|
13
19
|
React.createElement("div", { className: b('wrapper', {
|
|
14
20
|
reverse: isReverse,
|
|
15
21
|
'no-image': !(media || imageProps),
|
|
@@ -10,6 +10,9 @@ export const tabsItem = {
|
|
|
10
10
|
required: ['tabName'],
|
|
11
11
|
properties: Object.assign(Object.assign({}, TabsItemContentProps), { tabName: {
|
|
12
12
|
type: 'string',
|
|
13
|
+
}, contentColumns: {
|
|
14
|
+
type: 'number',
|
|
15
|
+
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
13
16
|
}, caption: {
|
|
14
17
|
type: 'string',
|
|
15
18
|
contentType: 'text',
|
|
@@ -476,6 +476,7 @@ export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSize
|
|
|
476
476
|
image?: ThemedImage;
|
|
477
477
|
caption?: string;
|
|
478
478
|
media?: ThemedMediaProps;
|
|
479
|
+
contentColumns?: number;
|
|
479
480
|
}
|
|
480
481
|
export interface TabsBlockProps extends Animatable {
|
|
481
482
|
title?: TitleItemProps | string;
|