@gravity-ui/page-constructor 3.0.0-alpha.6 → 4.0.0-beta.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 (99) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -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 +9 -0
  8. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
  9. package/build/cjs/blocks/Media/schema.d.ts +6 -0
  10. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  11. package/build/cjs/blocks/Tabs/schema.d.ts +3 -0
  12. package/build/cjs/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
  13. package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +3 -3
  14. package/build/cjs/components/FullscreenImage/FullscreenImage.js +7 -7
  15. package/build/cjs/components/FullscreenImage/i18n/index.js +1 -1
  16. package/build/cjs/components/FullscreenMedia/FullscreenMedia.d.ts +9 -0
  17. package/build/cjs/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +5 -5
  18. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
  19. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.js +10 -0
  20. package/build/cjs/components/Media/Image/Image.d.ts +1 -0
  21. package/build/cjs/components/Media/Image/Image.js +10 -3
  22. package/build/cjs/components/Media/Media.js +25 -5
  23. package/build/cjs/components/Media/Video/Video.d.ts +1 -1
  24. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -1
  25. package/build/cjs/components/VideoBlock/VideoBlock.js +3 -3
  26. package/build/cjs/components/index.d.ts +1 -1
  27. package/build/cjs/components/index.js +3 -3
  28. package/build/cjs/constructor-items.d.ts +1 -1
  29. package/build/cjs/grid/Col/Col.d.ts +1 -1
  30. package/build/cjs/icons/Fullscreen.d.ts +2 -0
  31. package/build/cjs/icons/{FullScreen.js → Fullscreen.js} +3 -3
  32. package/build/cjs/icons/index.d.ts +1 -1
  33. package/build/cjs/icons/index.js +1 -1
  34. package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
  35. package/build/cjs/models/constructor-items/common.d.ts +1 -1
  36. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
  37. package/build/cjs/schema/validators/common.d.ts +3 -0
  38. package/build/cjs/schema/validators/common.js +3 -0
  39. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  40. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +4 -4
  41. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +4 -1
  42. package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
  43. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +2 -2
  44. package/build/cjs/sub-blocks/LayoutItem/utils.js +6 -6
  45. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +3 -0
  46. package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
  47. package/build/esm/blocks/CardLayout/schema.d.ts +2 -2
  48. package/build/esm/blocks/CardLayout/schema.js +1 -1
  49. package/build/esm/blocks/FilterBlock/FilterBlock.js +10 -14
  50. package/build/esm/blocks/Header/schema.d.ts +9 -0
  51. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  52. package/build/esm/blocks/Media/schema.d.ts +6 -0
  53. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  54. package/build/esm/blocks/Tabs/Tabs.js +2 -2
  55. package/build/esm/blocks/Tabs/schema.d.ts +3 -0
  56. package/build/esm/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
  57. package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +4 -4
  58. package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -9
  59. package/build/esm/components/FullscreenImage/i18n/index.js +1 -1
  60. package/build/esm/components/FullscreenMedia/FullscreenMedia.d.ts +10 -0
  61. package/build/esm/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +7 -7
  62. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
  63. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.js +7 -0
  64. package/build/esm/components/Media/Image/Image.d.ts +1 -0
  65. package/build/esm/components/Media/Image/Image.js +12 -5
  66. package/build/esm/components/Media/Media.js +25 -5
  67. package/build/esm/components/Media/Video/Video.d.ts +1 -1
  68. package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -1
  69. package/build/esm/components/VideoBlock/VideoBlock.js +3 -3
  70. package/build/esm/components/index.d.ts +1 -1
  71. package/build/esm/components/index.js +1 -1
  72. package/build/esm/constructor-items.d.ts +1 -1
  73. package/build/esm/grid/Col/Col.d.ts +1 -1
  74. package/build/esm/icons/Fullscreen.d.ts +2 -0
  75. package/build/esm/icons/{FullScreen.js → Fullscreen.js} +1 -1
  76. package/build/esm/icons/index.d.ts +1 -1
  77. package/build/esm/icons/index.js +1 -1
  78. package/build/esm/models/constructor-items/blocks.d.ts +1 -1
  79. package/build/esm/models/constructor-items/common.d.ts +1 -1
  80. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
  81. package/build/esm/schema/validators/common.d.ts +3 -0
  82. package/build/esm/schema/validators/common.js +3 -0
  83. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  84. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +6 -6
  85. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +4 -1
  86. package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
  87. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +2 -2
  88. package/build/esm/sub-blocks/LayoutItem/utils.js +3 -3
  89. package/build/esm/sub-blocks/MediaCard/schema.d.ts +3 -0
  90. package/package.json +1 -4
  91. package/server/models/constructor-items/blocks.d.ts +1 -1
  92. package/server/models/constructor-items/common.d.ts +1 -1
  93. package/server/models/constructor-items/sub-blocks.d.ts +1 -1
  94. package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +0 -9
  95. package/build/cjs/icons/FullScreen.d.ts +0 -2
  96. package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +0 -10
  97. package/build/esm/icons/FullScreen.d.ts +0 -2
  98. /package/build/cjs/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
  99. /package/build/esm/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
