@gravity-ui/page-constructor 1.15.0-alpha.21 → 1.15.0-alpha.22

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 (87) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +0 -9
  2. package/build/cjs/blocks/Banner/schema.js +1 -3
  3. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +78 -0
  4. package/build/cjs/blocks/Header/schema.d.ts +0 -156
  5. package/build/cjs/blocks/Header/schema.js +0 -4
  6. package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -78
  7. package/build/cjs/blocks/Info/schema.d.ts +0 -3
  8. package/build/cjs/blocks/Info/schema.js +0 -2
  9. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
  10. package/build/cjs/blocks/Preview/schema.d.ts +0 -3
  11. package/build/cjs/blocks/Preview/schema.js +1 -3
  12. package/build/cjs/blocks/Security/schema.d.ts +0 -3
  13. package/build/cjs/blocks/Security/schema.js +1 -3
  14. package/build/cjs/blocks/Tabs/schema.d.ts +78 -0
  15. package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
  16. package/build/cjs/components/BackLink/BackLink.js +4 -2
  17. package/build/cjs/components/Button/Button.js +1 -4
  18. package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
  19. package/build/cjs/components/CardBase/CardBase.d.ts +2 -4
  20. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
  21. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
  22. package/build/cjs/components/Link/Link.js +1 -1
  23. package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
  24. package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -4
  25. package/build/cjs/components/YandexForm/YandexForm.js +2 -2
  26. package/build/cjs/models/common.d.ts +3 -0
  27. package/build/cjs/models/constructor-items/blocks.d.ts +0 -10
  28. package/build/cjs/models/constructor-items/common.d.ts +5 -13
  29. package/build/cjs/models/constructor-items/sub-blocks.d.ts +3 -7
  30. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +5 -3
  31. package/build/cjs/schema/validators/common.d.ts +78 -0
  32. package/build/cjs/schema/validators/common.js +2 -0
  33. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
  34. package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
  35. package/build/cjs/sub-blocks/HubspotForm/index.js +1 -1
  36. package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
  37. package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
  38. package/build/cjs/sub-blocks/Quote/schema.js +1 -3
  39. package/build/esm/blocks/Banner/schema.d.ts +0 -9
  40. package/build/esm/blocks/Banner/schema.js +1 -3
  41. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +78 -0
  42. package/build/esm/blocks/Header/schema.d.ts +0 -156
  43. package/build/esm/blocks/Header/schema.js +0 -4
  44. package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -78
  45. package/build/esm/blocks/Info/schema.d.ts +0 -3
  46. package/build/esm/blocks/Info/schema.js +0 -2
  47. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
  48. package/build/esm/blocks/Preview/schema.d.ts +0 -3
  49. package/build/esm/blocks/Preview/schema.js +1 -3
  50. package/build/esm/blocks/Security/schema.d.ts +0 -3
  51. package/build/esm/blocks/Security/schema.js +1 -3
  52. package/build/esm/blocks/Tabs/schema.d.ts +78 -0
  53. package/build/esm/components/BackLink/BackLink.d.ts +0 -1
  54. package/build/esm/components/BackLink/BackLink.js +4 -2
  55. package/build/esm/components/Button/Button.js +1 -4
  56. package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
  57. package/build/esm/components/CardBase/CardBase.d.ts +2 -4
  58. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
  59. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
  60. package/build/esm/components/Link/Link.js +1 -1
  61. package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
  62. package/build/esm/components/YandexForm/YandexForm.d.ts +2 -4
  63. package/build/esm/components/YandexForm/YandexForm.js +2 -2
  64. package/build/esm/models/common.d.ts +3 -0
  65. package/build/esm/models/constructor-items/blocks.d.ts +0 -10
  66. package/build/esm/models/constructor-items/common.d.ts +5 -13
  67. package/build/esm/models/constructor-items/sub-blocks.d.ts +3 -7
  68. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -3
  69. package/build/esm/schema/validators/common.d.ts +78 -0
  70. package/build/esm/schema/validators/common.js +2 -0
  71. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
  72. package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
  73. package/build/esm/sub-blocks/HubspotForm/index.js +1 -1
  74. package/build/esm/sub-blocks/Quote/Quote.js +2 -2
  75. package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
  76. package/build/esm/sub-blocks/Quote/schema.js +1 -3
  77. package/package.json +1 -1
  78. package/server/models/common.d.ts +3 -0
  79. package/server/models/constructor-items/blocks.d.ts +0 -10
  80. package/server/models/constructor-items/common.d.ts +5 -13
  81. package/server/models/constructor-items/sub-blocks.d.ts +3 -7
  82. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
  83. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -12
  84. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -28
  85. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
  86. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -13
  87. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -25
