@gravity-ui/page-constructor 1.14.0-alpha.1 → 1.14.0-alpha.3

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 (88) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/cjs/blocks/Banner/schema.d.ts +0 -321
  3. package/build/cjs/blocks/Media/schema.d.ts +0 -107
  4. package/build/cjs/components/Button/Button.js +2 -5
  5. package/build/cjs/components/CardBase/CardBase.d.ts +0 -2
  6. package/build/cjs/components/CardBase/CardBase.js +1 -4
  7. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
  8. package/build/cjs/components/Link/Link.js +1 -4
  9. package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -2
  10. package/build/cjs/components/YandexForm/YandexForm.js +2 -13
  11. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  12. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  13. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
  14. package/build/cjs/hooks/useMetrika.d.ts +0 -6
  15. package/build/cjs/hooks/useMetrika.js +0 -8
  16. package/build/cjs/models/common.d.ts +0 -30
  17. package/build/cjs/models/common.js +0 -3
  18. package/build/cjs/models/constructor-items/common.d.ts +1 -4
  19. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -2
  20. package/build/cjs/models/navigation.d.ts +1 -3
  21. package/build/cjs/navigation/components/Header/Header.css +5 -3
  22. package/build/cjs/navigation/components/Logo/Logo.css +5 -6
  23. package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -0
  24. package/build/cjs/navigation/schema.d.ts +117 -0
  25. package/build/cjs/navigation/schema.js +85 -0
  26. package/build/cjs/schema/index.d.ts +115 -0
  27. package/build/cjs/schema/index.js +2 -1
  28. package/build/cjs/schema/validators/common.d.ts +0 -226
  29. package/build/cjs/schema/validators/common.js +0 -10
  30. package/build/cjs/schema/validators/index.d.ts +2 -0
  31. package/build/cjs/schema/validators/index.js +2 -0
  32. package/build/cjs/schema/validators/navigation.d.ts +1 -0
  33. package/build/cjs/{context/analyticsContext/index.js → schema/validators/navigation.js} +1 -1
  34. package/build/cjs/sub-blocks/HubspotForm/index.js +2 -14
  35. package/build/esm/blocks/Banner/schema.d.ts +0 -321
  36. package/build/esm/blocks/Media/schema.d.ts +0 -107
  37. package/build/esm/components/Button/Button.js +2 -5
  38. package/build/esm/components/CardBase/CardBase.d.ts +0 -2
  39. package/build/esm/components/CardBase/CardBase.js +1 -4
  40. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
  41. package/build/esm/components/Link/Link.js +1 -4
  42. package/build/esm/components/YandexForm/YandexForm.d.ts +0 -2
  43. package/build/esm/components/YandexForm/YandexForm.js +2 -13
  44. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  45. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  46. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
  47. package/build/esm/hooks/useMetrika.d.ts +0 -6
  48. package/build/esm/hooks/useMetrika.js +0 -8
  49. package/build/esm/models/common.d.ts +0 -30
  50. package/build/esm/models/common.js +0 -3
  51. package/build/esm/models/constructor-items/common.d.ts +1 -4
  52. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -2
  53. package/build/esm/models/navigation.d.ts +1 -3
  54. package/build/esm/navigation/components/Header/Header.css +5 -3
  55. package/build/esm/navigation/components/Logo/Logo.css +5 -6
  56. package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -0
  57. package/build/esm/navigation/schema.d.ts +117 -0
  58. package/build/esm/navigation/schema.js +82 -0
  59. package/build/esm/schema/index.d.ts +115 -0
  60. package/build/esm/schema/index.js +2 -1
  61. package/build/esm/schema/validators/common.d.ts +0 -226
  62. package/build/esm/schema/validators/common.js +0 -10
  63. package/build/esm/schema/validators/index.d.ts +2 -0
  64. package/build/esm/schema/validators/index.js +2 -0
  65. package/build/esm/schema/validators/navigation.d.ts +1 -0
  66. package/build/esm/schema/validators/navigation.js +1 -0
  67. package/build/esm/sub-blocks/HubspotForm/index.js +2 -14
  68. package/package.json +1 -1
  69. package/server/models/common.d.ts +0 -30
  70. package/server/models/common.js +0 -3
  71. package/server/models/constructor-items/common.d.ts +1 -4
  72. package/server/models/constructor-items/sub-blocks.d.ts +1 -2
  73. package/server/models/navigation.d.ts +1 -3
  74. package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
  75. package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
  76. package/build/cjs/context/analyticsContext/index.d.ts +0 -1
  77. package/build/cjs/hooks/useAnalytics.d.ts +0 -2
  78. package/build/cjs/hooks/useAnalytics.js +0 -15
  79. package/build/cjs/schema/validators/event.d.ts +0 -50
  80. package/build/cjs/schema/validators/event.js +0 -53
  81. package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
  82. package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
  83. package/build/esm/context/analyticsContext/index.d.ts +0 -1
  84. package/build/esm/context/analyticsContext/index.js +0 -1
  85. package/build/esm/hooks/useAnalytics.d.ts +0 -2
  86. package/build/esm/hooks/useAnalytics.js +0 -11
  87. package/build/esm/schema/validators/event.d.ts +0 -50
  88. package/build/esm/schema/validators/event.js +0 -50
