@gravity-ui/page-constructor 3.0.0-alpha.6 → 3.1.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 (109) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +16 -1
  3. package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
  4. package/build/cjs/blocks/CardLayout/schema.d.ts +2 -2
  5. package/build/cjs/blocks/CardLayout/schema.js +1 -1
  6. package/build/cjs/blocks/FilterBlock/FilterBlock.js +9 -13
  7. package/build/cjs/blocks/Header/schema.d.ts +243 -0
  8. package/build/cjs/blocks/HeaderSlider/schema.d.ts +81 -0
  9. package/build/cjs/blocks/Media/schema.d.ts +162 -0
  10. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +81 -0
  11. package/build/cjs/blocks/Slider/Slider.js +1 -1
  12. package/build/cjs/blocks/Tabs/schema.d.ts +81 -0
  13. package/build/cjs/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
  14. package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +3 -3
  15. package/build/cjs/components/FullscreenImage/FullscreenImage.js +7 -7
  16. package/build/cjs/components/FullscreenImage/i18n/index.js +1 -1
  17. package/build/cjs/components/FullscreenMedia/FullscreenMedia.d.ts +9 -0
  18. package/build/cjs/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +5 -5
  19. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
  20. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.js +10 -0
  21. package/build/cjs/components/Media/Image/Image.d.ts +1 -0
  22. package/build/cjs/components/Media/Image/Image.js +10 -3
  23. package/build/cjs/components/Media/Media.js +25 -5
  24. package/build/cjs/components/Media/Video/Video.d.ts +1 -1
  25. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +3 -2
  26. package/build/cjs/components/VideoBlock/VideoBlock.js +8 -4
  27. package/build/cjs/components/index.d.ts +1 -1
  28. package/build/cjs/components/index.js +3 -3
  29. package/build/cjs/constructor-items.d.ts +1 -1
  30. package/build/cjs/grid/Col/Col.d.ts +1 -1
  31. package/build/cjs/icons/Fullscreen.d.ts +2 -0
  32. package/build/cjs/icons/{FullScreen.js → Fullscreen.js} +3 -3
  33. package/build/cjs/icons/index.d.ts +1 -1
  34. package/build/cjs/icons/index.js +1 -1
  35. package/build/cjs/models/common.d.ts +2 -1
  36. package/build/cjs/models/common.js +1 -0
  37. package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
  38. package/build/cjs/models/constructor-items/common.d.ts +1 -1
  39. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
  40. package/build/cjs/schema/validators/common.d.ts +81 -0
  41. package/build/cjs/schema/validators/common.js +6 -0
  42. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  43. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +4 -4
  44. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +82 -1
  45. package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
  46. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +2 -2
  47. package/build/cjs/sub-blocks/LayoutItem/utils.js +6 -6
  48. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +85 -0
  49. package/build/cjs/sub-blocks/MediaCard/schema.js +1 -1
  50. package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
  51. package/build/esm/blocks/CardLayout/schema.d.ts +2 -2
  52. package/build/esm/blocks/CardLayout/schema.js +1 -1
  53. package/build/esm/blocks/FilterBlock/FilterBlock.js +10 -14
  54. package/build/esm/blocks/Header/schema.d.ts +243 -0
  55. package/build/esm/blocks/HeaderSlider/schema.d.ts +81 -0
  56. package/build/esm/blocks/Media/schema.d.ts +162 -0
  57. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +81 -0
  58. package/build/esm/blocks/Slider/Slider.js +2 -2
  59. package/build/esm/blocks/Tabs/Tabs.js +2 -2
  60. package/build/esm/blocks/Tabs/schema.d.ts +81 -0
  61. package/build/esm/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
  62. package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +4 -4
  63. package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -9
  64. package/build/esm/components/FullscreenImage/i18n/index.js +1 -1
  65. package/build/esm/components/FullscreenMedia/FullscreenMedia.d.ts +10 -0
  66. package/build/esm/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +7 -7
  67. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
  68. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.js +7 -0
  69. package/build/esm/components/Media/Image/Image.d.ts +1 -0
  70. package/build/esm/components/Media/Image/Image.js +12 -5
  71. package/build/esm/components/Media/Media.js +25 -5
  72. package/build/esm/components/Media/Video/Video.d.ts +1 -1
  73. package/build/esm/components/VideoBlock/VideoBlock.d.ts +3 -2
  74. package/build/esm/components/VideoBlock/VideoBlock.js +8 -4
  75. package/build/esm/components/index.d.ts +1 -1
  76. package/build/esm/components/index.js +1 -1
  77. package/build/esm/constructor-items.d.ts +1 -1
  78. package/build/esm/grid/Col/Col.d.ts +1 -1
  79. package/build/esm/icons/Fullscreen.d.ts +2 -0
  80. package/build/esm/icons/{FullScreen.js → Fullscreen.js} +1 -1
  81. package/build/esm/icons/index.d.ts +1 -1
  82. package/build/esm/icons/index.js +1 -1
  83. package/build/esm/models/common.d.ts +2 -1
  84. package/build/esm/models/common.js +1 -0
  85. package/build/esm/models/constructor-items/blocks.d.ts +1 -1
  86. package/build/esm/models/constructor-items/common.d.ts +1 -1
  87. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
  88. package/build/esm/schema/validators/common.d.ts +81 -0
  89. package/build/esm/schema/validators/common.js +6 -0
  90. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  91. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +6 -6
  92. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +82 -1
  93. package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
  94. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +2 -2
  95. package/build/esm/sub-blocks/LayoutItem/utils.js +3 -3
  96. package/build/esm/sub-blocks/MediaCard/schema.d.ts +85 -0
  97. package/build/esm/sub-blocks/MediaCard/schema.js +2 -2
  98. package/package.json +1 -4
  99. package/server/models/common.d.ts +2 -1
  100. package/server/models/common.js +1 -0
  101. package/server/models/constructor-items/blocks.d.ts +1 -1
  102. package/server/models/constructor-items/common.d.ts +1 -1
  103. package/server/models/constructor-items/sub-blocks.d.ts +1 -1
  104. package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +0 -9
  105. package/build/cjs/icons/FullScreen.d.ts +0 -2
  106. package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +0 -10
  107. package/build/esm/icons/FullScreen.d.ts +0 -2
  108. /package/build/cjs/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
  109. /package/build/esm/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
