@gravity-ui/page-constructor 1.13.0-alpha.0 → 1.13.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 (46) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/build/cjs/blocks/Banner/schema.d.ts +0 -141
  3. package/build/cjs/blocks/Media/schema.d.ts +0 -47
  4. package/build/cjs/blocks/Slider/Slider.d.ts +1 -6
  5. package/build/cjs/components/Author/Author.js +2 -2
  6. package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
  7. package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
  8. package/build/cjs/components/Button/Button.js +3 -3
  9. package/build/cjs/components/CardBase/CardBase.d.ts +1 -2
  10. package/build/cjs/components/CardBase/CardBase.js +2 -2
  11. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -2
  12. package/build/cjs/components/Link/Link.js +2 -2
  13. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +1 -2
  14. package/build/cjs/grid/Grid/Grid.css +16 -16
  15. package/build/cjs/hooks/useMetrika.d.ts +2 -3
  16. package/build/cjs/hooks/useMetrika.js +2 -10
  17. package/build/cjs/models/common.d.ts +1 -4
  18. package/build/cjs/models/constructor-items/common.d.ts +1 -21
  19. package/build/cjs/schema/validators/common.d.ts +0 -94
  20. package/build/cjs/schema/validators/common.js +0 -2
  21. package/build/esm/blocks/Banner/schema.d.ts +0 -141
  22. package/build/esm/blocks/Media/schema.d.ts +0 -47
  23. package/build/esm/blocks/Slider/Slider.d.ts +1 -6
  24. package/build/esm/components/Author/Author.js +2 -2
  25. package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
  26. package/build/esm/components/Author/__tests__/Author.test.js +46 -0
  27. package/build/esm/components/Button/Button.js +3 -3
  28. package/build/esm/components/CardBase/CardBase.d.ts +1 -2
  29. package/build/esm/components/CardBase/CardBase.js +2 -2
  30. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -2
  31. package/build/esm/components/Link/Link.js +2 -2
  32. package/build/esm/context/metrikaContext/metrikaContext.d.ts +1 -2
  33. package/build/esm/grid/Grid/Grid.css +16 -16
  34. package/build/esm/hooks/useMetrika.d.ts +2 -3
  35. package/build/esm/hooks/useMetrika.js +2 -10
  36. package/build/esm/models/common.d.ts +1 -4
  37. package/build/esm/models/constructor-items/common.d.ts +1 -21
  38. package/build/esm/schema/validators/common.d.ts +0 -94
  39. package/build/esm/schema/validators/common.js +0 -2
  40. package/package.json +2 -6
  41. package/server/models/common.d.ts +1 -4
  42. package/server/models/constructor-items/common.d.ts +1 -21
  43. package/build/cjs/schema/validators/ga-events.d.ts +0 -47
  44. package/build/cjs/schema/validators/ga-events.js +0 -50
  45. package/build/esm/schema/validators/ga-events.d.ts +0 -47
  46. package/build/esm/schema/validators/ga-events.js +0 -47
@@ -121,7 +121,6 @@ export interface LinkProps extends Stylable {
121
121
  target?: string;
122
122
  metrikaGoals?: MetrikaGoal;
123
123
  pixelEvents?: ButtonPixel;
124
- gaEvents?: GAEvents;
125
124
  }
