@gravity-ui/page-constructor 2.18.0 → 3.0.0-alpha.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 +0 -19
- package/build/cjs/blocks/index.d.ts +0 -4
- package/build/cjs/blocks/index.js +1 -9
- package/build/cjs/blocks/validators.d.ts +0 -4
- package/build/cjs/blocks/validators.js +0 -4
- package/build/cjs/components/Anchor/Anchor.d.ts +2 -2
- package/build/cjs/components/Anchor/Anchor.js +1 -1
- package/build/cjs/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
- package/build/cjs/components/Anchor/__tests__/Anchor.test.js +21 -0
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.js +36 -0
- package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
- package/build/cjs/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
- package/build/cjs/components/BackLink/__tests__/BackLink.test.js +63 -0
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.js +44 -0
- package/build/cjs/components/Button/__tests__/Button.test.d.ts +1 -0
- package/build/cjs/components/Button/__tests__/Button.test.js +91 -0
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.js +58 -0
- package/build/cjs/components/index.d.ts +0 -1
- package/build/cjs/components/index.js +1 -3
- package/build/cjs/constructor-items.d.ts +0 -16
- package/build/cjs/constructor-items.js +0 -16
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/hooks/index.d.ts +1 -1
- package/build/cjs/hooks/index.js +3 -3
- package/build/cjs/internal-typings/global.d.ts +16 -18
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -50
- package/build/cjs/models/constructor-items/blocks.js +0 -4
- package/build/cjs/models/constructor-items/common.d.ts +0 -14
- package/build/cjs/models/constructor-items/common.js +1 -6
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -46
- package/build/cjs/models/constructor-items/sub-blocks.js +2 -11
- package/build/cjs/schema/index.js +2 -8
- package/build/cjs/schema/validators/blocks.d.ts +0 -4
- package/build/cjs/schema/validators/blocks.js +0 -4
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -3
- package/build/cjs/schema/validators/sub-blocks.js +0 -3
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +2 -5
- package/build/cjs/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +5 -6
- package/build/cjs/sub-blocks/index.d.ts +0 -3
- package/build/cjs/sub-blocks/index.js +1 -7
- package/build/cjs/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/build/cjs/text-transform/common.js +31 -0
- package/build/cjs/text-transform/config.d.ts +28 -0
- package/build/cjs/text-transform/config.js +291 -0
- package/build/cjs/text-transform/index.d.ts +3 -1
- package/build/cjs/text-transform/index.js +3 -1
- package/build/cjs/text-transform/transformers.d.ts +16 -0
- package/build/cjs/text-transform/transformers.js +61 -0
- package/build/cjs/utils/index.d.ts +0 -1
- package/build/cjs/utils/index.js +0 -1
- package/build/esm/blocks/index.d.ts +0 -4
- package/build/esm/blocks/index.js +0 -4
- package/build/esm/blocks/validators.d.ts +0 -4
- package/build/esm/blocks/validators.js +0 -4
- package/build/esm/components/Anchor/Anchor.d.ts +2 -2
- package/build/esm/components/Anchor/Anchor.js +1 -1
- package/build/esm/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
- package/build/esm/components/Anchor/__tests__/Anchor.test.js +18 -0
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.js +33 -0
- package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/esm/components/Author/__tests__/Author.test.js +46 -0
- package/build/esm/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
- package/build/esm/components/BackLink/__tests__/BackLink.test.js +60 -0
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.js +41 -0
- package/build/esm/components/Button/__tests__/Button.test.d.ts +1 -0
- package/build/esm/components/Button/__tests__/Button.test.js +88 -0
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.js +55 -0
- 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 -16
- package/build/esm/constructor-items.js +2 -18
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/hooks/index.d.ts +1 -1
- package/build/esm/hooks/index.js +1 -1
- package/build/esm/internal-typings/global.d.ts +16 -18
- package/build/esm/models/constructor-items/blocks.d.ts +2 -50
- package/build/esm/models/constructor-items/blocks.js +0 -4
- package/build/esm/models/constructor-items/common.d.ts +0 -14
- package/build/esm/models/constructor-items/common.js +0 -5
- package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -46
- package/build/esm/models/constructor-items/sub-blocks.js +2 -11
- package/build/esm/schema/index.js +4 -10
- package/build/esm/schema/validators/blocks.d.ts +0 -4
- package/build/esm/schema/validators/blocks.js +0 -4
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -3
- package/build/esm/schema/validators/sub-blocks.js +0 -3
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +3 -6
- package/build/esm/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/esm/sub-blocks/HubspotForm/index.js +6 -7
- package/build/esm/sub-blocks/index.d.ts +0 -3
- package/build/esm/sub-blocks/index.js +0 -3
- package/build/esm/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/build/esm/text-transform/common.js +25 -0
- package/build/esm/text-transform/config.d.ts +28 -0
- package/build/esm/text-transform/{blocks.js → config.js} +15 -123
- package/build/esm/text-transform/index.d.ts +3 -1
- package/build/esm/text-transform/index.js +3 -1
- package/build/esm/text-transform/transformers.d.ts +16 -0
- package/build/esm/text-transform/transformers.js +56 -0
- package/build/esm/utils/index.d.ts +0 -1
- package/build/esm/utils/index.js +0 -1
- package/package.json +4 -1
- package/server/models/constructor-items/blocks.d.ts +2 -50
- package/server/models/constructor-items/blocks.js +0 -4
- package/server/models/constructor-items/common.d.ts +0 -14
- package/server/models/constructor-items/common.js +1 -6
- package/server/models/constructor-items/sub-blocks.d.ts +5 -46
- package/server/models/constructor-items/sub-blocks.js +2 -11
- package/server/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/server/text-transform/common.js +31 -0
- package/server/text-transform/config.d.ts +28 -0
- package/server/text-transform/config.js +301 -0
- package/server/text-transform/index.d.ts +3 -1
- package/server/text-transform/index.js +3 -1
- package/server/text-transform/transformers.d.ts +16 -0
- package/server/text-transform/transformers.js +63 -0
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +0 -1
- package/build/cjs/blocks/LinkTable/LinkTable.css +0 -3
- package/build/cjs/blocks/LinkTable/LinkTable.d.ts +0 -3
- package/build/cjs/blocks/LinkTable/LinkTable.js +0 -22
- package/build/cjs/blocks/LinkTable/schema.d.ts +0 -77
- package/build/cjs/blocks/LinkTable/schema.js +0 -15
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.css +0 -50
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +0 -13
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +0 -49
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.css +0 -106
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -11
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +0 -17
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -9
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +0 -13
- package/build/cjs/blocks/Preview/Preview.css +0 -50
- package/build/cjs/blocks/Preview/Preview.d.ts +0 -3
- package/build/cjs/blocks/Preview/Preview.js +0 -130
- package/build/cjs/blocks/Preview/schema.d.ts +0 -40
- package/build/cjs/blocks/Preview/schema.js +0 -53
- package/build/cjs/blocks/Security/Security.css +0 -142
- package/build/cjs/blocks/Security/Security.d.ts +0 -3
- package/build/cjs/blocks/Security/Security.js +0 -29
- package/build/cjs/blocks/Security/schema.d.ts +0 -170
- package/build/cjs/blocks/Security/schema.js +0 -32
- package/build/cjs/blocks/Simple/Simple.css +0 -22
- package/build/cjs/blocks/Simple/Simple.d.ts +0 -3
- package/build/cjs/blocks/Simple/Simple.js +0 -22
- package/build/cjs/blocks/Simple/schema.d.ts +0 -68
- package/build/cjs/blocks/Simple/schema.js +0 -14
- package/build/cjs/components/HeightCalculator/HeightCalculator.css +0 -9
- package/build/cjs/components/HeightCalculator/HeightCalculator.d.ts +0 -10
- package/build/cjs/components/HeightCalculator/HeightCalculator.js +0 -44
- package/build/cjs/context/breakpointContext/breakpointContext.d.ts +0 -2
- package/build/cjs/context/breakpointContext/breakpointContext.js +0 -7
- package/build/cjs/context/breakpointContext/index.d.ts +0 -1
- package/build/cjs/context/breakpointContext/index.js +0 -4
- package/build/cjs/hooks/useIntersection.d.ts +0 -1
- package/build/cjs/hooks/useIntersection.js +0 -21
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.css +0 -19
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -3
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +0 -16
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +0 -154
- package/build/cjs/sub-blocks/CardWithImage/schema.js +0 -46
- package/build/cjs/sub-blocks/Partner/Partner.css +0 -8
- package/build/cjs/sub-blocks/Partner/Partner.d.ts +0 -3
- package/build/cjs/sub-blocks/Partner/Partner.js +0 -15
- package/build/cjs/sub-blocks/Partner/schema.d.ts +0 -30
- package/build/cjs/sub-blocks/Partner/schema.js +0 -17
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.css +0 -20
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -3
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +0 -23
- package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +0 -34
- package/build/cjs/sub-blocks/TutorialCard/schema.js +0 -20
- package/build/cjs/text-transform/blocks.js +0 -404
- package/build/cjs/utils/scroll.d.ts +0 -15
- package/build/cjs/utils/scroll.js +0 -35
- package/build/esm/blocks/LinkTable/LinkTable.css +0 -3
- package/build/esm/blocks/LinkTable/LinkTable.d.ts +0 -4
- package/build/esm/blocks/LinkTable/LinkTable.js +0 -21
- package/build/esm/blocks/LinkTable/schema.d.ts +0 -77
- package/build/esm/blocks/LinkTable/schema.js +0 -12
- package/build/esm/blocks/Preview/MediaContent/MediaContent.css +0 -50
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +0 -14
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +0 -47
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.css +0 -106
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -12
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +0 -15
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -10
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +0 -11
- package/build/esm/blocks/Preview/Preview.css +0 -50
- package/build/esm/blocks/Preview/Preview.d.ts +0 -4
- package/build/esm/blocks/Preview/Preview.js +0 -126
- package/build/esm/blocks/Preview/schema.d.ts +0 -40
- package/build/esm/blocks/Preview/schema.js +0 -50
- package/build/esm/blocks/Security/Security.css +0 -142
- package/build/esm/blocks/Security/Security.d.ts +0 -4
- package/build/esm/blocks/Security/Security.js +0 -25
- package/build/esm/blocks/Security/schema.d.ts +0 -170
- package/build/esm/blocks/Security/schema.js +0 -28
- package/build/esm/blocks/Simple/Simple.css +0 -22
- package/build/esm/blocks/Simple/Simple.d.ts +0 -4
- package/build/esm/blocks/Simple/Simple.js +0 -18
- package/build/esm/blocks/Simple/schema.d.ts +0 -68
- package/build/esm/blocks/Simple/schema.js +0 -11
- package/build/esm/components/HeightCalculator/HeightCalculator.css +0 -9
- package/build/esm/components/HeightCalculator/HeightCalculator.d.ts +0 -11
- package/build/esm/components/HeightCalculator/HeightCalculator.js +0 -42
- package/build/esm/context/breakpointContext/breakpointContext.d.ts +0 -2
- package/build/esm/context/breakpointContext/breakpointContext.js +0 -3
- package/build/esm/context/breakpointContext/index.d.ts +0 -1
- package/build/esm/context/breakpointContext/index.js +0 -1
- package/build/esm/hooks/useIntersection.d.ts +0 -1
- package/build/esm/hooks/useIntersection.js +0 -17
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.css +0 -19
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -4
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +0 -14
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +0 -154
- package/build/esm/sub-blocks/CardWithImage/schema.js +0 -43
- package/build/esm/sub-blocks/Partner/Partner.css +0 -8
- package/build/esm/sub-blocks/Partner/Partner.d.ts +0 -4
- package/build/esm/sub-blocks/Partner/Partner.js +0 -13
- package/build/esm/sub-blocks/Partner/schema.d.ts +0 -30
- package/build/esm/sub-blocks/Partner/schema.js +0 -14
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.css +0 -20
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -4
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +0 -21
- package/build/esm/sub-blocks/TutorialCard/schema.d.ts +0 -34
- package/build/esm/sub-blocks/TutorialCard/schema.js +0 -17
- package/build/esm/utils/scroll.d.ts +0 -15
- package/build/esm/utils/scroll.js +0 -31
- package/server/text-transform/blocks.js +0 -417
- package/server/utils/scroll.d.ts +0 -15
- package/server/utils/scroll.js +0 -35
|
@@ -6,19 +6,15 @@ const models_1 = require("./models");
|
|
|
6
6
|
const sub_blocks_1 = require("./sub-blocks");
|
|
7
7
|
exports.blockMap = {
|
|
8
8
|
[models_1.BlockType.SliderBlock]: blocks_1.SliderBlock,
|
|
9
|
-
[models_1.BlockType.SimpleBlock]: blocks_1.SimpleBlock,
|
|
10
9
|
[models_1.BlockType.ExtendedFeaturesBlock]: blocks_1.ExtendedFeaturesBlock,
|
|
11
10
|
[models_1.BlockType.PromoFeaturesBlock]: blocks_1.PromoFeaturesBlock,
|
|
12
11
|
[models_1.BlockType.QuestionsBlock]: blocks_1.QuestionsBlock,
|
|
13
12
|
[models_1.BlockType.BannerBlock]: blocks_1.BannerBlock,
|
|
14
13
|
[models_1.BlockType.CompaniesBlock]: blocks_1.CompaniesBlock,
|
|
15
14
|
[models_1.BlockType.MediaBlock]: blocks_1.MediaBlock,
|
|
16
|
-
[models_1.BlockType.PreviewBlock]: blocks_1.PreviewBlock,
|
|
17
15
|
[models_1.BlockType.InfoBlock]: blocks_1.InfoBlock,
|
|
18
|
-
[models_1.BlockType.SecurityBlock]: blocks_1.SecurityBlock,
|
|
19
16
|
[models_1.BlockType.TableBlock]: blocks_1.TableBlock,
|
|
20
17
|
[models_1.BlockType.TabsBlock]: blocks_1.TabsBlock,
|
|
21
|
-
[models_1.BlockType.LinkTableBlock]: blocks_1.LinkTableBlock,
|
|
22
18
|
[models_1.BlockType.HeaderBlock]: blocks_1.HeaderBlock,
|
|
23
19
|
[models_1.BlockType.IconsBlock]: blocks_1.IconsBlock,
|
|
24
20
|
[models_1.BlockType.HeaderSliderBlock]: blocks_1.HeaderSliderBlock,
|
|
@@ -30,23 +26,11 @@ exports.blockMap = {
|
|
|
30
26
|
};
|
|
31
27
|
exports.subBlockMap = {
|
|
32
28
|
[models_1.SubBlockType.Divider]: sub_blocks_1.Divider,
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Will be removed, use basic card instead
|
|
35
|
-
*/
|
|
36
|
-
[models_1.SubBlockType.TutorialCard]: sub_blocks_1.TutorialCard,
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated Will be removed, use basic card instead
|
|
39
|
-
*/
|
|
40
|
-
[models_1.SubBlockType.Partner]: sub_blocks_1.Partner,
|
|
41
29
|
[models_1.SubBlockType.PriceDetailed]: sub_blocks_1.PriceDetailed,
|
|
42
30
|
[models_1.SubBlockType.MediaCard]: sub_blocks_1.MediaCard,
|
|
43
31
|
[models_1.SubBlockType.BannerCard]: sub_blocks_1.BannerCard,
|
|
44
32
|
[models_1.SubBlockType.NewsCard]: sub_blocks_1.NewsCard,
|
|
45
33
|
[models_1.SubBlockType.LayoutItem]: sub_blocks_1.LayoutItem,
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated Use LayoutItem
|
|
48
|
-
*/
|
|
49
|
-
[models_1.SubBlockType.CardWithImage]: sub_blocks_1.CardWithImage,
|
|
50
34
|
[models_1.SubBlockType.BackgroundCard]: sub_blocks_1.BackgroundCard,
|
|
51
35
|
[models_1.SubBlockType.BasicCard]: sub_blocks_1.BasicCard,
|
|
52
36
|
[models_1.SubBlockType.Content]: sub_blocks_1.Content,
|
|
@@ -7,4 +7,4 @@ export interface GridColumnProps extends GridColumnClassParams, Refable<HTMLDivE
|
|
|
7
7
|
dataQa?: string;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent"
|
|
10
|
+
export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "dataQa" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as useFocus } from './useFocus';
|
|
2
2
|
export { default as useWindowBreakpoint } from './useWindowBreakpoint';
|
|
3
|
-
export { useIntersection } from './useIntersection';
|
|
4
3
|
export { default as useMount } from './useMount';
|
|
4
|
+
export { default as useHeightCalculator } from './useHeightCalculator';
|
|
5
5
|
export * from './useAnalytics';
|
|
6
6
|
export * from './hubspot';
|
package/build/cjs/hooks/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useHeightCalculator = exports.useMount = exports.useWindowBreakpoint = exports.useFocus = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var useFocus_1 = require("./useFocus");
|
|
6
6
|
Object.defineProperty(exports, "useFocus", { enumerable: true, get: function () { return tslib_1.__importDefault(useFocus_1).default; } });
|
|
7
7
|
var useWindowBreakpoint_1 = require("./useWindowBreakpoint");
|
|
8
8
|
Object.defineProperty(exports, "useWindowBreakpoint", { enumerable: true, get: function () { return tslib_1.__importDefault(useWindowBreakpoint_1).default; } });
|
|
9
|
-
var useIntersection_1 = require("./useIntersection");
|
|
10
|
-
Object.defineProperty(exports, "useIntersection", { enumerable: true, get: function () { return useIntersection_1.useIntersection; } });
|
|
11
9
|
var useMount_1 = require("./useMount");
|
|
12
10
|
Object.defineProperty(exports, "useMount", { enumerable: true, get: function () { return tslib_1.__importDefault(useMount_1).default; } });
|
|
11
|
+
var useHeightCalculator_1 = require("./useHeightCalculator");
|
|
12
|
+
Object.defineProperty(exports, "useHeightCalculator", { enumerable: true, get: function () { return tslib_1.__importDefault(useHeightCalculator_1).default; } });
|
|
13
13
|
tslib_1.__exportStar(require("./useAnalytics"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./hubspot"), exports);
|
|
@@ -10,17 +10,22 @@ declare module '*.svg' {
|
|
|
10
10
|
export default path;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
interface CreateFormProps {
|
|
14
|
+
portalId: string;
|
|
15
|
+
formId: string;
|
|
16
|
+
region?: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
cssClass?: string;
|
|
19
|
+
formInstanceId?: string;
|
|
20
|
+
}
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
formInstanceId?: string;
|
|
23
|
-
}
|
|
22
|
+
interface Window {
|
|
23
|
+
hbspt?: {
|
|
24
|
+
forms: {
|
|
25
|
+
create: (args: CreateFormProps) => unknown;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
ymaps: Ymaps;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
declare namespace Ymaps {
|
|
@@ -58,11 +63,4 @@ declare namespace Ymaps {
|
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
hbspt?: {
|
|
63
|
-
forms: {
|
|
64
|
-
create: (args: Hbspt.CreateFormProps) => unknown;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
ymaps: Ymaps;
|
|
68
|
-
}
|
|
66
|
+
declare module '*.md';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
|
-
import { AnchorProps, Animatable, BackgroundImageProps, BlockHeaderProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps,
|
|
5
|
+
import { AnchorProps, Animatable, BackgroundImageProps, BlockHeaderProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleBaseProps, TitleProps } from './common';
|
|
6
6
|
import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
7
7
|
export declare enum BlockType {
|
|
8
8
|
PromoFeaturesBlock = "promo-features-block",
|
|
@@ -14,14 +14,10 @@ export declare enum BlockType {
|
|
|
14
14
|
BannerBlock = "banner-block",
|
|
15
15
|
CompaniesBlock = "companies-block",
|
|
16
16
|
MediaBlock = "media-block",
|
|
17
|
-
PreviewBlock = "preview-block",
|
|
18
17
|
InfoBlock = "info-block",
|
|
19
|
-
SecurityBlock = "security-block",
|
|
20
18
|
TableBlock = "table-block",
|
|
21
19
|
TabsBlock = "tabs-block",
|
|
22
|
-
SimpleBlock = "simple-block",
|
|
23
20
|
HeaderSliderBlock = "header-slider-block",
|
|
24
|
-
LinkTableBlock = "link-table-block",
|
|
25
21
|
HeaderBlock = "header-block",
|
|
26
22
|
IconsBlock = "icons-block",
|
|
27
23
|
CardLayoutBlock = "card-layout-block",
|
|
@@ -115,10 +111,6 @@ export interface HeaderBlockProps {
|
|
|
115
111
|
status?: JSX.Element;
|
|
116
112
|
}
|
|
117
113
|
export type CalculatorProps = Animatable;
|
|
118
|
-
export interface SimpleBlockProps extends Animatable, Childable {
|
|
119
|
-
title: TitleBaseProps;
|
|
120
|
-
description: string;
|
|
121
|
-
}
|
|
122
114
|
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
123
115
|
title: string;
|
|
124
116
|
label?: string;
|
|
@@ -181,15 +173,6 @@ export interface MediaBlockProps extends MediaBaseBlockProps {
|
|
|
181
173
|
export interface MapBlockProps extends MediaBaseBlockProps {
|
|
182
174
|
map: MapProps;
|
|
183
175
|
}
|
|
184
|
-
export interface PreviewBlockProps extends Animatable {
|
|
185
|
-
title: string;
|
|
186
|
-
items: PreviewItemProps[];
|
|
187
|
-
description?: string;
|
|
188
|
-
direction?: MediaDirection;
|
|
189
|
-
ratioMediaContent?: PreviewRatioMediaContent;
|
|
190
|
-
stopVideo?: boolean;
|
|
191
|
-
showImmediately?: boolean;
|
|
192
|
-
}
|
|
193
176
|
export interface InfoBlockProps {
|
|
194
177
|
theme?: TextTheme;
|
|
195
178
|
backgroundColor?: ThemeSupporting<string>;
|
|
@@ -204,21 +187,6 @@ export interface InfoBlockProps {
|
|
|
204
187
|
leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
205
188
|
rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
206
189
|
}
|
|
207
|
-
export interface SecurityBlockPoint {
|
|
208
|
-
img: string;
|
|
209
|
-
text: string;
|
|
210
|
-
link: {
|
|
211
|
-
text: string;
|
|
212
|
-
url: string;
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
export interface SecurityBlockProps extends Animatable {
|
|
216
|
-
theme?: TextTheme;
|
|
217
|
-
backgroundColor?: string;
|
|
218
|
-
title: string;
|
|
219
|
-
points?: SecurityBlockPoint[];
|
|
220
|
-
media: MediaProps;
|
|
221
|
-
}
|
|
222
190
|
export interface TableProps {
|
|
223
191
|
content: string[][];
|
|
224
192
|
legend?: string[];
|
|
@@ -245,10 +213,6 @@ export interface TabsBlockProps extends BlockHeaderProps, Animatable {
|
|
|
245
213
|
direction?: MediaDirection;
|
|
246
214
|
items: TabsBlockItem[];
|
|
247
215
|
}
|
|
248
|
-
export interface LinkTableBlockProps extends BlockHeaderProps {
|
|
249
|
-
items: LinkProps[][];
|
|
250
|
-
linkTheme?: LinkTheme;
|
|
251
|
-
}
|
|
252
216
|
export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {
|
|
253
217
|
title: TitleProps | string;
|
|
254
218
|
description?: string;
|
|
@@ -347,27 +311,15 @@ export type MediaBlockModel = {
|
|
|
347
311
|
export type MapBlockModel = {
|
|
348
312
|
type: BlockType.MapBlock;
|
|
349
313
|
} & MapBlockProps;
|
|
350
|
-
export type PreviewBlockModel = {
|
|
351
|
-
type: BlockType.PreviewBlock;
|
|
352
|
-
} & PreviewBlockProps;
|
|
353
314
|
export type InfoBlockModel = {
|
|
354
315
|
type: BlockType.InfoBlock;
|
|
355
316
|
} & InfoBlockProps;
|
|
356
|
-
export type SecurityBlockModel = {
|
|
357
|
-
type: BlockType.SecurityBlock;
|
|
358
|
-
} & SecurityBlockProps;
|
|
359
317
|
export type TableBlockModel = {
|
|
360
318
|
type: BlockType.TableBlock;
|
|
361
319
|
} & TableBlockProps;
|
|
362
320
|
export type TabsBlockModel = {
|
|
363
321
|
type: BlockType.TabsBlock;
|
|
364
322
|
} & TabsBlockProps;
|
|
365
|
-
export type SimpleBlockModel = {
|
|
366
|
-
type: BlockType.SimpleBlock;
|
|
367
|
-
} & SimpleBlockProps;
|
|
368
|
-
export type LinkTableBlockModel = {
|
|
369
|
-
type: BlockType.LinkTableBlock;
|
|
370
|
-
} & LinkTableBlockProps;
|
|
371
323
|
export type CardLayoutBlockModel = {
|
|
372
324
|
type: BlockType.CardLayoutBlock;
|
|
373
325
|
} & CardLayoutBlockProps;
|
|
@@ -386,6 +338,6 @@ export type ContentLayoutBlockModel = {
|
|
|
386
338
|
export type ShareBLockModel = {
|
|
387
339
|
type: BlockType.ShareBlock;
|
|
388
340
|
} & ShareBlockProps;
|
|
389
|
-
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel |
|
|
341
|
+
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
|
|
390
342
|
export type Block = BlockModels & BlockBaseProps;
|
|
391
343
|
export {};
|
|
@@ -12,14 +12,10 @@ var BlockType;
|
|
|
12
12
|
BlockType["BannerBlock"] = "banner-block";
|
|
13
13
|
BlockType["CompaniesBlock"] = "companies-block";
|
|
14
14
|
BlockType["MediaBlock"] = "media-block";
|
|
15
|
-
BlockType["PreviewBlock"] = "preview-block";
|
|
16
15
|
BlockType["InfoBlock"] = "info-block";
|
|
17
|
-
BlockType["SecurityBlock"] = "security-block";
|
|
18
16
|
BlockType["TableBlock"] = "table-block";
|
|
19
17
|
BlockType["TabsBlock"] = "tabs-block";
|
|
20
|
-
BlockType["SimpleBlock"] = "simple-block";
|
|
21
18
|
BlockType["HeaderSliderBlock"] = "header-slider-block";
|
|
22
|
-
BlockType["LinkTableBlock"] = "link-table-block";
|
|
23
19
|
BlockType["HeaderBlock"] = "header-block";
|
|
24
20
|
BlockType["IconsBlock"] = "icons-block";
|
|
25
21
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
@@ -17,10 +17,6 @@ export declare enum PriceLabelColor {
|
|
|
17
17
|
PURPLE = "purple",
|
|
18
18
|
RED = "red"
|
|
19
19
|
}
|
|
20
|
-
export declare enum PreviewItemType {
|
|
21
|
-
Video = "video",
|
|
22
|
-
Image = "image"
|
|
23
|
-
}
|
|
24
20
|
export declare enum PlayButtonType {
|
|
25
21
|
Default = "default",
|
|
26
22
|
Text = "text"
|
|
@@ -49,7 +45,6 @@ export type LegendTableMarkerType = 'disk';
|
|
|
49
45
|
export type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';
|
|
50
46
|
export type MediaDirection = 'media-content' | 'content-media';
|
|
51
47
|
export type PriceDescriptionColor = 'cornflower' | 'black';
|
|
52
|
-
export type PreviewRatioMediaContent = '2-1' | '1-1';
|
|
53
48
|
export type ContentSize = 's' | 'l';
|
|
54
49
|
export type ContentTextSize = 's' | 'm' | 'l';
|
|
55
50
|
export type ContentTheme = 'default' | 'dark' | 'light';
|
|
@@ -254,15 +249,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
254
249
|
metrikaGoals?: MetrikaGoal;
|
|
255
250
|
pixelEvents?: ButtonPixel;
|
|
256
251
|
}
|
|
257
|
-
export interface PreviewContentItemProps {
|
|
258
|
-
title: string;
|
|
259
|
-
description?: string;
|
|
260
|
-
}
|
|
261
|
-
export interface PreviewItemProps {
|
|
262
|
-
type: PreviewItemType;
|
|
263
|
-
media: ThemedMediaProps;
|
|
264
|
-
content: PreviewContentItemProps;
|
|
265
|
-
}
|
|
266
252
|
export interface TitleProps extends Justifyable, TitleBaseProps {
|
|
267
253
|
navTitle?: string;
|
|
268
254
|
anchor?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaVideoControlsType = exports.MediaVideoType = exports.PlayButtonThemes = exports.PlayButtonType = exports.
|
|
3
|
+
exports.MediaVideoControlsType = exports.MediaVideoType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
4
4
|
// enums
|
|
5
5
|
var AuthorType;
|
|
6
6
|
(function (AuthorType) {
|
|
@@ -20,11 +20,6 @@ var PriceLabelColor;
|
|
|
20
20
|
PriceLabelColor["PURPLE"] = "purple";
|
|
21
21
|
PriceLabelColor["RED"] = "red";
|
|
22
22
|
})(PriceLabelColor = exports.PriceLabelColor || (exports.PriceLabelColor = {}));
|
|
23
|
-
var PreviewItemType;
|
|
24
|
-
(function (PreviewItemType) {
|
|
25
|
-
PreviewItemType["Video"] = "video";
|
|
26
|
-
PreviewItemType["Image"] = "image";
|
|
27
|
-
})(PreviewItemType = exports.PreviewItemType || (exports.PreviewItemType = {}));
|
|
28
23
|
var PlayButtonType;
|
|
29
24
|
(function (PlayButtonType) {
|
|
30
25
|
PlayButtonType["Default"] = "default";
|
|
@@ -3,33 +3,24 @@ 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,
|
|
6
|
+
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
10
10
|
NewsCard = "news-card",
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated Will be
|
|
12
|
+
* @deprecated Will be removed
|
|
13
13
|
*/
|
|
14
|
-
Partner = "partner",
|
|
15
14
|
PriceDetailed = "price-detailed",
|
|
16
15
|
MediaCard = "media-card",
|
|
17
16
|
BannerCard = "banner-card",
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Will be moved to params use BasicCard instead
|
|
20
|
-
*/
|
|
21
|
-
TutorialCard = "tutoral-card",
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use LayoutItem
|
|
24
|
-
*/
|
|
25
|
-
CardWithImage = "card-with-image",
|
|
26
17
|
LayoutItem = "layout-item",
|
|
27
18
|
BackgroundCard = "background-card",
|
|
28
19
|
BasicCard = "basic-card",
|
|
29
20
|
Content = "content",
|
|
30
21
|
HubspotForm = "hubspot-form",
|
|
31
22
|
/**
|
|
32
|
-
* @deprecated Will be
|
|
23
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
33
24
|
*/
|
|
34
25
|
Card = "card"
|
|
35
26
|
}
|
|
@@ -67,11 +58,6 @@ export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsB
|
|
|
67
58
|
hubspotEvents?: string[];
|
|
68
59
|
createDOMElement?: boolean;
|
|
69
60
|
}
|
|
70
|
-
export interface PartnerProps extends CardBaseProps {
|
|
71
|
-
text: string;
|
|
72
|
-
logo: ImageProps;
|
|
73
|
-
url: string;
|
|
74
|
-
}
|
|
75
61
|
export interface QuoteProps extends Themable, CardBaseProps {
|
|
76
62
|
text: string;
|
|
77
63
|
image: ThemedImage;
|
|
@@ -91,12 +77,6 @@ export interface NewsCardData {
|
|
|
91
77
|
isoDate?: string;
|
|
92
78
|
}
|
|
93
79
|
export type NewsCardProps = Pick<NewsCardData, 'title' | 'url' | 'date' | 'isoDate'> & CardBaseProps;
|
|
94
|
-
export interface TutorialCardProps extends CardBaseProps {
|
|
95
|
-
url: string;
|
|
96
|
-
title: string;
|
|
97
|
-
text: string;
|
|
98
|
-
icon?: ImageProps;
|
|
99
|
-
}
|
|
100
80
|
export interface BackgroundCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
101
81
|
url?: string;
|
|
102
82
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
@@ -119,18 +99,6 @@ export interface BannerCardProps {
|
|
|
119
99
|
}
|
|
120
100
|
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
121
101
|
}
|
|
122
|
-
export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'> {
|
|
123
|
-
title: string;
|
|
124
|
-
link: string;
|
|
125
|
-
}
|
|
126
|
-
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
|
|
127
|
-
image: string;
|
|
128
|
-
description?: string;
|
|
129
|
-
disableCompress?: boolean;
|
|
130
|
-
border?: boolean;
|
|
131
|
-
fullScreen?: boolean;
|
|
132
|
-
links?: CardWithImageLinkProps[];
|
|
133
|
-
}
|
|
134
102
|
export interface LayoutItemProps extends ClassNameProps {
|
|
135
103
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
136
104
|
media: MediaProps;
|
|
@@ -147,21 +115,12 @@ export type QuoteModel = {
|
|
|
147
115
|
export type NewsCardModel = {
|
|
148
116
|
type: SubBlockType.NewsCard;
|
|
149
117
|
} & NewsCardProps;
|
|
150
|
-
export type CardWithImageModel = {
|
|
151
|
-
type: SubBlockType.CardWithImage;
|
|
152
|
-
} & CardWithImageProps;
|
|
153
118
|
export type LayoutItemModel = {
|
|
154
|
-
type: SubBlockType.
|
|
119
|
+
type: SubBlockType.LayoutItem;
|
|
155
120
|
} & LayoutItemProps;
|
|
156
|
-
export type TutorialCardModel = {
|
|
157
|
-
type: SubBlockType.TutorialCard;
|
|
158
|
-
} & TutorialCardProps;
|
|
159
121
|
export type BackgroundCardModel = {
|
|
160
122
|
type: SubBlockType.BackgroundCard;
|
|
161
123
|
} & BackgroundCardProps;
|
|
162
|
-
export type PartnerModel = {
|
|
163
|
-
type: SubBlockType.Partner;
|
|
164
|
-
} & PartnerProps;
|
|
165
124
|
export type PriceDetailedModel = {
|
|
166
125
|
type: SubBlockType.PriceDetailed;
|
|
167
126
|
} & PriceDetailedProps;
|
|
@@ -177,5 +136,5 @@ export type BannerCardModel = {
|
|
|
177
136
|
export type BasicCardModel = {
|
|
178
137
|
type: SubBlockType.BasicCard;
|
|
179
138
|
} & BasicCardProps;
|
|
180
|
-
export type SubBlockModels = DividerModel | QuoteModel | NewsCardModel |
|
|
139
|
+
export type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | LayoutItemModel;
|
|
181
140
|
export type SubBlock = SubBlockModels;
|
|
@@ -7,27 +7,18 @@ var SubBlockType;
|
|
|
7
7
|
SubBlockType["Quote"] = "quote";
|
|
8
8
|
SubBlockType["NewsCard"] = "news-card";
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated Will be
|
|
10
|
+
* @deprecated Will be removed
|
|
11
11
|
*/
|
|
12
|
-
SubBlockType["Partner"] = "partner";
|
|
13
12
|
SubBlockType["PriceDetailed"] = "price-detailed";
|
|
14
13
|
SubBlockType["MediaCard"] = "media-card";
|
|
15
14
|
SubBlockType["BannerCard"] = "banner-card";
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Will be moved to params use BasicCard instead
|
|
18
|
-
*/
|
|
19
|
-
SubBlockType["TutorialCard"] = "tutoral-card";
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Use LayoutItem
|
|
22
|
-
*/
|
|
23
|
-
SubBlockType["CardWithImage"] = "card-with-image";
|
|
24
15
|
SubBlockType["LayoutItem"] = "layout-item";
|
|
25
16
|
SubBlockType["BackgroundCard"] = "background-card";
|
|
26
17
|
SubBlockType["BasicCard"] = "basic-card";
|
|
27
18
|
SubBlockType["Content"] = "content";
|
|
28
19
|
SubBlockType["HubspotForm"] = "hubspot-form";
|
|
29
20
|
/**
|
|
30
|
-
* @deprecated Will be
|
|
21
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
31
22
|
*/
|
|
32
23
|
SubBlockType["Card"] = "card";
|
|
33
24
|
})(SubBlockType = exports.SubBlockType || (exports.SubBlockType = {}));
|
|
@@ -14,8 +14,8 @@ const getBlocksCases = (blocks) => {
|
|
|
14
14
|
exports.getBlocksCases = getBlocksCases;
|
|
15
15
|
function generateDefaultSchema(config) {
|
|
16
16
|
const { cards = {}, blocks = {}, extensions = {} } = config !== null && config !== void 0 ? config : {};
|
|
17
|
-
const blockValidators = 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(
|
|
18
|
-
const cardValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
17
|
+
const blockValidators = 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({}, sub_blocks_1.Divider), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.SliderBlock), blocks_1.QuestionsBlock), blocks_1.HeaderBlock), blocks_1.BannerBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.MapBlock), blocks_1.InfoBlock), blocks_1.TableBlock), blocks_1.TabsBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), blocks_1.ShareBlock), blocks_1.FilterBlock);
|
|
18
|
+
const cardValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.MediaCardBlock), blocks_1.BannerCard), sub_blocks_1.PriceDetailedBlock), sub_blocks_1.BackgroundCard), sub_blocks_1.NewsCard), sub_blocks_1.Quote), sub_blocks_1.BasicCard);
|
|
19
19
|
const constructorBlockSchemaNames = [
|
|
20
20
|
'divider',
|
|
21
21
|
'quote',
|
|
@@ -31,11 +31,8 @@ function generateDefaultSchema(config) {
|
|
|
31
31
|
'media-block',
|
|
32
32
|
'map-block',
|
|
33
33
|
'info-block',
|
|
34
|
-
'security-block',
|
|
35
34
|
'table-block',
|
|
36
35
|
'tabs-block',
|
|
37
|
-
'simple-block',
|
|
38
|
-
'link-table-block',
|
|
39
36
|
'preview-block',
|
|
40
37
|
'price-detailed',
|
|
41
38
|
'header-slider-block',
|
|
@@ -47,14 +44,11 @@ function generateDefaultSchema(config) {
|
|
|
47
44
|
'filter-block',
|
|
48
45
|
];
|
|
49
46
|
const constructorCardSchemaNames = [
|
|
50
|
-
'partner',
|
|
51
47
|
'media-card',
|
|
52
48
|
'banner-card',
|
|
53
49
|
'price-detailed',
|
|
54
|
-
'tutoral-card',
|
|
55
50
|
'background-card',
|
|
56
51
|
'news-card',
|
|
57
|
-
'card-with-image',
|
|
58
52
|
'quote',
|
|
59
53
|
'basic-card',
|
|
60
54
|
'layout-item',
|
|
@@ -2,18 +2,14 @@ export * from '../../blocks/Banner/schema';
|
|
|
2
2
|
export * from '../../blocks/Companies/schema';
|
|
3
3
|
export * from '../../blocks/ExtendedFeatures/schema';
|
|
4
4
|
export * from '../../blocks/PromoFeaturesBlock/schema';
|
|
5
|
-
export * from '../../blocks/Simple/schema';
|
|
6
5
|
export * from '../../blocks/Header/schema';
|
|
7
6
|
export * from '../../blocks/Info/schema';
|
|
8
7
|
export * from '../../blocks/Media/schema';
|
|
9
8
|
export * from '../../blocks/Map/schema';
|
|
10
9
|
export * from '../../blocks/Questions/schema';
|
|
11
|
-
export * from '../../blocks/Security/schema';
|
|
12
10
|
export * from '../../blocks/Slider/schema';
|
|
13
11
|
export * from '../../blocks/Table/schema';
|
|
14
|
-
export * from '../../blocks/LinkTable/schema';
|
|
15
12
|
export * from '../../blocks/Tabs/schema';
|
|
16
|
-
export * from '../../blocks/Preview/schema';
|
|
17
13
|
export * from '../../blocks/HeaderSlider/schema';
|
|
18
14
|
export * from '../../blocks/Icons/schema';
|
|
19
15
|
export * from '../../blocks/CardLayout/schema';
|
|
@@ -5,18 +5,14 @@ tslib_1.__exportStar(require("../../blocks/Banner/schema"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("../../blocks/Companies/schema"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("../../blocks/ExtendedFeatures/schema"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("../../blocks/PromoFeaturesBlock/schema"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("../../blocks/Simple/schema"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("../../blocks/Header/schema"), exports);
|
|
10
9
|
tslib_1.__exportStar(require("../../blocks/Info/schema"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("../../blocks/Media/schema"), exports);
|
|
12
11
|
tslib_1.__exportStar(require("../../blocks/Map/schema"), exports);
|
|
13
12
|
tslib_1.__exportStar(require("../../blocks/Questions/schema"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("../../blocks/Security/schema"), exports);
|
|
15
13
|
tslib_1.__exportStar(require("../../blocks/Slider/schema"), exports);
|
|
16
14
|
tslib_1.__exportStar(require("../../blocks/Table/schema"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("../../blocks/LinkTable/schema"), exports);
|
|
18
15
|
tslib_1.__exportStar(require("../../blocks/Tabs/schema"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("../../blocks/Preview/schema"), exports);
|
|
20
16
|
tslib_1.__exportStar(require("../../blocks/HeaderSlider/schema"), exports);
|
|
21
17
|
tslib_1.__exportStar(require("../../blocks/Icons/schema"), exports);
|
|
22
18
|
tslib_1.__exportStar(require("../../blocks/CardLayout/schema"), exports);
|
|
@@ -3,9 +3,6 @@ export * from '../../sub-blocks/BackgroundCard/schema';
|
|
|
3
3
|
export * from '../../sub-blocks/Content/schema';
|
|
4
4
|
export * from '../../sub-blocks/MediaCard/schema';
|
|
5
5
|
export * from '../../sub-blocks/NewsCard/schema';
|
|
6
|
-
export * from '../../sub-blocks/Partner/schema';
|
|
7
|
-
export * from '../../sub-blocks/TutorialCard/schema';
|
|
8
|
-
export * from '../../sub-blocks/CardWithImage/schema';
|
|
9
6
|
export * from '../../sub-blocks/LayoutItem/schema';
|
|
10
7
|
export * from '../../sub-blocks/Quote/schema';
|
|
11
8
|
export * from '../../sub-blocks/Divider/schema';
|
|
@@ -6,9 +6,6 @@ tslib_1.__exportStar(require("../../sub-blocks/BackgroundCard/schema"), exports)
|
|
|
6
6
|
tslib_1.__exportStar(require("../../sub-blocks/Content/schema"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("../../sub-blocks/MediaCard/schema"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("../../sub-blocks/NewsCard/schema"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("../../sub-blocks/Partner/schema"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("../../sub-blocks/TutorialCard/schema"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("../../sub-blocks/CardWithImage/schema"), exports);
|
|
12
9
|
tslib_1.__exportStar(require("../../sub-blocks/LayoutItem/schema"), exports);
|
|
13
10
|
tslib_1.__exportStar(require("../../sub-blocks/Quote/schema"), exports);
|
|
14
11
|
tslib_1.__exportStar(require("../../sub-blocks/Divider/schema"), exports);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { HubspotFormProps } from '../../models';
|
|
3
2
|
type HubspotFormContainerPropsKeys = 'className' | 'formId' | 'formInstanceId' | 'portalId' | 'region' | 'formClassName' | 'createDOMElement';
|
|
4
3
|
type HubspotFormContainerProps = Pick<HubspotFormProps, HubspotFormContainerPropsKeys>;
|
|
5
|
-
declare const HubspotFormContainer:
|
|
4
|
+
declare const HubspotFormContainer: (props: HubspotFormContainerProps) => JSX.Element;
|
|
6
5
|
export default HubspotFormContainer;
|
|
@@ -4,12 +4,10 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const hooks_1 = require("../../hooks");
|
|
6
6
|
const loadHubspotScript_1 = tslib_1.__importDefault(require("./loadHubspotScript"));
|
|
7
|
-
const HubspotFormContainer = (
|
|
7
|
+
const HubspotFormContainer = (props) => {
|
|
8
8
|
const { className, formId, formInstanceId, portalId, region, formClassName, createDOMElement, } = props;
|
|
9
9
|
const containerRef = (0, react_1.useRef)(null);
|
|
10
10
|
const hsContainerRef = (0, react_1.useRef)();
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
|
-
(0, react_1.useImperativeHandle)(ref, () => containerRef.current);
|
|
13
11
|
const containerId = formInstanceId
|
|
14
12
|
? `hubspot-form-${formId}-${formInstanceId}`
|
|
15
13
|
: `hubspot-form-${formId}`;
|
|
@@ -47,6 +45,5 @@ const HubspotFormContainer = (0, react_1.forwardRef)((props, ref) => {
|
|
|
47
45
|
};
|
|
48
46
|
});
|
|
49
47
|
return react_1.default.createElement("div", { className: className, id: containerId, ref: containerRef });
|
|
50
|
-
}
|
|
51
|
-
HubspotFormContainer.displayName = 'HubspotFormContainer';
|
|
48
|
+
};
|
|
52
49
|
exports.default = HubspotFormContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HubspotFormProps } from '../../models';
|
|
3
|
-
declare const HubspotForm: React.
|
|
3
|
+
declare const HubspotForm: React.FunctionComponent<HubspotFormProps>;
|
|
4
4
|
export default HubspotForm;
|
|
@@ -10,7 +10,7 @@ const models_1 = require("../../models");
|
|
|
10
10
|
const utils_1 = require("../../utils");
|
|
11
11
|
const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
|
|
12
12
|
const b = (0, utils_1.block)('hubspot-form');
|
|
13
|
-
const HubspotForm = (
|
|
13
|
+
const HubspotForm = (props) => {
|
|
14
14
|
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
|
|
15
15
|
// hubspotEvents, // TODO: decide how to handle them
|
|
16
16
|
analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
|
|
@@ -25,10 +25,10 @@ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
|
|
|
25
25
|
onBeforeSubmit,
|
|
26
26
|
onLoad,
|
|
27
27
|
onSubmitError,
|
|
28
|
-
onSubmit: (
|
|
28
|
+
onSubmit: (e) => {
|
|
29
29
|
handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
|
|
30
30
|
handleAnalytics(analyticsEvents);
|
|
31
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(
|
|
31
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
|
|
32
32
|
},
|
|
33
33
|
}), [
|
|
34
34
|
onBeforeLoad,
|
|
@@ -42,7 +42,6 @@ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
|
|
|
42
42
|
onSubmitError,
|
|
43
43
|
]);
|
|
44
44
|
(0, hooks_1.useHandleHubspotEvents)(handlers, formId);
|
|
45
|
-
return (react_1.default.createElement(HubspotFormContainer_1.default, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region
|
|
46
|
-
}
|
|
47
|
-
HubspotForm.displayName = 'HubspotForm';
|
|
45
|
+
return (react_1.default.createElement(HubspotFormContainer_1.default, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
|
|
46
|
+
};
|
|
48
47
|
exports.default = HubspotForm;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
export { default as Divider } from './Divider/Divider';
|
|
2
2
|
export { default as Quote } from './Quote/Quote';
|
|
3
3
|
export { default as NewsCard } from './NewsCard/NewsCard';
|
|
4
|
-
export { default as Partner } from './Partner/Partner';
|
|
5
4
|
export { default as PriceDetailed } from './PriceDetailed/PriceDetailed';
|
|
6
5
|
export { default as MediaCard } from './MediaCard/MediaCard';
|
|
7
6
|
export { default as BannerCard } from './BannerCard/BannerCard';
|
|
8
|
-
export { default as TutorialCard } from './TutorialCard/TutorialCard';
|
|
9
|
-
export { default as CardWithImage } from './CardWithImage/CardWithImage';
|
|
10
7
|
export { default as LayoutItem } from './LayoutItem/LayoutItem';
|
|
11
8
|
export { default as BackgroundCard } from './BackgroundCard/BackgroundCard';
|
|
12
9
|
export { default as BasicCard } from './BasicCard/BasicCard';
|