@gravity-ui/page-constructor 4.28.1 → 4.29.1-alpha.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 (167) 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/Form/Form.css +136 -0
  7. package/build/cjs/blocks/Form/Form.d.ts +4 -0
  8. package/build/cjs/blocks/Form/Form.js +61 -0
  9. package/build/cjs/blocks/Form/HubspotInlineForm.d.ts +7 -0
  10. package/build/cjs/blocks/Form/HubspotInlineForm.js +14 -0
  11. package/build/cjs/blocks/Form/InnerForm/InnerForm.d.ts +9 -0
  12. package/build/cjs/blocks/Form/InnerForm/InnerForm.js +28 -0
  13. package/build/cjs/blocks/Form/schema.d.ts +202 -0
  14. package/build/cjs/blocks/Form/schema.js +44 -0
  15. package/build/cjs/blocks/Header/Header.js +2 -2
  16. package/build/cjs/blocks/Header/schema.d.ts +3 -0
  17. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
  18. package/build/cjs/blocks/Icons/schema.d.ts +6 -0
  19. package/build/cjs/blocks/Info/schema.d.ts +6 -0
  20. package/build/cjs/blocks/Map/schema.d.ts +9 -0
  21. package/build/cjs/blocks/Media/schema.d.ts +18 -0
  22. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
  23. package/build/cjs/blocks/Questions/schema.d.ts +6 -0
  24. package/build/cjs/blocks/Share/Share.js +5 -1
  25. package/build/cjs/blocks/Share/i18n/en.json +11 -1
  26. package/build/cjs/blocks/Share/i18n/ru.json +11 -1
  27. package/build/cjs/blocks/Slider/schema.d.ts +6 -0
  28. package/build/cjs/blocks/Table/schema.d.ts +3 -0
  29. package/build/cjs/blocks/Tabs/schema.d.ts +12 -0
  30. package/build/cjs/blocks/index.d.ts +1 -0
  31. package/build/cjs/blocks/index.js +3 -1
  32. package/build/cjs/components/Author/Author.js +7 -1
  33. package/build/cjs/components/Author/schema.d.ts +12 -2
  34. package/build/cjs/components/Button/Button.d.ts +1 -0
  35. package/build/cjs/components/Button/Button.js +2 -2
  36. package/build/cjs/components/CardBase/CardBase.d.ts +1 -0
  37. package/build/cjs/components/CardBase/CardBase.js +2 -5
  38. package/build/cjs/components/Image/Image.js +1 -2
  39. package/build/cjs/components/Media/Image/Image.js +4 -4
  40. package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +1 -2
  41. package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -17
  42. package/build/cjs/components/YandexForm/YandexForm.js +6 -4
  43. package/build/cjs/components/YandexForm/schema.d.ts +16 -0
  44. package/build/cjs/components/YandexForm/schema.js +13 -0
  45. package/build/cjs/constructor-items.d.ts +1 -0
  46. package/build/cjs/constructor-items.js +1 -0
  47. package/build/cjs/editor/data/templates/form-block.json +20 -0
  48. package/build/cjs/models/components.d.ts +1 -2
  49. package/build/cjs/models/constructor-items/blocks.d.ts +33 -5
  50. package/build/cjs/models/constructor-items/blocks.js +13 -1
  51. package/build/cjs/models/constructor-items/common.d.ts +22 -2
  52. package/build/cjs/models/constructor-items/common.js +6 -1
  53. package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -2
  54. package/build/cjs/models/guards.d.ts +3 -1
  55. package/build/cjs/models/guards.js +9 -1
  56. package/build/cjs/schema/constants.d.ts +46 -4
  57. package/build/cjs/schema/constants.js +2 -1
  58. package/build/cjs/schema/validators/blocks.d.ts +1 -0
  59. package/build/cjs/schema/validators/blocks.js +1 -0
  60. package/build/cjs/schema/validators/common.d.ts +35 -3
  61. package/build/cjs/schema/validators/common.js +14 -5
  62. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +6 -0
  63. package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
  64. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +6 -0
  65. package/build/cjs/sub-blocks/BasicCard/schema.js +2 -0
  66. package/build/cjs/sub-blocks/Content/schema.d.ts +6 -0
  67. package/build/cjs/sub-blocks/HubspotForm/schema.d.ts +22 -0
  68. package/build/cjs/sub-blocks/HubspotForm/schema.js +17 -0
  69. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
  70. package/build/cjs/sub-blocks/Quote/Quote.css +12 -3
  71. package/build/cjs/sub-blocks/Quote/Quote.js +5 -4
  72. package/build/cjs/sub-blocks/Quote/schema.d.ts +31 -4
  73. package/build/cjs/sub-blocks/Quote/schema.js +7 -5
  74. package/build/cjs/text-transform/transformers.js +3 -1
  75. package/build/esm/blocks/Banner/schema.d.ts +9 -0
  76. package/build/esm/blocks/CardLayout/schema.d.ts +12 -0
  77. package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
  78. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +9 -0
  79. package/build/esm/blocks/FilterBlock/schema.d.ts +12 -0
  80. package/build/esm/blocks/Form/Form.css +136 -0
  81. package/build/esm/blocks/Form/Form.d.ts +5 -0
  82. package/build/esm/blocks/Form/Form.js +59 -0
  83. package/build/esm/blocks/Form/HubspotInlineForm.d.ts +7 -0
  84. package/build/esm/blocks/Form/HubspotInlineForm.js +12 -0
  85. package/build/esm/blocks/Form/InnerForm/InnerForm.d.ts +9 -0
  86. package/build/esm/blocks/Form/InnerForm/InnerForm.js +26 -0
  87. package/build/esm/blocks/Form/schema.d.ts +202 -0
  88. package/build/esm/blocks/Form/schema.js +40 -0
  89. package/build/esm/blocks/Header/Header.js +2 -2
  90. package/build/esm/blocks/Header/schema.d.ts +3 -0
  91. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  92. package/build/esm/blocks/Icons/schema.d.ts +6 -0
  93. package/build/esm/blocks/Info/schema.d.ts +6 -0
  94. package/build/esm/blocks/Map/schema.d.ts +9 -0
  95. package/build/esm/blocks/Media/schema.d.ts +18 -0
  96. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
  97. package/build/esm/blocks/Questions/schema.d.ts +6 -0
  98. package/build/esm/blocks/Share/Share.js +5 -1
  99. package/build/esm/blocks/Share/i18n/en.json +11 -1
  100. package/build/esm/blocks/Share/i18n/ru.json +11 -1
  101. package/build/esm/blocks/Slider/schema.d.ts +6 -0
  102. package/build/esm/blocks/Table/schema.d.ts +3 -0
  103. package/build/esm/blocks/Tabs/schema.d.ts +12 -0
  104. package/build/esm/blocks/index.d.ts +1 -0
  105. package/build/esm/blocks/index.js +1 -0
  106. package/build/esm/components/Author/Author.js +7 -1
  107. package/build/esm/components/Author/schema.d.ts +12 -2
  108. package/build/esm/components/Button/Button.d.ts +1 -0
  109. package/build/esm/components/Button/Button.js +2 -2
  110. package/build/esm/components/CardBase/CardBase.d.ts +1 -0
  111. package/build/esm/components/CardBase/CardBase.js +2 -5
  112. package/build/esm/components/Image/Image.js +1 -2
  113. package/build/esm/components/Media/Image/Image.js +1 -1
  114. package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +1 -2
  115. package/build/esm/components/YandexForm/YandexForm.d.ts +2 -17
  116. package/build/esm/components/YandexForm/YandexForm.js +5 -3
  117. package/build/esm/components/YandexForm/schema.d.ts +16 -0
  118. package/build/esm/components/YandexForm/schema.js +10 -0
  119. package/build/esm/constructor-items.d.ts +1 -0
  120. package/build/esm/constructor-items.js +2 -1
  121. package/build/esm/editor/data/templates/form-block.json +20 -0
  122. package/build/esm/models/components.d.ts +1 -2
  123. package/build/esm/models/constructor-items/blocks.d.ts +33 -5
  124. package/build/esm/models/constructor-items/blocks.js +12 -0
  125. package/build/esm/models/constructor-items/common.d.ts +22 -2
  126. package/build/esm/models/constructor-items/common.js +5 -0
  127. package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -2
  128. package/build/esm/models/guards.d.ts +3 -1
  129. package/build/esm/models/guards.js +7 -1
  130. package/build/esm/schema/constants.d.ts +46 -4
  131. package/build/esm/schema/constants.js +3 -2
  132. package/build/esm/schema/validators/blocks.d.ts +1 -0
  133. package/build/esm/schema/validators/blocks.js +1 -0
  134. package/build/esm/schema/validators/common.d.ts +35 -3
  135. package/build/esm/schema/validators/common.js +15 -6
  136. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +6 -0
  137. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
  138. package/build/esm/sub-blocks/BasicCard/schema.d.ts +6 -0
  139. package/build/esm/sub-blocks/BasicCard/schema.js +2 -0
  140. package/build/esm/sub-blocks/Content/schema.d.ts +6 -0
  141. package/build/esm/sub-blocks/HubspotForm/schema.d.ts +22 -0
  142. package/build/esm/sub-blocks/HubspotForm/schema.js +14 -0
  143. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
  144. package/build/esm/sub-blocks/Quote/Quote.css +12 -3
  145. package/build/esm/sub-blocks/Quote/Quote.js +6 -5
  146. package/build/esm/sub-blocks/Quote/schema.d.ts +31 -4
  147. package/build/esm/sub-blocks/Quote/schema.js +9 -7
  148. package/build/esm/text-transform/transformers.js +3 -1
  149. package/package.json +2 -2
  150. package/server/models/components.d.ts +1 -2
  151. package/server/models/constructor-items/blocks.d.ts +33 -5
  152. package/server/models/constructor-items/blocks.js +13 -1
  153. package/server/models/constructor-items/common.d.ts +22 -2
  154. package/server/models/constructor-items/common.js +6 -1
  155. package/server/models/constructor-items/sub-blocks.d.ts +5 -2
  156. package/server/models/guards.d.ts +3 -1
  157. package/server/models/guards.js +9 -1
  158. package/server/text-transform/transformers.js +3 -1
  159. package/widget/index.js +1 -1
  160. package/build/cjs/components/Image/i18n/en.json +0 -3
  161. package/build/cjs/components/Image/i18n/index.d.ts +0 -2
  162. package/build/cjs/components/Image/i18n/index.js +0 -8
  163. package/build/cjs/components/Image/i18n/ru.json +0 -3
  164. package/build/esm/components/Image/i18n/en.json +0 -3
  165. package/build/esm/components/Image/i18n/index.d.ts +0 -2
  166. package/build/esm/components/Image/i18n/index.js +0 -5
  167. package/build/esm/components/Image/i18n/ru.json +0 -3
