@gravity-ui/page-constructor 4.37.4 → 4.38.1
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/Tabs/Tabs.js +13 -7
- package/build/cjs/{sub-blocks/Content → components}/ContentList/ContentList.css +13 -0
- package/build/cjs/components/ContentList/ContentList.d.ts +4 -0
- package/build/cjs/{sub-blocks/Content → components}/ContentList/ContentList.js +8 -13
- package/build/cjs/components/ContentList/ContentListItemIcon.d.ts +7 -0
- package/build/cjs/components/ContentList/ContentListItemIcon.js +23 -0
- package/build/cjs/components/FileLink/FileLink.js +1 -1
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +7 -2
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +14 -2
- package/build/cjs/models/constructor-items/sub-blocks.js +1 -0
- package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
- package/build/cjs/schema/validators/sub-blocks.js +1 -0
- package/build/cjs/sub-blocks/Content/Content.js +2 -4
- package/build/cjs/sub-blocks/PriceCard/PriceCard.css +80 -0
- package/build/cjs/sub-blocks/PriceCard/PriceCard.d.ts +3 -0
- package/build/cjs/sub-blocks/PriceCard/PriceCard.js +33 -0
- package/build/cjs/sub-blocks/PriceCard/schema.d.ts +648 -0
- package/build/cjs/sub-blocks/PriceCard/schema.js +34 -0
- package/build/cjs/sub-blocks/index.d.ts +1 -0
- package/build/cjs/sub-blocks/index.js +3 -1
- package/build/cjs/text-transform/config.js +11 -0
- package/build/esm/blocks/Tabs/Tabs.js +13 -7
- package/build/esm/{sub-blocks/Content → components}/ContentList/ContentList.css +13 -0
- package/build/esm/components/ContentList/ContentList.d.ts +5 -0
- package/build/esm/{sub-blocks/Content → components}/ContentList/ContentList.js +6 -11
- package/build/esm/components/ContentList/ContentListItemIcon.d.ts +7 -0
- package/build/esm/components/ContentList/ContentListItemIcon.js +20 -0
- package/build/esm/components/FileLink/FileLink.js +1 -1
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +7 -2
- package/build/esm/models/constructor-items/sub-blocks.d.ts +14 -2
- package/build/esm/models/constructor-items/sub-blocks.js +1 -0
- package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
- package/build/esm/schema/validators/sub-blocks.js +1 -0
- package/build/esm/sub-blocks/Content/Content.js +1 -3
- package/build/esm/sub-blocks/PriceCard/PriceCard.css +80 -0
- package/build/esm/sub-blocks/PriceCard/PriceCard.d.ts +4 -0
- package/build/esm/sub-blocks/PriceCard/PriceCard.js +31 -0
- package/build/esm/sub-blocks/PriceCard/schema.d.ts +648 -0
- package/build/esm/sub-blocks/PriceCard/schema.js +31 -0
- package/build/esm/sub-blocks/index.d.ts +1 -0
- package/build/esm/sub-blocks/index.js +1 -0
- package/build/esm/text-transform/config.js +11 -0
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +7 -2
- package/server/models/constructor-items/sub-blocks.d.ts +14 -2
- package/server/models/constructor-items/sub-blocks.js +1 -0
- package/server/text-transform/config.js +11 -0
- package/widget/index.js +1 -1
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.d.ts +0 -8
- package/build/esm/sub-blocks/Content/ContentList/ContentList.d.ts +0 -9
|
@@ -301,4 +301,15 @@ export const config = {
|
|
|
301
301
|
[BlockType.CardLayoutBlock]: blockHeaderTransformer,
|
|
302
302
|
[BlockType.FilterBlock]: blockHeaderTransformer,
|
|
303
303
|
[BlockType.IconsBlock]: blockHeaderTransformer,
|
|
304
|
+
[SubBlockType.PriceCard]: [
|
|
305
|
+
{
|
|
306
|
+
fields: ['title'],
|
|
307
|
+
transformer: typografTransformer,
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
fields: ['list'],
|
|
311
|
+
transformer: yfmTransformer,
|
|
312
|
+
parser: createItemsParser(['text']),
|
|
313
|
+
},
|
|
314
|
+
],
|
|
304
315
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { ButtonSize } from '@gravity-ui/uikit';
|
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
|
-
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
|
|
6
|
+
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
|
|
7
7
|
import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
8
8
|
export declare enum BlockType {
|
|
9
9
|
PromoFeaturesBlock = "promo-features-block",
|
|
@@ -270,10 +270,15 @@ export interface ContentLayoutBlockProps extends ContentLayoutBlockParams {
|
|
|
270
270
|
textContent: ContentBlockProps;
|
|
271
271
|
fileContent?: FileLinkProps[];
|
|
272
272
|
}
|
|
273
|
+
export type SVGIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
273
274
|
export interface ContentItemProps {
|
|
274
275
|
title?: string;
|
|
275
276
|
text?: string;
|
|
276
|
-
icon:
|
|
277
|
+
icon: ThemeSupporting<ImageProps | SVGIcon>;
|
|
278
|
+
}
|
|
279
|
+
export interface ContentListProps {
|
|
280
|
+
list: ContentItemProps[];
|
|
281
|
+
size: ContentSize;
|
|
277
282
|
}
|
|
278
283
|
export interface ContentBlockProps {
|
|
279
284
|
title?: TitleItemBaseProps | string;
|
|
@@ -3,7 +3,7 @@ import { ThemeSupporting } from '../../utils';
|
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
4
|
import { AnalyticsEventsBase, PixelEvent } from '../common';
|
|
5
5
|
import { ContentBlockProps } from './blocks';
|
|
6
|
-
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
6
|
+
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
@@ -21,7 +21,8 @@ export declare enum SubBlockType {
|
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Will be removed, use BasicCard instead
|
|
23
23
|
*/
|
|
24
|
-
Card = "card"
|
|
24
|
+
Card = "card",
|
|
25
|
+
PriceCard = "price-card"
|
|
25
26
|
}
|
|
26
27
|
export declare enum IconPosition {
|
|
27
28
|
Top = "top",
|
|
@@ -98,6 +99,17 @@ export interface BannerCardProps {
|
|
|
98
99
|
}
|
|
99
100
|
export interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {
|
|
100
101
|
}
|
|
102
|
+
export interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {
|
|
103
|
+
title: string;
|
|
104
|
+
price: string;
|
|
105
|
+
pricePeriod?: string;
|
|
106
|
+
priceDetails?: string;
|
|
107
|
+
description?: string;
|
|
108
|
+
buttons?: ButtonProps[];
|
|
109
|
+
links?: LinkProps[];
|
|
110
|
+
backgroundColor?: string;
|
|
111
|
+
list?: string[];
|
|
112
|
+
}
|
|
101
113
|
export interface LayoutItemProps extends ClassNameProps, AnalyticsEventsBase {
|
|
102
114
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
103
115
|
media: MediaProps;
|
|
@@ -20,6 +20,7 @@ var SubBlockType;
|
|
|
20
20
|
* @deprecated Will be removed, use BasicCard instead
|
|
21
21
|
*/
|
|
22
22
|
SubBlockType["Card"] = "card";
|
|
23
|
+
SubBlockType["PriceCard"] = "price-card";
|
|
23
24
|
})(SubBlockType = exports.SubBlockType || (exports.SubBlockType = {}));
|
|
24
25
|
var IconPosition;
|
|
25
26
|
(function (IconPosition) {
|
|
@@ -314,4 +314,15 @@ exports.config = {
|
|
|
314
314
|
[models_1.BlockType.CardLayoutBlock]: exports.blockHeaderTransformer,
|
|
315
315
|
[models_1.BlockType.FilterBlock]: exports.blockHeaderTransformer,
|
|
316
316
|
[models_1.BlockType.IconsBlock]: exports.blockHeaderTransformer,
|
|
317
|
+
[models_1.SubBlockType.PriceCard]: [
|
|
318
|
+
{
|
|
319
|
+
fields: ['title'],
|
|
320
|
+
transformer: common_1.typografTransformer,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
fields: ['list'],
|
|
324
|
+
transformer: common_1.yfmTransformer,
|
|
325
|
+
parser: (0, common_1.createItemsParser)(['text']),
|
|
326
|
+
},
|
|
327
|
+
],
|
|
317
328
|
};
|