@gravity-ui/blog-constructor 8.3.0 → 8.5.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 (100) hide show
  1. package/build/cjs/blocks/Feed/Feed.d.ts +1 -1
  2. package/build/cjs/blocks/Feed/Feed.js +2 -2
  3. package/build/cjs/blocks/Feed/Feed.js.map +1 -1
  4. package/build/cjs/blocks/Feed/schema.d.ts +1 -30
  5. package/build/cjs/blocks/Feed/schema.js +4 -8
  6. package/build/cjs/blocks/Feed/schema.js.map +1 -1
  7. package/build/cjs/blocks/SideCardList/SideCardList.css +47 -0
  8. package/build/cjs/blocks/SideCardList/SideCardList.d.ts +3 -0
  9. package/build/cjs/blocks/SideCardList/SideCardList.js +21 -0
  10. package/build/cjs/blocks/SideCardList/SideCardList.js.map +1 -0
  11. package/build/cjs/blocks/SideCardList/schema.d.ts +94 -0
  12. package/build/cjs/blocks/SideCardList/schema.js +37 -0
  13. package/build/cjs/blocks/SideCardList/schema.js.map +1 -0
  14. package/build/cjs/blocks/Take/Take.css +70 -0
  15. package/build/cjs/blocks/Take/Take.d.ts +2 -0
  16. package/build/cjs/blocks/Take/Take.js +28 -0
  17. package/build/cjs/blocks/Take/Take.js.map +1 -0
  18. package/build/cjs/blocks/Take/schema.d.ts +96 -0
  19. package/build/cjs/blocks/Take/schema.js +26 -0
  20. package/build/cjs/blocks/Take/schema.js.map +1 -0
  21. package/build/cjs/components/FeedHeader/FeedHeader.d.ts +1 -1
  22. package/build/cjs/components/FeedHeader/FeedHeader.js +2 -2
  23. package/build/cjs/components/FeedHeader/FeedHeader.js.map +1 -1
  24. package/build/cjs/components/FeedHeader/components/Controls/Controls.d.ts +2 -1
  25. package/build/cjs/components/FeedHeader/components/Controls/Controls.js +2 -2
  26. package/build/cjs/components/FeedHeader/components/Controls/Controls.js.map +1 -1
  27. package/build/cjs/components/Wrapper/Wrapper.css +42 -0
  28. package/build/cjs/components/Wrapper/Wrapper.d.ts +1 -0
  29. package/build/cjs/components/Wrapper/Wrapper.js +2 -2
  30. package/build/cjs/components/Wrapper/Wrapper.js.map +1 -1
  31. package/build/cjs/constructor/blocksMap.d.ts +3 -1
  32. package/build/cjs/constructor/blocksMap.js +4 -0
  33. package/build/cjs/constructor/blocksMap.js.map +1 -1
  34. package/build/cjs/hooks/useExtendedComponentMap.d.ts +3 -1
  35. package/build/cjs/models/blocks.d.ts +22 -2
  36. package/build/cjs/models/blocks.js.map +1 -1
  37. package/build/cjs/models/common.d.ts +3 -1
  38. package/build/cjs/models/common.js +2 -0
  39. package/build/cjs/models/common.js.map +1 -1
  40. package/build/cjs/models/paddings.d.ts +1 -1
  41. package/build/cjs/models/paddings.js.map +1 -1
  42. package/build/cjs/schema/blocks.d.ts +1 -0
  43. package/build/cjs/schema/blocks.js +1 -0
  44. package/build/cjs/schema/blocks.js.map +1 -1
  45. package/build/cjs/schema/index.d.ts +97 -30
  46. package/build/cjs/schema/index.js +2 -1
  47. package/build/cjs/schema/index.js.map +1 -1
  48. package/build/esm/blocks/Feed/Feed.d.ts +1 -1
  49. package/build/esm/blocks/Feed/Feed.js +2 -2
  50. package/build/esm/blocks/Feed/Feed.js.map +1 -1
  51. package/build/esm/blocks/Feed/schema.d.ts +1 -30
  52. package/build/esm/blocks/Feed/schema.js +4 -8
  53. package/build/esm/blocks/Feed/schema.js.map +1 -1
  54. package/build/esm/blocks/SideCardList/SideCardList.css +47 -0
  55. package/build/esm/blocks/SideCardList/SideCardList.d.ts +4 -0
  56. package/build/esm/blocks/SideCardList/SideCardList.js +18 -0
  57. package/build/esm/blocks/SideCardList/SideCardList.js.map +1 -0
  58. package/build/esm/blocks/SideCardList/schema.d.ts +94 -0
  59. package/build/esm/blocks/SideCardList/schema.js +34 -0
  60. package/build/esm/blocks/SideCardList/schema.js.map +1 -0
  61. package/build/esm/blocks/Take/Take.css +70 -0
  62. package/build/esm/blocks/Take/Take.d.ts +3 -0
  63. package/build/esm/blocks/Take/Take.js +24 -0
  64. package/build/esm/blocks/Take/Take.js.map +1 -0
  65. package/build/esm/blocks/Take/schema.d.ts +96 -0
  66. package/build/esm/blocks/Take/schema.js +23 -0
  67. package/build/esm/blocks/Take/schema.js.map +1 -0
  68. package/build/esm/components/FeedHeader/FeedHeader.d.ts +1 -1
  69. package/build/esm/components/FeedHeader/FeedHeader.js +2 -2
  70. package/build/esm/components/FeedHeader/FeedHeader.js.map +1 -1
  71. package/build/esm/components/FeedHeader/components/Controls/Controls.d.ts +2 -1
  72. package/build/esm/components/FeedHeader/components/Controls/Controls.js +2 -2
  73. package/build/esm/components/FeedHeader/components/Controls/Controls.js.map +1 -1
  74. package/build/esm/components/Wrapper/Wrapper.css +42 -0
  75. package/build/esm/components/Wrapper/Wrapper.d.ts +1 -0
  76. package/build/esm/components/Wrapper/Wrapper.js +2 -2
  77. package/build/esm/components/Wrapper/Wrapper.js.map +1 -1
  78. package/build/esm/constructor/blocksMap.d.ts +3 -1
  79. package/build/esm/constructor/blocksMap.js +4 -0
  80. package/build/esm/constructor/blocksMap.js.map +1 -1
  81. package/build/esm/hooks/useExtendedComponentMap.d.ts +3 -1
  82. package/build/esm/models/blocks.d.ts +22 -2
  83. package/build/esm/models/blocks.js.map +1 -1
  84. package/build/esm/models/common.d.ts +3 -1
  85. package/build/esm/models/common.js +2 -0
  86. package/build/esm/models/common.js.map +1 -1
  87. package/build/esm/models/paddings.d.ts +1 -1
  88. package/build/esm/models/paddings.js.map +1 -1
  89. package/build/esm/schema/blocks.d.ts +1 -0
  90. package/build/esm/schema/blocks.js +1 -0
  91. package/build/esm/schema/blocks.js.map +1 -1
  92. package/build/esm/schema/index.d.ts +97 -30
  93. package/build/esm/schema/index.js +2 -1
  94. package/build/esm/schema/index.js.map +1 -1
  95. package/package.json +1 -1
  96. package/server/models/blocks.d.ts +22 -2
  97. package/server/models/common.d.ts +3 -1
  98. package/server/models/common.js +2 -0
  99. package/server/models/paddings.d.ts +1 -1
  100. package/styles/mixins.scss +60 -0
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { AuthorType, Author as PCAuthor, YFMWrapper } from '@gravity-ui/page-constructor';
4
+ import { Wrapper } from "../../components/Wrapper/Wrapper.js";
5
+ import { MobileContext } from "../../contexts/MobileContext.js";
6
+ import { PaddingsDirections } from "../../models/paddings.js";
7
+ import { block } from "../../utils/cn.js";
8
+ import './Take.css';
9
+ const b = block('take');
10
+ export const Take = (props) => {
11
+ const { paddingTop, paddingBottom, paddingLeft, paddingRight, text, author, color, noBackground, } = props;
12
+ const isMobile = React.useContext(MobileContext);
13
+ const containerStyle = color ? { '--take-color': color } : undefined;
14
+ return (_jsxs(Wrapper, { className: b('container', { noBackground }), paddings: {
15
+ [PaddingsDirections.top]: paddingTop,
16
+ [PaddingsDirections.bottom]: paddingBottom,
17
+ [PaddingsDirections.left]: paddingLeft,
18
+ [PaddingsDirections.right]: paddingRight,
19
+ }, style: containerStyle, children: [_jsx(YFMWrapper, { content: text, contentClassName: b('text'), tagName: "div", modifiers: {
20
+ blog: true,
21
+ resetPaddings: true,
22
+ } }), _jsx(PCAuthor, { type: isMobile ? AuthorType.Column : AuthorType.Line, author: author, className: b('author'), authorContainerClassName: b('avatar') })] }));
23
+ };
24
+ //# sourceMappingURL=Take.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Take.js","sourceRoot":"../../../../src","sources":["blocks/Take/Take.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,UAAU,EAAE,MAAM,IAAI,QAAQ,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExF,OAAO,EAAC,OAAO,EAAC,4CAAyC;AACzD,OAAO,EAAC,aAAa,EAAC,wCAAqC;AAE3D,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,YAAY,CA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* as React from 'react';\n\nimport {AuthorType, Author as PCAuthor, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {MobileContext} from '../../contexts/MobileContext';\nimport {TakeProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Take.scss';\n\nconst b = block('take');\n\nexport const Take = (props: TakeProps) => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n text,\n author,\n color,\n noBackground,\n } = props;\n\n const isMobile = React.useContext(MobileContext);\n\n const containerStyle = color ? ({'--take-color': color} as React.CSSProperties) : undefined;\n\n return (\n <Wrapper\n className={b('container', {noBackground})}\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n style={containerStyle}\n >\n <YFMWrapper\n content={text}\n contentClassName={b('text')}\n tagName=\"div\"\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n <PCAuthor\n type={isMobile ? AuthorType.Column : AuthorType.Line}\n author={author}\n className={b('author')}\n authorContainerClassName={b('avatar')}\n />\n </Wrapper>\n );\n};\n"]}
@@ -0,0 +1,96 @@
1
+ export declare const Take: {
2
+ "blog-take-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ text: {
8
+ type: string;
9
+ contentType: string;
10
+ };
11
+ author: {
12
+ type: string;
13
+ additionalProperties: boolean;
14
+ required: string[];
15
+ properties: {
16
+ firstName: {
17
+ type: string;
18
+ contentType: string;
19
+ };
20
+ secondName: {
21
+ type: string;
22
+ contentType: string;
23
+ };
24
+ description: {
25
+ type: string;
26
+ contentType: string;
27
+ };
28
+ avatar: {
29
+ type: string;
30
+ };
31
+ };
32
+ };
33
+ paddingTop: {
34
+ type: string;
35
+ enum: string[];
36
+ };
37
+ paddingBottom: {
38
+ type: string;
39
+ enum: string[];
40
+ };
41
+ fullWidth: {
42
+ type: string;
43
+ };
44
+ column: {
45
+ type: string;
46
+ enum: string[];
47
+ };
48
+ qa: {
49
+ type: string;
50
+ };
51
+ anchor: {
52
+ type: string;
53
+ additionalProperties: boolean;
54
+ required: string[];
55
+ properties: {
56
+ text: {
57
+ type: string;
58
+ contentType: string;
59
+ };
60
+ url: {
61
+ type: string;
62
+ };
63
+ urlTitle: {
64
+ type: string;
65
+ };
66
+ };
67
+ };
68
+ visible: {
69
+ type: string;
70
+ enum: string[];
71
+ };
72
+ resetPaddings: {
73
+ type: string;
74
+ };
75
+ context: {
76
+ type: string;
77
+ };
78
+ indent: {
79
+ type: string;
80
+ additionalProperties: boolean;
81
+ properties: {
82
+ top: {
83
+ enum: string[];
84
+ };
85
+ bottom: {
86
+ enum: string[];
87
+ };
88
+ };
89
+ };
90
+ type: {};
91
+ when: {
92
+ type: string;
93
+ };
94
+ };
95
+ };
96
+ };
@@ -0,0 +1,23 @@
1
+ import { validators } from '@gravity-ui/page-constructor';
2
+ import { BlockType } from "../../models/common.js";
3
+ import { BlogBlockBase } from "../../schema/common.js";
4
+ const { common: { BlockBaseProps }, } = validators;
5
+ export const Take = {
6
+ [BlockType.Take]: {
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ required: ['text', 'author'],
10
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { text: { type: 'string', contentType: 'text' }, author: {
11
+ type: 'object',
12
+ additionalProperties: false,
13
+ required: ['firstName', 'secondName'],
14
+ properties: {
15
+ firstName: { type: 'string', contentType: 'text' },
16
+ secondName: { type: 'string', contentType: 'text' },
17
+ description: { type: 'string', contentType: 'yfm' },
18
+ avatar: { type: 'string' },
19
+ },
20
+ } }),
21
+ },
22
+ };
23
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Take/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;QAC5B,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,IAAI,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC,EAC3C,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;gBACrC,UAAU,EAAE;oBACR,SAAS,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC;oBAChD,UAAU,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC;oBACjD,WAAW,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAC;oBACjD,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;iBAC3B;aACJ,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nexport const Take = {\n [BlockType.Take]: {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'author'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n text: {type: 'string', contentType: 'text'},\n author: {\n type: 'object',\n additionalProperties: false,\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {type: 'string', contentType: 'text'},\n secondName: {type: 'string', contentType: 'text'},\n description: {type: 'string', contentType: 'yfm'},\n avatar: {type: 'string'},\n },\n },\n },\n },\n};\n"]}
@@ -4,5 +4,5 @@ import './FeedHeader.css';
4
4
  type HeaderProps = Pick<HeaderBlockProps, 'background' | 'offset' | 'theme' | 'verticalOffset'>;
