@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
|
@@ -2,7 +2,6 @@ import React, { Fragment, useCallback, useContext, useEffect, useImperativeHandl
|
|
|
2
2
|
import { Icon } from '@gravity-ui/uikit';
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
4
|
import ReactPlayer from 'react-player';
|
|
5
|
-
import { MetrikaContext } from '../../context/metrikaContext';
|
|
6
5
|
import { MobileContext } from '../../context/mobileContext';
|
|
7
6
|
import { VideoContext } from '../../context/videoContext';
|
|
8
7
|
import { useAnalytics, useMount } from '../../hooks';
|
|
@@ -10,7 +9,7 @@ import { PlayVideo } from '../../icons';
|
|
|
10
9
|
import { CustomControlsButtonPositioning, CustomControlsType, DefaultEventNames, MediaVideoControlsType, PlayButtonThemes, PlayButtonType, PredefinedEventTypes, } from '../../models';
|
|
11
10
|
import { block } from '../../utils';
|
|
12
11
|
import CustomBarControls from './CustomBarControls';
|
|
13
|
-
import i18n from './i18n';
|
|
12
|
+
import { i18n } from './i18n';
|
|
14
13
|
import { checkYoutubeVideos } from './utils';
|
|
15
14
|
import './ReactPlayer.css';
|
|
16
15
|
const b = block('ReactPlayer');
|
|
@@ -18,8 +17,7 @@ const FPS = 60;
|
|
|
18
17
|
// eslint-disable-next-line react/display-name
|
|
19
18
|
export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
20
19
|
const isMobile = useContext(MobileContext);
|
|
21
|
-
const {
|
|
22
|
-
const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, metrika: videoMetrika, analyticsEvents, height, ariaLabel, ratio, } = props;
|
|
20
|
+
const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, } = props;
|
|
23
21
|
const { type = PlayButtonType.Default, theme = PlayButtonThemes.Blue, text, className: buttonClassName, } = playButton || {};
|
|
24
22
|
const { type: customControlsType = CustomControlsType.WithMuteButton, muteButtonShown, positioning = CustomControlsButtonPositioning.Center, } = customControlsOptions;
|
|
25
23
|
const autoPlay = Boolean(!isMobile && !previewImgUrl && props.autoplay);
|
|
@@ -125,13 +123,6 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
125
123
|
playerRef.seekTo(0);
|
|
126
124
|
setPlayedPercent(0);
|
|
127
125
|
}
|
|
128
|
-
if (metrika && videoMetrika) {
|
|
129
|
-
const { play, stop, counterName } = videoMetrika;
|
|
130
|
-
const goal = isMuted ? play : stop;
|
|
131
|
-
if (goal) {
|
|
132
|
-
metrika.reachGoals(goal, counterName);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
126
|
const events = isMuted ? playEvents : stopEvents;
|
|
136
127
|
handleAnalytics(events);
|
|
137
128
|
if (isMuted) {
|
|
@@ -139,27 +130,12 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
139
130
|
}
|
|
140
131
|
// In order to the progress bar to update (equals 0) before displaying
|
|
141
132
|
setTimeout(() => setMuted(!isMuted), 0);
|
|
142
|
-
}, [
|
|
143
|
-
playerRef,
|
|
144
|
-
customControlsType,
|
|
145
|
-
metrika,
|
|
146
|
-
videoMetrika,
|
|
147
|
-
playEvents,
|
|
148
|
-
stopEvents,
|
|
149
|
-
handleAnalytics,
|
|
150
|
-
setProps,
|
|
151
|
-
]);
|
|
133
|
+
}, [playerRef, customControlsType, playEvents, stopEvents, handleAnalytics, setProps]);
|
|
152
134
|
const handleClickPreview = useCallback(() => {
|
|
153
135
|
setIsPlaying(true);
|
|
154
136
|
onClickPreview === null || onClickPreview === void 0 ? void 0 : onClickPreview();
|
|
155
|
-
if (metrika && videoMetrika) {
|
|
156
|
-
const { play, counterName } = videoMetrika;
|
|
157
|
-
if (play) {
|
|
158
|
-
metrika.reachGoals(play, counterName);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
137
|
handleAnalytics(playEvents);
|
|
162
|
-
}, [onClickPreview,
|
|
138
|
+
}, [onClickPreview, handleAnalytics, playEvents]);
|
|
163
139
|
const onPause = useCallback(() => {
|
|
164
140
|
// For support correct state for youtube
|
|
165
141
|
if (controls !== MediaVideoControlsType.Custom ||
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "play" | "pause" | "mute" | "unmute", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}ReactPlayer`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { block } from '../../utils';
|
|
3
|
-
import i18n from './i18n';
|
|
3
|
+
import { i18n } from './i18n';
|
|
4
4
|
import './UnpublishedLabel.css';
|
|
5
5
|
const b = block('unpublished-label');
|
|
6
6
|
const UnpublishedLabel = ({ className, children, type = 'line', }) => (React.createElement("div", { className: b({ type }, className) }, children || i18n('label_non_published')));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "label_non_published", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}UnpublishedLabel`);
|
|
@@ -7,7 +7,7 @@ import { PlayVideo } from '../../icons';
|
|
|
7
7
|
import { DefaultEventNames } from '../../models/common';
|
|
8
8
|
import { block, getPageSearchParams } from '../../utils';
|
|
9
9
|
import Image from '../Image/Image';
|
|
10
|
-
import i18n from './i18n';
|
|
10
|
+
import { i18n } from './i18n';
|
|
11
11
|
import './VideoBlock.css';
|
|
12
12
|
const RECORD_URL = 'https://www.youtube.com/embed/';
|
|
13
13
|
const STREAM_URL = 'https://www.youtube.com/embed/live_stream?channel=';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "iframe-title", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}VideoBlock`);
|
|
@@ -2,7 +2,6 @@ import React, { useCallback, useContext, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { LocaleContext } from '../../context/localeContext';
|
|
3
3
|
import { MobileContext } from '../../context/mobileContext';
|
|
4
4
|
import { useAnalytics } from '../../hooks';
|
|
5
|
-
import { useMetrika } from '../../hooks/useMetrika';
|
|
6
5
|
import { DefaultEventNames } from '../../models/common';
|
|
7
6
|
import { block } from '../../utils';
|
|
8
7
|
import { HEADER_HEIGHT } from '../constants';
|
|
@@ -11,12 +10,11 @@ export const YANDEX_FORM_SECTION = 'surveys';
|
|
|
11
10
|
const CONTAINER_ID = 'pc-yandex-form-container';
|
|
12
11
|
const b = block('yandex-form');
|
|
13
12
|
const YandexForm = (props) => {
|
|
14
|
-
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = HEADER_HEIGHT, onSubmit,
|
|
13
|
+
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = HEADER_HEIGHT, onSubmit, analyticsEvents, customFormOrigin, customFormSection, } = props;
|
|
15
14
|
const formContainerRef = useRef(null);
|
|
16
15
|
const iframeRef = useRef();
|
|
17
16
|
const yaFormOrigin = customFormOrigin || YANDEX_FORM_ORIGIN;
|
|
18
17
|
const yaFormSection = customFormSection || YANDEX_FORM_SECTION;
|
|
19
|
-
const handleMetrika = useMetrika();
|
|
20
18
|
const handleAnalytics = useAnalytics(DefaultEventNames.YandexFormSubmit);
|
|
21
19
|
const isMobile = useContext(MobileContext);
|
|
22
20
|
const locale = useContext(LocaleContext);
|
|
@@ -58,20 +56,11 @@ const YandexForm = (props) => {
|
|
|
58
56
|
const { top } = formContainerRef.current.getBoundingClientRect();
|
|
59
57
|
window.scrollBy(0, top - headerHeight);
|
|
60
58
|
}
|
|
61
|
-
handleMetrika({ metrikaGoals, pixelEvents });
|
|
62
59
|
handleAnalytics(analyticsEvents);
|
|
63
60
|
if (onSubmit) {
|
|
64
61
|
onSubmit();
|
|
65
62
|
}
|
|
66
|
-
}, [
|
|
67
|
-
handleMetrika,
|
|
68
|
-
metrikaGoals,
|
|
69
|
-
pixelEvents,
|
|
70
|
-
handleAnalytics,
|
|
71
|
-
analyticsEvents,
|
|
72
|
-
onSubmit,
|
|
73
|
-
headerHeight,
|
|
74
|
-
]);
|
|
63
|
+
}, [handleAnalytics, analyticsEvents, onSubmit, headerHeight]);
|
|
75
64
|
const handleMessage = useCallback(({ origin, data }) => {
|
|
76
65
|
if (origin !== yaFormOrigin) {
|
|
77
66
|
return;
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react';
|
|
|
2
2
|
import { Spin } from '@gravity-ui/uikit';
|
|
3
3
|
import ErrorWrapper from '../../components/ErrorWrapper/ErrorWrapper';
|
|
4
4
|
import { block as blockCn } from '../../utils/cn';
|
|
5
|
-
import i18n from './i18n';
|
|
5
|
+
import { i18n } from './i18n';
|
|
6
6
|
import './Loadable.css';
|
|
7
7
|
const b = blockCn('loadable-block');
|
|
8
8
|
const initData = {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "loadable-load-error" | "loadable-try-again", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Loadable`);
|
|
@@ -3,7 +3,6 @@ import { ImageContextProps } from '../../context/imageContext';
|
|
|
3
3
|
import { LocaleContextProps } from '../../context/localeContext';
|
|
4
4
|
import { LocationContextProps } from '../../context/locationContext';
|
|
5
5
|
import { MapsContextType } from '../../context/mapsContext/mapsContext';
|
|
6
|
-
import { MetrikaContextProps } from '../../context/metrikaContext';
|
|
7
6
|
import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
|
|
8
7
|
import { SSRContextProps } from '../../context/ssrContext';
|
|
9
8
|
import { Theme, WithChildren } from '../../models';
|
|
@@ -11,7 +10,6 @@ export interface PageConstructorProviderProps {
|
|
|
11
10
|
isMobile?: boolean;
|
|
12
11
|
locale?: LocaleContextProps;
|
|
13
12
|
location?: LocationContextProps;
|
|
14
|
-
metrika?: MetrikaContextProps;
|
|
15
13
|
ssrConfig?: SSRContextProps;
|
|
16
14
|
theme?: Theme;
|
|
17
15
|
mapsContext?: MapsContextType;
|
|
@@ -5,13 +5,12 @@ import { ImageContext } from '../../context/imageContext';
|
|
|
5
5
|
import { LocaleContext } from '../../context/localeContext';
|
|
6
6
|
import { LocationContext } from '../../context/locationContext';
|
|
7
7
|
import { MapsContext, initialMapValue } from '../../context/mapsContext/mapsContext';
|
|
8
|
-
import { MetrikaContext } from '../../context/metrikaContext';
|
|
9
8
|
import { MobileContext } from '../../context/mobileContext';
|
|
10
9
|
import { ProjectSettingsContext, } from '../../context/projectSettingsContext';
|
|
11
10
|
import { SSRContext } from '../../context/ssrContext';
|
|
12
11
|
import { ThemeContext } from '../../context/theme';
|
|
13
12
|
export const PageConstructorProvider = (props) => {
|
|
14
|
-
const { isMobile, mapsContext = initialMapValue, locale = {}, location = {},
|
|
13
|
+
const { isMobile, mapsContext = initialMapValue, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = DEFAULT_THEME, children, image = {}, } = props;
|
|
15
14
|
/* eslint-disable react/jsx-key */
|
|
16
15
|
const context = [
|
|
17
16
|
React.createElement(ThemeContext.Provider, { value: { theme } }),
|
|
@@ -21,7 +20,6 @@ export const PageConstructorProvider = (props) => {
|
|
|
21
20
|
React.createElement(LocationContext.Provider, { value: location }),
|
|
22
21
|
React.createElement(MobileContext.Provider, { value: Boolean(isMobile) }),
|
|
23
22
|
React.createElement(MapsContext.Provider, { value: mapsContext }),
|
|
24
|
-
React.createElement(MetrikaContext.Provider, { value: metrika }),
|
|
25
23
|
React.createElement(AnalyticsContext.Provider, { value: analytics }),
|
|
26
24
|
React.createElement(SSRContext.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
|
|
27
25
|
].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), children);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Lang } from '
|
|
2
|
+
import { Lang } from '@gravity-ui/uikit';
|
|
3
3
|
export type LocaleContextProps = {
|
|
4
|
-
lang?: Lang
|
|
4
|
+
lang?: `${Lang}`;
|
|
5
5
|
tld?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const LocaleContext: React.Context<LocaleContextProps>;
|
|
@@ -5,7 +5,7 @@ import { Theme, themeNames } from '../../../models';
|
|
|
5
5
|
import { block } from '../../../utils';
|
|
6
6
|
import { Tablet } from '../../icons/Tablet';
|
|
7
7
|
import { ViewModeItem } from '../../types';
|
|
8
|
-
import i18n from './i18n';
|
|
8
|
+
import { i18n } from './i18n';
|
|
9
9
|
import './ControlPanel.css';
|
|
10
10
|
const ICON_SIZE = 14;
|
|
11
11
|
const b = block('control-panel');
|
|
@@ -27,7 +27,7 @@ const ControlPanel = ({ viewMode = ViewModeItem.Edititng, onViewModeChange, clas
|
|
|
27
27
|
React.createElement(Icon, { width: ICON_SIZE, height: ICON_SIZE }))));
|
|
28
28
|
}))),
|
|
29
29
|
React.createElement("div", { className: b('theme-switch') },
|
|
30
|
-
React.createElement("span", null, i18n('
|
|
30
|
+
React.createElement("span", null, i18n('theme')),
|
|
31
31
|
React.createElement(Select, { value: [theme], onUpdate: (value) => onThemeChange(value[0]) }, Object.values(Theme).map((item) => (React.createElement(Select.Option, { key: item, value: item }, themeNames[item])))))));
|
|
32
32
|
};
|
|
33
33
|
export default ControlPanel;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "theme" | "mode", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}ControlPanel`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { block } from '../../../utils';
|
|
3
3
|
import { getBlockId } from '../../utils';
|
|
4
|
-
import i18n from './i18n';
|
|
4
|
+
import { i18n } from './i18n';
|
|
5
5
|
import './ErrorBoundary.css';
|
|
6
6
|
const b = block('error-boundary');
|
|
7
7
|
export class ErrorBoundary extends React.Component {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "error-block-header" | "error-page-header", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}ErrorBoundary`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import { BlockBase } from '../../../components';
|
|
3
3
|
import { block } from '../../../utils';
|
|
4
|
-
import i18n from './i18n';
|
|
4
|
+
import { i18n } from './i18n';
|
|
5
5
|
import './NotFoundBlock.css';
|
|
6
6
|
const b = block('not-found-block');
|
|
7
7
|
export const NotFoundBlock = ({ type, children }) => children ? (React.createElement(Fragment, null, children)) : (React.createElement(BlockBase, null,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "message", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}NotFoundBlock`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useAnalytics: (name?: string, target?: string) => (e?:
|
|
1
|
+
import { AnalyticsEventsProp } from '../models';
|
|
2
|
+
export declare const useAnalytics: (name?: string, target?: string) => (e?: AnalyticsEventsProp | null, additionalContext?: Record<string, string>) => void;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Metrika will be deleted
|
|
4
|
-
*/
|
|
5
|
-
type UseMetrikaProps = {
|
|
6
|
-
metrikaGoals?: MetrikaGoal;
|
|
7
|
-
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated useMetrika will be deleted
|
|
11
|
-
*/
|
|
12
|
-
export declare const useMetrika: () => ({ metrikaGoals, pixelEvents }: UseMetrikaProps) => void;
|
|
13
|
-
export {};
|
|
1
|
+
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { MetrikaContext } from '../context/metrikaContext';
|
|
3
|
-
import { isNewMetrikaFormat } from '../models/guards';
|
|
4
|
-
// eslint-disable-next-line valid-jsdoc
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Metrika will be deleted, which uses this logic
|
|
7
|
-
*/
|
|
8
|
-
function isButtonPixel(pixelEvents) {
|
|
9
|
-
if (Array.isArray(pixelEvents) && pixelEvents.length && 'name' in pixelEvents) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
// eslint-disable-next-line valid-jsdoc
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated useMetrika will be deleted
|
|
17
|
-
*/
|
|
18
|
-
export const useMetrika = () => {
|
|
19
|
-
const { metrika, pixel } = useContext(MetrikaContext);
|
|
20
|
-
return ({ metrikaGoals, pixelEvents }) => {
|
|
21
|
-
if (metrika && metrikaGoals) {
|
|
22
|
-
if (isNewMetrikaFormat(metrikaGoals)) {
|
|
23
|
-
metrikaGoals.forEach(({ name, isCrossSite }) => metrika.reachGoal(isCrossSite ? 'cross-site' : 'main', name));
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
metrika.reachGoals(metrikaGoals);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (pixel && pixelEvents) {
|
|
30
|
-
if (isButtonPixel(pixelEvents)) {
|
|
31
|
-
pixelEvents.forEach(({ name, data }) => pixel.trackStandard(name, data));
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
pixel.track(pixelEvents);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
};
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MetrikaGoal } from './';
|
|
3
2
|
export interface Refable<T> {
|
|
4
3
|
ref?: React.Ref<T>;
|
|
5
4
|
}
|
|
@@ -8,59 +7,9 @@ export declare enum Theme {
|
|
|
8
7
|
Dark = "dark"
|
|
9
8
|
}
|
|
10
9
|
export declare const themeNames: Record<Theme, string>;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Pixel will be deleted
|
|
13
|
-
*/
|
|
14
|
-
type PixelCommand = 'track' | 'trackCustom';
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Pixel will be deleted
|
|
17
|
-
*/
|
|
18
|
-
export interface PixelEvent {
|
|
19
|
-
command: PixelCommand;
|
|
20
|
-
event: PixelEventType | string;
|
|
21
|
-
data?: Object;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Pixel will be deleted from package
|
|
25
|
-
*/
|
|
26
|
-
export declare enum PixelEventType {
|
|
27
|
-
AddPaymentInfo = "AddPaymentInfo",
|
|
28
|
-
AddToCart = "AddToCart",
|
|
29
|
-
AddToWishlist = "AddToWishlist",
|
|
30
|
-
CompleteRegistration = "CompleteRegistration",
|
|
31
|
-
Contact = "Contact",
|
|
32
|
-
CustomizeProduct = "CustomizeProduct",
|
|
33
|
-
Donate = "Donate",
|
|
34
|
-
FindLocation = "FindLocation",
|
|
35
|
-
InitiateCheckout = "InitiateCheckout",
|
|
36
|
-
Lead = "Lead",
|
|
37
|
-
PageView = "PageView",
|
|
38
|
-
Purchase = "Purchase",
|
|
39
|
-
Schedule = "Schedule",
|
|
40
|
-
Search = "Search",
|
|
41
|
-
StartTrial = "StartTrial",
|
|
42
|
-
SubmitApplication = "SubmitApplication",
|
|
43
|
-
Subscribe = "Subscribe",
|
|
44
|
-
ViewContent = "ViewContent"
|
|
45
|
-
}
|
|
46
10
|
export type Modifiers = {
|
|
47
11
|
[name: string]: string | boolean | undefined;
|
|
48
12
|
};
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated Pixel will be deleted
|
|
51
|
-
*/
|
|
52
|
-
export interface Pixel<TEvent = string> {
|
|
53
|
-
trackStandard: (event: TEvent, data?: Object) => void;
|
|
54
|
-
trackCustom: (event: string, data?: Object) => void;
|
|
55
|
-
track: (trackEvents: string | string[] | PixelEvent[] | PixelEvent) => void;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated Metrika will be deleted
|
|
59
|
-
*/
|
|
60
|
-
export interface Metrika {
|
|
61
|
-
reachGoal: (counterName: string, ...args: any) => void;
|
|
62
|
-
reachGoals: (goals: MetrikaGoal, counterName?: string) => void;
|
|
63
|
-
}
|
|
64
13
|
export interface ClassNameProps {
|
|
65
14
|
className?: string;
|
|
66
15
|
}
|
|
@@ -97,7 +46,7 @@ export type AnalyticsEvent<T = {}> = T & {
|
|
|
97
46
|
context?: string;
|
|
98
47
|
target?: string;
|
|
99
48
|
};
|
|
49
|
+
export type AnalyticsEventsProp = AnalyticsEvent | AnalyticsEvent[];
|
|
100
50
|
export interface AnalyticsEventsBase {
|
|
101
|
-
analyticsEvents?:
|
|
51
|
+
analyticsEvents?: AnalyticsEventsProp;
|
|
102
52
|
}
|
|
103
|
-
export {};
|
|
@@ -7,30 +7,6 @@ export const themeNames = {
|
|
|
7
7
|
[Theme.Light]: 'Light',
|
|
8
8
|
[Theme.Dark]: 'Dark',
|
|
9
9
|
};
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Pixel will be deleted from package
|
|
12
|
-
*/
|
|
13
|
-
export var PixelEventType;
|
|
14
|
-
(function (PixelEventType) {
|
|
15
|
-
PixelEventType["AddPaymentInfo"] = "AddPaymentInfo";
|
|
16
|
-
PixelEventType["AddToCart"] = "AddToCart";
|
|
17
|
-
PixelEventType["AddToWishlist"] = "AddToWishlist";
|
|
18
|
-
PixelEventType["CompleteRegistration"] = "CompleteRegistration";
|
|
19
|
-
PixelEventType["Contact"] = "Contact";
|
|
20
|
-
PixelEventType["CustomizeProduct"] = "CustomizeProduct";
|
|
21
|
-
PixelEventType["Donate"] = "Donate";
|
|
22
|
-
PixelEventType["FindLocation"] = "FindLocation";
|
|
23
|
-
PixelEventType["InitiateCheckout"] = "InitiateCheckout";
|
|
24
|
-
PixelEventType["Lead"] = "Lead";
|
|
25
|
-
PixelEventType["PageView"] = "PageView";
|
|
26
|
-
PixelEventType["Purchase"] = "Purchase";
|
|
27
|
-
PixelEventType["Schedule"] = "Schedule";
|
|
28
|
-
PixelEventType["Search"] = "Search";
|
|
29
|
-
PixelEventType["StartTrial"] = "StartTrial";
|
|
30
|
-
PixelEventType["SubmitApplication"] = "SubmitApplication";
|
|
31
|
-
PixelEventType["Subscribe"] = "Subscribe";
|
|
32
|
-
PixelEventType["ViewContent"] = "ViewContent";
|
|
33
|
-
})(PixelEventType || (PixelEventType = {}));
|
|
34
10
|
export var PredefinedEventTypes;
|
|
35
11
|
(function (PredefinedEventTypes) {
|
|
36
12
|
PredefinedEventTypes["Default"] = "default-event";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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,
|
|
4
|
+
import { AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps } from '../common';
|
|
5
5
|
export declare enum AuthorType {
|
|
6
6
|
Column = "column",
|
|
7
7
|
Line = "line"
|
|
@@ -124,7 +124,6 @@ export interface MediaVideoProps extends AnalyticsEventsBase {
|
|
|
124
124
|
playButton?: PlayButtonProps;
|
|
125
125
|
controls?: MediaVideoControlsType;
|
|
126
126
|
customControlsOptions?: CustomControlsOptions;
|
|
127
|
-
metrika?: MetrikaVideo;
|
|
128
127
|
ariaLabel?: string;
|
|
129
128
|
}
|
|
130
129
|
export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
|
|
@@ -136,8 +135,6 @@ export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
|
|
|
136
135
|
colorTheme?: TextTheme;
|
|
137
136
|
arrow?: boolean;
|
|
138
137
|
target?: string;
|
|
139
|
-
metrikaGoals?: MetrikaGoal;
|
|
140
|
-
pixelEvents?: ButtonPixel;
|
|
141
138
|
extraProps?: HTMLProps<HTMLAnchorElement>;
|
|
142
139
|
}
|
|
143
140
|
export interface FileLinkProps extends ClassNameProps, Tabbable {
|
|
@@ -158,8 +155,6 @@ export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps,
|
|
|
158
155
|
primary?: boolean;
|
|
159
156
|
theme?: ButtonTheme;
|
|
160
157
|
img?: ButtonImageProps | string;
|
|
161
|
-
metrikaGoals?: MetrikaGoal;
|
|
162
|
-
pixelEvents?: ButtonPixel;
|
|
163
158
|
target?: string;
|
|
164
159
|
}
|
|
165
160
|
export type ButtonImagePosition = 'left' | 'right';
|
|
@@ -183,7 +178,6 @@ export interface MediaComponentVideoProps extends AnalyticsEventsBase {
|
|
|
183
178
|
video: MediaVideoProps;
|
|
184
179
|
height?: number;
|
|
185
180
|
ratio?: number;
|
|
186
|
-
metrika?: MetrikaVideo;
|
|
187
181
|
previewImg?: string;
|
|
188
182
|
}
|
|
189
183
|
export interface MediaComponentYoutubeProps {
|
|
@@ -237,23 +231,6 @@ export interface YMapMarkerLabel {
|
|
|
237
231
|
}
|
|
238
232
|
export type MapProps = GMapProps | YMapProps;
|
|
239
233
|
export type ThemedMediaProps = ThemeSupporting<MediaProps>;
|
|
240
|
-
export interface NewMetrikaGoal {
|
|
241
|
-
name: string;
|
|
242
|
-
isCrossSite?: boolean;
|
|
243
|
-
counterName?: string;
|
|
244
|
-
params?: Record<string, string>;
|
|
245
|
-
}
|
|
246
|
-
export type MetrikaGoal = string | string[] | NewMetrikaGoal[];
|
|
247
|
-
export interface MetrikaVideo {
|
|
248
|
-
counterName?: string;
|
|
249
|
-
play?: MetrikaGoal;
|
|
250
|
-
stop?: MetrikaGoal;
|
|
251
|
-
}
|
|
252
|
-
export interface ButtonPixelEvent {
|
|
253
|
-
name: PixelEventType;
|
|
254
|
-
data?: Object;
|
|
255
|
-
}
|
|
256
|
-
export type ButtonPixel = ButtonPixelEvent[];
|
|
257
234
|
export interface DataLensObjectProps {
|
|
258
235
|
id: string;
|
|
259
236
|
theme: 'dark' | 'light';
|
|
@@ -278,8 +255,7 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
278
255
|
text: ReactNode;
|
|
279
256
|
}[];
|
|
280
257
|
theme?: TextTheme;
|
|
281
|
-
|
|
282
|
-
pixelEvents?: ButtonPixel;
|
|
258
|
+
analyticsEvents?: AnalyticsEventsProp;
|
|
283
259
|
}
|
|
284
260
|
export interface TitleItemProps extends Justifyable, TitleItemBaseProps {
|
|
285
261
|
navTitle?: string;
|
|
@@ -368,8 +344,6 @@ export interface YandexFormProps extends AnalyticsEventsBase {
|
|
|
368
344
|
};
|
|
369
345
|
onSubmit?: () => void;
|
|
370
346
|
onLoad?: () => void;
|
|
371
|
-
metrikaGoals?: string | string[];
|
|
372
|
-
pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
|
|
373
347
|
}
|
|
374
348
|
export interface WithBorder {
|
|
375
349
|
border?: MediaBorder;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ClassNameProps, QuoteType } from '../../models';
|
|
2
2
|
import { ThemeSupporting } from '../../utils';
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
|
-
import { AnalyticsEventsBase
|
|
4
|
+
import { AnalyticsEventsBase } from '../common';
|
|
5
5
|
import { ContentBlockProps } from './blocks';
|
|
6
|
-
import { AuthorItem,
|
|
6
|
+
import { AuthorItem, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, MediaView, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
@@ -65,7 +65,6 @@ export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsB
|
|
|
65
65
|
* To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame
|
|
66
66
|
*/
|
|
67
67
|
onLoad?: (arg: HubspotEventData) => void;
|
|
68
|
-
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
69
68
|
hubspotEvents?: string[];
|
|
70
69
|
createDOMElement?: boolean;
|
|
71
70
|
}
|