@gravity-ui/page-constructor 4.9.1-alpha.0 → 4.11.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.
Files changed (77) hide show
  1. package/build/cjs/blocks/CardLayout/CardLayout.d.ts +2 -2
  2. package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
  3. package/build/cjs/blocks/ContentLayout/schema.d.ts +38 -0
  4. package/build/cjs/components/Image/schema.d.ts +19 -0
  5. package/build/cjs/components/Image/schema.js +12 -1
  6. package/build/cjs/constructor-items.d.ts +2 -2
  7. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
  8. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -2
  9. package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
  10. package/build/cjs/models/constructor-items/common.d.ts +1 -1
  11. package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -4
  12. package/build/cjs/models/constructor.d.ts +6 -1
  13. package/build/cjs/schema/constants.d.ts +181 -78
  14. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  15. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +100 -0
  16. package/build/cjs/sub-blocks/BackgroundCard/schema.js +10 -0
  17. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  18. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +3 -3
  19. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +81 -0
  20. package/build/cjs/sub-blocks/LayoutItem/schema.js +10 -0
  21. package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  22. package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -2
  23. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +81 -78
  24. package/build/cjs/sub-blocks/MediaCard/schema.js +11 -1
  25. package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
  26. package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
  27. package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +7 -4
  28. package/build/cjs/sub-blocks/PriceDetailed/schema.js +11 -1
  29. package/build/cjs/text-transform/common.d.ts +2 -3
  30. package/build/cjs/text-transform/common.js +2 -7
  31. package/build/cjs/text-transform/transformers.d.ts +0 -2
  32. package/build/cjs/text-transform/transformers.js +8 -6
  33. package/build/esm/blocks/CardLayout/CardLayout.d.ts +2 -2
  34. package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
  35. package/build/esm/blocks/ContentLayout/schema.d.ts +38 -0
  36. package/build/esm/components/Image/schema.d.ts +19 -0
  37. package/build/esm/components/Image/schema.js +12 -1
  38. package/build/esm/constructor-items.d.ts +2 -2
  39. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
  40. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +1 -0
  41. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +4 -2
  42. package/build/esm/models/constructor-items/blocks.d.ts +1 -0
  43. package/build/esm/models/constructor-items/common.d.ts +1 -1
  44. package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -4
  45. package/build/esm/models/constructor.d.ts +6 -1
  46. package/build/esm/schema/constants.d.ts +181 -78
  47. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  48. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +100 -0
  49. package/build/esm/sub-blocks/BackgroundCard/schema.js +10 -0
  50. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  51. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +3 -3
  52. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +81 -0
  53. package/build/esm/sub-blocks/LayoutItem/schema.js +10 -0
  54. package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  55. package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -2
  56. package/build/esm/sub-blocks/MediaCard/schema.d.ts +81 -78
  57. package/build/esm/sub-blocks/MediaCard/schema.js +11 -1
  58. package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
  59. package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
  60. package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +8 -4
  61. package/build/esm/sub-blocks/PriceDetailed/schema.js +11 -1
  62. package/build/esm/text-transform/common.d.ts +2 -3
  63. package/build/esm/text-transform/common.js +2 -6
  64. package/build/esm/text-transform/transformers.d.ts +0 -2
  65. package/build/esm/text-transform/transformers.js +8 -6
  66. package/package.json +1 -1
  67. package/server/models/constructor-items/blocks.d.ts +1 -0
  68. package/server/models/constructor-items/common.d.ts +1 -1
  69. package/server/models/constructor-items/sub-blocks.d.ts +4 -4
  70. package/server/models/constructor.d.ts +6 -1
  71. package/server/text-transform/common.d.ts +2 -3
  72. package/server/text-transform/common.js +2 -9
  73. package/server/text-transform/transformers.d.ts +0 -2
  74. package/server/text-transform/transformers.js +8 -6
  75. package/styles/mixins.scss +1 -0
  76. package/styles/storybook/common.scss +2 -0
  77. package/widget/index.js +1 -1
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CardLayoutBlockProps as CardLayoutBlockParams, WithChildren } from '../../models';
3
- export type CardLayoutBlockProps = WithChildren<Omit<CardLayoutBlockParams, 'children'>>;
2
+ import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps, WithChildren } from '../../models';
3
+ export type CardLayoutBlockProps = WithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
4
4
  declare const CardLayout: React.FC<CardLayoutBlockProps>;