+ import { AnalyticsEventsBase } from '../../models/common';
2
3
  export declare const AUTOPLAY_ATTRIBUTES: {
3
4
  autoplay: number;
4
5
  mute: number;
5
6
  };
6
7
  export declare function getHeight(width: number): number;
7
- export interface VideoBlockProps {
8
+ export interface VideoBlockProps extends AnalyticsEventsBase {
8
9
  id?: string;
9
10
  stream?: string;
10
11
  record?: string;
@@ -13,7 +14,7 @@ export interface VideoBlockProps {
13
14
  previewImg?: string;
14
15
  playButton?: React.ReactNode;
15
16
  height?: number;
16
- fullScreen?: boolean;
17
+ fullscreen?: boolean;
17
18
  }
18
19
  declare const VideoBlock: (props: VideoBlockProps) => JSX.Element | null;
19
20
  export default VideoBlock;
@@ -6,7 +6,9 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
7
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
8
8
  const uuid_1 = require("uuid");
9
+ const useAnalytics_1 = require("../../hooks/useAnalytics");
9
10
  const icons_1 = require("../../icons");
11
+ const common_1 = require("../../models/common");
10
12
  const utils_1 = require("../../utils");
11
13
  const Image_1 = tslib_1.__importDefault(require("../Image/Image"));
12
14
  const i18n_1 = tslib_1.__importDefault(require("./i18n"));
@@ -39,7 +41,8 @@ function getHeight(width) {
39
41
  }
40
42
  exports.getHeight = getHeight;
41
43
  const VideoBlock = (props) => {
42
- const { stream, record, attributes, className, id, previewImg, playButton, height, fullScreen } = props;
44
+ const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, } = props;
45
+ const handleAnalytics = (0, useAnalytics_1.useAnalytics)(common_1.DefaultEventNames.VideoPreview);
43
46
  const src = getVideoSrc(stream, record);
44
47
  const ref = (0, react_1.useRef)(null);
45
48
  const iframeRef = (0, react_1.useRef)();
@@ -48,11 +51,12 @@ const VideoBlock = (props) => {
48
51
  const [currentHeight, setCurrentHeight] = (0, react_1.useState)(height || undefined);
49
52
  const fullId = id || (0, uuid_1.v4)();
50
53
  const onPreviewClick = (0, react_1.useCallback)(() => {
54
+ handleAnalytics(analyticsEvents);
51
55
  if (iframeRef.current) {
52
56
  iframeRef.current.src = `${src}?${(0, utils_1.getPageSearchParams)(Object.assign(Object.assign({}, exports.AUTOPLAY_ATTRIBUTES), (attributes || {})))}`;
53
57
  }
54
58
  setTimeout(() => setHidePreview(true), AUTOPLAY_DELAY);
55
- }, [src, attributes]);
59
+ }, [handleAnalytics, analyticsEvents, src, attributes]);
56
60
  (0, react_1.useEffect)(() => {
57
61
  const updateSize = lodash_1.default.debounce(() => {
58
62
  setCurrentHeight(ref.current ? Math.round(getHeight(ref.current.offsetWidth)) : undefined);
@@ -82,14 +86,14 @@ const VideoBlock = (props) => {
82
86
  ref.current.appendChild(iframe);
83
87
  iframeRef.current = iframe;
84
88
  }
85
- }, [stream, record, norender, src, fullId, attributes, iframeRef, fullScreen]);
89
+ }, [stream, record, norender, src, fullId, attributes, iframeRef, fullscreen]);
86
90
  (0, react_1.useEffect)(() => {
87
91
  setHidePreview(false);
88
92
  }, [src, setHidePreview]);
89
93
  if (norender) {
90
94
  return null;
91
95
  }
92
- return (react_1.default.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullScreen && (react_1.default.createElement("div", { className: b('preview'), onClick: onPreviewClick },
96
+ return (react_1.default.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (react_1.default.createElement("div", { className: b('preview'), onClick: onPreviewClick },
93
97
  react_1.default.createElement(Image_1.default, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper') }),
94
98
  playButton || (react_1.default.createElement("button", { className: b('button') },
95
99
  react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icons_1.PlayVideo, size: 24 })))))));
@@ -33,6 +33,6 @@ export { default as Author } from './Author/Author';
33
33
  export { default as RouterLink } from './RouterLink/RouterLink';
34
34
  export { default as HTML } from './HTML/HTML';
35
35
  export { default as MetaInfo } from './MetaInfo/MetaInfo';
36
- export { default as FullScreenMedia } from './FullscreenMedia/FullScreenMedia';
36
+ export { default as FullscreenMedia } from './FullscreenMedia/FullscreenMedia';
37
37
  export type { RouterLinkProps } from './RouterLink/RouterLink';
38
38
  export type { ImageBaseProps } from './ImageBase/ImageBase';
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FullScreenMedia = exports.MetaInfo = exports.HTML = exports.RouterLink = exports.Author = exports.OverflowScroller = exports.Control = exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.Table = exports.ReactPlayer = exports.OutsideClick = exports.Media = exports.Links = exports.Link = exports.ImageBase = exports.Image = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.CardBase = exports.Button = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.AnimateBlock = exports.Anchor = void 0;
6
+ exports.FullscreenMedia = exports.MetaInfo = exports.HTML = exports.RouterLink = exports.Author = exports.OverflowScroller = exports.Control = exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.Table = exports.ReactPlayer = exports.OutsideClick = exports.Media = exports.Links = exports.Link = exports.ImageBase = exports.Image = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.CardBase = exports.Button = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.AnimateBlock = exports.Anchor = void 0;
7
7
  var Anchor_1 = require("./Anchor/Anchor");
8
8
  Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return __importDefault(Anchor_1).default; } });
