@gravity-ui/page-constructor 4.51.1 → 4.51.2-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.
- package/README.md +5 -3
- package/build/cjs/blocks/Banner/schema.d.ts +0 -264
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
- package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/FilterBlock/i18n/index.js +4 -3
- package/build/cjs/blocks/Map/schema.d.ts +0 -88
- package/build/cjs/blocks/Media/schema.d.ts +0 -176
- package/build/cjs/blocks/Security/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Security/i18n/index.js +4 -3
- package/build/cjs/blocks/Share/Share.js +4 -4
- package/build/cjs/blocks/Share/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Share/i18n/index.js +4 -3
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
- package/build/cjs/blocks/Slider/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Slider/i18n/index.js +4 -3
- package/build/cjs/components/Button/Button.js +4 -7
- package/build/cjs/components/Button/i18n/index.d.ts +1 -2
- package/build/cjs/components/Button/i18n/index.js +4 -3
- package/build/cjs/components/CardBase/CardBase.d.ts +1 -3
- package/build/cjs/components/CardBase/CardBase.js +1 -4
- package/build/cjs/components/Control/Control.js +2 -2
- package/build/cjs/components/Control/i18n/index.d.ts +1 -2
- package/build/cjs/components/Control/i18n/index.js +4 -3
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -3
- package/build/cjs/components/FullscreenImage/i18n/index.d.ts +1 -2
- package/build/cjs/components/FullscreenImage/i18n/index.js +4 -3
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
- package/build/cjs/components/Link/Link.js +1 -4
- package/build/cjs/components/Map/GoogleMap.js +2 -2
- package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
- package/build/cjs/components/Map/YMap/i18n/index.d.ts +1 -2
- package/build/cjs/components/Map/YMap/i18n/index.js +4 -3
- package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
- package/build/cjs/components/Media/DataLens/i18n/index.d.ts +1 -2
- package/build/cjs/components/Media/DataLens/i18n/index.js +4 -3
- package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
- package/build/cjs/components/Media/Iframe/i18n/index.d.ts +1 -2
- package/build/cjs/components/Media/Iframe/i18n/index.js +4 -3
- package/build/cjs/components/Media/Media.js +1 -3
- package/build/cjs/components/Media/Video/Video.js +2 -3
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
- package/build/cjs/components/OverflowScroller/i18n/index.d.ts +1 -2
- package/build/cjs/components/OverflowScroller/i18n/index.js +4 -3
- package/build/cjs/components/ReactPlayer/CustomBarControls.js +3 -3
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +5 -29
- package/build/cjs/components/ReactPlayer/i18n/index.d.ts +1 -2
- package/build/cjs/components/ReactPlayer/i18n/index.js +4 -3
- package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
- package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +1 -2
- package/build/cjs/components/UnpublishedLabel/i18n/index.js +4 -3
- package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
- package/build/cjs/components/VideoBlock/i18n/index.d.ts +1 -2
- package/build/cjs/components/VideoBlock/i18n/index.js +4 -3
- package/build/cjs/components/YandexForm/YandexForm.js +2 -13
- package/build/cjs/containers/Loadable/Loadable.js +2 -2
- package/build/cjs/containers/Loadable/i18n/index.d.ts +1 -2
- package/build/cjs/containers/Loadable/i18n/index.js +4 -3
- package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/cjs/containers/PageConstructor/Provider.js +1 -3
- package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
- package/build/cjs/context/localeContext/localeContext.js +2 -2
- package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
- package/build/cjs/editor/components/ControlPanel/i18n/en.json +2 -1
- package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/ControlPanel/i18n/index.js +4 -3
- package/build/cjs/editor/components/ControlPanel/i18n/ru.json +2 -1
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +4 -3
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +4 -3
- package/build/cjs/hooks/useAnalytics.d.ts +2 -2
- package/build/cjs/hooks/useMetrika.d.ts +1 -13
- package/build/cjs/hooks/useMetrika.js +0 -41
- package/build/cjs/models/common.d.ts +2 -53
- package/build/cjs/models/common.js +1 -25
- package/build/cjs/models/constructor-items/common.d.ts +2 -28
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -3
- package/build/cjs/models/guards.d.ts +0 -2
- package/build/cjs/models/guards.js +1 -5
- package/build/cjs/schema/constants.d.ts +0 -176
- package/build/cjs/schema/validators/common.d.ts +0 -188
- package/build/cjs/schema/validators/common.js +0 -31
- package/build/cjs/schema/validators/index.d.ts +0 -2
- package/build/cjs/schema/validators/index.js +0 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/cjs/sub-blocks/PriceCard/schema.d.ts +0 -88
- package/build/cjs/text-transform/common.d.ts +4 -4
- package/build/cjs/text-transform/transformers.d.ts +2 -2
- package/build/cjs/text-transform/utils.d.ts +6 -6
- package/build/cjs/text-transform/utils.js +5 -5
- package/build/cjs/utils/index.d.ts +0 -1
- package/build/cjs/utils/index.js +1 -4
- package/build/esm/blocks/Banner/schema.d.ts +0 -264
- package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
- package/build/esm/blocks/FilterBlock/i18n/index.d.ts +1 -2
- package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
- package/build/esm/blocks/Map/schema.d.ts +0 -88
- package/build/esm/blocks/Media/schema.d.ts +0 -176
- package/build/esm/blocks/Security/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Security/i18n/index.js +3 -3
- package/build/esm/blocks/Share/Share.js +1 -1
- package/build/esm/blocks/Share/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Share/i18n/index.js +3 -3
- package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/esm/blocks/Slider/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Slider/i18n/index.js +3 -3
- package/build/esm/components/Button/Button.js +3 -6
- package/build/esm/components/Button/i18n/index.d.ts +1 -2
- package/build/esm/components/Button/i18n/index.js +3 -3
- package/build/esm/components/CardBase/CardBase.d.ts +1 -3
- package/build/esm/components/CardBase/CardBase.js +1 -4
- package/build/esm/components/Control/Control.js +1 -1
- package/build/esm/components/Control/i18n/index.d.ts +1 -2
- package/build/esm/components/Control/i18n/index.js +3 -3
- package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
- package/build/esm/components/FullscreenImage/i18n/index.d.ts +1 -2
- package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
- package/build/esm/components/Link/Link.js +1 -4
- package/build/esm/components/Map/GoogleMap.js +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js +1 -1
- package/build/esm/components/Map/YMap/i18n/index.d.ts +1 -2
- package/build/esm/components/Map/YMap/i18n/index.js +3 -3
- package/build/esm/components/Media/DataLens/DataLens.js +1 -1
- package/build/esm/components/Media/DataLens/i18n/index.d.ts +1 -2
- package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
- package/build/esm/components/Media/Iframe/Iframe.js +1 -1
- package/build/esm/components/Media/Iframe/i18n/index.d.ts +1 -2
- package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
- package/build/esm/components/Media/Media.js +1 -3
- package/build/esm/components/Media/Video/Video.js +2 -3
- package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
- package/build/esm/components/OverflowScroller/i18n/index.d.ts +1 -2
- package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
- package/build/esm/components/ReactPlayer/CustomBarControls.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -28
- package/build/esm/components/ReactPlayer/i18n/index.d.ts +1 -2
- package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
- package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
- package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +1 -2
- package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
- package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
- package/build/esm/components/VideoBlock/i18n/index.d.ts +1 -2
- package/build/esm/components/VideoBlock/i18n/index.js +3 -3
- package/build/esm/components/YandexForm/YandexForm.js +2 -13
- package/build/esm/containers/Loadable/Loadable.js +1 -1
- package/build/esm/containers/Loadable/i18n/index.d.ts +1 -2
- package/build/esm/containers/Loadable/i18n/index.js +3 -3
- package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/esm/containers/PageConstructor/Provider.js +1 -3
- package/build/esm/context/localeContext/localeContext.d.ts +2 -2
- package/build/esm/context/localeContext/localeContext.js +1 -1
- package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
- package/build/esm/editor/components/ControlPanel/i18n/en.json +2 -1
- package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
- package/build/esm/editor/components/ControlPanel/i18n/ru.json +2 -1
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
- package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
- package/build/esm/hooks/useAnalytics.d.ts +2 -2
- package/build/esm/hooks/useMetrika.d.ts +1 -13
- package/build/esm/hooks/useMetrika.js +1 -38
- package/build/esm/models/common.d.ts +2 -53
- package/build/esm/models/common.js +0 -24
- package/build/esm/models/constructor-items/common.d.ts +2 -28
- package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -3
- package/build/esm/models/guards.d.ts +0 -2
- package/build/esm/models/guards.js +0 -3
- package/build/esm/schema/constants.d.ts +0 -176
- package/build/esm/schema/validators/common.d.ts +0 -188
- package/build/esm/schema/validators/common.js +0 -31
- package/build/esm/schema/validators/index.d.ts +0 -2
- package/build/esm/schema/validators/index.js +0 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/esm/sub-blocks/PriceCard/schema.d.ts +0 -88
- package/build/esm/text-transform/common.d.ts +4 -4
- package/build/esm/text-transform/transformers.d.ts +2 -2
- package/build/esm/text-transform/utils.d.ts +6 -6
- package/build/esm/text-transform/utils.js +1 -1
- package/build/esm/utils/index.d.ts +0 -1
- package/build/esm/utils/index.js +0 -1
- package/package.json +1 -1
- package/server/models/common.d.ts +2 -53
- package/server/models/common.js +1 -25
- package/server/models/constructor-items/common.d.ts +2 -28
- package/server/models/constructor-items/sub-blocks.d.ts +2 -3
- package/server/models/guards.d.ts +0 -2
- package/server/models/guards.js +1 -5
- package/server/text-transform/common.d.ts +4 -4
- package/server/text-transform/transformers.d.ts +2 -2
- package/server/text-transform/utils.d.ts +6 -6
- package/server/text-transform/utils.js +5 -5
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +1 -4
- package/widget/index.js +1 -1
- package/build/cjs/context/metrikaContext/index.d.ts +0 -1
- package/build/cjs/context/metrikaContext/index.js +0 -4
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -13
- package/build/cjs/context/metrikaContext/metrikaContext.js +0 -6
- package/build/cjs/i18n.d.ts +0 -2
- package/build/cjs/i18n.js +0 -12
- package/build/cjs/schema/validators/pixel.d.ts +0 -57
- package/build/cjs/schema/validators/pixel.js +0 -63
- package/build/cjs/utils/configure.d.ts +0 -12
- package/build/cjs/utils/configure.js +0 -26
- package/build/cjs/utils/registerKeyset.d.ts +0 -5
- package/build/cjs/utils/registerKeyset.js +0 -9
- package/build/esm/context/metrikaContext/index.d.ts +0 -1
- package/build/esm/context/metrikaContext/index.js +0 -1
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -13
- package/build/esm/context/metrikaContext/metrikaContext.js +0 -2
- package/build/esm/i18n.d.ts +0 -2
- package/build/esm/i18n.js +0 -9
- package/build/esm/schema/validators/pixel.d.ts +0 -57
- package/build/esm/schema/validators/pixel.js +0 -60
- package/build/esm/utils/configure.d.ts +0 -12
- package/build/esm/utils/configure.js +0 -20
- package/build/esm/utils/registerKeyset.d.ts +0 -5
- package/build/esm/utils/registerKeyset.js +0 -5
- package/server/utils/configure.d.ts +0 -12
- package/server/utils/configure.js +0 -26
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Block, ConstructorItem, FormBlockData, FormBlockHubspotData, FormBlockYandexData } from './';
|
|
2
|
-
import { MetrikaGoal, NewMetrikaGoal } from './index';
|
|
3
2
|
export declare function isBlock(block: ConstructorItem): block is Block;
|
|
4
|
-
export declare function isNewMetrikaFormat(metrika: MetrikaGoal): metrika is NewMetrikaGoal[];
|
|
5
3
|
export declare function isYandexDataForm(data: FormBlockData): data is FormBlockYandexData;
|
|
6
4
|
export declare function isHubspotDataForm(data: FormBlockData): data is FormBlockHubspotData;
|
|
@@ -2,9 +2,6 @@ import { BlockTypes, } from './';
|
|
|
2
2
|
export function isBlock(block) {
|
|
3
3
|
return block.type in BlockTypes;
|
|
4
4
|
}
|
|
5
|
-
export function isNewMetrikaFormat(metrika) {
|
|
6
|
-
return Boolean(Array.isArray(metrika) && metrika.length && typeof metrika[0] === 'object');
|
|
7
|
-
}
|
|
8
5
|
export function isYandexDataForm(data) {
|
|
9
6
|
return Boolean(data.yandex);
|
|
10
7
|
}
|
|
@@ -78,94 +78,6 @@ export declare const cardSchemas: {
|
|
|
78
78
|
optionName: string;
|
|
79
79
|
})[];
|
|
80
80
|
};
|
|
81
|
-
metrikaGoals: {
|
|
82
|
-
oneOf: ({
|
|
83
|
-
type: string;
|
|
84
|
-
optionName: string;
|
|
85
|
-
items?: undefined;
|
|
86
|
-
} | {
|
|
87
|
-
type: string;
|
|
88
|
-
items: {
|
|
89
|
-
type: string;
|
|
90
|
-
additionalProperties?: undefined;
|
|
91
|
-
required?: undefined;
|
|
92
|
-
properties?: undefined;
|
|
93
|
-
};
|
|
94
|
-
optionName: string;
|
|
95
|
-
} | {
|
|
96
|
-
type: string;
|
|
97
|
-
items: {
|
|
98
|
-
type: string;
|
|
99
|
-
additionalProperties: boolean;
|
|
100
|
-
required: string[];
|
|
101
|
-
properties: {
|
|
102
|
-
name: {
|
|
103
|
-
type: string;
|
|
104
|
-
};
|
|
105
|
-
isCrossSite: {
|
|
106
|
-
type: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
optionName: string;
|
|
111
|
-
})[];
|
|
112
|
-
};
|
|
113
|
-
pixelEvents: {
|
|
114
|
-
type: string;
|
|
115
|
-
items: {
|
|
116
|
-
type: string;
|
|
117
|
-
required: string[];
|
|
118
|
-
additionalProperties: boolean;
|
|
119
|
-
properties: {
|
|
120
|
-
name: {
|
|
121
|
-
type: string;
|
|
122
|
-
enum: import("../models").PixelEventType[];
|
|
123
|
-
};
|
|
124
|
-
data: {};
|
|
125
|
-
};
|
|
126
|
-
select: {
|
|
127
|
-
$data: string;
|
|
128
|
-
};
|
|
129
|
-
selectCases: {
|
|
130
|
-
SubmitApplication: {
|
|
131
|
-
additionalProperties: boolean;
|
|
132
|
-
properties: {
|
|
133
|
-
name: {};
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
Contact: {
|
|
137
|
-
additionalProperties: boolean;
|
|
138
|
-
properties: {
|
|
139
|
-
name: {};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
Lead: {
|
|
143
|
-
additionalProperties: boolean;
|
|
144
|
-
properties: {
|
|
145
|
-
name: {};
|
|
146
|
-
data: {
|
|
147
|
-
type: string;
|
|
148
|
-
additionalProperties: boolean;
|
|
149
|
-
properties: {
|
|
150
|
-
content_category: {
|
|
151
|
-
type: string;
|
|
152
|
-
};
|
|
153
|
-
content_name: {
|
|
154
|
-
type: string;
|
|
155
|
-
};
|
|
156
|
-
currency: {
|
|
157
|
-
type: string;
|
|
158
|
-
};
|
|
159
|
-
value: {
|
|
160
|
-
type: string;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
81
|
analyticsEvents: {
|
|
170
82
|
oneOf: ({
|
|
171
83
|
optionName: string;
|
|
@@ -1066,94 +978,6 @@ export declare const cardSchemas: {
|
|
|
1066
978
|
optionName: string;
|
|
1067
979
|
})[];
|
|
1068
980
|
};
|
|
1069
|
-
metrikaGoals: {
|
|
1070
|
-
oneOf: ({
|
|
1071
|
-
type: string;
|
|
1072
|
-
optionName: string;
|
|
1073
|
-
items?: undefined;
|
|
1074
|
-
} | {
|
|
1075
|
-
type: string;
|
|
1076
|
-
items: {
|
|
1077
|
-
type: string;
|
|
1078
|
-
additionalProperties?: undefined;
|
|
1079
|
-
required?: undefined;
|
|
1080
|
-
properties?: undefined;
|
|
1081
|
-
};
|
|
1082
|
-
optionName: string;
|
|
1083
|
-
} | {
|
|
1084
|
-
type: string;
|
|
1085
|
-
items: {
|
|
1086
|
-
type: string;
|
|
1087
|
-
additionalProperties: boolean;
|
|
1088
|
-
required: string[];
|
|
1089
|
-
properties: {
|
|
1090
|
-
name: {
|
|
1091
|
-
type: string;
|
|
1092
|
-
};
|
|
1093
|
-
isCrossSite: {
|
|
1094
|
-
type: string;
|
|
1095
|
-
};
|
|
1096
|
-
};
|
|
1097
|
-
};
|
|
1098
|
-
optionName: string;
|
|
1099
|
-
})[];
|
|
1100
|
-
};
|
|
1101
|
-
pixelEvents: {
|
|
1102
|
-
type: string;
|
|
1103
|
-
items: {
|
|
1104
|
-
type: string;
|
|
1105
|
-
required: string[];
|
|
1106
|
-
additionalProperties: boolean;
|
|
1107
|
-
properties: {
|
|
1108
|
-
name: {
|
|
1109
|
-
type: string;
|
|
1110
|
-
enum: import("../models").PixelEventType[];
|
|
1111
|
-
};
|
|
1112
|
-
data: {};
|
|
1113
|
-
};
|
|
1114
|
-
select: {
|
|
1115
|
-
$data: string;
|
|
1116
|
-
};
|
|
1117
|
-
selectCases: {
|
|
1118
|
-
SubmitApplication: {
|
|
1119
|
-
additionalProperties: boolean;
|
|
1120
|
-
properties: {
|
|
1121
|
-
name: {};
|
|
1122
|
-
};
|
|
1123
|
-
};
|
|
1124
|
-
Contact: {
|
|
1125
|
-
additionalProperties: boolean;
|
|
1126
|
-
properties: {
|
|
1127
|
-
name: {};
|
|
1128
|
-
};
|
|
1129
|
-
};
|
|
1130
|
-
Lead: {
|
|
1131
|
-
additionalProperties: boolean;
|
|
1132
|
-
properties: {
|
|
1133
|
-
name: {};
|
|
1134
|
-
data: {
|
|
1135
|
-
type: string;
|
|
1136
|
-
additionalProperties: boolean;
|
|
1137
|
-
properties: {
|
|
1138
|
-
content_category: {
|
|
1139
|
-
type: string;
|
|
1140
|
-
};
|
|
1141
|
-
content_name: {
|
|
1142
|
-
type: string;
|
|
1143
|
-
};
|
|
1144
|
-
currency: {
|
|
1145
|
-
type: string;
|
|
1146
|
-
};
|
|
1147
|
-
value: {
|
|
1148
|
-
type: string;
|
|
1149
|
-
};
|
|
1150
|
-
};
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
};
|
|
1154
|
-
};
|
|
1155
|
-
};
|
|
1156
|
-
};
|
|
1157
981
|
analyticsEvents: {
|
|
1158
982
|
oneOf: ({
|
|
1159
983
|
optionName: string;
|
|
@@ -590,100 +590,6 @@ export declare const ButtonProps: {
|
|
|
590
590
|
optionName: string;
|
|
591
591
|
})[];
|
|
592
592
|
};
|
|
593
|
-
/**
|
|
594
|
-
* @deprecated Metrika will be deleted
|
|
595
|
-
*/
|
|
596
|
-
metrikaGoals: {
|
|
597
|
-
oneOf: ({
|
|
598
|
-
type: string;
|
|
599
|
-
optionName: string;
|
|
600
|
-
items?: undefined;
|
|
601
|
-
} | {
|
|
602
|
-
type: string;
|
|
603
|
-
items: {
|
|
604
|
-
type: string;
|
|
605
|
-
additionalProperties?: undefined;
|
|
606
|
-
required?: undefined;
|
|
607
|
-
properties?: undefined;
|
|
608
|
-
};
|
|
609
|
-
optionName: string;
|
|
610
|
-
} | {
|
|
611
|
-
type: string;
|
|
612
|
-
items: {
|
|
613
|
-
type: string;
|
|
614
|
-
additionalProperties: boolean;
|
|
615
|
-
required: string[];
|
|
616
|
-
properties: {
|
|
617
|
-
name: {
|
|
618
|
-
type: string;
|
|
619
|
-
};
|
|
620
|
-
isCrossSite: {
|
|
621
|
-
type: string;
|
|
622
|
-
};
|
|
623
|
-
};
|
|
624
|
-
};
|
|
625
|
-
optionName: string;
|
|
626
|
-
})[];
|
|
627
|
-
};
|
|
628
|
-
/**
|
|
629
|
-
* @deprecated Pixel will be deleted
|
|
630
|
-
*/
|
|
631
|
-
pixelEvents: {
|
|
632
|
-
type: string;
|
|
633
|
-
items: {
|
|
634
|
-
type: string;
|
|
635
|
-
required: string[];
|
|
636
|
-
additionalProperties: boolean;
|
|
637
|
-
properties: {
|
|
638
|
-
name: {
|
|
639
|
-
type: string;
|
|
640
|
-
enum: import("../../models").PixelEventType[];
|
|
641
|
-
};
|
|
642
|
-
data: {};
|
|
643
|
-
};
|
|
644
|
-
select: {
|
|
645
|
-
$data: string;
|
|
646
|
-
};
|
|
647
|
-
selectCases: {
|
|
648
|
-
SubmitApplication: {
|
|
649
|
-
additionalProperties: boolean;
|
|
650
|
-
properties: {
|
|
651
|
-
name: {};
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
Contact: {
|
|
655
|
-
additionalProperties: boolean;
|
|
656
|
-
properties: {
|
|
657
|
-
name: {};
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
Lead: {
|
|
661
|
-
additionalProperties: boolean;
|
|
662
|
-
properties: {
|
|
663
|
-
name: {};
|
|
664
|
-
data: {
|
|
665
|
-
type: string;
|
|
666
|
-
additionalProperties: boolean;
|
|
667
|
-
properties: {
|
|
668
|
-
content_category: {
|
|
669
|
-
type: string;
|
|
670
|
-
};
|
|
671
|
-
content_name: {
|
|
672
|
-
type: string;
|
|
673
|
-
};
|
|
674
|
-
currency: {
|
|
675
|
-
type: string;
|
|
676
|
-
};
|
|
677
|
-
value: {
|
|
678
|
-
type: string;
|
|
679
|
-
};
|
|
680
|
-
};
|
|
681
|
-
};
|
|
682
|
-
};
|
|
683
|
-
};
|
|
684
|
-
};
|
|
685
|
-
};
|
|
686
|
-
};
|
|
687
593
|
analyticsEvents: {
|
|
688
594
|
oneOf: ({
|
|
689
595
|
optionName: string;
|
|
@@ -933,100 +839,6 @@ export declare const ButtonBlock: {
|
|
|
933
839
|
optionName: string;
|
|
934
840
|
})[];
|
|
935
841
|
};
|
|
936
|
-
/**
|
|
937
|
-
* @deprecated Metrika will be deleted
|
|
938
|
-
*/
|
|
939
|
-
metrikaGoals: {
|
|
940
|
-
oneOf: ({
|
|
941
|
-
type: string;
|
|
942
|
-
optionName: string;
|
|
943
|
-
items?: undefined;
|
|
944
|
-
} | {
|
|
945
|
-
type: string;
|
|
946
|
-
items: {
|
|
947
|
-
type: string;
|
|
948
|
-
additionalProperties?: undefined;
|
|
949
|
-
required?: undefined;
|
|
950
|
-
properties?: undefined;
|
|
951
|
-
};
|
|
952
|
-
optionName: string;
|
|
953
|
-
} | {
|
|
954
|
-
type: string;
|
|
955
|
-
items: {
|
|
956
|
-
type: string;
|
|
957
|
-
additionalProperties: boolean;
|
|
958
|
-
required: string[];
|
|
959
|
-
properties: {
|
|
960
|
-
name: {
|
|
961
|
-
type: string;
|
|
962
|
-
};
|
|
963
|
-
isCrossSite: {
|
|
964
|
-
type: string;
|
|
965
|
-
};
|
|
966
|
-
};
|
|
967
|
-
};
|
|
968
|
-
optionName: string;
|
|
969
|
-
})[];
|
|
970
|
-
};
|
|
971
|
-
/**
|
|
972
|
-
* @deprecated Pixel will be deleted
|
|
973
|
-
*/
|
|
974
|
-
pixelEvents: {
|
|
975
|
-
type: string;
|
|
976
|
-
items: {
|
|
977
|
-
type: string;
|
|
978
|
-
required: string[];
|
|
979
|
-
additionalProperties: boolean;
|
|
980
|
-
properties: {
|
|
981
|
-
name: {
|
|
982
|
-
type: string;
|
|
983
|
-
enum: import("../../models").PixelEventType[];
|
|
984
|
-
};
|
|
985
|
-
data: {};
|
|
986
|
-
};
|
|
987
|
-
select: {
|
|
988
|
-
$data: string;
|
|
989
|
-
};
|
|
990
|
-
selectCases: {
|
|
991
|
-
SubmitApplication: {
|
|
992
|
-
additionalProperties: boolean;
|
|
993
|
-
properties: {
|
|
994
|
-
name: {};
|
|
995
|
-
};
|
|
996
|
-
};
|
|
997
|
-
Contact: {
|
|
998
|
-
additionalProperties: boolean;
|
|
999
|
-
properties: {
|
|
1000
|
-
name: {};
|
|
1001
|
-
};
|
|
1002
|
-
};
|
|
1003
|
-
Lead: {
|
|
1004
|
-
additionalProperties: boolean;
|
|
1005
|
-
properties: {
|
|
1006
|
-
name: {};
|
|
1007
|
-
data: {
|
|
1008
|
-
type: string;
|
|
1009
|
-
additionalProperties: boolean;
|
|
1010
|
-
properties: {
|
|
1011
|
-
content_category: {
|
|
1012
|
-
type: string;
|
|
1013
|
-
};
|
|
1014
|
-
content_name: {
|
|
1015
|
-
type: string;
|
|
1016
|
-
};
|
|
1017
|
-
currency: {
|
|
1018
|
-
type: string;
|
|
1019
|
-
};
|
|
1020
|
-
value: {
|
|
1021
|
-
type: string;
|
|
1022
|
-
};
|
|
1023
|
-
};
|
|
1024
|
-
};
|
|
1025
|
-
};
|
|
1026
|
-
};
|
|
1027
|
-
};
|
|
1028
|
-
};
|
|
1029
|
-
};
|
|
1030
842
|
analyticsEvents: {
|
|
1031
843
|
oneOf: ({
|
|
1032
844
|
optionName: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ImageProps } from '../../components/Image/schema';
|
|
2
2
|
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme, } from '../../models';
|
|
3
3
|
import { AnalyticsEventSchema } from './event';
|
|
4
|
-
import { pixelEvents } from './pixel';
|
|
5
4
|
export const mediaDirection = ['media-content', 'content-media'];
|
|
6
5
|
export const textSize = ['s', 'm', 'l'];
|
|
7
6
|
export const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
|
|
@@ -365,36 +364,6 @@ export const ButtonProps = {
|
|
|
365
364
|
},
|
|
366
365
|
],
|
|
367
366
|
},
|
|
368
|
-
/**
|
|
369
|
-
* @deprecated Metrika will be deleted
|
|
370
|
-
*/
|
|
371
|
-
metrikaGoals: {
|
|
372
|
-
oneOf: [
|
|
373
|
-
{ type: 'string', optionName: 'single' },
|
|
374
|
-
{ type: 'array', items: { type: 'string' }, optionName: 'list' },
|
|
375
|
-
{
|
|
376
|
-
type: 'array',
|
|
377
|
-
items: {
|
|
378
|
-
type: 'object',
|
|
379
|
-
additionalProperties: false,
|
|
380
|
-
required: ['name'],
|
|
381
|
-
properties: {
|
|
382
|
-
name: {
|
|
383
|
-
type: 'string',
|
|
384
|
-
},
|
|
385
|
-
isCrossSite: {
|
|
386
|
-
type: 'boolean',
|
|
387
|
-
},
|
|
388
|
-
},
|
|
389
|
-
},
|
|
390
|
-
optionName: 'list-extended',
|
|
391
|
-
},
|
|
392
|
-
],
|
|
393
|
-
},
|
|
394
|
-
/**
|
|
395
|
-
* @deprecated Pixel will be deleted
|
|
396
|
-
*/
|
|
397
|
-
pixelEvents,
|
|
398
367
|
analyticsEvents: {
|
|
399
368
|
oneOf: [
|
|
400
369
|
Object.assign(Object.assign({}, AnalyticsEventSchema), { optionName: 'single' }),
|
|
@@ -2,7 +2,6 @@ import * as blocks from './blocks';
|
|
|
2
2
|
import * as common from './common';
|
|
3
3
|
import * as components from './components';
|
|
4
4
|
import * as navigation from './navigation';
|
|
5
|
-
import * as pixel from './pixel';
|
|
6
5
|
import * as subBlocks from './sub-blocks';
|
|
7
6
|
import * as utils from './utils';
|
|
8
7
|
export declare const validators: {
|
|
@@ -10,7 +9,6 @@ export declare const validators: {
|
|
|
10
9
|
common: typeof common;
|
|
11
10
|
components: typeof components;
|
|
12
11
|
subBlocks: typeof subBlocks;
|
|
13
|
-
pixel: typeof pixel;
|
|
14
12
|
utils: typeof utils;
|
|
15
13
|
navigation: typeof navigation;
|
|
16
14
|
};
|
|
@@ -2,7 +2,6 @@ import * as blocks from './blocks';
|
|
|
2
2
|
import * as common from './common';
|
|
3
3
|
import * as components from './components';
|
|
4
4
|
import * as navigation from './navigation';
|
|
5
|
-
import * as pixel from './pixel';
|
|
6
5
|
import * as subBlocks from './sub-blocks';
|
|
7
6
|
import * as utils from './utils';
|
|
8
7
|
export const validators = {
|
|
@@ -10,7 +9,6 @@ export const validators = {
|
|
|
10
9
|
common,
|
|
11
10
|
components,
|
|
12
11
|
subBlocks,
|
|
13
|
-
pixel,
|
|
14
12
|
utils,
|
|
15
13
|
navigation,
|
|
16
14
|
};
|
|
@@ -2,17 +2,15 @@ import React, { forwardRef, useContext, useMemo } from 'react';
|
|
|
2
2
|
import { MobileContext } from '../../context/mobileContext';
|
|
3
3
|
import { useTheme } from '../../context/theme';
|
|
4
4
|
import { useAnalytics, useHandleHubspotEvents } from '../../hooks';
|
|
5
|
-
import { useMetrika } from '../../hooks/useMetrika';
|
|
6
5
|
import { DefaultEventNames } from '../../models';
|
|
7
6
|
import { block } from '../../utils';
|
|
8
7
|
import HubspotFormContainer from './HubspotFormContainer';
|
|
9
8
|
import './HubspotForm.css';
|
|
10
9
|
const b = block('hubspot-form');
|
|
11
10
|
const HubspotForm = forwardRef((props, ref) => {
|
|
12
|
-
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
|
|
11
|
+
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
|
|
13
12
|
// hubspotEvents, // TODO: decide how to handle them
|
|
14
13
|
analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
|
|
15
|
-
const handleMetrika = useMetrika();
|
|
16
14
|
const themeValue = useTheme();
|
|
17
15
|
const handleAnalytics = useAnalytics(DefaultEventNames.HubspotFormSubmit);
|
|
18
16
|
const isMobileValue = useContext(MobileContext);
|
|
@@ -24,7 +22,6 @@ const HubspotForm = forwardRef((props, ref) => {
|
|
|
24
22
|
onLoad,
|
|
25
23
|
onSubmitError,
|
|
26
24
|
onSubmit: (event) => {
|
|
27
|
-
handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
|
|
28
25
|
handleAnalytics(analyticsEvents);
|
|
29
26
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
|
|
30
27
|
},
|
|
@@ -32,8 +29,6 @@ const HubspotForm = forwardRef((props, ref) => {
|
|
|
32
29
|
onBeforeLoad,
|
|
33
30
|
onBeforeSubmit,
|
|
34
31
|
onLoad,
|
|
35
|
-
handleMetrika,
|
|
36
|
-
pixelEvents,
|
|
37
32
|
handleAnalytics,
|
|
38
33
|
analyticsEvents,
|
|
39
34
|
onSubmit,
|
|
@@ -8,22 +8,8 @@ export declare const getLayoutItemLinks: (links: LayoutItemProps['content']['lin
|
|
|
8
8
|
colorTheme?: import("../../models").TextTheme | undefined;
|
|
9
9
|
arrow?: boolean | undefined;
|
|
10
10
|
target?: string | undefined;
|
|
11
|
-
metrikaGoals?: import("../../models").MetrikaGoal | undefined;
|
|
12
|
-
pixelEvents?: import("../../models").ButtonPixel | undefined;
|
|
13
11
|
extraProps?: import("react").HTMLProps<HTMLAnchorElement> | undefined;
|
|
14
|
-
analyticsEvents?:
|
|
15
|
-
name: string;
|
|
16
|
-
type?: string | undefined;
|
|
17
|
-
counters?: import("../../models").AnalyticsCounters | undefined;
|
|
18
|
-
context?: string | undefined;
|
|
19
|
-
target?: string | undefined;
|
|
20
|
-
} | {
|
|
21
|
-
name: string;
|
|
22
|
-
type?: string | undefined;
|
|
23
|
-
counters?: import("../../models").AnalyticsCounters | undefined;
|
|
24
|
-
context?: string | undefined;
|
|
25
|
-
target?: string | undefined;
|
|
26
|
-
}[] | undefined;
|
|
12
|
+
analyticsEvents?: import("../../models").AnalyticsEventsProp | undefined;
|
|
27
13
|
className?: string | undefined;
|
|
28
14
|
tabIndex?: number | undefined;
|
|
29
15
|
}[] | undefined;
|
|
@@ -76,94 +76,6 @@ export declare const PriceCardBlock: {
|
|
|
76
76
|
optionName: string;
|
|
77
77
|
})[];
|
|
78
78
|
};
|
|
79
|
-
metrikaGoals: {
|
|
80
|
-
oneOf: ({
|
|
81
|
-
type: string;
|
|
82
|
-
optionName: string;
|
|
83
|
-
items?: undefined;
|
|
84
|
-
} | {
|
|
85
|
-
type: string;
|
|
86
|
-
items: {
|
|
87
|
-
type: string;
|
|
88
|
-
additionalProperties?: undefined;
|
|
89
|
-
required?: undefined;
|
|
90
|
-
properties?: undefined;
|
|
91
|
-
};
|
|
92
|
-
optionName: string;
|
|
93
|
-
} | {
|
|
94
|
-
type: string;
|
|
95
|
-
items: {
|
|
96
|
-
type: string;
|
|
97
|
-
additionalProperties: boolean;
|
|
98
|
-
required: string[];
|
|
99
|
-
properties: {
|
|
100
|
-
name: {
|
|
101
|
-
type: string;
|
|
102
|
-
};
|
|
103
|
-
isCrossSite: {
|
|
104
|
-
type: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
optionName: string;
|
|
109
|
-
})[];
|
|
110
|
-
};
|
|
111
|
-
pixelEvents: {
|
|
112
|
-
type: string;
|
|
113
|
-
items: {
|
|
114
|
-
type: string;
|
|
115
|
-
required: string[];
|
|
116
|
-
additionalProperties: boolean;
|
|
117
|
-
properties: {
|
|
118
|
-
name: {
|
|
119
|
-
type: string;
|
|
120
|
-
enum: import("../..").PixelEventType[];
|
|
121
|
-
};
|
|
122
|
-
data: {};
|
|
123
|
-
};
|
|
124
|
-
select: {
|
|
125
|
-
$data: string;
|
|
126
|
-
};
|
|
127
|
-
selectCases: {
|
|
128
|
-
SubmitApplication: {
|
|
129
|
-
additionalProperties: boolean;
|
|
130
|
-
properties: {
|
|
131
|
-
name: {};
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
Contact: {
|
|
135
|
-
additionalProperties: boolean;
|
|
136
|
-
properties: {
|
|
137
|
-
name: {};
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
Lead: {
|
|
141
|
-
additionalProperties: boolean;
|
|
142
|
-
properties: {
|
|
143
|
-
name: {};
|
|
144
|
-
data: {
|
|
145
|
-
type: string;
|
|
146
|
-
additionalProperties: boolean;
|
|
147
|
-
properties: {
|
|
148
|
-
content_category: {
|
|
149
|
-
type: string;
|
|
150
|
-
};
|
|
151
|
-
content_name: {
|
|
152
|
-
type: string;
|
|
153
|
-
};
|
|
154
|
-
currency: {
|
|
155
|
-
type: string;
|
|
156
|
-
};
|
|
157
|
-
value: {
|
|
158
|
-
type: string;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
79
|
analyticsEvents: {
|
|
168
80
|
oneOf: ({
|
|
169
81
|
optionName: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { MarkdownItPluginCb } from '@doc-tools/transform/lib/plugins/typings';
|
|
2
|
-
import { Lang } from '
|
|
2
|
+
import { Lang } from '@gravity-ui/uikit';
|
|
3
3
|
export type ComplexItem = {
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
};
|
|
6
6
|
export type Item = string | null | ComplexItem;
|
|
7
7
|
export type Transformer = (text: string) => string;
|
|
8
|
-
export type TransformerRaw = (lang: Lang
|
|
8
|
+
export type TransformerRaw = (lang: `${Lang}`, content: string, options: {
|
|
9
9
|
plugins: MarkdownItPluginCb[];
|
|
10
10
|
}) => string;
|
|
11
11
|
export type Parser<T = any> = (transformer: Transformer, block: T) => T;
|
|
12
12
|
export declare const createItemsParser: (fields: string[]) => (transformer: Transformer, items: Item[]) => (string | {
|
|
13
13
|
[x: string]: string;
|
|
14
14
|
} | null)[];
|
|
15
|
-
export declare function yfmTransformer(lang: Lang
|
|
15
|
+
export declare function yfmTransformer(lang: `${Lang}`, content: string, options?: {
|
|
16
16
|
plugins?: MarkdownItPluginCb[];
|
|
17
17
|
}): string;
|
|
18
|
-
export declare function typografTransformer(lang: Lang
|
|
18
|
+
export declare function typografTransformer(lang: `${Lang}`, content: string): string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MarkdownItPluginCb } from '@doc-tools/transform/lib/plugins/typings';
|
|
2
|
+
import { Lang } from '@gravity-ui/uikit';
|
|
2
3
|
import { ConstructorBlock } from '../models/constructor';
|
|
3
|
-
import { Lang } from '../utils/configure';
|
|
4
4
|
export type ContentVariables = Record<string, string>;
|
|
5
5
|
export type ContentTransformerProps = {
|
|
6
6
|
content: {
|
|
7
7
|
blocks?: ConstructorBlock[];
|
|
8
8
|
};
|
|
9
9
|
options: {
|
|
10
|
-
lang: Lang
|
|
10
|
+
lang: `${Lang}`;
|
|
11
11
|
customConfig?: {};
|
|
12
12
|
vars?: ContentVariables;
|
|
13
13
|
plugins?: MarkdownItPluginCb[];
|