@@ -0,0 +1,20 @@
1
+ {
2
+ "template": {
3
+ "type": "form-block",
4
+ "formData": {
5
+ "yandex": {
6
+ "hash": "hashString",
7
+ "title": ""
8
+ }
9
+ },
10
+ "direction": "center",
11
+ "textContent": {
12
+ "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
13
+ "text": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
14
+ },
15
+ "image": {
16
+ "src": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img-mini_4-12_light.png"
17
+ },
18
+ "backgroundColor": "#262626"
19
+ }
20
+ }
@@ -1,3 +1,2 @@
1
1
  export type ArrowDirection = 'left' | 'right';
2
- export interface ReactPlayerBlockHandler extends Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> {
3
- }
2
+ export type ReactPlayerBlockHandler = Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> | undefined;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ButtonSize } from '@gravity-ui/uikit';
3
3
  import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
4
4
  import { ThemeSupporting } from '../../utils';
5
5
  import { AnalyticsEventsBase } from '../common';
6
- import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps } from './common';
7
- import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
6
+ import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
7
+ import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './sub-blocks';
8
8
  export declare enum BlockType {
9
9
  PromoFeaturesBlock = "promo-features-block",
10
10
  ExtendedFeaturesBlock = "extended-features-block",
@@ -23,7 +23,8 @@ export declare enum BlockType {
23
23
  ContentLayoutBlock = "content-layout-block",
24
24
  ShareBlock = "share-block",
25
25
  MapBlock = "map-block",
26
- FilterBlock = "filter-block"
26
+ FilterBlock = "filter-block",
27
+ FormBlock = "form-block"
27
28
  }
28
29
  export declare const BlockTypes: BlockType[];
29
30
  export declare const HeaderBlockTypes: BlockType[];
@@ -109,6 +110,7 @@ export interface HeaderBlockProps {
109
110
  verticalOffset?: 's' | 'm' | 'l' | 'xl';
110
111
  breadcrumbs?: HeaderBreadCrumbsProps;
111
112
  status?: JSX.Element;
113
+ renderTitle?: (title: string) => React.ReactNode;
112
114
  }
113
115
  export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
114
116
  title: string;
@@ -294,6 +296,29 @@ export interface ShareBlockProps {
294
296
  items: PCShareSocialNetwork[];
295
297
  title?: string;
296
298
  }
299
+ export declare enum FormBlockDataTypes {
300
+ YANDEX = "yandex",
301
+ HUBSPOT_INLINE = "hubspot-inline"
302
+ }
303
+ export declare enum FormBlockDirection {
304
+ FormContent = "form-content",
305
+ ContentForm = "content-form",
306
+ Center = "center"
307
+ }
308
+ export interface FormBlockYandexData {
309
+ yandex: YandexFormProps;
310
+ }
311
+ export interface FormBlockHubspotData {
312
+ hubspot: HubspotFormProps;
313
+ }
314
+ export type FormBlockData = FormBlockYandexData | FormBlockHubspotData;
315
+ export interface FormBlockProps {
316
+ formData: FormBlockData;
317
+ title?: string;
318
+ textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;
319
+ direction?: FormBlockDirection;
320
+ background?: BackgroundImageProps;
321
+ }
297
322
  export type HeaderBlockModel = {
298
323
  type: BlockType.HeaderBlock;
299
324
  } & HeaderBlockProps;
@@ -348,6 +373,9 @@ export type ContentLayoutBlockModel = {
348
373
  export type ShareBLockModel = {
349
374
  type: BlockType.ShareBlock;
350
375
  } & ShareBlockProps;
351
- type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
376
+ export type FormBlockModel = {
377
+ type: BlockType.FormBlock;
378
+ } & FormBlockProps;
379
+ type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel;
352
380
  export type Block = BlockModels & BlockBaseProps;
353
381
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
3
+ exports.FormBlockDirection = exports.FormBlockDataTypes = exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
4
4
  var BlockType;
5
5
  (function (BlockType) {
6
6
  BlockType["PromoFeaturesBlock"] = "promo-features-block";
@@ -21,6 +21,7 @@ var BlockType;
21
21
  BlockType["ShareBlock"] = "share-block";
22
22
  BlockType["MapBlock"] = "map-block";
23
23
  BlockType["FilterBlock"] = "filter-block";
24
+ BlockType["FormBlock"] = "form-block";
24
25
  })(BlockType = exports.BlockType || (exports.BlockType = {}));
25
26
  exports.BlockTypes = Object.values(BlockType);
26
27
  exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
@@ -44,3 +45,14 @@ var PCShareSocialNetwork;
44
45
  PCShareSocialNetwork["Facebook"] = "facebook";
45
46
  PCShareSocialNetwork["LinkedIn"] = "linkedin";
46
47
  })(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
48
+ var FormBlockDataTypes;
49
+ (function (FormBlockDataTypes) {
50
+ FormBlockDataTypes["YANDEX"] = "yandex";
51
+ FormBlockDataTypes["HUBSPOT_INLINE"] = "hubspot-inline";
52
+ })(FormBlockDataTypes = exports.FormBlockDataTypes || (exports.FormBlockDataTypes = {}));
53
+ var FormBlockDirection;
54
+ (function (FormBlockDirection) {
55
+ FormBlockDirection["FormContent"] = "form-content";
56
+ FormBlockDirection["ContentForm"] = "content-form";
57
+ FormBlockDirection["Center"] = "center";
58
+ })(FormBlockDirection = exports.FormBlockDirection || (exports.FormBlockDirection = {}));
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties, ReactNode } from 'react';
2
2
  import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