9
9
  var AnimateBlock_1 = require("./AnimateBlock/AnimateBlock");
@@ -74,5 +74,5 @@ var HTML_1 = require("./HTML/HTML");
74
74
  Object.defineProperty(exports, "HTML", { enumerable: true, get: function () { return __importDefault(HTML_1).default; } });
75
75
  var MetaInfo_1 = require("./MetaInfo/MetaInfo");
76
76
  Object.defineProperty(exports, "MetaInfo", { enumerable: true, get: function () { return __importDefault(MetaInfo_1).default; } });
77
- var FullScreenMedia_1 = require("./FullscreenMedia/FullScreenMedia");
78
- Object.defineProperty(exports, "FullScreenMedia", { enumerable: true, get: function () { return __importDefault(FullScreenMedia_1).default; } });
77
+ var FullscreenMedia_1 = require("./FullscreenMedia/FullscreenMedia");
78
+ Object.defineProperty(exports, "FullscreenMedia", { enumerable: true, get: function () { return __importDefault(FullscreenMedia_1).default; } });
@@ -23,7 +23,7 @@ export declare const subBlockMap: {
23
23
  "price-detailed": (props: import("./models").PriceDetailedProps) => JSX.Element;
24
24
  "media-card": ({ border, ...mediaProps }: import("./models").MediaCardProps) => JSX.Element;
25
25
  "banner-card": (props: import("./models").BannerCardProps) => JSX.Element;
26
- "layout-item": ({ content: { links, ...content }, metaInfo, media, border, fullScreen, className, }: import("./models").LayoutItemProps) => JSX.Element;
26
+ "layout-item": ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, }: import("./models").LayoutItemProps) => JSX.Element;
27
27
  "background-card": (props: import("./models").BackgroundCardProps) => JSX.Element;