5
5
  type FeedHeaderProps = HeaderProps & ControlsProps;
6
6
  type FeedHeaderContainerProps = FeedHeaderProps & ClassNameProps;
7
- export declare const FeedHeader: ({ tags, services, handleLoadData, offset, background, theme, verticalOffset, className, queryParams, }: FeedHeaderContainerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const FeedHeader: ({ tags, services, handleLoadData, offset, background, theme, verticalOffset, className, queryParams, title, }: FeedHeaderContainerProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -4,12 +4,12 @@ import { block } from "../../utils/cn.js";
4
4
  import { Controls } from "./components/Controls/Controls.js";
5
5
  import './FeedHeader.css';
6
6
  const b = block('feed-header');
7
- export const FeedHeader = ({ tags, services, handleLoadData, offset = 'default', background, theme = 'light', verticalOffset = 'l', className, queryParams, }) => {
7
+ export const FeedHeader = ({ tags, services, handleLoadData, offset = 'default', background, theme = 'light', verticalOffset = 'l', className, queryParams, title, }) => {
8
8
  const backgroundThemed = background && getThemedValue(background, theme);
9
9
  return (_jsxs("header", { className: b('header', { ['has-background']: Boolean(background) }, className), children: [(backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.color) ? (_jsx(FullWidthBackground, { style: { backgroundColor: backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.color }, theme: "rounded" })) : null, _jsxs(Grid, { className: b('content', { offset, theme, 'vertical-offset': verticalOffset }), children: [backgroundThemed ? (_jsx(BackgroundImage, { src: backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.url, className: b('background'), imageClassName: b('background-img'), style: {
10
10
  backgroundColor: backgroundThemed.fullWidth
11
11
  ? ''
12
12
  : backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.color,
13
- }, disableCompress: backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.disableCompress })) : null, _jsx(Controls, { tags: tags, services: services, handleLoadData: handleLoadData, queryParams: queryParams })] })] }));
13
+ }, disableCompress: backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.disableCompress })) : null, _jsx(Controls, { title: title, tags: tags, services: services, handleLoadData: handleLoadData, queryParams: queryParams })] })] }));
14
14
  };
15
15
  //# sourceMappingURL=FeedHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeedHeader.js","sourceRoot":"../../../../src","sources":["components/FeedHeader/FeedHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,IAAI,EAEJ,cAAc,GACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,EAAC,QAAQ,EAAgB,0CAAuC;AAEvE,OAAO,kBAAkB,CAAC;AAE1B,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAQ/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACvB,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,MAAM,GAAG,SAAS,EAClB,UAAU,EACV,KAAK,GAAG,OAAO,EACf,cAAc,GAAG,GAAG,EACpB,SAAS,EACT,WAAW,GACY,EAAE,EAAE;IAC3B,MAAM,gBAAgB,GAAG,UAAU,IAAI,cAAc,CAAC,UAAU,EAAE,KAAc,CAAC,CAAC;IAElF,OAAO,CACH,kBAAQ,SAAS,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,EAAC,EAAE,SAAS,CAAC,aAC/E,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,EAAC,CAAC,CAAC,CACvB,KAAC,mBAAmB,IAChB,KAAK,EAAE,EAAC,eAAe,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,EAAC,EACjD,KAAK,EAAC,SAAS,GACjB,CACL,CAAC,CAAC,CAAC,IAAI,EACR,MAAC,IAAI,IAAC,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAC,CAAC,aAC5E,gBAAgB,CAAC,CAAC,CAAC,CAChB,KAAC,eAAe,IACZ,GAAG,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,GAAG,EAC1B,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,gBAAgB,CAAC,EACnC,KAAK,EAAE;4BACH,eAAe,EAAE,gBAAgB,CAAC,SAAS;gCACvC,CAAC,CAAC,EAAE;gCACJ,CAAC,CAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK;yBAChC,EACD,eAAe,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,eAAe,GACpD,CACL,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,QAAQ,IACL,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,GAC1B,IACC,IACF,CACZ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import {\n BackgroundImage,\n FullWidthBackground,\n Grid,\n Theme,\n getThemedValue,\n} from '@gravity-ui/page-constructor';\n\nimport {ClassNameProps, HeaderBlockProps} from '../../models/common';\nimport {block} from '../../utils/cn';\n\nimport {Controls, ControlsProps} from './components/Controls/Controls';\n\nimport './FeedHeader.scss';\n\nconst b = block('feed-header');\n\ntype HeaderProps = Pick<HeaderBlockProps, 'background' | 'offset' | 'theme' | 'verticalOffset'>;\n\ntype FeedHeaderProps = HeaderProps & ControlsProps;\n\ntype FeedHeaderContainerProps = FeedHeaderProps & ClassNameProps;\n\nexport const FeedHeader = ({\n tags,\n services,\n handleLoadData,\n offset = 'default',\n background,\n theme = 'light',\n verticalOffset = 'l',\n className,\n queryParams,\n}: FeedHeaderContainerProps) => {\n const backgroundThemed = background && getThemedValue(background, theme as Theme);\n\n return (\n <header className={b('header', {['has-background']: Boolean(background)}, className)}>\n {backgroundThemed?.color ? (\n <FullWidthBackground\n style={{backgroundColor: backgroundThemed?.color}}\n theme=\"rounded\"\n />\n ) : null}\n <Grid className={b('content', {offset, theme, 'vertical-offset': verticalOffset})}>\n {backgroundThemed ? (\n <BackgroundImage\n src={backgroundThemed?.url}\n className={b('background')}\n imageClassName={b('background-img')}\n style={{\n backgroundColor: backgroundThemed.fullWidth\n ? ''\n : backgroundThemed?.color,\n }}\n disableCompress={backgroundThemed?.disableCompress}\n />\n ) : null}\n <Controls\n tags={tags}\n services={services}\n handleLoadData={handleLoadData}\n queryParams={queryParams}\n />\n </Grid>\n </header>\n );\n};\n"]}