@@ -2,24 +2,44 @@ import React, { useMemo, useState } from 'react';
2
2
  import { block } from '../../utils';
3
3
  import YoutubeBlock from '../VideoBlock/VideoBlock';
4
4
  import DataLens from './DataLens/DataLens';
5
+ import FullscreenVideo from './FullscreenVideo/FullscreenVideo';
5
6
  import Image from './Image/Image';
6
7
  import Video from './Video/Video';
7
8
  import './Media.css';
8
9
  const b = block('Media');
9
10
  export const Media = (props) => {
10
- const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullScreen, analyticsEvents, } = props;
11
+ const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullscreen, analyticsEvents, } = props;
11
12
  const { className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, } = props;
12
13
  const [hasVideoFallback, setHasVideoFallback] = useState(false);
13
14
  const content = useMemo(() => {
14
15
  let result = [];
15
16
  if (image) {
16
- result.push(React.createElement(Image, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback }));
17
+ result.push(React.createElement(Image, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen }));
17
18
  }
18
19
  if (video) {
19
- result.push(React.createElement(Video, { key: "video", video: video, videoClassName: videoClassName, height: height, metrika: metrika, analyticsEvents: analyticsEvents, playVideo: playVideo, previewImg: previewImg, playButton: playButton, customBarControlsClassName: customBarControlsClassName, hasVideoFallback: hasVideoFallback, setHasVideoFallback: setHasVideoFallback }));
20
+ const videoProps = {
21
+ key: 'video',
22
+ video,
23
+ videoClassName,
24
+ height,
25
+ metrika,
26
+ analyticsEvents,
27
+ playVideo,
28
+ previewImg,
29
+ playButton,
30
+ customBarControlsClassName,
31
+ hasVideoFallback,
32
+ setHasVideoFallback,
33
+ };
34
+ if (fullscreen) {
35
+ result.push(React.createElement(FullscreenVideo, Object.assign({}, videoProps)));
36
+ }
37
+ else {
38
+ result.push(React.createElement(Video, Object.assign({}, videoProps)));
39
+ }
20
40
  }
21
41
  if (youtube) {
22
- result = (React.createElement(YoutubeBlock, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullScreen: fullScreen }));
42
+ result = (React.createElement(YoutubeBlock, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullscreen: fullscreen }));
23
43
  }
24
44
  if (dataLens) {
25
45
  result = React.createElement(DataLens, { dataLens: dataLens });
@@ -43,7 +63,7 @@ export const Media = (props) => {
43
63
  playButton,
44
64
  customBarControlsClassName,
45
65
  youtubeClassName,
46
- fullScreen,
66
+ fullscreen,
47
67
  ]);
48
68
  return (React.createElement("div", { className: b(null, className), style: { backgroundColor: color } }, content));
49
69
  };
@@ -11,6 +11,6 @@ interface InnerVideoProps {
11
11
  setHasVideoFallback: React.Dispatch<boolean>;
12
12
  hasVideoFallback: boolean;
13
13
  }
14
- type VideoAllProps = VideoAdditionProps & MediaComponentVideoProps & InnerVideoProps;
14
+ export type VideoAllProps = VideoAdditionProps & MediaComponentVideoProps & InnerVideoProps;
15
15
  declare const Video: (props: VideoAllProps) => JSX.Element | null;
16
16
  export default Video;
@@ -14,7 +14,7 @@ export interface VideoBlockProps {
14
14
  previewImg?: string;
15
15
  playButton?: React.ReactNode;
16
16
  height?: number;
17
- fullScreen?: boolean;
17
+ fullscreen?: boolean;
18
18
  }
