@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.
Files changed (229) hide show
  1. package/README.md +5 -3
  2. package/build/cjs/blocks/Banner/schema.d.ts +0 -264
  3. package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
  4. package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +1 -2
  5. package/build/cjs/blocks/FilterBlock/i18n/index.js +4 -3
  6. package/build/cjs/blocks/Map/schema.d.ts +0 -88
  7. package/build/cjs/blocks/Media/schema.d.ts +0 -176
  8. package/build/cjs/blocks/Security/i18n/index.d.ts +1 -2
  9. package/build/cjs/blocks/Security/i18n/index.js +4 -3
  10. package/build/cjs/blocks/Share/Share.js +4 -4
  11. package/build/cjs/blocks/Share/i18n/index.d.ts +1 -2
  12. package/build/cjs/blocks/Share/i18n/index.js +4 -3
  13. package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
  14. package/build/cjs/blocks/Slider/i18n/index.d.ts +1 -2
  15. package/build/cjs/blocks/Slider/i18n/index.js +4 -3
  16. package/build/cjs/components/Button/Button.js +4 -7
  17. package/build/cjs/components/Button/i18n/index.d.ts +1 -2
  18. package/build/cjs/components/Button/i18n/index.js +4 -3
  19. package/build/cjs/components/CardBase/CardBase.d.ts +1 -3
  20. package/build/cjs/components/CardBase/CardBase.js +1 -4
  21. package/build/cjs/components/Control/Control.js +2 -2
  22. package/build/cjs/components/Control/i18n/index.d.ts +1 -2
  23. package/build/cjs/components/Control/i18n/index.js +4 -3
  24. package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -3
  25. package/build/cjs/components/FullscreenImage/i18n/index.d.ts +1 -2
  26. package/build/cjs/components/FullscreenImage/i18n/index.js +4 -3
  27. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
  28. package/build/cjs/components/Link/Link.js +1 -4
  29. package/build/cjs/components/Map/GoogleMap.js +2 -2
  30. package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
  31. package/build/cjs/components/Map/YMap/i18n/index.d.ts +1 -2
  32. package/build/cjs/components/Map/YMap/i18n/index.js +4 -3
  33. package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
  34. package/build/cjs/components/Media/DataLens/i18n/index.d.ts +1 -2
  35. package/build/cjs/components/Media/DataLens/i18n/index.js +4 -3
  36. package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
  37. package/build/cjs/components/Media/Iframe/i18n/index.d.ts +1 -2
  38. package/build/cjs/components/Media/Iframe/i18n/index.js +4 -3
  39. package/build/cjs/components/Media/Media.js +1 -3
  40. package/build/cjs/components/Media/Video/Video.js +2 -3
  41. package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
  42. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +1 -2
  43. package/build/cjs/components/OverflowScroller/i18n/index.js +4 -3
  44. package/build/cjs/components/ReactPlayer/CustomBarControls.js +3 -3
  45. package/build/cjs/components/ReactPlayer/ReactPlayer.js +5 -29
  46. package/build/cjs/components/ReactPlayer/i18n/index.d.ts +1 -2
  47. package/build/cjs/components/ReactPlayer/i18n/index.js +4 -3
  48. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
  49. package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +1 -2
  50. package/build/cjs/components/UnpublishedLabel/i18n/index.js +4 -3
  51. package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
  52. package/build/cjs/components/VideoBlock/i18n/index.d.ts +1 -2
  53. package/build/cjs/components/VideoBlock/i18n/index.js +4 -3
  54. package/build/cjs/components/YandexForm/YandexForm.js +2 -13
  55. package/build/cjs/containers/Loadable/Loadable.js +2 -2
  56. package/build/cjs/containers/Loadable/i18n/index.d.ts +1 -2
  57. package/build/cjs/containers/Loadable/i18n/index.js +4 -3
  58. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  59. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  60. package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
  61. package/build/cjs/context/localeContext/localeContext.js +2 -2
  62. package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
  63. package/build/cjs/editor/components/ControlPanel/i18n/en.json +2 -1
  64. package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +1 -2
  65. package/build/cjs/editor/components/ControlPanel/i18n/index.js +4 -3
  66. package/build/cjs/editor/components/ControlPanel/i18n/ru.json +2 -1
  67. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
  68. package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
  69. package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +4 -3
  70. package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
  71. package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
  72. package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +4 -3
  73. package/build/cjs/hooks/useAnalytics.d.ts +2 -2
  74. package/build/cjs/hooks/useMetrika.d.ts +1 -13
  75. package/build/cjs/hooks/useMetrika.js +0 -41
  76. package/build/cjs/models/common.d.ts +2 -53
  77. package/build/cjs/models/common.js +1 -25
  78. package/build/cjs/models/constructor-items/common.d.ts +2 -28
  79. package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -3
  80. package/build/cjs/models/guards.d.ts +0 -2
  81. package/build/cjs/models/guards.js +1 -5
  82. package/build/cjs/schema/constants.d.ts +0 -176
  83. package/build/cjs/schema/validators/common.d.ts +0 -188
  84. package/build/cjs/schema/validators/common.js +0 -31
  85. package/build/cjs/schema/validators/index.d.ts +0 -2
  86. package/build/cjs/schema/validators/index.js +0 -2
  87. package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
  88. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
  89. package/build/cjs/sub-blocks/PriceCard/schema.d.ts +0 -88
  90. package/build/cjs/text-transform/common.d.ts +4 -4
  91. package/build/cjs/text-transform/transformers.d.ts +2 -2
  92. package/build/cjs/text-transform/utils.d.ts +6 -6
  93. package/build/cjs/text-transform/utils.js +5 -5
  94. package/build/cjs/utils/index.d.ts +0 -1
  95. package/build/cjs/utils/index.js +1 -4
  96. package/build/esm/blocks/Banner/schema.d.ts +0 -264
  97. package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
  98. package/build/esm/blocks/FilterBlock/i18n/index.d.ts +1 -2
  99. package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
  100. package/build/esm/blocks/Map/schema.d.ts +0 -88
  101. package/build/esm/blocks/Media/schema.d.ts +0 -176
  102. package/build/esm/blocks/Security/i18n/index.d.ts +1 -2
  103. package/build/esm/blocks/Security/i18n/index.js +3 -3
  104. package/build/esm/blocks/Share/Share.js +1 -1
  105. package/build/esm/blocks/Share/i18n/index.d.ts +1 -2
  106. package/build/esm/blocks/Share/i18n/index.js +3 -3
  107. package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
  108. package/build/esm/blocks/Slider/i18n/index.d.ts +1 -2
  109. package/build/esm/blocks/Slider/i18n/index.js +3 -3
  110. package/build/esm/components/Button/Button.js +3 -6
  111. package/build/esm/components/Button/i18n/index.d.ts +1 -2
  112. package/build/esm/components/Button/i18n/index.js +3 -3
  113. package/build/esm/components/CardBase/CardBase.d.ts +1 -3
  114. package/build/esm/components/CardBase/CardBase.js +1 -4
  115. package/build/esm/components/Control/Control.js +1 -1
  116. package/build/esm/components/Control/i18n/index.d.ts +1 -2
  117. package/build/esm/components/Control/i18n/index.js +3 -3
  118. package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
  119. package/build/esm/components/FullscreenImage/i18n/index.d.ts +1 -2
  120. package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
  121. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
  122. package/build/esm/components/Link/Link.js +1 -4
  123. package/build/esm/components/Map/GoogleMap.js +1 -1
  124. package/build/esm/components/Map/YMap/YandexMap.js +1 -1
  125. package/build/esm/components/Map/YMap/i18n/index.d.ts +1 -2
  126. package/build/esm/components/Map/YMap/i18n/index.js +3 -3
  127. package/build/esm/components/Media/DataLens/DataLens.js +1 -1
  128. package/build/esm/components/Media/DataLens/i18n/index.d.ts +1 -2
  129. package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
  130. package/build/esm/components/Media/Iframe/Iframe.js +1 -1
  131. package/build/esm/components/Media/Iframe/i18n/index.d.ts +1 -2
  132. package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
  133. package/build/esm/components/Media/Media.js +1 -3
  134. package/build/esm/components/Media/Video/Video.js +2 -3
  135. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
  136. package/build/esm/components/OverflowScroller/i18n/index.d.ts +1 -2
  137. package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
  138. package/build/esm/components/ReactPlayer/CustomBarControls.js +1 -1
  139. package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -28
  140. package/build/esm/components/ReactPlayer/i18n/index.d.ts +1 -2
  141. package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
  142. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
  143. package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +1 -2
  144. package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
  145. package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
  146. package/build/esm/components/VideoBlock/i18n/index.d.ts +1 -2
  147. package/build/esm/components/VideoBlock/i18n/index.js +3 -3
  148. package/build/esm/components/YandexForm/YandexForm.js +2 -13
  149. package/build/esm/containers/Loadable/Loadable.js +1 -1
  150. package/build/esm/containers/Loadable/i18n/index.d.ts +1 -2
  151. package/build/esm/containers/Loadable/i18n/index.js +3 -3
  152. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  153. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  154. package/build/esm/context/localeContext/localeContext.d.ts +2 -2
  155. package/build/esm/context/localeContext/localeContext.js +1 -1
  156. package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
  157. package/build/esm/editor/components/ControlPanel/i18n/en.json +2 -1
  158. package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +1 -2
  159. package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
  160. package/build/esm/editor/components/ControlPanel/i18n/ru.json +2 -1
  161. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
  162. package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
  163. package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
  164. package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
  165. package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
  166. package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
  167. package/build/esm/hooks/useAnalytics.d.ts +2 -2
  168. package/build/esm/hooks/useMetrika.d.ts +1 -13
  169. package/build/esm/hooks/useMetrika.js +1 -38
  170. package/build/esm/models/common.d.ts +2 -53
  171. package/build/esm/models/common.js +0 -24
  172. package/build/esm/models/constructor-items/common.d.ts +2 -28
  173. package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -3
  174. package/build/esm/models/guards.d.ts +0 -2
  175. package/build/esm/models/guards.js +0 -3
  176. package/build/esm/schema/constants.d.ts +0 -176
  177. package/build/esm/schema/validators/common.d.ts +0 -188
  178. package/build/esm/schema/validators/common.js +0 -31
  179. package/build/esm/schema/validators/index.d.ts +0 -2
  180. package/build/esm/schema/validators/index.js +0 -2
  181. package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
  182. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
  183. package/build/esm/sub-blocks/PriceCard/schema.d.ts +0 -88
  184. package/build/esm/text-transform/common.d.ts +4 -4
  185. package/build/esm/text-transform/transformers.d.ts +2 -2
  186. package/build/esm/text-transform/utils.d.ts +6 -6
  187. package/build/esm/text-transform/utils.js +1 -1
  188. package/build/esm/utils/index.d.ts +0 -1
  189. package/build/esm/utils/index.js +0 -1
  190. package/package.json +1 -1
  191. package/server/models/common.d.ts +2 -53
  192. package/server/models/common.js +1 -25
  193. package/server/models/constructor-items/common.d.ts +2 -28
  194. package/server/models/constructor-items/sub-blocks.d.ts +2 -3
  195. package/server/models/guards.d.ts +0 -2
  196. package/server/models/guards.js +1 -5
  197. package/server/text-transform/common.d.ts +4 -4
  198. package/server/text-transform/transformers.d.ts +2 -2
  199. package/server/text-transform/utils.d.ts +6 -6
  200. package/server/text-transform/utils.js +5 -5
  201. package/server/utils/index.d.ts +0 -1
  202. package/server/utils/index.js +1 -4
  203. package/widget/index.js +1 -1
  204. package/build/cjs/context/metrikaContext/index.d.ts +0 -1
  205. package/build/cjs/context/metrikaContext/index.js +0 -4
  206. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -13
  207. package/build/cjs/context/metrikaContext/metrikaContext.js +0 -6
  208. package/build/cjs/i18n.d.ts +0 -2
  209. package/build/cjs/i18n.js +0 -12
  210. package/build/cjs/schema/validators/pixel.d.ts +0 -57
  211. package/build/cjs/schema/validators/pixel.js +0 -63
  212. package/build/cjs/utils/configure.d.ts +0 -12
  213. package/build/cjs/utils/configure.js +0 -26
  214. package/build/cjs/utils/registerKeyset.d.ts +0 -5
  215. package/build/cjs/utils/registerKeyset.js +0 -9
  216. package/build/esm/context/metrikaContext/index.d.ts +0 -1
  217. package/build/esm/context/metrikaContext/index.js +0 -1
  218. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -13
  219. package/build/esm/context/metrikaContext/metrikaContext.js +0 -2
  220. package/build/esm/i18n.d.ts +0 -2
  221. package/build/esm/i18n.js +0 -9
  222. package/build/esm/schema/validators/pixel.d.ts +0 -57
  223. package/build/esm/schema/validators/pixel.js +0 -60
  224. package/build/esm/utils/configure.d.ts +0 -12
  225. package/build/esm/utils/configure.js +0 -20
  226. package/build/esm/utils/registerKeyset.d.ts +0 -5
  227. package/build/esm/utils/registerKeyset.js +0 -5
  228. package/server/utils/configure.d.ts +0 -12
  229. package/server/utils/configure.js +0 -26