@@ -414,9 +414,6 @@ export declare const ButtonProps: {
414
414
  };
415
415
  })[];
416
416
  };
417
- /**
418
- * @deprecated Metrika will be deleted
419
- */
420
417
  metrikaGoals: {
421
418
  anyOf: ({
422
419
  type: string;
@@ -446,9 +443,6 @@ export declare const ButtonProps: {
446
443
  };
447
444
  })[];
448
445
  };
449
- /**
450
- * @deprecated Pixel will be deleted
451
- */
452
446
  pixelEvents: {
453
447
  type: string;
454
448
  items: {
@@ -505,113 +499,6 @@ export declare const ButtonProps: {
505
499
  };
506
500
  };
507
501
  };
508
- events: {
509
- anyOf: ({
510
- type: {
511
- type: string;
512
- additionalProperties: boolean;
513
- required: string[];
514
- properties: {
515
- name: {
516
- type: string;
517
- };
518
- type: {
519
- type: string;
520
- };
521
- counters: {
522
- type: string;
523
- additionalProperties: boolean;
524
- required: never[];
525
- properties: {
526
- include: {
527
- type: string;
528
- items: string;
529
- };
530
- exclude: {
531
- type: string;
532
- items: string;
533
- };
534
- };
535
- };
536
- category: {
537
- type: string;
538
- };
539
- label: {
540
- type: string;
541
- };
542
- params: {
543
- type: string;
544
- items: {
545
- type: string;
546
- additionalProperties: boolean;
547
- required: string[];
548
- properties: {
549
- key: {
550
- type: string;
551
- };
552
- value: {
553
- type: string;
554
- };
555
- };
556
- };
557
- };
558
- };
559
- };
560
- items?: undefined;
561
- } | {
562
- type: string;
563
- items: {
564
- type: string;
565
- additionalProperties: boolean;
566
- required: string[];
567
- properties: {
568
- name: {
569
- type: string;
570
- };
571
- type: {
572
- type: string;
573
- };
574
- counters: {
575
- type: string;
576
- additionalProperties: boolean;
577
- required: never[];
578
- properties: {
579
- include: {
580
- type: string;
581
- items: string;
582
- };
583
- exclude: {
584
- type: string;
585
- items: string;
586
- };
587
- };
588
- };
589
- category: {
590
- type: string;
591
- };
592
- label: {
593
- type: string;
594
- };
595
- params: {
596
- type: string;
597
- items: {
598
- type: string;
599
- additionalProperties: boolean;
600
- required: string[];
601
- properties: {
602
- key: {
603
- type: string;
604
- };
605
- value: {
606
- type: string;
607
- };
608
- };
609
- };
610
- };
611
- };
612
- };
613
- })[];
614
- };
615
502
  target: {
616
503
  type: string;
617
504
  enum: string[];
@@ -742,9 +629,6 @@ export declare const ButtonBlock: {
742
629
  };
743
630
  })[];
744
631
  };
745
- /**
746
- * @deprecated Metrika will be deleted
747
- */
748
632
  metrikaGoals: {
749
633
  anyOf: ({
750
634
  type: string;
@@ -774,9 +658,6 @@ export declare const ButtonBlock: {
774
658
  };
775
659
  })[];
776
660
  };
777
- /**
778
- * @deprecated Pixel will be deleted
779
- */
780
661
  pixelEvents: {
781
662
  type: string;
782
663
  items: {
@@ -833,113 +714,6 @@ export declare const ButtonBlock: {
833
714
  };
834
715
  };
835
716
  };
836
- events: {
837
- anyOf: ({
838
- type: {
839
- type: string;
840
- additionalProperties: boolean;
841
- required: string[];
842
- properties: {
843
- name: {
844
- type: string;
845
- };
846
- type: {
847
- type: string;
848
- };
849
- counters: {
850
- type: string;
851
- additionalProperties: boolean;
852
- required: never[];
853
- properties: {
854
- include: {
855
- type: string;
856
- items: string;
857
- };
858
- exclude: {
859
- type: string;
860
- items: string;
861
- };
862
- };
863
- };
864
- category: {
865
- type: string;
866
- };
867
- label: {
868
- type: string;
869
- };
870
- params: {
871
- type: string;
872
- items: {
873
- type: string;
874
- additionalProperties: boolean;
875
- required: string[];
876
- properties: {
877
- key: {
878
- type: string;
879
- };
880
- value: {
881
- type: string;
882
- };
883
- };
884
- };
885
- };
886
- };
887
- };
888
- items?: undefined;
889
- } | {
890
- type: string;
891
- items: {
892
- type: string;
893
- additionalProperties: boolean;
894
- required: string[];
895
- properties: {
896
- name: {
897
- type: string;
898
- };
899
- type: {
900
- type: string;
901
- };
902
- counters: {
903
- type: string;
904
- additionalProperties: boolean;
905
- required: never[];
906
- properties: {
907
- include: {
908
- type: string;
909
- items: string;
910
- };
911
- exclude: {
912
- type: string;
913
- items: string;
914
- };
915
- };
916
- };
917
- category: {
918
- type: string;
919
- };
920
- label: {
921
- type: string;
922
- };
923
- params: {
924
- type: string;
925
- items: {
926
- type: string;
927
- additionalProperties: boolean;
928
- required: string[];
929
- properties: {
930
- key: {
931
- type: string;
932
- };
933
- value: {
934
- type: string;
935
- };
936
- };
937
- };
938
- };
939
- };
940
- };
941
- })[];
942
- };
943
717
  target: {
944
718
  type: string;
945
719
  enum: string[];
@@ -4,7 +4,6 @@ exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.Butto
4
4
  const pixel_1 = require("./pixel");
5
5
  const models_1 = require("../../models");
6
6
  const schema_1 = require("../../components/Image/schema");
7
- const event_1 = require("./event");
8
7
  exports.mediaDirection = ['media-content', 'content-media'];
9
8
  exports.textSize = ['s', 'm', 'l'];
10
9
  exports.containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -310,9 +309,6 @@ exports.ButtonProps = {
310
309
  },
311
310
  ],
