@gravity-ui/page-constructor 1.9.3 → 1.10.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/CHANGELOG.md +7 -0
- package/build/cjs/{components → blocks}/Share/Share.css +0 -0
- package/build/cjs/blocks/Share/Share.d.ts +3 -0
- package/build/cjs/{components → blocks}/Share/Share.js +0 -0
- package/build/cjs/{components → blocks}/Share/i18n/en.json +0 -0
- package/build/cjs/{components → blocks}/Share/i18n/index.d.ts +0 -0
- package/build/cjs/{components → blocks}/Share/i18n/index.js +0 -0
- package/build/cjs/{components → blocks}/Share/i18n/ru.json +0 -0
- package/build/cjs/blocks/Share/schema.d.ts +24 -0
- package/build/cjs/blocks/Share/schema.js +19 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/blocks/validators.d.ts +1 -0
- package/build/cjs/blocks/validators.js +1 -0
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/models/components.d.ts +0 -6
- package/build/cjs/models/components.js +0 -8
- package/build/cjs/models/constructor-items/blocks.d.ts +16 -2
- package/build/cjs/models/constructor-items/blocks.js +9 -1
- package/build/cjs/schema/index.js +1 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/text-transform/blocks.js +6 -0
- package/build/esm/{components → blocks}/Share/Share.css +0 -0
- package/build/esm/blocks/Share/Share.d.ts +4 -0
- package/build/esm/{components → blocks}/Share/Share.js +0 -0
- package/build/esm/{components → blocks}/Share/i18n/en.json +0 -0
- package/build/esm/{components → blocks}/Share/i18n/index.d.ts +0 -0
- package/build/esm/{components → blocks}/Share/i18n/index.js +0 -0
- package/build/esm/{components → blocks}/Share/i18n/ru.json +0 -0
- package/build/esm/blocks/Share/schema.d.ts +24 -0
- package/build/esm/blocks/Share/schema.js +16 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/blocks/validators.d.ts +1 -0
- package/build/esm/blocks/validators.js +1 -0
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/models/components.d.ts +0 -6
- package/build/esm/models/components.js +1 -7
- package/build/esm/models/constructor-items/blocks.d.ts +16 -2
- package/build/esm/models/constructor-items/blocks.js +8 -0
- package/build/esm/schema/index.js +2 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/text-transform/blocks.js +6 -0
- package/package.json +1 -1
- package/server/models/components.d.ts +0 -6
- package/server/models/components.js +0 -8
- package/server/models/constructor-items/blocks.d.ts +16 -2
- package/server/models/constructor-items/blocks.js +9 -1
- package/server/text-transform/blocks.js +6 -0
- package/build/cjs/components/Share/Share.d.ts +0 -7
- package/build/esm/components/Share/Share.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.10.0](https://github.com/gravity-ui/page-constructor/compare/v1.9.3...v1.10.0) (2022-12-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **Share:** create block ([#79](https://github.com/gravity-ui/page-constructor/issues/79)) ([bf950c8](https://github.com/gravity-ui/page-constructor/commit/bf950c88a3a885138a1db3f1214b56011971cd8b))
|
|
9
|
+
|
|
3
10
|
## [1.9.3](https://github.com/gravity-ui/page-constructor/compare/v1.9.2...v1.9.3) (2022-12-07)
|
|
4
11
|
|
|
5
12
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ShareBlock: {
|
|
2
|
+
'share-block': {
|
|
3
|
+
additionalProperties: boolean;
|
|
4
|
+
required: string[];
|
|
5
|
+
properties: {
|
|
6
|
+
title: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
items: {
|
|
10
|
+
type: string;
|
|
11
|
+
items: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: {
|
|
14
|
+
when: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
type: {};
|
|
21
|
+
when: {};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShareBlock = void 0;
|
|
4
|
+
const utils_1 = require("../../schema/validators/utils");
|
|
5
|
+
const common_1 = require("../../schema/validators/common");
|
|
6
|
+
exports.ShareBlock = {
|
|
7
|
+
'share-block': {
|
|
8
|
+
additionalProperties: false,
|
|
9
|
+
required: ['items'],
|
|
10
|
+
properties: Object.assign(Object.assign({}, common_1.BaseProps), { title: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
}, items: (0, utils_1.filteredArray)({
|
|
13
|
+
properties: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
enum: ['telegram', 'facebook', 'twitter', 'vk'],
|
|
16
|
+
},
|
|
17
|
+
}) }),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -17,3 +17,4 @@ export { default as IconsBlock } from './Icons/Icons';
|
|
|
17
17
|
export { default as HeaderSliderBlock } from './HeaderSlider/HeaderSlider';
|
|
18
18
|
export { default as CardLayoutBlock } from './CardLayout/CardLayout';
|
|
19
19
|
export { default as ContentLayoutBlock } from './ContentLayout/ContentLayout';
|
|
20
|
+
export { default as ShareBlock } from './Share/Share';
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ContentLayoutBlock = exports.CardLayoutBlock = exports.HeaderSliderBlock = exports.IconsBlock = exports.HeaderBlock = exports.LinkTableBlock = exports.TabsBlock = exports.TableBlock = exports.QuestionsBlock = exports.PromoFeaturesBlock = exports.ExtendedFeaturesBlock = exports.SliderBlock = exports.SecurityBlock = exports.PreviewBlock = exports.MediaBlock = exports.InfoBlock = exports.SimpleBlock = exports.CompaniesBlock = exports.BannerBlock = void 0;
|
|
6
|
+
exports.ShareBlock = exports.ContentLayoutBlock = exports.CardLayoutBlock = exports.HeaderSliderBlock = exports.IconsBlock = exports.HeaderBlock = exports.LinkTableBlock = exports.TabsBlock = exports.TableBlock = exports.QuestionsBlock = exports.PromoFeaturesBlock = exports.ExtendedFeaturesBlock = exports.SliderBlock = exports.SecurityBlock = exports.PreviewBlock = exports.MediaBlock = exports.InfoBlock = exports.SimpleBlock = exports.CompaniesBlock = exports.BannerBlock = void 0;
|
|
7
7
|
var Banner_1 = require("./Banner/Banner");
|
|
8
8
|
Object.defineProperty(exports, "BannerBlock", { enumerable: true, get: function () { return __importDefault(Banner_1).default; } });
|
|
9
9
|
var Companies_1 = require("./Companies/Companies");
|
|
@@ -42,3 +42,5 @@ var CardLayout_1 = require("./CardLayout/CardLayout");
|
|
|
42
42
|
Object.defineProperty(exports, "CardLayoutBlock", { enumerable: true, get: function () { return __importDefault(CardLayout_1).default; } });
|
|
43
43
|
var ContentLayout_1 = require("./ContentLayout/ContentLayout");
|
|
44
44
|
Object.defineProperty(exports, "ContentLayoutBlock", { enumerable: true, get: function () { return __importDefault(ContentLayout_1).default; } });
|
|
45
|
+
var Share_1 = require("./Share/Share");
|
|
46
|
+
Object.defineProperty(exports, "ShareBlock", { enumerable: true, get: function () { return __importDefault(Share_1).default; } });
|
|
@@ -19,3 +19,4 @@ const tslib_1 = require("tslib");
|
|
|
19
19
|
(0, tslib_1.__exportStar)(require("./Simple/schema"), exports);
|
|
20
20
|
(0, tslib_1.__exportStar)(require("./Slider/schema"), exports);
|
|
21
21
|
(0, tslib_1.__exportStar)(require("./Table/schema"), exports);
|
|
22
|
+
(0, tslib_1.__exportStar)(require("./Share/schema"), exports);
|
|
@@ -18,6 +18,7 @@ export declare const blockMap: {
|
|
|
18
18
|
"header-slider-block": ({ items, arrows, ...props }: import("./models").HeaderSliderBlockProps) => JSX.Element;
|
|
19
19
|
"card-layout-block": ({ title, description, animated, colSizes, children, }: import("./blocks/CardLayout/CardLayout").CardLayoutBlockProps) => JSX.Element;
|
|
20
20
|
"content-layout-block": (props: import("./models").ContentLayoutBlockProps) => JSX.Element;
|
|
21
|
+
"share-block": ({ items, title }: import("./models").ShareBlockProps) => JSX.Element;
|
|
21
22
|
};
|
|
22
23
|
export declare const subBlockMap: {
|
|
23
24
|
divider: ({ size, border }: import("./models").DividerProps) => JSX.Element;
|
|
@@ -24,6 +24,7 @@ exports.blockMap = {
|
|
|
24
24
|
[models_1.BlockType.HeaderSliderBlock]: blocks_1.HeaderSliderBlock,
|
|
25
25
|
[models_1.BlockType.CardLayoutBlock]: blocks_1.CardLayoutBlock,
|
|
26
26
|
[models_1.BlockType.ContentLayoutBlock]: blocks_1.ContentLayoutBlock,
|
|
27
|
+
[models_1.BlockType.ShareBlock]: blocks_1.ShareBlock,
|
|
27
28
|
};
|
|
28
29
|
exports.subBlockMap = {
|
|
29
30
|
[models_1.SubBlockType.Divider]: sub_blocks_1.Divider,
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PCShareSocialNetwork = void 0;
|
|
4
|
-
var PCShareSocialNetwork;
|
|
5
|
-
(function (PCShareSocialNetwork) {
|
|
6
|
-
PCShareSocialNetwork["Vk"] = "vk";
|
|
7
|
-
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
8
|
-
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
9
|
-
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
10
|
-
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
@@ -24,7 +24,8 @@ export declare enum BlockType {
|
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
25
|
IconsBlock = "icons-block",
|
|
26
26
|
CardLayoutBlock = "card-layout-block",
|
|
27
|
-
ContentLayoutBlock = "content-layout-block"
|
|
27
|
+
ContentLayoutBlock = "content-layout-block",
|
|
28
|
+
ShareBlock = "share-block"
|
|
28
29
|
}
|
|
29
30
|
export declare const BlockTypes: BlockType[];
|
|
30
31
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -275,6 +276,16 @@ export interface ContentBlockProps {
|
|
|
275
276
|
centered?: boolean;
|
|
276
277
|
theme?: ContentTheme;
|
|
277
278
|
}
|
|
279
|
+
export declare enum PCShareSocialNetwork {
|
|
280
|
+
Vk = "vk",
|
|
281
|
+
Telegram = "telegram",
|
|
282
|
+
Twitter = "twitter",
|
|
283
|
+
Facebook = "facebook"
|
|
284
|
+
}
|
|
285
|
+
export interface ShareBlockProps {
|
|
286
|
+
items: PCShareSocialNetwork[];
|
|
287
|
+
title?: string;
|
|
288
|
+
}
|
|
278
289
|
export declare type HeaderBlockModel = {
|
|
279
290
|
type: BlockType.HeaderBlock;
|
|
280
291
|
} & HeaderBlockProps;
|
|
@@ -338,6 +349,9 @@ export declare type HeaderSliderBlockModel = {
|
|
|
338
349
|
export declare type ContentLayoutBlockModel = {
|
|
339
350
|
type: BlockType.ContentLayoutBlock;
|
|
340
351
|
} & ContentLayoutBlockProps;
|
|
341
|
-
declare type
|
|
352
|
+
export declare type ShareBLockModel = {
|
|
353
|
+
type: BlockType.ShareBlock;
|
|
354
|
+
} & ShareBlockProps;
|
|
355
|
+
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
342
356
|
export declare type Block = BlockModels & BlockBaseProps;
|
|
343
357
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
3
|
+
exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
4
4
|
var BlockType;
|
|
5
5
|
(function (BlockType) {
|
|
6
6
|
BlockType["PromoFeaturesBlock"] = "promo-features-block";
|
|
@@ -24,6 +24,7 @@ var BlockType;
|
|
|
24
24
|
BlockType["IconsBlock"] = "icons-block";
|
|
25
25
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
26
26
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
27
|
+
BlockType["ShareBlock"] = "share-block";
|
|
27
28
|
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
|
28
29
|
exports.BlockTypes = Object.values(BlockType);
|
|
29
30
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -39,3 +40,10 @@ var SliderType;
|
|
|
39
40
|
SliderType["MediaCard"] = "media-card";
|
|
40
41
|
SliderType["HeaderCard"] = "header-card";
|
|
41
42
|
})(SliderType = exports.SliderType || (exports.SliderType = {}));
|
|
43
|
+
var PCShareSocialNetwork;
|
|
44
|
+
(function (PCShareSocialNetwork) {
|
|
45
|
+
PCShareSocialNetwork["Vk"] = "vk";
|
|
46
|
+
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
47
|
+
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
48
|
+
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
49
|
+
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
@@ -53,7 +53,7 @@ function generateDefaultSchema(config) {
|
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
select: { $data: '0/type' },
|
|
56
|
-
selectCases: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, blocks_1.TabsBlock), blocks_1.SliderBlock), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.HeaderBlock), blocks_1.BannerBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.InfoBlock), blocks_1.QuestionsBlock), blocks_1.SecurityBlock), blocks_1.TableBlock), blocks_1.SimpleBlock), blocks_1.LinkTableBlock), blocks_1.PreviewBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), sub_blocks_1.Divider), (0, exports.getBlocksCases)(blocks)),
|
|
56
|
+
selectCases: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, blocks_1.TabsBlock), blocks_1.SliderBlock), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.HeaderBlock), blocks_1.BannerBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.InfoBlock), blocks_1.QuestionsBlock), blocks_1.SecurityBlock), blocks_1.TableBlock), blocks_1.SimpleBlock), blocks_1.LinkTableBlock), blocks_1.PreviewBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), sub_blocks_1.Divider), blocks_1.ShareBlock), (0, exports.getBlocksCases)(blocks)),
|
|
57
57
|
}),
|
|
58
58
|
cards: (0, utils_1.filteredItem)({
|
|
59
59
|
type: 'object',
|
|
@@ -20,3 +20,4 @@ const tslib_1 = require("tslib");
|
|
|
20
20
|
(0, tslib_1.__exportStar)(require("../../blocks/Icons/schema"), exports);
|
|
21
21
|
(0, tslib_1.__exportStar)(require("../../blocks/CardLayout/schema"), exports);
|
|
22
22
|
(0, tslib_1.__exportStar)(require("../../blocks/ContentLayout/schema"), exports);
|
|
23
|
+
(0, tslib_1.__exportStar)(require("../../blocks/Share/schema"), exports);
|
|
@@ -314,6 +314,12 @@ const config = {
|
|
|
314
314
|
parser: parseContentLayoutTitle,
|
|
315
315
|
},
|
|
316
316
|
],
|
|
317
|
+
[models_1.BlockType.ShareBlock]: [
|
|
318
|
+
{
|
|
319
|
+
fields: ['title'],
|
|
320
|
+
transformer: typografTransformer,
|
|
321
|
+
},
|
|
322
|
+
],
|
|
317
323
|
};
|
|
318
324
|
function addRandomOrder(block) {
|
|
319
325
|
if (block) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ShareBlock: {
|
|
2
|
+
'share-block': {
|
|
3
|
+
additionalProperties: boolean;
|
|
4
|
+
required: string[];
|
|
5
|
+
properties: {
|
|
6
|
+
title: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
items: {
|
|
10
|
+
type: string;
|
|
11
|
+
items: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: {
|
|
14
|
+
when: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
type: {};
|
|
21
|
+
when: {};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { filteredArray } from '../../schema/validators/utils';
|
|
2
|
+
import { BaseProps } from '../../schema/validators/common';
|
|
3
|
+
export const ShareBlock = {
|
|
4
|
+
'share-block': {
|
|
5
|
+
additionalProperties: false,
|
|
6
|
+
required: ['items'],
|
|
7
|
+
properties: Object.assign(Object.assign({}, BaseProps), { title: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
}, items: filteredArray({
|
|
10
|
+
properties: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
enum: ['telegram', 'facebook', 'twitter', 'vk'],
|
|
13
|
+
},
|
|
14
|
+
}) }),
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -17,3 +17,4 @@ export { default as IconsBlock } from './Icons/Icons';
|
|
|
17
17
|
export { default as HeaderSliderBlock } from './HeaderSlider/HeaderSlider';
|
|
18
18
|
export { default as CardLayoutBlock } from './CardLayout/CardLayout';
|
|
19
19
|
export { default as ContentLayoutBlock } from './ContentLayout/ContentLayout';
|
|
20
|
+
export { default as ShareBlock } from './Share/Share';
|
|
@@ -17,3 +17,4 @@ export { default as IconsBlock } from './Icons/Icons';
|
|
|
17
17
|
export { default as HeaderSliderBlock } from './HeaderSlider/HeaderSlider';
|
|
18
18
|
export { default as CardLayoutBlock } from './CardLayout/CardLayout';
|
|
19
19
|
export { default as ContentLayoutBlock } from './ContentLayout/ContentLayout';
|
|
20
|
+
export { default as ShareBlock } from './Share/Share';
|
|
@@ -18,6 +18,7 @@ export declare const blockMap: {
|
|
|
18
18
|
"header-slider-block": ({ items, arrows, ...props }: import("./models").HeaderSliderBlockProps) => JSX.Element;
|
|
19
19
|
"card-layout-block": ({ title, description, animated, colSizes, children, }: import("./blocks/CardLayout/CardLayout").CardLayoutBlockProps) => JSX.Element;
|
|
20
20
|
"content-layout-block": (props: import("./models").ContentLayoutBlockProps) => JSX.Element;
|
|
21
|
+
"share-block": ({ items, title }: import("./models").ShareBlockProps) => JSX.Element;
|
|
21
22
|
};
|
|
22
23
|
export declare const subBlockMap: {
|
|
23
24
|
divider: ({ size, border }: import("./models").DividerProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockType, SubBlockType } from './models';
|
|
2
2
|
import { Partner, PriceDetailed, MediaCard, NewsCard, TutorialCard, CardWithImage, BackgroundCard, Content, Quote, Divider, BannerCard, BasicCard, } from './sub-blocks';
|
|
3
|
-
import { BannerBlock, CompaniesBlock, SimpleBlock, MediaBlock, PreviewBlock, InfoBlock, SecurityBlock, SliderBlock, ExtendedFeaturesBlock, PromoFeaturesBlock, QuestionsBlock, TableBlock, TabsBlock, LinkTableBlock, HeaderBlock, IconsBlock, HeaderSliderBlock, CardLayoutBlock, ContentLayoutBlock, } from './blocks';
|
|
3
|
+
import { BannerBlock, CompaniesBlock, SimpleBlock, MediaBlock, PreviewBlock, InfoBlock, SecurityBlock, SliderBlock, ExtendedFeaturesBlock, PromoFeaturesBlock, QuestionsBlock, TableBlock, TabsBlock, LinkTableBlock, HeaderBlock, IconsBlock, HeaderSliderBlock, CardLayoutBlock, ContentLayoutBlock, ShareBlock, } from './blocks';
|
|
4
4
|
export const blockMap = {
|
|
5
5
|
[BlockType.SliderBlock]: SliderBlock,
|
|
6
6
|
[BlockType.SimpleBlock]: SimpleBlock,
|
|
@@ -21,6 +21,7 @@ export const blockMap = {
|
|
|
21
21
|
[BlockType.HeaderSliderBlock]: HeaderSliderBlock,
|
|
22
22
|
[BlockType.CardLayoutBlock]: CardLayoutBlock,
|
|
23
23
|
[BlockType.ContentLayoutBlock]: ContentLayoutBlock,
|
|
24
|
+
[BlockType.ShareBlock]: ShareBlock,
|
|
24
25
|
};
|
|
25
26
|
export const subBlockMap = {
|
|
26
27
|
[SubBlockType.Divider]: Divider,
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (PCShareSocialNetwork) {
|
|
3
|
-
PCShareSocialNetwork["Vk"] = "vk";
|
|
4
|
-
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
5
|
-
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
6
|
-
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
7
|
-
})(PCShareSocialNetwork || (PCShareSocialNetwork = {}));
|
|
1
|
+
export {};
|
|
@@ -24,7 +24,8 @@ export declare enum BlockType {
|
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
25
|
IconsBlock = "icons-block",
|
|
26
26
|
CardLayoutBlock = "card-layout-block",
|
|
27
|
-
ContentLayoutBlock = "content-layout-block"
|
|
27
|
+
ContentLayoutBlock = "content-layout-block",
|
|
28
|
+
ShareBlock = "share-block"
|
|
28
29
|
}
|
|
29
30
|
export declare const BlockTypes: BlockType[];
|
|
30
31
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -275,6 +276,16 @@ export interface ContentBlockProps {
|
|
|
275
276
|
centered?: boolean;
|
|
276
277
|
theme?: ContentTheme;
|
|
277
278
|
}
|
|
279
|
+
export declare enum PCShareSocialNetwork {
|
|
280
|
+
Vk = "vk",
|
|
281
|
+
Telegram = "telegram",
|
|
282
|
+
Twitter = "twitter",
|
|
283
|
+
Facebook = "facebook"
|
|
284
|
+
}
|
|
285
|
+
export interface ShareBlockProps {
|
|
286
|
+
items: PCShareSocialNetwork[];
|
|
287
|
+
title?: string;
|
|
288
|
+
}
|
|
278
289
|
export declare type HeaderBlockModel = {
|
|
279
290
|
type: BlockType.HeaderBlock;
|
|
280
291
|
} & HeaderBlockProps;
|
|
@@ -338,6 +349,9 @@ export declare type HeaderSliderBlockModel = {
|
|
|
338
349
|
export declare type ContentLayoutBlockModel = {
|
|
339
350
|
type: BlockType.ContentLayoutBlock;
|
|
340
351
|
} & ContentLayoutBlockProps;
|
|
341
|
-
declare type
|
|
352
|
+
export declare type ShareBLockModel = {
|
|
353
|
+
type: BlockType.ShareBlock;
|
|
354
|
+
} & ShareBlockProps;
|
|
355
|
+
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
342
356
|
export declare type Block = BlockModels & BlockBaseProps;
|
|
343
357
|
export {};
|
|
@@ -21,6 +21,7 @@ export var BlockType;
|
|
|
21
21
|
BlockType["IconsBlock"] = "icons-block";
|
|
22
22
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
23
23
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
24
|
+
BlockType["ShareBlock"] = "share-block";
|
|
24
25
|
})(BlockType || (BlockType = {}));
|
|
25
26
|
export const BlockTypes = Object.values(BlockType);
|
|
26
27
|
export const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -36,3 +37,10 @@ export var SliderType;
|
|
|
36
37
|
SliderType["MediaCard"] = "media-card";
|
|
37
38
|
SliderType["HeaderCard"] = "header-card";
|
|
38
39
|
})(SliderType || (SliderType = {}));
|
|
40
|
+
export var PCShareSocialNetwork;
|
|
41
|
+
(function (PCShareSocialNetwork) {
|
|
42
|
+
PCShareSocialNetwork["Vk"] = "vk";
|
|
43
|
+
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
44
|
+
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
45
|
+
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
46
|
+
})(PCShareSocialNetwork || (PCShareSocialNetwork = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { validators } from './validators';
|
|
2
|
-
import { TabsBlock, BannerCard, SliderBlock, ExtendedFeaturesBlock, HeaderBlock, BannerBlock, CompaniesBlock, MediaBlock, InfoBlock, QuestionsBlock, SecurityBlock, TableBlock, SimpleBlock, LinkTableBlock, PromoFeaturesBlock, PreviewBlock, ContentLayoutBlock, HeaderSliderBlock, IconsBlock, CardLayoutBlock, } from './validators/blocks';
|
|
2
|
+
import { TabsBlock, BannerCard, SliderBlock, ExtendedFeaturesBlock, HeaderBlock, BannerBlock, CompaniesBlock, MediaBlock, InfoBlock, QuestionsBlock, SecurityBlock, TableBlock, SimpleBlock, LinkTableBlock, PromoFeaturesBlock, PreviewBlock, ContentLayoutBlock, HeaderSliderBlock, IconsBlock, CardLayoutBlock, ShareBlock, } from './validators/blocks';
|
|
3
3
|
import { PartnerBlock, MediaCardBlock, TutorialCard, BackgroundCard, NewsCard, CardWithImage, PriceDetailedBlock, Quote, Divider, } from './validators/sub-blocks';
|
|
4
4
|
import { AnimatableProps, BackgroundProps, MenuProps, withTheme } from './validators/common';
|
|
5
5
|
import { filteredItem } from './validators/utils';
|
|
@@ -48,7 +48,7 @@ export function generateDefaultSchema(config) {
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
select: { $data: '0/type' },
|
|
51
|
-
selectCases: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, TabsBlock), SliderBlock), ExtendedFeaturesBlock), PromoFeaturesBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), InfoBlock), QuestionsBlock), SecurityBlock), TableBlock), SimpleBlock), LinkTableBlock), PreviewBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), Divider), getBlocksCases(blocks)),
|
|
51
|
+
selectCases: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, TabsBlock), SliderBlock), ExtendedFeaturesBlock), PromoFeaturesBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), InfoBlock), QuestionsBlock), SecurityBlock), TableBlock), SimpleBlock), LinkTableBlock), PreviewBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), Divider), ShareBlock), getBlocksCases(blocks)),
|
|
52
52
|
}),
|
|
53
53
|
cards: filteredItem({
|
|
54
54
|
type: 'object',
|
package/package.json
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PCShareSocialNetwork = void 0;
|
|
4
|
-
var PCShareSocialNetwork;
|
|
5
|
-
(function (PCShareSocialNetwork) {
|
|
6
|
-
PCShareSocialNetwork["Vk"] = "vk";
|
|
7
|
-
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
8
|
-
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
9
|
-
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
10
|
-
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
@@ -24,7 +24,8 @@ export declare enum BlockType {
|
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
25
|
IconsBlock = "icons-block",
|
|
26
26
|
CardLayoutBlock = "card-layout-block",
|
|
27
|
-
ContentLayoutBlock = "content-layout-block"
|
|
27
|
+
ContentLayoutBlock = "content-layout-block",
|
|
28
|
+
ShareBlock = "share-block"
|
|
28
29
|
}
|
|
29
30
|
export declare const BlockTypes: BlockType[];
|
|
30
31
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -275,6 +276,16 @@ export interface ContentBlockProps {
|
|
|
275
276
|
centered?: boolean;
|
|
276
277
|
theme?: ContentTheme;
|
|
277
278
|
}
|
|
279
|
+
export declare enum PCShareSocialNetwork {
|
|
280
|
+
Vk = "vk",
|
|
281
|
+
Telegram = "telegram",
|
|
282
|
+
Twitter = "twitter",
|
|
283
|
+
Facebook = "facebook"
|
|
284
|
+
}
|
|
285
|
+
export interface ShareBlockProps {
|
|
286
|
+
items: PCShareSocialNetwork[];
|
|
287
|
+
title?: string;
|
|
288
|
+
}
|
|
278
289
|
export declare type HeaderBlockModel = {
|
|
279
290
|
type: BlockType.HeaderBlock;
|
|
280
291
|
} & HeaderBlockProps;
|
|
@@ -338,6 +349,9 @@ export declare type HeaderSliderBlockModel = {
|
|
|
338
349
|
export declare type ContentLayoutBlockModel = {
|
|
339
350
|
type: BlockType.ContentLayoutBlock;
|
|
340
351
|
} & ContentLayoutBlockProps;
|
|
341
|
-
declare type
|
|
352
|
+
export declare type ShareBLockModel = {
|
|
353
|
+
type: BlockType.ShareBlock;
|
|
354
|
+
} & ShareBlockProps;
|
|
355
|
+
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
342
356
|
export declare type Block = BlockModels & BlockBaseProps;
|
|
343
357
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
3
|
+
exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
4
4
|
var BlockType;
|
|
5
5
|
(function (BlockType) {
|
|
6
6
|
BlockType["PromoFeaturesBlock"] = "promo-features-block";
|
|
@@ -24,6 +24,7 @@ var BlockType;
|
|
|
24
24
|
BlockType["IconsBlock"] = "icons-block";
|
|
25
25
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
26
26
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
27
|
+
BlockType["ShareBlock"] = "share-block";
|
|
27
28
|
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
|
28
29
|
exports.BlockTypes = Object.values(BlockType);
|
|
29
30
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -39,3 +40,10 @@ var SliderType;
|
|
|
39
40
|
SliderType["MediaCard"] = "media-card";
|
|
40
41
|
SliderType["HeaderCard"] = "header-card";
|
|
41
42
|
})(SliderType = exports.SliderType || (exports.SliderType = {}));
|
|
43
|
+
var PCShareSocialNetwork;
|
|
44
|
+
(function (PCShareSocialNetwork) {
|
|
45
|
+
PCShareSocialNetwork["Vk"] = "vk";
|
|
46
|
+
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
47
|
+
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
48
|
+
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
49
|
+
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
@@ -327,6 +327,12 @@ const config = {
|
|
|
327
327
|
parser: parseContentLayoutTitle,
|
|
328
328
|
},
|
|
329
329
|
],
|
|
330
|
+
[models_1.BlockType.ShareBlock]: [
|
|
331
|
+
{
|
|
332
|
+
fields: ['title'],
|
|
333
|
+
transformer: typografTransformer,
|
|
334
|
+
},
|
|
335
|
+
],
|
|
330
336
|
};
|
|
331
337
|
function addRandomOrder(block) {
|
|
332
338
|
if (block) {
|