28
28
  "basic-card": (props: import("./models").BasicCardProps) => JSX.Element;
29
29
  content: (props: import("./models").ContentBlockProps & import("./models").ClassNameProps) => JSX.Element;
@@ -7,4 +7,4 @@ export interface GridColumnProps extends GridColumnClassParams, Refable<HTMLDivE
7
7
  dataQa?: string;
8
8
  children?: React.ReactNode;
9
9
  }
10
- export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent" | "dataQa"> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "reset" | "visible" | "sizes" | "offsets" | "orders" | "hidden" | "alignSelf" | "justifyContent" | "dataQa"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const Fullscreen: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FullScreen = void 0;
3
+ exports.Fullscreen = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const svg_1 = require("../utils/svg");
7
- const FullScreen = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor" }, svg_1.a11yHiddenSvgProps, props),
7
+ const Fullscreen = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor" }, svg_1.a11yHiddenSvgProps, props),
8
8
  react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4.654v.291a10 10 0 0 0-1.763 1.404l-2.944 2.944a1 1 0 0 0 1.414 1.414l2.933-2.932A9.996 9.996 0 0 0 19.05 6h.296l-.09.39A9.993 9.993 0 0 0 19 8.64v.857a1 1 0 0 0 2 0V4.503a1.5 1.5 0 0 0-1.5-1.5L14.5 3a1 1 0 1 0 0 2h.861a10 10 0 0 0 2.249-.256l.39-.09zM4.95 18a10 10 0 0 1 1.41-1.775l2.933-2.932a1 1 0 0 1 1.414 1.414l-2.944 2.944A9.998 9.998 0 0 1 6 19.055v.291l.39-.09A9.993 9.993 0 0 1 8.64 19h.86a1 1 0 0 1 0 2l-5-.003a1.5 1.5 0 0 1-1.5-1.5V14.5a1 1 0 1 1 2 0v.861a10 10 0 0 1-.256 2.249l-.09.39h.296z" })));
9
- exports.FullScreen = FullScreen;
9
+ exports.Fullscreen = Fullscreen;
@@ -1,7 +1,7 @@
1
1
  export * from './ArrowConstructor';
2
2
  export * from './ArrowSidebar';
3
3
  export * from './Chevron';
4
- export * from './FullScreen';
4
+ export * from './Fullscreen';
5
5
  export * from './Github';
