@gravity-ui/page-constructor 3.0.0-alpha.5 → 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 (217) hide show
  1. package/CHANGELOG.md +48 -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/BackgroundImage/BackgroundImage.js +2 -2
  13. package/build/cjs/components/BlockBase/BlockBase.d.ts +3 -2
  14. package/build/cjs/components/BlockBase/BlockBase.js +4 -2
  15. package/build/cjs/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
  16. package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +3 -3
  17. package/build/cjs/components/FullscreenImage/FullscreenImage.js +7 -7
  18. package/build/cjs/components/FullscreenImage/i18n/index.js +1 -1
  19. package/build/cjs/components/FullscreenMedia/FullscreenMedia.d.ts +9 -0
  20. package/build/cjs/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +5 -5
  21. package/build/cjs/components/Image/Image.d.ts +1 -0
  22. package/build/cjs/components/Image/Image.js +2 -2
  23. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
  24. package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.js +10 -0
  25. package/build/cjs/components/Media/Image/Image.d.ts +1 -0
  26. package/build/cjs/components/Media/Image/Image.js +10 -3
  27. package/build/cjs/components/Media/Media.js +25 -5
  28. package/build/cjs/components/Media/Video/Video.d.ts +1 -1
  29. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -1
  30. package/build/cjs/components/VideoBlock/VideoBlock.js +3 -3
  31. package/build/cjs/components/index.d.ts +1 -1
  32. package/build/cjs/components/index.js +3 -3
  33. package/build/cjs/constructor-items.d.ts +1 -1
  34. package/build/cjs/containers/Loadable/Loadable.d.ts +2 -2
  35. package/build/cjs/containers/PageConstructor/PageConstructor.js +5 -3
  36. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +3 -2
  37. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
  38. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +5 -5
  39. package/build/cjs/context/innerContext/InnerContext.d.ts +2 -1
  40. package/build/cjs/customization/BlockDecoration.d.ts +3 -0
  41. package/build/cjs/customization/BlockDecoration.js +22 -0
  42. package/build/cjs/editor/Components/AddBlock/AddBlock.css +82 -0
  43. package/build/cjs/editor/Components/AddBlock/AddBlock.d.ts +7 -0
  44. package/build/cjs/editor/Components/AddBlock/AddBlock.js +43 -0
  45. package/build/cjs/editor/Components/EditBlock/EditBlock.css +47 -0
  46. package/build/cjs/editor/Components/EditBlock/EditBlock.d.ts +4 -0
  47. package/build/cjs/editor/Components/EditBlock/EditBlock.js +32 -0
  48. package/build/cjs/editor/Containers/Editor.d.ts +2 -0
  49. package/build/cjs/editor/Containers/Editor.js +24 -0
  50. package/build/cjs/editor/data/index.d.ts +13 -0
  51. package/build/cjs/editor/data/index.js +27 -0
  52. package/build/cjs/editor/data/previews/default-preview.d.ts +3 -0
  53. package/build/cjs/editor/data/previews/default-preview.js +18 -0
  54. package/build/cjs/editor/data/previews/header-block.d.ts +3 -0
  55. package/build/cjs/editor/data/previews/header-block.js +19 -0
  56. package/build/cjs/editor/index.d.ts +2 -0
  57. package/build/cjs/editor/index.js +7 -0
  58. package/build/cjs/editor/store/index.d.ts +15 -0
  59. package/build/cjs/editor/store/index.js +32 -0
  60. package/build/cjs/editor/store/reducer.d.ts +41 -0
  61. package/build/cjs/editor/store/reducer.js +59 -0
  62. package/build/cjs/editor/store/utils.d.ts +12 -0
  63. package/build/cjs/editor/store/utils.js +34 -0
  64. package/build/cjs/editor/styles/mixins.css +0 -0
  65. package/build/cjs/editor/styles/variables.css +0 -0
  66. package/build/cjs/editor/types/index.d.ts +17 -0
  67. package/build/cjs/editor/types/index.js +2 -0
  68. package/build/cjs/editor/utils/index.d.ts +11 -0
  69. package/build/cjs/editor/utils/index.js +12 -0
  70. package/build/cjs/grid/Col/Col.d.ts +1 -1
  71. package/build/cjs/hooks/useMetrika.js +0 -7
  72. package/build/cjs/icons/Fullscreen.d.ts +2 -0
  73. package/build/cjs/icons/{FullScreen.js → Fullscreen.js} +3 -3
  74. package/build/cjs/icons/index.d.ts +1 -1
  75. package/build/cjs/icons/index.js +1 -1
  76. package/build/cjs/models/constructor-items/blocks.d.ts +2 -12
  77. package/build/cjs/models/constructor-items/blocks.js +0 -2
  78. package/build/cjs/models/constructor-items/common.d.ts +2 -1
  79. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
  80. package/build/cjs/models/constructor.d.ts +4 -1
  81. package/build/cjs/models/customization.d.ts +9 -0
  82. package/build/cjs/models/customization.js +2 -0
  83. package/build/cjs/models/index.d.ts +1 -0
  84. package/build/cjs/models/index.js +1 -0
  85. package/build/cjs/schema/index.js +0 -1
  86. package/build/cjs/schema/validators/common.d.ts +3 -0
  87. package/build/cjs/schema/validators/common.js +3 -0
  88. package/build/cjs/sub-blocks/Content/Content.js +2 -2
  89. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  90. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +4 -4
  91. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +4 -1
  92. package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
  93. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +2 -2
  94. package/build/cjs/sub-blocks/LayoutItem/utils.js +6 -6
  95. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +3 -0
  96. package/build/cjs/text-transform/transformers.js +2 -4
  97. package/build/cjs/utils/blocks.d.ts +4 -1
  98. package/build/cjs/utils/blocks.js +11 -1
  99. package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
  100. package/build/esm/blocks/CardLayout/schema.d.ts +2 -2
  101. package/build/esm/blocks/CardLayout/schema.js +1 -1
  102. package/build/esm/blocks/FilterBlock/FilterBlock.js +10 -14
  103. package/build/esm/blocks/Header/schema.d.ts +9 -0
  104. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  105. package/build/esm/blocks/Media/schema.d.ts +6 -0
  106. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  107. package/build/esm/blocks/Tabs/Tabs.js +2 -2
  108. package/build/esm/blocks/Tabs/schema.d.ts +3 -0
  109. package/build/esm/components/BackgroundImage/BackgroundImage.js +2 -2
  110. package/build/esm/components/BlockBase/BlockBase.d.ts +3 -2
  111. package/build/esm/components/BlockBase/BlockBase.js +4 -2
  112. package/build/esm/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
  113. package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +4 -4
  114. package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -9
  115. package/build/esm/components/FullscreenImage/i18n/index.js +1 -1
  116. package/build/esm/components/FullscreenMedia/FullscreenMedia.d.ts +10 -0
  117. package/build/esm/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +7 -7
  118. package/build/esm/components/Image/Image.d.ts +1 -0
  119. package/build/esm/components/Image/Image.js +2 -2
  120. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
  121. package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.js +7 -0
  122. package/build/esm/components/Media/Image/Image.d.ts +1 -0
  123. package/build/esm/components/Media/Image/Image.js +12 -5
  124. package/build/esm/components/Media/Media.js +25 -5
  125. package/build/esm/components/Media/Video/Video.d.ts +1 -1
  126. package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -1
  127. package/build/esm/components/VideoBlock/VideoBlock.js +3 -3
  128. package/build/esm/components/index.d.ts +1 -1
  129. package/build/esm/components/index.js +1 -1
  130. package/build/esm/constructor-items.d.ts +1 -1
  131. package/build/esm/containers/Loadable/Loadable.d.ts +2 -2
  132. package/build/esm/containers/PageConstructor/PageConstructor.js +6 -4
  133. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +3 -2
  134. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
  135. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +5 -5
  136. package/build/esm/context/innerContext/InnerContext.d.ts +2 -1
  137. package/build/esm/customization/BlockDecoration.d.ts +3 -0
  138. package/build/esm/customization/BlockDecoration.js +17 -0
  139. package/build/esm/editor/Components/AddBlock/AddBlock.css +82 -0
  140. package/build/esm/editor/Components/AddBlock/AddBlock.d.ts +8 -0
  141. package/build/esm/editor/Components/AddBlock/AddBlock.js +41 -0
  142. package/build/esm/editor/Components/EditBlock/EditBlock.css +47 -0
  143. package/build/esm/editor/Components/EditBlock/EditBlock.d.ts +5 -0
  144. package/build/esm/editor/Components/EditBlock/EditBlock.js +30 -0
  145. package/build/esm/editor/Containers/Editor.d.ts +2 -0
  146. package/build/esm/editor/Containers/Editor.js +20 -0
  147. package/build/esm/editor/data/index.d.ts +13 -0
  148. package/build/esm/editor/data/index.js +24 -0
  149. package/build/esm/editor/data/previews/default-preview.d.ts +3 -0
  150. package/build/esm/editor/data/previews/default-preview.js +15 -0
  151. package/build/esm/editor/data/previews/header-block.d.ts +3 -0
  152. package/build/esm/editor/data/previews/header-block.js +16 -0
  153. package/build/esm/editor/index.d.ts +2 -0
  154. package/build/esm/editor/index.js +2 -0
  155. package/build/esm/editor/store/index.d.ts +15 -0
  156. package/build/esm/editor/store/index.js +28 -0
  157. package/build/esm/editor/store/reducer.d.ts +41 -0
  158. package/build/esm/editor/store/reducer.js +55 -0
  159. package/build/esm/editor/store/utils.d.ts +12 -0
  160. package/build/esm/editor/store/utils.js +26 -0
  161. package/build/esm/editor/styles/mixins.css +0 -0
  162. package/build/esm/editor/styles/variables.css +0 -0
  163. package/build/esm/editor/types/index.d.ts +17 -0
  164. package/build/esm/editor/types/index.js +1 -0
  165. package/build/esm/editor/utils/index.d.ts +11 -0
  166. package/build/esm/editor/utils/index.js +6 -0
  167. package/build/esm/grid/Col/Col.d.ts +1 -1
  168. package/build/esm/hooks/useMetrika.js +0 -7
  169. package/build/esm/icons/Fullscreen.d.ts +2 -0
  170. package/build/esm/icons/{FullScreen.js → Fullscreen.js} +1 -1
  171. package/build/esm/icons/index.d.ts +1 -1
  172. package/build/esm/icons/index.js +1 -1
  173. package/build/esm/models/constructor-items/blocks.d.ts +2 -12
  174. package/build/esm/models/constructor-items/blocks.js +0 -2
  175. package/build/esm/models/constructor-items/common.d.ts +2 -1
  176. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
  177. package/build/esm/models/constructor.d.ts +4 -1
  178. package/build/esm/models/customization.d.ts +9 -0
  179. package/build/esm/models/customization.js +1 -0
  180. package/build/esm/models/index.d.ts +1 -0
  181. package/build/esm/models/index.js +1 -0
  182. package/build/esm/schema/index.js +0 -1
  183. package/build/esm/schema/validators/common.d.ts +3 -0
  184. package/build/esm/schema/validators/common.js +3 -0
  185. package/build/esm/sub-blocks/Content/Content.js +2 -3
  186. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  187. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +6 -6
  188. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +4 -1
  189. package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
  190. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +2 -2
  191. package/build/esm/sub-blocks/LayoutItem/utils.js +3 -3
  192. package/build/esm/sub-blocks/MediaCard/schema.d.ts +3 -0
  193. package/build/esm/text-transform/transformers.js +2 -4
  194. package/build/esm/utils/blocks.d.ts +4 -1
  195. package/build/esm/utils/blocks.js +7 -0
  196. package/package.json +4 -6
  197. package/server/models/constructor-items/blocks.d.ts +2 -12
  198. package/server/models/constructor-items/blocks.js +0 -2
  199. package/server/models/constructor-items/common.d.ts +2 -1
  200. package/server/models/constructor-items/sub-blocks.d.ts +1 -1
  201. package/server/models/constructor.d.ts +4 -1
  202. package/server/models/customization.d.ts +9 -0
  203. package/server/models/customization.js +2 -0
  204. package/server/models/index.d.ts +1 -0
  205. package/server/models/index.js +1 -0
  206. package/server/text-transform/transformers.js +2 -4
  207. package/server/utils/blocks.d.ts +4 -1
  208. package/server/utils/blocks.js +11 -1
  209. package/styles/styles.css +0 -196
  210. package/styles/styles.scss +0 -1
  211. package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +0 -9
  212. package/build/cjs/icons/FullScreen.d.ts +0 -2
  213. package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +0 -10
  214. package/build/esm/icons/FullScreen.d.ts +0 -2
  215. package/styles/fonts.scss +0 -223
  216. /package/build/cjs/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
  217. /package/build/esm/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.0.0-beta.0](https://github.com/gravity-ui/page-constructor/compare/v2.22.1...v4.0.0-beta.0) (2023-06-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * page-constructor 3.0.0 beta ([#234](https://github.com/gravity-ui/page-constructor/issues/234)) ([28def58](https://github.com/gravity-ui/page-constructor/commit/28def586f89cc549c6b928eea994d590740fbefe))
9
+
10
+ ## [2.22.1](https://github.com/gravity-ui/page-constructor/compare/v2.22.0...v2.22.1) (2023-06-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * filter block nesting ([#364](https://github.com/gravity-ui/page-constructor/issues/364)) ([5b62522](https://github.com/gravity-ui/page-constructor/commit/5b62522e5e34eeacbb2fb9ec6de957bba69cd758))
16
+
17
+ ## [2.22.0](https://github.com/gravity-ui/page-constructor/compare/v2.21.0...v2.22.0) (2023-05-31)
18
+
19
+
20
+ ### Features
21
+
22
+ * **Media:** add fullscreen video ([#345](https://github.com/gravity-ui/page-constructor/issues/345)) ([516a9a8](https://github.com/gravity-ui/page-constructor/commit/516a9a8423d710b6ecad33046121c489fa876e30))
23
+
24
+ ## [2.21.0](https://github.com/gravity-ui/page-constructor/compare/v2.20.1...v2.21.0) (2023-05-29)
25
+
26
+
27
+ ### Features
28
+
29
+ * remove metrika goals from pixel events ([#355](https://github.com/gravity-ui/page-constructor/issues/355)) ([1a0ddae](https://github.com/gravity-ui/page-constructor/commit/1a0ddae92e4862665c64652c0da27cee9085d286))
30
+
31
+ ## [2.20.1](https://github.com/gravity-ui/page-constructor/compare/v2.20.0...v2.20.1) (2023-05-29)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * editor scroll ([#352](https://github.com/gravity-ui/page-constructor/issues/352)) ([9fbbefe](https://github.com/gravity-ui/page-constructor/commit/9fbbefec311a0017eab7533b0b26bbddf97ff453))
37
+
38
+ ## [2.20.0](https://github.com/gravity-ui/page-constructor/compare/v2.19.0...v2.20.0) (2023-05-25)
39
+
40
+
41
+ ### Features
42
+
43
+ * add page structure editor ([8d1dafe](https://github.com/gravity-ui/page-constructor/commit/8d1dafe964a9af3c7f5ad0e6039cccf2d24da64f))
44
+ * Edit mode ([#347](https://github.com/gravity-ui/page-constructor/issues/347)) ([8d1dafe](https://github.com/gravity-ui/page-constructor/commit/8d1dafe964a9af3c7f5ad0e6039cccf2d24da64f))
45
+
46
+
47
+ ### Bug Fixes
48
+
49
+ * customization types import fix ([#350](https://github.com/gravity-ui/page-constructor/issues/350)) ([206306f](https://github.com/gravity-ui/page-constructor/commit/206306f95d87ae428538b27dca08f78cb4de9430))
50
+
3
51
  ## [2.19.0](https://github.com/gravity-ui/page-constructor/compare/v2.18.0...v2.19.0) (2023-05-23)
4
52
 
5
53
 
package/README.md CHANGED
@@ -183,7 +183,7 @@ Sub-blocks are components that can be used in the block `children` property. In
183
183
  - Add it to `enum` or `selectCases` in the `schema/index.ts` file.
184
184
 
185
185
  6. In the block directory, add the `README.md` file with a description of input parameters.
186
- 7. In the block directory add storybook demo in `__stories__` folder. (All demo content for story should be placed in `data.json` at story dir)
186
+ 7. In the block directory add storybook demo in `__stories__` folder. All demo content for story should be placed in `data.json` at story dir. The generic `Story` must accept the type of block props, otherwise incorrect block props will be displayed in Storybook.
187
187
 
188
188
  ### Themes
189
189
 
@@ -12,6 +12,6 @@ const DEFAULT_SIZES = {
12
12
  };
13
13
  const b = (0, utils_1.block)('card-layout-block');
14
14
  const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, }) => (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
15
- react_1.default.createElement(components_1.Title, { title: title, subtitle: description }),
15
+ (title || description) && react_1.default.createElement(components_1.Title, { title: title, subtitle: description }),
16
16
  react_1.default.createElement(grid_1.Row, null, react_1.default.Children.map(children, (child, index) => (react_1.default.createElement(grid_1.Col, { key: index, sizes: colSizes, className: b('item') }, child))))));
17
17
  exports.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;
@@ -4,7 +4,7 @@ exports.CardLayoutBlock = exports.CardLayoutProps = void 0;
4
4
  const common_1 = require("../../schema/validators/common");
5
5
  exports.CardLayoutProps = {
6
6
  additionalProperties: false,
7
- required: ['title'],
7
+ required: [],
8
8
  properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { colSizes: common_1.containerSizesObject, children: common_1.ChildrenCardsProps }),
9
9
  };
10
10
  exports.CardLayoutBlock = {
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
+ const __1 = require("..");
5
6
  const components_1 = require("../../components");
6
7
  const ButtonTabs_1 = tslib_1.__importDefault(require("../../components/ButtonTabs/ButtonTabs"));
7
- const ConstructorBlocks_1 = require("../../containers/PageConstructor/components/ConstructorBlocks");
8
+ const ConstructorItem_1 = require("../../containers/PageConstructor/components/ConstructorItem");
8
9
  const grid_1 = require("../../grid");
9
- const models_1 = require("../../models");
10
10
  const utils_1 = require("../../utils");
11
11
  const i18n_1 = tslib_1.__importDefault(require("./i18n"));
12
12
  const b = (0, utils_1.block)('filter-block');
@@ -24,25 +24,21 @@ const FilterBlock = ({ title, description, tags, tagButtonSize, allTag, items, c
24
24
  ? tabButtons[0].id
25
25
  : selectedTag;
26
26
  }, [tabButtons, selectedTag]);
27
- const container = (0, react_1.useMemo)(() => {
27
+ const cards = (0, react_1.useMemo)(() => {
28
28
  const itemsToShow = actualTag
29
29
  ? items.filter((item) => item.tags.includes(actualTag))
30
30
  : items;
31
- return [
32
- {
33
- type: models_1.BlockType.CardLayoutBlock,
34
- title: '',
35
- colSizes: colSizes,
36
- children: itemsToShow.map((item) => item.card),
37
- },
38
- ];
39
- }, [actualTag, items, colSizes]);
31
+ return itemsToShow.map((item) => item.card);
32
+ }, [actualTag, items]);
40
33
  return (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
41
34
  title && (react_1.default.createElement(components_1.Title, { className: b('title', { centered: centered }), title: title, subtitle: description })),
42
35
  tabButtons.length && (react_1.default.createElement(grid_1.Row, null,
43
36
  react_1.default.createElement(grid_1.Col, null,
44
37
  react_1.default.createElement(ButtonTabs_1.default, { className: b('tabs', { centered: centered }), items: tabButtons, activeTab: selectedTag, onSelectTab: setSelectedTag, tabSize: tagButtonSize })))),
45
38
  react_1.default.createElement(grid_1.Row, { className: b('block-container') },
46
- react_1.default.createElement(ConstructorBlocks_1.ConstructorBlocks, { items: container }))));
39
+ react_1.default.createElement(__1.CardLayoutBlock, { title: "", colSizes: colSizes }, cards.map((card, index) => {
40
+ const key = (0, utils_1.getBlockKey)(card, index);
41
+ return react_1.default.createElement(ConstructorItem_1.ConstructorItem, { data: card, blockKey: key, key: key });
42
+ })))));
47
43
  };
48
44
  exports.default = FilterBlock;
@@ -137,6 +137,9 @@ export declare const HeaderBackgroundProps: {
137
137
  type: string;
138
138
  })[];
139
139
  };
140
+ fullscreen: {
141
+ type: string;
142
+ };
140
143
  };