@@ -274,84 +274,6 @@ export declare const HeaderProperties: {
274
274
  type: string;
275
275
  contentType: string;
276
276
  };
277
- analyticsEvents: {
278
- anyOf: ({
279
- type: string;
280
- additionalProperties: {
281
- type: string;
282
- };
283
- required: string[];
284
- properties: {
285
- name: {
286
- type: string;
287
- };
288
- type: {
289
- type: string;
290
- };
291
- counters: {
292
- type: string;
293
- additionalProperties: boolean;
294
- required: never[];
295
- properties: {
296
- include: {
297
- type: string;
298
- items: {
299
- type: string;
300
- };
301
- };
302
- exclude: {
303
- type: string;
304
- items: {
305
- type: string;
306
- };
307
- };
308
- };
309
- };
310
- context: {
311
- type: string;
312
- };
313
- };
314
- } | {
315
- type: string;
316
- items: {
317
- type: string;
318
- additionalProperties: {
319
- type: string;
320
- };
321
- required: string[];
322
- properties: {
323
- name: {
324
- type: string;
325
- };
326
- type: {
327
- type: string;
328
- };
329
- counters: {
330
- type: string;
331
- additionalProperties: boolean;
332
- required: never[];
333
- properties: {
334
- include: {
335
- type: string;
336
- items: {
337
- type: string;
338
- };
339
- };
340
- exclude: {
341
- type: string;
342
- items: {
343
- type: string;
344
- };
345
- };
346
- };
347
- };
348
- context: {
349
- type: string;
350
- };
351
- };
352
- };
353
- })[];
354
- };
355
277
  };
356
278
  };
357
279
  imageSize: {
@@ -685,84 +607,6 @@ export declare const HeaderBlock: {
685
607
  type: string;
686
608
  contentType: string;
687
609
  };
688
- analyticsEvents: {
689
- anyOf: ({
690
- type: string;
691
- additionalProperties: {
692
- type: string;
693
- };
694
- required: string[];
695
- properties: {
696
- name: {
697
- type: string;
698
- };
699
- type: {
700
- type: string;
701
- };
702
- counters: {
703
- type: string;
704
- additionalProperties: boolean;
705
- required: never[];
706
- properties: {
707
- include: {
708
- type: string;
709
- items: {
710
- type: string;
711
- };
712
- };
713
- exclude: {
714
- type: string;
715
- items: {
716
- type: string;
717
- };
718
- };
719
- };
720
- };
721
- context: {
722
- type: string;
723
- };
724
- };
725
- } | {
726
- type: string;
727
- items: {
728
- type: string;
729
- additionalProperties: {
730
- type: string;
731
- };
732
- required: string[];
733
- properties: {
734
- name: {
735
- type: string;
736
- };
737
- type: {
738
- type: string;
739
- };
740
- counters: {
741
- type: string;
742
- additionalProperties: boolean;
743
- required: never[];
744
- properties: {
745
- include: {
746
- type: string;
747
- items: {
748
- type: string;
749
- };
750
- };
751
- exclude: {
752
- type: string;
753
- items: {
754
- type: string;
755
- };
756
- };
757
- };
758
- };
759
- context: {
760
- type: string;
761
- };
762
- };
763
- };
764
- })[];
765
- };
766
610
  };
767
611
  };
