@gravity-ui/page-constructor 8.6.0 → 8.7.2
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/HeaderSlider/schema.d.ts +1 -3
- package/build/cjs/blocks/Slider/schema.d.ts +48 -52
- package/build/cjs/blocks/Slider/schema.js +1 -1
- package/build/cjs/blocks/Slider/schema.js.map +1 -1
- package/build/cjs/blocks/SliderOld/schema.d.ts +30 -34
- package/build/cjs/blocks/SliderOld/schema.js +1 -1
- package/build/cjs/blocks/SliderOld/schema.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +81 -0
- package/build/cjs/sub-blocks/ImageCard/ImageCard.js +7 -2
- package/build/cjs/sub-blocks/ImageCard/ImageCard.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.d.ts +81 -0
- package/build/cjs/sub-blocks/ImageCard/schema.js +14 -0
- package/build/cjs/sub-blocks/ImageCard/schema.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/schema.d.ts +1 -3
- package/build/esm/blocks/Slider/schema.d.ts +48 -52
- package/build/esm/blocks/Slider/schema.js +1 -1
- package/build/esm/blocks/Slider/schema.js.map +1 -1
- package/build/esm/blocks/SliderOld/schema.d.ts +30 -34
- package/build/esm/blocks/SliderOld/schema.js +1 -1
- package/build/esm/blocks/SliderOld/schema.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +81 -0
- package/build/esm/sub-blocks/ImageCard/ImageCard.js +8 -3
- package/build/esm/sub-blocks/ImageCard/ImageCard.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.d.ts +81 -0
- package/build/esm/sub-blocks/ImageCard/schema.js +14 -0
- package/build/esm/sub-blocks/ImageCard/schema.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +1 -1
- package/widget/index.js +1 -1
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
export declare const SliderProps: {
|
|
2
|
-
dots: {
|
|
3
|
-
type: string;
|
|
4
|
-
};
|
|
5
|
-
arrows: {
|
|
6
|
-
type: string;
|
|
7
|
-
};
|
|
8
|
-
randomOrder: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
autoplay: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
type: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
adaptive: {
|
|
18
|
-
type: string;
|
|
19
|
-
};
|
|
20
|
-
arrowSize: {
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
animated: {
|
|
24
|
-
animated: {
|
|
25
|
-
type: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
2
|
slidesToShow: {
|
|
29
3
|
oneOf: ({
|
|
30
4
|
type: string;
|
|
@@ -91,6 +65,30 @@ export declare const SliderProps: {
|
|
|
91
65
|
$ref: string;
|
|
92
66
|
};
|
|
93
67
|
};
|
|
68
|
+
animated: {
|
|
69
|
+
type: string;
|
|
70
|
+
};
|
|
71
|
+
dots: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
arrows: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
randomOrder: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
autoplay: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
type: {
|
|
84
|
+
type: string;
|
|
85
|
+
};
|
|
86
|
+
adaptive: {
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
arrowSize: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
94
92
|
};
|
|
95
93
|
export declare const SliderBlock: {
|
|
96
94
|
'slider-block': {
|
|
@@ -210,32 +208,6 @@ export declare const SliderBlock: {
|
|
|
210
208
|
contentType: string;
|
|
211
209
|
inputType: string;
|
|
212
210
|
};
|
|
213
|
-
dots: {
|
|
214
|
-
type: string;
|
|
215
|
-
};
|
|
216
|
-
arrows: {
|
|
217
|
-
type: string;
|
|
218
|
-
};
|
|
219
|
-
randomOrder: {
|
|
220
|
-
type: string;
|
|
221
|
-
};
|
|
222
|
-
autoplay: {
|
|
223
|
-
type: string;
|
|
224
|
-
};
|
|
225
|
-
type: {
|
|
226
|
-
type: string;
|
|
227
|
-
};
|
|
228
|
-
adaptive: {
|
|
229
|
-
type: string;
|
|
230
|
-
};
|
|
231
|
-
arrowSize: {
|
|
232
|
-
type: string;
|
|
233
|
-
};
|
|
234
|
-
animated: {
|
|
235
|
-
animated: {
|
|
236
|
-
type: string;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
211
|
slidesToShow: {
|
|
240
212
|
oneOf: ({
|
|
241
213
|
type: string;
|
|
@@ -302,6 +274,30 @@ export declare const SliderBlock: {
|
|
|
302
274
|
$ref: string;
|
|
303
275
|
};
|
|
304
276
|
};
|
|
277
|
+
animated: {
|
|
278
|
+
type: string;
|
|
279
|
+
};
|
|
280
|
+
dots: {
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
283
|
+
arrows: {
|
|
284
|
+
type: string;
|
|
285
|
+
};
|
|
286
|
+
randomOrder: {
|
|
287
|
+
type: string;
|
|
288
|
+
};
|
|
289
|
+
autoplay: {
|
|
290
|
+
type: string;
|
|
291
|
+
};
|
|
292
|
+
type: {
|
|
293
|
+
type: string;
|
|
294
|
+
};
|
|
295
|
+
adaptive: {
|
|
296
|
+
type: string;
|
|
297
|
+
};
|
|
298
|
+
arrowSize: {
|
|
299
|
+
type: string;
|
|
300
|
+
};
|
|
305
301
|
anchor: {
|
|
306
302
|
type: string;
|
|
307
303
|
additionalProperties: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js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AAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;KAClB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACT,IAAI,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,QAAQ;KACjB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;KACjB;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,SAAS;KAClB;IACD,SAAS,EAAE;QACP,IAAI,EAAE,QAAQ;KACjB;IACD,GAAG,eAAe;IAClB,YAAY,EAAE,iBAAiB;IAC/B,UAAU,EAAE,eAAe;IAC3B,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE,kBAAkB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,cAAc,EAAE;QACZ,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE;YACR,GAAG,cAAc;YACjB,GAAG,eAAe;YAClB,GAAG,WAAW;YACd,GAAG,gBAAgB;SACtB;KACJ;CACJ,CAAC","sourcesContent":["import {\n AnimatableProps,\n BlockBaseProps,\n BlockHeaderProps,\n ChildrenCardsProps,\n sliderSizesObject,\n textSize,\n} from '../../schema/validators/common';\n\nconst LoadableProps = {\n additionalProperties: false,\n required: ['source'],\n properties: {\n source: {\n type: 'string',\n // add loadable sources here if you use it in your project\n // enum: ['my-loadable-source-1', 'my-loadable-source-1'],\n },\n /**\n * @deprecated\n */\n minCount: {\n type: 'number',\n },\n params: {\n type: 'object',\n patternProperties: {\n '.*': {\n oneOf: [\n {\n type: ['string', 'number', 'boolean'],\n },\n {\n type: 'object',\n additionalProperties: true,\n },\n {\n type: 'array',\n },\n ],\n },\n },\n },\n },\n // remove it in your custom validator schema if you use loadable\n disabled: true,\n};\n\nconst DisclaimerProps = {\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n size: {\n type: 'string',\n enum: textSize,\n },\n },\n};\n\nexport const SliderProps = {\n dots: {\n type: 'boolean',\n },\n arrows: {\n type: 'boolean',\n },\n randomOrder: {\n type: 'boolean',\n },\n autoplay: {\n type: 'number',\n },\n type: {\n type: 'string',\n },\n adaptive: {\n type: 'boolean',\n },\n arrowSize: {\n type: 'number',\n },\n ...AnimatableProps,\n slidesToShow: sliderSizesObject,\n disclaimer: DisclaimerProps,\n loadable: LoadableProps,\n children: ChildrenCardsProps,\n};\n\nexport const SliderBlock = {\n 'slider-block': {\n additionalProperties: false,\n required: [],\n properties: {\n ...BlockBaseProps,\n ...AnimatableProps,\n ...SliderProps,\n ...BlockHeaderProps,\n },\n },\n};\n"]}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
export declare const SliderOldProps: {
|
|
2
|
-
dots: {
|
|
3
|
-
type: string;
|
|
4
|
-
};
|
|
5
|
-
arrows: {
|
|
6
|
-
type: string;
|
|
7
|
-
};
|
|
8
|
-
randomOrder: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
autoplay: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
animated: {
|
|
15
|
-
animated: {
|
|
16
|
-
type: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
2
|
slidesToShow: {
|
|
20
3
|
oneOf: ({
|
|
21
4
|
type: string;
|
|
@@ -82,6 +65,21 @@ export declare const SliderOldProps: {
|
|
|
82
65
|
$ref: string;
|
|
83
66
|
};
|
|
84
67
|
};
|
|
68
|
+
animated: {
|
|
69
|
+
type: string;
|
|
70
|
+
};
|
|
71
|
+
dots: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
arrows: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
randomOrder: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
autoplay: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
85
83
|
};
|
|
86
84
|
/** @deprecated */
|
|
87
85
|
export declare const SliderOldBlock: {
|
|
@@ -202,23 +200,6 @@ export declare const SliderOldBlock: {
|
|
|
202
200
|
contentType: string;
|
|
203
201
|
inputType: string;
|
|
204
202
|
};
|
|
205
|
-
dots: {
|
|
206
|
-
type: string;
|
|
207
|
-
};
|
|
208
|
-
arrows: {
|
|
209
|
-
type: string;
|
|
210
|
-
};
|
|
211
|
-
randomOrder: {
|
|
212
|
-
type: string;
|
|
213
|
-
};
|
|
214
|
-
autoplay: {
|
|
215
|
-
type: string;
|
|
216
|
-
};
|
|
217
|
-
animated: {
|
|
218
|
-
animated: {
|
|
219
|
-
type: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
203
|
slidesToShow: {
|
|
223
204
|
oneOf: ({
|
|
224
205
|
type: string;
|
|
@@ -285,6 +266,21 @@ export declare const SliderOldBlock: {
|
|
|
285
266
|
$ref: string;
|
|
286
267
|
};
|
|
287
268
|
};
|
|
269
|
+
animated: {
|
|
270
|
+
type: string;
|
|
271
|
+
};
|
|
272
|
+
dots: {
|
|
273
|
+
type: string;
|
|
274
|
+
};
|
|
275
|
+
arrows: {
|
|
276
|
+
type: string;
|
|
277
|
+
};
|
|
278
|
+
randomOrder: {
|
|
279
|
+
type: string;
|
|
280
|
+
};
|
|
281
|
+
autoplay: {
|
|
282
|
+
type: string;
|
|
283
|
+
};
|
|
288
284
|
anchor: {
|
|
289
285
|
type: string;
|
|
290
286
|
additionalProperties: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SliderOld/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,GACX,0CAAuC;AAExC,MAAM,aAAa,GAAG;IAClB,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,0DAA0D;YAC1D,0DAA0D;SAC7D;QACD;;WAEG;QACH,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,iBAAiB,EAAE;gBACf,IAAI,EAAE;oBACF,KAAK,EAAE;wBACH;4BACI,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;yBACxC;wBACD;4BACI,IAAI,EAAE,QAAQ;4BACd,oBAAoB,EAAE,IAAI;yBAC7B;wBACD;4BACI,IAAI,EAAE,OAAO;yBAChB;qBACJ;iBACJ;aACJ;SACJ;KACJ;IACD,gEAAgE;IAChE,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF,MAAM,eAAe,GAAG;IACpB,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;KAClB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACT,IAAI,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,QAAQ;KACjB;IACD,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SliderOld/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,GACX,0CAAuC;AAExC,MAAM,aAAa,GAAG;IAClB,oB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,MAAM,cAAc,GAAG;IAC1B,kBAAkB,EAAE;QAChB,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE;YACR,GAAG,cAAc;YACjB,GAAG,eAAe;YAClB,GAAG,cAAc;YACjB,GAAG,gBAAgB;SACtB;KACJ;CACJ,CAAC","sourcesContent":["import {\n AnimatableProps,\n BlockBaseProps,\n BlockHeaderProps,\n ChildrenCardsProps,\n sliderSizesObject,\n textSize,\n} from '../../schema/validators/common';\n\nconst LoadableProps = {\n additionalProperties: false,\n required: ['source'],\n properties: {\n source: {\n type: 'string',\n // add loadable sources here if you use it in your project\n // enum: ['my-loadable-source-1', 'my-loadable-source-1'],\n },\n /**\n * @deprecated\n */\n minCount: {\n type: 'number',\n },\n params: {\n type: 'object',\n patternProperties: {\n '.*': {\n oneOf: [\n {\n type: ['string', 'number', 'boolean'],\n },\n {\n type: 'object',\n additionalProperties: true,\n },\n {\n type: 'array',\n },\n ],\n },\n },\n },\n },\n // remove it in your custom validator schema if you use loadable\n disabled: true,\n};\n\nconst DisclaimerProps = {\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n size: {\n type: 'string',\n enum: textSize,\n },\n },\n};\n\nexport const SliderOldProps = {\n dots: {\n type: 'boolean',\n },\n arrows: {\n type: 'boolean',\n },\n randomOrder: {\n type: 'boolean',\n },\n autoplay: {\n type: 'number',\n },\n ...AnimatableProps,\n slidesToShow: sliderSizesObject,\n disclaimer: DisclaimerProps,\n loadable: LoadableProps,\n children: ChildrenCardsProps,\n};\n\n/** @deprecated */\nexport const SliderOldBlock = {\n 'slider-old-block': {\n additionalProperties: false,\n required: [],\n properties: {\n ...BlockBaseProps,\n ...AnimatableProps,\n ...SliderOldProps,\n ...BlockHeaderProps,\n },\n },\n};\n"]}
|
|
@@ -155,7 +155,7 @@ export interface LayoutItemProps extends ClassNameProps, CardLayoutProps, Analyt
|
|
|
155
155
|
fullscreen?: boolean;
|
|
156
156
|
icon?: ThemeSupporting<PositionedIcon>;
|
|
157
157
|
}
|
|
158
|
-
export interface ImageCardProps extends CardBaseProps, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {
|
|
158
|
+
export interface ImageCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {
|
|
159
159
|
image: ThemeSupporting<ImageProps>;
|
|
160
160
|
enableImageBorderRadius?: boolean;
|
|
161
161
|
margins?: ImageCardMargins;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/sub-blocks.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAN,IAAY,YAoBX;AApBD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf;;OAEG;IACH,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,kDAAkC,CAAA;IAClC,wCAAwB,CAAA;IACxB,mCAAmB,CAAA;IACnB,4CAA4B,CAAA;IAC5B;;OAEG;IACH,6BAAa,CAAA;IACb,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;AAC5B,CAAC,EApBW,YAAY,KAAZ,YAAY,QAoBvB;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAkBD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import {ClassNameProps, GravityIconProps, QuoteType} from '../../models';\nimport {ThemeSupporting} from '../../utils';\nimport {\n HubspotEventData,\n HubspotEventHandlers,\n HubspotFormDefaultValues,\n} from '../../utils/hubspot';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {ContentBlockProps} from './blocks';\nimport {\n AuthorItem,\n ButtonProps,\n CardBaseProps,\n CardLayoutProps,\n ContentTheme,\n DividerSize,\n ImageCardMargins,\n ImageObjectProps,\n ImageProps,\n LayoutItemContentMargin,\n LinkProps,\n MediaProps,\n MediaView,\n PriceDetailedProps,\n TextTheme,\n Themable,\n ThemedImage,\n} from './common';\n\nexport enum SubBlockType {\n Divider = 'divider',\n Quote = 'quote',\n /**\n * @deprecated Will be removed\n */\n PriceDetailed = 'price-detailed',\n MediaCard = 'media-card',\n BannerCard = 'banner-card',\n LayoutItem = 'layout-item',\n BackgroundCard = 'background-card',\n BasicCard = 'basic-card',\n Content = 'content',\n HubspotForm = 'hubspot-form',\n /**\n * @deprecated Will be removed, use BasicCard instead\n */\n Card = 'card',\n PriceCard = 'price-card',\n ImageCard = 'image-card',\n}\n\nexport enum IconPosition {\n Top = 'top',\n Left = 'left',\n}\n\nexport interface PositionedIcon {\n value: ImageProps;\n position?: IconPosition;\n}\n\nexport interface PositionedGravityIcon {\n value: GravityIconProps;\n position?: IconPosition;\n}\n\nexport interface IconWrapperProps {\n icon?: PositionedIcon;\n gravityIcon?: PositionedGravityIcon;\n size?: 's' | 'm' | 'l' | 'xl';\n}\n\nexport enum ImageCardDirection {\n Direct = 'direct',\n Reverse = 'reverse',\n}\n\nexport const SubBlockTypes = Object.values(SubBlockType);\n\nexport interface DividerProps {\n size?: DividerSize;\n border?: boolean;\n}\n\nexport interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {\n className?: string;\n theme?: ContentTheme;\n isMobile?: boolean;\n region?: string;\n portalId: string;\n formId: string;\n formInstanceId?: string;\n formClassName?: string;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeLoad?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onLoad?: (arg: HubspotEventData) => void;\n hubspotEvents?: string[];\n createDOMElement?: boolean;\n defaultValues?: HubspotFormDefaultValues;\n}\n\n//cards\nexport interface QuoteProps extends Themable, CardBaseProps {\n text?: string;\n // for backward compatibility, yfmText will become property 'text' in major\n yfmText?: string;\n image: ThemedImage;\n logo: ThemeSupporting<ImageProps>;\n color?: string;\n /**\n * @deprecated use property button instead\n */\n url?: string;\n /**\n * @deprecated use property button instead\n */\n urlTitle?: string;\n author?: AuthorItem;\n /**\n * @deprecated use property button instead\n */\n buttonText?: string;\n theme?: TextTheme;\n quoteType?: QuoteType;\n button?: ButtonProps;\n}\n\nexport interface BackgroundCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'centered' | 'controlPosition'> {\n url?: string;\n urlTitle?: string;\n background?: ThemeSupporting<ImageObjectProps>;\n paddingBottom?: 's' | 'm' | 'l' | 'xl';\n backgroundColor?: string;\n}\n\nexport interface BasicCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition'> {\n url: string;\n urlTitle?: string;\n icon?: ThemeSupporting<ImageProps>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n target?: string;\n iconPosition?: IconPosition;\n /**\n * @deprecated This property will be removed in future versions\n */\n hoverBackgroundColor?: string;\n}\n\nexport interface BannerCardProps {\n title: string;\n subtitle?: string;\n className?: string;\n image?: ThemeSupporting<string>;\n disableCompress?: boolean;\n color?: ThemeSupporting<string>;\n theme?: TextTheme;\n button?: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;\n mediaView?: MediaView;\n}\n\nexport interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}\n\nexport interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {\n title: string;\n price: string;\n pricePeriod?: string;\n priceDetails?: string;\n description?: string;\n buttons?: ButtonProps[];\n links?: LinkProps[];\n backgroundColor?: string;\n list?: string[];\n}\n\nexport interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {\n content: Omit<ContentBlockProps, 'colSizes' | 'centered'>;\n contentMargin?: LayoutItemContentMargin;\n media?: ThemeSupporting<MediaProps>;\n metaInfo?: string[];\n border?: boolean;\n fullscreen?: boolean;\n icon?: ThemeSupporting<PositionedIcon>;\n}\n\nexport interface ImageCardProps\n extends CardBaseProps,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {\n image: ThemeSupporting<ImageProps>;\n enableImageBorderRadius?: boolean;\n margins?: ImageCardMargins;\n direction?: ImageCardDirection;\n backgroundColor?: string;\n url?: string;\n urlTitle?: string;\n target?: string;\n}\n\n// sub-block models\nexport type DividerModel = {\n type: SubBlockType.Divider;\n} & DividerProps;\n\nexport type QuoteModel = {\n type: SubBlockType.Quote;\n} & QuoteProps;\n\nexport type LayoutItemModel = {\n type: SubBlockType.LayoutItem;\n} & LayoutItemProps;\n\nexport type BackgroundCardModel = {\n type: SubBlockType.BackgroundCard;\n} & BackgroundCardProps;\n\n/** @deprecated */\nexport type PriceDetailedModel = {\n type: SubBlockType.PriceDetailed;\n} & PriceDetailedProps;\n\nexport type MediaCardModel = {\n type: SubBlockType.MediaCard;\n} & MediaCardProps;\n\nexport type HubspotFormModel = {\n type: SubBlockType.HubspotForm;\n} & HubspotFormProps;\n\nexport type BannerCardModel = {\n type: SubBlockType.BannerCard;\n} & BannerCardProps;\n\nexport type BasicCardModel = {\n type: SubBlockType.BasicCard;\n} & BasicCardProps;\n\nexport type PriceCardModel = {\n type: SubBlockType.PriceCard;\n} & PriceCardProps;\n\nexport type ImageCardModel = {\n type: SubBlockType.ImageCard;\n} & ImageCardProps;\n\nexport type SubBlockModels =\n | DividerModel\n | QuoteModel\n | PriceDetailedModel\n | MediaCardModel\n | BackgroundCardModel\n | HubspotFormModel\n | BannerCardModel\n | BasicCardModel\n | PriceCardModel\n | LayoutItemModel\n | ImageCardModel;\n\nexport type SubBlock = SubBlockModels;\n"]}
|
|
1
|
+
{"version":3,"file":"sub-blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/sub-blocks.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAN,IAAY,YAoBX;AApBD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf;;OAEG;IACH,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,kDAAkC,CAAA;IAClC,wCAAwB,CAAA;IACxB,mCAAmB,CAAA;IACnB,4CAA4B,CAAA;IAC5B;;OAEG;IACH,6BAAa,CAAA;IACb,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;AAC5B,CAAC,EApBW,YAAY,KAAZ,YAAY,QAoBvB;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAkBD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import {ClassNameProps, GravityIconProps, QuoteType} from '../../models';\nimport {ThemeSupporting} from '../../utils';\nimport {\n HubspotEventData,\n HubspotEventHandlers,\n HubspotFormDefaultValues,\n} from '../../utils/hubspot';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {ContentBlockProps} from './blocks';\nimport {\n AuthorItem,\n ButtonProps,\n CardBaseProps,\n CardLayoutProps,\n ContentTheme,\n DividerSize,\n ImageCardMargins,\n ImageObjectProps,\n ImageProps,\n LayoutItemContentMargin,\n LinkProps,\n MediaProps,\n MediaView,\n PriceDetailedProps,\n TextTheme,\n Themable,\n ThemedImage,\n} from './common';\n\nexport enum SubBlockType {\n Divider = 'divider',\n Quote = 'quote',\n /**\n * @deprecated Will be removed\n */\n PriceDetailed = 'price-detailed',\n MediaCard = 'media-card',\n BannerCard = 'banner-card',\n LayoutItem = 'layout-item',\n BackgroundCard = 'background-card',\n BasicCard = 'basic-card',\n Content = 'content',\n HubspotForm = 'hubspot-form',\n /**\n * @deprecated Will be removed, use BasicCard instead\n */\n Card = 'card',\n PriceCard = 'price-card',\n ImageCard = 'image-card',\n}\n\nexport enum IconPosition {\n Top = 'top',\n Left = 'left',\n}\n\nexport interface PositionedIcon {\n value: ImageProps;\n position?: IconPosition;\n}\n\nexport interface PositionedGravityIcon {\n value: GravityIconProps;\n position?: IconPosition;\n}\n\nexport interface IconWrapperProps {\n icon?: PositionedIcon;\n gravityIcon?: PositionedGravityIcon;\n size?: 's' | 'm' | 'l' | 'xl';\n}\n\nexport enum ImageCardDirection {\n Direct = 'direct',\n Reverse = 'reverse',\n}\n\nexport const SubBlockTypes = Object.values(SubBlockType);\n\nexport interface DividerProps {\n size?: DividerSize;\n border?: boolean;\n}\n\nexport interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {\n className?: string;\n theme?: ContentTheme;\n isMobile?: boolean;\n region?: string;\n portalId: string;\n formId: string;\n formInstanceId?: string;\n formClassName?: string;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeLoad?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onLoad?: (arg: HubspotEventData) => void;\n hubspotEvents?: string[];\n createDOMElement?: boolean;\n defaultValues?: HubspotFormDefaultValues;\n}\n\n//cards\nexport interface QuoteProps extends Themable, CardBaseProps {\n text?: string;\n // for backward compatibility, yfmText will become property 'text' in major\n yfmText?: string;\n image: ThemedImage;\n logo: ThemeSupporting<ImageProps>;\n color?: string;\n /**\n * @deprecated use property button instead\n */\n url?: string;\n /**\n * @deprecated use property button instead\n */\n urlTitle?: string;\n author?: AuthorItem;\n /**\n * @deprecated use property button instead\n */\n buttonText?: string;\n theme?: TextTheme;\n quoteType?: QuoteType;\n button?: ButtonProps;\n}\n\nexport interface BackgroundCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'centered' | 'controlPosition'> {\n url?: string;\n urlTitle?: string;\n background?: ThemeSupporting<ImageObjectProps>;\n paddingBottom?: 's' | 'm' | 'l' | 'xl';\n backgroundColor?: string;\n}\n\nexport interface BasicCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition'> {\n url: string;\n urlTitle?: string;\n icon?: ThemeSupporting<ImageProps>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n target?: string;\n iconPosition?: IconPosition;\n /**\n * @deprecated This property will be removed in future versions\n */\n hoverBackgroundColor?: string;\n}\n\nexport interface BannerCardProps {\n title: string;\n subtitle?: string;\n className?: string;\n image?: ThemeSupporting<string>;\n disableCompress?: boolean;\n color?: ThemeSupporting<string>;\n theme?: TextTheme;\n button?: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;\n mediaView?: MediaView;\n}\n\nexport interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}\n\nexport interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {\n title: string;\n price: string;\n pricePeriod?: string;\n priceDetails?: string;\n description?: string;\n buttons?: ButtonProps[];\n links?: LinkProps[];\n backgroundColor?: string;\n list?: string[];\n}\n\nexport interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {\n content: Omit<ContentBlockProps, 'colSizes' | 'centered'>;\n contentMargin?: LayoutItemContentMargin;\n media?: ThemeSupporting<MediaProps>;\n metaInfo?: string[];\n border?: boolean;\n fullscreen?: boolean;\n icon?: ThemeSupporting<PositionedIcon>;\n}\n\nexport interface ImageCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {\n image: ThemeSupporting<ImageProps>;\n enableImageBorderRadius?: boolean;\n margins?: ImageCardMargins;\n direction?: ImageCardDirection;\n backgroundColor?: string;\n url?: string;\n urlTitle?: string;\n target?: string;\n}\n\n// sub-block models\nexport type DividerModel = {\n type: SubBlockType.Divider;\n} & DividerProps;\n\nexport type QuoteModel = {\n type: SubBlockType.Quote;\n} & QuoteProps;\n\nexport type LayoutItemModel = {\n type: SubBlockType.LayoutItem;\n} & LayoutItemProps;\n\nexport type BackgroundCardModel = {\n type: SubBlockType.BackgroundCard;\n} & BackgroundCardProps;\n\n/** @deprecated */\nexport type PriceDetailedModel = {\n type: SubBlockType.PriceDetailed;\n} & PriceDetailedProps;\n\nexport type MediaCardModel = {\n type: SubBlockType.MediaCard;\n} & MediaCardProps;\n\nexport type HubspotFormModel = {\n type: SubBlockType.HubspotForm;\n} & HubspotFormProps;\n\nexport type BannerCardModel = {\n type: SubBlockType.BannerCard;\n} & BannerCardProps;\n\nexport type BasicCardModel = {\n type: SubBlockType.BasicCard;\n} & BasicCardProps;\n\nexport type PriceCardModel = {\n type: SubBlockType.PriceCard;\n} & PriceCardProps;\n\nexport type ImageCardModel = {\n type: SubBlockType.ImageCard;\n} & ImageCardProps;\n\nexport type SubBlockModels =\n | DividerModel\n | QuoteModel\n | PriceDetailedModel\n | MediaCardModel\n | BackgroundCardModel\n | HubspotFormModel\n | BannerCardModel\n | BasicCardModel\n | PriceCardModel\n | LayoutItemModel\n | ImageCardModel;\n\nexport type SubBlock = SubBlockModels;\n"]}
|
|
@@ -49,6 +49,87 @@ export declare const cardSchemas: {
|
|
|
49
49
|
urlTitle: {
|
|
50
50
|
type: string;
|
|
51
51
|
};
|
|
52
|
+
analyticsEvents: {
|
|
53
|
+
oneOf: ({
|
|
54
|
+
optionName: string;
|
|
55
|
+
type: string;
|
|
56
|
+
additionalProperties: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
required: string[];
|
|
60
|
+
properties: {
|
|
61
|
+
name: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
type: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
counters: {
|
|
68
|
+
type: string;
|
|
69
|
+
additionalProperties: boolean;
|
|
70
|
+
required: never[];
|
|
71
|
+
properties: {
|
|
72
|
+
include: {
|
|
73
|
+
type: string;
|
|
74
|
+
items: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
exclude: {
|
|
79
|
+
type: string;
|
|
80
|
+
items: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
context: {
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
items?: undefined;
|
|
91
|
+
} | {
|
|
92
|
+
type: string;
|
|
93
|
+
items: {
|
|
94
|
+
type: string;
|
|
95
|
+
additionalProperties: {
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
required: string[];
|
|
99
|
+
properties: {
|
|
100
|
+
name: {
|
|
101
|
+
type: string;
|
|
102
|
+
};
|
|
103
|
+
type: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
counters: {
|
|
107
|
+
type: string;
|
|
108
|
+
additionalProperties: boolean;
|
|
109
|
+
required: never[];
|
|
110
|
+
properties: {
|
|
111
|
+
include: {
|
|
112
|
+
type: string;
|
|
113
|
+
items: {
|
|
114
|
+
type: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
exclude: {
|
|
118
|
+
type: string;
|
|
119
|
+
items: {
|
|
120
|
+
type: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
context: {
|
|
126
|
+
type: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
optionName: string;
|
|
131
|
+
})[];
|
|
132
|
+
};
|
|
52
133
|
title?: {
|
|
53
134
|
oneOf: ({
|
|
54
135
|
type: string;
|
|
@@ -4,14 +4,16 @@ import { Link, useUniqId } from '@gravity-ui/uikit';
|
|
|
4
4
|
import { Image } from "../../components/index.js";
|
|
5
5
|
import { getMediaImage } from "../../components/Media/Image/utils.js";
|
|
6
6
|
import { useTheme } from "../../context/theme/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useAnalytics } from "../../hooks/index.js";
|
|
8
|
+
import { DefaultEventNames, ImageCardDirection } from "../../models/index.js";
|
|
8
9
|
import { block, getThemedValue } from "../../utils/index.js";
|
|
9
10
|
import Content from "../Content/Content.js";
|
|
10
11
|
import './ImageCard.css';
|
|
11
12
|
const b = block('image-card');
|
|
12
13
|
const CONTENT_COL_SIZES = { all: 12, md: 12 };
|
|
13
14
|
const ImageCard = (props) => {
|
|
14
|
-
const { border = 'shadow', title, text, image, enableImageBorderRadius = false, direction = ImageCardDirection.Direct, margins, backgroundColor, url, target, urlTitle, additionalInfo, links, buttons, list, theme: cardTheme = 'default', size = 's', controlPosition = 'content', } = props;
|
|
15
|
+
const { border = 'shadow', title, text, image, enableImageBorderRadius = false, direction = ImageCardDirection.Direct, margins, backgroundColor, url, target, urlTitle, additionalInfo, links, buttons, list, theme: cardTheme = 'default', size = 's', controlPosition = 'content', analyticsEvents, } = props;
|
|
16
|
+
const handleAnalytics = useAnalytics(DefaultEventNames.CardBase, url);
|
|
15
17
|
const globalTheme = useTheme();
|
|
16
18
|
const areControlsInFooter = controlPosition === 'footer';
|
|
17
19
|
const hasContent = Boolean(text || title || buttons || links || list);
|
|
@@ -19,7 +21,10 @@ const ImageCard = (props) => {
|
|
|
19
21
|
const imageProps = getMediaImage(themedImage);
|
|
20
22
|
const titleId = useUniqId();
|
|
21
23
|
const cardContent = (_jsxs(React.Fragment, { children: [_jsx("div", { className: b('image', { margins }), children: _jsx(Image, { className: b('image_inner', { radius: enableImageBorderRadius }), ...imageProps }) }), hasContent && (_jsx("div", { className: b('content'), children: _jsx(Content, { titleId: titleId, title: title, text: text, links: links, buttons: buttons, list: list, theme: cardTheme, additionalInfo: additionalInfo, size: size, colSizes: CONTENT_COL_SIZES, controlPosition: areControlsInFooter ? 'bottom' : 'default' }) }))] }));
|
|
22
|
-
|
|
24
|
+
const onClick = () => {
|
|
25
|
+
handleAnalytics(analyticsEvents);
|
|
26
|
+
};
|
|
27
|
+
return url ? (_jsx(Link, { href: url, target: target, rel: target === '_blank' ? 'noopener noreferrer' : undefined, className: b({ border, 'with-content': hasContent, direction }), onClick: onClick, title: urlTitle, style: { backgroundColor }, extraProps: {
|
|
23
28
|
draggable: false,
|
|
24
29
|
onDragStart: (e) => e.preventDefault(),
|
|
25
30
|
}, children: cardContent })) : (_jsx("div", { className: b({ border, 'with-content': hasContent, direction }), style: { backgroundColor }, children: cardContent }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCard.js","sourceRoot":"../../../../src","sources":["sub-blocks/ImageCard/ImageCard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,KAAK,EAAC,kCAAyB;AACvC,OAAO,EAAC,aAAa,EAAC,8CAA2C;AACjE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAE7C,OAAO,EAAC,kBAAkB,EAAiB,8BAAqB;
|
|
1
|
+
{"version":3,"file":"ImageCard.js","sourceRoot":"../../../../src","sources":["sub-blocks/ImageCard/ImageCard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,KAAK,EAAC,kCAAyB;AACvC,OAAO,EAAC,aAAa,EAAC,8CAA2C;AACjE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAE7C,OAAO,EAAC,YAAY,EAAC,6BAAoB;AACzC,OAAO,EAAC,iBAAiB,EAAE,kBAAkB,EAAiB,8BAAqB;AACnF,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAClD,OAAO,OAAO,8BAA2B;AAEzC,OAAO,iBAAiB,CAAC;AAEzB,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;AAC9B,MAAM,iBAAiB,GAAwB,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,CAAC;AAEjE,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IACxC,MAAM,EACF,MAAM,GAAG,QAAQ,EACjB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,uBAAuB,GAAG,KAAK,EAC/B,SAAS,GAAG,kBAAkB,CAAC,MAAM,EACrC,OAAO,EACP,eAAe,EACf,GAAG,EACH,MAAM,EACN,QAAQ,EACR,cAAc,EACd,K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AC,SAAS,GAC7D,GACA,CACT,IACY,CACpB,CAAC;IAEF,MAAM,OAAO,GAAG,GAAG,EAAE;QACjB,eAAe,CAAC,eAAe,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,OAAO,GAAG,CAAC,CAAC,CAAC,CACT,KAAC,IAAI,IACD,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EAC5D,SAAS,EAAE,CAAC,CAAC,EAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAC,CAAC,EAC7D,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,EAAC,eAAe,EAAC,EACxB,UAAU,EAAE;YACR,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,CAAC,CAAqC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE;SAC7E,YAEA,WAAW,GACT,CACV,CAAC,CAAC,CAAC,CACA,cACI,SAAS,EAAE,CAAC,CAAC,EAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAC,CAAC,EAC7D,KAAK,EAAE,EAAC,eAAe,EAAC,YAEvB,WAAW,GACV,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Link, useUniqId} from '@gravity-ui/uikit';\n\nimport {Image} from '../../components';\nimport {getMediaImage} from '../../components/Media/Image/utils';\nimport {useTheme} from '../../context/theme';\nimport {GridColumnSizesType} from '../../grid';\nimport {useAnalytics} from '../../hooks';\nimport {DefaultEventNames, ImageCardDirection, ImageCardProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport Content from '../Content/Content';\n\nimport './ImageCard.scss';\n\nconst b = block('image-card');\nconst CONTENT_COL_SIZES: GridColumnSizesType = {all: 12, md: 12};\n\nconst ImageCard = (props: ImageCardProps) => {\n const {\n border = 'shadow',\n title,\n text,\n image,\n enableImageBorderRadius = false,\n direction = ImageCardDirection.Direct,\n margins,\n backgroundColor,\n url,\n target,\n urlTitle,\n additionalInfo,\n links,\n buttons,\n list,\n theme: cardTheme = 'default',\n size = 's',\n controlPosition = 'content',\n analyticsEvents,\n } = props;\n\n const handleAnalytics = useAnalytics(DefaultEventNames.CardBase, url);\n const globalTheme = useTheme();\n const areControlsInFooter = controlPosition === 'footer';\n const hasContent = Boolean(text || title || buttons || links || list);\n const themedImage = getThemedValue(image, globalTheme);\n const imageProps = getMediaImage(themedImage);\n\n const titleId = useUniqId();\n\n const cardContent = (\n <React.Fragment>\n <div className={b('image', {margins})}>\n <Image\n className={b('image_inner', {radius: enableImageBorderRadius})}\n {...imageProps}\n />\n </div>\n {hasContent && (\n <div className={b('content')}>\n <Content\n titleId={titleId}\n title={title}\n text={text}\n links={links}\n buttons={buttons}\n list={list}\n theme={cardTheme}\n additionalInfo={additionalInfo}\n size={size}\n colSizes={CONTENT_COL_SIZES}\n controlPosition={areControlsInFooter ? 'bottom' : 'default'}\n />\n </div>\n )}\n </React.Fragment>\n );\n\n const onClick = () => {\n handleAnalytics(analyticsEvents);\n };\n\n return url ? (\n <Link\n href={url}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n className={b({border, 'with-content': hasContent, direction})}\n onClick={onClick}\n title={urlTitle}\n style={{backgroundColor}}\n extraProps={{\n draggable: false,\n onDragStart: (e: React.DragEvent<HTMLAnchorElement>) => e.preventDefault(),\n }}\n >\n {cardContent}\n </Link>\n ) : (\n <div\n className={b({border, 'with-content': hasContent, direction})}\n style={{backgroundColor}}\n >\n {cardContent}\n </div>\n );\n};\n\nexport default ImageCard;\n"]}
|
|
@@ -47,6 +47,87 @@ export declare const ImageCard: {
|
|
|
47
47
|
urlTitle: {
|
|
48
48
|
type: string;
|
|
49
49
|
};
|
|
50
|
+
analyticsEvents: {
|
|
51
|
+
oneOf: ({
|
|
52
|
+
optionName: string;
|
|
53
|
+
type: string;
|
|
54
|
+
additionalProperties: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
required: string[];
|
|
58
|
+
properties: {
|
|
59
|
+
name: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
type: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
counters: {
|
|
66
|
+
type: string;
|
|
67
|
+
additionalProperties: boolean;
|
|
68
|
+
required: never[];
|
|
69
|
+
properties: {
|
|
70
|
+
include: {
|
|
71
|
+
type: string;
|
|
72
|
+
items: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
exclude: {
|
|
77
|
+
type: string;
|
|
78
|
+
items: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
context: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
items?: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
type: string;
|
|
91
|
+
items: {
|
|
92
|
+
type: string;
|
|
93
|
+
additionalProperties: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
required: string[];
|
|
97
|
+
properties: {
|
|
98
|
+
name: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
type: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
counters: {
|
|
105
|
+
type: string;
|
|
106
|
+
additionalProperties: boolean;
|
|
107
|
+
required: never[];
|
|
108
|
+
properties: {
|
|
109
|
+
include: {
|
|
110
|
+
type: string;
|
|
111
|
+
items: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
exclude: {
|
|
116
|
+
type: string;
|
|
117
|
+
items: {
|
|
118
|
+
type: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
context: {
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
optionName: string;
|
|
129
|
+
})[];
|
|
130
|
+
};
|
|
50
131
|
title?: {
|
|
51
132
|
oneOf: ({
|
|
52
133
|
type: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import omit from "lodash/omit.js";
|
|
2
2
|
import { BaseProps, CardBase, CardLayoutProps } from "../../schema/validators/common.js";
|
|
3
3
|
import { ImageProps } from "../../schema/validators/components.js";
|
|
4
|
+
import { AnalyticsEventSchema } from "../../schema/validators/event.js";
|
|
4
5
|
import { ContentBase } from "../Content/schema.js";
|
|
5
6
|
const ImageCardBlockContentProps = omit(ContentBase, ['centered', 'colSizes', 'controlPosition']);
|
|
6
7
|
export const ImageCard = {
|
|
@@ -30,6 +31,19 @@ export const ImageCard = {
|
|
|
30
31
|
urlTitle: {
|
|
31
32
|
type: 'string',
|
|
32
33
|
},
|
|
34
|
+
analyticsEvents: {
|
|
35
|
+
oneOf: [
|
|
36
|
+
{
|
|
37
|
+
...AnalyticsEventSchema,
|
|
38
|
+
optionName: 'single',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: AnalyticsEventSchema,
|
|
43
|
+
optionName: 'list',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
33
47
|
},
|
|
34
48
|
},
|
|
35
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/ImageCard/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAC,0CAAuC;AACpF,OAAO,EAAC,UAAU,EAAC,8CAA2C;AAC9D,OAAO,EAAC,WAAW,EAAC,6BAA0B;AAE9C,MAAM,0BAA0B,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAElG,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,EAAE;YACR,GAAG,SAAS;YACZ,GAAG,QAAQ;YACX,GAAG,eAAe;YAClB,GAAG,0BAA0B;YAC7B,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;aAC9B;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;aACnB;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB;YACD,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {BaseProps, CardBase, CardLayoutProps} from '../../schema/validators/common';\nimport {ImageProps} from '../../schema/validators/components';\nimport {ContentBase} from '../Content/schema';\n\nconst ImageCardBlockContentProps = omit(ContentBase, ['centered', 'colSizes', 'controlPosition']);\n\nexport const ImageCard = {\n 'image-card': {\n additionalProperties: false,\n required: ['image'],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...ImageCardBlockContentProps,\n image: ImageProps,\n direction: {\n type: 'string',\n enum: ['direct', 'reverse'],\n },\n margins: {\n type: 'string',\n enum: ['s', 'm'],\n },\n backgroundColor: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/ImageCard/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAC,0CAAuC;AACpF,OAAO,EAAC,UAAU,EAAC,8CAA2C;AAC9D,OAAO,EAAC,oBAAoB,EAAC,yCAAsC;AACnE,OAAO,EAAC,WAAW,EAAC,6BAA0B;AAE9C,MAAM,0BAA0B,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAElG,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,EAAE;YACR,GAAG,SAAS;YACZ,GAAG,QAAQ;YACX,GAAG,eAAe;YAClB,GAAG,0BAA0B;YAC7B,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;aAC9B;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;aACnB;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB;YACD,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,eAAe,EAAE;gBACb,KAAK,EAAE;oBACH;wBACI,GAAG,oBAAoB;wBACvB,UAAU,EAAE,QAAQ;qBACvB;oBACD;wBACI,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,oBAAoB;wBAC3B,UAAU,EAAE,MAAM;qBACrB;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {BaseProps, CardBase, CardLayoutProps} from '../../schema/validators/common';\nimport {ImageProps} from '../../schema/validators/components';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../Content/schema';\n\nconst ImageCardBlockContentProps = omit(ContentBase, ['centered', 'colSizes', 'controlPosition']);\n\nexport const ImageCard = {\n 'image-card': {\n additionalProperties: false,\n required: ['image'],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...ImageCardBlockContentProps,\n image: ImageProps,\n direction: {\n type: 'string',\n enum: ['direct', 'reverse'],\n },\n margins: {\n type: 'string',\n enum: ['s', 'm'],\n },\n backgroundColor: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n },\n};\n"]}
|