@gravity-ui/blog-constructor 8.2.0 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/CompactMedia/CompactMedia.css +27 -0
- package/build/cjs/blocks/CompactMedia/CompactMedia.d.ts +2 -0
- package/build/cjs/blocks/CompactMedia/CompactMedia.js +22 -0
- package/build/cjs/blocks/CompactMedia/CompactMedia.js.map +1 -0
- package/build/cjs/blocks/CompactMedia/schema.d.ts +135 -0
- package/build/cjs/blocks/CompactMedia/schema.js +18 -0
- package/build/cjs/blocks/CompactMedia/schema.js.map +1 -0
- package/build/cjs/blocks/SideCardList/SideCardList.css +47 -0
- package/build/cjs/blocks/SideCardList/SideCardList.d.ts +3 -0
- package/build/cjs/blocks/SideCardList/SideCardList.js +21 -0
- package/build/cjs/blocks/SideCardList/SideCardList.js.map +1 -0
- package/build/cjs/blocks/SideCardList/schema.d.ts +94 -0
- package/build/cjs/blocks/SideCardList/schema.js +37 -0
- package/build/cjs/blocks/SideCardList/schema.js.map +1 -0
- package/build/cjs/blocks/Take/Take.css +70 -0
- package/build/cjs/blocks/Take/Take.d.ts +2 -0
- package/build/cjs/blocks/Take/Take.js +28 -0
- package/build/cjs/blocks/Take/Take.js.map +1 -0
- package/build/cjs/blocks/Take/schema.d.ts +96 -0
- package/build/cjs/blocks/Take/schema.js +26 -0
- package/build/cjs/blocks/Take/schema.js.map +1 -0
- package/build/cjs/components/Wrapper/Wrapper.css +42 -0
- package/build/cjs/components/Wrapper/Wrapper.d.ts +1 -0
- package/build/cjs/components/Wrapper/Wrapper.js +2 -2
- package/build/cjs/components/Wrapper/Wrapper.js.map +1 -1
- package/build/cjs/constructor/blocksMap.d.ts +3 -0
- package/build/cjs/constructor/blocksMap.js +6 -0
- package/build/cjs/constructor/blocksMap.js.map +1 -1
- package/build/cjs/hooks/useExtendedComponentMap.d.ts +3 -0
- package/build/cjs/models/blocks.d.ts +27 -2
- package/build/cjs/models/blocks.js.map +1 -1
- package/build/cjs/models/common.d.ts +4 -1
- package/build/cjs/models/common.js +3 -0
- package/build/cjs/models/common.js.map +1 -1
- package/build/cjs/models/paddings.d.ts +1 -1
- package/build/cjs/models/paddings.js.map +1 -1
- package/build/cjs/schema/blocks.d.ts +2 -0
- package/build/cjs/schema/blocks.js +2 -0
- package/build/cjs/schema/blocks.js.map +1 -1
- package/build/cjs/schema/index.d.ts +231 -0
- package/build/cjs/schema/index.js +3 -1
- package/build/cjs/schema/index.js.map +1 -1
- package/build/esm/blocks/CompactMedia/CompactMedia.css +27 -0
- package/build/esm/blocks/CompactMedia/CompactMedia.d.ts +3 -0
- package/build/esm/blocks/CompactMedia/CompactMedia.js +19 -0
- package/build/esm/blocks/CompactMedia/CompactMedia.js.map +1 -0
- package/build/esm/blocks/CompactMedia/schema.d.ts +135 -0
- package/build/esm/blocks/CompactMedia/schema.js +15 -0
- package/build/esm/blocks/CompactMedia/schema.js.map +1 -0
- package/build/esm/blocks/SideCardList/SideCardList.css +47 -0
- package/build/esm/blocks/SideCardList/SideCardList.d.ts +4 -0
- package/build/esm/blocks/SideCardList/SideCardList.js +18 -0
- package/build/esm/blocks/SideCardList/SideCardList.js.map +1 -0
- package/build/esm/blocks/SideCardList/schema.d.ts +94 -0
- package/build/esm/blocks/SideCardList/schema.js +34 -0
- package/build/esm/blocks/SideCardList/schema.js.map +1 -0
- package/build/esm/blocks/Take/Take.css +70 -0
- package/build/esm/blocks/Take/Take.d.ts +3 -0
- package/build/esm/blocks/Take/Take.js +24 -0
- package/build/esm/blocks/Take/Take.js.map +1 -0
- package/build/esm/blocks/Take/schema.d.ts +96 -0
- package/build/esm/blocks/Take/schema.js +23 -0
- package/build/esm/blocks/Take/schema.js.map +1 -0
- package/build/esm/components/Wrapper/Wrapper.css +42 -0
- package/build/esm/components/Wrapper/Wrapper.d.ts +1 -0
- package/build/esm/components/Wrapper/Wrapper.js +2 -2
- package/build/esm/components/Wrapper/Wrapper.js.map +1 -1
- package/build/esm/constructor/blocksMap.d.ts +3 -0
- package/build/esm/constructor/blocksMap.js +6 -0
- package/build/esm/constructor/blocksMap.js.map +1 -1
- package/build/esm/hooks/useExtendedComponentMap.d.ts +3 -0
- package/build/esm/models/blocks.d.ts +27 -2
- package/build/esm/models/blocks.js.map +1 -1
- package/build/esm/models/common.d.ts +4 -1
- package/build/esm/models/common.js +3 -0
- package/build/esm/models/common.js.map +1 -1
- package/build/esm/models/paddings.d.ts +1 -1
- package/build/esm/models/paddings.js.map +1 -1
- package/build/esm/schema/blocks.d.ts +2 -0
- package/build/esm/schema/blocks.js +2 -0
- package/build/esm/schema/blocks.js.map +1 -1
- package/build/esm/schema/index.d.ts +231 -0
- package/build/esm/schema/index.js +3 -1
- package/build/esm/schema/index.js.map +1 -1
- package/package.json +1 -1
- package/server/models/blocks.d.ts +27 -2
- package/server/models/common.d.ts +4 -1
- package/server/models/common.js +3 -0
- package/server/models/paddings.d.ts +1 -1
- package/styles/mixins.scss +60 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Take = void 0;
|
4
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
|
+
const common_1 = require("../../models/common.js");
|
6
|
+
const common_2 = require("../../schema/common.js");
|
7
|
+
const { common: { BlockBaseProps }, } = page_constructor_1.validators;
|
8
|
+
exports.Take = {
|
9
|
+
[common_1.BlockType.Take]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
required: ['text', 'author'],
|
13
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { text: { type: 'string', contentType: 'text' }, author: {
|
14
|
+
type: 'object',
|
15
|
+
additionalProperties: false,
|
16
|
+
required: ['firstName', 'secondName'],
|
17
|
+
properties: {
|
18
|
+
firstName: { type: 'string', contentType: 'text' },
|
19
|
+
secondName: { type: 'string', contentType: 'text' },
|
20
|
+
description: { type: 'string', contentType: 'yfm' },
|
21
|
+
avatar: { type: 'string' },
|
22
|
+
},
|
23
|
+
} }),
|
24
|
+
},
|
25
|
+
};
|
26
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Take/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEF,QAAA,IAAI,GAAG;IAChB,CAAC,kBAAS,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,sBAAa,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"]}
|
@@ -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
|
}
|
@@ -4,6 +4,7 @@ import { Paddings } from "../../models/paddings.js";
|
|
4
4
|
type WrapperProps = ClassNameProps & QAProps & {
|
5
5
|
paddings?: Paddings;
|
6
6
|
children?: React.ReactNode;
|
7
|
+
style?: React.CSSProperties;
|
7
8
|
};
|
8
9
|
export declare const Wrapper: React.FunctionComponent<WrapperProps>;
|
9
10
|
export {};
|
@@ -5,11 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const constants_1 = require("../../constants.js");
|
6
6
|
const cn_1 = require("../../utils/cn.js");
|
7
7
|
const b = (0, cn_1.block)('wrapper');
|
8
|
-
const Wrapper = ({ children, paddings = constants_1.DEFAULT_PADDINGS, className, qa, }) => ((0, jsx_runtime_1.jsx)("section", { className: b({
|
8
|
+
const Wrapper = ({ children, paddings = constants_1.DEFAULT_PADDINGS, className, qa, style, }) => ((0, jsx_runtime_1.jsx)("section", { className: b({
|
9
9
|
['padding-top']: (paddings === null || paddings === void 0 ? void 0 : paddings.top) || 'xs',
|
10
10
|
['padding-bottom']: (paddings === null || paddings === void 0 ? void 0 : paddings.bottom) || 'l',
|
11
11
|
['padding-left']: (paddings === null || paddings === void 0 ? void 0 : paddings.left) || '',
|
12
12
|
['padding-right']: (paddings === null || paddings === void 0 ? void 0 : paddings.right) || '',
|
13
|
-
}, className), "data-qa": qa, children: children }));
|
13
|
+
}, className), "data-qa": qa, style: style, children: children }));
|
14
14
|
exports.Wrapper = Wrapper;
|
15
15
|
//# sourceMappingURL=Wrapper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Wrapper.js","sourceRoot":"../../../../src","sources":["components/Wrapper/Wrapper.tsx"],"names":[],"mappings":";;;;AAEA,kDAAiD;AAGjD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,SAAS,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"Wrapper.js","sourceRoot":"../../../../src","sources":["components/Wrapper/Wrapper.tsx"],"names":[],"mappings":";;;;AAEA,kDAAiD;AAGjD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,SAAS,CAAC,CAAC;AASpB,MAAM,OAAO,GAA0C,CAAC,EAC3D,QAAQ,EACR,QAAQ,GAAG,4BAAgB,EAC3B,SAAS,EACT,EAAE,EACF,KAAK,GACR,EAAE,EAAE,CAAC,CACF,oCACI,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;AAtBW,QAAA,OAAO,WAsBlB","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"]}
|
@@ -11,6 +11,9 @@ declare const _default: {
|
|
11
11
|
"blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
|
12
12
|
"blog-feed-block": ({ image }: 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
|
+
"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;
|
14
17
|
};
|
15
18
|
headers: {
|
16
19
|
"blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -4,13 +4,16 @@ const Author_1 = require("../blocks/Author/Author.js");
|
|
4
4
|
const Banner_1 = require("../blocks/Banner/Banner.js");
|
5
5
|
const CTA_1 = require("../blocks/CTA/CTA.js");
|
6
6
|
const ColoredText_1 = require("../blocks/ColoredText/ColoredText.js");
|
7
|
+
const CompactMedia_1 = require("../blocks/CompactMedia/CompactMedia.js");
|
7
8
|
const Feed_1 = require("../blocks/Feed/Feed.js");
|
8
9
|
const Form_1 = require("../blocks/Form/Form.js");
|
9
10
|
const Header_1 = require("../blocks/Header/Header.js");
|
10
11
|
const Layout_1 = require("../blocks/Layout/Layout.js");
|
11
12
|
const Media_1 = require("../blocks/Media/Media.js");
|
12
13
|
const Meta_1 = require("../blocks/Meta/Meta.js");
|
14
|
+
const SideCardList_1 = require("../blocks/SideCardList/SideCardList.js");
|
13
15
|
const Suggest_1 = require("../blocks/Suggest/Suggest.js");
|
16
|
+
const Take_1 = require("../blocks/Take/Take.js");
|
14
17
|
const YFM_1 = require("../blocks/YFM/YFM.js");
|
15
18
|
const common_1 = require("../models/common.js");
|
16
19
|
const blocks = {
|
@@ -25,6 +28,9 @@ const blocks = {
|
|
25
28
|
[common_1.BlockType.Meta]: Meta_1.Meta,
|
26
29
|
[common_1.BlockType.Feed]: Feed_1.Feed,
|
27
30
|
[common_1.BlockType.Form]: Form_1.Form,
|
31
|
+
[common_1.BlockType.CompactMedia]: CompactMedia_1.CompactMedia,
|
32
|
+
[common_1.BlockType.Take]: Take_1.Take,
|
33
|
+
[common_1.BlockType.SideCardList]: SideCardList_1.SideCardList,
|
28
34
|
};
|
29
35
|
const headers = {
|
30
36
|
[common_1.BlockType.Header]: Header_1.Header,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":";;AAAA,uDAA+C;AAC/C,uDAA+C;AAC/C,8CAAsC;AACtC,sEAA8D;AAC9D,iDAAyC;AACzC,iDAAyC;AACzC,uDAA+C;AAC/C,uDAA+C;AAC/C,oDAA4C;AAC5C,iDAAyC;AACzC,0DAAkD;AAClD,8CAAsC;AACtC,gDAA2C;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE,aAAK;IACxB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,WAAW,CAAC,EAAE,yBAAW;IACpC,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE,iBAAO;IAC5B,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;
|
1
|
+
{"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":";;AAAA,uDAA+C;AAC/C,uDAA+C;AAC/C,8CAAsC;AACtC,sEAA8D;AAC9D,yEAAiE;AACjE,iDAAyC;AACzC,iDAAyC;AACzC,uDAA+C;AAC/C,uDAA+C;AAC/C,oDAA4C;AAC5C,iDAAyC;AACzC,yEAAiE;AACjE,0DAAkD;AAClD,iDAAyC;AACzC,8CAAsC;AACtC,gDAA2C;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE,aAAK;IACxB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,WAAW,CAAC,EAAE,yBAAW;IACpC,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE,iBAAO;IAC5B,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,2BAAY;IACtC,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,2BAAY;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;CAC7B,CAAC;AAEF,kBAAe,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"]}
|
@@ -13,6 +13,9 @@ export declare const useExtendedComponentMap: (custom: CustomConfig | undefined)
|
|
13
13
|
"blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
|
14
14
|
"blog-feed-block": ({ image }: 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
|
+
"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;
|
16
19
|
};
|
17
20
|
headers: {
|
18
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 & {
|
@@ -50,6 +50,22 @@ export type FormProps = {
|
|
50
50
|
formData: FormBlockData;
|
51
51
|
border?: 'shadow' | 'line' | 'none';
|
52
52
|
} & PaddingsYFMProps & QAProps;
|
53
|
+
export type CompactMediaProps = {
|
54
|
+
description?: string;
|
55
|
+
} & PaddingsYFMProps & Partial<Pick<PCMediaProps, 'image'>>;
|
56
|
+
export type TakeProps = YFMProps & {
|
57
|
+
author: AuthorItem;
|
58
|
+
color?: string;
|
59
|
+
noBackground?: boolean;
|
60
|
+
};
|
61
|
+
export type SideCard = Pick<PCMediaProps, 'image'> & {
|
62
|
+
description: string;
|
63
|
+
url: string;
|
64
|
+
};
|
65
|
+
export type SideCardListProps = {
|
66
|
+
title?: string;
|
67
|
+
items: SideCard[];
|
68
|
+
} & PaddingsYFMProps;
|
53
69
|
export type AuthorBlockModel = {
|
54
70
|
type: BlockType.Author;
|
55
71
|
} & AuthorProps;
|
@@ -86,7 +102,16 @@ export type FeedBlockModel = {
|
|
86
102
|
export type FormBlockModel = {
|
87
103
|
type: BlockType.Form;
|
88
104
|
} & FormProps;
|
89
|
-
export type
|
105
|
+
export type CompactMediaBlockModel = {
|
106
|
+
type: BlockType.CompactMedia;
|
107
|
+
} & CompactMediaProps;
|
108
|
+
export type TakeBlockModel = {
|
109
|
+
type: BlockType.Take;
|
110
|
+
} & TakeProps;
|
111
|
+
export type SideCardListBlockModel = {
|
112
|
+
type: BlockType.SideCardList;
|
113
|
+
} & SideCardListProps;
|
114
|
+
export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel | TakeBlockModel | SideCardListBlockModel;
|
90
115
|
export type Block = BlockModel & {
|
91
116
|
[x: string]: any;
|
92
117
|
};
|
@@ -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\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 BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel;\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};\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"]}
|
@@ -97,7 +97,10 @@ export declare enum BlockType {
|
|
97
97
|
Suggest = "blog-suggest-block",
|
98
98
|
Meta = "blog-meta-block",
|
99
99
|
Feed = "blog-feed-block",
|
100
|
-
Form = "blog-form-block"
|
100
|
+
Form = "blog-form-block",
|
101
|
+
CompactMedia = "blog-compact-media-block",
|
102
|
+
Take = "blog-take-block",
|
103
|
+
SideCardList = "blog-side-card-list-block"
|
101
104
|
}
|
102
105
|
export type MetaProps = {
|
103
106
|
metaComponent: JSX.Element;
|
@@ -20,6 +20,9 @@ var BlockType;
|
|
20
20
|
BlockType["Meta"] = "blog-meta-block";
|
21
21
|
BlockType["Feed"] = "blog-feed-block";
|
22
22
|
BlockType["Form"] = "blog-form-block";
|
23
|
+
BlockType["CompactMedia"] = "blog-compact-media-block";
|
24
|
+
BlockType["Take"] = "blog-take-block";
|
25
|
+
BlockType["SideCardList"] = "blog-side-card-list-block";
|
23
26
|
})(BlockType || (exports.BlockType = BlockType = {}));
|
24
27
|
var DefaultEventNames;
|
25
28
|
(function (DefaultEventNames) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":";;;AASA,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB;AA2FD,IAAY,
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":";;;AASA,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB;AA2FD,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,yBAAT,SAAS,QAgBpB;AA+DD,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,iCAAjB,iBAAiB,QAU5B;AAWD,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,4BAAY,CAAA;AAChB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,sCAAS,CAAA;IACT,sCAAS,CAAA;AACb,CAAC,EAHW,yBAAyB,yCAAzB,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"]}
|
@@ -4,7 +4,7 @@ export declare enum PaddingsDirections {
|
|
4
4
|
left = "left",
|
5
5
|
right = "right"
|
6
6
|
}
|
7
|
-
export type PaddingSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
7
|
+
export type PaddingSize = 'xs' | 's' | 'sm' | 'm' | 'l' | 'xl';
|
8
8
|
export type Paddings = {
|
9
9
|
[key in PaddingsDirections]?: PaddingSize;
|
10
10
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"paddings.js","sourceRoot":"../../../src","sources":["models/paddings.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B","sourcesContent":["export enum PaddingsDirections {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport type PaddingSize = 'xs' | 's' | 'm' | 'l' | 'xl';\n\nexport type Paddings = {\n [key in PaddingsDirections]?: PaddingSize;\n};\n\nexport type PaddingsYFMProps = {\n paddingTop?: PaddingSize;\n paddingBottom?: PaddingSize;\n paddingRight?: PaddingSize;\n paddingLeft?: PaddingSize;\n};\n"]}
|
1
|
+
{"version":3,"file":"paddings.js","sourceRoot":"../../../src","sources":["models/paddings.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B","sourcesContent":["export enum PaddingsDirections {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport type PaddingSize = 'xs' | 's' | 'sm' | 'm' | 'l' | 'xl';\n\nexport type Paddings = {\n [key in PaddingsDirections]?: PaddingSize;\n};\n\nexport type PaddingsYFMProps = {\n paddingTop?: PaddingSize;\n paddingBottom?: PaddingSize;\n paddingRight?: PaddingSize;\n paddingLeft?: PaddingSize;\n};\n"]}
|
@@ -8,3 +8,5 @@ export * from "../blocks/Media/schema.js";
|
|
8
8
|
export * from "../blocks/Meta/schema.js";
|
9
9
|
export * from "../blocks/Suggest/schema.js";
|
10
10
|
export * from "../blocks/YFM/schema.js";
|
11
|
+
export * from "../blocks/CompactMedia/schema.js";
|
12
|
+
export * from "../blocks/Take/schema.js";
|
@@ -11,4 +11,6 @@ tslib_1.__exportStar(require("../blocks/Media/schema.js"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("../blocks/Meta/schema.js"), exports);
|
12
12
|
tslib_1.__exportStar(require("../blocks/Suggest/schema.js"), exports);
|
13
13
|
tslib_1.__exportStar(require("../blocks/YFM/schema.js"), exports);
|
14
|
+
tslib_1.__exportStar(require("../blocks/CompactMedia/schema.js"), exports);
|
15
|
+
tslib_1.__exportStar(require("../blocks/Take/schema.js"), exports);
|
14
16
|
//# sourceMappingURL=blocks.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":";;;AAAA,qEAAwC;AACxC,qEAAwC;AACxC,0EAA6C;AAC7C,kEAAqC;AACrC,mEAAsC;AACtC,qEAAwC;AACxC,oEAAuC;AACvC,mEAAsC;AACtC,sEAAyC;AACzC,kEAAqC","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/YFM/schema';\n"]}
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":";;;AAAA,qEAAwC;AACxC,qEAAwC;AACxC,0EAA6C;AAC7C,kEAAqC;AACrC,mEAAsC;AACtC,qEAAwC;AACxC,oEAAuC;AACvC,mEAAsC;AACtC,sEAAyC;AACzC,kEAAqC;AACrC,2EAA8C;AAC9C,mEAAsC","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/YFM/schema';\nexport * from '../blocks/CompactMedia/schema';\nexport * from '../blocks/Take/schema';\n"]}
|
@@ -2001,5 +2001,236 @@ export declare const schemasForCustom: {
|
|
2001
2001
|
};
|
2002
2002
|
};
|
2003
2003
|
};
|
2004
|
+
"blog-compact-media-block": {
|
2005
|
+
"blog-compact-media-block": {
|
2006
|
+
type: string;
|
2007
|
+
additionalProperties: boolean;
|
2008
|
+
properties: {
|
2009
|
+
image: {
|
2010
|
+
oneOf: ({
|
2011
|
+
optionName: string;
|
2012
|
+
oneOf: ({
|
2013
|
+
type: string;
|
2014
|
+
properties: {
|
2015
|
+
when: {
|
2016
|
+
type: string;
|
2017
|
+
};
|
2018
|
+
};
|
2019
|
+
} | {
|
2020
|
+
type: string;
|
2021
|
+
pattern: string;
|
2022
|
+
optionName: string;
|
2023
|
+
items?: undefined;
|
2024
|
+
} | {
|
2025
|
+
type: string;
|
2026
|
+
items: {
|
2027
|
+
type: string;
|
2028
|
+
properties: {
|
2029
|
+
when: {
|
2030
|
+
type: string;
|
2031
|
+
};
|
2032
|
+
};
|
2033
|
+
};
|
2034
|
+
optionName: string;
|
2035
|
+
pattern?: undefined;
|
2036
|
+
})[];
|
2037
|
+
type?: undefined;
|
2038
|
+
items?: undefined;
|
2039
|
+
} | {
|
2040
|
+
type: string;
|
2041
|
+
items: {
|
2042
|
+
oneOf: ({
|
2043
|
+
type: string;
|
2044
|
+
properties: {
|
2045
|
+
when: {
|
2046
|
+
type: string;
|
2047
|
+
};
|
2048
|
+
};
|
2049
|
+
} | {
|
2050
|
+
type: string;
|
2051
|
+
pattern: string;
|
2052
|
+
optionName: string;
|
2053
|
+
items?: undefined;
|
2054
|
+
} | {
|
2055
|
+
type: string;
|
2056
|
+
items: {
|
2057
|
+
type: string;
|
2058
|
+
properties: {
|
2059
|
+
when: {
|
2060
|
+
type: string;
|
2061
|
+
};
|
2062
|
+
};
|
2063
|
+
};
|
2064
|
+
optionName: string;
|
2065
|
+
pattern?: undefined;
|
2066
|
+
})[];
|
2067
|
+
};
|
2068
|
+
optionName: string;
|
2069
|
+
})[];
|
2070
|
+
};
|
2071
|
+
description: {
|
2072
|
+
type: string;
|
2073
|
+
contentType: string;
|
2074
|
+
};
|
2075
|
+
paddingTop: {
|
2076
|
+
type: string;
|
2077
|
+
enum: string[];
|
2078
|
+
};
|
2079
|
+
paddingBottom: {
|
2080
|
+
type: string;
|
2081
|
+
enum: string[];
|
2082
|
+
};
|
2083
|
+
fullWidth: {
|
2084
|
+
type: string;
|
2085
|
+
};
|
2086
|
+
column: {
|
2087
|
+
type: string;
|
2088
|
+
enum: string[];
|
2089
|
+
};
|
2090
|
+
qa: {
|
2091
|
+
type: string;
|
2092
|
+
};
|
2093
|
+
anchor: {
|
2094
|
+
type: string;
|
2095
|
+
additionalProperties: boolean;
|
2096
|
+
required: string[];
|
2097
|
+
properties: {
|
2098
|
+
text: {
|
2099
|
+
type: string;
|
2100
|
+
contentType: string;
|
2101
|
+
};
|
2102
|
+
url: {
|
2103
|
+
type: string;
|
2104
|
+
};
|
2105
|
+
urlTitle: {
|
2106
|
+
type: string;
|
2107
|
+
};
|
2108
|
+
};
|
2109
|
+
};
|
2110
|
+
visible: {
|
2111
|
+
type: string;
|
2112
|
+
enum: string[];
|
2113
|
+
};
|
2114
|
+
resetPaddings: {
|
2115
|
+
type: string;
|
2116
|
+
};
|
2117
|
+
context: {
|
2118
|
+
type: string;
|
2119
|
+
};
|
2120
|
+
indent: {
|
2121
|
+
type: string;
|
2122
|
+
additionalProperties: boolean;
|
2123
|
+
properties: {
|
2124
|
+
top: {
|
2125
|
+
enum: string[];
|
2126
|
+
};
|
2127
|
+
bottom: {
|
2128
|
+
enum: string[];
|
2129
|
+
};
|
2130
|
+
};
|
2131
|
+
};
|
2132
|
+
type: {};
|
2133
|
+
when: {
|
2134
|
+
type: string;
|
2135
|
+
};
|
2136
|
+
};
|
2137
|
+
};
|
2138
|
+
};
|
2139
|
+
"blog-take-block": {
|
2140
|
+
"blog-take-block": {
|
2141
|
+
type: string;
|
2142
|
+
additionalProperties: boolean;
|
2143
|
+
required: string[];
|
2144
|
+
properties: {
|
2145
|
+
text: {
|
2146
|
+
type: string;
|
2147
|
+
contentType: string;
|
2148
|
+
};
|
2149
|
+
author: {
|
2150
|
+
type: string;
|
2151
|
+
additionalProperties: boolean;
|
2152
|
+
required: string[];
|
2153
|
+
properties: {
|
2154
|
+
firstName: {
|
2155
|
+
type: string;
|
2156
|
+
contentType: string;
|
2157
|
+
};
|
2158
|
+
secondName: {
|
2159
|
+
type: string;
|
2160
|
+
contentType: string;
|
2161
|
+
};
|
2162
|
+
description: {
|
2163
|
+
type: string;
|
2164
|
+
contentType: string;
|
2165
|
+
};
|
2166
|
+
avatar: {
|
2167
|
+
type: string;
|
2168
|
+
};
|
2169
|
+
};
|
2170
|
+
};
|
2171
|
+
paddingTop: {
|
2172
|
+
type: string;
|
2173
|
+
enum: string[];
|
2174
|
+
};
|
2175
|
+
paddingBottom: {
|
2176
|
+
type: string;
|
2177
|
+
enum: string[];
|
2178
|
+
};
|
2179
|
+
fullWidth: {
|
2180
|
+
type: string;
|
2181
|
+
};
|
2182
|
+
column: {
|
2183
|
+
type: string;
|
2184
|
+
enum: string[];
|
2185
|
+
};
|
2186
|
+
qa: {
|
2187
|
+
type: string;
|
2188
|
+
};
|
2189
|
+
anchor: {
|
2190
|
+
type: string;
|
2191
|
+
additionalProperties: boolean;
|
2192
|
+
required: string[];
|
2193
|
+
properties: {
|
2194
|
+
text: {
|
2195
|
+
type: string;
|
2196
|
+
contentType: string;
|
2197
|
+
};
|
2198
|
+
url: {
|
2199
|
+
type: string;
|
2200
|
+
};
|
2201
|
+
urlTitle: {
|
2202
|
+
type: string;
|
2203
|
+
};
|
2204
|
+
};
|
2205
|
+
};
|
2206
|
+
visible: {
|
2207
|
+
type: string;
|
2208
|
+
enum: string[];
|
2209
|
+
};
|
2210
|
+
resetPaddings: {
|
2211
|
+
type: string;
|
2212
|
+
};
|
2213
|
+
context: {
|
2214
|
+
type: string;
|
2215
|
+
};
|
2216
|
+
indent: {
|
2217
|
+
type: string;
|
2218
|
+
additionalProperties: boolean;
|
2219
|
+
properties: {
|
2220
|
+
top: {
|
2221
|
+
enum: string[];
|
2222
|
+
};
|
2223
|
+
bottom: {
|
2224
|
+
enum: string[];
|
2225
|
+
};
|
2226
|
+
};
|
2227
|
+
};
|
2228
|
+
type: {};
|
2229
|
+
when: {
|
2230
|
+
type: string;
|
2231
|
+
};
|
2232
|
+
};
|
2233
|
+
};
|
2234
|
+
};
|
2004
2235
|
};
|
2005
2236
|
};
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("../models/common.js");
|
6
6
|
const blocks = tslib_1.__importStar(require("./blocks.js"));
|
7
7
|
const headers = tslib_1.__importStar(require("./headers.js"));
|
8
|
-
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM } = blocks;
|
8
|
+
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia, Take, } = blocks;
|
9
9
|
const { Header } = headers;
|
10
10
|
exports.validators = {
|
11
11
|
blocks,
|
@@ -26,6 +26,8 @@ exports.schemasForCustom = {
|
|
26
26
|
[common_1.BlockType.Meta]: Meta,
|
27
27
|
[common_1.BlockType.Suggest]: Suggest,
|
28
28
|
[common_1.BlockType.YFM]: YFM,
|
29
|
+
[common_1.BlockType.CompactMedia]: CompactMedia,
|
30
|
+
[common_1.BlockType.Take]: Take,
|
29
31
|
},
|
30
32
|
};
|
31
33
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":";;;;AAAA,gDAA2C;AAE3C,4DAAmC;AACnC,8DAAqC;AAErC,MAAM,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":";;;;AAAA,gDAA2C;AAE3C,4DAAmC;AACnC,8DAAqC;AAErC,MAAM,EACF,MAAM,EACN,MAAM,EACN,WAAW,EACX,GAAG,EACH,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,OAAO,EACP,GAAG,EACH,YAAY,EACZ,IAAI,GACP,GAAG,MAAM,CAAC;AACX,MAAM,EAAC,MAAM,EAAC,GAAG,OAAO,CAAC;AAEZ,QAAA,UAAU,GAAG;IACtB,MAAM;IACN,OAAO;CACV,CAAC;AAEW,QAAA,gBAAgB,GAAG;IAC5B,OAAO,EAAE;QACL,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;KAC7B;IACD,MAAM,EAAE;QACJ,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,kBAAS,CAAC,WAAW,CAAC,EAAE,WAAW;QACpC,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE,KAAK;QACxB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE,OAAO;QAC5B,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,YAAY;QACtC,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,IAAI;KACzB;CACJ,CAAC","sourcesContent":["import {BlockType} from '../models/common';\n\nimport * as blocks from './blocks';\nimport * as headers from './headers';\n\nconst {\n Author,\n Banner,\n ColoredText,\n CTA,\n Feed,\n Layout,\n Media,\n Meta,\n Suggest,\n YFM,\n CompactMedia,\n Take,\n} = blocks;\nconst {Header} = headers;\n\nexport const validators = {\n blocks,\n headers,\n};\n\nexport const schemasForCustom = {\n headers: {\n [BlockType.Header]: Header,\n },\n blocks: {\n [BlockType.Author]: Author,\n [BlockType.Banner]: Banner,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.CTA]: CTA,\n [BlockType.Feed]: Feed,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Meta]: Meta,\n [BlockType.Suggest]: Suggest,\n [BlockType.YFM]: YFM,\n [BlockType.CompactMedia]: CompactMedia,\n [BlockType.Take]: Take,\n },\n};\n"]}
|