@@ -349,94 +349,6 @@ export declare const MediaBlockBaseProps: {
349
349
  optionName: string;
350
350
  })[];
351
351
  };
352
- metrikaGoals: {
353
- oneOf: ({
354
- type: string;
355
- optionName: string;
356
- items?: undefined;
357
- } | {
358
- type: string;
359
- items: {
360
- type: string;
361
- additionalProperties?: undefined;
362
- required?: undefined;
363
- properties?: undefined;
364
- };
365
- optionName: string;
366
- } | {
367
- type: string;
368
- items: {
369
- type: string;
370
- additionalProperties: boolean;
371
- required: string[];
372
- properties: {
373
- name: {
374
- type: string;
375
- };
376
- isCrossSite: {
377
- type: string;
378
- };
379
- };
380
- };
381
- optionName: string;
382
- })[];
383
- };
384
- pixelEvents: {
385
- type: string;
386
- items: {
387
- type: string;
388
- required: string[];
389
- additionalProperties: boolean;
390
- properties: {
391
- name: {
392
- type: string;
393
- enum: import("../..").PixelEventType[];
394
- };
395
- data: {};
396
- };
397
- select: {
398
- $data: string;
399
- };
400
- selectCases: {
401
- SubmitApplication: {
402
- additionalProperties: boolean;
403
- properties: {
404
- name: {};
405
- };
406
- };
407
- Contact: {
408
- additionalProperties: boolean;
409
- properties: {
410
- name: {};
411
- };
412
- };
413
- Lead: {
414
- additionalProperties: boolean;
415
- properties: {
416
- name: {};
417
- data: {
418
- type: string;
419
- additionalProperties: boolean;
420
- properties: {
421
- content_category: {
422
- type: string;
423
- };
424
- content_name: {
425
- type: string;
426
- };
427
- currency: {
428
- type: string;
429
- };
430
- value: {
431
- type: string;
432
- };
433
- };
434
- };
435
- };
436
- };
437
- };
438
- };
439
- };
440
352
  analyticsEvents: {
441
353
  oneOf: ({
442
354
  optionName: string;
@@ -1035,94 +947,6 @@ export declare const MediaBlock: {
1035
947
  optionName: string;
1036
948
  })[];
1037
949
  };
1038
- metrikaGoals: {
1039
- oneOf: ({
1040
- type: string;
1041
- optionName: string;
1042
- items?: undefined;
1043
- } | {
1044
- type: string;
1045
- items: {
1046
- type: string;
1047
- additionalProperties?: undefined;
1048
- required?: undefined;
1049
- properties?: undefined;
1050
- };
1051
- optionName: string;
1052
- } | {
1053
- type: string;
1054
- items: {
1055
- type: string;
1056
- additionalProperties: boolean;
1057
- required: string[];
1058
- properties: {
1059
- name: {
1060
- type: string;
1061
- };
1062
- isCrossSite: {
1063
- type: string;
1064
- };
1065
- };
1066
- };
1067
- optionName: string;
1068
- })[];
1069
- };
1070
- pixelEvents: {
1071
- type: string;
1072
- items: {
1073
- type: string;
1074
- required: string[];
1075
- additionalProperties: boolean;
1076
- properties: {
1077
- name: {
1078
- type: string;
1079
- enum: import("../..").PixelEventType[];
1080
- };
1081
- data: {};
1082
- };
1083
- select: {
1084
- $data: string;
1085
- };
1086
- selectCases: {
1087
- SubmitApplication: {
1088
- additionalProperties: boolean;
1089
- properties: {
1090
- name: {};
1091
- };
1092
- };
1093
- Contact: {
1094
- additionalProperties: boolean;
1095
- properties: {
1096
- name: {};
1097
- };
1098
- };
1099
- Lead: {
1100
- additionalProperties: boolean;
1101
- properties: {
1102
- name: {};
1103
- data: {
1104
- type: string;
1105
- additionalProperties: boolean;
1106
- properties: {
1107
- content_category: {
1108
- type: string;
1109
- };
1110
- content_name: {
1111
- type: string;
1112
- };
1113
- currency: {
1114
- type: string;
1115
- };
1116
- value: {
1117
- type: string;
1118
- };
1119
- };
1120
- };
1121
- };
1122
- };
1123
- };
1124
- };
1125
- };
1126
950
  analyticsEvents: {
1127
951
  oneOf: ({
1128
952
  optionName: string;
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "image-alt", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'SecurityBlock';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}SecurityBlock`);
@@ -9,7 +9,7 @@ import { Twitter } from '../../icons/Twitter';
9
9
  import { Vk } from '../../icons/Vk';
10
10
  import { DefaultEventNames } from '../../models';
11
11
  import { block, getAbsolutePath, getShareLink } from '../../utils';
12
- import i18n from './i18n';
12
+ import { i18n } from './i18n';
13
13
  import './Share.css';
14
14
  const icons = {
15
15
  facebook: Facebook,
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "constructor-share" | "facebook-title" | "twitter-title" | "linkedin-title" | "vk-title" | "telegram-title" | "facebook-label" | "twitter-label" | "linkedin-label" | "vk-label" | "telegram-label", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'Share';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Share`);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import ToggleArrow from '../../../components/ToggleArrow/ToggleArrow';
3
3
  import { block } from '../../../utils';
4
- import i18n from '../i18n';
4
+ import { i18n } from '../i18n';
5
5
  import './Arrow.css';
6
6
  const b = block('slider-block-arrow');
7
7
  const Arrow = ({ type, handleClick, className, size = 16 }) => (React.createElement("div", { className: b({ type }, className) },
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "arrow-right" | "arrow-left", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'SliderBlock';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}SliderBlock`);
@@ -4,27 +4,24 @@ import { StoreBadge } from '@gravity-ui/components';
4
4
  import { Button as CommonButton, Icon, Platform } from '@gravity-ui/uikit';
5
5
  import { LocaleContext } from '../../context/localeContext/localeContext';
6
6
  import { useAnalytics } from '../../hooks';
7
- import { useMetrika } from '../../hooks/useMetrika';
8
7
  import { Github } from '../../icons';
9
8
  import { DefaultEventNames } from '../../models';
10
9
  import { block, setUrlTld } from '../../utils';
11
- import i18n from './i18n';
10
+ import { i18n } from './i18n';
12
11
  import { ICON_QA, toCommonSize, toCommonView } from './utils';
13
12
  import './Button.css';
14
13
  const b = block('button-block');
15
14
  const Button = (props) => {
16
- const handleMetrika = useMetrika();
17
15
  const { tld } = useContext(LocaleContext);
18
- const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, urlTitle, img, onClick: onClickOrigin, text, width } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "urlTitle", "img", "onClick", "text", "width"]);
16
+ const { className, analyticsEvents, size = 'l', theme = 'normal', url, urlTitle, img, onClick: onClickOrigin, text, width } = props, rest = __rest(props, ["className", "analyticsEvents", "size", "theme", "url", "urlTitle", "img", "onClick", "text", "width"]);
19
17
  const defaultImgPosition = 'left';
20
18
  const handleAnalytics = useAnalytics(DefaultEventNames.Button, url);
21
19
  const onClick = useCallback((e) => {
22
- handleMetrika({ metrikaGoals, pixelEvents });
23
20
  handleAnalytics(analyticsEvents);
24
21
  if (onClickOrigin) {
25
22
  onClickOrigin(e);
26
23
  }
27
- }, [handleMetrika, metrikaGoals, pixelEvents, handleAnalytics, analyticsEvents, onClickOrigin]);
24
+ }, [handleAnalytics, analyticsEvents, onClickOrigin]);
28
25
  const buttonModifiers = { size, theme, width };
29
26
  const buttonImg = img instanceof Object
30
27
  ? { url: img.url, position: img.position || defaultImgPosition, alt: img.alt }
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "image-alt", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'Button';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Button`);
@@ -1,5 +1,5 @@
1
1
  import React, { HTMLAttributeAnchorTarget, ReactElement } from 'react';
2
- import { AnalyticsEventsBase, ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
2
+ import { AnalyticsEventsBase, CardBaseProps as CardBaseParams, ImageProps, WithChildren } from '../../models';
3
3
  import './CardBase.css';
4
4
  export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
5
5
  className?: string;
@@ -9,8 +9,6 @@ export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
9
9
  url?: string;
10
10
  urlTitle?: string;
11
11
  target?: HTMLAttributeAnchorTarget;
12
- metrikaGoals?: MetrikaGoal;
13
- pixelEvents?: ButtonPixel;
14
12
  qa?: string;
15
13
  extraProps?: React.HTMLAttributes<HTMLElement>;
16
14
  }
@@ -1,7 +1,6 @@
1
1
  import React, { Children, Fragment } from 'react';
2
2
  import { Link } from '@gravity-ui/uikit';
3
3
  import { useAnalytics } from '../../hooks';
4
- import { useMetrika } from '../../hooks/useMetrika';
5
4
  import { DefaultEventNames, } from '../../models';
6
5
  import { block, getQaAttrubutes } from '../../utils';
7
6
  import BackgroundImage from '../BackgroundImage/BackgroundImage';
@@ -12,8 +11,7 @@ const Header = () => null;
12
11
  const Content = () => null;
13
12
  const Footer = () => null;
14
13
  export const Layout = (props) => {
15
- const { className, bodyClassName, metrikaGoals, pixelEvents, analyticsEvents, contentClassName, children, url, target, border = 'shadow', urlTitle, qa, extraProps = {}, } = props;
16
- const handleMetrika = useMetrika();
14
+ const { className, bodyClassName, analyticsEvents, contentClassName, children, url, target, border = 'shadow', urlTitle, qa, extraProps = {}, } = props;
17
15
  const handleAnalytics = useAnalytics(DefaultEventNames.CardBase, url);
18
16
  let header, content, footer, image, headerClass, footerClass;
19
17
  const qaAttributes = getQaAttrubutes(qa, 'header', 'footer', 'body', 'content');
@@ -47,7 +45,6 @@ export const Layout = (props) => {
47
45
  footer && (React.createElement("div", { className: b('footer', footerClass), "data-qa": qaAttributes.footer }, footer)))));
48
46
  const fullClassName = b({ border }, className);
49
47
  const onClick = () => {
50
- handleMetrika({ metrikaGoals, pixelEvents });
51
48
  handleAnalytics(analyticsEvents);
52
49
  };
53
50
  return url ? (React.createElement(RouterLink, { href: url },
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Icon } from '@gravity-ui/uikit';
3
3
  import { block } from '../../utils';
4
- import i18n from './i18n';
4
+ import { i18n } from './i18n';
5
5
  import './Control.css';
6
6
  const b = block('control');
7
7
  export const defaultIconId = 'icon-test-id';
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "aria-label", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'Control';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Control`);
@@ -3,7 +3,7 @@ import { Icon, Modal } from '@gravity-ui/uikit';
3
3
  import { Fullscreen, PreviewClose } from '../../icons';
4
4
  import { block } from '../../utils';
5
5
  import Image from '../Image/Image';
6
- import i18n from './i18n';
6
+ import { i18n } from './i18n';
7
7
  import './FullscreenImage.css';
8
8
  const b = block('fullscreen-image');
9
9
  const FULL_SCREEN_ICON_SIZE = 18;
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "close" | "img-alt", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'FullscreenImage';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}FullscreenImage`);
@@ -1,18 +1,15 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useAnalytics } from '../../hooks';
3
- import { useMetrika } from '../../hooks/useMetrika';
4
3
  import { DefaultEventNames } from '../../models';