5
5
  export default CardLayout;
@@ -11,7 +11,7 @@ const DEFAULT_SIZES = {
11
11
  md: 4,
12
12
  };
13
13
  const b = (0, utils_1.block)('card-layout-block');
14
- const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, }) => (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
14
+ const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, className, }) => (react_1.default.createElement(components_1.AnimateBlock, { className: b(null, className), animate: animated },
15
15
  (title || description) && react_1.default.createElement(components_1.Title, { title: title, subtitle: description }),
16
16
  react_1.default.createElement(grid_1.Row, null, react_1.default.Children.map(children, (child, index) => (react_1.default.createElement(grid_1.Col, { key: index, sizes: colSizes, className: b('item') }, child))))));
17
17
  exports.default = CardLayout;
@@ -15,6 +15,25 @@ export declare const ContentLayoutBlock: {
15
15
  type: string;
16
16
  pattern: string;
17
17
  };
18
+ style: {
19
+ type: string;
20
+ additionalProperties: boolean;
21
+ required: never[];
22
+ properties: {
23
+ backgroundColor: {
24
+ type: string;
25
+ };
26
+ height: {
27
+ type: string[];
28
+ };
29
+ width: {
30
+ type: string[];
31
+ };
32
+ color: {
33
+ type: string;
34
+ };
35
+ };
36
+ };
18
37
  alt: {
19
38
  type: string;
20
39
  contentType: string;
@@ -153,6 +172,25 @@ export declare const ContentLayoutBlock: {
153
172
  type: string;
154
173
  pattern: string;
155
174
  };
175
+ style: {
176
+ type: string;
177
+ additionalProperties: boolean;
178
+ required: never[];
179
+ properties: {
180
+ backgroundColor: {
181
+ type: string;
182
+ };
183
+ height: {
184
+ type: string[];
185
+ };
186
+ width: {
187
+ type: string[];
188
+ };
189
+ color: {
190
+ type: string;
191
+ };
192
+ };
193
+ };
156
194
  alt: {
157
195
  type: string;
158
196
  contentType: string;
@@ -34,6 +34,25 @@ export declare const ImageObjectProps: {
34
34
  type: string;
35
35
  pattern: string;
36
36
  };
37
+ style: {
38
+ type: string;
39
+ additionalProperties: boolean;
40
+ required: never[];
41
+ properties: {
42
+ backgroundColor: {
43
+ type: string;
44
+ };
45
+ height: {
46
+ type: string[];
47
+ };
48
+ width: {
49
+ type: string[];
50
+ };
51
+ color: {
52
+ type: string;
53
+ };
54
+ };
55
+ };
37
56
  alt: {
38
57
  type: string;
39
58
  contentType: string;
@@ -12,6 +12,17 @@ const ImageBase = {
12
12
  type: 'boolean',
13
13
  },
14
14
  };
15
+ const StyleBase = {
16
+ type: 'object',
17
+ additionalProperties: false,
18
+ required: [],
19
+ properties: {
20
+ backgroundColor: { type: 'string' },
21
+ height: { type: ['string', 'number'] },
22
+ width: { type: ['string', 'number'] },
23
+ color: { type: 'string' },
24
+ },
25
+ };
15
26
  exports.ImageDeviceProps = {
16
27
  type: 'object',
17
28
  additionalProperties: false,
@@ -31,7 +42,7 @@ exports.ImageObjectProps = {
31
42
  properties: Object.assign(Object.assign({}, ImageBase), { src: {
32
43
  type: 'string',
33
44
  pattern: exports.imageUrlPattern,
34
- } }),
45
+ }, style: StyleBase }),
35
46
  };
