@gravity-ui/blog-constructor 10.0.1 → 10.0.4
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/Feed/schema.d.ts +1 -1
- package/build/cjs/blocks/Feed/schema.js +1 -1
- package/build/cjs/blocks/Feed/schema.js.map +1 -1
- package/build/cjs/blocks/Header/Header.js +2 -2
- package/build/cjs/blocks/Header/Header.js.map +1 -1
- package/build/cjs/components/FeedHeader/components/SelectFilter/SelectFilter.css +3 -0
- package/build/cjs/schema/index.d.ts +1 -1
- package/build/esm/blocks/Feed/schema.d.ts +1 -1
- package/build/esm/blocks/Feed/schema.js +1 -1
- package/build/esm/blocks/Feed/schema.js.map +1 -1
- package/build/esm/blocks/Header/Header.js +2 -2
- package/build/esm/blocks/Header/Header.js.map +1 -1
- package/build/esm/components/FeedHeader/components/SelectFilter/SelectFilter.css +3 -0
- package/build/esm/schema/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ const common_1 = require("../../models/common.js");
|
|
|
7
7
|
exports.Feed = {
|
|
8
8
|
[common_1.BlockType.Feed]: {
|
|
9
9
|
additionalProperties: false,
|
|
10
|
-
required: 'image',
|
|
10
|
+
required: ['image'],
|
|
11
11
|
properties: Object.assign(Object.assign({}, BlockBaseProps), { title: {
|
|
12
12
|
type: 'string',
|
|
13
13
|
}, image: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Feed/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEf,mDAA8C;AAEjC,QAAA,IAAI,GAAG;IAChB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Feed/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEf,mDAA8C;AAEjC,QAAA,IAAI,GAAG;IAChB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,kCACH,cAAc,KACjB,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nimport {BlockType} from '../../models/common';\n\nexport const Feed = {\n [BlockType.Feed]: {\n additionalProperties: false,\n required: ['image'],\n properties: {\n ...BlockBaseProps,\n title: {\n type: 'string',\n },\n image: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
@@ -30,7 +30,7 @@ const Header = (props) => {
|
|
|
30
30
|
const { locale } = React.useContext(LocaleContext_1.LocaleContext);
|
|
31
31
|
const { getBlogPath = common_1.getBlogPath } = React.useContext(SettingsContext_1.SettingsContext);
|
|
32
32
|
const blogPath = getBlogPath(locale.pathPrefix || '');
|
|
33
|
-
const { description, title, id, date, readingTime, tags } = post;
|
|
33
|
+
const { description, title, id, date, readingTime, tags, htmlTitle } = post;
|
|
34
34
|
const breadcrumbs = (0, common_1.getBreadcrumbs)({ tags, blogPath });
|
|
35
35
|
if (theme === 'dark' && breadcrumbs) {
|
|
36
36
|
breadcrumbs.theme = 'dark';
|
|
@@ -39,7 +39,7 @@ const Header = (props) => {
|
|
|
39
39
|
return ((0, jsx_runtime_1.jsx)(Wrapper_1.Wrapper, { paddings: {
|
|
40
40
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
|
41
41
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
|
42
|
-
}, children: (0, jsx_runtime_1.jsx)("div", { className: b({ 'image-out-grid': !imageInGrid }), children: (0, jsx_runtime_1.jsx)(page_constructor_1.HeaderBlock, Object.assign({}, props, { title: title, description: description, breadcrumbs: Object.assign(Object.assign({}, breadcrumbs), customBreadcrumbs), mediaClassName: b('image'), gridClassName: b('grid'), contentWrapperClassName: b('content-wrapper'), contentInnerClassName: b('content-inner'), children: (0, jsx_runtime_1.jsx)(PostInfo_1.PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, theme: theme, qa: "blog-header-meta-container" }) })) }) }));
|
|
42
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { className: b({ 'image-out-grid': !imageInGrid }), children: (0, jsx_runtime_1.jsx)(page_constructor_1.HeaderBlock, Object.assign({}, props, { title: htmlTitle || title, description: description, breadcrumbs: Object.assign(Object.assign({}, breadcrumbs), customBreadcrumbs), mediaClassName: b('image'), gridClassName: b('grid'), contentWrapperClassName: b('content-wrapper'), contentInnerClassName: b('content-inner'), children: (0, jsx_runtime_1.jsx)(PostInfo_1.PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, theme: theme, qa: "blog-header-meta-container" }) })) }) }));
|
|
43
43
|
};
|
|
44
44
|
exports.Header = Header;
|
|
45
45
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAA8E;AAE9E,oEAA4D;AAC5D,iEAAyD;AACzD,kDAA+C;AAC/C,mEAA2D;AAC3D,uEAA+D;AAC/D,uEAA+D;AAC/D,mDAAsD;AAEtD,uDAAyD;AACzD,0CAAqC;AACrC,kDAI4B;AAI5B,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,cAAc,CAAC,CAAC;AA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AClC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC;IAC/B,CAAC;IAED,WAAW,CAAC,eAAe,GAAG,gBAAgB,CAAC;IAE/C,OAAO,CACH,uBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,YAED,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,gBAAgB,EAAE,CAAC,WAAW,EAAC,CAAC,YAC/C,uBAAC,8BAAW,oBACJ,KAAK,IACT,KAAK,EAAE,SAAS,IAAI,KAAK,EACzB,WAAW,EAAE,WAAW,EACxB,WAAW,kCAAM,WAAW,GAAK,iBAAiB,GAClD,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,EACxB,uBAAuB,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAC7C,qBAAqB,EAAE,CAAC,CAAC,eAAe,CAAC,YAEzC,uBAAC,mBAAQ,IACL,MAAM,EAAE,EAAE,EACV,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,wBAAwB,EAClD,KAAK,EAAE,KAAK,EACZ,EAAE,EAAC,4BAA4B,GACjC,IACQ,GACZ,GACA,CACb,CAAC;AACN,CAAC,CAAC;AA/CW,QAAA,MAAM,UA+CjB","sourcesContent":["import * as React from 'react';\n\nimport {AnalyticsEventsProp, HeaderBlock} from '@gravity-ui/page-constructor';\n\nimport {PostInfo} from '../../components/PostInfo/PostInfo';\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {DefaultGoalIds} from '../../constants';\nimport {LocaleContext} from '../../contexts/LocaleContext';\nimport {PostPageContext} from '../../contexts/PostPageContext';\nimport {SettingsContext} from '../../contexts/SettingsContext';\nimport {AnalyticsCounter} from '../../counters/utils';\nimport {HeaderProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\nimport {\n getBreadcrumbs,\n getBlogPath as getDefaultBlogPath,\n prepareAnalyticsEvent,\n} from '../../utils/common';\n\nimport './Header.scss';\n\nconst b = block('header-block');\n\nconst analyticsEventsContainer: Record<string, AnalyticsEventsProp> = {\n sharing: prepareAnalyticsEvent({name: DefaultGoalIds.shareTop}),\n save: prepareAnalyticsEvent({name: DefaultGoalIds.saveTop}),\n};\n\nconst breadcrumbsGoals = prepareAnalyticsEvent({\n name: DefaultGoalIds.breadcrumbsTop,\n counter: AnalyticsCounter.CrossSite,\n});\n\nexport const Header = (props: HeaderProps) => {\n const {theme, paddingTop, paddingBottom, imageInGrid = true} = props;\n const {post, breadcrumbs: customBreadcrumbs = {}} = React.useContext(PostPageContext);\n const {locale} = React.useContext(LocaleContext);\n const {getBlogPath = getDefaultBlogPath} = React.useContext(SettingsContext);\n const blogPath = getBlogPath(locale.pathPrefix || '');\n\n const {description, title, id, date, readingTime, tags, htmlTitle} = post;\n\n const breadcrumbs = getBreadcrumbs({tags, blogPath});\n\n if (theme === 'dark' && breadcrumbs) {\n breadcrumbs.theme = 'dark';\n }\n\n breadcrumbs.analyticsEvents = breadcrumbsGoals;\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n >\n <div className={b({'image-out-grid': !imageInGrid})}>\n <HeaderBlock\n {...props}\n title={htmlTitle || title}\n description={description}\n breadcrumbs={{...breadcrumbs, ...customBreadcrumbs}}\n mediaClassName={b('image')}\n gridClassName={b('grid')}\n contentWrapperClassName={b('content-wrapper')}\n contentInnerClassName={b('content-inner')}\n >\n <PostInfo\n postId={id}\n date={date}\n readingTime={readingTime}\n analyticsEventsContainer={analyticsEventsContainer}\n theme={theme}\n qa=\"blog-header-meta-container\"\n />\n </HeaderBlock>\n </div>\n </Wrapper>\n );\n};\n"]}
|
|
@@ -4,7 +4,7 @@ import { BlockType } from "../../models/common.js";
|
|
|
4
4
|
export const Feed = {
|
|
5
5
|
[BlockType.Feed]: {
|
|
6
6
|
additionalProperties: false,
|
|
7
|
-
required: 'image',
|
|
7
|
+
required: ['image'],
|
|
8
8
|
properties: Object.assign(Object.assign({}, BlockBaseProps), { title: {
|
|
9
9
|
type: 'string',
|
|
10
10
|
}, image: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Feed/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAE9C,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Feed/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAE9C,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,kCACH,cAAc,KACjB,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nimport {BlockType} from '../../models/common';\n\nexport const Feed = {\n [BlockType.Feed]: {\n additionalProperties: false,\n required: ['image'],\n properties: {\n ...BlockBaseProps,\n title: {\n type: 'string',\n },\n image: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
@@ -27,7 +27,7 @@ export const Header = (props) => {
|
|
|
27
27
|
const { locale } = React.useContext(LocaleContext);
|
|
28
28
|
const { getBlogPath = getDefaultBlogPath } = React.useContext(SettingsContext);
|
|
29
29
|
const blogPath = getBlogPath(locale.pathPrefix || '');
|
|
30
|
-
const { description, title, id, date, readingTime, tags } = post;
|
|
30
|
+
const { description, title, id, date, readingTime, tags, htmlTitle } = post;
|
|
31
31
|
const breadcrumbs = getBreadcrumbs({ tags, blogPath });
|
|
32
32
|
if (theme === 'dark' && breadcrumbs) {
|
|
33
33
|
breadcrumbs.theme = 'dark';
|
|
@@ -36,6 +36,6 @@ export const Header = (props) => {
|
|
|
36
36
|
return (_jsx(Wrapper, { paddings: {
|
|
37
37
|
[PaddingsDirections.top]: paddingTop,
|
|
38
38
|
[PaddingsDirections.bottom]: paddingBottom,
|
|
39
|
-
}, children: _jsx("div", { className: b({ 'image-out-grid': !imageInGrid }), children: _jsx(HeaderBlock, Object.assign({}, props, { title: title, description: description, breadcrumbs: Object.assign(Object.assign({}, breadcrumbs), customBreadcrumbs), mediaClassName: b('image'), gridClassName: b('grid'), contentWrapperClassName: b('content-wrapper'), contentInnerClassName: b('content-inner'), children: _jsx(PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, theme: theme, qa: "blog-header-meta-container" }) })) }) }));
|
|
39
|
+
}, children: _jsx("div", { className: b({ 'image-out-grid': !imageInGrid }), children: _jsx(HeaderBlock, Object.assign({}, props, { title: htmlTitle || title, description: description, breadcrumbs: Object.assign(Object.assign({}, breadcrumbs), customBreadcrumbs), mediaClassName: b('image'), gridClassName: b('grid'), contentWrapperClassName: b('content-wrapper'), contentInnerClassName: b('content-inner'), children: _jsx(PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, theme: theme, qa: "blog-header-meta-container" }) })) }) }));
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAsB,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAC,QAAQ,EAAC,8CAA2C;AAC5D,OAAO,EAAC,OAAO,EAAC,4CAAyC;AACzD,OAAO,EAAC,cAAc,EAAC,2BAAwB;AAC/C,OAAO,EAAC,aAAa,EAAC,wCAAqC;AAC3D,OAAO,EAAC,eAAe,EAAC,0CAAuC;AAC/D,OAAO,EAAC,eAAe,EAAC,0CAAuC;AAC/D,OAAO,EAAC,gBAAgB,EAAC,gCAA6B;AAEtD,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AACrC,OAAO,EACH,cAAc,EACd,WAAW,IAAI,kBAAkB,EACjC,qBAAqB,GACxB,8BAA2B;AAE5B,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAEhC,MAAM,wBAAwB,GAAwC;IAClE,OAAO,EAAE,qBAAqB,CAAC,EAAC,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAC,CAAC;IAC/D,IAAI,EAAE,qBAAqB,CAAC,EAAC,IAAI,EAAE,cAAc,CAAC,OAAO,EAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;IAC3C,IAAI,EAAE,cAAc,CAAC,cAAc;IACnC,OAAO,EAAE,gBAAgB,CAAC,SAAS;CACtC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KA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C;IAED,WAAW,CAAC,eAAe,GAAG,gBAAgB,CAAC;IAE/C,OAAO,CACH,KAAC,OAAO,IACJ,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,YAED,cAAK,SAAS,EAAE,CAAC,CAAC,EAAC,gBAAgB,EAAE,CAAC,WAAW,EAAC,CAAC,YAC/C,KAAC,WAAW,oBACJ,KAAK,IACT,KAAK,EAAE,SAAS,IAAI,KAAK,EACzB,WAAW,EAAE,WAAW,EACxB,WAAW,kCAAM,WAAW,GAAK,iBAAiB,GAClD,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,EACxB,uBAAuB,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAC7C,qBAAqB,EAAE,CAAC,CAAC,eAAe,CAAC,YAEzC,KAAC,QAAQ,IACL,MAAM,EAAE,EAAE,EACV,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,wBAAwB,EAClD,KAAK,EAAE,KAAK,EACZ,EAAE,EAAC,4BAA4B,GACjC,IACQ,GACZ,GACA,CACb,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {AnalyticsEventsProp, HeaderBlock} from '@gravity-ui/page-constructor';\n\nimport {PostInfo} from '../../components/PostInfo/PostInfo';\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {DefaultGoalIds} from '../../constants';\nimport {LocaleContext} from '../../contexts/LocaleContext';\nimport {PostPageContext} from '../../contexts/PostPageContext';\nimport {SettingsContext} from '../../contexts/SettingsContext';\nimport {AnalyticsCounter} from '../../counters/utils';\nimport {HeaderProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\nimport {\n getBreadcrumbs,\n getBlogPath as getDefaultBlogPath,\n prepareAnalyticsEvent,\n} from '../../utils/common';\n\nimport './Header.scss';\n\nconst b = block('header-block');\n\nconst analyticsEventsContainer: Record<string, AnalyticsEventsProp> = {\n sharing: prepareAnalyticsEvent({name: DefaultGoalIds.shareTop}),\n save: prepareAnalyticsEvent({name: DefaultGoalIds.saveTop}),\n};\n\nconst breadcrumbsGoals = prepareAnalyticsEvent({\n name: DefaultGoalIds.breadcrumbsTop,\n counter: AnalyticsCounter.CrossSite,\n});\n\nexport const Header = (props: HeaderProps) => {\n const {theme, paddingTop, paddingBottom, imageInGrid = true} = props;\n const {post, breadcrumbs: customBreadcrumbs = {}} = React.useContext(PostPageContext);\n const {locale} = React.useContext(LocaleContext);\n const {getBlogPath = getDefaultBlogPath} = React.useContext(SettingsContext);\n const blogPath = getBlogPath(locale.pathPrefix || '');\n\n const {description, title, id, date, readingTime, tags, htmlTitle} = post;\n\n const breadcrumbs = getBreadcrumbs({tags, blogPath});\n\n if (theme === 'dark' && breadcrumbs) {\n breadcrumbs.theme = 'dark';\n }\n\n breadcrumbs.analyticsEvents = breadcrumbsGoals;\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n >\n <div className={b({'image-out-grid': !imageInGrid})}>\n <HeaderBlock\n {...props}\n title={htmlTitle || title}\n description={description}\n breadcrumbs={{...breadcrumbs, ...customBreadcrumbs}}\n mediaClassName={b('image')}\n gridClassName={b('grid')}\n contentWrapperClassName={b('content-wrapper')}\n contentInnerClassName={b('content-inner')}\n >\n <PostInfo\n postId={id}\n date={date}\n readingTime={readingTime}\n analyticsEventsContainer={analyticsEventsContainer}\n theme={theme}\n qa=\"blog-header-meta-container\"\n />\n </HeaderBlock>\n </div>\n </Wrapper>\n );\n};\n"]}
|