@gravity-ui/page-constructor 4.30.0 → 4.31.0
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/Banner/schema.d.ts +9 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +12 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +9 -0
- package/build/cjs/blocks/FilterBlock/schema.d.ts +12 -0
- package/build/cjs/blocks/Header/schema.d.ts +3 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Info/schema.d.ts +6 -0
- package/build/cjs/blocks/Map/schema.d.ts +9 -0
- package/build/cjs/blocks/Media/schema.d.ts +18 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
- package/build/cjs/blocks/Questions/schema.d.ts +6 -0
- package/build/cjs/blocks/Slider/schema.d.ts +6 -0
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +12 -0
- package/build/cjs/components/Button/Button.d.ts +1 -0
- package/build/cjs/components/Button/Button.js +2 -2
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -0
- package/build/cjs/schema/constants.d.ts +18 -0
- package/build/cjs/schema/validators/common.d.ts +21 -0
- package/build/cjs/schema/validators/common.js +11 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js +2 -0
- package/build/cjs/sub-blocks/Content/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
- package/build/cjs/sub-blocks/Quote/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/schema.js +2 -0
- package/build/esm/blocks/Banner/schema.d.ts +9 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +12 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +9 -0
- package/build/esm/blocks/FilterBlock/schema.d.ts +12 -0
- package/build/esm/blocks/Header/schema.d.ts +3 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Info/schema.d.ts +6 -0
- package/build/esm/blocks/Map/schema.d.ts +9 -0
- package/build/esm/blocks/Media/schema.d.ts +18 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
- package/build/esm/blocks/Questions/schema.d.ts +6 -0
- package/build/esm/blocks/Slider/schema.d.ts +6 -0
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +12 -0
- package/build/esm/components/Button/Button.d.ts +1 -0
- package/build/esm/components/Button/Button.js +2 -2
- package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -0
- package/build/esm/schema/constants.d.ts +18 -0
- package/build/esm/schema/validators/common.d.ts +21 -0
- package/build/esm/schema/validators/common.js +11 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +6 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +6 -0
- package/build/esm/sub-blocks/BasicCard/schema.js +2 -0
- package/build/esm/sub-blocks/Content/schema.d.ts +6 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/Quote.js +2 -2
- package/build/esm/sub-blocks/Quote/schema.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/schema.js +2 -0
- package/package.json +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +2 -0
- package/widget/index.js +1 -1
|
@@ -208,6 +208,8 @@ export const LinkProps = {
|
|
|
208
208
|
contentType: 'text',
|
|
209
209
|
}, url: {
|
|
210
210
|
type: 'string',
|
|
211
|
+
}, urlTitle: {
|
|
212
|
+
type: 'string',
|
|
211
213
|
}, arrow: {
|
|
212
214
|
type: 'boolean',
|
|
213
215
|
}, theme: {
|
|
@@ -283,6 +285,9 @@ export const ButtonProps = {
|
|
|
283
285
|
url: {
|
|
284
286
|
type: 'string',
|
|
285
287
|
},
|
|
288
|
+
urlTitle: {
|
|
289
|
+
type: 'string',
|
|
290
|
+
},
|
|
286
291
|
primary: {
|
|
287
292
|
type: 'boolean',
|
|
288
293
|
},
|
|
@@ -436,6 +441,9 @@ export const AnchorProps = {
|
|
|
436
441
|
url: {
|
|
437
442
|
type: 'string',
|
|
438
443
|
},
|
|
444
|
+
urlTitle: {
|
|
445
|
+
type: 'string',
|
|
446
|
+
},
|
|
439
447
|
},
|
|
440
448
|
};
|
|
441
449
|
export const BlockBaseProps = Object.assign(Object.assign({}, BaseProps), { anchor: AnchorProps, visible: {
|
|
@@ -462,6 +470,9 @@ export const TitleProps = {
|
|
|
462
470
|
url: {
|
|
463
471
|
type: 'string',
|
|
464
472
|
},
|
|
473
|
+
urlTitle: {
|
|
474
|
+
type: 'string',
|
|
475
|
+
},
|
|
465
476
|
resetMargin: {
|
|
466
477
|
type: 'boolean',
|
|
467
478
|
},
|
|
@@ -6,6 +6,9 @@ export declare const BackgroundCard: {
|
|
|
6
6
|
url: {
|
|
7
7
|
type: string;
|
|
8
8
|
};
|
|
9
|
+
urlTitle: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
9
12
|
background: {
|
|
10
13
|
oneOf: (({
|
|
11
14
|
type: string;
|
|
@@ -163,6 +166,9 @@ export declare const BackgroundCard: {
|
|
|
163
166
|
url: {
|
|
164
167
|
type: string;
|
|
165
168
|
};
|
|
169
|
+
urlTitle: {
|
|
170
|
+
type: string;
|
|
171
|
+
};
|
|
166
172
|
resetMargin: {
|
|
167
173
|
type: string;
|
|
168
174
|
};
|
|
@@ -10,6 +10,8 @@ export const BackgroundCard = {
|
|
|
10
10
|
required: ['title', 'text'],
|
|
11
11
|
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), BackgroundCardContentProps), { url: {
|
|
12
12
|
type: 'string',
|
|
13
|
+
}, urlTitle: {
|
|
14
|
+
type: 'string',
|
|
13
15
|
}, background: withTheme(ImageObjectProps), backgroundColor: {
|
|
14
16
|
type: 'string',
|
|
15
17
|
}, paddingBottom: {
|
|
@@ -6,6 +6,9 @@ export declare const BasicCard: {
|
|
|
6
6
|
url: {
|
|
7
7
|
type: string;
|
|
8
8
|
};
|
|
9
|
+
urlTitle: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
9
12
|
icon: {
|
|
10
13
|
oneOf: ({
|
|
11
14
|
type: string;
|
|
@@ -50,6 +53,9 @@ export declare const BasicCard: {
|
|
|
50
53
|
url: {
|
|
51
54
|
type: string;
|
|
52
55
|
};
|
|
56
|
+
urlTitle: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
53
59
|
resetMargin: {
|
|
54
60
|
type: string;
|
|
55
61
|
};
|
|
@@ -9,6 +9,8 @@ export const BasicCard = {
|
|
|
9
9
|
required: [],
|
|
10
10
|
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), BasicCardContentProps), { url: {
|
|
11
11
|
type: 'string',
|
|
12
|
+
}, urlTitle: {
|
|
13
|
+
type: 'string',
|
|
12
14
|
}, icon: ImageProps, target: {
|
|
13
15
|
type: 'string',
|
|
14
16
|
enum: ['_blank', '_parent', '_top', '_self'],
|
|
@@ -59,6 +59,9 @@ export declare const ContentBase: {
|
|
|
59
59
|
url: {
|
|
60
60
|
type: string;
|
|
61
61
|
};
|
|
62
|
+
urlTitle: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
62
65
|
resetMargin: {
|
|
63
66
|
type: string;
|
|
64
67
|
};
|
|
@@ -147,6 +150,9 @@ export declare const ContentBlock: {
|
|
|
147
150
|
url: {
|
|
148
151
|
type: string;
|
|
149
152
|
};
|
|
153
|
+
urlTitle: {
|
|
154
|
+
type: string;
|
|
155
|
+
};
|
|
150
156
|
resetMargin: {
|
|
151
157
|
type: string;
|
|
152
158
|
};
|
|
@@ -9,7 +9,7 @@ import { block, getThemedValue } from '../../utils';
|
|
|
9
9
|
import './Quote.css';
|
|
10
10
|
const b = block('quote');
|
|
11
11
|
const Quote = (props) => {
|
|
12
|
-
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, quoteType = QuoteType.Chevron, } = props;
|
|
12
|
+
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, urlTitle, buttonText, quoteType = QuoteType.Chevron, } = props;
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
const imageThemed = getThemedValue(image, theme);
|
|
15
15
|
const imageData = getMediaImage(imageThemed);
|
|
@@ -17,7 +17,7 @@ const Quote = (props) => {
|
|
|
17
17
|
const handleButtonClick = useCallback(() => handleAnalytics(), [handleAnalytics]);
|
|
18
18
|
const renderFooter = Boolean(author || url) && (React.createElement("div", { className: b('author-wrapper') },
|
|
19
19
|
author && (React.createElement(Author, { className: b('author', { theme: textTheme }), author: author, type: AuthorType.Line })),
|
|
20
|
-
url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick }, buttonText))));
|
|
20
|
+
url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick, title: urlTitle }, buttonText))));
|
|
21
21
|
const logoProps = getMediaImage(logo);
|
|
22
22
|
return (React.createElement("div", { className: b({ theme: textTheme, border }), style: color ? { backgroundColor: color } : {} },
|
|
23
23
|
React.createElement("div", { key: text, className: b('content-wrapper') },
|
package/package.json
CHANGED
|
@@ -67,6 +67,7 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
67
67
|
logo: ImageProps;
|
|
68
68
|
color?: string;
|
|
69
69
|
url?: string;
|
|
70
|
+
urlTitle?: string;
|
|
70
71
|
author?: AuthorItem;
|
|
71
72
|
buttonText?: string;
|
|
72
73
|
theme?: TextTheme;
|
|
@@ -81,6 +82,7 @@ export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase,
|
|
|
81
82
|
}
|
|
82
83
|
export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
83
84
|
url: string;
|
|
85
|
+
urlTitle?: string;
|
|
84
86
|
icon?: ImageProps;
|
|
85
87
|
target?: string;
|
|
86
88
|
iconPosition?: IconPosition;
|