@gravity-ui/page-constructor 5.28.6 → 5.28.7-alpha.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.
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +6 -1
- package/build/cjs/blocks/Questions/Questions.js +1 -1
- package/build/cjs/blocks/Questions/models.d.ts +1 -0
- package/build/cjs/blocks/Questions/models.js +1 -0
- package/build/cjs/blocks/Tabs/Tabs.js +5 -1
- package/build/cjs/components/ContentList/ContentList.css +24 -0
- package/build/cjs/components/ContentList/ContentList.d.ts +1 -1
- package/build/cjs/components/ContentList/ContentList.js +2 -2
- package/build/cjs/components/Media/Media.js +11 -2
- package/build/cjs/components/Title/TitleItem.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +3 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.js +3 -2
- package/build/cjs/context/innerContext/InnerContext.d.ts +3 -0
- package/build/cjs/context/innerContext/InnerContext.js +1 -0
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +8 -0
- package/build/cjs/sub-blocks/Content/Content.css +4 -14
- package/build/cjs/sub-blocks/Content/Content.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +8 -1
- package/build/cjs/utils/microdata.d.ts +2 -0
- package/build/cjs/utils/microdata.js +5 -0
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +6 -1
- package/build/esm/blocks/Questions/Questions.js +1 -1
- package/build/esm/blocks/Questions/models.d.ts +1 -0
- package/build/esm/blocks/Questions/models.js +1 -0
- package/build/esm/blocks/Tabs/Tabs.js +5 -1
- package/build/esm/components/ContentList/ContentList.css +24 -0
- package/build/esm/components/ContentList/ContentList.d.ts +1 -1
- package/build/esm/components/ContentList/ContentList.js +2 -2
- package/build/esm/components/Media/Media.js +12 -3
- package/build/esm/components/Title/TitleItem.d.ts +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +3 -0
- package/build/esm/containers/PageConstructor/PageConstructor.js +3 -2
- package/build/esm/context/innerContext/InnerContext.d.ts +3 -0
- package/build/esm/context/innerContext/InnerContext.js +1 -0
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/models/constructor-items/common.d.ts +8 -0
- package/build/esm/sub-blocks/Content/Content.css +4 -14
- package/build/esm/sub-blocks/Content/Content.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +8 -1
- package/build/esm/utils/microdata.d.ts +2 -0
- package/build/esm/utils/microdata.js +1 -0
- package/package.json +1 -1
- package/server/models/constructor-items/common.d.ts +8 -0
- package/widget/index.js +1 -1
|
@@ -87,9 +87,6 @@ unpredictable css rules order in build */
|
|
|
87
87
|
.pc-content_theme_dark .pc-content__title *,
|
|
88
88
|
.pc-content_theme_dark .pc-content__text .yfm,
|
|
89
89
|
.pc-content_theme_dark .pc-content__text .yfm *,
|
|
90
|
-
.pc-content_theme_dark .pc-content__list *,
|
|
91
|
-
.pc-content_theme_dark .pc-content__list .yfm,
|
|
92
|
-
.pc-content_theme_dark .pc-content__list .yfm *,
|
|
93
90
|
.pc-content_theme_dark .pc-content__links a {
|
|
94
91
|
color: var(--g-color-text-light-primary);
|
|
95
92
|
}
|
|
@@ -104,13 +101,11 @@ unpredictable css rules order in build */
|
|
|
104
101
|
.pc-content_theme_dark .pc-content__notice .yfm a:hover {
|
|
105
102
|
color: var(--g-color-text-light-primary);
|
|
106
103
|
}
|
|
107
|
-
.pc-content_theme_dark .pc-content__text .yfm a
|
|
108
|
-
.pc-content_theme_dark .pc-content__list .yfm a {
|
|
104
|
+
.pc-content_theme_dark .pc-content__text .yfm a {
|
|
109
105
|
color: var(--g-color-text-light-primary);
|
|
110
106
|
text-decoration: underline;
|
|
111
107
|
}
|
|
112
|
-
.pc-content_theme_dark .pc-content__text .yfm a:hover
|
|
113
|
-
.pc-content_theme_dark .pc-content__list .yfm a:hover {
|
|
108
|
+
.pc-content_theme_dark .pc-content__text .yfm a:hover {
|
|
114
109
|
color: var(--g-color-text-light-secondary);
|
|
115
110
|
}
|
|
116
111
|
.pc-content_theme_dark .pc-content__title a {
|
|
@@ -124,9 +119,6 @@ unpredictable css rules order in build */
|
|
|
124
119
|
.pc-content_theme_light .pc-content__title *,
|
|
125
120
|
.pc-content_theme_light .pc-content__text .yfm,
|
|
126
121
|
.pc-content_theme_light .pc-content__text .yfm *,
|
|
127
|
-
.pc-content_theme_light .pc-content__list *,
|
|
128
|
-
.pc-content_theme_light .pc-content__list .yfm,
|
|
129
|
-
.pc-content_theme_light .pc-content__list .yfm *,
|
|
130
122
|
.pc-content_theme_light .pc-content__links a {
|
|
131
123
|
color: var(--g-color-text-dark-primary);
|
|
132
124
|
}
|
|
@@ -141,13 +133,11 @@ unpredictable css rules order in build */
|
|
|
141
133
|
.pc-content_theme_light .pc-content__notice .yfm a:hover {
|
|
142
134
|
color: var(--g-color-text-dark-primary);
|
|
143
135
|
}
|
|
144
|
-
.pc-content_theme_light .pc-content__text .yfm a
|
|
145
|
-
.pc-content_theme_light .pc-content__list .yfm a {
|
|
136
|
+
.pc-content_theme_light .pc-content__text .yfm a {
|
|
146
137
|
color: var(--g-color-text-dark-primary);
|
|
147
138
|
text-decoration: underline;
|
|
148
139
|
}
|
|
149
|
-
.pc-content_theme_light .pc-content__text .yfm a:hover
|
|
150
|
-
.pc-content_theme_light .pc-content__list .yfm a:hover {
|
|
140
|
+
.pc-content_theme_light .pc-content__text .yfm a:hover {
|
|
151
141
|
color: var(--g-color-text-dark-secondary);
|
|
152
142
|
}
|
|
153
143
|
.pc-content_theme_light .pc-content__title a {
|
|
@@ -29,7 +29,7 @@ const Content = (props) => {
|
|
|
29
29
|
text && (React.createElement("div", { className: b('text', { ['without-title']: !hasTitle }) },
|
|
30
30
|
React.createElement(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId }))),
|
|
31
31
|
(list === null || list === void 0 ? void 0 : list.length) ? (React.createElement("div", { className: b('list') },
|
|
32
|
-
React.createElement(ContentList, { list: list, size: size, qa: qaAttributes.list }))) : null,
|
|
32
|
+
React.createElement(ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }))) : null,
|
|
33
33
|
additionalInfo && (React.createElement("div", { className: b('notice') },
|
|
34
34
|
React.createElement(YFMWrapper, { content: additionalInfo, modifiers: {
|
|
35
35
|
constructor: true,
|
|
@@ -4,6 +4,7 @@ import { useUniqId } from '@gravity-ui/uikit';
|
|
|
4
4
|
import { FullscreenMedia, IconWrapper, Media, MetaInfo } from '../../components';
|
|
5
5
|
import { useTheme } from '../../context/theme';
|
|
6
6
|
import { block, getThemedValue } from '../../utils';
|
|
7
|
+
import { mergeVideoMicrodata } from '../../utils/microdata';
|
|
7
8
|
import Content from '../Content/Content';
|
|
8
9
|
import { getLayoutItemLinks, hasFullscreen, showFullscreenIcon } from './utils';
|
|
9
10
|
import './LayoutItem.css';
|
|
@@ -22,8 +23,14 @@ const LayoutItem = (_a) => {
|
|
|
22
23
|
}
|
|
23
24
|
const themedMedia = getThemedValue(media, theme);
|
|
24
25
|
return fullscreen && hasFullscreen(themedMedia) ? (React.createElement(FullscreenMedia, { showFullscreenIcon: showFullscreenIcon(themedMedia) }, (_a = {}) => {
|
|
26
|
+
var _b;
|
|
25
27
|
var { className: mediaClassName, fullscreen: _fullscreen } = _a, fullscreenMediaProps = __rest(_a, ["className", "fullscreen"]);
|
|
26
|
-
return (React.createElement(Media, Object.assign({}, themedMedia,
|
|
28
|
+
return (React.createElement(Media, Object.assign({}, mergeVideoMicrodata(themedMedia, {
|
|
29
|
+
name: typeof content.title === 'string'
|
|
30
|
+
? content.title
|
|
31
|
+
: (_b = content.title) === null || _b === void 0 ? void 0 : _b.text,
|
|
32
|
+
description: content.text,
|
|
33
|
+
}), fullscreenMediaProps, { className: b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
|
|
27
34
|
})) : (React.createElement(Media, Object.assign({}, themedMedia, { className: b('media', { border }), analyticsEvents: analyticsEvents })));
|
|
28
35
|
};
|
|
29
36
|
return (React.createElement("div", { className: b(null, className) },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const mergeVideoMicrodata = (values = {}, newValues = {}) => (Object.assign(Object.assign({}, values), { videoMicrodata: Object.assign(Object.assign({}, newValues), (values.videoMicrodata || {})) }));
|
package/package.json
CHANGED
|
@@ -207,6 +207,14 @@ export interface MediaComponentIframeProps {
|
|
|
207
207
|
}
|
|
208
208
|
export interface MediaProps extends Animatable, Partial<MediaComponentDataLensProps>, Partial<MediaComponentYoutubeProps>, Partial<MediaComponentVideoIframeProps>, Partial<MediaComponentImageProps>, Partial<MediaComponentIframeProps>, Partial<MediaComponentVideoProps> {
|
|
209
209
|
color?: string;
|
|
210
|
+
videoMicrodata?: {
|
|
211
|
+
name?: string;
|
|
212
|
+
description?: string;
|
|
213
|
+
duration?: string;
|
|
214
|
+
uploadDate?: string;
|
|
215
|
+
contentUrl?: string;
|
|
216
|
+
thumbnailUrl?: string;
|
|
217
|
+
};
|
|
210
218
|
}
|
|
211
219
|
export interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {
|
|
212
220
|
fullWidthMedia?: boolean;
|