5
4
  import { block } from '../../utils';
6
5
  import './HeaderBreadcrumbs.css';
7
6
  const b = block('header-breadcrumbs');
8
7
  export default function HeaderBreadcrumbs(props) {
9
- const { items, metrikaGoals, pixelEvents, theme = 'light', className } = props;
10
- const handleMetrika = useMetrika();
8
+ const { items, theme = 'light', className, analyticsEvents } = props;
11
9
  const handleAnalytics = useAnalytics(DefaultEventNames.Breadcrumb);
12
10
  const onClick = useCallback(() => {
13
- handleAnalytics();
14
- handleMetrika({ metrikaGoals, pixelEvents });
15
- }, [handleAnalytics, handleMetrika, metrikaGoals, pixelEvents]);
11
+ handleAnalytics(analyticsEvents);
12
+ }, [analyticsEvents, handleAnalytics]);
16
13
  return (React.createElement("div", { className: b({ theme }, className) }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement("div", { className: b('item'), key: item.url },
17
14
  React.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
18
15
  }
@@ -3,7 +3,6 @@ import { Icon } from '@gravity-ui/uikit';
3
3
  import { LocaleContext } from '../../context/localeContext';
4
4
  import { LocationContext } from '../../context/locationContext';
5
5
  import { useAnalytics } from '../../hooks';
6
- import { useMetrika } from '../../hooks/useMetrika';
7
6
  import { Chevron } from '../../icons';
8
7
  import { DefaultEventNames, } from '../../models';
9
8
  import { block, getLinkProps, setUrlTld } from '../../utils';
@@ -26,16 +25,14 @@ function getArrowSize(size) {
26
25
  }
27
26
  }
28
27
  const LinkBlock = (props) => {
29
- const { text, url, arrow, metrikaGoals, pixelEvents, analyticsEvents, theme = 'file-link', colorTheme = 'light', textSize = 'm', className, target, children, tabIndex, qa, urlTitle, extraProps, } = props;
28
+ const { text, url, arrow, analyticsEvents, theme = 'file-link', colorTheme = 'light', textSize = 'm', className, target, children, tabIndex, qa, urlTitle, extraProps, } = props;
30
29
  const qaAttributes = getQaAttrubutes(qa, ['normal']);
31
- const handleMetrika = useMetrika();
32
30
  const handleAnalytics = useAnalytics(DefaultEventNames.Link, url);
33
31
  const { hostname } = useContext(LocationContext);
34
32
  const { tld } = useContext(LocaleContext);
35
33
  const href = setUrlTld(props.url, tld);
36
34
  const defaultTextSize = theme === 'back' ? 'l' : 'm';
37
35
  const onClick = () => {
38
- handleMetrika({ metrikaGoals, pixelEvents });
39
36
  handleAnalytics(analyticsEvents);
40
37
  };
41
38
  const getLinkByType = () => {
@@ -1,10 +1,10 @@
1
1
  import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Lang } from '@gravity-ui/uikit';
2
3
  import debounce from 'lodash/debounce';
3
4
  import { LocaleContext } from '../../context/localeContext/localeContext';
4
5
  import { MapsContext } from '../../context/mapsContext/mapsContext';
5
6
  import { MobileContext } from '../../context/mobileContext';
6
7
  import { block } from '../../utils';
7
- import { Lang } from '../../utils/configure';
8
8
  import { getMapHeight } from './helpers';
9
9
  const b = block('map');
10
10
  function getScriptSrc(params) {
@@ -9,7 +9,7 @@ import ErrorWrapper from '../../ErrorWrapper/ErrorWrapper';
9
9
  import { getMapHeight } from '../helpers';
10
10
  import { YMap } from './YMap';
11
11
  import { MapApiStatus, YMapsApiLoader } from './YandexMapApiLoader';
12
- import i18n from './i18n';
12
+ import { i18n } from './i18n';
13
13
  const b = block('map');
14
14
  const DEFAULT_CONTAINER_ID = 'ymap';
15
15
  const DEFAULT_ZOOM = 9;
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "map-load-error" | "map-try-again", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../../utils/registerKeyset';
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 COMPONENT = 'Map';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Map`);
@@ -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 { unifyDataLensToObject } from './utils';
5
5
  import './DataLens.css';
6
6
  const b = block('media-component-data-lens');
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
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 { registerKeyset } from '../../../../utils/registerKeyset';
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 COMPONENT = 'DataLens';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}DataLens`);
@@ -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 './Iframe.css';
5
5
  const b = block('media-component-iframe');
6
6
  const Iframe = (props) => {
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
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 { registerKeyset } from '../../../../utils/registerKeyset';
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 COMPONENT = 'Iframe';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Iframe`);
@@ -9,7 +9,7 @@ import Video from './Video/Video';
9
9
  import './Media.css';
10
10
  const b = block('Media');
11
11
  export const Media = (props) => {
12
- const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
12
+ const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
13
13
  const [hasVideoFallback, setHasVideoFallback] = useState(false);
14
14
  const qaAttributes = getQaAttrubutes(qa, 'video');
15
15
  const content = useMemo(() => {
@@ -23,7 +23,6 @@ export const Media = (props) => {
23
23
  video,
24
24
  videoClassName,
25
25
  height,
26
- metrika,
27
26
  analyticsEvents,
28
27
  playVideo,
29
28
  previewImg,
@@ -66,7 +65,6 @@ export const Media = (props) => {
66
65
  qaAttributes.video,
67
66
  onImageLoad,
68
67
  videoClassName,
69
- metrika,
70
68
  analyticsEvents,
71
69
  playVideo,
72
70
  previewImg,
@@ -6,7 +6,7 @@ import ReactPlayerBlock from '../../ReactPlayer/ReactPlayer';
6
6
  import './Video.css';
7
7
  const b = block('media-component-video');
8
8
  const Video = (props) => {
9
- const { video, height, metrika, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback, hasVideoFallback, qa, ratio, } = props;
9
+ const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback, hasVideoFallback, qa, ratio, } = props;
10
10
  const qaAttributes = getQaAttrubutes(qa, 'source');
11
11
  const ref = useRef(null);
12
12
  useEffect(() => {
@@ -30,7 +30,7 @@ const Video = (props) => {
30
30
  }, [playVideo, video, setHasVideoFallback]);
31
31
  const reactPlayerBlock = useMemo(() => {
32
32
  const { src, loop, controls, muted, autoplay = true, elapsedTime, playButton, ariaLabel, customControlsOptions, } = video;
33
- return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, metrika: metrika, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio }));
33
+ return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio }));
34
34
  }, [
35
35
  video,
36
36
  height,
@@ -39,7 +39,6 @@ const Video = (props) => {
39
39
  playVideo,
40
40
  commonPlayButton,
41
41
  customBarControlsClassName,
42
- metrika,
43
42
  analyticsEvents,
44
43
  ratio,
45
44
  ]);
@@ -2,7 +2,7 @@ import React, { createRef } from 'react';
2
2
  import debounce from 'lodash/debounce';
3
3
  import { ToggleArrow } from '..';
4
4
  import { block } from '../../utils';
5
- import i18n from './i18n';
5
+ import { i18n } from './i18n';
6
6
  import './OverflowScroller.css';
7
7
  const b = block('overflow-scroller');
8
8
  const TRANSITION_TIME = 300;
@@ -1,2 +1 @@
1
- declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
- export default _default;
1
+ export declare const i18n: (key: "left" | "right", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { registerKeyset } from '../../../utils/registerKeyset';
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 COMPONENT = 'OverflowScroller';
5
- export default registerKeyset({ en, ru }, COMPONENT);
5
+ export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}OverflowScroller`);
@@ -6,7 +6,7 @@ import { Unmute } from '../../icons/Unmute';
6
6
  import { CustomControlsType } from '../../models';
7
7
  import { block } from '../../utils';
8
8
  import CircleProgress from './CircleProgress';
9
- import i18n from './i18n';
9
+ import { i18n } from './i18n';
10
10
  import './CustomBarControls.css';
11
11
  const b = block('CustomBarControls');
12
12
  const playIconsMap = {