126
125
  export interface FileLinkProps extends ClassNameProps {
127
126
  href: string;
@@ -140,7 +139,6 @@ export interface ButtonProps {
140
139
  img?: ButtonImageProps | string;
141
140
  metrikaGoals?: MetrikaGoal;
142
141
  pixelEvents?: ButtonPixel;
143
- gaEvents?: GAEvents;
144
142
  target?: string;
145
143
  }
146
144
  export interface ButtonImageProps {
@@ -224,7 +222,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
224
222
  theme?: TextTheme;
225
223
  metrikaGoals?: MetrikaGoal;
226
224
  pixelEvents?: ButtonPixel;
227
- gaEvents?: GAEvents;
228
225
  }
229
226
  export interface PreviewContentItemProps {
230
227
  title: string;
@@ -335,27 +332,10 @@ export interface AuthorProps {
335
332
  className?: string;
336
333
  authorContainerClassName?: string;
337
334
  type?: AuthorType;
335
+ dataQa?: string;
338
336
  }
339
337
  export interface BlockHeaderProps {
340
338
  title?: TitleProps | string;
341
339
  description?: string;
342
340
  }
343
- export declare type GaParameterValue = string | number | boolean;
344
- declare type GACommandConfig<T> = T & {
345
- [key: string]: GaParameterValue;
346
- };
347
- declare type GACommonParams = {
348
- groups?: string | string[];
349
- sendTo?: string | string[];
350
- eventTimeout?: number;
351
- };
352
- export declare type GAEventParams = GACommandConfig<GACommonParams & {
353
- eventCategory?: string;
354
- eventLabel?: string;
355
- value?: number;
356
- }>;
357
- export type GAEvent = GAEventParams & {
358
- eventName: string;
359
- };
360
- export type GAEvents = GAEvent | GAEvent[];
361
341
  export {};
@@ -499,53 +499,6 @@ export declare const ButtonProps: {
499
499
  };
500
500
  };
501
501
  };
502
- gaEvents: {
503
- type: string;
504
- items: {
505
- type: string;
506
- required: string[];
507
- additionalProperties: boolean;
508
- properties: {
509
- eventName: {
510
- type: string;
511
- };
512
- eventCategory: {
513
- type: string;
514
- };
515
- eventLabel: {
516
- type: string;
517
- };
518
- value: {
519
- type: string;
520
- };
521
- groups: {
522
- oneOf: ({
523
- type: string;
524
- items?: undefined;
525
- } | {
526
- type: string;
527
- items: {
528
- type: string;
529
- };
530
- })[];
531
- };
532
- sendTo: {
533
- oneOf: ({
534
- type: string;
535
- items?: undefined;
536
- } | {
537
- type: string;
538
- items: {
539
- type: string;
540
- };
541
- })[];
542
- };
543
- eventTimeout: {
544
- type: string;
545
- };
546
- };
547
- };
548
- };
549
502
  target: {
550
503
  type: string;
551
504
  enum: string[];
@@ -761,53 +714,6 @@ export declare const ButtonBlock: {
761
714
  };
762
715
  };
763
716
  };
764
- gaEvents: {
765
- type: string;
766
- items: {
767
- type: string;
768
- required: string[];
769
- additionalProperties: boolean;
770
- properties: {
771
- eventName: {
772
- type: string;
773
- };
774
- eventCategory: {
775
- type: string;
776
- };
777
- eventLabel: {
778
- type: string;
779
- };
780
- value: {
781
- type: string;
782
- };
783
- groups: {
784
- oneOf: ({
785
- type: string;
786
- items?: undefined;
787
- } | {
788
- type: string;
789
- items: {
790
- type: string;
791
- };
792
- })[];
793
- };
794
- sendTo: {
795
- oneOf: ({
796
- type: string;
797
- items?: undefined;
798
- } | {
799
- type: string;
800
- items: {
801
- type: string;
802
- };
803
- })[];
804
- };
805
- eventTimeout: {
806
- type: string;
807
- };
808
- };
809
- };
810
- };
811
717
  target: {
812
718
  type: string;
813
719
  enum: string[];
@@ -1,4 +1,3 @@
1
- import { gaEvents } from './ga-events';
2
1
  import { pixelEvents } from './pixel';
3
2
  import { Theme } from '../../models';
4
3
  import { ImageProps, urlPattern } from '../../components/Image/schema';
@@ -330,7 +329,6 @@ export const ButtonProps = {
330
329
  ],
331
330
  },
332
331
  pixelEvents,
