@gravity-ui/page-constructor 4.31.1-alpha.0 → 4.33.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 (116) hide show
  1. package/build/cjs/blocks/Header/Header.js +6 -2
  2. package/build/cjs/blocks/Tabs/Tabs.js +8 -1
  3. package/build/cjs/blocks/index.d.ts +0 -1
  4. package/build/cjs/blocks/index.js +1 -3
  5. package/build/cjs/components/BackLink/BackLink.d.ts +3 -2
  6. package/build/cjs/components/BackLink/BackLink.js +2 -2
  7. package/build/cjs/components/Button/Button.d.ts +0 -1
  8. package/build/cjs/components/DefaultVideo/DefaultVideo.css +5 -0
  9. package/build/cjs/components/DefaultVideo/DefaultVideo.d.ts +11 -0
  10. package/build/cjs/components/DefaultVideo/DefaultVideo.js +60 -0
  11. package/build/cjs/components/FileLink/FileLink.js +2 -2
  12. package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +2 -1
  13. package/build/cjs/components/FullscreenImage/FullscreenImage.js +2 -2
  14. package/build/cjs/components/Image/Image.js +2 -2
  15. package/build/cjs/components/Link/Link.js +4 -4
  16. package/build/cjs/components/Media/Video/Video.css +0 -5
  17. package/build/cjs/components/Media/Video/Video.js +3 -7
  18. package/build/cjs/components/Title/Title.d.ts +2 -1
  19. package/build/cjs/components/Title/Title.js +2 -2
  20. package/build/cjs/components/Title/TitleItem.css +3 -3
  21. package/build/cjs/components/YandexForm/YandexForm.d.ts +17 -2
  22. package/build/cjs/components/YandexForm/YandexForm.js +4 -6
  23. package/build/cjs/constructor-items.d.ts +0 -1
  24. package/build/cjs/constructor-items.js +0 -1
  25. package/build/cjs/models/constructor-items/blocks.d.ts +6 -31
  26. package/build/cjs/models/constructor-items/blocks.js +1 -13
  27. package/build/cjs/models/constructor-items/common.d.ts +6 -19
  28. package/build/cjs/models/guards.d.ts +1 -3
  29. package/build/cjs/models/guards.js +1 -9
  30. package/build/cjs/models/navigation.d.ts +1 -0
  31. package/build/cjs/navigation/components/Logo/Logo.css +1 -0
  32. package/build/cjs/navigation/components/Logo/Logo.js +10 -5
  33. package/build/cjs/schema/constants.js +1 -2
  34. package/build/cjs/schema/validators/blocks.d.ts +0 -1
  35. package/build/cjs/schema/validators/blocks.js +0 -1
  36. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +5 -2
  37. package/build/cjs/sub-blocks/Content/Content.js +12 -5
  38. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +10 -10
  39. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -0
  40. package/build/cjs/sub-blocks/Quote/Quote.css +0 -2
  41. package/build/esm/blocks/Header/Header.js +6 -2
  42. package/build/esm/blocks/Tabs/Tabs.js +8 -1
  43. package/build/esm/blocks/index.d.ts +0 -1
  44. package/build/esm/blocks/index.js +0 -1
  45. package/build/esm/components/BackLink/BackLink.d.ts +3 -2
  46. package/build/esm/components/BackLink/BackLink.js +2 -2
  47. package/build/esm/components/Button/Button.d.ts +0 -1
  48. package/build/esm/components/DefaultVideo/DefaultVideo.css +5 -0
  49. package/build/esm/components/DefaultVideo/DefaultVideo.d.ts +12 -0
  50. package/build/esm/components/DefaultVideo/DefaultVideo.js +57 -0
  51. package/build/esm/components/FileLink/FileLink.js +2 -2
  52. package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +2 -1
  53. package/build/esm/components/FullscreenImage/FullscreenImage.js +2 -2
  54. package/build/esm/components/Image/Image.js +3 -2
  55. package/build/esm/components/Link/Link.js +4 -4
  56. package/build/esm/components/Media/Video/Video.css +0 -5
  57. package/build/esm/components/Media/Video/Video.js +3 -7
  58. package/build/esm/components/Title/Title.d.ts +2 -1
  59. package/build/esm/components/Title/Title.js +2 -2
  60. package/build/esm/components/Title/TitleItem.css +3 -3
  61. package/build/esm/components/YandexForm/YandexForm.d.ts +17 -2
  62. package/build/esm/components/YandexForm/YandexForm.js +3 -5
  63. package/build/esm/constructor-items.d.ts +0 -1
  64. package/build/esm/constructor-items.js +1 -2
  65. package/build/esm/models/constructor-items/blocks.d.ts +6 -31
  66. package/build/esm/models/constructor-items/blocks.js +0 -12
  67. package/build/esm/models/constructor-items/common.d.ts +6 -19
  68. package/build/esm/models/guards.d.ts +1 -3
  69. package/build/esm/models/guards.js +1 -7
  70. package/build/esm/models/navigation.d.ts +1 -0
  71. package/build/esm/navigation/components/Logo/Logo.css +1 -0
  72. package/build/esm/navigation/components/Logo/Logo.js +11 -6
  73. package/build/esm/schema/constants.js +2 -3
  74. package/build/esm/schema/validators/blocks.d.ts +0 -1
  75. package/build/esm/schema/validators/blocks.js +0 -1
  76. package/build/esm/sub-blocks/BasicCard/BasicCard.js +5 -2
  77. package/build/esm/sub-blocks/Content/Content.js +12 -5
  78. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +10 -10
  79. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -0
  80. package/build/esm/sub-blocks/Quote/Quote.css +0 -2
  81. package/package.json +1 -1
  82. package/server/models/constructor-items/blocks.d.ts +6 -31
  83. package/server/models/constructor-items/blocks.js +1 -13
  84. package/server/models/constructor-items/common.d.ts +6 -19
  85. package/server/models/guards.d.ts +1 -3
  86. package/server/models/guards.js +1 -9
  87. package/server/models/navigation.d.ts +1 -0
  88. package/widget/index.js +1 -1
  89. package/build/cjs/blocks/Form/Form.css +0 -136
  90. package/build/cjs/blocks/Form/Form.d.ts +0 -4
  91. package/build/cjs/blocks/Form/Form.js +0 -61
  92. package/build/cjs/blocks/Form/HubspotInlineForm.d.ts +0 -7
  93. package/build/cjs/blocks/Form/HubspotInlineForm.js +0 -14
  94. package/build/cjs/blocks/Form/InnerForm/InnerForm.d.ts +0 -9
  95. package/build/cjs/blocks/Form/InnerForm/InnerForm.js +0 -28
  96. package/build/cjs/blocks/Form/schema.d.ts +0 -202
  97. package/build/cjs/blocks/Form/schema.js +0 -44
  98. package/build/cjs/components/YandexForm/schema.d.ts +0 -16
  99. package/build/cjs/components/YandexForm/schema.js +0 -13
  100. package/build/cjs/editor/data/templates/form-block.json +0 -20
  101. package/build/cjs/sub-blocks/HubspotForm/schema.d.ts +0 -22
  102. package/build/cjs/sub-blocks/HubspotForm/schema.js +0 -17
  103. package/build/esm/blocks/Form/Form.css +0 -136
  104. package/build/esm/blocks/Form/Form.d.ts +0 -5
  105. package/build/esm/blocks/Form/Form.js +0 -59
  106. package/build/esm/blocks/Form/HubspotInlineForm.d.ts +0 -7
  107. package/build/esm/blocks/Form/HubspotInlineForm.js +0 -12
  108. package/build/esm/blocks/Form/InnerForm/InnerForm.d.ts +0 -9
  109. package/build/esm/blocks/Form/InnerForm/InnerForm.js +0 -26
  110. package/build/esm/blocks/Form/schema.d.ts +0 -202
  111. package/build/esm/blocks/Form/schema.js +0 -40
  112. package/build/esm/components/YandexForm/schema.d.ts +0 -16
  113. package/build/esm/components/YandexForm/schema.js +0 -10
  114. package/build/esm/editor/data/templates/form-block.json +0 -20
  115. package/build/esm/sub-blocks/HubspotForm/schema.d.ts +0 -22
  116. package/build/esm/sub-blocks/HubspotForm/schema.js +0 -14
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormBlockDirection = exports.FormBlockDataTypes = exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
3
+ 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,7 +21,6 @@ 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";
25
24
  })(BlockType = exports.BlockType || (exports.BlockType = {}));
