@gravity-ui/page-constructor 3.18.0 → 3.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/Header/Header.css +0 -6
- package/build/cjs/components/CardBase/CardBase.css +4 -4
- package/build/cjs/constructor-items.d.ts +2 -2
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -4
- package/build/cjs/schema/constants.d.ts +162 -78
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +81 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +10 -0
- 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/esm/blocks/Header/Header.css +0 -6
- package/build/esm/components/CardBase/CardBase.css +4 -4
- package/build/esm/constructor-items.d.ts +2 -2
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -4
- package/build/esm/schema/constants.d.ts +162 -78
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +81 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +10 -0
- 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/package.json +1 -1
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +4 -4
- package/styles/mixins.scss +3 -1
- package/widget/index.js +1 -1
|
@@ -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;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PriceDetailedBlock = void 0;
|
|
4
4
|
const common_1 = require("../../schema/validators/common");
|
|
5
|
+
const event_1 = require("../../schema/validators/event");
|
|
5
6
|
const utils_1 = require("../../schema/validators/utils");
|
|
6
7
|
const PriceDetailedDetailsType = ['marked-list', 'settings'];
|
|
7
8
|
const PriceDetailedDescriptionColor = ['cornflower', 'black'];
|
|
@@ -137,7 +138,16 @@ const PriceItem = {
|
|
|
137
138
|
type: 'object',
|
|
138
139
|
additionalProperties: false,
|
|
139
140
|
required: ['title', 'description'],
|
|
140
|
-
properties: Object.assign(Object.assign({}, PriceDetailsProps), PriceDescriptionProps),
|
|
141
|
+
properties: Object.assign(Object.assign(Object.assign({}, PriceDetailsProps), PriceDescriptionProps), { analyticsEvents: {
|
|
142
|
+
oneOf: [
|
|
143
|
+
Object.assign(Object.assign({}, event_1.AnalyticsEventSchema), { optionName: 'single' }),
|
|
144
|
+
{
|
|
145
|
+
type: 'array',
|
|
146
|
+
items: event_1.AnalyticsEventSchema,
|
|
147
|
+
optionName: 'list',
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
} }),
|
|
141
151
|
};
|
|
142
152
|
exports.PriceDetailedBlock = {
|
|
143
153
|
'price-detailed': {
|
|
@@ -31,9 +31,6 @@ unpredictable css rules order in build */
|
|
|
31
31
|
.pc-quote_border_line {
|
|
32
32
|
border: 1px solid var(--yc-color-line-generic);
|
|
33
33
|
}
|
|
34
|
-
.pc-quote_border_line, .pc-quote_border_none {
|
|
35
|
-
cursor: default;
|
|
36
|
-
}
|
|
37
34
|
@media (min-width: 577px) {
|
|
38
35
|
.slick-slide:not(.slick-active) .pc-quote {
|
|
39
36
|
box-shadow: none;
|
|
@@ -75,10 +75,6 @@ unpredictable css rules order in build */
|
|
|
75
75
|
}
|
|
76
76
|
.pc-header-block__description {
|
|
77
77
|
margin-top: 16px;
|
|
78
|
-
font-weight: normal;
|
|
79
|
-
font-size: var(--yc-text-caption-2-font-size);
|
|
80
|
-
line-height: var(--yc-text-caption-2-line-height);
|
|
81
|
-
margin-block-end: var(--yc-text-body-1-line-height);
|
|
82
78
|
}
|
|
83
79
|
.pc-header-block__description .yfm,
|
|
84
80
|
.pc-header-block__description .yfm * {
|
|
@@ -170,9 +166,7 @@ unpredictable css rules order in build */
|
|
|
170
166
|
.pc-header-block__overtitle {
|
|
171
167
|
font-size: var(--yc-text-body-3-font-size);
|
|
172
168
|
line-height: var(--yc-text-body-3-line-height);
|
|
173
|
-
margin-block-start: var(--yc-text-body-3-line-height);
|
|
174
169
|
margin-bottom: 8px;
|
|
175
|
-
font-weight: 400;
|
|
176
170
|
}
|
|
177
171
|
.pc-header-block__overtitle a {
|
|
178
172
|
outline: none;
|
|
@@ -22,9 +22,6 @@ unpredictable css rules order in build */
|
|
|
22
22
|
.pc-card-base-block_border_line {
|
|
23
23
|
border: 1px solid var(--yc-color-line-generic);
|
|
24
24
|
}
|
|
25
|
-
.pc-card-base-block_border_line, .pc-card-base-block_border_none {
|
|
26
|
-
cursor: default;
|
|
27
|
-
}
|
|
28
25
|
@media (min-width: 577px) {
|
|
29
26
|
.slick-slide:not(.slick-active) .pc-card-base-block {
|
|
30
27
|
box-shadow: none;
|
|
@@ -80,7 +77,10 @@ a.pc-card-base-block_border_line {
|
|
|
80
77
|
border: 1px solid var(--yc-color-line-generic);
|
|
81
78
|
}
|
|
82
79
|
a.pc-card-base-block_border_line, a.pc-card-base-block_border_none {
|
|
83
|
-
|
|
80
|
+
transition: transform 0.3s ease-out;
|
|
81
|
+
}
|
|
82
|
+
a.pc-card-base-block_border_line:hover, a.pc-card-base-block_border_none:hover {
|
|
83
|
+
transform: translateY(-8px);
|
|
84
84
|
}
|
|
85
85
|
a.pc-card-base-block_border_shadow {
|
|
86
86
|
transition: transform 0.3s ease-out;
|
|
@@ -21,9 +21,9 @@ export declare const blockMap: {
|
|
|
21
21
|
export declare const subBlockMap: {
|
|
22
22
|
divider: ({ size, border }: import("./models").DividerProps) => JSX.Element;
|
|
23
23
|
"price-detailed": (props: import("./models").PriceDetailedProps) => JSX.Element;
|
|
24
|
-
"media-card": ({ border, ...mediaProps }: import("./models").MediaCardProps) => JSX.Element;
|
|
24
|
+
"media-card": ({ border, analyticsEvents, ...mediaProps }: import("./models").MediaCardProps) => JSX.Element;
|
|
25
25
|
"banner-card": (props: import("./models").BannerCardProps) => JSX.Element;
|
|
26
|
-
"layout-item": ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
26
|
+
"layout-item": ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, analyticsEvents, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
27
27
|
"background-card": (props: import("./models").BackgroundCardProps) => JSX.Element;
|
|
28
28
|
"basic-card": (props: import("./models").BasicCardProps) => JSX.Element;
|
|
29
29
|
content: (props: import("./models").ContentBlockProps & import("./models").ClassNameProps) => JSX.Element;
|
|
@@ -284,7 +284,7 @@ export interface PriceDetailsListProps {
|
|
|
284
284
|
export interface PriceDetailsProps {
|
|
285
285
|
items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];
|
|
286
286
|
}
|
|
287
|
-
export interface PriceItemProps extends PriceDetailsProps, PriceDescriptionProps {
|
|
287
|
+
export interface PriceItemProps extends PriceDetailsProps, PriceDescriptionProps, AnalyticsEventsBase {
|
|
288
288
|
}
|
|
289
289
|
export interface PriceFoldableDetailsProps {
|
|
290
290
|
title: string;
|
|
@@ -71,13 +71,13 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
71
71
|
buttonText?: string;
|
|
72
72
|
theme?: TextTheme;
|
|
73
73
|
}
|
|
74
|
-
export interface BackgroundCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
74
|
+
export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
75
75
|
url?: string;
|
|
76
76
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
77
77
|
paddingBottom?: 's' | 'm' | 'l' | 'xl';
|
|
78
78
|
backgroundColor?: string;
|
|
79
79
|
}
|
|
80
|
-
export interface BasicCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
80
|
+
export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
81
81
|
url: string;
|
|
82
82
|
icon?: ImageProps;
|
|
83
83
|
target?: string;
|
|
@@ -92,9 +92,9 @@ export interface BannerCardProps {
|
|
|
92
92
|
theme?: TextTheme;
|
|
93
93
|
button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
|
|
94
94
|
}
|
|
95
|
-
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
95
|
+
export interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {
|
|
96
96
|
}
|
|
97
|
-
export interface LayoutItemProps extends ClassNameProps {
|
|
97
|
+
export interface LayoutItemProps extends ClassNameProps, AnalyticsEventsBase {
|
|
98
98
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
99
99
|
media: MediaProps;
|
|
100
100
|
metaInfo?: string[];
|
|
@@ -230,6 +230,87 @@ export declare const cardSchemas: {
|
|
|
230
230
|
type: string;
|
|
231
231
|
enum: string[];
|
|
232
232
|
};
|
|
233
|
+
analyticsEvents: {
|
|
234
|
+
oneOf: ({
|
|
235
|
+
optionName: string;
|
|
236
|
+
type: string;
|
|
237
|
+
additionalProperties: {
|
|
238
|
+
type: string;
|
|
239
|
+
};
|
|
240
|
+
required: string[];
|
|
241
|
+
properties: {
|
|
242
|
+
name: {
|
|
243
|
+
type: string;
|
|
244
|
+
};
|
|
245
|
+
type: {
|
|
246
|
+
type: string;
|
|
247
|
+
};
|
|
248
|
+
counters: {
|
|
249
|
+
type: string;
|
|
250
|
+
additionalProperties: boolean;
|
|
251
|
+
required: never[];
|
|
252
|
+
properties: {
|
|
253
|
+
include: {
|
|
254
|
+
type: string;
|
|
255
|
+
items: {
|
|
256
|
+
type: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
exclude: {
|
|
260
|
+
type: string;
|
|
261
|
+
items: {
|
|
262
|
+
type: string;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
context: {
|
|
268
|
+
type: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
items?: undefined;
|
|
272
|
+
} | {
|
|
273
|
+
type: string;
|
|
274
|
+
items: {
|
|
275
|
+
type: string;
|
|
276
|
+
additionalProperties: {
|
|
277
|
+
type: string;
|
|
278
|
+
};
|
|
279
|
+
required: string[];
|
|
280
|
+
properties: {
|
|
281
|
+
name: {
|
|
282
|
+
type: string;
|
|
283
|
+
};
|
|
284
|
+
type: {
|
|
285
|
+
type: string;
|
|
286
|
+
};
|
|
287
|
+
counters: {
|
|
288
|
+
type: string;
|
|
289
|
+
additionalProperties: boolean;
|
|
290
|
+
required: never[];
|
|
291
|
+
properties: {
|
|
292
|
+
include: {
|
|
293
|
+
type: string;
|
|
294
|
+
items: {
|
|
295
|
+
type: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
exclude: {
|
|
299
|
+
type: string;
|
|
300
|
+
items: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
context: {
|
|
307
|
+
type: string;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
optionName: string;
|
|
312
|
+
})[];
|
|
313
|
+
};
|
|
233
314
|
title: {
|
|
234
315
|
oneOf: ({
|
|
235
316
|
type: string;
|
|
@@ -708,6 +789,87 @@ export declare const cardSchemas: {
|
|
|
708
789
|
additionalProperties: boolean;
|
|
709
790
|
required: never[];
|
|
710
791
|
properties: {
|
|
792
|
+
analyticsEvents: {
|
|
793
|
+
oneOf: ({
|
|
794
|
+
optionName: string;
|
|
795
|
+
type: string;
|
|
796
|
+
additionalProperties: {
|
|
797
|
+
type: string;
|
|
798
|
+
};
|
|
799
|
+
required: string[];
|
|
800
|
+
properties: {
|
|
801
|
+
name: {
|
|
802
|
+
type: string;
|
|
803
|
+
};
|
|
804
|
+
type: {
|
|
805
|
+
type: string;
|
|
806
|
+
};
|
|
807
|
+
counters: {
|
|
808
|
+
type: string;
|
|
809
|
+
additionalProperties: boolean;
|
|
810
|
+
required: never[];
|
|
811
|
+
properties: {
|
|
812
|
+
include: {
|
|
813
|
+
type: string;
|
|
814
|
+
items: {
|
|
815
|
+
type: string;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
exclude: {
|
|
819
|
+
type: string;
|
|
820
|
+
items: {
|
|
821
|
+
type: string;
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
context: {
|
|
827
|
+
type: string;
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
items?: undefined;
|
|
831
|
+
} | {
|
|
832
|
+
type: string;
|
|
833
|
+
items: {
|
|
834
|
+
type: string;
|
|
835
|
+
additionalProperties: {
|
|
836
|
+
type: string;
|
|
837
|
+
};
|
|
838
|
+
required: string[];
|
|
839
|
+
properties: {
|
|
840
|
+
name: {
|
|
841
|
+
type: string;
|
|
842
|
+
};
|
|
843
|
+
type: {
|
|
844
|
+
type: string;
|
|
845
|
+
};
|
|
846
|
+
counters: {
|
|
847
|
+
type: string;
|
|
848
|
+
additionalProperties: boolean;
|
|
849
|
+
required: never[];
|
|
850
|
+
properties: {
|
|
851
|
+
include: {
|
|
852
|
+
type: string;
|
|
853
|
+
items: {
|
|
854
|
+
type: string;
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
exclude: {
|
|
858
|
+
type: string;
|
|
859
|
+
items: {
|
|
860
|
+
type: string;
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
context: {
|
|
866
|
+
type: string;
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
optionName: string;
|
|
871
|
+
})[];
|
|
872
|
+
};
|
|
711
873
|
animated: {
|
|
712
874
|
type: string;
|
|
713
875
|
};
|
|
@@ -852,84 +1014,6 @@ export declare const cardSchemas: {
|
|
|
852
1014
|
fullscreen: {
|
|
853
1015
|
type: string;
|
|
854
1016
|
};
|
|
855
|
-
analyticsEvents: {
|
|
856
|
-
anyOf: ({
|
|
857
|
-
type: string;
|
|
858
|
-
additionalProperties: {
|
|
859
|
-
type: string;
|
|
860
|
-
};
|
|
861
|
-
required: string[];
|
|
862
|
-
properties: {
|
|
863
|
-
name: {
|
|
864
|
-
type: string;
|
|
865
|
-
};
|
|
866
|
-
type: {
|
|
867
|
-
type: string;
|
|
868
|
-
};
|
|
869
|
-
counters: {
|
|
870
|
-
type: string;
|
|
871
|
-
additionalProperties: boolean;
|
|
872
|
-
required: never[];
|
|
873
|
-
properties: {
|
|
874
|
-
include: {
|
|
875
|
-
type: string;
|
|
876
|
-
items: {
|
|
877
|
-
type: string;
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
exclude: {
|
|
881
|
-
type: string;
|
|
882
|
-
items: {
|
|
883
|
-
type: string;
|
|
884
|
-
};
|
|
885
|
-
};
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
|
-
context: {
|
|
889
|
-
type: string;
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
} | {
|
|
893
|
-
type: string;
|
|
894
|
-
items: {
|
|
895
|
-
type: string;
|
|
896
|
-
additionalProperties: {
|
|
897
|
-
type: string;
|
|
898
|
-
};
|
|
899
|
-
required: string[];
|
|
900
|
-
properties: {
|
|
901
|
-
name: {
|
|
902
|
-
type: string;
|
|
903
|
-
};
|
|
904
|
-
type: {
|
|
905
|
-
type: string;
|
|
906
|
-
};
|
|
907
|
-
counters: {
|
|
908
|
-
type: string;
|
|
909
|
-
additionalProperties: boolean;
|
|
910
|
-
required: never[];
|
|
911
|
-
properties: {
|
|
912
|
-
include: {
|
|
913
|
-
type: string;
|
|
914
|
-
items: {
|
|
915
|
-
type: string;
|
|
916
|
-
};
|
|
917
|
-
};
|
|
918
|
-
exclude: {
|
|
919
|
-
type: string;
|
|
920
|
-
items: {
|
|
921
|
-
type: string;
|
|
922
|
-
};
|
|
923
|
-
};
|
|
924
|
-
};
|
|
925
|
-
};
|
|
926
|
-
context: {
|
|
927
|
-
type: string;
|
|
928
|
-
};
|
|
929
|
-
};
|
|
930
|
-
};
|
|
931
|
-
})[];
|
|
932
|
-
};
|
|
933
1017
|
border: {
|
|
934
1018
|
type: string;
|
|
935
1019
|
enum: string[];
|
|
@@ -6,12 +6,11 @@ import Content from '../Content/Content';
|
|
|
6
6
|
import './BackgroundCard.css';
|
|
7
7
|
const b = block('background-card');
|
|
8
8
|
const BackgroundCard = (props) => {
|
|
9
|
-
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
|
|
9
|
+
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, } = props;
|
|
10
10
|
const { themeValue: theme } = useContext(ThemeValueContext);
|
|
11
11
|
const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
|
|
12
|
-
const link = hasBackgroundColor || border === 'line' ? undefined : url;
|
|
13
12
|
const borderType = hasBackgroundColor ? 'none' : border;
|
|
14
|
-
return (React.createElement(CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url:
|
|
13
|
+
return (React.createElement(CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType, analyticsEvents: analyticsEvents },
|
|
15
14
|
React.createElement(CardBase.Content, null,
|
|
16
15
|
React.createElement(BackgroundImage, Object.assign({ className: b('image') }, getThemedValue(background, theme), { style: { backgroundColor } })),
|
|
17
16
|
React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
|