36
47
  exports.ImageProps = {
37
48
  oneOf: [
@@ -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("./sub-blocks/Content/Content").ContentProps) => JSX.Element;
@@ -0,0 +1,38 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-constructor-block.pc-constructor-block_indentTop_0 {
4
+ margin-top: 0;
5
+ }
6
+ .pc-constructor-block.pc-constructor-block_indentTop_xs {
7
+ margin-top: 16px;
8
+ }
9
+ .pc-constructor-block.pc-constructor-block_indentTop_s {
10
+ margin-top: 24px;
11
+ }
12
+ .pc-constructor-block.pc-constructor-block_indentTop_m {
13
+ margin-top: 32px;
14
+ }
15
+ .pc-constructor-block.pc-constructor-block_indentTop_l {
16
+ margin-top: 48px;
17
+ }
18
+ .pc-constructor-block.pc-constructor-block_indentTop_xl {
19
+ margin-top: 64px;
20
+ }
21
+ .pc-constructor-block.pc-constructor-block_indentBottom_0 {
22
+ padding-bottom: 0;
23
+ }
24
+ .pc-constructor-block.pc-constructor-block_indentBottom_xs {
25
+ padding-bottom: 16px;
26
+ }
27
+ .pc-constructor-block.pc-constructor-block_indentBottom_s {
28
+ padding-bottom: 24px;
29
+ }
30
+ .pc-constructor-block.pc-constructor-block_indentBottom_m {
31
+ padding-bottom: 32px;
32
+ }
33
+ .pc-constructor-block.pc-constructor-block_indentBottom_l {
34
+ padding-bottom: 48px;
35
+ }
36
+ .pc-constructor-block.pc-constructor-block_indentBottom_xl {
37
+ padding-bottom: 64px;
38
+ }
@@ -9,9 +9,10 @@ const BlockDecoration_1 = require("../../../../customization/BlockDecoration");
9
9
  const utils_1 = require("../../../../utils");
10
10
  const b = (0, utils_1.block)('constructor-block');
11
11
  const ConstructorBlock = ({ index = 0, data, children, }) => {
12
- const { type } = data;
12
+ const { type, indent } = data;
13
13
  const blockBaseProps = (0, react_1.useMemo)(() => lodash_1.default.pick(data, ['anchor', 'visible', 'resetPaddings']), [data]);
14
+ const { top, bottom } = indent || { top: 'l', bottom: 'l' };
14
15
  return (react_1.default.createElement(BlockDecoration_1.BlockDecoration, Object.assign({ type: type, index: index }, blockBaseProps),
15
- react_1.default.createElement(BlockBase_1.default, Object.assign({ className: b({ type }) }, blockBaseProps), children)));
16
+ react_1.default.createElement(BlockBase_1.default, Object.assign({ className: b({ type, indentTop: top, indentBottom: bottom }) }, blockBaseProps), children)));
16
17
  };
17
18
  exports.ConstructorBlock = ConstructorBlock;