3
3
  import { ThemeSupporting } from '../../utils';
4
- import { AnalyticsEventsBase, ClassNameProps, PixelEventType, QAProps } from '../common';
4
+ import { AnalyticsEventsBase, ClassNameProps, PixelEvent, PixelEventType, QAProps } from '../common';
5
5
  export declare enum AuthorType {
6
6
  Column = "column",
7
7
  Line = "line"
@@ -42,6 +42,10 @@ export declare enum MediaVideoControlsType {
42
42
  Default = "default",
43
43
  Custom = "custom"
44
44
  }
45
+ export declare enum QuoteType {
46
+ Chevron = "chevron",
47
+ EnglishDouble = "english-double"
48
+ }
45
49
  export type TextTheme = 'light' | 'dark';
46
50
  export type TextSize = 'xs' | 's' | 'm' | 'l';
47
51
  export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
@@ -251,7 +255,7 @@ export interface AuthorItem {
251
255
  firstName: string;
252
256
  secondName: string;
253
257
  description?: string;
254
- avatar?: string | JSX.Element;
258
+ avatar?: ImageProps | JSX.Element;
255
259
  }
256
260
  export interface HeaderBreadCrumbsProps extends ClassNameProps {
257
261
  items: {
@@ -333,4 +337,20 @@ export interface TitleProps {
333
337
  title?: TitleItemProps | string;
334
338
  subtitle?: string;
335
339
  }
340
+ export interface YandexFormProps extends AnalyticsEventsBase {
341
+ id: number | string;
342
+ containerId?: string;
343
+ theme?: string;
344
+ className?: string;
345
+ headerHeight?: number;
346
+ customFormOrigin?: string;
347
+ customFormSection?: string;
348
+ params?: {
349
+ [key: string]: string;
350
+ };
351
+ onSubmit?: () => void;
352
+ onLoad?: () => void;
353
+ metrikaGoals?: string | string[];
354
+ pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
355
+ }
336
356
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsButtonPositioning = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
3
+ exports.QuoteType = exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsButtonPositioning = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
4
4
  // enums
5
5
  var AuthorType;
6
6
  (function (AuthorType) {
@@ -51,3 +51,8 @@ var MediaVideoControlsType;
51
51
  MediaVideoControlsType["Default"] = "default";
52
52
  MediaVideoControlsType["Custom"] = "custom";
53
53
  })(MediaVideoControlsType = exports.MediaVideoControlsType || (exports.MediaVideoControlsType = {}));
54
+ var QuoteType;
55
+ (function (QuoteType) {
56
+ QuoteType["Chevron"] = "chevron";
57
+ QuoteType["EnglishDouble"] = "english-double";
58
+ })(QuoteType = exports.QuoteType || (exports.QuoteType = {}));
@@ -1,4 +1,4 @@
1
- import { ClassNameProps } from '../../models';
1
+ import { ClassNameProps, QuoteType } from '../../models';
2
2
  import { ThemeSupporting } from '../../utils';
3
3
  import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
4
4
  import { AnalyticsEventsBase, PixelEvent } from '../common';
@@ -64,12 +64,14 @@ export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsB
64
64
  export interface QuoteProps extends Themable, CardBaseProps {
65
65
  text: string;
66
66
  image: ThemedImage;
67
- logo: string;
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;
74
+ quoteType?: QuoteType;
73
75
  }
74
76
  export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
75
77
  url?: string;
@@ -80,6 +82,7 @@ export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase,
80
82
  }
81
83
  export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
82
84
  url: string;
85
+ urlTitle?: string;
83
86
  icon?: ImageProps;
84
87
  target?: string;
85
88
  iconPosition?: IconPosition;
@@ -1,4 +1,6 @@
1
- import { Block, ConstructorItem } from './';
1
+ import { Block, ConstructorItem, FormBlockData, FormBlockHubspotData, FormBlockYandexData } from './';
2
2
  import { MetrikaGoal, NewMetrikaGoal } from './index';
3
3
  export declare function isBlock(block: ConstructorItem): block is Block;
4
4
  export declare function isNewMetrikaFormat(metrika: MetrikaGoal): metrika is NewMetrikaGoal[];
5
+ export declare function isYandexDataForm(data: FormBlockData): data is FormBlockYandexData;
6
+ export declare function isHubspotDataForm(data: FormBlockData): data is FormBlockHubspotData;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNewMetrikaFormat = exports.isBlock = void 0;
3
+ exports.isHubspotDataForm = exports.isYandexDataForm = exports.isNewMetrikaFormat = exports.isBlock = void 0;
4
4
  const _1 = require("./");
5
5
  function isBlock(block) {
6
6
  return block.type in _1.BlockTypes;
@@ -10,3 +10,11 @@ function isNewMetrikaFormat(metrika) {
10
10
  return Boolean(Array.isArray(metrika) && metrika.length && typeof metrika[0] === 'object');
11
11
  }
12
12
  exports.isNewMetrikaFormat = isNewMetrikaFormat;
13
+ function isYandexDataForm(data) {
14
+ return Boolean(data.yandex);
15
+ }
16
+ exports.isYandexDataForm = isYandexDataForm;
17
+ function isHubspotDataForm(data) {
18
+ return Boolean(data.hubspot);
19
+ }
20
+ exports.isHubspotDataForm = isHubspotDataForm;
@@ -8,6 +8,9 @@ export declare const cardSchemas: {
8
8
  url: {
9
9
  type: string;
10
10
  };
11
+ urlTitle: {
12
+ type: string;
13
+ };
11
14
  icon: {
12
15
  oneOf: ({
13
16
  type: string;
@@ -52,6 +55,9 @@ export declare const cardSchemas: {
52
55
  url: {
53
56
  type: string;
54
57
  };
58
+ urlTitle: {
59
+ type: string;
60
+ };
55
61
  resetMargin: {
56
62
  type: string;
57
63
  };
@@ -144,8 +150,18 @@ export declare const cardSchemas: {
144
150
  })[];
145
151
  };
146
152
  logo: {
147
- type: string;
148
- pattern: string;
153
+ oneOf: ({
154
+ type: string;
155
+ properties: {
156
+ when: {
157
+ type: string;
158
+ };
159
+ };
160
+ } | {
161
+ type: string;
162
+ pattern: string;
163
+ optionName: string;
164
+ })[];
149
165
  };
150
166
  color: {
151
167
  type: string;
@@ -153,6 +169,9 @@ export declare const cardSchemas: {
153
169
  url: {
154
170
  type: string;
155
171
  };
172
+ urlTitle: {
173
+ type: string;
174
+ };
156
175
  buttonText: {
157
176
  type: string;
158
177
  };
@@ -173,8 +192,18 @@ export declare const cardSchemas: {
173
192
  contentType: string;
174
193
  };
175
194
  avatar: {
176
- type: string;
177
- pattern: string;
195
+ oneOf: ({
196
+ type: string;
197
+ properties: {
198
+ when: {
199
+ type: string;
200
+ };
201
+ };
202
+ } | {
203
+ type: string;
204
+ pattern: string;
205
+ optionName: string;
206
+ })[];
178
207
  };
179
208
  description: {
180
209
  type: string;
@@ -182,6 +211,10 @@ export declare const cardSchemas: {
182
211
  };
183
212
  };
184
213
  };
214
+ quoteType: {
215
+ type: string;
216
+ enum: import("../models").QuoteType[];
217
+ };
185
218
  type: {};
186
219
  when: {
187
220
  type: string;
@@ -195,6 +228,9 @@ export declare const cardSchemas: {
195
228
  url: {
196
229
  type: string;
197
230
  };
231
+ urlTitle: {
232
+ type: string;
233
+ };
198
234
  background: {
199
235
  oneOf: (({
200
236
  type: string;
@@ -352,6 +388,9 @@ export declare const cardSchemas: {
352
388
  url: {
353
389
  type: string;
354
390
  };
391
+ urlTitle: {
392
+ type: string;
393
+ };
355
394
  resetMargin: {
356
395
  type: string;
357
396
  };
@@ -569,6 +608,9 @@ export declare const cardSchemas: {
569
608
  url: {
570
609
  type: string;
571
610
  };
611
+ urlTitle: {
612
+ type: string;
613
+ };
572
614
  primary: {
573
615
  type: string;
574
616
  };
@@ -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({}, 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);
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({}, 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);
7
7
  exports.cardSchemas = 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);
8
8
  exports.constructorBlockSchemaNames = [
9
9
  'divider',
@@ -30,6 +30,7 @@ exports.constructorBlockSchemaNames = [
30
30
  'content-layout-block',
31
31
  'share-block',
32
32
  'filter-block',
33
+ 'form-block',
33
34
  ];
34
35
  exports.constructorCardSchemaNames = [
35
36
  'media-card',
@@ -16,3 +16,4 @@ export * from '../../blocks/CardLayout/schema';
16
16
  export * from '../../blocks/ContentLayout/schema';
17
17
  export * from '../../blocks/Share/schema';
18
18
  export * from '../../blocks/FilterBlock/schema';
19
+ export * from '../../blocks/Form/schema';
@@ -19,3 +19,4 @@ tslib_1.__exportStar(require("../../blocks/CardLayout/schema"), exports);
19
19
  tslib_1.__exportStar(require("../../blocks/ContentLayout/schema"), exports);
20
20
  tslib_1.__exportStar(require("../../blocks/Share/schema"), exports);
21
21
  tslib_1.__exportStar(require("../../blocks/FilterBlock/schema"), exports);
22
+ tslib_1.__exportStar(require("../../blocks/Form/schema"), exports);
@@ -1,4 +1,4 @@
1
- import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme } from '../../models';
1
+ import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme } from '../../models';
2
2
  export declare const mediaDirection: string[];
3
3
  export declare const textSize: string[];
4
4
  export declare const containerSizesArray: string[];
@@ -19,6 +19,7 @@ export declare const sizeNumber: {
19
19
  minimum: number;
20
20
  };
21
21
  export declare const contentThemes: string[];
22
+ export declare const quoteTypes: QuoteType[];
22
23
  export declare const customControlsType: CustomControlsType[];
23
24
  export declare const customControlsButtonPositioning: CustomControlsButtonPositioning[];
24
25
  export declare const BaseProps: {
@@ -376,6 +377,9 @@ export declare const LinkProps: {
376
377
  url: {
377
378
  type: string;
378
379
  };
380
+ urlTitle: {
381
+ type: string;
382
+ };
379
383
  arrow: {
380
384
  type: string;
381
385
  };
@@ -517,8 +521,18 @@ export declare const authorItem: {
517
521
  contentType: string;
518
522
  };
519
523
  avatar: {
520
- type: string;
521
- pattern: string;
524
+ oneOf: ({
525
+ type: string;
526
+ properties: {
527
+ when: {
528
+ type: string;
529
+ };
530
+ };
531
+ } | {
532
+ type: string;
533
+ pattern: string;
534
+ optionName: string;
535
+ })[];
522
536
  };
523
537
  description: {
524
538
  type: string;
@@ -534,6 +548,9 @@ export declare const ButtonProps: {
534
548
  url: {
535
549
  type: string;
536
550
  };
551
+ urlTitle: {
552
+ type: string;
553
+ };
537
554
  primary: {
538
555
  type: string;
539
556
  };
@@ -785,6 +802,9 @@ export declare const AnchorProps: {
785
802
  url: {
786
803
  type: string;
787
804
  };
805
+ urlTitle: {
806
+ type: string;
807
+ };
788
808
  };
789
809
  };
790
810
  export declare const BlockBaseProps: {
@@ -800,6 +820,9 @@ export declare const BlockBaseProps: {
800
820
  url: {
801
821
  type: string;
802
822
  };
823
+ urlTitle: {
824
+ type: string;
825
+ };
803
826
  };
804
827
  };
805
828
  visible: {
@@ -833,6 +856,9 @@ export declare const TitleProps: {
833
856
  url: {
834
857
  type: string;
835
858
  };
859
+ urlTitle: {
860
+ type: string;
861
+ };
836
862
  resetMargin: {
837
863
  type: string;
838
864
  };
@@ -849,6 +875,9 @@ export declare const ButtonBlock: {
849
875
  url: {
850
876
  type: string;
851
877
  };
878
+ urlTitle: {
879
+ type: string;
880
+ };
852
881
  primary: {
853
882
  type: string;
854
883
  };
@@ -1453,6 +1482,9 @@ export declare const BlockHeaderProps: {
1453
1482
  url: {
1454
1483
  type: string;
1455
1484
  };
1485
+ urlTitle: {
1486
+ type: string;
1487
+ };
1456
1488
  resetMargin: {
1457
1489
  type: string;
1458
1490
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlockHeaderProps = exports.CardBase = exports.MapProps = exports.YMapMarker = exports.YMapMarkerLabel = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.CustomControlsOptionsProps = exports.PlayButtonProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.customControlsButtonPositioning = exports.customControlsType = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
3
+ exports.BlockHeaderProps = exports.CardBase = exports.MapProps = exports.YMapMarker = exports.YMapMarkerLabel = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.CustomControlsOptionsProps = exports.PlayButtonProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.customControlsButtonPositioning = exports.customControlsType = exports.quoteTypes = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
4
4
  const schema_1 = require("../../components/Image/schema");
5
5
  const models_1 = require("../../models");
6
6
  const event_1 = require("./event");
@@ -19,6 +19,7 @@ exports.fileLinkTypes = ['vertical', 'horizontal'];
19
19
  exports.dividerEnum = { enum: [0, 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] };
20
20
  exports.sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
21
21
  exports.contentThemes = ['default', 'dark', 'light'];
22
+ exports.quoteTypes = Object.values(models_1.QuoteType);
22
23
  exports.customControlsType = [
23
24
  models_1.CustomControlsType.WithMuteButton,
24
25
  models_1.CustomControlsType.WithPlayPauseButton,
@@ -210,6 +211,8 @@ exports.LinkProps = {
210
211
  contentType: 'text',
211
212
  }, url: {
212
213
  type: 'string',
214
+ }, urlTitle: {
215
+ type: 'string',
213
216
  }, arrow: {
214
217
  type: 'boolean',
215
218
  }, theme: {
@@ -270,10 +273,7 @@ exports.authorItem = {
270
273
  type: 'string',
271
274
  contentType: 'text',
272
275
  },
273
- avatar: {
274
- type: 'string',
275
- pattern: schema_1.imageUrlPattern,
276
- },
276
+ avatar: schema_1.ImageProps,
277
277
  description: {
278
278
  type: 'string',
279
279
  contentType: 'yfm',
@@ -288,6 +288,9 @@ exports.ButtonProps = {
288
288
  url: {
289
289
  type: 'string',
290
290
  },
291
+ urlTitle: {
292
+ type: 'string',
293
+ },
291
294
  primary: {
292
295
  type: 'boolean',
293
296
  },
@@ -442,6 +445,9 @@ exports.AnchorProps = {
442
445
  url: {
443
446
  type: 'string',
444
447
  },
448
+ urlTitle: {
449
+ type: 'string',
450
+ },
445
451
  },
446
452
  };
447
453
  exports.BlockBaseProps = Object.assign(Object.assign({}, exports.BaseProps), { anchor: exports.AnchorProps, visible: {
@@ -468,6 +474,9 @@ exports.TitleProps = {
468
474
  url: {
469
475
  type: 'string',
470
476
  },
477
+ urlTitle: {
478
+ type: 'string',
479
+ },
471
480
  resetMargin: {
472
481
  type: 'boolean',
473
482
  },
@@ -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
  };
@@ -14,6 +14,8 @@ exports.BackgroundCard = {
14
14
  required: ['title', 'text'],
15
15
  properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), BackgroundCardContentProps), { url: {
16
16
  type: 'string',
17
+ }, urlTitle: {
18
+ type: 'string',
17
19
  }, background: (0, common_1.withTheme)(schema_1.ImageObjectProps), backgroundColor: {
18
20
  type: 'string',
19
21
  }, 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
  };
@@ -13,6 +13,8 @@ exports.BasicCard = {
13
13
  required: [],
14
14
  properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), BasicCardContentProps), { url: {
15
15
  type: 'string',
16
+ }, urlTitle: {
17
+ type: 'string',
16
18
  }, icon: schema_1.ImageProps, target: {
17
19
  type: 'string',
18
20
  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
  };