@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.
Files changed (65) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +9 -0
  2. package/build/cjs/blocks/CardLayout/schema.d.ts +12 -0
  3. package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
  4. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +9 -0
  5. package/build/cjs/blocks/FilterBlock/schema.d.ts +12 -0
  6. package/build/cjs/blocks/Header/schema.d.ts +3 -0
  7. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
  8. package/build/cjs/blocks/Icons/schema.d.ts +6 -0
  9. package/build/cjs/blocks/Info/schema.d.ts +6 -0
  10. package/build/cjs/blocks/Map/schema.d.ts +9 -0
  11. package/build/cjs/blocks/Media/schema.d.ts +18 -0
  12. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
  13. package/build/cjs/blocks/Questions/schema.d.ts +6 -0
  14. package/build/cjs/blocks/Slider/schema.d.ts +6 -0
  15. package/build/cjs/blocks/Table/schema.d.ts +3 -0
  16. package/build/cjs/blocks/Tabs/schema.d.ts +12 -0
  17. package/build/cjs/components/Button/Button.d.ts +1 -0
  18. package/build/cjs/components/Button/Button.js +2 -2
  19. package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -0
  20. package/build/cjs/schema/constants.d.ts +18 -0
  21. package/build/cjs/schema/validators/common.d.ts +21 -0
  22. package/build/cjs/schema/validators/common.js +11 -0
  23. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +6 -0
  24. package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
  25. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +6 -0
  26. package/build/cjs/sub-blocks/BasicCard/schema.js +2 -0
  27. package/build/cjs/sub-blocks/Content/schema.d.ts +6 -0
  28. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
  29. package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
  30. package/build/cjs/sub-blocks/Quote/schema.d.ts +3 -0
  31. package/build/cjs/sub-blocks/Quote/schema.js +2 -0
  32. package/build/esm/blocks/Banner/schema.d.ts +9 -0
  33. package/build/esm/blocks/CardLayout/schema.d.ts +12 -0
  34. package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
  35. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +9 -0
  36. package/build/esm/blocks/FilterBlock/schema.d.ts +12 -0
  37. package/build/esm/blocks/Header/schema.d.ts +3 -0
  38. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  39. package/build/esm/blocks/Icons/schema.d.ts +6 -0
  40. package/build/esm/blocks/Info/schema.d.ts +6 -0
  41. package/build/esm/blocks/Map/schema.d.ts +9 -0
  42. package/build/esm/blocks/Media/schema.d.ts +18 -0
  43. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
  44. package/build/esm/blocks/Questions/schema.d.ts +6 -0
  45. package/build/esm/blocks/Slider/schema.d.ts +6 -0
  46. package/build/esm/blocks/Table/schema.d.ts +3 -0
  47. package/build/esm/blocks/Tabs/schema.d.ts +12 -0
  48. package/build/esm/components/Button/Button.d.ts +1 -0
  49. package/build/esm/components/Button/Button.js +2 -2
  50. package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -0
  51. package/build/esm/schema/constants.d.ts +18 -0
  52. package/build/esm/schema/validators/common.d.ts +21 -0
  53. package/build/esm/schema/validators/common.js +11 -0
  54. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +6 -0
  55. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
  56. package/build/esm/sub-blocks/BasicCard/schema.d.ts +6 -0
  57. package/build/esm/sub-blocks/BasicCard/schema.js +2 -0
  58. package/build/esm/sub-blocks/Content/schema.d.ts +6 -0
  59. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
  60. package/build/esm/sub-blocks/Quote/Quote.js +2 -2
  61. package/build/esm/sub-blocks/Quote/schema.d.ts +3 -0
  62. package/build/esm/sub-blocks/Quote/schema.js +2 -0
  63. package/package.json +1 -1
  64. package/server/models/constructor-items/sub-blocks.d.ts +2 -0
  65. 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
  };
@@ -270,6 +270,9 @@ export declare const LayoutItem: {
270
270
  url: {
271
271
  type: string;
272
272
  };
273
+ urlTitle: {
274
+ type: string;
275
+ };
273
276
  resetMargin: {
274
277
  type: string;
275
278
  };
@@ -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') },
@@ -51,6 +51,9 @@ export declare const Quote: {
51
51
  url: {
52
52
  type: string;
53
53
  };
54
+ urlTitle: {
55
+ type: string;
56
+ };
54
57
  buttonText: {
55
58
  type: string;
56
59
  };
@@ -11,6 +11,8 @@ export const Quote = {
11
11
  type: 'string',
12
12
  }, url: {
13
13
  type: 'string',
14
+ }, urlTitle: {
15
+ type: 'string',
14
16
  }, buttonText: {
15
17
  type: 'string',
16
18
  }, theme: ThemeProps, author: authorItem, quoteType: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "4.30.0",
3
+ "version": "4.31.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -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;