312
311
  },
313
- /**
314
- * @deprecated Metrika will be deleted
315
- */
316
312
  metrikaGoals: {
317
313
  anyOf: [
318
314
  { type: 'string' },
@@ -335,13 +331,7 @@ exports.ButtonProps = {
335
331
  },
336
332
  ],
337
333
  },
338
- /**
339
- * @deprecated Pixel will be deleted
340
- */
341
334
  pixelEvents: pixel_1.pixelEvents,
342
- events: {
343
- anyOf: [{ type: event_1.AnalyticsEventSchema }, { type: 'array', items: event_1.AnalyticsEventSchema }],
344
- },
345
335
  target: {
346
336
  type: 'string',
347
337
  enum: ['_self', '_blank', '_parent', '_top'],
@@ -3,10 +3,12 @@ import * as common from './common';
3
3
  import * as subBlocks from './sub-blocks';
4
4
  import * as pixel from './pixel';
5
5
  import * as utils from './utils';
6
+ import * as navigation from './navigation';
6
7
  export declare const validators: {
7
8
  blocks: typeof blocks;
8
9
  common: typeof common;
9
10
  subBlocks: typeof subBlocks;
10
11
  pixel: typeof pixel;
11
12
  utils: typeof utils;
13
+ navigation: typeof navigation;
12
14
  };
@@ -7,10 +7,12 @@ const common = tslib_1.__importStar(require("./common"));
7
7
  const subBlocks = tslib_1.__importStar(require("./sub-blocks"));
8
8
  const pixel = tslib_1.__importStar(require("./pixel"));
9
9
  const utils = tslib_1.__importStar(require("./utils"));
10
+ const navigation = tslib_1.__importStar(require("./navigation"));
10
11
  exports.validators = {
11
12
  blocks,
12
13
  common,
13
14
  subBlocks,
14
15
  pixel,
15
16
  utils,
17
+ navigation,
16
18
  };
@@ -0,0 +1 @@
1
+ export * from '../../navigation/schema';
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./analyticsContext"), exports);
4
+ tslib_1.__exportStar(require("../../navigation/schema"), exports);
@@ -8,14 +8,12 @@ const mobileContext_1 = require("../../context/mobileContext");
8
8
  const useMetrika_1 = require("../../hooks/useMetrika");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
11
- const useAnalytics_1 = require("../../hooks/useAnalytics");
12
11
  const b = (0, utils_1.block)('hubspot-form');
13
12
  const HubspotForm = (props) => {
14
13
  const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
15
14
  // hubspotEvents, // TODO: decide how to handle them
16
- analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, } = props;
15
+ onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, } = props;
17
16
  const handleMetrika = (0, useMetrika_1.useMetrika)();
18
- const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
19
17
  const { themeValue } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
20
18
  const isMobileValue = (0, react_1.useContext)(mobileContext_1.MobileContext);
21
19
  const theme = themeProp !== null && themeProp !== void 0 ? themeProp : themeValue;
@@ -26,19 +24,9 @@ const HubspotForm = (props) => {
26
24
  onLoad,
27
25
  onSubmit: (e) => {
28
26
  handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
29
- handleAnalytics(analyticsEvents);
30
27
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
31
28
  },
32
- }), [
33
- onBeforeLoad,
34
- onBeforeSubmit,
35
- onLoad,
36
- handleMetrika,
37
- pixelEvents,
38
- handleAnalytics,
39
- analyticsEvents,
40
- onSubmit,
41
- ]);
29
+ }), [onBeforeLoad, onBeforeSubmit, onLoad, handleMetrika, pixelEvents, onSubmit]);
42
30
  (0, hooks_1.useHandleHubspotEvents)(handlers, formId);
43
31
  return (react_1.default.createElement(HubspotFormContainer_1.default, { key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
44
32
  };