@gravity-ui/blog-constructor 8.2.0 → 8.3.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/constructor/blocksMap.d.ts +1 -0
- package/build/cjs/constructor/blocksMap.js +2 -0
- package/build/cjs/constructor/blocksMap.js.map +1 -1
- package/build/cjs/hooks/useExtendedComponentMap.d.ts +1 -0
- package/build/cjs/models/blocks.d.ts +7 -1
- package/build/cjs/models/blocks.js.map +1 -1
- package/build/cjs/models/common.d.ts +2 -1
- package/build/cjs/models/common.js +1 -0
- package/build/cjs/models/common.js.map +1 -1
- package/build/cjs/schema/blocks.d.ts +1 -0
- package/build/cjs/schema/blocks.js +1 -0
- package/build/cjs/schema/blocks.js.map +1 -1
- package/build/cjs/schema/index.d.ts +135 -0
- package/build/cjs/schema/index.js +2 -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/constructor/blocksMap.d.ts +1 -0
- package/build/esm/constructor/blocksMap.js +2 -0
- package/build/esm/constructor/blocksMap.js.map +1 -1
- package/build/esm/hooks/useExtendedComponentMap.d.ts +1 -0
- package/build/esm/models/blocks.d.ts +7 -1
- package/build/esm/models/blocks.js.map +1 -1
- package/build/esm/models/common.d.ts +2 -1
- package/build/esm/models/common.js +1 -0
- package/build/esm/models/common.js.map +1 -1
- package/build/esm/schema/blocks.d.ts +1 -0
- package/build/esm/schema/blocks.js +1 -0
- package/build/esm/schema/blocks.js.map +1 -1
- package/build/esm/schema/index.d.ts +135 -0
- package/build/esm/schema/index.js +2 -1
- package/build/esm/schema/index.js.map +1 -1
- package/package.json +1 -1
- package/server/models/blocks.d.ts +7 -1
- package/server/models/common.d.ts +2 -1
- package/server/models/common.js +1 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-compact-media__container {
|
4
|
+
max-width: 296px;
|
5
|
+
}
|
6
|
+
.bc-compact-media__media {
|
7
|
+
max-width: 232px;
|
8
|
+
padding: 8px 0;
|
9
|
+
}
|
10
|
+
.bc-compact-media__image {
|
11
|
+
object-fit: contain;
|
12
|
+
object-position: left;
|
13
|
+
max-height: 88px;
|
14
|
+
max-width: 232px;
|
15
|
+
width: auto;
|
16
|
+
}
|
17
|
+
@media (max-width: 1081px) {
|
18
|
+
.bc-compact-media__container {
|
19
|
+
max-width: none;
|
20
|
+
width: 50%;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
@media (max-width: 577px) {
|
24
|
+
.bc-compact-media__container {
|
25
|
+
width: 100%;
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CompactMedia = void 0;
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
6
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
7
|
+
const paddings_1 = require("../../models/paddings.js");
|
8
|
+
const cn_1 = require("../../utils/cn.js");
|
9
|
+
const b = (0, cn_1.block)('compact-media');
|
10
|
+
const CompactMedia = ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }) => {
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper_1.Wrapper, { paddings: {
|
12
|
+
[paddings_1.PaddingsDirections.top]: paddingTop,
|
13
|
+
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
14
|
+
[paddings_1.PaddingsDirections.left]: paddingLeft,
|
15
|
+
[paddings_1.PaddingsDirections.right]: paddingRight,
|
16
|
+
}, className: b('container'), children: [(0, jsx_runtime_1.jsx)(page_constructor_1.Media, { className: b('media'), imageClassName: b('image'), image: image }), description && ((0, jsx_runtime_1.jsx)("div", { className: b('text-content'), children: (0, jsx_runtime_1.jsx)(page_constructor_1.YFMWrapper, { content: description, modifiers: {
|
17
|
+
blog: true,
|
18
|
+
resetPaddings: true,
|
19
|
+
} }) }))] }));
|
20
|
+
};
|
21
|
+
exports.CompactMedia = CompactMedia;
|
22
|
+
//# sourceMappingURL=CompactMedia.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CompactMedia.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/CompactMedia.tsx"],"names":[],"mappings":";;;;AAAA,mEAA0E;AAE1E,iEAAyD;AAEzD,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,eAAe,CAAC,CAAC;AAC1B,MAAM,YAAY,GAAG,CAAC,EACzB,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,KAAK,GACW,EAAE,EAAE;IACpB,OAAO,CACH,wBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,6BAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,6BAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAEzB,uBAAC,wBAAO,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,EAC3E,WAAW,IAAI,CACZ,gCAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC7B,uBAAC,6BAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wBACP,IAAI,EAAE,IAAI;wBACV,aAAa,EAAE,IAAI;qBACtB,GACH,GACA,CACT,IACK,CACb,CAAC;AACN,CAAC,CAAC;AAhCW,QAAA,YAAY,gBAgCvB","sourcesContent":["import {Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {CompactMediaProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './CompactMedia.scss';\n\nconst b = block('compact-media');\nexport const CompactMedia = ({\n paddingBottom,\n paddingTop,\n description,\n paddingRight,\n paddingLeft,\n image,\n}: CompactMediaProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n className={b('container')}\n >\n <PCMedia className={b('media')} imageClassName={b('image')} image={image} />\n {description && (\n <div className={b('text-content')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </Wrapper>\n );\n};\n"]}
|
@@ -0,0 +1,135 @@
|
|
1
|
+
export declare const CompactMedia: {
|
2
|
+
"blog-compact-media-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
properties: {
|
6
|
+
image: {
|
7
|
+
oneOf: ({
|
8
|
+
optionName: string;
|
9
|
+
oneOf: ({
|
10
|
+
type: string;
|
11
|
+
properties: {
|
12
|
+
when: {
|
13
|
+
type: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
} | {
|
17
|
+
type: string;
|
18
|
+
pattern: string;
|
19
|
+
optionName: string;
|
20
|
+
items?: undefined;
|
21
|
+
} | {
|
22
|
+
type: string;
|
23
|
+
items: {
|
24
|
+
type: string;
|
25
|
+
properties: {
|
26
|
+
when: {
|
27
|
+
type: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
};
|
31
|
+
optionName: string;
|
32
|
+
pattern?: undefined;
|
33
|
+
})[];
|
34
|
+
type?: undefined;
|
35
|
+
items?: undefined;
|
36
|
+
} | {
|
37
|
+
type: string;
|
38
|
+
items: {
|
39
|
+
oneOf: ({
|
40
|
+
type: string;
|
41
|
+
properties: {
|
42
|
+
when: {
|
43
|
+
type: string;
|
44
|
+
};
|
45
|
+
};
|
46
|
+
} | {
|
47
|
+
type: string;
|
48
|
+
pattern: string;
|
49
|
+
optionName: string;
|
50
|
+
items?: undefined;
|
51
|
+
} | {
|
52
|
+
type: string;
|
53
|
+
items: {
|
54
|
+
type: string;
|
55
|
+
properties: {
|
56
|
+
when: {
|
57
|
+
type: string;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
};
|
61
|
+
optionName: string;
|
62
|
+
pattern?: undefined;
|
63
|
+
})[];
|
64
|
+
};
|
65
|
+
optionName: string;
|
66
|
+
})[];
|
67
|
+
};
|
68
|
+
description: {
|
69
|
+
type: string;
|
70
|
+
contentType: string;
|
71
|
+
};
|
72
|
+
paddingTop: {
|
73
|
+
type: string;
|
74
|
+
enum: string[];
|
75
|
+
};
|
76
|
+
paddingBottom: {
|
77
|
+
type: string;
|
78
|
+
enum: string[];
|
79
|
+
};
|
80
|
+
fullWidth: {
|
81
|
+
type: string;
|
82
|
+
};
|
83
|
+
column: {
|
84
|
+
type: string;
|
85
|
+
enum: string[];
|
86
|
+
};
|
87
|
+
qa: {
|
88
|
+
type: string;
|
89
|
+
};
|
90
|
+
anchor: {
|
91
|
+
type: string;
|
92
|
+
additionalProperties: boolean;
|
93
|
+
required: string[];
|
94
|
+
properties: {
|
95
|
+
text: {
|
96
|
+
type: string;
|
97
|
+
contentType: string;
|
98
|
+
};
|
99
|
+
url: {
|
100
|
+
type: string;
|
101
|
+
};
|
102
|
+
urlTitle: {
|
103
|
+
type: string;
|
104
|
+
};
|
105
|
+
};
|
106
|
+
};
|
107
|
+
visible: {
|
108
|
+
type: string;
|
109
|
+
enum: string[];
|
110
|
+
};
|
111
|
+
resetPaddings: {
|
112
|
+
type: string;
|
113
|
+
};
|
114
|
+
context: {
|
115
|
+
type: string;
|
116
|
+
};
|
117
|
+
indent: {
|
118
|
+
type: string;
|
119
|
+
additionalProperties: boolean;
|
120
|
+
properties: {
|
121
|
+
top: {
|
122
|
+
enum: string[];
|
123
|
+
};
|
124
|
+
bottom: {
|
125
|
+
enum: string[];
|
126
|
+
};
|
127
|
+
};
|
128
|
+
};
|
129
|
+
type: {};
|
130
|
+
when: {
|
131
|
+
type: string;
|
132
|
+
};
|
133
|
+
};
|
134
|
+
};
|
135
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CompactMedia = 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, MediaProps }, } = page_constructor_1.validators;
|
8
|
+
exports.CompactMedia = {
|
9
|
+
[common_1.BlockType.CompactMedia]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { image: MediaProps['image'], description: {
|
13
|
+
type: 'string',
|
14
|
+
contentType: 'text',
|
15
|
+
} }),
|
16
|
+
},
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAE,UAAU,EAAC,GACvC,GAAG,6BAAU,CAAC;AAEF,QAAA,YAAY,GAAG;IACxB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,EAC1B,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB,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, MediaProps},\n} = validators;\n\nexport const CompactMedia = {\n [BlockType.CompactMedia]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n image: MediaProps['image'],\n description: {\n type: 'string',\n contentType: 'text',\n },\n },\n },\n};\n"]}
|
@@ -11,6 +11,7 @@ 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;
|
14
15
|
};
|
15
16
|
headers: {
|
16
17
|
"blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -4,6 +4,7 @@ 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");
|
@@ -25,6 +26,7 @@ const blocks = {
|
|
25
26
|
[common_1.BlockType.Meta]: Meta_1.Meta,
|
26
27
|
[common_1.BlockType.Feed]: Feed_1.Feed,
|
27
28
|
[common_1.BlockType.Form]: Form_1.Form,
|
29
|
+
[common_1.BlockType.CompactMedia]: CompactMedia_1.CompactMedia,
|
28
30
|
};
|
29
31
|
const headers = {
|
30
32
|
[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,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;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 {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"]}
|
@@ -13,6 +13,7 @@ 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;
|
16
17
|
};
|
17
18
|
headers: {
|
18
19
|
"blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -50,6 +50,9 @@ 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'>>;
|
53
56
|
export type AuthorBlockModel = {
|
54
57
|
type: BlockType.Author;
|
55
58
|
} & AuthorProps;
|
@@ -86,7 +89,10 @@ export type FeedBlockModel = {
|
|
86
89
|
export type FormBlockModel = {
|
87
90
|
type: BlockType.Form;
|
88
91
|
} & FormProps;
|
89
|
-
export type
|
92
|
+
export type CompactMediaBlockModel = {
|
93
|
+
type: BlockType.CompactMedia;
|
94
|
+
} & CompactMediaProps;
|
95
|
+
export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel;
|
90
96
|
export type Block = BlockModel & {
|
91
97
|
[x: string]: any;
|
92
98
|
};
|
@@ -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 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"]}
|
@@ -97,7 +97,8 @@ 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"
|
101
102
|
}
|
102
103
|
export type MetaProps = {
|
103
104
|
metaComponent: JSX.Element;
|
@@ -20,6 +20,7 @@ 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";
|
23
24
|
})(BlockType || (exports.BlockType = BlockType = {}));
|
24
25
|
var DefaultEventNames;
|
25
26
|
(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,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,yBAAT,SAAS,QAcpB;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}\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"]}
|
@@ -11,4 +11,5 @@ 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);
|
14
15
|
//# 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","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';\n"]}
|
@@ -2001,5 +2001,140 @@ 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
|
+
};
|
2004
2139
|
};
|
2005
2140
|
};
|
@@ -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 } = blocks;
|
9
9
|
const { Header } = headers;
|
10
10
|
exports.validators = {
|
11
11
|
blocks,
|
@@ -26,6 +26,7 @@ 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,
|
29
30
|
},
|
30
31
|
};
|
31
32
|
//# 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,EAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":";;;;AAAA,gDAA2C;AAE3C,4DAAmC;AACnC,8DAAqC;AAErC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAC,GAC3F,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;KACzC;CACJ,CAAC","sourcesContent":["import {BlockType} from '../models/common';\n\nimport * as blocks from './blocks';\nimport * as headers from './headers';\n\nconst {Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia} =\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 },\n};\n"]}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-compact-media__container {
|
4
|
+
max-width: 296px;
|
5
|
+
}
|
6
|
+
.bc-compact-media__media {
|
7
|
+
max-width: 232px;
|
8
|
+
padding: 8px 0;
|
9
|
+
}
|
10
|
+
.bc-compact-media__image {
|
11
|
+
object-fit: contain;
|
12
|
+
object-position: left;
|
13
|
+
max-height: 88px;
|
14
|
+
max-width: 232px;
|
15
|
+
width: auto;
|
16
|
+
}
|
17
|
+
@media (max-width: 1081px) {
|
18
|
+
.bc-compact-media__container {
|
19
|
+
max-width: none;
|
20
|
+
width: 50%;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
@media (max-width: 577px) {
|
24
|
+
.bc-compact-media__container {
|
25
|
+
width: 100%;
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Media as PCMedia, YFMWrapper } from '@gravity-ui/page-constructor';
|
3
|
+
import { Wrapper } from "../../components/Wrapper/Wrapper.js";
|
4
|
+
import { PaddingsDirections } from "../../models/paddings.js";
|
5
|
+
import { block } from "../../utils/cn.js";
|
6
|
+
import './CompactMedia.css';
|
7
|
+
const b = block('compact-media');
|
8
|
+
export const CompactMedia = ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }) => {
|
9
|
+
return (_jsxs(Wrapper, { paddings: {
|
10
|
+
[PaddingsDirections.top]: paddingTop,
|
11
|
+
[PaddingsDirections.bottom]: paddingBottom,
|
12
|
+
[PaddingsDirections.left]: paddingLeft,
|
13
|
+
[PaddingsDirections.right]: paddingRight,
|
14
|
+
}, className: b('container'), children: [_jsx(PCMedia, { className: b('media'), imageClassName: b('image'), image: image }), description && (_jsx("div", { className: b('text-content'), children: _jsx(YFMWrapper, { content: description, modifiers: {
|
15
|
+
blog: true,
|
16
|
+
resetPaddings: true,
|
17
|
+
} }) }))] }));
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=CompactMedia.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CompactMedia.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/CompactMedia.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,IAAI,OAAO,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAC,OAAO,EAAC,4CAAyC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,oBAAoB,CAAC;AAE5B,MAAM,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EACzB,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,KAAK,GACW,EAAE,EAAE;IACpB,OAAO,CACH,MAAC,OAAO,IACJ,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAEzB,KAAC,OAAO,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,EAC3E,WAAW,IAAI,CACZ,cAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC7B,KAAC,UAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wBACP,IAAI,EAAE,IAAI;wBACV,aAAa,EAAE,IAAI;qBACtB,GACH,GACA,CACT,IACK,CACb,CAAC;AACN,CAAC,CAAC","sourcesContent":["import {Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {CompactMediaProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './CompactMedia.scss';\n\nconst b = block('compact-media');\nexport const CompactMedia = ({\n paddingBottom,\n paddingTop,\n description,\n paddingRight,\n paddingLeft,\n image,\n}: CompactMediaProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n className={b('container')}\n >\n <PCMedia className={b('media')} imageClassName={b('image')} image={image} />\n {description && (\n <div className={b('text-content')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </Wrapper>\n );\n};\n"]}
|
@@ -0,0 +1,135 @@
|
|
1
|
+
export declare const CompactMedia: {
|
2
|
+
"blog-compact-media-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
properties: {
|
6
|
+
image: {
|
7
|
+
oneOf: ({
|
8
|
+
optionName: string;
|
9
|
+
oneOf: ({
|
10
|
+
type: string;
|
11
|
+
properties: {
|
12
|
+
when: {
|
13
|
+
type: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
} | {
|
17
|
+
type: string;
|
18
|
+
pattern: string;
|
19
|
+
optionName: string;
|
20
|
+
items?: undefined;
|
21
|
+
} | {
|
22
|
+
type: string;
|
23
|
+
items: {
|
24
|
+
type: string;
|
25
|
+
properties: {
|
26
|
+
when: {
|
27
|
+
type: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
};
|
31
|
+
optionName: string;
|
32
|
+
pattern?: undefined;
|
33
|
+
})[];
|
34
|
+
type?: undefined;
|
35
|
+
items?: undefined;
|
36
|
+
} | {
|
37
|
+
type: string;
|
38
|
+
items: {
|
39
|
+
oneOf: ({
|
40
|
+
type: string;
|
41
|
+
properties: {
|
42
|
+
when: {
|
43
|
+
type: string;
|
44
|
+
};
|
45
|
+
};
|
46
|
+
} | {
|
47
|
+
type: string;
|
48
|
+
pattern: string;
|
49
|
+
optionName: string;
|
50
|
+
items?: undefined;
|
51
|
+
} | {
|
52
|
+
type: string;
|
53
|
+
items: {
|
54
|
+
type: string;
|
55
|
+
properties: {
|
56
|
+
when: {
|
57
|
+
type: string;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
};
|
61
|
+
optionName: string;
|
62
|
+
pattern?: undefined;
|
63
|
+
})[];
|
64
|
+
};
|
65
|
+
optionName: string;
|
66
|
+
})[];
|
67
|
+
};
|
68
|
+
description: {
|
69
|
+
type: string;
|
70
|
+
contentType: string;
|
71
|
+
};
|
72
|
+
paddingTop: {
|
73
|
+
type: string;
|
74
|
+
enum: string[];
|
75
|
+
};
|
76
|
+
paddingBottom: {
|
77
|
+
type: string;
|
78
|
+
enum: string[];
|
79
|
+
};
|
80
|
+
fullWidth: {
|
81
|
+
type: string;
|
82
|
+
};
|
83
|
+
column: {
|
84
|
+
type: string;
|
85
|
+
enum: string[];
|
86
|
+
};
|
87
|
+
qa: {
|
88
|
+
type: string;
|
89
|
+
};
|
90
|
+
anchor: {
|
91
|
+
type: string;
|
92
|
+
additionalProperties: boolean;
|
93
|
+
required: string[];
|
94
|
+
properties: {
|
95
|
+
text: {
|
96
|
+
type: string;
|
97
|
+
contentType: string;
|
98
|
+
};
|
99
|
+
url: {
|
100
|
+
type: string;
|
101
|
+
};
|
102
|
+
urlTitle: {
|
103
|
+
type: string;
|
104
|
+
};
|
105
|
+
};
|
106
|
+
};
|
107
|
+
visible: {
|
108
|
+
type: string;
|
109
|
+
enum: string[];
|
110
|
+
};
|
111
|
+
resetPaddings: {
|
112
|
+
type: string;
|
113
|
+
};
|
114
|
+
context: {
|
115
|
+
type: string;
|
116
|
+
};
|
117
|
+
indent: {
|
118
|
+
type: string;
|
119
|
+
additionalProperties: boolean;
|
120
|
+
properties: {
|
121
|
+
top: {
|
122
|
+
enum: string[];
|
123
|
+
};
|
124
|
+
bottom: {
|
125
|
+
enum: string[];
|
126
|
+
};
|
127
|
+
};
|
128
|
+
};
|
129
|
+
type: {};
|
130
|
+
when: {
|
131
|
+
type: string;
|
132
|
+
};
|
133
|
+
};
|
134
|
+
};
|
135
|
+
};
|
@@ -0,0 +1,15 @@
|
|
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, MediaProps }, } = validators;
|
5
|
+
export const CompactMedia = {
|
6
|
+
[BlockType.CompactMedia]: {
|
7
|
+
type: 'object',
|
8
|
+
additionalProperties: false,
|
9
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { image: MediaProps['image'], description: {
|
10
|
+
type: 'string',
|
11
|
+
contentType: 'text',
|
12
|
+
} }),
|
13
|
+
},
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/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,EAAE,UAAU,EAAC,GACvC,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,EAC1B,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB,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, MediaProps},\n} = validators;\n\nexport const CompactMedia = {\n [BlockType.CompactMedia]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n image: MediaProps['image'],\n description: {\n type: 'string',\n contentType: 'text',\n },\n },\n },\n};\n"]}
|
@@ -11,6 +11,7 @@ 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;
|
14
15
|
};
|
15
16
|
headers: {
|
16
17
|
"blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -2,6 +2,7 @@ import { Author } from "../blocks/Author/Author.js";
|
|
2
2
|
import { Banner } from "../blocks/Banner/Banner.js";
|
3
3
|
import { CTA } from "../blocks/CTA/CTA.js";
|
4
4
|
import { ColoredText } from "../blocks/ColoredText/ColoredText.js";
|
5
|
+
import { CompactMedia } from "../blocks/CompactMedia/CompactMedia.js";
|
5
6
|
import { Feed } from "../blocks/Feed/Feed.js";
|
6
7
|
import { Form } from "../blocks/Form/Form.js";
|
7
8
|
import { Header } from "../blocks/Header/Header.js";
|
@@ -23,6 +24,7 @@ const blocks = {
|
|
23
24
|
[BlockType.Meta]: Meta,
|
24
25
|
[BlockType.Feed]: Feed,
|
25
26
|
[BlockType.Form]: Form,
|
27
|
+
[BlockType.CompactMedia]: CompactMedia,
|
26
28
|
};
|
27
29
|
const headers = {
|
28
30
|
[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,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;
|
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"]}
|
@@ -13,6 +13,7 @@ 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;
|
16
17
|
};
|
17
18
|
headers: {
|
18
19
|
"blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -50,6 +50,9 @@ 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'>>;
|
53
56
|
export type AuthorBlockModel = {
|
54
57
|
type: BlockType.Author;
|
55
58
|
} & AuthorProps;
|
@@ -86,7 +89,10 @@ export type FeedBlockModel = {
|
|
86
89
|
export type FormBlockModel = {
|
87
90
|
type: BlockType.Form;
|
88
91
|
} & FormProps;
|
89
|
-
export type
|
92
|
+
export type CompactMediaBlockModel = {
|
93
|
+
type: BlockType.CompactMedia;
|
94
|
+
} & CompactMediaProps;
|
95
|
+
export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel;
|
90
96
|
export type Block = BlockModel & {
|
91
97
|
[x: string]: any;
|
92
98
|
};
|
@@ -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 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"]}
|
@@ -97,7 +97,8 @@ 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"
|
101
102
|
}
|
102
103
|
export type MetaProps = {
|
103
104
|
metaComponent: JSX.Element;
|
@@ -17,6 +17,7 @@ export var BlockType;
|
|
17
17
|
BlockType["Meta"] = "blog-meta-block";
|
18
18
|
BlockType["Feed"] = "blog-feed-block";
|
19
19
|
BlockType["Form"] = "blog-form-block";
|
20
|
+
BlockType["CompactMedia"] = "blog-compact-media-block";
|
20
21
|
})(BlockType || (BlockType = {}));
|
21
22
|
export var DefaultEventNames;
|
22
23
|
(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,
|
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 +1 @@
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":"AAAA,2CAAwC;AACxC,2CAAwC;AACxC,gDAA6C;AAC7C,wCAAqC;AACrC,yCAAsC;AACtC,2CAAwC;AACxC,0CAAuC;AACvC,yCAAsC;AACtC,4CAAyC;AACzC,wCAAqC","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,2CAAwC;AACxC,2CAAwC;AACxC,gDAA6C;AAC7C,wCAAqC;AACrC,yCAAsC;AACtC,2CAAwC;AACxC,0CAAuC;AACvC,yCAAsC;AACtC,4CAAyC;AACzC,wCAAqC;AACrC,iDAA8C","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';\n"]}
|
@@ -2001,5 +2001,140 @@ 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
|
+
};
|
2004
2139
|
};
|
2005
2140
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { BlockType } from "../models/common.js";
|
2
2
|
import * as blocks from "./blocks.js";
|
3
3
|
import * as headers from "./headers.js";
|
4
|
-
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM } = blocks;
|
4
|
+
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia } = blocks;
|
5
5
|
const { Header } = headers;
|
6
6
|
export const validators = {
|
7
7
|
blocks,
|
@@ -22,6 +22,7 @@ export const schemasForCustom = {
|
|
22
22
|
[BlockType.Meta]: Meta,
|
23
23
|
[BlockType.Suggest]: Suggest,
|
24
24
|
[BlockType.YFM]: YFM,
|
25
|
+
[BlockType.CompactMedia]: CompactMedia,
|
25
26
|
},
|
26
27
|
};
|
27
28
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,OAAO,qBAAkB;AAErC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,OAAO,qBAAkB;AAErC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAC,GAC3F,MAAM,CAAC;AACX,MAAM,EAAC,MAAM,EAAC,GAAG,OAAO,CAAC;AAEzB,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM;IACN,OAAO;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE;QACL,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;KAC7B;IACD,MAAM,EAAE;QACJ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;QACpC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;QACxB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;QAC5B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;KACzC;CACJ,CAAC","sourcesContent":["import {BlockType} from '../models/common';\n\nimport * as blocks from './blocks';\nimport * as headers from './headers';\n\nconst {Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia} =\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 },\n};\n"]}
|
package/package.json
CHANGED
@@ -50,6 +50,9 @@ 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'>>;
|
53
56
|
export type AuthorBlockModel = {
|
54
57
|
type: BlockType.Author;
|
55
58
|
} & AuthorProps;
|
@@ -86,7 +89,10 @@ export type FeedBlockModel = {
|
|
86
89
|
export type FormBlockModel = {
|
87
90
|
type: BlockType.Form;
|
88
91
|
} & FormProps;
|
89
|
-
export type
|
92
|
+
export type CompactMediaBlockModel = {
|
93
|
+
type: BlockType.CompactMedia;
|
94
|
+
} & CompactMediaProps;
|
95
|
+
export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel;
|
90
96
|
export type Block = BlockModel & {
|
91
97
|
[x: string]: any;
|
92
98
|
};
|
@@ -97,7 +97,8 @@ 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"
|
101
102
|
}
|
102
103
|
export type MetaProps = {
|
103
104
|
metaComponent: JSX.Element;
|
package/server/models/common.js
CHANGED
@@ -20,6 +20,7 @@ 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";
|
23
24
|
})(BlockType || (exports.BlockType = BlockType = {}));
|
24
25
|
var DefaultEventNames;
|
25
26
|
(function (DefaultEventNames) {
|