@gravity-ui/blog-constructor 4.1.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/build/cjs/blocks/Author/schema.d.ts +3 -1
- package/build/cjs/blocks/Banner/schema.d.ts +10 -4
- package/build/cjs/blocks/CTA/schema.d.ts +10 -4
- package/build/cjs/blocks/ColoredText/schema.d.ts +11 -4
- package/build/cjs/blocks/Feed/schema.d.ts +3 -1
- package/build/cjs/blocks/Header/schema.d.ts +41 -16
- package/build/cjs/blocks/Layout/schema.d.ts +3 -1
- package/build/cjs/blocks/Media/schema.d.ts +19 -7
- package/build/cjs/blocks/Meta/schema.d.ts +3 -1
- package/build/cjs/blocks/Suggest/schema.d.ts +3 -1
- package/build/cjs/blocks/YFM/schema.d.ts +3 -1
- package/build/cjs/components/PostInfo/components/Sharing.js +1 -1
- package/build/cjs/containers/BlogPage/BlogPage.js +1 -1
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js +18 -19
- package/build/cjs/schema/index.d.ts +109 -41
- package/build/esm/blocks/Author/schema.d.ts +3 -1
- package/build/esm/blocks/Banner/schema.d.ts +10 -4
- package/build/esm/blocks/CTA/schema.d.ts +10 -4
- package/build/esm/blocks/ColoredText/schema.d.ts +11 -4
- package/build/esm/blocks/Feed/schema.d.ts +3 -1
- package/build/esm/blocks/Header/schema.d.ts +41 -16
- package/build/esm/blocks/Layout/schema.d.ts +3 -1
- package/build/esm/blocks/Media/schema.d.ts +19 -7
- package/build/esm/blocks/Meta/schema.d.ts +3 -1
- package/build/esm/blocks/Suggest/schema.d.ts +3 -1
- package/build/esm/blocks/YFM/schema.d.ts +3 -1
- package/build/esm/components/PostInfo/components/Sharing.js +1 -1
- package/build/esm/containers/BlogPage/BlogPage.js +2 -2
- package/build/esm/containers/BlogPostPage/BlogPostPage.js +18 -19
- package/build/esm/schema/index.d.ts +109 -41
- package/package.json +2 -2
@@ -14,6 +14,7 @@ export declare const Header: {
|
|
14
14
|
description: {
|
15
15
|
type: string;
|
16
16
|
contentType: string;
|
17
|
+
inputType: string;
|
17
18
|
};
|
18
19
|
width: {
|
19
20
|
type: string;
|
@@ -35,7 +36,7 @@ export declare const Header: {
|
|
35
36
|
enum: string[];
|
36
37
|
};
|
37
38
|
image: {
|
38
|
-
oneOf: ({
|
39
|
+
oneOf: (({
|
39
40
|
oneOf: ({
|
40
41
|
type: string;
|
41
42
|
properties: {
|
@@ -46,16 +47,20 @@ export declare const Header: {
|
|
46
47
|
} | {
|
47
48
|
type: string;
|
48
49
|
pattern: string;
|
50
|
+
optionName: string;
|
49
51
|
})[];
|
50
|
-
}
|
52
|
+
} & {
|
53
|
+
optionName: string;
|
54
|
+
}) | {
|
51
55
|
type: string;
|
52
56
|
additionalProperties: boolean;
|
53
57
|
required: import("@gravity-ui/page-constructor").Theme[];
|
54
58
|
properties: {};
|
59
|
+
optionName: string;
|
55
60
|
})[];
|
56
61
|
};
|
57
62
|
video: {
|
58
|
-
oneOf: ({
|
63
|
+
oneOf: (({
|
59
64
|
type: string;
|
60
65
|
additionalProperties: boolean;
|
61
66
|
required: string[];
|
@@ -67,7 +72,8 @@ export declare const Header: {
|
|
67
72
|
};
|
68
73
|
};
|
69
74
|
loop: {
|
70
|
-
|
75
|
+
oneOf: ({
|
76
|
+
optionName: string;
|
71
77
|
type: string;
|
72
78
|
additionalProperties: boolean;
|
73
79
|
required: string[];
|
@@ -81,6 +87,7 @@ export declare const Header: {
|
|
81
87
|
};
|
82
88
|
} | {
|
83
89
|
type: string;
|
90
|
+
optionName: string;
|
84
91
|
})[];
|
85
92
|
};
|
86
93
|
type: {
|
@@ -90,13 +97,13 @@ export declare const Header: {
|
|
90
97
|
muted: {
|
91
98
|
type: string;
|
92
99
|
};
|
93
|
-
|
100
|
+
autoplay: {
|
94
101
|
type: string;
|
95
102
|
};
|
96
103
|
elapsedTime: {
|
97
104
|
type: string;
|
98
105
|
};
|
99
|
-
|
106
|
+
playButton: {
|
100
107
|
type: string;
|
101
108
|
additionalProperties: boolean;
|
102
109
|
properties: {
|
@@ -119,11 +126,14 @@ export declare const Header: {
|
|
119
126
|
enum: string[];
|
120
127
|
};
|
121
128
|
};
|
122
|
-
}
|
129
|
+
} & {
|
130
|
+
optionName: string;
|
131
|
+
}) | {
|
123
132
|
type: string;
|
124
133
|
additionalProperties: boolean;
|
125
134
|
required: import("@gravity-ui/page-constructor").Theme[];
|
126
135
|
properties: {};
|
136
|
+
optionName: string;
|
127
137
|
})[];
|
128
138
|
};
|
129
139
|
backLink: {
|
@@ -148,7 +158,7 @@ export declare const Header: {
|
|
148
158
|
enum: string[];
|
149
159
|
};
|
150
160
|
background: {
|
151
|
-
oneOf: ({
|
161
|
+
oneOf: (({
|
152
162
|
type: string;
|
153
163
|
additionalProperties: boolean;
|
154
164
|
required: never[];
|
@@ -163,7 +173,8 @@ export declare const Header: {
|
|
163
173
|
type: string;
|
164
174
|
};
|
165
175
|
image: {
|
166
|
-
|
176
|
+
oneOf: ({
|
177
|
+
optionName: string;
|
167
178
|
oneOf: ({
|
168
179
|
type: string;
|
169
180
|
properties: {
|
@@ -174,7 +185,10 @@ export declare const Header: {
|
|
174
185
|
} | {
|
175
186
|
type: string;
|
176
187
|
pattern: string;
|
188
|
+
optionName: string;
|
177
189
|
})[];
|
190
|
+
type?: undefined;
|
191
|
+
items?: undefined;
|
178
192
|
} | {
|
179
193
|
type: string;
|
180
194
|
items: {
|
@@ -188,8 +202,10 @@ export declare const Header: {
|
|
188
202
|
} | {
|
189
203
|
type: string;
|
190
204
|
pattern: string;
|
205
|
+
optionName: string;
|
191
206
|
})[];
|
192
207
|
};
|
208
|
+
optionName: string;
|
193
209
|
})[];
|
194
210
|
};
|
195
211
|
video: {
|
@@ -204,7 +220,8 @@ export declare const Header: {
|
|
204
220
|
};
|
205
221
|
};
|
206
222
|
loop: {
|
207
|
-
|
223
|
+
oneOf: ({
|
224
|
+
optionName: string;
|
208
225
|
type: string;
|
209
226
|
additionalProperties: boolean;
|
210
227
|
required: string[];
|
@@ -218,6 +235,7 @@ export declare const Header: {
|
|
218
235
|
};
|
219
236
|
} | {
|
220
237
|
type: string;
|
238
|
+
optionName: string;
|
221
239
|
})[];
|
222
240
|
};
|
223
241
|
type: {
|
@@ -227,13 +245,13 @@ export declare const Header: {
|
|
227
245
|
muted: {
|
228
246
|
type: string;
|
229
247
|
};
|
230
|
-
|
248
|
+
autoplay: {
|
231
249
|
type: string;
|
232
250
|
};
|
233
251
|
elapsedTime: {
|
234
252
|
type: string;
|
235
253
|
};
|
236
|
-
|
254
|
+
playButton: {
|
237
255
|
type: string;
|
238
256
|
additionalProperties: boolean;
|
239
257
|
properties: {
|
@@ -271,6 +289,10 @@ export declare const Header: {
|
|
271
289
|
};
|
272
290
|
dataLens: {
|
273
291
|
oneOf: ({
|
292
|
+
type: string;
|
293
|
+
optionName: string;
|
294
|
+
} | {
|
295
|
+
optionName: string;
|
274
296
|
type: string;
|
275
297
|
additionalProperties: boolean;
|
276
298
|
required: string[];
|
@@ -283,8 +305,6 @@ export declare const Header: {
|
|
283
305
|
enum: string[];
|
284
306
|
};
|
285
307
|
};
|
286
|
-
} | {
|
287
|
-
type: string;
|
288
308
|
})[];
|
289
309
|
};
|
290
310
|
fullscreen: {
|
@@ -369,11 +389,14 @@ export declare const Header: {
|
|
369
389
|
})[];
|
370
390
|
};
|
371
391
|
};
|
372
|
-
}
|
392
|
+
} & {
|
393
|
+
optionName: string;
|
394
|
+
}) | {
|
373
395
|
type: string;
|
374
396
|
additionalProperties: boolean;
|
375
397
|
required: import("@gravity-ui/page-constructor").Theme[];
|
376
398
|
properties: {};
|
399
|
+
optionName: string;
|
377
400
|
})[];
|
378
401
|
};
|
379
402
|
theme: {
|
@@ -451,7 +474,9 @@ export declare const Header: {
|
|
451
474
|
type: string;
|
452
475
|
};
|
453
476
|
type: {};
|
454
|
-
when: {
|
477
|
+
when: {
|
478
|
+
type: string;
|
479
|
+
};
|
455
480
|
};
|
456
481
|
};
|
457
482
|
};
|
@@ -11,7 +11,8 @@ export declare const Media: {
|
|
11
11
|
type: string;
|
12
12
|
};
|
13
13
|
image: {
|
14
|
-
|
14
|
+
oneOf: ({
|
15
|
+
optionName: string;
|
15
16
|
oneOf: ({
|
16
17
|
type: string;
|
17
18
|
properties: {
|
@@ -22,7 +23,10 @@ export declare const Media: {
|
|
22
23
|
} | {
|
23
24
|
type: string;
|
24
25
|
pattern: string;
|
26
|
+
optionName: string;
|
25
27
|
})[];
|
28
|
+
type?: undefined;
|
29
|
+
items?: undefined;
|
26
30
|
} | {
|
27
31
|
type: string;
|
28
32
|
items: {
|
@@ -36,8 +40,10 @@ export declare const Media: {
|
|
36
40
|
} | {
|
37
41
|
type: string;
|
38
42
|
pattern: string;
|
43
|
+
optionName: string;
|
39
44
|
})[];
|
40
45
|
};
|
46
|
+
optionName: string;
|
41
47
|
})[];
|
42
48
|
};
|
43
49
|
video: {
|
@@ -52,7 +58,8 @@ export declare const Media: {
|
|
52
58
|
};
|
53
59
|
};
|
54
60
|
loop: {
|
55
|
-
|
61
|
+
oneOf: ({
|
62
|
+
optionName: string;
|
56
63
|
type: string;
|
57
64
|
additionalProperties: boolean;
|
58
65
|
required: string[];
|
@@ -66,6 +73,7 @@ export declare const Media: {
|
|
66
73
|
};
|
67
74
|
} | {
|
68
75
|
type: string;
|
76
|
+
optionName: string;
|
69
77
|
})[];
|
70
78
|
};
|
71
79
|
type: {
|
@@ -75,13 +83,13 @@ export declare const Media: {
|
|
75
83
|
muted: {
|
76
84
|
type: string;
|
77
85
|
};
|
78
|
-
|
86
|
+
autoplay: {
|
79
87
|
type: string;
|
80
88
|
};
|
81
89
|
elapsedTime: {
|
82
90
|
type: string;
|
83
91
|
};
|
84
|
-
|
92
|
+
playButton: {
|
85
93
|
type: string;
|
86
94
|
additionalProperties: boolean;
|
87
95
|
properties: {
|
@@ -119,6 +127,10 @@ export declare const Media: {
|
|
119
127
|
};
|
120
128
|
dataLens: {
|
121
129
|
oneOf: ({
|
130
|
+
type: string;
|
131
|
+
optionName: string;
|
132
|
+
} | {
|
133
|
+
optionName: string;
|
122
134
|
type: string;
|
123
135
|
additionalProperties: boolean;
|
124
136
|
required: string[];
|
@@ -131,8 +143,6 @@ export declare const Media: {
|
|
131
143
|
enum: string[];
|
132
144
|
};
|
133
145
|
};
|
134
|
-
} | {
|
135
|
-
type: string;
|
136
146
|
})[];
|
137
147
|
};
|
138
148
|
fullscreen: {
|
@@ -256,7 +266,9 @@ export declare const Media: {
|
|
256
266
|
type: string;
|
257
267
|
};
|
258
268
|
type: {};
|
259
|
-
when: {
|
269
|
+
when: {
|
270
|
+
type: string;
|
271
|
+
};
|
260
272
|
};
|
261
273
|
};
|
262
274
|
};
|
@@ -26,6 +26,6 @@ export const Sharing = ({ theme, metrikaGoal }) => {
|
|
26
26
|
handleMetrika();
|
27
27
|
}, [handleAnalyticsGlobal, handleMetrika]);
|
28
28
|
return (React.createElement("div", { className: b('item') },
|
29
|
-
React.createElement("
|
29
|
+
React.createElement("div", { className: b('icon') },
|
30
30
|
React.createElement(SharePopover, { url: getAbsolutePath(router), className: b('share'), iconClass: b('share-icon'), switcherClassName: b('switcher', { theme }), tooltipClassName: b('popup'), useWebShareApi: isMobile, direction: 'column', buttonTitle: i18(Keyset.ActionShare), customIcon: ShareArrowUp, placement: "bottom", openByHover: false, shareOptions: shareOptions, handleMetrika: handleAnalytics }))));
|
31
31
|
};
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
9
|
}
|
10
10
|
return t;
|
11
11
|
};
|
12
|
-
import React, { useMemo } from 'react';
|
12
|
+
import React, { Fragment, useMemo } from 'react';
|
13
13
|
import { PageConstructor, PageConstructorProvider, } from '@gravity-ui/page-constructor';
|
14
14
|
import { MetaWrapper } from '../../components/MetaWrapper/MetaWrapper';
|
15
15
|
import { PromptSignIn } from '../../components/PromptSignIn/PromptSignIn';
|
@@ -21,7 +21,7 @@ import './BlogPage.css';
|
|
21
21
|
export const BlogPage = ({ content, posts, tags, services, getPosts, metaData, hasLikes = false, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser = false, onClickSignIn, }) => {
|
22
22
|
const _a = usePromptSignInProps(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
|
23
23
|
const likes = useMemo(() => ({ toggleLike, hasLikes, isSignedInUser, requireSignIn }), [toggleLike, hasLikes, isSignedInUser, requireSignIn]);
|
24
|
-
return (React.createElement(
|
24
|
+
return (React.createElement(Fragment, null,
|
25
25
|
React.createElement(LikesContext.Provider, { value: likes },
|
26
26
|
React.createElement(FeedContext.Provider, { value: {
|
27
27
|
posts: posts.posts,
|
@@ -13,24 +13,23 @@ export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, s
|
|
13
13
|
toggleLikeCallback: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
|
14
14
|
postId: post === null || post === void 0 ? void 0 : post.blogPostId,
|
15
15
|
});
|
16
|
-
return (React.createElement(
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
return (React.createElement(LikesContext.Provider, { value: {
|
17
|
+
toggleLike: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
|
18
|
+
hasLikes: Boolean(likes),
|
19
|
+
} },
|
20
|
+
React.createElement(PostPageContext.Provider, { value: {
|
21
|
+
post,
|
22
|
+
suggestedPosts,
|
23
|
+
likes: likes
|
24
|
+
? {
|
25
|
+
handleUserLike: handleLike,
|
26
|
+
hasUserLike,
|
27
|
+
likesCount,
|
28
|
+
}
|
29
|
+
: undefined,
|
30
|
+
shareOptions,
|
20
31
|
} },
|
21
|
-
React.createElement(
|
22
|
-
|
23
|
-
|
24
|
-
likes: likes
|
25
|
-
? {
|
26
|
-
handleUserLike: handleLike,
|
27
|
-
hasUserLike,
|
28
|
-
likesCount,
|
29
|
-
}
|
30
|
-
: undefined,
|
31
|
-
shareOptions,
|
32
|
-
} },
|
33
|
-
React.createElement(PageConstructorProvider, Object.assign({}, settings),
|
34
|
-
metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
|
35
|
-
React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation }))))));
|
32
|
+
React.createElement(PageConstructorProvider, Object.assign({}, settings),
|
33
|
+
metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
|
34
|
+
React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation })))));
|
36
35
|
};
|