6
6
  export * from './NavigationChevron';
7
7
  export * from './PlayVideo';
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ArrowConstructor"), exports);
5
5
  tslib_1.__exportStar(require("./ArrowSidebar"), exports);
6
6
  tslib_1.__exportStar(require("./Chevron"), exports);
7
- tslib_1.__exportStar(require("./FullScreen"), exports);
7
+ tslib_1.__exportStar(require("./Fullscreen"), exports);
8
8
  tslib_1.__exportStar(require("./Github"), exports);
9
9
  tslib_1.__exportStar(require("./NavigationChevron"), exports);
10
10
  tslib_1.__exportStar(require("./PlayVideo"), exports);
@@ -79,7 +79,8 @@ export declare enum DefaultEventNames {
79
79
  HubspotFormSubmit = "hubspot-form-submit",
80
80
  QuoteButton = "quote-button-click",
81
81
  BackLink = "back-link-click",
82
- Breadcrumb = "breadcrumb-click"
82
+ Breadcrumb = "breadcrumb-click",
83
+ VideoPreview = "video-preview-click"
83
84
  }
84
85
  export type AnalyticsCounters = {
85
86
  include?: string[];
@@ -48,4 +48,5 @@ var DefaultEventNames;
48
48
  DefaultEventNames["QuoteButton"] = "quote-button-click";
49
49
  DefaultEventNames["BackLink"] = "back-link-click";
50
50
  DefaultEventNames["Breadcrumb"] = "breadcrumb-click";
51
+ DefaultEventNames["VideoPreview"] = "video-preview-click";
51
52
  })(DefaultEventNames = exports.DefaultEventNames || (exports.DefaultEventNames = {}));
@@ -212,7 +212,7 @@ export interface TabsBlockProps extends Animatable {
212
212
  items: TabsBlockItem[];
213
213
  }
214
214
  export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {
215
- title: TitleItemProps | string;
215
+ title?: TitleItemProps | string;
216
216
  description?: string;
217
217
  colSizes?: GridColumnSizesType;
218
218
  }
@@ -169,7 +169,7 @@ export interface MediaComponentVideoProps extends AnalyticsEventsBase {
169
169
  export interface MediaComponentYoutubeProps {
170
170
  youtube: string;
171
171
  previewImg?: string;
172
- fullScreen?: boolean;
172
+ fullscreen?: boolean;
173
173
  }
174
174
  export interface MediaComponentImageProps {
175
175
  image: ImageProps | ImageProps[] | ImageDeviceProps;
@@ -94,7 +94,7 @@ export interface LayoutItemProps extends ClassNameProps {
94
94
  media: MediaProps;
95
95
  metaInfo?: string[];
96
96
  border?: boolean;
97
- fullScreen?: boolean;
97
+ fullscreen?: boolean;
98
98
  }
99
99
  export type DividerModel = {
100
100
  type: SubBlockType.Divider;
@@ -1114,6 +1114,87 @@ export declare const MediaProps: {
1114
1114
  type: string;
1115
1115
  })[];
1116
1116
  };
1117
+ fullscreen: {
1118
+ type: string;
1119
+ };
1120
+ analyticsEvents: {
1121
+ anyOf: ({
1122
+ type: string;
1123
+ additionalProperties: {
1124
+ type: string;
1125
+ };
1126
+ required: string[];
1127
+ properties: {
1128
+ name: {
1129
+ type: string;
1130
+ };
1131
+ type: {
1132
+ type: string;
1133
+ };
1134
+ counters: {
1135
+ type: string;
1136
+ additionalProperties: boolean;
1137
+ required: never[];
1138
+ properties: {
1139
+ include: {
1140
+ type: string;
1141
+ items: {
1142
+ type: string;
1143
+ };
1144
+ };
1145
+ exclude: {
1146
+ type: string;
1147
+ items: {
1148
+ type: string;
1149
+ };
1150
+ };
1151
+ };
1152
+ };
1153
+ context: {
1154
+ type: string;
1155
+ };
1156
+ };
1157
+ } | {
1158
+ type: string;
1159
+ items: {
1160
+ type: string;
1161
+ additionalProperties: {
1162
+ type: string;
1163
+ };
1164
+ required: string[];
1165
+ properties: {
1166
+ name: {
1167
+ type: string;
1168
+ };
1169
+ type: {
1170
+ type: string;
1171
+ };
1172
+ counters: {
1173
+ type: string;
1174
+ additionalProperties: boolean;
1175
+ required: never[];
1176
+ properties: {
1177
+ include: {
1178
+ type: string;
1179
+ items: {
1180
+ type: string;
1181
+ };
1182
+ };
1183
+ exclude: {
1184
+ type: string;
1185
+ items: {
1186
+ type: string;
1187
+ };
1188
+ };
1189
+ };
1190
+ };
1191
+ context: {
1192
+ type: string;
1193
+ };
1194
+ };
1195
+ };
1196
+ })[];
1197
+ };
1117
1198
  };