141
144
  };
142
145
  export declare const HeaderProperties: {
@@ -424,6 +427,9 @@ export declare const HeaderProperties: {
424
427
  type: string;
425
428
  })[];
426
429
  };
430
+ fullscreen: {
431
+ type: string;
432
+ };
427
433
  };
428
434
  } | {
429
435
  type: string;
@@ -757,6 +763,9 @@ export declare const HeaderBlock: {
757
763
  type: string;
758
764
  })[];
759
765
  };
766
+ fullscreen: {
767
+ type: string;
768
+ };
760
769
  };
761
770
  } | {
762
771
  type: string;
@@ -294,6 +294,9 @@ export declare const HeaderSliderBlock: {
294
294
  type: string;
295
295
  })[];
296
296
  };
297
+ fullscreen: {
298
+ type: string;
299
+ };
297
300
  };
298
301
  } | {
299
302
  type: string;
@@ -131,6 +131,9 @@ export declare const Media: {
131
131
  type: string;
132
132
  })[];
133
133
  };
134
+ fullscreen: {
135
+ type: string;
136
+ };
134
137
  };
135
138
  };
136
139
  export declare const MediaBlockBaseProps: {
@@ -608,6 +611,9 @@ export declare const MediaBlock: {
608
611
  type: string;
609
612
  })[];
