@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.
- package/build/cjs/blocks/Header/Header.js +6 -2
- package/build/cjs/blocks/Tabs/Tabs.js +8 -1
- package/build/cjs/blocks/index.d.ts +0 -1
- package/build/cjs/blocks/index.js +1 -3
- package/build/cjs/components/BackLink/BackLink.d.ts +3 -2
- package/build/cjs/components/BackLink/BackLink.js +2 -2
- package/build/cjs/components/Button/Button.d.ts +0 -1
- package/build/cjs/components/DefaultVideo/DefaultVideo.css +5 -0
- package/build/cjs/components/DefaultVideo/DefaultVideo.d.ts +11 -0
- package/build/cjs/components/DefaultVideo/DefaultVideo.js +60 -0
- package/build/cjs/components/FileLink/FileLink.js +2 -2
- package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +2 -1
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +2 -2
- package/build/cjs/components/Image/Image.js +2 -2
- package/build/cjs/components/Link/Link.js +4 -4
- package/build/cjs/components/Media/Video/Video.css +0 -5
- package/build/cjs/components/Media/Video/Video.js +3 -7
- package/build/cjs/components/Title/Title.d.ts +2 -1
- package/build/cjs/components/Title/Title.js +2 -2
- package/build/cjs/components/Title/TitleItem.css +3 -3
- package/build/cjs/components/YandexForm/YandexForm.d.ts +17 -2
- package/build/cjs/components/YandexForm/YandexForm.js +4 -6
- package/build/cjs/constructor-items.d.ts +0 -1
- package/build/cjs/constructor-items.js +0 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +6 -31
- package/build/cjs/models/constructor-items/blocks.js +1 -13
- package/build/cjs/models/constructor-items/common.d.ts +6 -19
- package/build/cjs/models/guards.d.ts +1 -3
- package/build/cjs/models/guards.js +1 -9
- package/build/cjs/models/navigation.d.ts +1 -0
- package/build/cjs/navigation/components/Logo/Logo.css +1 -0
- package/build/cjs/navigation/components/Logo/Logo.js +10 -5
- package/build/cjs/schema/constants.js +1 -2
- package/build/cjs/schema/validators/blocks.d.ts +0 -1
- package/build/cjs/schema/validators/blocks.js +0 -1
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +5 -2
- package/build/cjs/sub-blocks/Content/Content.js +12 -5
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +10 -10
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -0
- package/build/cjs/sub-blocks/Quote/Quote.css +0 -2
- package/build/esm/blocks/Header/Header.js +6 -2
- package/build/esm/blocks/Tabs/Tabs.js +8 -1
- package/build/esm/blocks/index.d.ts +0 -1
- package/build/esm/blocks/index.js +0 -1
- package/build/esm/components/BackLink/BackLink.d.ts +3 -2
- package/build/esm/components/BackLink/BackLink.js +2 -2
- package/build/esm/components/Button/Button.d.ts +0 -1
- package/build/esm/components/DefaultVideo/DefaultVideo.css +5 -0
- package/build/esm/components/DefaultVideo/DefaultVideo.d.ts +12 -0
- package/build/esm/components/DefaultVideo/DefaultVideo.js +57 -0
- package/build/esm/components/FileLink/FileLink.js +2 -2
- package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +2 -1
- package/build/esm/components/FullscreenImage/FullscreenImage.js +2 -2
- package/build/esm/components/Image/Image.js +3 -2
- package/build/esm/components/Link/Link.js +4 -4
- package/build/esm/components/Media/Video/Video.css +0 -5
- package/build/esm/components/Media/Video/Video.js +3 -7
- package/build/esm/components/Title/Title.d.ts +2 -1
- package/build/esm/components/Title/Title.js +2 -2
- package/build/esm/components/Title/TitleItem.css +3 -3
- package/build/esm/components/YandexForm/YandexForm.d.ts +17 -2
- package/build/esm/components/YandexForm/YandexForm.js +3 -5
- package/build/esm/constructor-items.d.ts +0 -1
- package/build/esm/constructor-items.js +1 -2
- package/build/esm/models/constructor-items/blocks.d.ts +6 -31
- package/build/esm/models/constructor-items/blocks.js +0 -12
- package/build/esm/models/constructor-items/common.d.ts +6 -19
- package/build/esm/models/guards.d.ts +1 -3
- package/build/esm/models/guards.js +1 -7
- package/build/esm/models/navigation.d.ts +1 -0
- package/build/esm/navigation/components/Logo/Logo.css +1 -0
- package/build/esm/navigation/components/Logo/Logo.js +11 -6
- package/build/esm/schema/constants.js +2 -3
- package/build/esm/schema/validators/blocks.d.ts +0 -1
- package/build/esm/schema/validators/blocks.js +0 -1
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +5 -2
- package/build/esm/sub-blocks/Content/Content.js +12 -5
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +10 -10
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -0
- package/build/esm/sub-blocks/Quote/Quote.css +0 -2
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +6 -31
- package/server/models/constructor-items/blocks.js +1 -13
- package/server/models/constructor-items/common.d.ts +6 -19
- package/server/models/guards.d.ts +1 -3
- package/server/models/guards.js +1 -9
- package/server/models/navigation.d.ts +1 -0
- package/widget/index.js +1 -1
- package/build/cjs/blocks/Form/Form.css +0 -136
- package/build/cjs/blocks/Form/Form.d.ts +0 -4
- package/build/cjs/blocks/Form/Form.js +0 -61
- package/build/cjs/blocks/Form/HubspotInlineForm.d.ts +0 -7
- package/build/cjs/blocks/Form/HubspotInlineForm.js +0 -14
- package/build/cjs/blocks/Form/InnerForm/InnerForm.d.ts +0 -9
- package/build/cjs/blocks/Form/InnerForm/InnerForm.js +0 -28
- package/build/cjs/blocks/Form/schema.d.ts +0 -202
- package/build/cjs/blocks/Form/schema.js +0 -44
- package/build/cjs/components/YandexForm/schema.d.ts +0 -16
- package/build/cjs/components/YandexForm/schema.js +0 -13
- package/build/cjs/editor/data/templates/form-block.json +0 -20
- package/build/cjs/sub-blocks/HubspotForm/schema.d.ts +0 -22
- package/build/cjs/sub-blocks/HubspotForm/schema.js +0 -17
- package/build/esm/blocks/Form/Form.css +0 -136
- package/build/esm/blocks/Form/Form.d.ts +0 -5
- package/build/esm/blocks/Form/Form.js +0 -59
- package/build/esm/blocks/Form/HubspotInlineForm.d.ts +0 -7
- package/build/esm/blocks/Form/HubspotInlineForm.js +0 -12
- package/build/esm/blocks/Form/InnerForm/InnerForm.d.ts +0 -9
- package/build/esm/blocks/Form/InnerForm/InnerForm.js +0 -26
- package/build/esm/blocks/Form/schema.d.ts +0 -202
- package/build/esm/blocks/Form/schema.js +0 -40
- package/build/esm/components/YandexForm/schema.d.ts +0 -16
- package/build/esm/components/YandexForm/schema.js +0 -10
- package/build/esm/editor/data/templates/form-block.json +0 -20
- package/build/esm/sub-blocks/HubspotForm/schema.d.ts +0 -22
- 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.
|
|
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,
|
|
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
|
|
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;
|
package/server/models/guards.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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;
|