1
+ {"version":3,"file":"FeedHeader.js","sourceRoot":"../../../../src","sources":["components/FeedHeader/FeedHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,IAAI,EAEJ,cAAc,GACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,EAAC,QAAQ,EAAgB,0CAAuC;AAEvE,OAAO,kBAAkB,CAAC;AAE1B,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAQ/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACvB,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,MAAM,GAAG,SAAS,EAClB,UAAU,EACV,KAAK,GAAG,OAAO,EACf,cAAc,GAAG,GAAG,EACpB,SAAS,EACT,WAAW,EACX,KAAK,GACkB,EAAE,EAA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IACC,IACF,CACZ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import {\n BackgroundImage,\n FullWidthBackground,\n Grid,\n Theme,\n getThemedValue,\n} from '@gravity-ui/page-constructor';\n\nimport {ClassNameProps, HeaderBlockProps} from '../../models/common';\nimport {block} from '../../utils/cn';\n\nimport {Controls, ControlsProps} from './components/Controls/Controls';\n\nimport './FeedHeader.scss';\n\nconst b = block('feed-header');\n\ntype HeaderProps = Pick<HeaderBlockProps, 'background' | 'offset' | 'theme' | 'verticalOffset'>;\n\ntype FeedHeaderProps = HeaderProps & ControlsProps;\n\ntype FeedHeaderContainerProps = FeedHeaderProps & ClassNameProps;\n\nexport const FeedHeader = ({\n tags,\n services,\n handleLoadData,\n offset = 'default',\n background,\n theme = 'light',\n verticalOffset = 'l',\n className,\n queryParams,\n title,\n}: FeedHeaderContainerProps) => {\n const backgroundThemed = background && getThemedValue(background, theme as Theme);\n\n return (\n <header className={b('header', {['has-background']: Boolean(background)}, className)}>\n {backgroundThemed?.color ? (\n <FullWidthBackground\n style={{backgroundColor: backgroundThemed?.color}}\n theme=\"rounded\"\n />\n ) : null}\n <Grid className={b('content', {offset, theme, 'vertical-offset': verticalOffset})}>\n {backgroundThemed ? (\n <BackgroundImage\n src={backgroundThemed?.url}\n className={b('background')}\n imageClassName={b('background-img')}\n style={{\n backgroundColor: backgroundThemed.fullWidth\n ? ''\n : backgroundThemed?.color,\n }}\n disableCompress={backgroundThemed?.disableCompress}\n />\n ) : null}\n <Controls\n title={title}\n tags={tags}\n services={services}\n handleLoadData={handleLoadData}\n queryParams={queryParams}\n />\n </Grid>\n </header>\n );\n};\n"]}
@@ -11,5 +11,6 @@ export type ControlsProps = {
11
11
  tags?: SelectItem[];
12
12
  services?: SelectItem[];
13
13
  queryParams: Query;
14
+ title?: string;
14
15
  };
