@doyourjob/gravity-ui-page-constructor 5.31.182 → 5.31.184
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.
- package/build/cjs/components/ContentList/ContentList.js +2 -3
- package/build/cjs/components/Map/GoogleMap.js +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +3 -4
- package/build/esm/components/ContentList/ContentList.js +2 -3
- package/build/esm/components/Map/GoogleMap.js +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +3 -4
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@
|
|
|
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 uuid_1 = require("uuid");
|
|
6
5
|
const utils_1 = require("../../utils");
|
|
7
6
|
const blocks_1 = require("../../utils/blocks");
|
|
8
7
|
const YFMWrapper_1 = tslib_1.__importDefault(require("../YFMWrapper/YFMWrapper"));
|
|
@@ -19,9 +18,9 @@ function getHeadingLevel(size) {
|
|
|
19
18
|
}
|
|
20
19
|
const ContentList = ({ list, size = 'l', qa, theme }) => {
|
|
21
20
|
const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, ['image', 'title', 'text']);
|
|
22
|
-
return (react_1.default.createElement("div", { className: b({ size, theme }), "data-qa": qa }, list === null || list === void 0 ? void 0 : list.map((item) => {
|
|
21
|
+
return (react_1.default.createElement("div", { className: b({ size, theme }), "data-qa": qa }, list === null || list === void 0 ? void 0 : list.map((item, index) => {
|
|
23
22
|
const { icon, title, text } = item;
|
|
24
|
-
return (react_1.default.createElement("div", { className: b('item', { 'without-title': !title }), key:
|
|
23
|
+
return (react_1.default.createElement("div", { className: b('item', { 'without-title': !title }), key: index },
|
|
25
24
|
react_1.default.createElement(ContentListItemIcon_1.default, { icon: icon, className: b('icon'), qa: qaAttributes.image }),
|
|
26
25
|
react_1.default.createElement("div", null,
|
|
27
26
|
title &&
|
|
@@ -39,6 +39,6 @@ const GoogleMap = (props) => {
|
|
|
39
39
|
}
|
|
40
40
|
return (react_1.default.createElement("iframe", { className: b(null, className), ref: ref, style: {
|
|
41
41
|
height,
|
|
42
|
-
}, title: "Google Map", loading: "lazy",
|
|
42
|
+
}, title: "Google Map", loading: "lazy", allow: "fullscreen", referrerPolicy: "no-referrer-when-downgrade", src: src }));
|
|
43
43
|
};
|
|
44
44
|
exports.default = GoogleMap;
|
|
@@ -6,7 +6,6 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const icons_1 = require("@gravity-ui/icons");
|
|
7
7
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
8
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
9
|
-
const uuid_1 = require("uuid");
|
|
10
9
|
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
11
10
|
const common_1 = require("../../models/common");
|
|
12
11
|
const utils_1 = require("../../utils");
|
|
@@ -50,7 +49,7 @@ const VideoBlock = (props) => {
|
|
|
50
49
|
const ref = (0, react_1.useRef)(null);
|
|
51
50
|
const [hidePreview, setHidePreview] = (0, react_1.useState)(false);
|
|
52
51
|
const [currentHeight, setCurrentHeight] = (0, react_1.useState)(height || undefined);
|
|
53
|
-
const fullId = (0,
|
|
52
|
+
const fullId = (0, uikit_1.useUniqId)();
|
|
54
53
|
const buttonId = (0, uikit_1.useUniqId)();
|
|
55
54
|
const [isPlaying, setIsPlaying] = (0, react_1.useState)(!previewImg);
|
|
56
55
|
const iframeSrc = (0, react_1.useMemo)(() => {
|
|
@@ -86,8 +85,8 @@ const VideoBlock = (props) => {
|
|
|
86
85
|
};
|
|
87
86
|
}, [height]);
|
|
88
87
|
const iframeContent = (0, react_1.useMemo)(() => {
|
|
89
|
-
return (react_1.default.createElement("iframe", { id: fullId, src: iframeSrc, width: "100%", height: "100%", title: (0, i18n_1.i18n)('iframe-title'), frameBorder: "0",
|
|
90
|
-
}, [fullId, iframeSrc]);
|
|
88
|
+
return (react_1.default.createElement("iframe", { id: id || fullId, src: iframeSrc, width: "100%", height: "100%", title: (0, i18n_1.i18n)('iframe-title'), frameBorder: "0", allow: "autoplay; fullscreen; encrypted-media; accelerometer; gyroscope; picture-in-picture; clipboard-write; web-share; screen-wake-lock", loading: "lazy" }));
|
|
89
|
+
}, [fullId, id, iframeSrc]);
|
|
91
90
|
(0, react_1.useEffect)(() => {
|
|
92
91
|
setHidePreview(false);
|
|
93
92
|
}, [src]);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
3
2
|
import { block } from '../../utils';
|
|
4
3
|
import { getQaAttrubutes } from '../../utils/blocks';
|
|
5
4
|
import YFMWrapper from '../YFMWrapper/YFMWrapper';
|
|
@@ -17,9 +16,9 @@ function getHeadingLevel(size) {
|
|
|
17
16
|
}
|
|
18
17
|
const ContentList = ({ list, size = 'l', qa, theme }) => {
|
|
19
18
|
const qaAttributes = getQaAttrubutes(qa, ['image', 'title', 'text']);
|
|
20
|
-
return (React.createElement("div", { className: b({ size, theme }), "data-qa": qa }, list === null || list === void 0 ? void 0 : list.map((item) => {
|
|
19
|
+
return (React.createElement("div", { className: b({ size, theme }), "data-qa": qa }, list === null || list === void 0 ? void 0 : list.map((item, index) => {
|
|
21
20
|
const { icon, title, text } = item;
|
|
22
|
-
return (React.createElement("div", { className: b('item', { 'without-title': !title }), key:
|
|
21
|
+
return (React.createElement("div", { className: b('item', { 'without-title': !title }), key: index },
|
|
23
22
|
React.createElement(ItemIcon, { icon: icon, className: b('icon'), qa: qaAttributes.image }),
|
|
24
23
|
React.createElement("div", null,
|
|
25
24
|
title &&
|
|
@@ -36,6 +36,6 @@ const GoogleMap = (props) => {
|
|
|
36
36
|
}
|
|
37
37
|
return (React.createElement("iframe", { className: b(null, className), ref: ref, style: {
|
|
38
38
|
height,
|
|
39
|
-
}, title: "Google Map", loading: "lazy",
|
|
39
|
+
}, title: "Google Map", loading: "lazy", allow: "fullscreen", referrerPolicy: "no-referrer-when-downgrade", src: src }));
|
|
40
40
|
};
|
|
41
41
|
export default GoogleMap;
|
|
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
2
2
|
import { PlayFill } from '@gravity-ui/icons';
|
|
3
3
|
import { Icon, useActionHandlers, useUniqId } from '@gravity-ui/uikit';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
6
5
|
import { useAnalytics } from '../../hooks/useAnalytics';
|
|
7
6
|
import { DefaultEventNames } from '../../models/common';
|
|
8
7
|
import { block, getPageSearchParams } from '../../utils';
|
|
@@ -46,7 +45,7 @@ const VideoBlock = (props) => {
|
|
|
46
45
|
const ref = useRef(null);
|
|
47
46
|
const [hidePreview, setHidePreview] = useState(false);
|
|
48
47
|
const [currentHeight, setCurrentHeight] = useState(height || undefined);
|
|
49
|
-
const fullId =
|
|
48
|
+
const fullId = useUniqId();
|
|
50
49
|
const buttonId = useUniqId();
|
|
51
50
|
const [isPlaying, setIsPlaying] = useState(!previewImg);
|
|
52
51
|
const iframeSrc = useMemo(() => {
|
|
@@ -82,8 +81,8 @@ const VideoBlock = (props) => {
|
|
|
82
81
|
};
|
|
83
82
|
}, [height]);
|
|
84
83
|
const iframeContent = useMemo(() => {
|
|
85
|
-
return (React.createElement("iframe", { id: fullId, src: iframeSrc, width: "100%", height: "100%", title: i18n('iframe-title'), frameBorder: "0",
|
|
86
|
-
}, [fullId, iframeSrc]);
|
|
84
|
+
return (React.createElement("iframe", { id: id || fullId, src: iframeSrc, width: "100%", height: "100%", title: i18n('iframe-title'), frameBorder: "0", allow: "autoplay; fullscreen; encrypted-media; accelerometer; gyroscope; picture-in-picture; clipboard-write; web-share; screen-wake-lock", loading: "lazy" }));
|
|
85
|
+
}, [fullId, id, iframeSrc]);
|
|
87
86
|
useEffect(() => {
|
|
88
87
|
setHidePreview(false);
|
|
89
88
|
}, [src]);
|