19
19
  declare const VideoBlock: (props: VideoBlockProps) => JSX.Element | null;
20
20
  export default VideoBlock;
@@ -35,7 +35,7 @@ export function getHeight(width) {
35
35
  return (width / 16) * 9;
36
36
  }
37
37
  const VideoBlock = (props) => {
38
- const { stream, record, attributes, className, id, previewImg, playButton, height, fullScreen } = props;
38
+ const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen } = props;
39
39
  const src = getVideoSrc(stream, record);
40
40
  const ref = useRef(null);
41
41
  const iframeRef = useRef();
@@ -78,14 +78,14 @@ const VideoBlock = (props) => {
78
78
  ref.current.appendChild(iframe);
79
79
  iframeRef.current = iframe;
80
80
  }
81
- }, [stream, record, norender, src, fullId, attributes, iframeRef, fullScreen]);
81
+ }, [stream, record, norender, src, fullId, attributes, iframeRef, fullscreen]);
82
82
  useEffect(() => {
83
83
  setHidePreview(false);
84
84
  }, [src, setHidePreview]);
85
85
  if (norender) {
86
86
  return null;
87
87
  }
88
- return (React.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullScreen && (React.createElement("div", { className: b('preview'), onClick: onPreviewClick },
88
+ return (React.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (React.createElement("div", { className: b('preview'), onClick: onPreviewClick },
89
89
  React.createElement(Image, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper') }),
90
90
  playButton || (React.createElement("button", { className: b('button') },
91
91
  React.createElement(Icon, { className: b('icon'), data: 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';
@@ -33,4 +33,4 @@ 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';
@@ -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,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { a11yHiddenSvgProps } from '../utils/svg';
3
- export const FullScreen = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor" }, a11yHiddenSvgProps, props),
3
+ export const Fullscreen = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor" }, a11yHiddenSvgProps, props),
4
4
  React.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" })));
@@ -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';
@@ -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';
@@ -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,9 @@ export declare const MediaProps: {
1114
1114
  type: string;
1115
1115
  })[];
1116
1116
  };
1117
+ fullscreen: {
1118
+ type: string;
1119
+ };
1117
1120
  };
1118
1121
  export declare const YMapMarkerLabel: {
1119
1122
  type: string;
@@ -453,6 +453,9 @@ export const MediaProps = {
453
453
  type: 'string',
454
454
  },
455
455
  dataLens: DataLensProps,
456
+ fullscreen: {
457
+ type: 'boolean',
458
+ },
456
459
  };
457
460
  export const YMapMarkerLabel = {
458
461
  type: 'object',
@@ -1,4 +1,4 @@
1
1
  import { LayoutItemProps } from '../../models';
2
2
  import './LayoutItem.css';
3
- declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullScreen, className, }: LayoutItemProps) => JSX.Element;
3
+ declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, }: LayoutItemProps) => JSX.Element;
4
4
  export default LayoutItem;
@@ -1,17 +1,17 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
3
  import { Content } from '..';
4
- import { FullScreenMedia, Media, MetaInfo } from '../../components';
4
+ import { FullscreenMedia, Media, MetaInfo } from '../../components';
5
5
  import { block } from '../../utils';
6
- import { getLayoutItemLinks, hasFullScreen, showFullScreenIcon } from './utils';
6
+ import { getLayoutItemLinks, hasFullscreen, showFullscreenIcon } from './utils';
7
7
  import './LayoutItem.css';
8
8
  const b = block('layout-item');
9
9
  const LayoutItem = (_a) => {
10
- var _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, border, fullScreen, className } = _a;
10
+ var _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, border, fullscreen, className } = _a;
11
11
  return (React.createElement("div", { className: b(null, className) },
12
- fullScreen && hasFullScreen(media) ? (React.createElement(FullScreenMedia, { showFullScreenIcon: showFullScreenIcon(media) }, (_a = {}) => {
13
- var { className: mediaClassName } = _a, fullScreenMediaProps = __rest(_a, ["className"]);
14
- return (React.createElement(Media, Object.assign({}, media, fullScreenMediaProps, { className: b('media', { border }, mediaClassName) })));
12
+ fullscreen && hasFullscreen(media) ? (React.createElement(FullscreenMedia, { showFullscreenIcon: showFullscreenIcon(media) }, (_a = {}) => {
13
+ var { className: mediaClassName, fullscreen: _fullscreen } = _a, fullscreenMediaProps = __rest(_a, ["className", "fullscreen"]);
14
+ return (React.createElement(Media, Object.assign({}, media, fullscreenMediaProps, { className: b('media', { border }, mediaClassName) })));
15
15
  })) : (React.createElement(Media, Object.assign({}, media, { className: b('media', { border }) }))),
16
16
  metaInfo && React.createElement(MetaInfo, { items: metaInfo, className: b('meta-info') }),
17
17
  React.createElement("div", { className: b('content') },
@@ -132,6 +132,9 @@ export declare const LayoutItem: {
132
132
  type: string;
133
133
  })[];
134
134
  };
135
+ fullscreen: {
136
+ type: string;
137
+ };
135
138
  };
136
139
  content: Partial<{
137
140
  title: {
@@ -209,7 +212,7 @@ export declare const LayoutItem: {
209
212
  border: {
210
213
  type: string;
211
214
  };
212
- fullScreen: {
215
+ fullscreen: {
213
216
  type: string;
214
217
  };
215
218
  type: {};
@@ -8,7 +8,7 @@ export const LayoutItem = {
8
8
  required: ['content', 'media'],
9
9
  properties: Object.assign(Object.assign({}, BaseProps), { media: MediaProps, content: omit(ContentBase, ['colSize', 'size', 'centered']), metaInfo: metaInfo, border: {
10
10
  type: 'boolean',
11
- }, fullScreen: {
11
+ }, fullscreen: {
12
12
  type: 'boolean',
13
13
  } }),
14
14
  };
@@ -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,6 +1,6 @@
1
1
  export const getLayoutItemLinks = (links) => links === null || links === void 0 ? void 0 : links.map((link) => (Object.assign({ theme: 'normal' }, link)));
2
- export const hasFullScreen = ({ dataLens, image }) => {
3
- // datalens and slider media card don't support fullScreen mode
2
+ export const hasFullscreen = ({ dataLens, image }) => {
3
+ // datalens and slider media card don't support fullscreen mode
4
4
  return !(dataLens || Array.isArray(image));
5
5
  };
6
- export const showFullScreenIcon = ({ youtube }) => !youtube;
6
+ export const showFullscreenIcon = ({ youtube }) => !youtube;
@@ -134,6 +134,9 @@ export declare const MediaCardBlock: {
134
134
  type: string;
135
135
  })[];
136
136
  };
137
+ fullscreen: {
138
+ type: string;
139
+ };
137
140
  type: {};
138
141
  when: {};
139
142
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "3.0.0-alpha.6",
3
+ "version": "4.0.0-beta.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -139,8 +139,5 @@
139
139
  "*.{json,yaml,yml,md}": [
140
140
  "prettier --write"
141
141
  ]
142
- },
143
- "publishConfig": {
144
- "tag": "alpha"
145
142
  }
146
143
  }
@@ -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;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { MediaAllProps } from '../Media/Media';
3
- export type ChildMediaRenderProps = Pick<MediaAllProps, 'fullScreen' | 'imageClassName' | 'videoClassName' | 'youtubeClassName' | 'className'>;
4
- export interface FullScreenMediaProps {
5
- showFullScreenIcon?: boolean;
6
- children: (props?: ChildMediaRenderProps) => JSX.Element;
7
- }
8
- declare const FullScreenMedia: ({ children, showFullScreenIcon }: FullScreenMediaProps) => JSX.Element;
9
- export default FullScreenMedia;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const FullScreen: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { MediaAllProps } from '../Media/Media';
3
- import './FullScreenMedia.css';
4
- export type ChildMediaRenderProps = Pick<MediaAllProps, 'fullScreen' | 'imageClassName' | 'videoClassName' | 'youtubeClassName' | 'className'>;
5
- export interface FullScreenMediaProps {
6
- showFullScreenIcon?: boolean;
7
- children: (props?: ChildMediaRenderProps) => JSX.Element;
8
- }
9
- declare const FullScreenMedia: ({ children, showFullScreenIcon }: FullScreenMediaProps) => JSX.Element;
10
- export default FullScreenMedia;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const FullScreen: React.FC<React.SVGProps<SVGSVGElement>>;