15
- export declare const Controls: ({ handleLoadData, tags, services, queryParams, }: ControlsProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Controls: ({ handleLoadData, tags, services, queryParams, title, }: ControlsProps) => import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,7 @@ const b = block('feed-controls');
18
18
  const ICON_SIZE = 16;
19
19
  const DEFAULT_PAGE = 1;
20
20
  const VIRTUALIZATION_THRESHOLD = 1000;
21
- export const Controls = ({ handleLoadData, tags = [], services = [], queryParams, }) => {
21
+ export const Controls = ({ handleLoadData, tags = [], services = [], queryParams, title = i18n(Keyset.Title), }) => {
22
22
  const { hasLikes } = React.useContext(LikesContext);
23
23
  const handleAnalyticsTag = useAnalytics(DefaultEventNames.Tag);
24
24
  const handleAnalyticsService = useAnalytics(DefaultEventNames.Service);
@@ -87,7 +87,7 @@ export const Controls = ({ handleLoadData, tags = [], services = [], queryParams
87
87
  };
88
88
  const tagsItems = React.useMemo(() => [{ value: 'empty', content: i18n(Keyset.AllTags) }, ...tags], [tags]);
89
89
  const servicesItems = React.useMemo(() => (servicesInitial ? [...servicesInitial.split(',')] : []), [servicesInitial]);
90
- return (_jsx(MobileProvider, { mobile: false, children: _jsxs("div", { className: b('header'), children: [_jsx("h1", { className: b('header-item', { title: true }), children: i18n(Keyset.Title) }), _jsxs("div", { className: b('header-item', { filters: true }), children: [_jsx("div", { className: b('filter-item'), children: _jsx(Search, { className: b('search'), placeholder: i18n(Keyset.Search), initialValue: search && typeof search === 'string' ? search : '', onSubmit: handleSearch }) }), _jsx("div", { className: b('filter-item'), children: _jsx(Select, { className: b('select'), size: "xl", options: tagsItems, defaultValue: [tagInitial], onUpdate: handleTagSelect, placeholder: i18n(Keyset.AllTags), popupClassName: b('popup', { isMobile }), renderControl: renderSwitcher({
90
+ return (_jsx(MobileProvider, { mobile: false, children: _jsxs("div", { className: b('header'), children: [_jsx("h1", { className: b('header-item', { title: true }), children: title }), _jsxs("div", { className: b('header-item', { filters: true }), children: [_jsx("div", { className: b('filter-item'), children: _jsx(Search, { className: b('search'), placeholder: i18n(Keyset.Search), initialValue: search && typeof search === 'string' ? search : '', onSubmit: handleSearch }) }), _jsx("div", { className: b('filter-item'), children: _jsx(Select, { className: b('select'), size: "xl", options: tagsItems, defaultValue: [tagInitial], onUpdate: handleTagSelect, placeholder: i18n(Keyset.AllTags), popupClassName: b('popup', { isMobile }), renderControl: renderSwitcher({
91
91
  initial: [tagInitial],
92
92
  list: tagsItems,
93
93
  defaultLabel: i18n(Keyset.AllTags),
@@ -1 +1 @@
1
- {"version":3,"file":"Controls.js","sourceRoot":"../../../../../../src","sources":["components/FeedHeader/components/Controls/Controls.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAC,cAAc,EAAC,iCAA8B;AACrD,OAAO,EAAC,YAAY,EAAC,6CAA0C;AAC/D,OAAO,EAAC,aAAa,EAAC,8CAA2C;AACjE,OAAO,EAAC,gBAAgB,EAAC,sCAAmC;AAC5D,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,kCAAyB;AAC9C,OAAO,EAAC,iBAAiB,EAAmB,qCAAkC;AAC9E,OAAO,EAAC,KAAK,EAAC,gCAA6B;AAC3C,OAAO,EAAC,qBAAqB,EAAC,oCAAiC;AAC/D,OAAO,EAAC,MAAM,EAAC,kCAA+B;AAE9C,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,cAAc,EAAC,2BAAwB;AAE3E,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAejC,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACrB,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a;oCACtB,IAAI,EAAE,QAAQ;oCACd,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;oCACtC,EAAE,EAAE,gBAAgB;iCACvB,CAAC,EACF,uBAAuB,EAAE,wBAAwB,EACjD,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,GAC5B,GACA,CACT,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,CAAC,CAAC,CAAC,CACR,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,YAAY,EAAE,IAAI,EAAC,CAAC,YAClD,MAAC,MAAM,IACH,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,CAAC,CAAC,mBAAmB,EAAE,EAAC,SAAS,EAAC,CAAC,EAC9C,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,SAAS,aAEnB,KAAC,IAAI,IACD,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,SAAS,EAAC,CAAC,GACnC,EACD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IACxB,GACP,CACT,CAAC,CAAC,CAAC,IAAI,IACN,IACJ,GACO,CACpB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Bookmark} from '@gravity-ui/icons';\nimport {useAnalytics} from '@gravity-ui/page-constructor';\nimport {Button, Icon, MobileProvider, Select} from '@gravity-ui/uikit';\n\nimport {DefaultGoalIds} from '../../../../constants';\nimport {LikesContext} from '../../../../contexts/LikesContext';\nimport {MobileContext} from '../../../../contexts/MobileContext';\nimport {AnalyticsCounter} from '../../../../counters/utils';\nimport {Keyset, i18n} from '../../../../i18n';\nimport {DefaultEventNames, FetchArgs, Query} from '../../../../models/common';\nimport {block} from '../../../../utils/cn';\nimport {prepareAnalyticsEvent} from '../../../../utils/common';\nimport {Search} from '../../../Search/Search';\n\nimport {renderFilter, renderOption, renderSwitcher} from './customRenders';\n\nimport './Controls.scss';\n\nconst b = block('feed-controls');\n\nexport type SelectItem = {\n content: string;\n value: string;\n icon?: React.ReactNode;\n};\n\nexport type ControlsProps = {\n handleLoadData: (props: FetchArgs) => void;\n tags?: SelectItem[];\n services?: SelectItem[];\n queryParams: Query;\n};\n\nconst ICON_SIZE = 16;\nconst DEFAULT_PAGE = 1;\nconst VIRTUALIZATION_THRESHOLD = 1000;\n\nexport const Controls = ({\n handleLoadData,\n tags = [],\n services = [],\n queryParams,\n}: ControlsProps) => {\n const {hasLikes} = React.useContext(LikesContext);\n const handleAnalyticsTag = useAnalytics(DefaultEventNames.Tag);\n const handleAnalyticsService = useAnalytics(DefaultEventNames.Service);\n const handleAnalyticsSaveOnly = useAnalytics(DefaultEventNames.SaveOnly);\n\n const {\n savedOnly: savedOnlyInitial,\n search: searchInitial,\n tags: tagInitial,\n services: servicesInitial,\n } = queryParams || {};\n\n const [savedOnly, setSavedOnly] = React.useState<boolean>(savedOnlyInitial === 'true');\n const [search, setSearch] = React.useState<string>(searchInitial as string);\n\n const isMobile = React.useContext(MobileContext);\n\n const handleSavedOnly = () => {\n handleAnalyticsSaveOnly();\n setSavedOnly(!savedOnly);\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {\n savedOnly: savedOnly ? '' : 'true',\n search: '',\n tags: '',\n page: DEFAULT_PAGE,\n services: '',\n },\n });\n };\n\n const handleSearch = (searchValue: string) => {\n setSearch(searchValue);\n\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {search: searchValue, page: DEFAULT_PAGE},\n });\n };\n\n const handleTagSelect = (selectedTags: string[]) => {\n const event = prepareAnalyticsEvent({\n name: DefaultGoalIds.tag,\n counter: AnalyticsCounter.CrossSite,\n });\n handleAnalyticsTag(event, {\n theme: selectedTags[0],\n });\n\n const isEmptyTag = selectedTags.some((tag) => tag === 'empty');\n\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {\n tags: isEmptyTag ? '' : selectedTags[0],\n page: DEFAULT_PAGE,\n },\n });\n };\n\n const handleServicesSelect = (selectedServices: string[]) => {\n const forAnalyticsServices = services.filter((service) => {\n return selectedServices.includes(service.value);\n });\n\n const servicesAsStringForAnalytics = forAnalyticsServices\n .map((service) => service.content)\n .join(',');\n\n const event = prepareAnalyticsEvent({\n name: DefaultGoalIds.service,\n counter: AnalyticsCounter.CrossSite,\n });\n handleAnalyticsService(event, {\n service: servicesAsStringForAnalytics,\n });\n\n const servicesAsString = selectedServices.join(',');\n\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {services: servicesAsString, page: DEFAULT_PAGE},\n });\n };\n\n const tagsItems = React.useMemo(\n () => [{value: 'empty', content: i18n(Keyset.AllTags)} as unknown as SelectItem, ...tags],\n [tags],\n );\n\n const servicesItems = React.useMemo(\n () => (servicesInitial ? [...(servicesInitial as string).split(',')] : []),\n [servicesInitial],\n );\n\n return (\n <MobileProvider mobile={false}>\n <div className={b('header')}>\n <h1 className={b('header-item', {title: true})}>{i18n(Keyset.Title)}</h1>\n <div className={b('header-item', {filters: true})}>\n <div className={b('filter-item')}>\n <Search\n className={b('search')}\n placeholder={i18n(Keyset.Search)}\n initialValue={search && typeof search === 'string' ? search : ''}\n onSubmit={handleSearch}\n />\n </div>\n <div className={b('filter-item')}>\n <Select\n className={b('select')}\n size=\"xl\"\n options={tagsItems}\n defaultValue={[tagInitial] as string[]}\n onUpdate={handleTagSelect}\n placeholder={i18n(Keyset.AllTags)}\n popupClassName={b('popup', {isMobile})}\n renderControl={renderSwitcher({\n initial: [tagInitial],\n list: tagsItems,\n defaultLabel: i18n(Keyset.AllTags),\n })}\n disablePortal\n virtualizationThreshold={VIRTUALIZATION_THRESHOLD}\n renderOption={renderOption}\n />\n </div>\n\n {services.length > 0 ? (\n <div className={b('filter-item')}>\n <Select\n className={b('select')}\n size=\"xl\"\n multiple\n filterable\n hasClear\n disablePortal\n options={services}\n defaultValue={servicesItems}\n popupClassName={b('popup', {isMobile})}\n onUpdate={handleServicesSelect}\n placeholder={i18n(Keyset.AllServices)}\n renderControl={renderSwitcher({\n initial: servicesItems,\n list: services,\n defaultLabel: i18n(Keyset.AllServices),\n qa: 'service-select',\n })}\n virtualizationThreshold={VIRTUALIZATION_THRESHOLD}\n renderOption={renderOption}\n renderFilter={renderFilter}\n />\n </div>\n ) : null}\n {hasLikes ? (\n <div className={b('filter-item', {'width-auto': true})}>\n <Button\n view={'outlined'}\n className={b('saved-only-button', {savedOnly})}\n size=\"xl\"\n onClick={handleSavedOnly}\n selected={savedOnly}\n >\n <Icon\n data={Bookmark}\n size={ICON_SIZE}\n className={b('icon', {savedOnly})}\n />\n {i18n(Keyset.ActionSavedOnly)}\n </Button>\n </div>\n ) : null}\n </div>\n </div>\n </MobileProvider>\n );\n};\n"]}
1
+ {"version":3,"file":"Controls.js","sourceRoot":"../../../../../../src","sources":["components/FeedHeader/components/Controls/Controls.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAC,cAAc,EAAC,iCAA8B;AACrD,OAAO,EAAC,YAAY,EAAC,6CAA0C;AAC/D,OAAO,EAAC,aAAa,EAAC,8CAA2C;AACjE,OAAO,EAAC,gBAAgB,EAAC,sCAAmC;AAC5D,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,kCAAyB;AAC9C,OAAO,EAAC,iBAAiB,EAAmB,qCAAkC;AAC9E,OAAO,EAAC,KAAK,EAAC,gCAA6B;AAC3C,OAAO,EAAC,qBAAqB,EAAC,oCAAiC;AAC/D,OAAO,EAAC,MAAM,EAAC,kCAA+B;AAE9C,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,cAAc,EAAC,2B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ACV,QAAQ,QACR,aAAa,QACb,OAAO,EAAE,QAAQ,EACjB,YAAY,EAAE,aAAa,EAC3B,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAC,CAAC,EACtC,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EACrC,aAAa,EAAE,cAAc,CAAC;oCAC1B,OAAO,EAAE,aAAa;oCACtB,IAAI,EAAE,QAAQ;oCACd,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;oCACtC,EAAE,EAAE,gBAAgB;iCACvB,CAAC,EACF,uBAAuB,EAAE,wBAAwB,EACjD,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,GAC5B,GACA,CACT,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,CAAC,CAAC,CAAC,CACR,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,YAAY,EAAE,IAAI,EAAC,CAAC,YAClD,MAAC,MAAM,IACH,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,CAAC,CAAC,mBAAmB,EAAE,EAAC,SAAS,EAAC,CAAC,EAC9C,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,SAAS,aAEnB,KAAC,IAAI,IACD,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,SAAS,EAAC,CAAC,GACnC,EACD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IACxB,GACP,CACT,CAAC,CAAC,CAAC,IAAI,IACN,IACJ,GACO,CACpB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Bookmark} from '@gravity-ui/icons';\nimport {useAnalytics} from '@gravity-ui/page-constructor';\nimport {Button, Icon, MobileProvider, Select} from '@gravity-ui/uikit';\n\nimport {DefaultGoalIds} from '../../../../constants';\nimport {LikesContext} from '../../../../contexts/LikesContext';\nimport {MobileContext} from '../../../../contexts/MobileContext';\nimport {AnalyticsCounter} from '../../../../counters/utils';\nimport {Keyset, i18n} from '../../../../i18n';\nimport {DefaultEventNames, FetchArgs, Query} from '../../../../models/common';\nimport {block} from '../../../../utils/cn';\nimport {prepareAnalyticsEvent} from '../../../../utils/common';\nimport {Search} from '../../../Search/Search';\n\nimport {renderFilter, renderOption, renderSwitcher} from './customRenders';\n\nimport './Controls.scss';\n\nconst b = block('feed-controls');\n\nexport type SelectItem = {\n content: string;\n value: string;\n icon?: React.ReactNode;\n};\n\nexport type ControlsProps = {\n handleLoadData: (props: FetchArgs) => void;\n tags?: SelectItem[];\n services?: SelectItem[];\n queryParams: Query;\n title?: string;\n};\n\nconst ICON_SIZE = 16;\nconst DEFAULT_PAGE = 1;\nconst VIRTUALIZATION_THRESHOLD = 1000;\n\nexport const Controls = ({\n handleLoadData,\n tags = [],\n services = [],\n queryParams,\n title = i18n(Keyset.Title),\n}: ControlsProps) => {\n const {hasLikes} = React.useContext(LikesContext);\n const handleAnalyticsTag = useAnalytics(DefaultEventNames.Tag);\n const handleAnalyticsService = useAnalytics(DefaultEventNames.Service);\n const handleAnalyticsSaveOnly = useAnalytics(DefaultEventNames.SaveOnly);\n\n const {\n savedOnly: savedOnlyInitial,\n search: searchInitial,\n tags: tagInitial,\n services: servicesInitial,\n } = queryParams || {};\n\n const [savedOnly, setSavedOnly] = React.useState<boolean>(savedOnlyInitial === 'true');\n const [search, setSearch] = React.useState<string>(searchInitial as string);\n\n const isMobile = React.useContext(MobileContext);\n\n const handleSavedOnly = () => {\n handleAnalyticsSaveOnly();\n setSavedOnly(!savedOnly);\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {\n savedOnly: savedOnly ? '' : 'true',\n search: '',\n tags: '',\n page: DEFAULT_PAGE,\n services: '',\n },\n });\n };\n\n const handleSearch = (searchValue: string) => {\n setSearch(searchValue);\n\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {search: searchValue, page: DEFAULT_PAGE},\n });\n };\n\n const handleTagSelect = (selectedTags: string[]) => {\n const event = prepareAnalyticsEvent({\n name: DefaultGoalIds.tag,\n counter: AnalyticsCounter.CrossSite,\n });\n handleAnalyticsTag(event, {\n theme: selectedTags[0],\n });\n\n const isEmptyTag = selectedTags.some((tag) => tag === 'empty');\n\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {\n tags: isEmptyTag ? '' : selectedTags[0],\n page: DEFAULT_PAGE,\n },\n });\n };\n\n const handleServicesSelect = (selectedServices: string[]) => {\n const forAnalyticsServices = services.filter((service) => {\n return selectedServices.includes(service.value);\n });\n\n const servicesAsStringForAnalytics = forAnalyticsServices\n .map((service) => service.content)\n .join(',');\n\n const event = prepareAnalyticsEvent({\n name: DefaultGoalIds.service,\n counter: AnalyticsCounter.CrossSite,\n });\n handleAnalyticsService(event, {\n service: servicesAsStringForAnalytics,\n });\n\n const servicesAsString = selectedServices.join(',');\n\n handleLoadData({\n page: DEFAULT_PAGE,\n query: {services: servicesAsString, page: DEFAULT_PAGE},\n });\n };\n\n const tagsItems = React.useMemo(\n () => [{value: 'empty', content: i18n(Keyset.AllTags)} as unknown as SelectItem, ...tags],\n [tags],\n );\n\n const servicesItems = React.useMemo(\n () => (servicesInitial ? [...(servicesInitial as string).split(',')] : []),\n [servicesInitial],\n );\n\n return (\n <MobileProvider mobile={false}>\n <div className={b('header')}>\n <h1 className={b('header-item', {title: true})}>{title}</h1>\n <div className={b('header-item', {filters: true})}>\n <div className={b('filter-item')}>\n <Search\n className={b('search')}\n placeholder={i18n(Keyset.Search)}\n initialValue={search && typeof search === 'string' ? search : ''}\n onSubmit={handleSearch}\n />\n </div>\n <div className={b('filter-item')}>\n <Select\n className={b('select')}\n size=\"xl\"\n options={tagsItems}\n defaultValue={[tagInitial] as string[]}\n onUpdate={handleTagSelect}\n placeholder={i18n(Keyset.AllTags)}\n popupClassName={b('popup', {isMobile})}\n renderControl={renderSwitcher({\n initial: [tagInitial],\n list: tagsItems,\n defaultLabel: i18n(Keyset.AllTags),\n })}\n disablePortal\n virtualizationThreshold={VIRTUALIZATION_THRESHOLD}\n renderOption={renderOption}\n />\n </div>\n\n {services.length > 0 ? (\n <div className={b('filter-item')}>\n <Select\n className={b('select')}\n size=\"xl\"\n multiple\n filterable\n hasClear\n disablePortal\n options={services}\n defaultValue={servicesItems}\n popupClassName={b('popup', {isMobile})}\n onUpdate={handleServicesSelect}\n placeholder={i18n(Keyset.AllServices)}\n renderControl={renderSwitcher({\n initial: servicesItems,\n list: services,\n defaultLabel: i18n(Keyset.AllServices),\n qa: 'service-select',\n })}\n virtualizationThreshold={VIRTUALIZATION_THRESHOLD}\n renderOption={renderOption}\n renderFilter={renderFilter}\n />\n </div>\n ) : null}\n {hasLikes ? (\n <div className={b('filter-item', {'width-auto': true})}>\n <Button\n view={'outlined'}\n className={b('saved-only-button', {savedOnly})}\n size=\"xl\"\n onClick={handleSavedOnly}\n selected={savedOnly}\n >\n <Icon\n data={Bookmark}\n size={ICON_SIZE}\n className={b('icon', {savedOnly})}\n />\n {i18n(Keyset.ActionSavedOnly)}\n </Button>\n </div>\n ) : null}\n </div>\n </div>\n </MobileProvider>\n );\n};\n"]}
@@ -6,6 +6,9 @@ unpredictable css rules order in build */
6
6
  .bc-wrapper_padding-top_s {
7
7
  padding-top: 16px;
8
8
  }
9
+ .bc-wrapper_padding-top_sm {
10
+ padding-top: 24px;
11
+ }
9
12
  .bc-wrapper_padding-top_m {
10
13
  padding-top: 32px;
11
14
  }
@@ -21,6 +24,9 @@ unpredictable css rules order in build */
21
24
  .bc-wrapper_padding-bottom_s {
22
25
  padding-bottom: 16px;
23
26
  }
27
+ .bc-wrapper_padding-bottom_sm {
28
+ padding-bottom: 24px;
29
+ }
24
30
  .bc-wrapper_padding-bottom_m {
25
31
  padding-bottom: 32px;
26
32
  }
@@ -29,4 +35,40 @@ unpredictable css rules order in build */
29
35
  }
30
36
  .bc-wrapper_padding-bottom_xl {
31
37
  padding-bottom: 64px;
38
+ }
39
+ .bc-wrapper_padding-left_xs {
40
+ padding-left: 0px;
41
+ }
42
+ .bc-wrapper_padding-left_s {
43
+ padding-left: 16px;
44
+ }
45
+ .bc-wrapper_padding-left_sm {
46
+ padding-left: 24px;
47
+ }
48
+ .bc-wrapper_padding-left_m {
49
+ padding-left: 32px;
50
+ }
51
+ .bc-wrapper_padding-left_l {
52
+ padding-left: 48px;
53
+ }
54
+ .bc-wrapper_padding-left_xl {
55
+ padding-left: 64px;
56
+ }
57
+ .bc-wrapper_padding-right_xs {
58
+ padding-right: 0px;
59
+ }
60
+ .bc-wrapper_padding-right_s {
61
+ padding-right: 16px;
62
+ }
63
+ .bc-wrapper_padding-right_sm {
64
+ padding-right: 24px;
65
+ }
66
+ .bc-wrapper_padding-right_m {
67
+ padding-right: 32px;
68
+ }
69
+ .bc-wrapper_padding-right_l {
70
+ padding-right: 48px;
71
+ }
72
+ .bc-wrapper_padding-right_xl {
73
+ padding-right: 64px;
32
74
  }
@@ -5,6 +5,7 @@ import './Wrapper.css';
5
5
  type WrapperProps = ClassNameProps & QAProps & {
6
6
  paddings?: Paddings;
7
7
  children?: React.ReactNode;
8
+ style?: React.CSSProperties;
8
9
  };
9
10
  export declare const Wrapper: React.FunctionComponent<WrapperProps>;
10
11
  export {};
@@ -3,10 +3,10 @@ import { DEFAULT_PADDINGS } from "../../constants.js";
3
3
  import { block } from "../../utils/cn.js";
4
4
  import './Wrapper.css';
5
5
  const b = block('wrapper');
6
- export const Wrapper = ({ children, paddings = DEFAULT_PADDINGS, className, qa, }) => (_jsx("section", { className: b({
6
+ export const Wrapper = ({ children, paddings = DEFAULT_PADDINGS, className, qa, style, }) => (_jsx("section", { className: b({
7
7
  ['padding-top']: (paddings === null || paddings === void 0 ? void 0 : paddings.top) || 'xs',
8
8
  ['padding-bottom']: (paddings === null || paddings === void 0 ? void 0 : paddings.bottom) || 'l',
9
9
  ['padding-left']: (paddings === null || paddings === void 0 ? void 0 : paddings.left) || '',
10
10
  ['padding-right']: (paddings === null || paddings === void 0 ? void 0 : paddings.right) || '',
11
- }, className), "data-qa": qa, children: children }));
11
+ }, className), "data-qa": qa, style: style, children: children }));
12
12
  //# sourceMappingURL=Wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wrapper.js","sourceRoot":"../../../../src","sources":["components/Wrapper/Wrapper.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,gBAAgB,EAAC,2BAAwB;AAGjD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAQ3B,MAAM,CAAC,MAAM,OAAO,GAA0C,CAAC,EAC3D,QAAQ,EACR,QAAQ,GAAG,gBAAgB,EAC3B,SAAS,EACT,EAAE,GACL,EAAE,EAAE,CAAC,CACF,kBACI,SAAS,EAAE,CAAC,CACR;QACI,CAAC,aAAa,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,KAAI,IAAI;QACtC,CAAC,gBAAgB,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,KAAI,GAAG;QAC3C,CAAC,cAAc,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,KAAI,EAAE;QACtC,CAAC,eAAe,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,KAAI,EAAE;KAC3C,EACD,SAAS,CACZ,aACQ,EAAE,YAEV,QAAQ,GACH,CACb,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {DEFAULT_PADDINGS} from '../../constants';\nimport {ClassNameProps, QAProps} from '../../models/common';\nimport {Paddings} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Wrapper.scss';\n\nconst b = block('wrapper');\n\ntype WrapperProps = ClassNameProps &\n QAProps & {\n paddings?: Paddings;\n children?: React.ReactNode;\n };\n\nexport const Wrapper: React.FunctionComponent<WrapperProps> = ({\n children,\n paddings = DEFAULT_PADDINGS,\n className,\n qa,\n}) => (\n <section\n className={b(\n {\n ['padding-top']: paddings?.top || 'xs',\n ['padding-bottom']: paddings?.bottom || 'l',\n ['padding-left']: paddings?.left || '',\n ['padding-right']: paddings?.right || '',\n },\n className,\n )}\n data-qa={qa}\n >\n {children}\n </section>\n);\n"]}
1
+ {"version":3,"file":"Wrapper.js","sourceRoot":"../../../../src","sources":["components/Wrapper/Wrapper.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,gBAAgB,EAAC,2BAAwB;AAGjD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAS3B,MAAM,CAAC,MAAM,OAAO,GAA0C,CAAC,EAC3D,QAAQ,EACR,QAAQ,GAAG,gBAAgB,EAC3B,SAAS,EACT,EAAE,EACF,KAAK,GACR,EAAE,EAAE,CAAC,CACF,kBACI,SAAS,EAAE,CAAC,CACR;QACI,CAAC,aAAa,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,KAAI,IAAI;QACtC,CAAC,gBAAgB,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,KAAI,GAAG;QAC3C,CAAC,cAAc,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,KAAI,EAAE;QACtC,CAAC,eAAe,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,KAAI,EAAE;KAC3C,EACD,SAAS,CACZ,aACQ,EAAE,EACX,KAAK,EAAE,KAAK,YAEX,QAAQ,GACH,CACb,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {DEFAULT_PADDINGS} from '../../constants';\nimport {ClassNameProps, QAProps} from '../../models/common';\nimport {Paddings} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Wrapper.scss';\n\nconst b = block('wrapper');\n\ntype WrapperProps = ClassNameProps &\n QAProps & {\n paddings?: Paddings;\n children?: React.ReactNode;\n style?: React.CSSProperties;\n };\n\nexport const Wrapper: React.FunctionComponent<WrapperProps> = ({\n children,\n paddings = DEFAULT_PADDINGS,\n className,\n qa,\n style,\n}) => (\n <section\n className={b(\n {\n ['padding-top']: paddings?.top || 'xs',\n ['padding-bottom']: paddings?.bottom || 'l',\n ['padding-left']: paddings?.left || '',\n ['padding-right']: paddings?.right || '',\n },\n className,\n )}\n data-qa={qa}\n style={style}\n >\n {children}\n </section>\n);\n"]}
@@ -9,9 +9,11 @@ declare const _default: {
9
9
  "blog-author-block": (props: import("../models/blocks.js").AuthorProps) => import("react/jsx-runtime").JSX.Element | null;
10
10
  "blog-suggest-block": ({ paddingTop, paddingBottom }: import("../models/blocks.js").SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
11
11
  "blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
12
- "blog-feed-block": ({ image }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
12
+ "blog-feed-block": ({ image, title }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
13
13
  "blog-form-block": ({ paddingTop, paddingBottom, ...props }: import("../models/blocks.js").FormProps) => import("react/jsx-runtime").JSX.Element | null;
14
14
  "blog-compact-media-block": ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: import("../models/blocks.js").CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
15
+ "blog-take-block": (props: import("../models/blocks.js").TakeProps) => import("react/jsx-runtime").JSX.Element;
16
+ "blog-side-card-list-block": ({ title, items, paddingTop, paddingBottom }: import("../models/blocks.js").SideCardListProps) => import("react/jsx-runtime").JSX.Element;
15
17
  };
16
18
  headers: {
17
19
  "blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -9,7 +9,9 @@ import { Header } from "../blocks/Header/Header.js";
9
9
  import { Layout } from "../blocks/Layout/Layout.js";
10
10
  import { Media } from "../blocks/Media/Media.js";
11
11
  import { Meta } from "../blocks/Meta/Meta.js";
12
+ import { SideCardList } from "../blocks/SideCardList/SideCardList.js";
12
13
  import { Suggest } from "../blocks/Suggest/Suggest.js";
14
+ import { Take } from "../blocks/Take/Take.js";
13
15
  import { YFM } from "../blocks/YFM/YFM.js";
14
16
  import { BlockType } from "../models/common.js";
15
17
  const blocks = {
@@ -25,6 +27,8 @@ const blocks = {
25
27
  [BlockType.Feed]: Feed,
26
28
  [BlockType.Form]: Form,
27
29
  [BlockType.CompactMedia]: CompactMedia,
30
+ [BlockType.Take]: Take,
31
+ [BlockType.SideCardList]: SideCardList,
28
32
  };
29
33
  const headers = {
30
34
  [BlockType.Header]: Header,
@@ -1 +1 @@
1
- {"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,WAAW,EAAC,6CAA0C;AAC9D,OAAO,EAAC,YAAY,EAAC,+CAA4C;AACjE,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,KAAK,EAAC,iCAA8B;AAC5C,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,OAAO,EAAC,qCAAkC;AAClD,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;IACxB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;IACpC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;IAC5B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;CAC7B,CAAC;AAEF,eAAe,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC","sourcesContent":["import {Author} from '../blocks/Author/Author';\nimport {Banner} from '../blocks/Banner/Banner';\nimport {CTA} from '../blocks/CTA/CTA';\nimport {ColoredText} from '../blocks/ColoredText/ColoredText';\nimport {CompactMedia} from '../blocks/CompactMedia/CompactMedia';\nimport {Feed} from '../blocks/Feed/Feed';\nimport {Form} from '../blocks/Form/Form';\nimport {Header} from '../blocks/Header/Header';\nimport {Layout} from '../blocks/Layout/Layout';\nimport {Media} from '../blocks/Media/Media';\nimport {Meta} from '../blocks/Meta/Meta';\nimport {Suggest} from '../blocks/Suggest/Suggest';\nimport {YFM} from '../blocks/YFM/YFM';\nimport {BlockType} from '../models/common';\n\nconst blocks = {\n [BlockType.YFM]: YFM,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Banner]: Banner,\n [BlockType.CTA]: CTA,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.Author]: Author,\n [BlockType.Suggest]: Suggest,\n [BlockType.Meta]: Meta,\n [BlockType.Feed]: Feed,\n [BlockType.Form]: Form,\n [BlockType.CompactMedia]: CompactMedia,\n};\n\nconst headers = {\n [BlockType.Header]: Header,\n};\n\nexport default {blocks, headers};\n"]}
1
+ {"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,WAAW,EAAC,6CAA0C;AAC9D,OAAO,EAAC,YAAY,EAAC,+CAA4C;AACjE,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,KAAK,EAAC,iCAA8B;AAC5C,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,YAAY,EAAC,+CAA4C;AACjE,OAAO,EAAC,OAAO,EAAC,qCAAkC;AAClD,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;IACxB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;IACpC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;IAC5B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;IACtC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;CAC7B,CAAC;AAEF,eAAe,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC","sourcesContent":["import {Author} from '../blocks/Author/Author';\nimport {Banner} from '../blocks/Banner/Banner';\nimport {CTA} from '../blocks/CTA/CTA';\nimport {ColoredText} from '../blocks/ColoredText/ColoredText';\nimport {CompactMedia} from '../blocks/CompactMedia/CompactMedia';\nimport {Feed} from '../blocks/Feed/Feed';\nimport {Form} from '../blocks/Form/Form';\nimport {Header} from '../blocks/Header/Header';\nimport {Layout} from '../blocks/Layout/Layout';\nimport {Media} from '../blocks/Media/Media';\nimport {Meta} from '../blocks/Meta/Meta';\nimport {SideCardList} from '../blocks/SideCardList/SideCardList';\nimport {Suggest} from '../blocks/Suggest/Suggest';\nimport {Take} from '../blocks/Take/Take';\nimport {YFM} from '../blocks/YFM/YFM';\nimport {BlockType} from '../models/common';\n\nconst blocks = {\n [BlockType.YFM]: YFM,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Banner]: Banner,\n [BlockType.CTA]: CTA,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.Author]: Author,\n [BlockType.Suggest]: Suggest,\n [BlockType.Meta]: Meta,\n [BlockType.Feed]: Feed,\n [BlockType.Form]: Form,\n [BlockType.CompactMedia]: CompactMedia,\n [BlockType.Take]: Take,\n [BlockType.SideCardList]: SideCardList,\n};\n\nconst headers = {\n [BlockType.Header]: Header,\n};\n\nexport default {blocks, headers};\n"]}
@@ -11,9 +11,11 @@ export declare const useExtendedComponentMap: (custom: CustomConfig | undefined)
11
11
  "blog-author-block": (props: import("../models/blocks.js").AuthorProps) => import("react/jsx-runtime").JSX.Element | null;
12
12
  "blog-suggest-block": ({ paddingTop, paddingBottom }: import("../models/blocks.js").SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
13
13
  "blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
14
- "blog-feed-block": ({ image }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
14
+ "blog-feed-block": ({ image, title }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
15
15
  "blog-form-block": ({ paddingTop, paddingBottom, ...props }: import("../models/blocks.js").FormProps) => import("react/jsx-runtime").JSX.Element | null;
16
16
  "blog-compact-media-block": ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: import("../models/blocks.js").CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
17
+ "blog-take-block": (props: import("../models/blocks.js").TakeProps) => import("react/jsx-runtime").JSX.Element;
18
+ "blog-side-card-list-block": ({ title, items, paddingTop, paddingBottom }: import("../models/blocks.js").SideCardListProps) => import("react/jsx-runtime").JSX.Element;
17
19
  };
18
20
  headers: {
19
21
  "blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
2
+ import { AuthorItem, ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
3
3
  import { BlockType, ClassNameProps, PostData, QAProps } from "./common.js";
4
4
  import { PaddingsYFMProps } from "./paddings.js";
5
5
  export type AuthorProps = ClassNameProps & {
@@ -45,6 +45,7 @@ export type YFMProps = {
45
45
  } & PaddingsYFMProps & QAProps;
46
46
  export type FeedProps = {
47
47
  image: string;
48
+ title?: string;
48
49
  };
49
50
  export type FormProps = {
50
51
  formData: FormBlockData;
@@ -53,6 +54,19 @@ export type FormProps = {
53
54
  export type CompactMediaProps = {
54
55
  description?: string;
55
56
  } & PaddingsYFMProps & Partial<Pick<PCMediaProps, 'image'>>;
57
+ export type TakeProps = YFMProps & {
58
+ author: AuthorItem;
59
+ color?: string;
60
+ noBackground?: boolean;
61
+ };
62
+ export type SideCard = Pick<PCMediaProps, 'image'> & {
63
+ description: string;
64
+ url: string;
65
+ };
66
+ export type SideCardListProps = {
67
+ title?: string;
68
+ items: SideCard[];
69
+ } & PaddingsYFMProps;
56
70
  export type AuthorBlockModel = {
57
71
  type: BlockType.Author;
58
72
  } & AuthorProps;
@@ -92,7 +106,13 @@ export type FormBlockModel = {
92
106
  export type CompactMediaBlockModel = {
93
107
  type: BlockType.CompactMedia;
94
108
  } & CompactMediaProps;
95
- export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel;
109
+ export type TakeBlockModel = {
110
+ type: BlockType.Take;
111
+ } & TakeProps;
112
+ export type SideCardListBlockModel = {
113
+ type: BlockType.SideCardList;
114
+ } & SideCardListProps;
115
+ export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel | TakeBlockModel | SideCardListBlockModel;
96
116
  export type Block = BlockModel & {
97
117
  [x: string]: any;
98
118
  };
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["models/blocks.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nimport {\n ContentBlockProps,\n FormBlockData,\n HeaderBlockProps,\n MediaProps as PCMediaProps,\n TextTheme,\n} from '@gravity-ui/page-constructor';\n\nimport {BlockType, ClassNameProps, PostData, QAProps} from './common';\nimport {PaddingsYFMProps} from './paddings';\n\n// blocks props\nexport type AuthorProps = ClassNameProps & {\n authorId: number | string;\n image: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type BannerProps = ContentBlockProps &\n QAProps & {\n color?: string;\n image?: string;\n imageSize?: 's' | 'm';\n } & PaddingsYFMProps;\n\nexport type ColoredTextProps = ContentBlockProps &\n QAProps & {\n background?: {\n color?: string;\n image?: string;\n altText?: string;\n };\n } & PaddingsYFMProps;\n\nexport type CTAProps = QAProps & {\n items: Array<ContentBlockProps>;\n} & PaddingsYFMProps;\n\ntype HeaderBlogProps = {\n imageInGrid?: boolean;\n};\n\nexport type HeaderProps = HeaderBlockProps & PaddingsYFMProps & HeaderBlogProps;\n\nexport type LayoutProps = {\n fullWidth?: boolean;\n mobileOrder?: string;\n children: React.ReactElement[];\n} & PaddingsYFMProps;\n\nexport type MediaProps = ClassNameProps &\n PaddingsYFMProps &\n Partial<\n Pick<\n PCMediaProps,\n | 'youtube'\n | 'previewImg'\n | 'image'\n | 'video'\n | 'dataLens'\n | 'videoIframe'\n | 'videoMicrodata'\n >\n > & {\n text?: string;\n };\n\nexport type MetaProps = QAProps & {\n locale: string;\n theme?: TextTheme;\n} & PaddingsYFMProps;\n\nexport type SuggestProps = ClassNameProps & {\n posts: PostData[];\n} & PaddingsYFMProps;\n\nexport type YFMProps = {\n text: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type FeedProps = {\n image: string;\n};\n\nexport type FormProps = {\n formData: FormBlockData;\n border?: 'shadow' | 'line' | 'none';\n} & PaddingsYFMProps &\n QAProps;\n\nexport type CompactMediaProps = {\n description?: string;\n} & PaddingsYFMProps &\n Partial<Pick<PCMediaProps, 'image'>>;\n\n// blocks models\nexport type AuthorBlockModel = {\n type: BlockType.Author;\n} & AuthorProps;\n\nexport type BannerBlockModel = {\n type: BlockType.Banner;\n} & BannerProps;\n\nexport type ColoredTextBlockModel = {\n type: BlockType.ColoredText;\n} & ColoredTextProps;\n\nexport type CTABlockModel = {\n type: BlockType.CTA;\n} & CTAProps;\n\nexport type HeaderBlockModel = {\n type: BlockType.Header;\n} & HeaderProps;\n\nexport type LayoutBlockModel = {\n type: BlockType.Layout;\n} & LayoutProps;\n\nexport type MediaBlockModel = {\n type: BlockType.Media;\n} & MediaProps;\n\nexport type MetaBlockModel = {\n type: BlockType.Meta;\n} & MetaProps;\n\nexport type SuggestBlockModel = {\n type: BlockType.Suggest;\n} & SuggestProps;\n\nexport type YFMBlockModel = {\n type: BlockType.YFM;\n} & YFMProps;\n\nexport type FeedBlockModel = {\n type: BlockType.Feed;\n} & FeedProps;\n\nexport type FormBlockModel = {\n type: BlockType.Form;\n} & FormProps;\n\nexport type CompactMediaBlockModel = {\n type: BlockType.CompactMedia;\n} & CompactMediaProps;\n\nexport type BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel\n | CompactMediaBlockModel;\n\nexport type Block = BlockModel & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any;\n};\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["models/blocks.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nimport {\n AuthorItem,\n ContentBlockProps,\n FormBlockData,\n HeaderBlockProps,\n MediaProps as PCMediaProps,\n TextTheme,\n} from '@gravity-ui/page-constructor';\n\nimport {BlockType, ClassNameProps, PostData, QAProps} from './common';\nimport {PaddingsYFMProps} from './paddings';\n\n// blocks props\nexport type AuthorProps = ClassNameProps & {\n authorId: number | string;\n image: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type BannerProps = ContentBlockProps &\n QAProps & {\n color?: string;\n image?: string;\n imageSize?: 's' | 'm';\n } & PaddingsYFMProps;\n\nexport type ColoredTextProps = ContentBlockProps &\n QAProps & {\n background?: {\n color?: string;\n image?: string;\n altText?: string;\n };\n } & PaddingsYFMProps;\n\nexport type CTAProps = QAProps & {\n items: Array<ContentBlockProps>;\n} & PaddingsYFMProps;\n\ntype HeaderBlogProps = {\n imageInGrid?: boolean;\n};\n\nexport type HeaderProps = HeaderBlockProps & PaddingsYFMProps & HeaderBlogProps;\n\nexport type LayoutProps = {\n fullWidth?: boolean;\n mobileOrder?: string;\n children: React.ReactElement[];\n} & PaddingsYFMProps;\n\nexport type MediaProps = ClassNameProps &\n PaddingsYFMProps &\n Partial<\n Pick<\n PCMediaProps,\n | 'youtube'\n | 'previewImg'\n | 'image'\n | 'video'\n | 'dataLens'\n | 'videoIframe'\n | 'videoMicrodata'\n >\n > & {\n text?: string;\n };\n\nexport type MetaProps = QAProps & {\n locale: string;\n theme?: TextTheme;\n} & PaddingsYFMProps;\n\nexport type SuggestProps = ClassNameProps & {\n posts: PostData[];\n} & PaddingsYFMProps;\n\nexport type YFMProps = {\n text: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type FeedProps = {\n image: string;\n title?: string;\n};\n\nexport type FormProps = {\n formData: FormBlockData;\n border?: 'shadow' | 'line' | 'none';\n} & PaddingsYFMProps &\n QAProps;\n\nexport type CompactMediaProps = {\n description?: string;\n} & PaddingsYFMProps &\n Partial<Pick<PCMediaProps, 'image'>>;\n\nexport type TakeProps = YFMProps & {\n author: AuthorItem;\n color?: string;\n noBackground?: boolean;\n};\n\nexport type SideCard = Pick<PCMediaProps, 'image'> & {\n description: string;\n url: string;\n};\n\nexport type SideCardListProps = {\n title?: string;\n items: SideCard[];\n} & PaddingsYFMProps;\n\n// blocks models\nexport type AuthorBlockModel = {\n type: BlockType.Author;\n} & AuthorProps;\n\nexport type BannerBlockModel = {\n type: BlockType.Banner;\n} & BannerProps;\n\nexport type ColoredTextBlockModel = {\n type: BlockType.ColoredText;\n} & ColoredTextProps;\n\nexport type CTABlockModel = {\n type: BlockType.CTA;\n} & CTAProps;\n\nexport type HeaderBlockModel = {\n type: BlockType.Header;\n} & HeaderProps;\n\nexport type LayoutBlockModel = {\n type: BlockType.Layout;\n} & LayoutProps;\n\nexport type MediaBlockModel = {\n type: BlockType.Media;\n} & MediaProps;\n\nexport type MetaBlockModel = {\n type: BlockType.Meta;\n} & MetaProps;\n\nexport type SuggestBlockModel = {\n type: BlockType.Suggest;\n} & SuggestProps;\n\nexport type YFMBlockModel = {\n type: BlockType.YFM;\n} & YFMProps;\n\nexport type FeedBlockModel = {\n type: BlockType.Feed;\n} & FeedProps;\n\nexport type FormBlockModel = {\n type: BlockType.Form;\n} & FormProps;\n\nexport type CompactMediaBlockModel = {\n type: BlockType.CompactMedia;\n} & CompactMediaProps;\n\nexport type TakeBlockModel = {\n type: BlockType.Take;\n} & TakeProps;\n\nexport type SideCardListBlockModel = {\n type: BlockType.SideCardList;\n} & SideCardListProps;\n\nexport type BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel\n | CompactMediaBlockModel\n | TakeBlockModel\n | SideCardListBlockModel;\n\nexport type Block = BlockModel & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any;\n};\n"]}
@@ -98,7 +98,9 @@ export declare enum BlockType {
98
98
  Meta = "blog-meta-block",
99
99
  Feed = "blog-feed-block",
100
100
  Form = "blog-form-block",
101
- CompactMedia = "blog-compact-media-block"
101
+ CompactMedia = "blog-compact-media-block",
102
+ Take = "blog-take-block",
103
+ SideCardList = "blog-side-card-list-block"
102
104
  }
103
105
  export type MetaProps = {
104
106
  metaComponent: JSX.Element;
@@ -18,6 +18,8 @@ export var BlockType;
18
18
  BlockType["Feed"] = "blog-feed-block";
19
19
  BlockType["Form"] = "blog-form-block";
20
20
  BlockType["CompactMedia"] = "blog-compact-media-block";
21
+ BlockType["Take"] = "blog-take-block";
22
+ BlockType["SideCardList"] = "blog-side-card-list-block";
21
23
  })(BlockType || (BlockType = {}));
22
24
  export var DefaultEventNames;
23
25
  (function (DefaultEventNames) {
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB;AA2FD,MAAM,CAAN,IAAY,SAcX;AAdD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,oDAAuC,CAAA;IACvC,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAC9B,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;AAC7C,CAAC,EAdW,SAAS,KAAT,SAAS,QAcpB;AA+DD,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,uDAAkC,CAAA;IAClC,qDAAgC,CAAA;IAChC,wDAAmC,CAAA;IACnC,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,wDAAmC,CAAA;AACvC,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAWD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,4BAAY,CAAA;AAChB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,sCAAS,CAAA;IACT,sCAAS,CAAA;AACb,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {MarkdownItPluginCb} from '@diplodoc/transform/lib/plugins/typings';\nimport {HeaderBlockProps as PageConstructorHeaderBlockProps} from '@gravity-ui/page-constructor';\nimport {IBrowser, IDevice} from 'ua-parser-js';\n\nimport {Locale} from '../models/locale';\n\nexport enum Theme {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport interface ClassNameProps {\n className?: string;\n}\n\nexport type Author = {\n id: number | string;\n avatar: string | null;\n createdAt: string;\n updatedAt: string;\n firstName: string | null;\n secondName: string | null;\n description: string | null;\n fullDescription: string | null;\n shortDescription: string | null;\n} & {\n [x: string]: string | null;\n};\n\nexport type Service = {\n id: number | string;\n slug: string;\n name: string;\n} & {\n [x: string]: string | null;\n};\n\nexport type Query = Record<string, number | string | null>;\n\n//page models\n\nexport interface Menu {\n title: string;\n}\n\nexport interface WithDeviceProps {\n device: IDevice;\n browser: IBrowser;\n isRobot: boolean;\n}\n\nexport interface PostsProps {\n posts: PostData[];\n count: number;\n totalCount: number;\n pinnedPost?: PostData;\n}\n\nexport type Tag = {\n slug: string;\n name: string;\n createdAt?: string;\n updatedAt?: string;\n icon?: string;\n isDeleted?: boolean;\n locale?: string;\n blogTagId?: number | string;\n count?: number;\n};\n\nexport interface PostData {\n author?: string;\n authors?: Author[];\n blogPostId?: number | string;\n content?: string;\n date: string;\n description?: string;\n hasUserLike: boolean;\n htmlTitle: string;\n id: number;\n image: string;\n isPublished?: boolean;\n sharedImage?: string;\n likes: number;\n locale: Locale;\n metaDescription?: string | null;\n metaTitle?: string | null;\n readingTime?: number;\n shareDescription?: string;\n shareImage?: string;\n shareTitle?: string;\n slug: string;\n keywords?: string[];\n tags: Tag[];\n textTitle: string;\n title: string;\n url: string;\n noIndex?: boolean;\n}\n\nexport enum BlockType {\n Header = 'blog-header-block',\n YFM = 'blog-yfm-block',\n Layout = 'blog-layout-block',\n Media = 'blog-media-block',\n Banner = 'blog-banner-block',\n CTA = 'blog-cta-block',\n ColoredText = 'blog-colored-text-block',\n Author = 'blog-author-block',\n Suggest = 'blog-suggest-block',\n Meta = 'blog-meta-block',\n Feed = 'blog-feed-block',\n Form = 'blog-form-block',\n CompactMedia = 'blog-compact-media-block',\n}\n\nexport type MetaProps = {\n metaComponent: JSX.Element;\n needHelmetWrapper: boolean;\n};\n\nexport type MetaOrganizationType = {\n url: string;\n appTitle: string;\n legalName: string;\n supportEmail: string;\n};\n\nexport interface PostMetaProps {\n title: string;\n date: string;\n image: string;\n canonicalUrl: string;\n content?: string;\n description?: string;\n sharing: {\n shareTitle: string;\n shareDescription: string;\n shareImage: string;\n shareGenImage: string;\n shareGenTitle: string;\n };\n keywords?: string[];\n noIndex?: boolean;\n authors?: Author[];\n tags?: Tag[];\n organization: MetaOrganizationType;\n}\n\nexport type ToggleLikeCallbackType = ({\n postId,\n hasLike,\n}: {\n postId?: number | string;\n hasLike?: boolean;\n}) => void;\n\nexport interface HeaderBlockProps extends PageConstructorHeaderBlockProps {\n backLink?: {\n url: string;\n title: React.ReactNode;\n };\n}\n\nexport type GetPostsRequest = {\n tags: string | undefined;\n page: number;\n perPage: number;\n savedOnly: boolean;\n search: string | undefined;\n services: string | undefined;\n};\n\nexport type GetPostsType = (query: GetPostsRequest) => Promise<PostsProps>;\n\nexport type HandleChangeQueryParams = (params: Query) => void;\n\nexport enum DefaultEventNames {\n ShareButton = 'share-button-click',\n SaveButton = 'save-button-click',\n ShowMore = 'show-more-button-click',\n PaginatorHome = 'paginator-home-button-click',\n PaginatorNext = 'paginator-next-button-click',\n PaginatorPage = 'paginator-page-button-click',\n Tag = 'selector-tag-click',\n Service = 'selector-service-click',\n SaveOnly = 'save-only-button-click',\n}\n\nexport type FetchArgs = {\n page?: number;\n query: Query;\n};\n\nexport interface QAProps {\n qa?: string;\n}\n\nexport enum PostCardSize {\n SMALL = 's',\n MEDIUM = 'm',\n}\n\nexport enum PostCardTitleHeadingLevel {\n H2 = 'h2',\n H3 = 'h3',\n}\n\nexport interface TransformPostOptions {\n plugins?: MarkdownItPluginCb[];\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB;AA2FD,MAAM,CAAN,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,oDAAuC,CAAA;IACvC,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAC9B,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,qCAAwB,CAAA;IACxB,uDAA0C,CAAA;AAC9C,CAAC,EAhBW,SAAS,KAAT,SAAS,QAgBpB;AA+DD,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,uDAAkC,CAAA;IAClC,qDAAgC,CAAA;IAChC,wDAAmC,CAAA;IACnC,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,wDAAmC,CAAA;AACvC,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAWD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,4BAAY,CAAA;AAChB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,sCAAS,CAAA;IACT,sCAAS,CAAA;AACb,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {MarkdownItPluginCb} from '@diplodoc/transform/lib/plugins/typings';\nimport {HeaderBlockProps as PageConstructorHeaderBlockProps} from '@gravity-ui/page-constructor';\nimport {IBrowser, IDevice} from 'ua-parser-js';\n\nimport {Locale} from '../models/locale';\n\nexport enum Theme {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport interface ClassNameProps {\n className?: string;\n}\n\nexport type Author = {\n id: number | string;\n avatar: string | null;\n createdAt: string;\n updatedAt: string;\n firstName: string | null;\n secondName: string | null;\n description: string | null;\n fullDescription: string | null;\n shortDescription: string | null;\n} & {\n [x: string]: string | null;\n};\n\nexport type Service = {\n id: number | string;\n slug: string;\n name: string;\n} & {\n [x: string]: string | null;\n};\n\nexport type Query = Record<string, number | string | null>;\n\n//page models\n\nexport interface Menu {\n title: string;\n}\n\nexport interface WithDeviceProps {\n device: IDevice;\n browser: IBrowser;\n isRobot: boolean;\n}\n\nexport interface PostsProps {\n posts: PostData[];\n count: number;\n totalCount: number;\n pinnedPost?: PostData;\n}\n\nexport type Tag = {\n slug: string;\n name: string;\n createdAt?: string;\n updatedAt?: string;\n icon?: string;\n isDeleted?: boolean;\n locale?: string;\n blogTagId?: number | string;\n count?: number;\n};\n\nexport interface PostData {\n author?: string;\n authors?: Author[];\n blogPostId?: number | string;\n content?: string;\n date: string;\n description?: string;\n hasUserLike: boolean;\n htmlTitle: string;\n id: number;\n image: string;\n isPublished?: boolean;\n sharedImage?: string;\n likes: number;\n locale: Locale;\n metaDescription?: string | null;\n metaTitle?: string | null;\n readingTime?: number;\n shareDescription?: string;\n shareImage?: string;\n shareTitle?: string;\n slug: string;\n keywords?: string[];\n tags: Tag[];\n textTitle: string;\n title: string;\n url: string;\n noIndex?: boolean;\n}\n\nexport enum BlockType {\n Header = 'blog-header-block',\n YFM = 'blog-yfm-block',\n Layout = 'blog-layout-block',\n Media = 'blog-media-block',\n Banner = 'blog-banner-block',\n CTA = 'blog-cta-block',\n ColoredText = 'blog-colored-text-block',\n Author = 'blog-author-block',\n Suggest = 'blog-suggest-block',\n Meta = 'blog-meta-block',\n Feed = 'blog-feed-block',\n Form = 'blog-form-block',\n CompactMedia = 'blog-compact-media-block',\n Take = 'blog-take-block',\n SideCardList = 'blog-side-card-list-block',\n}\n\nexport type MetaProps = {\n metaComponent: JSX.Element;\n needHelmetWrapper: boolean;\n};\n\nexport type MetaOrganizationType = {\n url: string;\n appTitle: string;\n legalName: string;\n supportEmail: string;\n};\n\nexport interface PostMetaProps {\n title: string;\n date: string;\n image: string;\n canonicalUrl: string;\n content?: string;\n description?: string;\n sharing: {\n shareTitle: string;\n shareDescription: string;\n shareImage: string;\n shareGenImage: string;\n shareGenTitle: string;\n };\n keywords?: string[];\n noIndex?: boolean;\n authors?: Author[];\n tags?: Tag[];\n organization: MetaOrganizationType;\n}\n\nexport type ToggleLikeCallbackType = ({\n postId,\n hasLike,\n}: {\n postId?: number | string;\n hasLike?: boolean;\n}) => void;\n\nexport interface HeaderBlockProps extends PageConstructorHeaderBlockProps {\n backLink?: {\n url: string;\n title: React.ReactNode;\n };\n}\n\nexport type GetPostsRequest = {\n tags: string | undefined;\n page: number;\n perPage: number;\n savedOnly: boolean;\n search: string | undefined;\n services: string | undefined;\n};\n\nexport type GetPostsType = (query: GetPostsRequest) => Promise<PostsProps>;\n\nexport type HandleChangeQueryParams = (params: Query) => void;\n\nexport enum DefaultEventNames {\n ShareButton = 'share-button-click',\n SaveButton = 'save-button-click',\n ShowMore = 'show-more-button-click',\n PaginatorHome = 'paginator-home-button-click',\n PaginatorNext = 'paginator-next-button-click',\n PaginatorPage = 'paginator-page-button-click',\n Tag = 'selector-tag-click',\n Service = 'selector-service-click',\n SaveOnly = 'save-only-button-click',\n}\n\nexport type FetchArgs = {\n page?: number;\n query: Query;\n};\n\nexport interface QAProps {\n qa?: string;\n}\n\nexport enum PostCardSize {\n SMALL = 's',\n MEDIUM = 'm',\n}\n\nexport enum PostCardTitleHeadingLevel {\n H2 = 'h2',\n H3 = 'h3',\n}\n\nexport interface TransformPostOptions {\n plugins?: MarkdownItPluginCb[];\n}\n"]}