@gravity-ui/page-constructor 4.3.0 → 4.3.12-alpha.3
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/README.md +4 -0
- package/build/cjs/blocks/CardLayout/CardLayout.d.ts +2 -2
- package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
- package/build/cjs/blocks/ContentLayout/schema.d.ts +38 -0
- package/build/cjs/blocks/Header/Header.css +0 -6
- package/build/cjs/blocks/Icons/Icons.js +7 -1
- package/build/cjs/blocks/Icons/schema.d.ts +162 -0
- package/build/cjs/blocks/Icons/schema.js +11 -0
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -1
- package/build/cjs/blocks/Slider/Slider.css +4 -1
- package/build/cjs/blocks/Slider/Slider.js +32 -6
- package/build/cjs/blocks/Slider/i18n/en.json +4 -0
- package/build/cjs/blocks/Slider/i18n/index.d.ts +2 -0
- package/build/cjs/blocks/Slider/i18n/index.js +8 -0
- package/build/cjs/blocks/Slider/i18n/ru.json +4 -0
- package/build/cjs/components/BackgroundImage/BackgroundImage.d.ts +1 -0
- package/build/cjs/components/BackgroundImage/BackgroundImage.js +5 -2
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +4 -3
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +6 -1
- package/build/cjs/components/CardBase/CardBase.css +4 -4
- package/build/cjs/components/HTML/HTML.d.ts +5 -1
- package/build/cjs/components/HTML/HTML.js +3 -1
- package/build/cjs/components/Image/Image.js +7 -5
- package/build/cjs/components/Image/schema.d.ts +19 -0
- package/build/cjs/components/Image/schema.js +12 -1
- package/build/cjs/components/Link/Link.d.ts +2 -1
- package/build/cjs/components/Link/Link.js +4 -2
- package/build/cjs/components/Media/Image/Image.d.ts +3 -2
- package/build/cjs/components/Media/Image/Image.js +8 -5
- package/build/cjs/components/Media/Media.d.ts +2 -2
- package/build/cjs/components/Media/Media.js +9 -6
- package/build/cjs/components/Media/Video/Video.d.ts +2 -2
- package/build/cjs/components/Media/Video/Video.js +15 -6
- package/build/cjs/components/MetaInfo/MetaInfo.css +0 -2
- package/build/cjs/components/MetaInfo/MetaInfo.js +2 -1
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +46 -14
- package/build/cjs/components/ReactPlayer/CustomBarControls.d.ts +4 -1
- package/build/cjs/components/ReactPlayer/CustomBarControls.js +33 -9
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +12 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +49 -25
- package/build/cjs/components/ReactPlayer/i18n/en.json +4 -1
- package/build/cjs/components/ReactPlayer/i18n/ru.json +4 -1
- package/build/cjs/components/Table/Table.js +11 -5
- package/build/cjs/components/VideoBlock/VideoBlock.js +7 -6
- package/build/cjs/components/YFMWrapper/YFMWrapper.d.ts +4 -3
- package/build/cjs/components/YFMWrapper/YFMWrapper.js +3 -3
- package/build/cjs/constructor-items.d.ts +10 -3
- package/build/cjs/constructor-items.js +11 -1
- package/build/cjs/containers/Loadable/Loadable.js +2 -2
- package/build/cjs/containers/PageConstructor/PageConstructor.css +4 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +10 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -2
- package/build/cjs/context/innerContext/InnerContext.d.ts +3 -1
- package/build/cjs/context/innerContext/InnerContext.js +2 -0
- package/build/cjs/editor/components/AddBlock/AddBlock.css +1 -1
- package/build/cjs/editor/components/EditBlock/EditBlock.css +1 -0
- package/build/cjs/editor/components/Layout/Layout.css +2 -1
- package/build/cjs/editor/containers/Form/Form.css +14 -35
- package/build/cjs/editor/store/index.js +1 -1
- package/build/cjs/editor/styles/root.css +2 -1
- package/build/cjs/editor/utils/index.d.ts +1 -0
- package/build/cjs/grid/Col/Col.d.ts +2 -4
- package/build/cjs/icons/Mute.d.ts +2 -0
- package/build/cjs/icons/Mute.js +12 -0
- package/build/cjs/icons/MuteSmall.d.ts +2 -0
- package/build/cjs/icons/MuteSmall.js +15 -0
- package/build/cjs/icons/Unmute.d.ts +2 -0
- package/build/cjs/icons/Unmute.js +12 -0
- package/build/cjs/icons/UnmuteSmall.d.ts +2 -0
- package/build/cjs/icons/UnmuteSmall.js +17 -0
- package/build/cjs/icons/VideoControlPause.d.ts +2 -0
- package/build/cjs/icons/VideoControlPause.js +16 -0
- package/build/cjs/icons/VideoControlPlay.d.ts +2 -0
- package/build/cjs/icons/VideoControlPlay.js +12 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +12 -5
- package/build/cjs/models/constructor-items/common.d.ts +16 -34
- package/build/cjs/models/constructor-items/common.js +6 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -4
- package/build/cjs/models/constructor.d.ts +7 -1
- package/build/cjs/models/navigation.d.ts +1 -0
- package/build/cjs/models/navigation.js +2 -1
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -16
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
- package/build/cjs/navigation/components/NavigationItem/index.d.ts +6 -0
- package/build/cjs/navigation/components/NavigationItem/index.js +14 -0
- package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/cjs/navigation/components/SocialIcon/SocialIcon.js +2 -1
- package/build/cjs/schema/constants.d.ts +181 -78
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +100 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +10 -0
- package/build/cjs/sub-blocks/Content/Content.d.ts +3 -1
- package/build/cjs/sub-blocks/Content/Content.js +7 -5
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.d.ts +2 -1
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.js +7 -5
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +3 -3
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +81 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.js +10 -0
- package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -2
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +81 -78
- package/build/cjs/sub-blocks/MediaCard/schema.js +11 -1
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
- package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +7 -4
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +11 -1
- package/build/cjs/sub-blocks/Quote/Quote.css +0 -3
- package/build/cjs/text-transform/common.d.ts +7 -2
- package/build/cjs/text-transform/common.js +8 -2
- package/build/cjs/text-transform/config.js +1 -1
- package/build/cjs/text-transform/transformers.d.ts +2 -0
- package/build/cjs/text-transform/transformers.js +11 -8
- package/build/cjs/utils/blocks.d.ts +3 -6
- package/build/cjs/utils/blocks.js +25 -16
- package/build/cjs/utils/cn.d.ts +3 -3
- package/build/cjs/utils/cn.js +4 -7
- package/build/esm/blocks/CardLayout/CardLayout.d.ts +2 -2
- package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +38 -0
- package/build/esm/blocks/Header/Header.css +0 -6
- package/build/esm/blocks/Icons/Icons.js +8 -2
- package/build/esm/blocks/Icons/schema.d.ts +162 -0
- package/build/esm/blocks/Icons/schema.js +11 -0
- package/build/esm/blocks/Slider/Arrow/Arrow.js +2 -1
- package/build/esm/blocks/Slider/Slider.css +4 -1
- package/build/esm/blocks/Slider/Slider.js +33 -7
- package/build/esm/blocks/Slider/i18n/en.json +4 -0
- package/build/esm/blocks/Slider/i18n/index.d.ts +2 -0
- package/build/esm/blocks/Slider/i18n/index.js +5 -0
- package/build/esm/blocks/Slider/i18n/ru.json +4 -0
- package/build/esm/components/BackgroundImage/BackgroundImage.d.ts +1 -0
- package/build/esm/components/BackgroundImage/BackgroundImage.js +5 -3
- package/build/esm/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
- package/build/esm/components/BackgroundMedia/BackgroundMedia.js +5 -4
- package/build/esm/components/ButtonTabs/ButtonTabs.js +6 -1
- package/build/esm/components/CardBase/CardBase.css +4 -4
- package/build/esm/components/HTML/HTML.d.ts +5 -1
- package/build/esm/components/HTML/HTML.js +3 -1
- package/build/esm/components/Image/Image.js +7 -5
- package/build/esm/components/Image/schema.d.ts +19 -0
- package/build/esm/components/Image/schema.js +12 -1
- package/build/esm/components/Link/Link.d.ts +2 -1
- package/build/esm/components/Link/Link.js +4 -2
- package/build/esm/components/Media/Image/Image.d.ts +3 -2
- package/build/esm/components/Media/Image/Image.js +8 -6
- package/build/esm/components/Media/Media.d.ts +2 -2
- package/build/esm/components/Media/Media.js +10 -7
- package/build/esm/components/Media/Video/Video.d.ts +2 -2
- package/build/esm/components/Media/Video/Video.js +16 -7
- package/build/esm/components/MetaInfo/MetaInfo.css +0 -2
- package/build/esm/components/MetaInfo/MetaInfo.js +2 -1
- package/build/esm/components/ReactPlayer/CustomBarControls.css +46 -14
- package/build/esm/components/ReactPlayer/CustomBarControls.d.ts +4 -1
- package/build/esm/components/ReactPlayer/CustomBarControls.js +34 -10
- package/build/esm/components/ReactPlayer/ReactPlayer.css +12 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +52 -28
- package/build/esm/components/ReactPlayer/i18n/en.json +4 -1
- package/build/esm/components/ReactPlayer/i18n/ru.json +4 -1
- package/build/esm/components/Table/Table.js +11 -5
- package/build/esm/components/VideoBlock/VideoBlock.js +7 -6
- package/build/esm/components/YFMWrapper/YFMWrapper.d.ts +4 -3
- package/build/esm/components/YFMWrapper/YFMWrapper.js +3 -3
- package/build/esm/constructor-items.d.ts +10 -3
- package/build/esm/constructor-items.js +10 -1
- package/build/esm/containers/Loadable/Loadable.js +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +4 -0
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +12 -8
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +1 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +4 -2
- package/build/esm/context/innerContext/InnerContext.d.ts +3 -1
- package/build/esm/context/innerContext/InnerContext.js +2 -0
- package/build/esm/editor/components/AddBlock/AddBlock.css +1 -1
- package/build/esm/editor/components/EditBlock/EditBlock.css +1 -0
- package/build/esm/editor/components/Layout/Layout.css +2 -1
- package/build/esm/editor/containers/Form/Form.css +14 -35
- package/build/esm/editor/store/index.js +2 -2
- package/build/esm/editor/styles/root.css +2 -1
- package/build/esm/editor/utils/index.d.ts +1 -0
- package/build/esm/grid/Col/Col.d.ts +2 -4
- package/build/esm/icons/Mute.d.ts +2 -0
- package/build/esm/icons/Mute.js +7 -0
- package/build/esm/icons/MuteSmall.d.ts +2 -0
- package/build/esm/icons/MuteSmall.js +10 -0
- package/build/esm/icons/Unmute.d.ts +2 -0
- package/build/esm/icons/Unmute.js +7 -0
- package/build/esm/icons/UnmuteSmall.d.ts +2 -0
- package/build/esm/icons/UnmuteSmall.js +12 -0
- package/build/esm/icons/VideoControlPause.d.ts +2 -0
- package/build/esm/icons/VideoControlPause.js +11 -0
- package/build/esm/icons/VideoControlPlay.d.ts +2 -0
- package/build/esm/icons/VideoControlPlay.js +7 -0
- package/build/esm/models/constructor-items/blocks.d.ts +12 -5
- package/build/esm/models/constructor-items/common.d.ts +16 -34
- package/build/esm/models/constructor-items/common.js +5 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -4
- package/build/esm/models/constructor.d.ts +7 -1
- package/build/esm/models/navigation.d.ts +1 -0
- package/build/esm/models/navigation.js +1 -0
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -17
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
- package/build/esm/navigation/components/NavigationItem/index.d.ts +6 -0
- package/build/esm/navigation/components/NavigationItem/index.js +6 -0
- package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/esm/navigation/components/SocialIcon/SocialIcon.js +2 -1
- package/build/esm/schema/constants.d.ts +181 -78
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +100 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +10 -0
- package/build/esm/sub-blocks/Content/Content.d.ts +3 -1
- package/build/esm/sub-blocks/Content/Content.js +7 -5
- package/build/esm/sub-blocks/Content/ContentList/ContentList.d.ts +2 -1
- package/build/esm/sub-blocks/Content/ContentList/ContentList.js +7 -5
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +3 -3
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +81 -0
- package/build/esm/sub-blocks/LayoutItem/schema.js +10 -0
- package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -2
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +81 -78
- package/build/esm/sub-blocks/MediaCard/schema.js +11 -1
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
- package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +8 -4
- package/build/esm/sub-blocks/PriceDetailed/schema.js +11 -1
- package/build/esm/sub-blocks/Quote/Quote.css +0 -3
- package/build/esm/text-transform/common.d.ts +7 -2
- package/build/esm/text-transform/common.js +7 -2
- package/build/esm/text-transform/config.js +1 -1
- package/build/esm/text-transform/transformers.d.ts +2 -0
- package/build/esm/text-transform/transformers.js +11 -8
- package/build/esm/utils/blocks.d.ts +3 -6
- package/build/esm/utils/blocks.js +21 -11
- package/build/esm/utils/cn.d.ts +3 -3
- package/build/esm/utils/cn.js +3 -4
- package/package.json +6 -6
- package/server/models/constructor-items/blocks.d.ts +12 -5
- package/server/models/constructor-items/common.d.ts +16 -34
- package/server/models/constructor-items/common.js +6 -1
- package/server/models/constructor-items/sub-blocks.d.ts +4 -4
- package/server/models/constructor.d.ts +7 -1
- package/server/models/navigation.d.ts +1 -0
- package/server/models/navigation.js +2 -1
- package/server/text-transform/common.d.ts +7 -2
- package/server/text-transform/common.js +10 -2
- package/server/text-transform/config.js +1 -1
- package/server/text-transform/transformers.d.ts +2 -0
- package/server/text-transform/transformers.js +11 -8
- package/server/utils/blocks.d.ts +3 -6
- package/server/utils/blocks.js +25 -16
- package/server/utils/cn.d.ts +3 -3
- package/server/utils/cn.js +4 -9
- package/styles/mixins.scss +4 -1
- package/styles/storybook/common.scss +2 -0
- package/styles/styles.css +4 -0
- package/styles/yfm.scss +7 -0
- package/widget/index.js +1 -1
|
@@ -8,12 +8,11 @@ const utils_1 = require("../../utils");
|
|
|
8
8
|
const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
9
9
|
const b = (0, utils_1.block)('background-card');
|
|
10
10
|
const BackgroundCard = (props) => {
|
|
11
|
-
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
|
|
11
|
+
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, } = props;
|
|
12
12
|
const theme = (0, theme_1.useTheme)();
|
|
13
13
|
const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
|
|
14
|
-
const link = hasBackgroundColor || border === 'line' ? undefined : url;
|
|
15
14
|
const borderType = hasBackgroundColor ? 'none' : border;
|
|
16
|
-
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url:
|
|
15
|
+
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType, analyticsEvents: analyticsEvents },
|
|
17
16
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
18
17
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
|
|
19
18
|
react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
|
|
@@ -16,6 +16,25 @@ export declare const BackgroundCard: {
|
|
|
16
16
|
type: string;
|
|
17
17
|
pattern: string;
|
|
18
18
|
};
|
|
19
|
+
style: {
|
|
20
|
+
type: string;
|
|
21
|
+
additionalProperties: boolean;
|
|
22
|
+
required: never[];
|
|
23
|
+
properties: {
|
|
24
|
+
backgroundColor: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
height: {
|
|
28
|
+
type: string[];
|
|
29
|
+
};
|
|
30
|
+
width: {
|
|
31
|
+
type: string[];
|
|
32
|
+
};
|
|
33
|
+
color: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
19
38
|
alt: {
|
|
20
39
|
type: string;
|
|
21
40
|
contentType: string;
|
|
@@ -41,6 +60,87 @@ export declare const BackgroundCard: {
|
|
|
41
60
|
type: string;
|
|
42
61
|
enum: string[];
|
|
43
62
|
};
|
|
63
|
+
analyticsEvents: {
|
|
64
|
+
oneOf: ({
|
|
65
|
+
optionName: string;
|
|
66
|
+
type: string;
|
|
67
|
+
additionalProperties: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
required: string[];
|
|
71
|
+
properties: {
|
|
72
|
+
name: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
type: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
counters: {
|
|
79
|
+
type: string;
|
|
80
|
+
additionalProperties: boolean;
|
|
81
|
+
required: never[];
|
|
82
|
+
properties: {
|
|
83
|
+
include: {
|
|
84
|
+
type: string;
|
|
85
|
+
items: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
exclude: {
|
|
90
|
+
type: string;
|
|
91
|
+
items: {
|
|
92
|
+
type: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
context: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
items?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
type: string;
|
|
104
|
+
items: {
|
|
105
|
+
type: string;
|
|
106
|
+
additionalProperties: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
required: string[];
|
|
110
|
+
properties: {
|
|
111
|
+
name: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
type: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
counters: {
|
|
118
|
+
type: string;
|
|
119
|
+
additionalProperties: boolean;
|
|
120
|
+
required: never[];
|
|
121
|
+
properties: {
|
|
122
|
+
include: {
|
|
123
|
+
type: string;
|
|
124
|
+
items: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
exclude: {
|
|
129
|
+
type: string;
|
|
130
|
+
items: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
context: {
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
optionName: string;
|
|
142
|
+
})[];
|
|
143
|
+
};
|
|
44
144
|
title: {
|
|
45
145
|
oneOf: ({
|
|
46
146
|
type: string;
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
7
7
|
const common_1 = require("../../schema/validators/common");
|
|
8
|
+
const event_1 = require("../../schema/validators/event");
|
|
8
9
|
const schema_2 = require("../Content/schema");
|
|
9
10
|
const BackgroundCardContentProps = lodash_1.default.omit(schema_2.ContentBase, ['size']);
|
|
10
11
|
exports.BackgroundCard = {
|
|
@@ -18,6 +19,15 @@ exports.BackgroundCard = {
|
|
|
18
19
|
}, paddingBottom: {
|
|
19
20
|
type: 'string',
|
|
20
21
|
enum: ['s', 'm', 'l', 'xl'],
|
|
22
|
+
}, analyticsEvents: {
|
|
23
|
+
oneOf: [
|
|
24
|
+
Object.assign(Object.assign({}, event_1.AnalyticsEventSchema), { optionName: 'single' }),
|
|
25
|
+
{
|
|
26
|
+
type: 'array',
|
|
27
|
+
items: event_1.AnalyticsEventSchema,
|
|
28
|
+
optionName: 'list',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
21
31
|
} }),
|
|
22
32
|
},
|
|
23
33
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { ClassNameProps, ContentBlockProps } from '../../models';
|
|
2
|
-
|
|
2
|
+
import { QAProps } from '../../models/common';
|
|
3
|
+
export type ContentProps = ContentBlockProps & ClassNameProps & QAProps;
|
|
4
|
+
declare const Content: (props: ContentProps) => JSX.Element;
|
|
3
5
|
export default Content;
|
|
@@ -6,6 +6,7 @@ const components_1 = require("../../components");
|
|
|
6
6
|
const Link_1 = tslib_1.__importDefault(require("../../components/Link/Link"));
|
|
7
7
|
const grid_1 = require("../../grid");
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
|
+
const blocks_1 = require("../../utils/blocks");
|
|
9
10
|
const ContentList_1 = tslib_1.__importDefault(require("./ContentList/ContentList"));
|
|
10
11
|
const b = (0, utils_1.block)('content');
|
|
11
12
|
function getTextSize(size) {
|
|
@@ -36,23 +37,24 @@ function getButtonSize(size) {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
const Content = (props) => {
|
|
39
|
-
const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, } = props;
|
|
40
|
+
const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, } = props;
|
|
41
|
+
const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, ['links', 'link', 'buttons', 'button', 'list']);
|
|
40
42
|
const titleProps = !title || typeof title === 'string'
|
|
41
43
|
? { text: title, textSize: getTextSize(size) }
|
|
42
44
|
: title;
|
|
43
45
|
const hasTitle = Boolean(title);
|
|
44
|
-
return (react_1.default.createElement(grid_1.Col, { className: b({ size, centered, theme }, className), reset: true, sizes: colSizes },
|
|
46
|
+
return (react_1.default.createElement(grid_1.Col, { className: b({ size, centered, theme }, className), reset: true, sizes: colSizes, qa: qaAttributes.container },
|
|
45
47
|
title && react_1.default.createElement(components_1.Title, { className: b('title'), title: titleProps, colSizes: { all: 12 } }),
|
|
46
48
|
text && (react_1.default.createElement("div", { className: b('text', { ['without-title']: !hasTitle }) },
|
|
47
49
|
react_1.default.createElement(components_1.YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true } }))),
|
|
48
|
-
(list === null || list === void 0 ? void 0 : list.length) ? react_1.default.createElement(ContentList_1.default, { list: list, size: size }) : null,
|
|
50
|
+
(list === null || list === void 0 ? void 0 : list.length) ? react_1.default.createElement(ContentList_1.default, { list: list, size: size, qa: qaAttributes.list }) : null,
|
|
49
51
|
additionalInfo && (react_1.default.createElement("div", { className: b('notice') },
|
|
50
52
|
react_1.default.createElement(components_1.YFMWrapper, { content: additionalInfo, modifiers: {
|
|
51
53
|
constructor: true,
|
|
52
54
|
'constructor-notice': true,
|
|
53
55
|
[`constructor-size-${size}`]: true,
|
|
54
56
|
} }))),
|
|
55
|
-
links && (react_1.default.createElement("div", { className: b('links') }, links.map((link) => (react_1.default.createElement(Link_1.default, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url })))))),
|
|
56
|
-
buttons && (react_1.default.createElement("div", { className: b('buttons') }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size) }))))))));
|
|
57
|
+
links && (react_1.default.createElement("div", { className: b('links'), "data-qa": qaAttributes.links }, links.map((link) => (react_1.default.createElement(Link_1.default, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url, qa: qaAttributes.link })))))),
|
|
58
|
+
buttons && (react_1.default.createElement("div", { className: b('buttons'), "data-qa": qaAttributes.buttons }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size), qa: qaAttributes.button }))))))));
|
|
57
59
|
};
|
|
58
60
|
exports.default = Content;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ContentItemProps, ContentSize } from '../../../models';
|
|
2
|
+
import { QAProps } from '../../../models/common';
|
|
2
3
|
interface ContentListProps {
|
|
3
4
|
list: ContentItemProps[];
|
|
4
5
|
size: ContentSize;
|
|
5
6
|
}
|
|
6
|
-
declare const ContentList: ({ list, size }: ContentListProps) => JSX.Element;
|
|
7
|
+
declare const ContentList: ({ list, size, qa }: ContentListProps & QAProps) => JSX.Element;
|
|
7
8
|
export default ContentList;
|
|
@@ -8,6 +8,7 @@ const Image_1 = tslib_1.__importDefault(require("../../../components/Image/Image
|
|
|
8
8
|
const utils_1 = require("../../../components/Media/Image/utils");
|
|
9
9
|
const theme_1 = require("../../../context/theme");
|
|
10
10
|
const utils_2 = require("../../../utils");
|
|
11
|
+
const blocks_1 = require("../../../utils/blocks");
|
|
11
12
|
const b = (0, utils_2.block)('content-list');
|
|
12
13
|
function getHeadingLevel(size) {
|
|
13
14
|
switch (size) {
|
|
@@ -18,18 +19,19 @@ function getHeadingLevel(size) {
|
|
|
18
19
|
return 'h3';
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
const ContentList = ({ list, size }) => {
|
|
22
|
+
const ContentList = ({ list, size, qa }) => {
|
|
22
23
|
const theme = (0, theme_1.useTheme)();
|
|
23
|
-
|
|
24
|
+
const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, ['image', 'title', 'text']);
|
|
25
|
+
return (react_1.default.createElement("div", { className: b({ size }), "data-qa": qa }, list === null || list === void 0 ? void 0 : list.map((item) => {
|
|
24
26
|
const { icon, title, text } = item;
|
|
25
27
|
const iconThemed = (0, utils_2.getThemedValue)(icon, theme);
|
|
26
28
|
const iconData = (0, utils_1.getMediaImage)(iconThemed);
|
|
27
29
|
return (react_1.default.createElement("div", { className: b('item'), key: (0, uuid_1.v4)() },
|
|
28
|
-
react_1.default.createElement(Image_1.default, Object.assign({}, iconData, { className: b('icon') })),
|
|
30
|
+
react_1.default.createElement(Image_1.default, Object.assign({}, iconData, { className: b('icon'), qa: qaAttributes.image })),
|
|
29
31
|
react_1.default.createElement("div", null,
|
|
30
32
|
title &&
|
|
31
|
-
react_1.default.createElement(getHeadingLevel(size), { className: b('title') }, title),
|
|
32
|
-
text && (react_1.default.createElement(components_1.YFMWrapper, { className: b('text'), content: text, modifiers: { constructor: true } })))));
|
|
33
|
+
react_1.default.createElement(getHeadingLevel(size), { className: b('title'), 'data-qa': qaAttributes.title }, title),
|
|
34
|
+
text && (react_1.default.createElement(components_1.YFMWrapper, { className: b('text'), content: text, modifiers: { constructor: true }, qa: qaAttributes.text })))));
|
|
33
35
|
})));
|
|
34
36
|
};
|
|
35
37
|
exports.default = ContentList;
|
|
@@ -268,9 +268,9 @@ unpredictable css rules order in build */
|
|
|
268
268
|
.pc-hubspot-form .hs-button.primary {
|
|
269
269
|
margin: 0;
|
|
270
270
|
padding: 0;
|
|
271
|
-
font-family: var(--g-font-family
|
|
271
|
+
font-family: var(--g-text-body-font-family);
|
|
272
272
|
font-size: inherit;
|
|
273
|
-
font-weight:
|
|
273
|
+
font-weight: var(--g-text-body-font-weight);
|
|
274
274
|
color: inherit;
|
|
275
275
|
background: none;
|
|
276
276
|
border: none;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LayoutItemProps } from '../../models';
|
|
2
|
-
declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, }: LayoutItemProps) => JSX.Element;
|
|
2
|
+
declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, analyticsEvents, }: LayoutItemProps) => JSX.Element;
|
|
3
3
|
export default LayoutItem;
|
|
@@ -8,12 +8,12 @@ const utils_1 = require("../../utils");
|
|
|
8
8
|
const utils_2 = require("./utils");
|
|
9
9
|
const b = (0, utils_1.block)('layout-item');
|
|
10
10
|
const LayoutItem = (_a) => {
|
|
11
|
-
var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullscreen, className } = _a;
|
|
11
|
+
var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullscreen, className, analyticsEvents } = _a;
|
|
12
12
|
return (react_1.default.createElement("div", { className: b(null, className) },
|
|
13
13
|
fullscreen && (0, utils_2.hasFullscreen)(media) ? (react_1.default.createElement(components_1.FullscreenMedia, { showFullscreenIcon: (0, utils_2.showFullscreenIcon)(media) }, (_a = {}) => {
|
|
14
14
|
var { className: mediaClassName, fullscreen: _fullscreen } = _a, fullscreenMediaProps = tslib_1.__rest(_a, ["className", "fullscreen"]);
|
|
15
|
-
return (react_1.default.createElement(components_1.Media, Object.assign({}, media, fullscreenMediaProps, { className: b('media', { border }, mediaClassName) })));
|
|
16
|
-
})) : (react_1.default.createElement(components_1.Media, Object.assign({}, media, { className: b('media', { border }) }))),
|
|
15
|
+
return (react_1.default.createElement(components_1.Media, Object.assign({}, media, fullscreenMediaProps, { className: b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
|
|
16
|
+
})) : (react_1.default.createElement(components_1.Media, Object.assign({}, media, { className: b('media', { border }), analyticsEvents: analyticsEvents }))),
|
|
17
17
|
metaInfo && react_1.default.createElement(components_1.MetaInfo, { items: metaInfo, className: b('meta-info') }),
|
|
18
18
|
react_1.default.createElement("div", { className: b('content') },
|
|
19
19
|
react_1.default.createElement(__1.Content, Object.assign({}, content, { links: (0, utils_2.getLayoutItemLinks)(links), size: "s", colSizes: { all: 12, md: 12 } })))));
|
|
@@ -318,6 +318,87 @@ export declare const LayoutItem: {
|
|
|
318
318
|
fullscreen: {
|
|
319
319
|
type: string;
|
|
320
320
|
};
|
|
321
|
+
analyticsEvents: {
|
|
322
|
+
oneOf: ({
|
|
323
|
+
optionName: string;
|
|
324
|
+
type: string;
|
|
325
|
+
additionalProperties: {
|
|
326
|
+
type: string;
|
|
327
|
+
};
|
|
328
|
+
required: string[];
|
|
329
|
+
properties: {
|
|
330
|
+
name: {
|
|
331
|
+
type: string;
|
|
332
|
+
};
|
|
333
|
+
type: {
|
|
334
|
+
type: string;
|
|
335
|
+
};
|
|
336
|
+
counters: {
|
|
337
|
+
type: string;
|
|
338
|
+
additionalProperties: boolean;
|
|
339
|
+
required: never[];
|
|
340
|
+
properties: {
|
|
341
|
+
include: {
|
|
342
|
+
type: string;
|
|
343
|
+
items: {
|
|
344
|
+
type: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
exclude: {
|
|
348
|
+
type: string;
|
|
349
|
+
items: {
|
|
350
|
+
type: string;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
context: {
|
|
356
|
+
type: string;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
items?: undefined;
|
|
360
|
+
} | {
|
|
361
|
+
type: string;
|
|
362
|
+
items: {
|
|
363
|
+
type: string;
|
|
364
|
+
additionalProperties: {
|
|
365
|
+
type: string;
|
|
366
|
+
};
|
|
367
|
+
required: string[];
|
|
368
|
+
properties: {
|
|
369
|
+
name: {
|
|
370
|
+
type: string;
|
|
371
|
+
};
|
|
372
|
+
type: {
|
|
373
|
+
type: string;
|
|
374
|
+
};
|
|
375
|
+
counters: {
|
|
376
|
+
type: string;
|
|
377
|
+
additionalProperties: boolean;
|
|
378
|
+
required: never[];
|
|
379
|
+
properties: {
|
|
380
|
+
include: {
|
|
381
|
+
type: string;
|
|
382
|
+
items: {
|
|
383
|
+
type: string;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
exclude: {
|
|
387
|
+
type: string;
|
|
388
|
+
items: {
|
|
389
|
+
type: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
context: {
|
|
395
|
+
type: string;
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
optionName: string;
|
|
400
|
+
})[];
|
|
401
|
+
};
|
|
321
402
|
type: {};
|
|
322
403
|
when: {
|
|
323
404
|
type: string;
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const schema_1 = tslib_1.__importDefault(require("../../components/MetaInfo/schema"));
|
|
7
7
|
const common_1 = require("../../schema/validators/common");
|
|
8
|
+
const event_1 = require("../../schema/validators/event");
|
|
8
9
|
const schema_2 = require("../../sub-blocks/Content/schema");
|
|
9
10
|
exports.LayoutItem = {
|
|
10
11
|
type: 'object',
|
|
@@ -14,5 +15,14 @@ exports.LayoutItem = {
|
|
|
14
15
|
type: 'boolean',
|
|
15
16
|
}, fullscreen: {
|
|
16
17
|
type: 'boolean',
|
|
18
|
+
}, analyticsEvents: {
|
|
19
|
+
oneOf: [
|
|
20
|
+
Object.assign(Object.assign({}, event_1.AnalyticsEventSchema), { optionName: 'single' }),
|
|
21
|
+
{
|
|
22
|
+
type: 'array',
|
|
23
|
+
items: event_1.AnalyticsEventSchema,
|
|
24
|
+
optionName: 'list',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
17
27
|
} }),
|
|
18
28
|
};
|
|
@@ -6,8 +6,8 @@ const components_1 = require("../../components");
|
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
7
|
const b = (0, utils_1.block)('MediaCard');
|
|
8
8
|
const MediaCard = (_a) => {
|
|
9
|
-
var { border } = _a, mediaProps = tslib_1.__rest(_a, ["border"]);
|
|
10
|
-
return (react_1.default.createElement(components_1.CardBase, { className: b(), bodyClassName: b('body'), border: border },
|
|
9
|
+
var { border, analyticsEvents } = _a, mediaProps = tslib_1.__rest(_a, ["border", "analyticsEvents"]);
|
|
10
|
+
return (react_1.default.createElement(components_1.CardBase, { className: b(), bodyClassName: b('body'), border: border, analyticsEvents: analyticsEvents },
|
|
11
11
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
12
12
|
react_1.default.createElement(components_1.Media, Object.assign({}, mediaProps)))));
|
|
13
13
|
};
|
|
@@ -3,6 +3,87 @@ export declare const MediaCardBlock: {
|
|
|
3
3
|
additionalProperties: boolean;
|
|
4
4
|
required: never[];
|
|
5
5
|
properties: {
|
|
6
|
+
analyticsEvents: {
|
|
7
|
+
oneOf: ({
|
|
8
|
+
optionName: string;
|
|
9
|
+
type: string;
|
|
10
|
+
additionalProperties: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
properties: {
|
|
15
|
+
name: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
type: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
counters: {
|
|
22
|
+
type: string;
|
|
23
|
+
additionalProperties: boolean;
|
|
24
|
+
required: never[];
|
|
25
|
+
properties: {
|
|
26
|
+
include: {
|
|
27
|
+
type: string;
|
|
28
|
+
items: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exclude: {
|
|
33
|
+
type: string;
|
|
34
|
+
items: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
context: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
items?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
type: string;
|
|
47
|
+
items: {
|
|
48
|
+
type: string;
|
|
49
|
+
additionalProperties: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
required: string[];
|
|
53
|
+
properties: {
|
|
54
|
+
name: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
type: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
counters: {
|
|
61
|
+
type: string;
|
|
62
|
+
additionalProperties: boolean;
|
|
63
|
+
required: never[];
|
|
64
|
+
properties: {
|
|
65
|
+
include: {
|
|
66
|
+
type: string;
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
exclude: {
|
|
72
|
+
type: string;
|
|
73
|
+
items: {
|
|
74
|
+
type: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
context: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
optionName: string;
|
|
85
|
+
})[];
|
|
86
|
+
};
|
|
6
87
|
animated: {
|
|
7
88
|
type: string;
|
|
8
89
|
};
|
|
@@ -147,84 +228,6 @@ export declare const MediaCardBlock: {
|
|
|
147
228
|
fullscreen: {
|
|
148
229
|
type: string;
|
|
149
230
|
};
|
|
150
|
-
analyticsEvents: {
|
|
151
|
-
anyOf: ({
|
|
152
|
-
type: string;
|
|
153
|
-
additionalProperties: {
|
|
154
|
-
type: string;
|
|
155
|
-
};
|
|
156
|
-
required: string[];
|
|
157
|
-
properties: {
|
|
158
|
-
name: {
|
|
159
|
-
type: string;
|
|
160
|
-
};
|
|
161
|
-
type: {
|
|
162
|
-
type: string;
|
|
163
|
-
};
|
|
164
|
-
counters: {
|
|
165
|
-
type: string;
|
|
166
|
-
additionalProperties: boolean;
|
|
167
|
-
required: never[];
|
|
168
|
-
properties: {
|
|
169
|
-
include: {
|
|
170
|
-
type: string;
|
|
171
|
-
items: {
|
|
172
|
-
type: string;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
exclude: {
|
|
176
|
-
type: string;
|
|
177
|
-
items: {
|
|
178
|
-
type: string;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
context: {
|
|
184
|
-
type: string;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
} | {
|
|
188
|
-
type: string;
|
|
189
|
-
items: {
|
|
190
|
-
type: string;
|
|
191
|
-
additionalProperties: {
|
|
192
|
-
type: string;
|
|
193
|
-
};
|
|
194
|
-
required: string[];
|
|
195
|
-
properties: {
|
|
196
|
-
name: {
|
|
197
|
-
type: string;
|
|
198
|
-
};
|
|
199
|
-
type: {
|
|
200
|
-
type: string;
|
|
201
|
-
};
|
|
202
|
-
counters: {
|
|
203
|
-
type: string;
|
|
204
|
-
additionalProperties: boolean;
|
|
205
|
-
required: never[];
|
|
206
|
-
properties: {
|
|
207
|
-
include: {
|
|
208
|
-
type: string;
|
|
209
|
-
items: {
|
|
210
|
-
type: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
exclude: {
|
|
214
|
-
type: string;
|
|
215
|
-
items: {
|
|
216
|
-
type: string;
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
context: {
|
|
222
|
-
type: string;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
})[];
|
|
227
|
-
};
|
|
228
231
|
border: {
|
|
229
232
|
type: string;
|
|
230
233
|
enum: string[];
|
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MediaCardBlock = void 0;
|
|
4
4
|
const common_1 = require("../../schema/validators/common");
|
|
5
|
+
const event_1 = require("../../schema/validators/event");
|
|
5
6
|
exports.MediaCardBlock = {
|
|
6
7
|
'media-card': {
|
|
7
8
|
additionalProperties: false,
|
|
8
9
|
required: [],
|
|
9
|
-
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), common_1.MediaProps), common_1.AnimatableProps),
|
|
10
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.CardBase), common_1.MediaProps), common_1.AnimatableProps), { analyticsEvents: {
|
|
11
|
+
oneOf: [
|
|
12
|
+
Object.assign(Object.assign({}, event_1.AnalyticsEventSchema), { optionName: 'single' }),
|
|
13
|
+
{
|
|
14
|
+
type: 'array',
|
|
15
|
+
items: event_1.AnalyticsEventSchema,
|
|
16
|
+
optionName: 'list',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
} }),
|
|
10
20
|
},
|
|
11
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CardBorder, PriceDescriptionProps, PriceDetailsListProps, PriceDetailsSettingsProps, PriceItemProps } from '../../../models';
|
|
3
|
-
interface CombinedPriceDetailedProps {
|
|
2
|
+
import { AnalyticsEventsBase, CardBorder, PriceDescriptionProps, PriceDetailsListProps, PriceDetailsSettingsProps, PriceItemProps } from '../../../models';
|
|
3
|
+
interface CombinedPriceDetailedProps extends AnalyticsEventsBase {
|
|
4
4
|
items: PriceItemProps[];
|
|
5
5
|
numberGroupItems: number;
|
|
6
6
|
useMixedView?: boolean;
|
|
@@ -14,7 +14,7 @@ const CombinedPricesGroupSize = {
|
|
|
14
14
|
[grid_1.GridColumnSize.Lg]: 3,
|
|
15
15
|
};
|
|
16
16
|
const CombinedPriceDetailed = (props) => {
|
|
17
|
-
const { items, numberGroupItems, border, useMixedView, getDescriptionComponent, getDetailsComponent, } = props;
|
|
17
|
+
const { items, numberGroupItems, border, useMixedView, getDescriptionComponent, getDetailsComponent, analyticsEvents, } = props;
|
|
18
18
|
const [groupItemsSize, setGroupItemsSize] = (0, react_1.useState)(numberGroupItems);
|
|
19
19
|
const updateGroupItemsSize = (0, react_1.useCallback)((windowWidth) => {
|
|
20
20
|
if (windowWidth >= constants_1.BREAKPOINTS.lg) {
|
|
@@ -51,7 +51,7 @@ const CombinedPriceDetailed = (props) => {
|
|
|
51
51
|
react_1.default.createElement("div", { className: b('description', { delimiter: useMixedView }) }, detailsComponents)));
|
|
52
52
|
};
|
|
53
53
|
const chunkedItems = lodash_1.default.chunk(items, groupItemsSize);
|
|
54
|
-
return (react_1.default.createElement(components_1.CardBase, { className: b(), border: border },
|
|
54
|
+
return (react_1.default.createElement(components_1.CardBase, { className: b(), border: border, analyticsEvents: analyticsEvents },
|
|
55
55
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
56
56
|
react_1.default.createElement(grid_1.Grid, null, chunkedItems.map((chunk, id) => {
|
|
57
57
|
return (react_1.default.createElement(grid_1.Row, { key: id, className: b('row') }, getPrice(chunk)));
|
|
@@ -7,9 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const b = (0, utils_1.block)('separate-price-detailed-block');
|
|
8
8
|
const SeparatePriceDetailed = (props) => {
|
|
9
9
|
const { items, border, getDescriptionComponent, getDetailsComponent } = props;
|
|
10
|
-
return (react_1.default.createElement(react_1.Fragment, null, items.map((
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
return (react_1.default.createElement(react_1.Fragment, null, items.map((_a, id) => {
|
|
11
|
+
var { analyticsEvents } = _a, item = tslib_1.__rest(_a, ["analyticsEvents"]);
|
|
12
|
+
return (react_1.default.createElement(components_1.CardBase, { key: id, className: b(), border: border, analyticsEvents: analyticsEvents },
|
|
13
|
+
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
14
|
+
getDescriptionComponent(item),
|
|
15
|
+
getDetailsComponent(item.items))));
|
|
16
|
+
})));
|
|
14
17
|
};
|
|
15
18
|
exports.default = SeparatePriceDetailed;
|