1118
1199
  export declare const YMapMarkerLabel: {
1119
1200
  type: string;
@@ -457,6 +457,12 @@ exports.MediaProps = {
457
457
  type: 'string',
458
458
  },
459
459
  dataLens: exports.DataLensProps,
460
+ fullscreen: {
461
+ type: 'boolean',
462
+ },
463
+ analyticsEvents: {
464
+ anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
465
+ },
460
466
  };
461
467
  exports.YMapMarkerLabel = {
462
468
  type: 'object',
@@ -1,3 +1,3 @@
1
1
  import { LayoutItemProps } from '../../models';
2
- declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullScreen, className, }: LayoutItemProps) => JSX.Element;
2
+ declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, }: LayoutItemProps) => JSX.Element;
3
3
  export default LayoutItem;
@@ -8,11 +8,11 @@ const utils_1 = require("../../utils");
8
8
  const utils_2 = require("./utils");
9
9
  const b = (0, utils_1.block)('layout-item');
10
10
  const LayoutItem = (_a) => {
11
- var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullScreen, className } = _a;
11
+ var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullscreen, className } = _a;
12
12
  return (react_1.default.createElement("div", { className: b(null, className) },
13
- fullScreen && (0, utils_2.hasFullScreen)(media) ? (react_1.default.createElement(components_1.FullScreenMedia, { showFullScreenIcon: (0, utils_2.showFullScreenIcon)(media) }, (_a = {}) => {
14
- var { className: mediaClassName } = _a, fullScreenMediaProps = tslib_1.__rest(_a, ["className"]);
15
- return (react_1.default.createElement(components_1.Media, Object.assign({}, media, fullScreenMediaProps, { className: b('media', { border }, mediaClassName) })));
13
+ fullscreen && (0, utils_2.hasFullscreen)(media) ? (react_1.default.createElement(components_1.FullscreenMedia, { showFullscreenIcon: (0, utils_2.showFullscreenIcon)(media) }, (_a = {}) => {
14
+ var { className: mediaClassName, fullscreen: _fullscreen } = _a, fullscreenMediaProps = tslib_1.__rest(_a, ["className", "fullscreen"]);
15
+ return (react_1.default.createElement(components_1.Media, Object.assign({}, media, fullscreenMediaProps, { className: b('media', { border }, mediaClassName) })));
16
16
  })) : (react_1.default.createElement(components_1.Media, Object.assign({}, media, { className: b('media', { border }) }))),
17
17
  metaInfo && react_1.default.createElement(components_1.MetaInfo, { items: metaInfo, className: b('meta-info') }),
18
18
  react_1.default.createElement("div", { className: b('content') },
@@ -132,6 +132,87 @@ export declare const LayoutItem: {
132
132
  type: string;
133
133
  })[];
134
134
  };
135
+ fullscreen: {
136
+ type: string;
137
+ };
138
+ analyticsEvents: {
139
+ anyOf: ({
140
+ type: string;
141
+ additionalProperties: {
142
+ type: string;
143
+ };
144
+ required: string[];
145
+ properties: {
146
+ name: {
147
+ type: string;
148
+ };
149
+ type: {
150
+ type: string;
151
+ };
152
+ counters: {
153
+ type: string;
154
+ additionalProperties: boolean;
155
+ required: never[];
156
+ properties: {
157
+ include: {
158
+ type: string;
159
+ items: {
160
+ type: string;
161
+ };
162
+ };
163
+ exclude: {
164
+ type: string;
165
+ items: {
166
+ type: string;
167
+ };
168
+ };
169
+ };
170
+ };
171
+ context: {
172
+ type: string;
173
+ };
174
+ };
175
+ } | {
176
+ type: string;
177
+ items: {
178
+ type: string;
179
+ additionalProperties: {
180
+ type: string;
181
+ };
182
+ required: string[];
183
+ properties: {
184
+ name: {
185
+ type: string;
186
+ };
187
+ type: {
188
+ type: string;
189
+ };
190
+ counters: {
191
+ type: string;
192
+ additionalProperties: boolean;
193
+ required: never[];
194
+ properties: {
195
+ include: {
196
+ type: string;
197
+ items: {
198
+ type: string;
199
+ };
200
+ };
201
+ exclude: {
202
+ type: string;
203
+ items: {
204
+ type: string;
205
+ };
206
+ };
207
+ };
208
+ };
209
+ context: {
210
+ type: string;
211
+ };
212
+ };
213
+ };
214
+ })[];
215
+ };
135
216
  };
136
217
  content: Partial<{
137
218
  title: {
@@ -209,7 +290,7 @@ export declare const LayoutItem: {
209
290
  border: {
210
291
  type: string;
211
292
  };
212
- fullScreen: {
293
+ fullscreen: {
213
294
  type: string;
214
295
  };
215
296
  type: {};
@@ -12,7 +12,7 @@ exports.LayoutItem = {
12
12
  required: ['content', 'media'],
13
13
  properties: Object.assign(Object.assign({}, common_1.BaseProps), { media: common_1.MediaProps, content: (0, lodash_1.omit)(schema_2.ContentBase, ['colSize', 'size', 'centered']), metaInfo: schema_1.default, border: {
14
14
  type: 'boolean',
15
- }, fullScreen: {
15
+ }, fullscreen: {
16
16
  type: 'boolean',
17
17
  } }),
18
18
  };
@@ -24,5 +24,5 @@ export declare const getLayoutItemLinks: (links: LayoutItemProps['content']['lin
24
24
  }[] | undefined;
25
25
  className?: string | undefined;
26
26
  }[] | undefined;
27
- export declare const hasFullScreen: ({ dataLens, image }: MediaProps) => boolean;
28
- export declare const showFullScreenIcon: ({ youtube }: MediaProps) => boolean;
27
+ export declare const hasFullscreen: ({ dataLens, image }: MediaProps) => boolean;
28
+ export declare const showFullscreenIcon: ({ youtube }: MediaProps) => boolean;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.showFullScreenIcon = exports.hasFullScreen = exports.getLayoutItemLinks = void 0;
3
+ exports.showFullscreenIcon = exports.hasFullscreen = exports.getLayoutItemLinks = void 0;
4
4
  const getLayoutItemLinks = (links) => links === null || links === void 0 ? void 0 : links.map((link) => (Object.assign({ theme: 'normal' }, link)));
5
5
  exports.getLayoutItemLinks = getLayoutItemLinks;
6
- const hasFullScreen = ({ dataLens, image }) => {
7
- // datalens and slider media card don't support fullScreen mode
6
+ const hasFullscreen = ({ dataLens, image }) => {
7
+ // datalens and slider media card don't support fullscreen mode
8
8
  return !(dataLens || Array.isArray(image));
9
9
  };
10
- exports.hasFullScreen = hasFullScreen;
11
- const showFullScreenIcon = ({ youtube }) => !youtube;
12
- exports.showFullScreenIcon = showFullScreenIcon;
10
+ exports.hasFullscreen = hasFullscreen;
11
+ const showFullscreenIcon = ({ youtube }) => !youtube;
12
+ exports.showFullscreenIcon = showFullscreenIcon;
@@ -134,6 +134,91 @@ export declare const MediaCardBlock: {
134
134
  type: string;
135
135
  })[];
136
136
  };
137
+ fullscreen: {
138
+ type: string;
139
+ };
140
+ analyticsEvents: {
141
+ anyOf: ({
142
+ type: string;
143
+ additionalProperties: {
144
+ type: string;
145
+ };
146
+ required: string[];
147
+ properties: {
148
+ name: {
149
+ type: string;
150
+ };
151
+ type: {
152
+ type: string;
153
+ };
154
+ counters: {
155
+ type: string;
156
+ additionalProperties: boolean;
157
+ required: never[];
158
+ properties: {
159
+ include: {
160
+ type: string;
161
+ items: {
162
+ type: string;
163
+ };
164
+ };
165
+ exclude: {
166
+ type: string;
167
+ items: {
168
+ type: string;
169
+ };
170
+ };
171
+ };
172
+ };
173
+ context: {
174
+ type: string;
175
+ };
176
+ };
177
+ } | {
178
+ type: string;
179
+ items: {
180
+ type: string;
181
+ additionalProperties: {
182
+ type: string;
183
+ };
184
+ required: string[];
185
+ properties: {
186
+ name: {
187
+ type: string;
188
+ };
189
+ type: {
190
+ type: string;
191
+ };
192
+ counters: {
193
+ type: string;
194
+ additionalProperties: boolean;
195
+ required: never[];
196
+ properties: {
197
+ include: {
198
+ type: string;
199
+ items: {
200
+ type: string;
201
+ };
202
+ };
203
+ exclude: {
204
+ type: string;
205
+ items: {
206
+ type: string;
207
+ };
208
+ };
209
+ };
210
+ };
211
+ context: {
212
+ type: string;
213
+ };
214
+ };
215
+ };
216
+ })[];
217
+ };
218
+ border: {
219
+ type: string;
220
+ enum: string[];
221
+ };
137
222
  type: {};
138
223
  when: {};
139
224
  };
@@ -6,6 +6,6 @@ exports.MediaCardBlock = {
6
6
  'media-card': {
7
7
  additionalProperties: false,
8
8
  required: [],
9
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.MediaProps), common_1.AnimatableProps),
9
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), common_1.MediaProps), common_1.AnimatableProps),
10
10
  },
11
11
  };