333
- gaEvents,
334
332
  target: {
335
333
  type: 'string',
336
334
  enum: ['_self', '_blank', '_parent', '_top'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.13.0-alpha.0",
3
+ "version": "1.13.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -66,7 +66,7 @@
66
66
  "devDependencies": {
67
67
  "@commitlint/cli": "^17.1.2",
68
68
  "@commitlint/config-conventional": "^17.1.0",
69
- "@doc-tools/transform": "^2.12.0",
69
+ "@doc-tools/transform": "2.12.0",
70
70
  "@gravity-ui/eslint-config": "^1.0.2",
71
71
  "@gravity-ui/prettier-config": "^1.0.1",
72
72
  "@gravity-ui/stylelint-config": "^1.0.0",
@@ -103,7 +103,6 @@
103
103
  "lint-staged": "^11.2.6",
104
104
  "markdown-loader": "^6.0.0",
105
105
  "move-file-cli": "^3.0.0",
106
- "mq-polyfill": "^1.1.8",
107
106
  "npm-run-all": "^4.1.5",
108
107
  "postcss": "^8.4.16",
109
108
  "postcss-scss": "^4.0.4",
@@ -133,8 +132,5 @@
133
132
  "*.{json,yaml,yml,md}": [
134
133
  "prettier --write"
135
134
  ]
136
- },
137
- "publishConfig": {
138
- "tag": "alpha"
139
135
  }
140
136
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { GAEventParams, MetrikaGoal } from './';
2
+ import { MetrikaGoal } from './';
3
3
  export interface Refable<T> {
4
4
  ref?: React.Ref<T>;
5
5
  }
@@ -45,9 +45,6 @@ export interface Metrika {
45
45
  reachGoal: (counterName: string, ...args: any) => void;
46
46
  reachGoals: (goals: MetrikaGoal, counterName?: string) => void;
47
47
  }
48
- export interface GaInline {
49
- event: (eventName: string, params?: GAEventParams) => void;
50
- }
51
48
  export interface ClassNameProps {
52
49
  className?: string;
53
50
  }
@@ -121,7 +121,6 @@ export interface LinkProps extends Stylable {
121
121
  target?: string;
122
122
  metrikaGoals?: MetrikaGoal;
123
123
  pixelEvents?: ButtonPixel;
124
- gaEvents?: GAEvents;
125
124
  }
126
125
  export interface FileLinkProps extends ClassNameProps {
127
126
  href: string;
@@ -140,7 +139,6 @@ export interface ButtonProps {
140
139
  img?: ButtonImageProps | string;
141
140
  metrikaGoals?: MetrikaGoal;
142
141
  pixelEvents?: ButtonPixel;
143
- gaEvents?: GAEvents;
144
142
  target?: string;
145
143
  }
146
144
  export interface ButtonImageProps {
@@ -224,7 +222,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
224
222
  theme?: TextTheme;
225
223
  metrikaGoals?: MetrikaGoal;
226
224
  pixelEvents?: ButtonPixel;
227
- gaEvents?: GAEvents;
228
225
  }
229
226
  export interface PreviewContentItemProps {
230
227
  title: string;
@@ -335,27 +332,10 @@ export interface AuthorProps {
335
332
  className?: string;
336
333
  authorContainerClassName?: string;
337
334
  type?: AuthorType;
335
+ dataQa?: string;
338
336
  }
339
337
  export interface BlockHeaderProps {
340
338
  title?: TitleProps | string;
341
339
  description?: string;
342
340
  }
343
- export declare type GaParameterValue = string | number | boolean;
344
- declare type GACommandConfig<T> = T & {
345
- [key: string]: GaParameterValue;
346
- };
347
- declare type GACommonParams = {
348
- groups?: string | string[];
349
- sendTo?: string | string[];
350
- eventTimeout?: number;
351
- };
352
- export declare type GAEventParams = GACommandConfig<GACommonParams & {
353
- eventCategory?: string;
354
- eventLabel?: string;
355
- value?: number;
356
- }>;
357
- export type GAEvent = GAEventParams & {
358
- eventName: string;
359
- };
360
- export type GAEvents = GAEvent | GAEvent[];
361
341
  export {};
@@ -1,47 +0,0 @@
1
- export declare const gaEvents: {
2
- type: string;
3
- items: {
4
- type: string;
5
- required: string[];
6
- additionalProperties: boolean;
7
- properties: {
8
- eventName: {
9
- type: string;
10
- };
11
- eventCategory: {
12
- type: string;
13
- };
14
- eventLabel: {
15
- type: string;
16
- };
17
- value: {
18
- type: string;
19
- };
20
- groups: {
21
- oneOf: ({
22
- type: string;
23
- items?: undefined;
24
- } | {
25
- type: string;
26
- items: {
27
- type: string;
28
- };
29
- })[];
30
- };
31
- sendTo: {
32
- oneOf: ({
33
- type: string;
34
- items?: undefined;
35
- } | {
36
- type: string;
37
- items: {
38
- type: string;
39
- };
40
- })[];
41
- };
42
- eventTimeout: {
43
- type: string;
44
- };
45
- };
46
- };
47
- };
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gaEvents = void 0;
4
- exports.gaEvents = {
5
- type: 'array',
6
- items: {
7
- type: 'object',
8
- required: ['eventName'],
9
- additionalProperties: false,
10
- properties: {
11
- eventName: {
12
- type: 'string',
13
- },
14
- eventCategory: {
15
- type: 'string',
16
- },
17
- eventLabel: {
18
- type: 'string',
19
- },
20
- value: {
21
- type: 'number',
22
- },
23
- groups: {
24
- oneOf: [
25
- { type: 'string' },
26
- {
27
- type: 'array',
28
- items: {
29
- type: 'string',
30
- },
31
- },
32
- ],
33
- },
34
- sendTo: {
35
- oneOf: [
36
- { type: 'string' },
37
- {
38
- type: 'array',
39
- items: {
40
- type: 'string',
41
- },
42
- },
43
- ],
44
- },
45
- eventTimeout: {
46
- type: 'number',
47
- },
48
- },
49
- },
50
- };
@@ -1,47 +0,0 @@
1
- export declare const gaEvents: {
2
- type: string;
3
- items: {
4
- type: string;
5
- required: string[];
6
- additionalProperties: boolean;
7
- properties: {
8
- eventName: {
9
- type: string;
10
- };
11
- eventCategory: {
12
- type: string;
13
- };
14
- eventLabel: {
15
- type: string;
16
- };
17
- value: {
18
- type: string;
19
- };
20
- groups: {
21
- oneOf: ({
22
- type: string;
23
- items?: undefined;
24
- } | {
25
- type: string;
26
- items: {
27
- type: string;
28
- };
29
- })[];
30
- };
31
- sendTo: {
32
- oneOf: ({
33
- type: string;
34
- items?: undefined;
35
- } | {
36
- type: string;
37
- items: {
38
- type: string;
39
- };
40
- })[];
41
- };
42
- eventTimeout: {
43
- type: string;
44
- };
45
- };
46
- };
47
- };
@@ -1,47 +0,0 @@
1
- export const gaEvents = {
2
- type: 'array',
3
- items: {
4
- type: 'object',
5
- required: ['eventName'],
6
- additionalProperties: false,
7
- properties: {
8
- eventName: {
9
- type: 'string',
10
- },
11
- eventCategory: {
12
- type: 'string',
13
- },
14
- eventLabel: {
15
- type: 'string',
16
- },
17
- value: {
18
- type: 'number',
19
- },
20
- groups: {
21
- oneOf: [
22
- { type: 'string' },
23
- {
24
- type: 'array',
25
- items: {
26
- type: 'string',
27
- },
28
- },
29
- ],
30
- },
31
- sendTo: {
32
- oneOf: [
33
- { type: 'string' },
34
- {
35
- type: 'array',
36
- items: {
37
- type: 'string',
38
- },
39
- },
40
- ],
41
- },
42
- eventTimeout: {
43
- type: 'number',
44
- },
45
- },
46
- },
47
- };