@gravity-ui/page-constructor 3.0.0-alpha.3 → 3.0.0-alpha.5
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/CHANGELOG.md +7 -0
- package/README.md +0 -1
- package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +1 -1
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +1 -1
- package/build/cjs/blocks/Icons/Icons.js +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +1 -1
- package/build/cjs/blocks/Slider/Slider.js +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +1 -1
- package/build/cjs/components/Button/Button.css +3 -0
- package/build/cjs/components/Button/Button.js +5 -4
- package/build/cjs/components/MediaBase/MediaBase.js +1 -1
- package/build/cjs/components/Title/Title.d.ts +1 -1
- package/build/cjs/components/Title/Title.js +4 -4
- package/build/cjs/components/Title/TitleItem.d.ts +2 -2
- package/build/cjs/components/Title/TitleItem.js +2 -2
- package/build/cjs/components/index.d.ts +0 -1
- package/build/cjs/components/index.js +3 -5
- package/build/cjs/constructor-items.d.ts +0 -1
- package/build/cjs/constructor-items.js +0 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.css +0 -12
- package/build/cjs/containers/PageConstructor/PageConstructor.js +3 -8
- package/build/cjs/models/constructor-items/blocks.d.ts +4 -2
- package/build/cjs/models/constructor-items/common.d.ts +3 -4
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -14
- package/build/cjs/models/constructor-items/sub-blocks.js +0 -1
- package/build/cjs/models/constructor.d.ts +0 -1
- package/build/cjs/schema/index.d.ts +0 -6
- package/build/cjs/schema/index.js +2 -8
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -1
- package/build/cjs/schema/validators/sub-blocks.js +0 -1
- package/build/cjs/sub-blocks/Content/Content.js +3 -3
- package/build/cjs/sub-blocks/index.d.ts +0 -1
- package/build/cjs/sub-blocks/index.js +1 -3
- package/build/cjs/text-transform/transformers.d.ts +0 -2
- package/build/cjs/text-transform/transformers.js +1 -4
- package/build/esm/blocks/CardLayout/CardLayout.js +2 -2
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +1 -1
- package/build/esm/blocks/FilterBlock/FilterBlock.js +2 -2
- package/build/esm/blocks/Icons/Icons.js +2 -2
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +1 -1
- package/build/esm/blocks/Slider/Slider.js +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +1 -1
- package/build/esm/components/Button/Button.css +3 -0
- package/build/esm/components/Button/Button.js +5 -4
- package/build/esm/components/MediaBase/MediaBase.js +1 -1
- package/build/esm/components/Title/Title.d.ts +1 -1
- package/build/esm/components/Title/Title.js +4 -4
- package/build/esm/components/Title/TitleItem.d.ts +2 -2
- package/build/esm/components/Title/TitleItem.js +2 -2
- package/build/esm/components/index.d.ts +0 -1
- package/build/esm/components/index.js +0 -1
- package/build/esm/constructor-items.d.ts +0 -1
- package/build/esm/constructor-items.js +1 -2
- package/build/esm/containers/PageConstructor/PageConstructor.css +0 -12
- package/build/esm/containers/PageConstructor/PageConstructor.js +3 -8
- package/build/esm/models/constructor-items/blocks.d.ts +4 -2
- package/build/esm/models/constructor-items/common.d.ts +3 -4
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -14
- package/build/esm/models/constructor-items/sub-blocks.js +0 -1
- package/build/esm/models/constructor.d.ts +0 -1
- package/build/esm/schema/index.d.ts +0 -6
- package/build/esm/schema/index.js +3 -9
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -1
- package/build/esm/schema/validators/sub-blocks.js +0 -1
- package/build/esm/sub-blocks/Content/Content.js +3 -3
- package/build/esm/sub-blocks/index.d.ts +0 -1
- package/build/esm/sub-blocks/index.js +0 -1
- package/build/esm/text-transform/transformers.d.ts +0 -2
- package/build/esm/text-transform/transformers.js +1 -4
- package/package.json +4 -1
- package/server/models/constructor-items/blocks.d.ts +4 -2
- package/server/models/constructor-items/common.d.ts +3 -4
- package/server/models/constructor-items/sub-blocks.d.ts +1 -14
- package/server/models/constructor-items/sub-blocks.js +0 -1
- package/server/models/constructor.d.ts +0 -1
- package/server/text-transform/transformers.d.ts +0 -2
- package/server/text-transform/transformers.js +1 -4
- package/styles/styles.css +0 -12
- package/styles/yfm.scss +0 -14
- package/build/cjs/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.css +0 -12
- package/build/cjs/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.d.ts +0 -8
- package/build/cjs/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.js +0 -19
- package/build/cjs/containers/PageConstructor/components/ConstructorFootnotes/index.d.ts +0 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorFootnotes/index.js +0 -4
- package/build/cjs/sub-blocks/NewsCard/NewsCard.css +0 -18
- package/build/cjs/sub-blocks/NewsCard/NewsCard.d.ts +0 -3
- package/build/cjs/sub-blocks/NewsCard/NewsCard.js +0 -16
- package/build/cjs/sub-blocks/NewsCard/schema.d.ts +0 -23
- package/build/cjs/sub-blocks/NewsCard/schema.js +0 -20
- package/build/esm/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.css +0 -12
- package/build/esm/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.d.ts +0 -9
- package/build/esm/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.js +0 -15
- package/build/esm/containers/PageConstructor/components/ConstructorFootnotes/index.d.ts +0 -1
- package/build/esm/containers/PageConstructor/components/ConstructorFootnotes/index.js +0 -1
- package/build/esm/sub-blocks/NewsCard/NewsCard.css +0 -18
- package/build/esm/sub-blocks/NewsCard/NewsCard.d.ts +0 -4
- package/build/esm/sub-blocks/NewsCard/NewsCard.js +0 -14
- package/build/esm/sub-blocks/NewsCard/schema.d.ts +0 -23
- package/build/esm/sub-blocks/NewsCard/schema.js +0 -17
|
@@ -7,7 +7,6 @@ import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, Divi
|
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
10
|
-
NewsCard = "news-card",
|
|
11
10
|
/**
|
|
12
11
|
* @deprecated Will be removed
|
|
13
12
|
*/
|
|
@@ -68,15 +67,6 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
68
67
|
buttonText?: string;
|
|
69
68
|
theme?: TextTheme;
|
|
70
69
|
}
|
|
71
|
-
export interface NewsCardData {
|
|
72
|
-
id: number;
|
|
73
|
-
slug: string;
|
|
74
|
-
title: string;
|
|
75
|
-
date: string;
|
|
76
|
-
url: string;
|
|
77
|
-
isoDate?: string;
|
|
78
|
-
}
|
|
79
|
-
export type NewsCardProps = Pick<NewsCardData, 'title' | 'url' | 'date' | 'isoDate'> & CardBaseProps;
|
|
80
70
|
export interface BackgroundCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
81
71
|
url?: string;
|
|
82
72
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
@@ -112,9 +102,6 @@ export type DividerModel = {
|
|
|
112
102
|
export type QuoteModel = {
|
|
113
103
|
type: SubBlockType.Quote;
|
|
114
104
|
} & QuoteProps;
|
|
115
|
-
export type NewsCardModel = {
|
|
116
|
-
type: SubBlockType.NewsCard;
|
|
117
|
-
} & NewsCardProps;
|
|
118
105
|
export type LayoutItemModel = {
|
|
119
106
|
type: SubBlockType.LayoutItem;
|
|
120
107
|
} & LayoutItemProps;
|
|
@@ -136,5 +123,5 @@ export type BannerCardModel = {
|
|
|
136
123
|
export type BasicCardModel = {
|
|
137
124
|
type: SubBlockType.BasicCard;
|
|
138
125
|
} & BasicCardProps;
|
|
139
|
-
export type SubBlockModels = DividerModel | QuoteModel |
|
|
126
|
+
export type SubBlockModels = DividerModel | QuoteModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | LayoutItemModel;
|
|
140
127
|
export type SubBlock = SubBlockModels;
|
|
@@ -3,7 +3,6 @@ import { Lang } from '../utils/configure';
|
|
|
3
3
|
export type ContentTransformerProps = {
|
|
4
4
|
content: {
|
|
5
5
|
blocks?: ConstructorBlock[];
|
|
6
|
-
footnotes?: string[];
|
|
7
6
|
};
|
|
8
7
|
options: {
|
|
9
8
|
lang: Lang;
|
|
@@ -12,5 +11,4 @@ export type ContentTransformerProps = {
|
|
|
12
11
|
};
|
|
13
12
|
export declare const contentTransformer: ({ content, options }: ContentTransformerProps) => {
|
|
14
13
|
blocks: ConstructorBlock[];
|
|
15
|
-
footnotes: string[];
|
|
16
14
|
};
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.contentTransformer = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const config_1 = require("./config");
|
|
9
|
-
const utils_1 = require("./utils");
|
|
10
9
|
function transformBlocks(blocks, lang, customConfig = {}) {
|
|
11
10
|
const fullConfig = Object.assign(Object.assign({}, config_1.config), customConfig);
|
|
12
11
|
const clonedBlocks = lodash_1.default.cloneDeep(blocks);
|
|
@@ -52,12 +51,10 @@ function transformBlock(lang, blocksConfig, block) {
|
|
|
52
51
|
}
|
|
53
52
|
const contentTransformer = ({ content, options }) => {
|
|
54
53
|
const { lang, customConfig = {} } = options;
|
|
55
|
-
const { blocks = []
|
|
54
|
+
const { blocks = [] } = content;
|
|
56
55
|
const transformedBlocks = transformBlocks(blocks, lang, customConfig);
|
|
57
|
-
const transformedFootnotes = (footnotes === null || footnotes === void 0 ? void 0 : footnotes.map((footnote) => (0, utils_1.fullTransform)(footnote, { path: __dirname, lang, allowHTML: true }).html).filter(Boolean)) || [];
|
|
58
56
|
return {
|
|
59
57
|
blocks: transformedBlocks,
|
|
60
|
-
footnotes: transformedFootnotes,
|
|
61
58
|
};
|
|
62
59
|
};
|
|
63
60
|
exports.contentTransformer = contentTransformer;
|
package/styles/styles.css
CHANGED
|
@@ -245,18 +245,6 @@ unpredictable css rules order in build */
|
|
|
245
245
|
.yfm_constructor_theme_dark p {
|
|
246
246
|
color: var(--yc-color-text-light-primary);
|
|
247
247
|
}
|
|
248
|
-
.yfm_constructor_footnote_text p, .yfm_constructor_footnote_page p {
|
|
249
|
-
opacity: 0.5;
|
|
250
|
-
}
|
|
251
|
-
.yfm_constructor_footnote_text p {
|
|
252
|
-
font-size: var(--yc-text-body-2-font-size);
|
|
253
|
-
line-height: var(--yc-text-body-2-line-height);
|
|
254
|
-
}
|
|
255
|
-
.yfm_constructor_footnote_page p {
|
|
256
|
-
font-size: var(--yc-text-body-1-font-size);
|
|
257
|
-
line-height: var(--yc-text-body-1-line-height);
|
|
258
|
-
display: inline;
|
|
259
|
-
}
|
|
260
248
|
.yfm_constructor_list_style ul {
|
|
261
249
|
padding-left: 20px;
|
|
262
250
|
}
|
package/styles/yfm.scss
CHANGED
|
@@ -61,20 +61,6 @@
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
&_footnote_text p,
|
|
65
|
-
&_footnote_page p {
|
|
66
|
-
opacity: 0.5;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&_footnote_text p {
|
|
70
|
-
@include text-size(body-2);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&_footnote_page p {
|
|
74
|
-
@include text-size(body-1);
|
|
75
|
-
display: inline;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
64
|
&_list_style ul {
|
|
79
65
|
padding-left: $indentS;
|
|
80
66
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-constructor-footnotes {
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 32px 0 32px 16px;
|
|
6
|
-
font-size: var(--yc-text-body-1-font-size);
|
|
7
|
-
line-height: var(--yc-text-body-1-line-height);
|
|
8
|
-
color: var(--yc-color-text-hint);
|
|
9
|
-
}
|
|
10
|
-
.pc-constructor-footnotes__item + .pc-constructor-footnotes__item {
|
|
11
|
-
margin-top: 12px;
|
|
12
|
-
}
|
package/build/cjs/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConstructorFootnotes = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const components_1 = require("../../../../components");
|
|
7
|
-
const utils_1 = require("../../../../utils");
|
|
8
|
-
const b = (0, utils_1.block)('constructor-footnotes');
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated use Content block instead
|
|
11
|
-
*
|
|
12
|
-
* @return - JSX
|
|
13
|
-
*/
|
|
14
|
-
const ConstructorFootnotes = ({ items }) => (react_1.default.createElement("ol", { className: b() }, items.map((footnote, index) => (react_1.default.createElement("li", { className: b('item'), key: index },
|
|
15
|
-
react_1.default.createElement(components_1.YFMWrapper, { content: footnote, modifiers: {
|
|
16
|
-
constructor: true,
|
|
17
|
-
constructorFootnotePage: true,
|
|
18
|
-
} }))))));
|
|
19
|
-
exports.ConstructorFootnotes = ConstructorFootnotes;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConstructorFootnotes';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.pc-news-card__title {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* use this for style redefinitions to awoid problems with
|
|
6
|
-
unpredictable css rules order in build */
|
|
7
|
-
.pc-news-card__date {
|
|
8
|
-
display: block;
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
margin-bottom: 8px;
|
|
11
|
-
color: var(--yc-color-text-secondary);
|
|
12
|
-
}
|
|
13
|
-
.pc-news-card__title {
|
|
14
|
-
font-size: var(--yc-text-header-1-font-size);
|
|
15
|
-
line-height: var(--yc-text-header-1-line-height);
|
|
16
|
-
color: var(--pc-text-header-color);
|
|
17
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const components_1 = require("../../components");
|
|
6
|
-
const utils_1 = require("../../utils");
|
|
7
|
-
const b = (0, utils_1.block)('news-card');
|
|
8
|
-
const NewsCard = (props) => {
|
|
9
|
-
const { date, isoDate, title, border, url } = props;
|
|
10
|
-
return (react_1.default.createElement(components_1.CardBase, { className: b(), url: url, border: border },
|
|
11
|
-
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
12
|
-
isoDate ? (react_1.default.createElement("time", { className: b('date'), dateTime: isoDate }, date)) : (react_1.default.createElement("p", { className: b('date') }, date)),
|
|
13
|
-
react_1.default.createElement("h4", { className: b('title') },
|
|
14
|
-
react_1.default.createElement(components_1.HTML, null, title)))));
|
|
15
|
-
};
|
|
16
|
-
exports.default = NewsCard;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const NewsCard: {
|
|
2
|
-
'news-card': {
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
title: {
|
|
7
|
-
type: string;
|
|
8
|
-
contentType: string;
|
|
9
|
-
};
|
|
10
|
-
url: {
|
|
11
|
-
type: string;
|
|
12
|
-
};
|
|
13
|
-
date: {
|
|
14
|
-
type: string;
|
|
15
|
-
};
|
|
16
|
-
isoDate: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
type: {};
|
|
20
|
-
when: {};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NewsCard = void 0;
|
|
4
|
-
const common_1 = require("../../schema/validators/common");
|
|
5
|
-
exports.NewsCard = {
|
|
6
|
-
'news-card': {
|
|
7
|
-
additionalProperties: false,
|
|
8
|
-
required: ['title', 'url', 'date'],
|
|
9
|
-
properties: Object.assign(Object.assign({}, common_1.BaseProps), { title: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
contentType: 'text',
|
|
12
|
-
}, url: {
|
|
13
|
-
type: 'string',
|
|
14
|
-
}, date: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
}, isoDate: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
} }),
|
|
19
|
-
},
|
|
20
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-constructor-footnotes {
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 32px 0 32px 16px;
|
|
6
|
-
font-size: var(--yc-text-body-1-font-size);
|
|
7
|
-
line-height: var(--yc-text-body-1-line-height);
|
|
8
|
-
color: var(--yc-color-text-hint);
|
|
9
|
-
}
|
|
10
|
-
.pc-constructor-footnotes__item + .pc-constructor-footnotes__item {
|
|
11
|
-
margin-top: 12px;
|
|
12
|
-
}
|
package/build/esm/containers/PageConstructor/components/ConstructorFootnotes/ConstructorFootnotes.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { YFMWrapper } from '../../../../components';
|
|
3
|
-
import { block } from '../../../../utils';
|
|
4
|
-
import './ConstructorFootnotes.css';
|
|
5
|
-
const b = block('constructor-footnotes');
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated use Content block instead
|
|
8
|
-
*
|
|
9
|
-
* @return - JSX
|
|
10
|
-
*/
|
|
11
|
-
export const ConstructorFootnotes = ({ items }) => (React.createElement("ol", { className: b() }, items.map((footnote, index) => (React.createElement("li", { className: b('item'), key: index },
|
|
12
|
-
React.createElement(YFMWrapper, { content: footnote, modifiers: {
|
|
13
|
-
constructor: true,
|
|
14
|
-
constructorFootnotePage: true,
|
|
15
|
-
} }))))));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConstructorFootnotes';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConstructorFootnotes';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.pc-news-card__title {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* use this for style redefinitions to awoid problems with
|
|
6
|
-
unpredictable css rules order in build */
|
|
7
|
-
.pc-news-card__date {
|
|
8
|
-
display: block;
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
margin-bottom: 8px;
|
|
11
|
-
color: var(--yc-color-text-secondary);
|
|
12
|
-
}
|
|
13
|
-
.pc-news-card__title {
|
|
14
|
-
font-size: var(--yc-text-header-1-font-size);
|
|
15
|
-
line-height: var(--yc-text-header-1-line-height);
|
|
16
|
-
color: var(--pc-text-header-color);
|
|
17
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CardBase, HTML } from '../../components';
|
|
3
|
-
import { block } from '../../utils';
|
|
4
|
-
import './NewsCard.css';
|
|
5
|
-
const b = block('news-card');
|
|
6
|
-
const NewsCard = (props) => {
|
|
7
|
-
const { date, isoDate, title, border, url } = props;
|
|
8
|
-
return (React.createElement(CardBase, { className: b(), url: url, border: border },
|
|
9
|
-
React.createElement(CardBase.Content, null,
|
|
10
|
-
isoDate ? (React.createElement("time", { className: b('date'), dateTime: isoDate }, date)) : (React.createElement("p", { className: b('date') }, date)),
|
|
11
|
-
React.createElement("h4", { className: b('title') },
|
|
12
|
-
React.createElement(HTML, null, title)))));
|
|
13
|
-
};
|
|
14
|
-
export default NewsCard;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const NewsCard: {
|
|
2
|
-
'news-card': {
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
title: {
|
|
7
|
-
type: string;
|
|
8
|
-
contentType: string;
|
|
9
|
-
};
|
|
10
|
-
url: {
|
|
11
|
-
type: string;
|
|
12
|
-
};
|
|
13
|
-
date: {
|
|
14
|
-
type: string;
|
|
15
|
-
};
|
|
16
|
-
isoDate: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
type: {};
|
|
20
|
-
when: {};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseProps } from '../../schema/validators/common';
|
|
2
|
-
export const NewsCard = {
|
|
3
|
-
'news-card': {
|
|
4
|
-
additionalProperties: false,
|
|
5
|
-
required: ['title', 'url', 'date'],
|
|
6
|
-
properties: Object.assign(Object.assign({}, BaseProps), { title: {
|
|
7
|
-
type: 'string',
|
|
8
|
-
contentType: 'text',
|
|
9
|
-
}, url: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
}, date: {
|
|
12
|
-
type: 'string',
|
|
13
|
-
}, isoDate: {
|
|
14
|
-
type: 'string',
|
|
15
|
-
} }),
|
|
16
|
-
},
|
|
17
|
-
};
|