768
612
  imageSize: {
@@ -1,7 +1,6 @@
1
1
  import { VideoProps, withTheme, BlockBaseProps, ButtonBlock, MediaProps, } from '../../schema/validators/common';
2
2
  import { filteredArray } from '../../schema/validators/utils';
3
3
  import { ImageProps } from '../../components/Image/schema';
4
- import { AnalyticsEventSchema } from '../../schema/validators/event';
5
4
  export const HeaderBackgroundProps = {
6
5
  type: 'object',
7
6
  additionalProperties: false,
@@ -43,9 +42,6 @@ export const HeaderProperties = {
43
42
  type: 'string',
44
43
  contentType: 'text',
45
44
  },
46
- analyticsEvents: {
47
- anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
48
- },
49
45
  },
50
46
  },
51
47
  imageSize: {
@@ -144,84 +144,6 @@ export declare const HeaderSliderBlock: {
144
144
  type: string;
145
145
  contentType: string;
146
146
  };
147
- analyticsEvents: {
148
- anyOf: ({
149
- type: string;
150
- additionalProperties: {
151
- type: string;
152
- };
153
- required: string[];
154
- properties: {
155
- name: {
156
- type: string;
157
- };
158
- type: {
159
- type: string;
160
- };
161
- counters: {
162
- type: string;
163
- additionalProperties: boolean;
164
- required: never[];
165
- properties: {
166
- include: {
167
- type: string;
168
- items: {
169
- type: string;
170
- };
171
- };
172
- exclude: {
173
- type: string;
174
- items: {
175
- type: string;
176
- };
177
- };
178
- };
179
- };
180
- context: {
181
- type: string;
182
- };
183
- };
184
- } | {
185
- type: string;
186
- items: {
187
- type: string;
188
- additionalProperties: {
189
- type: string;
190
- };
191
- required: string[];
192
- properties: {
193
- name: {
194
- type: string;
195
- };
196
- type: {
197
- type: string;
198
- };
199
- counters: {
200
- type: string;
201
- additionalProperties: boolean;
202
- required: never[];
203
- properties: {
204
- include: {
205
- type: string;
206
- items: {
207
- type: string;
208
- };
209
- };
210
- exclude: {
211
- type: string;
212
- items: {
213
- type: string;
214
- };
215
- };
216
- };
217
- };
218
- context: {
219
- type: string;
220
- };
221
- };
222
- };
223
- })[];
224
- };
225
147
  };
226
148
  };
227
149
  imageSize: {
@@ -21,9 +21,6 @@ export declare const InfoBlock: {
21
21
  type: string;
22
22
  contentType: string;
23
23
  };
24
- context: {
25
- type: string;
26
- };
27
24
  buttons: {
28
25
  type: string;
29
26
  items: {
@@ -18,8 +18,6 @@ export const InfoBlock = {
18
18
  }), sectionsTitle: {
19
19
  type: 'string',
20
20
  contentType: 'text',
21
- }, context: {
22
- type: 'string',
23
21
  }, buttons: filteredArray(ButtonBlock), theme: ThemeProps, links: filteredArray(LinkProps), leftContent: ContentProps, rightContent: ContentProps }),
24
22
  },
25
23
  };
@@ -9,7 +9,6 @@ interface MediaContentProps extends Refable<HTMLDivElement> {
9
9
  switching: boolean;
10
10
  isActiveBlock: (id: number, isMediaBlock?: boolean) => boolean;
11
11
  showMediaContent: (id: number) => void;
12
- context?: string;
13
12
  }
14
- declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "context" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
15
14
  export default MediaContent;
@@ -30,9 +30,6 @@ export declare const PreviewBlock: {
30
30
  };
31
31
  };
32
32
  };
33
- context: {
34
- type: string;
35
- };
36
33
  animated: {
37
34
  type: string;
38
35
  };
@@ -45,8 +45,6 @@ export const PreviewBlock = {
45
45
  }, ratioMediaContent: {
46
46
  type: 'string',
47
47
  enum: previewRatioMediaContent,
48
- }, items: filteredArray(PreviewItem), context: {
49
- type: 'string',
50
- } }),
48
+ }, items: filteredArray(PreviewItem) }),
51
49
  },
52
50
  };
@@ -160,9 +160,6 @@ export declare const SecurityBlock: {
160
160
  };
161
161
  };