@@ -10,6 +10,6 @@ const DEFAULT_SIZES = {
10
10
  };
11
11
  const b = block('card-layout-block');
12
12
  const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, }) => (React.createElement(AnimateBlock, { className: b(), animate: animated },
13
- React.createElement(Title, { title: title, subtitle: description }),
13
+ (title || description) && React.createElement(Title, { title: title, subtitle: description }),
14
14
  React.createElement(Row, null, React.Children.map(children, (child, index) => (React.createElement(Col, { key: index, sizes: colSizes, className: b('item') }, child))))));
15
15
  export default CardLayout;
@@ -1,6 +1,6 @@
1
1
  export declare const CardLayoutProps: {
2
2
  additionalProperties: boolean;
3
- required: string[];
3
+ required: never[];
4
4
  properties: {
5
5
  colSizes: {
6
6
  type: string;
@@ -76,7 +76,7 @@ export declare const CardLayoutProps: {
76
76
  export declare const CardLayoutBlock: {
77
77
  'card-layout-block': {
78
78
  additionalProperties: boolean;
79
- required: string[];
79
+ required: never[];
80
80
  properties: {
81
81
  colSizes: {
82
82
  type: string;
@@ -1,7 +1,7 @@
1
1
  import { AnimatableProps, BlockBaseProps, BlockHeaderProps, ChildrenCardsProps, containerSizesObject, } from '../../schema/validators/common';
2
2
  export const CardLayoutProps = {
3
3
  additionalProperties: false,
4
- required: ['title'],
4
+ required: [],
5
5
  properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { colSizes: containerSizesObject, children: ChildrenCardsProps }),
6
6
  };
7
7
  export const CardLayoutBlock = {