26
25
  exports.BlockTypes = Object.values(BlockType);
27
26
  exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
@@ -45,14 +44,3 @@ var PCShareSocialNetwork;
45
44
  PCShareSocialNetwork["Facebook"] = "facebook";
46
45
  PCShareSocialNetwork["LinkedIn"] = "linkedin";
47
46
  })(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
- import React, { CSSProperties, ReactNode } from 'react';
1
+ import React, { CSSProperties, HTMLProps, ReactNode } from 'react';
2
2
  import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
3
3
  import { ThemeSupporting } from '../../utils';
4
- import { AnalyticsEventsBase, ClassNameProps, PixelEvent, PixelEventType, QAProps } from '../common';
4
+ import { AnalyticsEventsBase, ClassNameProps, PixelEventType, QAProps } from '../common';
5
5
  export declare enum AuthorType {
6
6
  Column = "column",
7
7
  Line = "line"
@@ -95,7 +95,7 @@ interface LoopProps {
95
95
  start: number;
96
96
  end?: number;
97
97
  }
98
- export interface ImageInfoProps {
98
+ export interface ImageInfoProps extends Pick<HTMLProps<HTMLImageElement>, 'aria-describedby'> {
99
99
  alt?: string;
100
100
  disableCompress?: boolean;
101
101
  }
@@ -138,6 +138,7 @@ export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
138
138
  target?: string;
139
139
  metrikaGoals?: MetrikaGoal;
140
140
  pixelEvents?: ButtonPixel;
141
+ extraProps?: HTMLProps<HTMLAnchorElement>;
141
142
  }
142
143
  export interface FileLinkProps extends ClassNameProps, Tabbable {
143
144
  href: string;
@@ -147,11 +148,13 @@ export interface FileLinkProps extends ClassNameProps, Tabbable {
147
148
  theme?: ContentTheme;
148
149
  urlTitle?: string;
149
150
  onClick?: () => void;
151
+ extraProps?: HTMLProps<HTMLAnchorElement>;
150
152
  }
151
153
  export type ButtonTheme = ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
152
154
  export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {
153
155
  text: string;
154
156
  url: string;
157
+ urlTitle?: string;
155
158
  primary?: boolean;
156
159
  theme?: ButtonTheme;
157
160
  img?: ButtonImageProps | string;
@@ -337,20 +340,4 @@ export interface TitleProps {
337
340
  title?: TitleItemProps | string;
338
341
  subtitle?: string;
339
342
  }
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
- }
356
343
  export {};
@@ -1,6 +1,4 @@
1
- import { Block, ConstructorItem, FormBlockData, FormBlockHubspotData, FormBlockYandexData } from './';
1
+ import { Block, ConstructorItem } 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.isHubspotDataForm = exports.isYandexDataForm = exports.isNewMetrikaFormat = exports.isBlock = void 0;
3
+ 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,11 +10,3 @@ 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;
@@ -62,6 +62,7 @@ export interface NavigationLogoData {
62
62
  icon: ImageProps;
63
63
  text?: string;
64
64
  url?: string;
65
+ urlTitle?: string;
65
66
  }
66
67
  export type ThemedNavigationLogoData = NavigationLogoData & ThemeSupporting<NavigationLogoData>;
67
68
  export interface HeaderData {