162
162
  };
163
- context: {
164
- type: string;
165
- };
166
163
  animated: {
167
164
  type: string;
168
165
  };
@@ -23,8 +23,6 @@ export const SecurityBlock = {
23
23
  },
24
24
  link: _.pick(LinkProps, ['text', 'url']),
25
25
  },
26
- }), context: {
27
- type: 'string',
28
- } }),
26
+ }) }),
29
27
  },
30
28
  };
@@ -177,6 +177,84 @@ export declare const tabsItem: {
177
177
  type: string;
178
178
  enum: string[];
179
179
  };
180
+ analyticsEvents: {
181
+ anyOf: ({
182
+ type: string;
183
+ additionalProperties: {
184
+ type: string;
185
+ };
186
+ required: string[];
187
+ properties: {
188
+ name: {
189
+ type: string;
190
+ };
191
+ type: {
192
+ type: string;
193
+ };
194
+ counters: {
195
+ type: string;
196
+ additionalProperties: boolean;
197
+ required: never[];
198
+ properties: {
199
+ include: {
200
+ type: string;
201
+ items: {
202
+ type: string;
203
+ };
204
+ };
205
+ exclude: {
206
+ type: string;
207
+ items: {
208
+ type: string;
209
+ };
210
+ };
211
+ };
212
+ };
213
+ context: {
214
+ type: string;
215
+ };
216
+ };
217
+ } | {
218
+ type: string;
219
+ items: {
220
+ type: string;
221
+ additionalProperties: {
222
+ type: string;
223
+ };
224
+ required: string[];
225
+ properties: {
226
+ name: {
227
+ type: string;
228
+ };
229
+ type: {
230
+ type: string;
231
+ };
232
+ counters: {
233
+ type: string;
234
+ additionalProperties: boolean;
235
+ required: never[];
236
+ properties: {
237
+ include: {
238
+ type: string;
239
+ items: {
240
+ type: string;
241
+ };
242
+ };
243
+ exclude: {
244
+ type: string;
245
+ items: {
246
+ type: string;
247
+ };
248
+ };
249
+ };
250
+ };
251
+ context: {
252
+ type: string;
253
+ };
254
+ };
255
+ };
256
+ })[];
257
+ };
180
258
  type: {};
181
259
  when: {};
182
260
  };
@@ -9,6 +9,5 @@ export interface BackLinkProps {
9
9
  className?: string;
10
10
  shouldHandleBackAction?: boolean;
11
11
  onClick?: () => void;
12
- context?: string;
13
12
  }
14
13
  export default function BackLink(props: BackLinkProps): JSX.Element;
@@ -2,16 +2,18 @@ import React, { useCallback, useContext } from 'react';
2
2
  import { Button, Icon } from '@gravity-ui/uikit';
3
3
  import { ArrowSidebar } from '../../icons';
4
4
  import { LocationContext } from '../../context/locationContext';
5
+ import { BlockPositionContext } from '../../context/blockPositionContext';
5
6
  import { useAnalytics } from '../../hooks';
6
7
  import { PredefinedEventTypes } from '../../models';
7
8
  const COMPONENT_NAME = 'backlink';
8
9
  export default function BackLink(props) {
9
10
  const { history } = useContext(LocationContext);
10
- const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, context = COMPONENT_NAME, } = props;
11
+ const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, } = props;
12
+ const context = useContext(BlockPositionContext);
11
13
  const handleAnalytics = useAnalytics({
12
14
  name: 'back-link-click',
13
15
  type: PredefinedEventTypes.Default,
14
- context: context,
16
+ context: context || COMPONENT_NAME,
15
17
  target: url,
16
18
  });
17
19
  const backActionHandler = useCallback(async () => {
@@ -5,10 +5,10 @@ import { block, setUrlTld } from '../../utils';
5
5
  import { PredefinedEventTypes } from '../../models';
6
6
  import { toCommonSize, toCommonView } from './utils';
7
7
  import { LocaleContext } from '../../context/localeContext/localeContext';
8
+ import { BlockPositionContext } from '../../context/blockPositionContext';
8
9
  import { useMetrika } from '../../hooks/useMetrika';
9
10
  import { useAnalytics } from '../../hooks';
10
11
  import { Github } from '../../icons';
11
- import { BlockPositionContext } from '../../context/blockPositionContext';
12
12
  import './Button.css';
13
13
  const COMPONENT_NAME = 'button';
14
14
  const b = block('button-block');
@@ -25,9 +25,6 @@ const Button = (props) => {
25
25
  target: url,
26
26
  }), [context, url]);