@@ -32,6 +32,7 @@ export interface Childable {
32
32
  export interface BlockBaseProps {
33
33
  anchor?: AnchorProps;
34
34
  visible?: GridColumnSize;
35
+ /** @deprecated */
35
36
  resetPaddings?: boolean;
36
37
  qa?: string;
37
38
  }
@@ -287,7 +287,7 @@ export interface PriceDetailsListProps {
287
287
  export interface PriceDetailsProps {
288
288
  items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];
289
289
  }
290
- export interface PriceItemProps extends PriceDetailsProps, PriceDescriptionProps {
290
+ export interface PriceItemProps extends PriceDetailsProps, PriceDescriptionProps, AnalyticsEventsBase {
291
291
  }
292
292
  export interface PriceFoldableDetailsProps {
293
293
  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[];
@@ -6,7 +6,12 @@ export interface PageData {
6
6
  export interface Menu {
7
7
  title: string;
8
8
  }
9
- export type ConstructorBlock = ConstructorItem | CustomBlock;
9
+ export type ConstructorBlock = (ConstructorItem | CustomBlock) & {
10
+ indent?: {
11
+ top?: string;
12
+ bottom?: string;
13
+ };
14
+ };
10
15
  export interface PageContent extends Animatable {
11
16
  blocks: ConstructorBlock[];
12
17
  menu?: Menu;
@@ -205,6 +205,25 @@ export declare const cardSchemas: {
205
205
  type: string;
206
206
  pattern: string;
207
207
  };
208
+ style: {
209
+ type: string;
210
+ additionalProperties: boolean;
211
+ required: never[];
212
+ properties: {
213
+ backgroundColor: {
214
+ type: string;
215
+ };
216
+ height: {
217
+ type: string[];
218
+ };
219
+ width: {
220
+ type: string[];
221
+ };
222
+ color: {
223
+ type: string;
224
+ };
225
+ };
226
+ };
208
227
  alt: {
209
228
  type: string;
210
229
  contentType: string;
@@ -230,6 +249,87 @@ export declare const cardSchemas: {
230
249
  type: string;
231
250
  enum: string[];
232
251
  };
252
+ analyticsEvents: {
253
+ oneOf: ({
254
+ optionName: string;
255
+ type: string;
256
+ additionalProperties: {
257
+ type: string;
258
+ };
259
+ required: string[];
260
+ properties: {
261
+ name: {
262
+ type: string;
263
+ };
264
+ type: {
265
+ type: string;
266
+ };
267
+ counters: {
268
+ type: string;
269
+ additionalProperties: boolean;
270
+ required: never[];
271
+ properties: {
272
+ include: {
273
+ type: string;
274
+ items: {
275
+ type: string;
276
+ };
277
+ };
278
+ exclude: {
279
+ type: string;
280
+ items: {
281
+ type: string;
282
+ };
283
+ };
284
+ };
285
+ };
286
+ context: {
287
+ type: string;
288
+ };
289
+ };
290
+ items?: undefined;
291
+ } | {
292
+ type: string;
293
+ items: {
294
+ type: string;
295
+ additionalProperties: {
296
+ type: string;
297
+ };
298
+ required: string[];
299
+ properties: {
300
+ name: {
301
+ type: string;
302
+ };
303
+ type: {
304
+ type: string;
305
+ };
306
+ counters: {
307
+ type: string;
308
+ additionalProperties: boolean;
309
+ required: never[];
310
+ properties: {
311
+ include: {
312
+ type: string;
313
+ items: {
314
+ type: string;
315
+ };
316
+ };
317
+ exclude: {
318
+ type: string;
319
+ items: {
320
+ type: string;
321
+ };
322
+ };
323
+ };
324
+ };
325
+ context: {
326
+ type: string;
327
+ };
328
+ };
329
+ };
330
+ optionName: string;
331
+ })[];
332
+ };
233
333
  title: {
234
334
  oneOf: ({
235
335
  type: string;
@@ -708,6 +808,87 @@ export declare const cardSchemas: {
708
808
  additionalProperties: boolean;
709
809
  required: never[];
710
810
  properties: {
811
+ analyticsEvents: {
812
+ oneOf: ({
813
+ optionName: string;
814
+ type: string;
815
+ additionalProperties: {
816
+ type: string;
817
+ };
818
+ required: string[];
819
+ properties: {
820
+ name: {
821
+ type: string;
822
+ };
823
+ type: {
824
+ type: string;
825
+ };
826
+ counters: {
827
+ type: string;
828
+ additionalProperties: boolean;
829
+ required: never[];
830
+ properties: {
831
+ include: {
832
+ type: string;
833
+ items: {
834
+ type: string;
835
+ };
836
+ };
837
+ exclude: {
838
+ type: string;
839
+ items: {
840
+ type: string;
841
+ };
842
+ };
843
+ };
844
+ };
845
+ context: {
846
+ type: string;
847
+ };
848
+ };
849
+ items?: undefined;
850
+ } | {
851
+ type: string;
852
+ items: {
853
+ type: string;
854
+ additionalProperties: {
855
+ type: string;
856
+ };
857
+ required: string[];
858
+ properties: {
859
+ name: {
860
+ type: string;
861
+ };
862
+ type: {
863
+ type: string;
864
+ };
865
+ counters: {
866
+ type: string;
867
+ additionalProperties: boolean;
868
+ required: never[];
869
+ properties: {
870
+ include: {
871
+ type: string;
872
+ items: {
873
+ type: string;
874
+ };
875
+ };
876
+ exclude: {
877
+ type: string;
878
+ items: {
879
+ type: string;
880
+ };
881
+ };
882
+ };
883
+ };
884
+ context: {
885
+ type: string;
886
+ };
887
+ };
888
+ };
889
+ optionName: string;
890
+ })[];
891
+ };
711
892
  animated: {
712
893
  type: string;
713
894
  };
@@ -852,84 +1033,6 @@ export declare const cardSchemas: {
852
1033
  fullscreen: {
853
1034
  type: string;
854
1035
  };
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
1036
  border: {
934
1037
  type: string;
935
1038
  enum: string[];
@@ -8,11 +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
14
  const borderType = hasBackgroundColor ? 'none' : border;
15
- return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType },
15
+ return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType, analyticsEvents: analyticsEvents },
16
16
  react_1.default.createElement(components_1.CardBase.Content, null,
17
17
  react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
18
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;