610
613
  };
614
+ fullscreen: {
615
+ type: string;
616
+ };
611
617
  };
612
618
  };
613
619
  description: {
@@ -146,6 +146,9 @@ export declare const PromoFeaturesItem: {
146
146
  type: string;
147
147
  })[];
148
148
  };
149
+ fullscreen: {
150
+ type: string;
151
+ };
149
152
  };
150
153
  };
151
154
  };
@@ -142,6 +142,9 @@ export declare const tabsItem: {
142
142
  type: string;
143
143
  })[];
144
144
  };
145
+ fullscreen: {
146
+ type: string;
147
+ };
145
148
  };
146
149
  } | {
147
150
  type: string;
@@ -6,8 +6,8 @@ const utils_1 = require("../../utils");
6
6
  const Image_1 = tslib_1.__importDefault(require("../Image/Image"));
7
7
  const b = (0, utils_1.block)('storage-background-image');
8
8
  const BackgroundImage = (props) => {
9
- const { children, src, desktop, className, imageClassName, style, hide } = props;
10
- return (react_1.default.createElement("div", { className: b(null, className), style: style },
9
+ const { children, src, desktop, className, imageClassName, style, hide, qa } = props;
10
+ return (react_1.default.createElement("div", { className: b(null, className), style: style, "data-qa": qa },
11
11
  (src || desktop) && !hide && react_1.default.createElement(Image_1.default, Object.assign({}, props, { className: b('img', imageClassName) })),
12
12
  children && react_1.default.createElement("div", { className: b('container') }, children)));
13
13
  };
@@ -1,3 +1,4 @@
1
- import { BlockBaseProps, ClassNameProps, WithChildren } from '../../models';
2
- declare const BlockBase: (props: WithChildren<BlockBaseProps & ClassNameProps>) => JSX.Element;
1
+ import { PropsWithChildren } from 'react';
2
+ import { BlockBaseProps, ClassNameProps } from '../../models';
3
+ declare const BlockBase: (props: PropsWithChildren<BlockBaseProps & ClassNameProps>) => JSX.Element;
3
4
  export default BlockBase;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
+ const BlockDecoration_1 = require("../../customization/BlockDecoration");
5
6
  const grid_1 = require("../../grid");
6
7
  const utils_1 = require("../../utils");
7
8
  const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
@@ -9,7 +10,8 @@ const b = (0, utils_1.block)('block-base');
9
10
  const BlockBase = (props) => {
10
11
  const { anchor, visible, children, className, resetPaddings, qa } = props;
11
12
  return (react_1.default.createElement(grid_1.Col, { className: b({ ['reset-paddings']: resetPaddings }, className), visible: visible, reset: true, dataQa: qa },
12
- anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
13
- children));
13
+ react_1.default.createElement(BlockDecoration_1.BlockDecoration, null,
14
+ anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
15
+ children)));
14
16
  };
15
17
  exports.default = BlockBase;
@@ -1,24 +1,24 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
- .pc-FullScreenImage__image {
3
+ .pc-fullscreen-image__image {
4
4
  cursor: pointer;
5
5
  }
6
- .pc-FullScreenImage__image-wrapper {
6
+ .pc-fullscreen-image__image-wrapper {
7
7
  position: relative;
8
8
  }
9
- .pc-FullScreenImage__modal-content {
9
+ .pc-fullscreen-image__modal-content {
10
10
  position: relative;
11
11
  }
12
- .pc-FullScreenImage__modal-image {
12
+ .pc-fullscreen-image__modal-image {
13
13
  display: block;
14
14
  max-width: 1232px;
15
15
  max-height: 70vh;
16
16
  overflow: hidden;
17
17
  }
18
- .pc-FullScreenImage__modal .yc-modal__content, .pc-FullScreenImage__modal-image {
18
+ .pc-fullscreen-image__modal .yc-modal__content, .pc-fullscreen-image__modal-image {
19
19
  border-radius: var(--pc-border-radius);
20
20
  }
21
- .pc-FullScreenImage__icon-wrapper {
21
+ .pc-fullscreen-image__icon-wrapper {
22
22
  display: flex;
23
23
  align-items: center;
24
24
  justify-content: center;
@@ -33,28 +33,28 @@ unpredictable css rules order in build */
33
33
  opacity: 0;
34
34
  transition: 0.3s;
35
35
  }
36
- .pc-FullScreenImage__icon-wrapper_visible {
36
+ .pc-fullscreen-image__icon-wrapper_visible {
37
37
  opacity: 1;
38
38
  }
39
- .pc-FullScreenImage__icon {
39
+ .pc-fullscreen-image__icon {
40
40
  color: var(--yc-color-text-hint);
41
41
  }
42
- .pc-FullScreenImage__icon_hover:hover {
42
+ .pc-fullscreen-image__icon_hover:hover {
43
43
  color: var(--yc-color-text-secondary);
44
44
  }
45
45
  @media (max-width: 1185px) {
46
- .pc-FullScreenImage__modal-image {
46
+ .pc-fullscreen-image__modal-image {
47
47
  width: 100%;
48
48
  }
49
49
  }
50
50
  @media (max-width: 1081px) {
51
- .pc-FullScreenImage__image {
51
+ .pc-fullscreen-image__image {
52
52
  pointer-events: none;
53
53
  }
54
- .pc-FullScreenImage__icon-wrapper {
54
+ .pc-fullscreen-image__icon-wrapper {
55
55
  display: none;
56
56
  }
57
- .pc-FullScreenImage__modal {
57
+ .pc-fullscreen-image__modal {
58
58
  display: none !important; /* stylelint-disable-line declaration-no-important */
59
59
  }
60
60
  }
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { ImageProps } from '../Image/Image';
3
- export interface FullScreenImageProps extends ImageProps {
3
+ export interface FullscreenImageProps extends ImageProps {
4
4
  imageClassName?: string;
5
5
  modalImageClass?: string;
6
6
  imageStyle?: CSSProperties;
7
7
  }
8
- declare const FullScreenImage: (props: FullScreenImageProps) => JSX.Element;
9
- export default FullScreenImage;
8
+ declare const FullscreenImage: (props: FullscreenImageProps) => JSX.Element;
9
+ export default FullscreenImage;
@@ -7,26 +7,26 @@ const icons_1 = require("../../icons");
7
7
  const utils_1 = require("../../utils");
8
8
  const Image_1 = tslib_1.__importDefault(require("../Image/Image"));
9
9
  const i18n_1 = tslib_1.__importDefault(require("./i18n"));
10
- const b = (0, utils_1.block)('FullScreenImage');
10
+ const b = (0, utils_1.block)('fullscreen-image');
11
11
  const FULL_SCREEN_ICON_SIZE = 18;
12
12
  const CLOSE_ICON_SIZE = 30;
13
- const FullScreenImage = (props) => {
13
+ const FullscreenImage = (props) => {
14
14
  const { imageClassName, modalImageClass, imageStyle, alt = (0, i18n_1.default)('img-alt') } = props;
15
15
  const [isOpened, setIsOpened] = (0, react_1.useState)(false);
16
16
  const [isMouseEnter, setIsMouseEnter] = (0, react_1.useState)(false);
17
17
  const openModal = () => setIsOpened(true);
18
18
  const closeModal = () => setIsOpened(false);
19
- const showFullScreenIcon = () => setIsMouseEnter(true);
20
- const hideFullScreenIcon = () => setIsMouseEnter(false);
19
+ const showFullscreenIcon = () => setIsMouseEnter(true);
20
+ const hideFullscreenIcon = () => setIsMouseEnter(false);
21
21
  return (react_1.default.createElement("div", { className: b() },
22
- react_1.default.createElement("div", { className: b('image-wrapper'), onMouseEnter: showFullScreenIcon, onMouseLeave: hideFullScreenIcon },
22
+ react_1.default.createElement("div", { className: b('image-wrapper'), onMouseEnter: showFullscreenIcon, onMouseLeave: hideFullscreenIcon },
23
23
  react_1.default.createElement(Image_1.default, Object.assign({}, props, { alt: alt, className: b('image', imageClassName), onClick: openModal, style: imageStyle })),
24
24
  react_1.default.createElement("div", { className: b('icon-wrapper', { visible: isMouseEnter }), onClick: openModal },
25
- react_1.default.createElement(uikit_1.Icon, { data: icons_1.FullScreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') }))),
25
+ react_1.default.createElement(uikit_1.Icon, { data: icons_1.Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') }))),
26
26
  isOpened && (react_1.default.createElement(uikit_1.Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
27
27
  react_1.default.createElement("div", { className: b('modal-content') },
28
28
  react_1.default.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal },
29
29
  react_1.default.createElement(uikit_1.Icon, { data: icons_1.PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
30
30
  react_1.default.createElement(Image_1.default, Object.assign({}, props, { className: b('modal-image', modalImageClass) })))))));
31
31
  };
32
- exports.default = FullScreenImage;
32
+ exports.default = FullscreenImage;
@@ -4,5 +4,5 @@ const tslib_1 = require("tslib");
4
4
  const registerKeyset_1 = require("../../../utils/registerKeyset");
5
5
  const en_json_1 = tslib_1.__importDefault(require("./en.json"));
6
6
  const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
7
- const COMPONENT = 'FullScreenImage';
7
+ const COMPONENT = 'FullscreenImage';
8
8
  exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
@@ -0,0 +1,9 @@
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;
@@ -10,7 +10,7 @@ const b = (0, utils_1.block)('full-screen-media');
10
10
  const FULL_SCREEN_ICON_SIZE = 18;
11
11
  const CLOSE_ICON_SIZE = 30;
12
12
  const getMediaClass = (type) => b('modal-media', { type });
13
- const FullScreenMedia = ({ children, showFullScreenIcon = true }) => {
13
+ const FullscreenMedia = ({ children, showFullscreenIcon = true }) => {
14
14
  const [isOpened, setIsOpened] = (0, react_1.useState)(false);
15
15
  const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
16
16
  const openModal = (e) => {
@@ -24,8 +24,8 @@ const FullScreenMedia = ({ children, showFullScreenIcon = true }) => {
24
24
  return (react_1.default.createElement("div", { className: b() },
25
25
  react_1.default.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal },
26
26
  children({ className: b('inline-media') }),
27
- showFullScreenIcon && (react_1.default.createElement("div", { className: b('icon-wrapper'), onClickCapture: openModal },
28
- react_1.default.createElement(uikit_1.Icon, { data: icons_1.FullScreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') })))),
27
+ showFullscreenIcon && (react_1.default.createElement("div", { className: b('icon-wrapper'), onClickCapture: openModal },
28
+ react_1.default.createElement(uikit_1.Icon, { data: icons_1.Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') })))),
29
29
  isOpened && (react_1.default.createElement(uikit_1.Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
30
30
  react_1.default.createElement("div", { className: b('modal-content') },
31
31
  react_1.default.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal },
@@ -34,7 +34,7 @@ const FullScreenMedia = ({ children, showFullScreenIcon = true }) => {
34
34
  imageClassName: getMediaClass('image'),
35
35
  videoClassName: getMediaClass('video'),
36
36
  youtubeClassName: getMediaClass('youtube'),
37
- fullScreen: true,
37
+ fullscreen: true,
38
38
  }))))));
39
39
  };
40
- exports.default = FullScreenMedia;
40
+ exports.default = FullscreenMedia;
@@ -5,6 +5,7 @@ export interface ImageProps extends Partial<ImageObjectProps>, Partial<ImageDevi
5
5
  className?: string;
6
6
  onClick?: MouseEventHandler;
7
7
  containerClassName?: string;
8
+ qa?: string;
8
9
  }
9
10
  declare const Image: (props: ImageProps) => JSX.Element | null;
10
11
  export default Image;
@@ -12,7 +12,7 @@ const checkWebP = (src) => {
12
12
  };
13
13
  const Image = (props) => {
14
14
  const projectSettings = (0, react_1.useContext)(projectSettingsContext_1.ProjectSettingsContext);
15
- const { src: imageSrc, alt = (0, i18n_1.default)('img-alt'), disableCompress, tablet, desktop, mobile, style, className, onClick, containerClassName, } = props;
15
+ const { src: imageSrc, alt = (0, i18n_1.default)('img-alt'), disableCompress, tablet, desktop, mobile, style, className, onClick, containerClassName, qa, } = props;
16
16
  const [imgLoadingError, setImgLoadingError] = (0, react_1.useState)(false);
17
17
  const src = imageSrc || desktop;
18
18
  if (!src) {
@@ -22,7 +22,7 @@ const Image = (props) => {
22
22
  disableCompress ||
23
23
  !(0, imageCompress_1.isCompressible)(src) ||
24
24
  imgLoadingError;
25
- return (react_1.default.createElement("picture", { className: containerClassName },
25
+ return (react_1.default.createElement("picture", { className: containerClassName, "data-qa": qa },
26
26
  mobile && (react_1.default.createElement(react_1.Fragment, null,
27
27
  !disableWebp && (react_1.default.createElement("source", { srcSet: checkWebP(mobile), type: "image/webp", media: `(max-width: ${constants_1.BREAKPOINTS.sm}px)` })),
28
28
  react_1.default.createElement("source", { srcSet: mobile, media: `(max-width: ${constants_1.BREAKPOINTS.sm}px)` }))),
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { VideoAllProps } from '../Video/Video';
3
+ declare const FullscreenVideo: React.FC<VideoAllProps>;
4
+ export default FullscreenVideo;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = tslib_1.__importDefault(require("react"));
5
+ const FullscreenMedia_1 = tslib_1.__importDefault(require("../../FullscreenMedia/FullscreenMedia"));
6
+ const Video_1 = tslib_1.__importDefault(require("../Video/Video"));
7
+ const FullscreenVideo = (props) => {
8
+ return (react_1.default.createElement(FullscreenMedia_1.default, null, (classNames) => react_1.default.createElement(Video_1.default, Object.assign({}, props, classNames))));
9
+ };
10
+ exports.default = FullscreenVideo;
@@ -2,6 +2,7 @@ import { MediaComponentImageProps } from '../../../models';
2
2
  export interface ImageAdditionProps {
3
3
  imageClassName?: string;
4
4
  isBackground?: boolean;
5
+ fullscreen?: boolean;
5
6
  }
6
7
  interface InnerImageProps {
7
8
  hasVideoFallback: boolean;
@@ -13,7 +13,7 @@ const Image_1 = tslib_1.__importDefault(require("../../Image/Image"));
13
13
  const utils_2 = require("./utils");
14
14
  const b = (0, utils_1.block)('media-component-image');
15
15
  const Image = (props) => {
16
- const { parallax, image, height, imageClassName, isBackground, hasVideoFallback, video } = props;
16
+ const { parallax, image, height, imageClassName, isBackground, hasVideoFallback, video, fullscreen, } = props;
17
17
  const [scrollY, setScrollY] = (0, react_1.useState)(0);
18
18
  const [{ springScrollY }, springSetScrollY] = (0, react_spring_1.useSpring)(() => ({
19
19
  springScrollY: 0,
@@ -34,10 +34,10 @@ const Image = (props) => {
34
34
  parallaxInterpolate = springScrollY.interpolate((value) => `translateY(-${Number(value) / parallaxLevel}px)`);
35
35
  }
36
36
  const imageClass = b('item', { withVideo: Boolean(video) && !hasVideoFallback }, imageClassName);
37
- const imageSlider = (imageArray) => (react_1.default.createElement(Slider_1.default, { slidesToShow: 1, type: models_1.SliderType.MediaCard }, imageArray.map((item) => {
37
+ const renderFullscreenImage = (item) => {
38
38
  const itemData = (0, utils_2.getMediaImage)(item);
39
39
  return (react_1.default.createElement(FullscreenImage_1.default, Object.assign({ key: itemData.alt }, itemData, { imageClassName: imageClass, imageStyle: { height } })));
40
- })));
40
+ };
41
41
  const imageBackground = (oneImage) => {
42
42
  const imageData = (0, utils_2.getMediaImage)(oneImage);
43
43
  return (react_1.default.createElement(react_spring_1.animated.div, { style: { transform: parallaxInterpolate } },
@@ -47,9 +47,16 @@ const Image = (props) => {
47
47
  const imageData = (0, utils_2.getMediaImage)(oneImage);
48
48
  return react_1.default.createElement(Image_1.default, Object.assign({}, imageData, { className: imageClass, style: { height } }));
49
49
  };
50
+ const imageSlider = (imageArray) => {
51
+ const fullscreenItem = fullscreen === undefined || fullscreen;
52
+ return (react_1.default.createElement(Slider_1.default, { slidesToShow: 1, type: models_1.SliderType.MediaCard }, imageArray.map((item) => fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))));
53
+ };
50
54
  if (Array.isArray(image)) {
51
55
  return imageSlider(image);
52
56
  }
57
+ if (fullscreen) {
58
+ return renderFullscreenImage(image);
59
+ }
53
60
  return isBackground ? imageBackground(image) : imageOnly(image);
54
61
  };
55
62
  exports.default = Image;
@@ -6,23 +6,43 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const utils_1 = require("../../utils");
7
7
  const VideoBlock_1 = tslib_1.__importDefault(require("../VideoBlock/VideoBlock"));
8
8
  const DataLens_1 = tslib_1.__importDefault(require("./DataLens/DataLens"));
9
+ const FullscreenVideo_1 = tslib_1.__importDefault(require("./FullscreenVideo/FullscreenVideo"));
9
10
  const Image_1 = tslib_1.__importDefault(require("./Image/Image"));
10
11
  const Video_1 = tslib_1.__importDefault(require("./Video/Video"));
11
12
  const b = (0, utils_1.block)('Media');
12
13
  const Media = (props) => {
13
- const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullScreen, analyticsEvents, } = props;
14
+ const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullscreen, analyticsEvents, } = props;
14
15
  const { className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, } = props;
15
16
  const [hasVideoFallback, setHasVideoFallback] = (0, react_1.useState)(false);
16
17
  const content = (0, react_1.useMemo)(() => {
17
18
  let result = [];
18
19
  if (image) {
19
- result.push(react_1.default.createElement(Image_1.default, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback }));
20
+ result.push(react_1.default.createElement(Image_1.default, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen }));
20
21
  }
21
22
  if (video) {
22
- result.push(react_1.default.createElement(Video_1.default, { key: "video", video: video, videoClassName: videoClassName, height: height, metrika: metrika, analyticsEvents: analyticsEvents, playVideo: playVideo, previewImg: previewImg, playButton: playButton, customBarControlsClassName: customBarControlsClassName, hasVideoFallback: hasVideoFallback, setHasVideoFallback: setHasVideoFallback }));
23
+ const videoProps = {
24
+ key: 'video',
25
+ video,
26
+ videoClassName,
27
+ height,
28
+ metrika,
29
+ analyticsEvents,
30
+ playVideo,
31
+ previewImg,
32
+ playButton,
33
+ customBarControlsClassName,
34
+ hasVideoFallback,
35
+ setHasVideoFallback,
36
+ };
37
+ if (fullscreen) {
38
+ result.push(react_1.default.createElement(FullscreenVideo_1.default, Object.assign({}, videoProps)));
39
+ }
40
+ else {
41
+ result.push(react_1.default.createElement(Video_1.default, Object.assign({}, videoProps)));
42
+ }
23
43
  }
24
44
  if (youtube) {
25
- result = (react_1.default.createElement(VideoBlock_1.default, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullScreen: fullScreen }));
45
+ result = (react_1.default.createElement(VideoBlock_1.default, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullscreen: fullscreen }));
26
46
  }
27
47
  if (dataLens) {
28
48
  result = react_1.default.createElement(DataLens_1.default, { dataLens: dataLens });
@@ -46,7 +66,7 @@ const Media = (props) => {
46
66
  playButton,
47
67
  customBarControlsClassName,
48
68
  youtubeClassName,
49
- fullScreen,
69
+ fullscreen,
50
70
  ]);
51
71
  return (react_1.default.createElement("div", { className: b(null, className), style: { backgroundColor: color } }, content));
52
72
  };
@@ -10,6 +10,6 @@ interface InnerVideoProps {
10
10
  setHasVideoFallback: React.Dispatch<boolean>;
11
11
  hasVideoFallback: boolean;
12
12
  }
13
- type VideoAllProps = VideoAdditionProps & MediaComponentVideoProps & InnerVideoProps;
13
+ export type VideoAllProps = VideoAdditionProps & MediaComponentVideoProps & InnerVideoProps;
14
14
  declare const Video: (props: VideoAllProps) => JSX.Element | null;
15
15
  export default Video;
@@ -13,7 +13,7 @@ export interface VideoBlockProps {
13
13
  previewImg?: string;
14
14
  playButton?: React.ReactNode;
15
15
  height?: number;
16
- fullScreen?: boolean;
16
+ fullscreen?: boolean;
17
17
  }
18
18
  declare const VideoBlock: (props: VideoBlockProps) => JSX.Element | null;
19
19
  export default VideoBlock;