27
27
  const handleAnalytics = useAnalytics(defaultEvent);
28
- const blockPosition = useContext(BlockPositionContext);
29
- // eslint-disable-next-line no-console
30
- console.log({ blockPosition }, props);
31
28
  const onClick = useCallback(() => {
32
29
  handleMetrika({ metrikaGoals, pixelEvents });
33
30
  handleAnalytics(analyticsEvents);
@@ -9,7 +9,6 @@ export interface ButtonTabsProps {
9
9
  items: ButtonTabsItemProps[];
10
10
  activeTab?: string;
11
11
  onSelectTab?: (tabId: string) => void;
12
- context?: string;
13
12
  }
14
13
  declare const ButtonTabs: (props: ButtonTabsProps) => JSX.Element;
15
14
  export default ButtonTabs;
@@ -1,8 +1,8 @@
1
1
  import React, { ReactElement, HTMLAttributeAnchorTarget } from 'react';
2
2
  import { ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
3
- import { AnalyticsEvent } from '../../models/common';
3
+ import { AnalyticsEventsBase } from '../../models/common';
4
4
  import './CardBase.css';
5
- export interface CardBaseProps extends CardBaseParams {
5
+ export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
6
6
  className?: string;
7
7
  bodyClassName?: string;
8
8
  contentClassName?: string;
@@ -11,8 +11,6 @@ export interface CardBaseProps extends CardBaseParams {
11
11
  target?: HTMLAttributeAnchorTarget;
12
12
  metrikaGoals?: MetrikaGoal;
13
13
  pixelEvents?: ButtonPixel;
14
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
15
- context?: string;
16
14
  }
17
15
  export interface CardHeaderBaseProps {
18
16
  className?: string;
@@ -1,6 +1,36 @@
1
+ @charset "UTF-8";
2
+ /* use this for style redefinitions to awoid problems with
3
+ unpredictable css rules order in build */
1
4
  .pc-header-breadcrumbs {
2
5
  z-index: 11;
3
6
  }
7
+ .pc-header-breadcrumbs__item {
8
+ display: inline-block;
9
+ }
10
+ .pc-header-breadcrumbs__text {
11
+ font-size: var(--yc-text-body-2-font-size);
12
+ line-height: var(--yc-text-body-2-line-height);
13
+ outline: none;
14
+ color: var(--yc-color-text-link);
15
+ text-decoration: none;
16
+ cursor: pointer;
17
+ color: var(--yc-color-text-secondary);
18
+ }
19
+ .utilityfocus .pc-header-breadcrumbs__text:focus {
20
+ outline: 2px solid #ffdb4d;
21
+ }
22
+ .pc-header-breadcrumbs__text:hover, .pc-header-breadcrumbs__text:active {
23
+ --pc-text-header-color: var(--yc-color-text-link-hover);
24
+ color: var(--yc-color-text-link-hover);
25
+ }
26
+ .pc-header-breadcrumbs__text:after {
27
+ content: " / ";
28
+ margin: 0 8px 0 6px;
29
+ color: var(--yc-color-text-secondary);
30
+ }
31
+ .pc-header-breadcrumbs__text:hover {
32
+ color: var(--yc-color-text-primary);
33
+ }
4
34
  .pc-header-breadcrumbs_theme_dark .pc-header-breadcrumbs__text {
5
35
  color: var(--yc-color-text-light-secondary);
6
36
  }
@@ -1,9 +1,14 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
- import HeaderBreadcrumbsItem from './HeaderBreadcrumbsItem';
3
+ import { useMetrika } from '../../hooks/useMetrika';
4
4
  import './HeaderBreadcrumbs.css';
5
5
  const b = block('header-breadcrumbs');
6
6
  export default function HeaderBreadcrumbs(props) {
7
7
  const { items, metrikaGoals, pixelEvents, theme = 'light', className } = props;
8
- return (React.createElement("div", { className: b({ theme }, className) }, items.map((item) => (React.createElement(HeaderBreadcrumbsItem, { key: item.url, url: item.url, text: item.text, metrikaGoals: metrikaGoals, pixelEvents: pixelEvents, analyticsEvents: item.analyticsEvents })))));
8
+ const handleMetrika = useMetrika();
9
+ const onClick = () => {
10
+ handleMetrika({ metrikaGoals, pixelEvents });
11
+ };
12
+ return (React.createElement("div", { className: b({ theme }, className) }, items.map((item) => (React.createElement("div", { className: b('item'), key: item.url },
13
+ React.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
9
14
  }
@@ -7,9 +7,9 @@ import FileLink from '../FileLink/FileLink';
7
7
  import BackLink from '../BackLink/BackLink';
8
8
  import { LocaleContext } from '../../context/localeContext/localeContext';
9
9
  import { LocationContext } from '../../context/locationContext/locationContext';
10
+ import { BlockPositionContext } from '../../context/blockPositionContext';
10
11
  import { useMetrika } from '../../hooks/useMetrika';
11
12
  import { useAnalytics } from '../../hooks';
12
- import { BlockPositionContext } from '../../context/blockPositionContext';
13
13
  import './Link.css';
14
14
  const b = block('link-block');
15
15
  const WORD_JOINER_SYM = '\u200b';
@@ -43,7 +43,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
43
43
  const defaultEvent = useMemo(() => ({
44
44
  name: 'react-player-controls-click',
45
45
  type: PredefinedEventTypes.Default,
46
- context: context,
46
+ context,
47
47
  }), [context]);
48
48
  const handleAnalytics = useAnalytics(defaultEvent);
49
49
  useImperativeHandle(originRef, () => ({
@@ -1,7 +1,7 @@
1
1
  import { PixelEvent } from '../../models';
2
- import { AnalyticsEvent } from '../../models/common';
2
+ import { AnalyticsEventsBase } from '../../models/common';
3
3
  export declare const YANDEX_FORM_ORIGIN = "https://forms.yandex.ru";
4
- export interface YandexFormProps {
4
+ export interface YandexFormProps extends AnalyticsEventsBase {
5
5
  id: number | string;
6
6
  containerId?: string;
7
7
  theme?: string;
@@ -15,8 +15,6 @@ export interface YandexFormProps {
15
15
  onLoad?: () => void;
16
16
  metrikaGoals?: string | string[];
17
17
  pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
18
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
19
- context?: string;
20
18
  }
21
19
  declare const YandexForm: (props: YandexFormProps) => JSX.Element;
22
20
  export default YandexForm;
@@ -2,11 +2,11 @@ import React, { useCallback, useContext, useEffect, useMemo, useRef } from 'reac
2
2
  import { HEADER_HEIGHT } from '../constants';
3
3
  import { LocaleContext } from '../../context/localeContext';
4
4
  import { MobileContext } from '../../context/mobileContext';
5
+ import { BlockPositionContext } from '../../context/blockPositionContext';
5
6
  import { block } from '../../utils';
6
- import { useMetrika } from '../../hooks/useMetrika';
7
7
  import { PredefinedEventTypes } from '../../models/common';
8
+ import { useMetrika } from '../../hooks/useMetrika';
8
9
  import { useAnalytics } from '../../hooks';
9
- import { BlockPositionContext } from '../../context/blockPositionContext';
10
10
  export const YANDEX_FORM_ORIGIN = 'https://forms.yandex.ru';
11
11
  const CONTAINER_ID = 'pc-yandex-form-container';
12
12
  const b = block('yandex-form');
@@ -80,4 +80,7 @@ export type AnalyticsEvent<T = {}> = T & {
80
80
  context?: string;
81
81
  target?: string;
82
82
  };
83
+ export interface AnalyticsEventsBase {
84
+ analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
85
+ }
83
86
  export {};