@gravity-ui/page-constructor 4.29.0 → 4.29.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/Banner/schema.d.ts +9 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +12 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +9 -0
- package/build/cjs/blocks/FilterBlock/schema.d.ts +12 -0
- package/build/cjs/blocks/Form/Form.css +136 -0
- package/build/cjs/blocks/Form/Form.d.ts +4 -0
- package/build/cjs/blocks/Form/Form.js +61 -0
- package/build/cjs/blocks/Form/HubspotInlineForm.d.ts +7 -0
- package/build/cjs/blocks/Form/HubspotInlineForm.js +14 -0
- package/build/cjs/blocks/Form/InnerForm/InnerForm.d.ts +9 -0
- package/build/cjs/blocks/Form/InnerForm/InnerForm.js +28 -0
- package/build/cjs/blocks/Form/schema.d.ts +202 -0
- package/build/cjs/blocks/Form/schema.js +44 -0
- package/build/cjs/blocks/Header/Header.js +2 -2
- package/build/cjs/blocks/Header/schema.d.ts +3 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Info/schema.d.ts +6 -0
- package/build/cjs/blocks/Map/schema.d.ts +9 -0
- package/build/cjs/blocks/Media/schema.d.ts +18 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
- package/build/cjs/blocks/Questions/schema.d.ts +6 -0
- package/build/cjs/blocks/Slider/schema.d.ts +6 -0
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +12 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/components/Button/Button.d.ts +1 -0
- package/build/cjs/components/Button/Button.js +2 -2
- package/build/cjs/components/Media/Image/Image.js +4 -4
- package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +1 -2
- package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -17
- package/build/cjs/components/YandexForm/YandexForm.js +6 -4
- package/build/cjs/components/YandexForm/schema.d.ts +16 -0
- package/build/cjs/components/YandexForm/schema.js +13 -0
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/editor/data/templates/form-block.json +20 -0
- package/build/cjs/models/components.d.ts +1 -2
- package/build/cjs/models/constructor-items/blocks.d.ts +33 -5
- package/build/cjs/models/constructor-items/blocks.js +13 -1
- package/build/cjs/models/constructor-items/common.d.ts +21 -1
- package/build/cjs/models/constructor-items/common.js +6 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/cjs/models/guards.d.ts +3 -1
- package/build/cjs/models/guards.js +9 -1
- package/build/cjs/schema/constants.d.ts +22 -0
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +23 -1
- package/build/cjs/schema/validators/common.js +13 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js +2 -0
- package/build/cjs/sub-blocks/Content/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/HubspotForm/schema.d.ts +22 -0
- package/build/cjs/sub-blocks/HubspotForm/schema.js +17 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/Quote.css +12 -3
- package/build/cjs/sub-blocks/Quote/Quote.js +3 -3
- package/build/cjs/sub-blocks/Quote/schema.d.ts +7 -0
- package/build/cjs/sub-blocks/Quote/schema.js +6 -1
- package/build/esm/blocks/Banner/schema.d.ts +9 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +12 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +9 -0
- package/build/esm/blocks/FilterBlock/schema.d.ts +12 -0
- package/build/esm/blocks/Form/Form.css +136 -0
- package/build/esm/blocks/Form/Form.d.ts +5 -0
- package/build/esm/blocks/Form/Form.js +59 -0
- package/build/esm/blocks/Form/HubspotInlineForm.d.ts +7 -0
- package/build/esm/blocks/Form/HubspotInlineForm.js +12 -0
- package/build/esm/blocks/Form/InnerForm/InnerForm.d.ts +9 -0
- package/build/esm/blocks/Form/InnerForm/InnerForm.js +26 -0
- package/build/esm/blocks/Form/schema.d.ts +202 -0
- package/build/esm/blocks/Form/schema.js +40 -0
- package/build/esm/blocks/Header/Header.js +2 -2
- package/build/esm/blocks/Header/schema.d.ts +3 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Info/schema.d.ts +6 -0
- package/build/esm/blocks/Map/schema.d.ts +9 -0
- package/build/esm/blocks/Media/schema.d.ts +18 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
- package/build/esm/blocks/Questions/schema.d.ts +6 -0
- package/build/esm/blocks/Slider/schema.d.ts +6 -0
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +12 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/components/Button/Button.d.ts +1 -0
- package/build/esm/components/Button/Button.js +2 -2
- package/build/esm/components/Media/Image/Image.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +1 -2
- package/build/esm/components/YandexForm/YandexForm.d.ts +2 -17
- package/build/esm/components/YandexForm/YandexForm.js +5 -3
- package/build/esm/components/YandexForm/schema.d.ts +16 -0
- package/build/esm/components/YandexForm/schema.js +10 -0
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/editor/data/templates/form-block.json +20 -0
- package/build/esm/models/components.d.ts +1 -2
- package/build/esm/models/constructor-items/blocks.d.ts +33 -5
- package/build/esm/models/constructor-items/blocks.js +12 -0
- package/build/esm/models/constructor-items/common.d.ts +21 -1
- package/build/esm/models/constructor-items/common.js +5 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/esm/models/guards.d.ts +3 -1
- package/build/esm/models/guards.js +7 -1
- package/build/esm/schema/constants.d.ts +22 -0
- package/build/esm/schema/constants.js +3 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/schema/validators/common.d.ts +23 -1
- package/build/esm/schema/validators/common.js +13 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +6 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +6 -0
- package/build/esm/sub-blocks/BasicCard/schema.js +2 -0
- package/build/esm/sub-blocks/Content/schema.d.ts +6 -0
- package/build/esm/sub-blocks/HubspotForm/schema.d.ts +22 -0
- package/build/esm/sub-blocks/HubspotForm/schema.js +14 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/Quote.css +12 -3
- package/build/esm/sub-blocks/Quote/Quote.js +4 -4
- package/build/esm/sub-blocks/Quote/schema.d.ts +7 -0
- package/build/esm/sub-blocks/Quote/schema.js +7 -2
- package/package.json +2 -2
- package/server/models/components.d.ts +1 -2
- package/server/models/constructor-items/blocks.d.ts +33 -5
- package/server/models/constructor-items/blocks.js +13 -1
- package/server/models/constructor-items/common.d.ts +21 -1
- package/server/models/constructor-items/common.js +6 -1
- package/server/models/constructor-items/sub-blocks.d.ts +4 -1
- package/server/models/guards.d.ts +3 -1
- package/server/models/guards.js +9 -1
- package/widget/index.js +1 -1
|
@@ -8,6 +8,9 @@ export declare const cardSchemas: {
|
|
|
8
8
|
url: {
|
|
9
9
|
type: string;
|
|
10
10
|
};
|
|
11
|
+
urlTitle: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
11
14
|
icon: {
|
|
12
15
|
oneOf: ({
|
|
13
16
|
type: string;
|
|
@@ -52,6 +55,9 @@ export declare const cardSchemas: {
|
|
|
52
55
|
url: {
|
|
53
56
|
type: string;
|
|
54
57
|
};
|
|
58
|
+
urlTitle: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
55
61
|
resetMargin: {
|
|
56
62
|
type: string;
|
|
57
63
|
};
|
|
@@ -163,6 +169,9 @@ export declare const cardSchemas: {
|
|
|
163
169
|
url: {
|
|
164
170
|
type: string;
|
|
165
171
|
};
|
|
172
|
+
urlTitle: {
|
|
173
|
+
type: string;
|
|
174
|
+
};
|
|
166
175
|
buttonText: {
|
|
167
176
|
type: string;
|
|
168
177
|
};
|
|
@@ -202,6 +211,10 @@ export declare const cardSchemas: {
|
|
|
202
211
|
};
|
|
203
212
|
};
|
|
204
213
|
};
|
|
214
|
+
quoteType: {
|
|
215
|
+
type: string;
|
|
216
|
+
enum: import("../models").QuoteType[];
|
|
217
|
+
};
|
|
205
218
|
type: {};
|
|
206
219
|
when: {
|
|
207
220
|
type: string;
|
|
@@ -215,6 +228,9 @@ export declare const cardSchemas: {
|
|
|
215
228
|
url: {
|
|
216
229
|
type: string;
|
|
217
230
|
};
|
|
231
|
+
urlTitle: {
|
|
232
|
+
type: string;
|
|
233
|
+
};
|
|
218
234
|
background: {
|
|
219
235
|
oneOf: (({
|
|
220
236
|
type: string;
|
|
@@ -372,6 +388,9 @@ export declare const cardSchemas: {
|
|
|
372
388
|
url: {
|
|
373
389
|
type: string;
|
|
374
390
|
};
|
|
391
|
+
urlTitle: {
|
|
392
|
+
type: string;
|
|
393
|
+
};
|
|
375
394
|
resetMargin: {
|
|
376
395
|
type: string;
|
|
377
396
|
};
|
|
@@ -589,6 +608,9 @@ export declare const cardSchemas: {
|
|
|
589
608
|
url: {
|
|
590
609
|
type: string;
|
|
591
610
|
};
|
|
611
|
+
urlTitle: {
|
|
612
|
+
type: string;
|
|
613
|
+
};
|
|
592
614
|
primary: {
|
|
593
615
|
type: string;
|
|
594
616
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BannerBlock, BannerCard, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, MapBlock, MediaBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SliderBlock, TableBlock, TabsBlock, } from './validators/blocks';
|
|
1
|
+
import { BannerBlock, BannerCard, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, FormBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, MapBlock, MediaBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SliderBlock, TableBlock, TabsBlock, } from './validators/blocks';
|
|
2
2
|
import { BackgroundCard, BasicCard, Divider, MediaCardBlock, PriceDetailedBlock, Quote, } from './validators/sub-blocks';
|
|
3
|
-
export const blockSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Divider), ExtendedFeaturesBlock), PromoFeaturesBlock), SliderBlock), QuestionsBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), TabsBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock);
|
|
3
|
+
export const blockSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Divider), ExtendedFeaturesBlock), PromoFeaturesBlock), SliderBlock), QuestionsBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), TabsBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock), FormBlock);
|
|
4
4
|
export const cardSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, MediaCardBlock), BannerCard), PriceDetailedBlock), BackgroundCard), Quote), BasicCard);
|
|
5
5
|
export const constructorBlockSchemaNames = [
|
|
6
6
|
'divider',
|
|
@@ -27,6 +27,7 @@ export const constructorBlockSchemaNames = [
|
|
|
27
27
|
'content-layout-block',
|
|
28
28
|
'share-block',
|
|
29
29
|
'filter-block',
|
|
30
|
+
'form-block',
|
|
30
31
|
];
|
|
31
32
|
export const constructorCardSchemaNames = [
|
|
32
33
|
'media-card',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme } from '../../models';
|
|
1
|
+
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme } from '../../models';
|
|
2
2
|
export declare const mediaDirection: string[];
|
|
3
3
|
export declare const textSize: string[];
|
|
4
4
|
export declare const containerSizesArray: string[];
|
|
@@ -19,6 +19,7 @@ export declare const sizeNumber: {
|
|
|
19
19
|
minimum: number;
|
|
20
20
|
};
|
|
21
21
|
export declare const contentThemes: string[];
|
|
22
|
+
export declare const quoteTypes: QuoteType[];
|
|
22
23
|
export declare const customControlsType: CustomControlsType[];
|
|
23
24
|
export declare const customControlsButtonPositioning: CustomControlsButtonPositioning[];
|
|
24
25
|
export declare const BaseProps: {
|
|
@@ -376,6 +377,9 @@ export declare const LinkProps: {
|
|
|
376
377
|
url: {
|
|
377
378
|
type: string;
|
|
378
379
|
};
|
|
380
|
+
urlTitle: {
|
|
381
|
+
type: string;
|
|
382
|
+
};
|
|
379
383
|
arrow: {
|
|
380
384
|
type: string;
|
|
381
385
|
};
|
|
@@ -544,6 +548,9 @@ export declare const ButtonProps: {
|
|
|
544
548
|
url: {
|
|
545
549
|
type: string;
|
|
546
550
|
};
|
|
551
|
+
urlTitle: {
|
|
552
|
+
type: string;
|
|
553
|
+
};
|
|
547
554
|
primary: {
|
|
548
555
|
type: string;
|
|
549
556
|
};
|
|
@@ -795,6 +802,9 @@ export declare const AnchorProps: {
|
|
|
795
802
|
url: {
|
|
796
803
|
type: string;
|
|
797
804
|
};
|
|
805
|
+
urlTitle: {
|
|
806
|
+
type: string;
|
|
807
|
+
};
|
|
798
808
|
};
|
|
799
809
|
};
|
|
800
810
|
export declare const BlockBaseProps: {
|
|
@@ -810,6 +820,9 @@ export declare const BlockBaseProps: {
|
|
|
810
820
|
url: {
|
|
811
821
|
type: string;
|
|
812
822
|
};
|
|
823
|
+
urlTitle: {
|
|
824
|
+
type: string;
|
|
825
|
+
};
|
|
813
826
|
};
|
|
814
827
|
};
|
|
815
828
|
visible: {
|
|
@@ -843,6 +856,9 @@ export declare const TitleProps: {
|
|
|
843
856
|
url: {
|
|
844
857
|
type: string;
|
|
845
858
|
};
|
|
859
|
+
urlTitle: {
|
|
860
|
+
type: string;
|
|
861
|
+
};
|
|
846
862
|
resetMargin: {
|
|
847
863
|
type: string;
|
|
848
864
|
};
|
|
@@ -859,6 +875,9 @@ export declare const ButtonBlock: {
|
|
|
859
875
|
url: {
|
|
860
876
|
type: string;
|
|
861
877
|
};
|
|
878
|
+
urlTitle: {
|
|
879
|
+
type: string;
|
|
880
|
+
};
|
|
862
881
|
primary: {
|
|
863
882
|
type: string;
|
|
864
883
|
};
|
|
@@ -1463,6 +1482,9 @@ export declare const BlockHeaderProps: {
|
|
|
1463
1482
|
url: {
|
|
1464
1483
|
type: string;
|
|
1465
1484
|
};
|
|
1485
|
+
urlTitle: {
|
|
1486
|
+
type: string;
|
|
1487
|
+
};
|
|
1466
1488
|
resetMargin: {
|
|
1467
1489
|
type: string;
|
|
1468
1490
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from '../../components/Image/schema';
|
|
2
|
-
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme, } from '../../models';
|
|
2
|
+
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme, } from '../../models';
|
|
3
3
|
import { AnalyticsEventSchema } from './event';
|
|
4
4
|
import { pixelEvents } from './pixel';
|
|
5
5
|
export const mediaDirection = ['media-content', 'content-media'];
|
|
@@ -16,6 +16,7 @@ export const fileLinkTypes = ['vertical', 'horizontal'];
|
|
|
16
16
|
export const dividerEnum = { enum: [0, 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] };
|
|
17
17
|
export const sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
|
|
18
18
|
export const contentThemes = ['default', 'dark', 'light'];
|
|
19
|
+
export const quoteTypes = Object.values(QuoteType);
|
|
19
20
|
export const customControlsType = [
|
|
20
21
|
CustomControlsType.WithMuteButton,
|
|
21
22
|
CustomControlsType.WithPlayPauseButton,
|
|
@@ -207,6 +208,8 @@ export const LinkProps = {
|
|
|
207
208
|
contentType: 'text',
|
|
208
209
|
}, url: {
|
|
209
210
|
type: 'string',
|
|
211
|
+
}, urlTitle: {
|
|
212
|
+
type: 'string',
|
|
210
213
|
}, arrow: {
|
|
211
214
|
type: 'boolean',
|
|
212
215
|
}, theme: {
|
|
@@ -282,6 +285,9 @@ export const ButtonProps = {
|
|
|
282
285
|
url: {
|
|
283
286
|
type: 'string',
|
|
284
287
|
},
|
|
288
|
+
urlTitle: {
|
|
289
|
+
type: 'string',
|
|
290
|
+
},
|
|
285
291
|
primary: {
|
|
286
292
|
type: 'boolean',
|
|
287
293
|
},
|
|
@@ -435,6 +441,9 @@ export const AnchorProps = {
|
|
|
435
441
|
url: {
|
|
436
442
|
type: 'string',
|
|
437
443
|
},
|
|
444
|
+
urlTitle: {
|
|
445
|
+
type: 'string',
|
|
446
|
+
},
|
|
438
447
|
},
|
|
439
448
|
};
|
|
440
449
|
export const BlockBaseProps = Object.assign(Object.assign({}, BaseProps), { anchor: AnchorProps, visible: {
|
|
@@ -461,6 +470,9 @@ export const TitleProps = {
|
|
|
461
470
|
url: {
|
|
462
471
|
type: 'string',
|
|
463
472
|
},
|
|
473
|
+
urlTitle: {
|
|
474
|
+
type: 'string',
|
|
475
|
+
},
|
|
464
476
|
resetMargin: {
|
|
465
477
|
type: 'boolean',
|
|
466
478
|
},
|
|
@@ -6,6 +6,9 @@ export declare const BackgroundCard: {
|
|
|
6
6
|
url: {
|
|
7
7
|
type: string;
|
|
8
8
|
};
|
|
9
|
+
urlTitle: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
9
12
|
background: {
|
|
10
13
|
oneOf: (({
|
|
11
14
|
type: string;
|
|
@@ -163,6 +166,9 @@ export declare const BackgroundCard: {
|
|
|
163
166
|
url: {
|
|
164
167
|
type: string;
|
|
165
168
|
};
|
|
169
|
+
urlTitle: {
|
|
170
|
+
type: string;
|
|
171
|
+
};
|
|
166
172
|
resetMargin: {
|
|
167
173
|
type: string;
|
|
168
174
|
};
|
|
@@ -10,6 +10,8 @@ export const BackgroundCard = {
|
|
|
10
10
|
required: ['title', 'text'],
|
|
11
11
|
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), BackgroundCardContentProps), { url: {
|
|
12
12
|
type: 'string',
|
|
13
|
+
}, urlTitle: {
|
|
14
|
+
type: 'string',
|
|
13
15
|
}, background: withTheme(ImageObjectProps), backgroundColor: {
|
|
14
16
|
type: 'string',
|
|
15
17
|
}, paddingBottom: {
|
|
@@ -6,6 +6,9 @@ export declare const BasicCard: {
|
|
|
6
6
|
url: {
|
|
7
7
|
type: string;
|
|
8
8
|
};
|
|
9
|
+
urlTitle: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
9
12
|
icon: {
|
|
10
13
|
oneOf: ({
|
|
11
14
|
type: string;
|
|
@@ -50,6 +53,9 @@ export declare const BasicCard: {
|
|
|
50
53
|
url: {
|
|
51
54
|
type: string;
|
|
52
55
|
};
|
|
56
|
+
urlTitle: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
53
59
|
resetMargin: {
|
|
54
60
|
type: string;
|
|
55
61
|
};
|
|
@@ -9,6 +9,8 @@ export const BasicCard = {
|
|
|
9
9
|
required: [],
|
|
10
10
|
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), BasicCardContentProps), { url: {
|
|
11
11
|
type: 'string',
|
|
12
|
+
}, urlTitle: {
|
|
13
|
+
type: 'string',
|
|
12
14
|
}, icon: ImageProps, target: {
|
|
13
15
|
type: 'string',
|
|
14
16
|
enum: ['_blank', '_parent', '_top', '_self'],
|
|
@@ -59,6 +59,9 @@ export declare const ContentBase: {
|
|
|
59
59
|
url: {
|
|
60
60
|
type: string;
|
|
61
61
|
};
|
|
62
|
+
urlTitle: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
62
65
|
resetMargin: {
|
|
63
66
|
type: string;
|
|
64
67
|
};
|
|
@@ -147,6 +150,9 @@ export declare const ContentBlock: {
|
|
|
147
150
|
url: {
|
|
148
151
|
type: string;
|
|
149
152
|
};
|
|
153
|
+
urlTitle: {
|
|
154
|
+
type: string;
|
|
155
|
+
};
|
|
150
156
|
resetMargin: {
|
|
151
157
|
type: string;
|
|
152
158
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const HubspotFormProps: {
|
|
2
|
+
type: string;
|
|
3
|
+
required: string[];
|
|
4
|
+
properties: {
|
|
5
|
+
region: {
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
portalId: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
formId: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
formInstanceId: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
type: {};
|
|
18
|
+
when: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseProps } from '../../schema/validators/common';
|
|
2
|
+
export const HubspotFormProps = {
|
|
3
|
+
type: 'object',
|
|
4
|
+
required: ['portalId', 'formId'],
|
|
5
|
+
properties: Object.assign(Object.assign({}, BaseProps), { region: {
|
|
6
|
+
type: 'string',
|
|
7
|
+
}, portalId: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
}, formId: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
}, formInstanceId: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
} }),
|
|
14
|
+
};
|
|
@@ -60,14 +60,23 @@ unpredictable css rules order in build */
|
|
|
60
60
|
font-size: var(--g-text-body-3-font-size);
|
|
61
61
|
line-height: var(--g-text-body-3-line-height);
|
|
62
62
|
}
|
|
63
|
-
.pc-
|
|
63
|
+
.pc-quote__content_quote-type_chevron::before {
|
|
64
64
|
position: absolute;
|
|
65
65
|
top: -1px;
|
|
66
66
|
left: -10px;
|
|
67
67
|
content: "«";
|
|
68
68
|
}
|
|
69
|
-
.pc-quote__text::after {
|
|
70
|
-
content: "
|
|
69
|
+
.pc-quote__content_quote-type_chevron .pc-quote__text::after {
|
|
70
|
+
content: "»";
|
|
71
|
+
}
|
|
72
|
+
.pc-quote__content_quote-type_english-double::before {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: -1px;
|
|
75
|
+
left: -8px;
|
|
76
|
+
content: "“";
|
|
77
|
+
}
|
|
78
|
+
.pc-quote__content_quote-type_english-double .pc-quote__text::after {
|
|
79
|
+
content: "”";
|
|
71
80
|
}
|
|
72
81
|
.pc-quote__image {
|
|
73
82
|
width: 100%;
|
|
@@ -4,12 +4,12 @@ import { Author, HTML, Image } from '../../components';
|
|
|
4
4
|
import { getMediaImage } from '../../components/Media/Image/utils';
|
|
5
5
|
import { useTheme } from '../../context/theme';
|
|
6
6
|
import { useAnalytics } from '../../hooks';
|
|
7
|
-
import { AuthorType, DefaultEventNames } from '../../models';
|
|
7
|
+
import { AuthorType, DefaultEventNames, QuoteType } from '../../models';
|
|
8
8
|
import { block, getThemedValue } from '../../utils';
|
|
9
9
|
import './Quote.css';
|
|
10
10
|
const b = block('quote');
|
|
11
11
|
const Quote = (props) => {
|
|
12
|
-
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, } = props;
|
|
12
|
+
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, urlTitle, buttonText, quoteType = QuoteType.Chevron, } = props;
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
const imageThemed = getThemedValue(image, theme);
|
|
15
15
|
const imageData = getMediaImage(imageThemed);
|
|
@@ -17,13 +17,13 @@ const Quote = (props) => {
|
|
|
17
17
|
const handleButtonClick = useCallback(() => handleAnalytics(), [handleAnalytics]);
|
|
18
18
|
const renderFooter = Boolean(author || url) && (React.createElement("div", { className: b('author-wrapper') },
|
|
19
19
|
author && (React.createElement(Author, { className: b('author', { theme: textTheme }), author: author, type: AuthorType.Line })),
|
|
20
|
-
url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick }, buttonText))));
|
|
20
|
+
url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick, title: urlTitle }, buttonText))));
|
|
21
21
|
const logoProps = getMediaImage(logo);
|
|
22
22
|
return (React.createElement("div", { className: b({ theme: textTheme, border }), style: color ? { backgroundColor: color } : {} },
|
|
23
23
|
React.createElement("div", { key: text, className: b('content-wrapper') },
|
|
24
24
|
React.createElement("div", null,
|
|
25
25
|
React.createElement(Image, Object.assign({ className: b('logo') }, logoProps)),
|
|
26
|
-
React.createElement("div", { className: b('content') },
|
|
26
|
+
React.createElement("div", { className: b('content', { 'quote-type': quoteType }) },
|
|
27
27
|
React.createElement("span", { className: b('text') },
|
|
28
28
|
React.createElement(HTML, null, text)))),
|
|
29
29
|
renderFooter),
|
|
@@ -51,6 +51,9 @@ export declare const Quote: {
|
|
|
51
51
|
url: {
|
|
52
52
|
type: string;
|
|
53
53
|
};
|
|
54
|
+
urlTitle: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
54
57
|
buttonText: {
|
|
55
58
|
type: string;
|
|
56
59
|
};
|
|
@@ -90,6 +93,10 @@ export declare const Quote: {
|
|
|
90
93
|
};
|
|
91
94
|
};
|
|
92
95
|
};
|
|
96
|
+
quoteType: {
|
|
97
|
+
type: string;
|
|
98
|
+
enum: import("../..").QuoteType[];
|
|
99
|
+
};
|
|
93
100
|
type: {};
|
|
94
101
|
when: {
|
|
95
102
|
type: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from '../../components/Image/schema';
|
|
2
|
-
import { BaseProps, ThemeProps, authorItem, withTheme } from '../../schema/validators/common';
|
|
2
|
+
import { BaseProps, ThemeProps, authorItem, quoteTypes, withTheme, } from '../../schema/validators/common';
|
|
3
3
|
export const Quote = {
|
|
4
4
|
quote: {
|
|
5
5
|
additionalProperties: false,
|
|
@@ -11,8 +11,13 @@ export const Quote = {
|
|
|
11
11
|
type: 'string',
|
|
12
12
|
}, url: {
|
|
13
13
|
type: 'string',
|
|
14
|
+
}, urlTitle: {
|
|
15
|
+
type: 'string',
|
|
14
16
|
}, buttonText: {
|
|
15
17
|
type: 'string',
|
|
16
|
-
}, theme: ThemeProps, author: authorItem
|
|
18
|
+
}, theme: ThemeProps, author: authorItem, quoteType: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
enum: quoteTypes,
|
|
21
|
+
} }),
|
|
17
22
|
},
|
|
18
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "4.29.0",
|
|
3
|
+
"version": "4.29.1-alpha.0",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"@gravity-ui/components": "^2.4.0",
|
|
85
85
|
"@gravity-ui/dynamic-forms": "^2.3.0",
|
|
86
86
|
"@gravity-ui/i18n": "^1.0.0",
|
|
87
|
+
"@react-spring/web": "^9.7.3",
|
|
87
88
|
"ajv": "^8.12.0",
|
|
88
89
|
"final-form": "^4.20.9",
|
|
89
90
|
"github-buttons": "2.23.0",
|
|
@@ -93,7 +94,6 @@
|
|
|
93
94
|
"react-monaco-editor": "^0.53.0",
|
|
94
95
|
"react-player": "^2.9.0",
|
|
95
96
|
"react-slick": "^0.29.0",
|
|
96
|
-
"react-spring": "^9.7.2",
|
|
97
97
|
"react-transition-group": "^4.4.2",
|
|
98
98
|
"react-waypoint": "^10.1.0",
|
|
99
99
|
"sanitize-html": "2.6.1",
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export type ArrowDirection = 'left' | 'right';
|
|
2
|
-
export
|
|
3
|
-
}
|
|
2
|
+
export type ReactPlayerBlockHandler = Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
|
-
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps } from './common';
|
|
7
|
-
import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
6
|
+
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
|
|
7
|
+
import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
8
8
|
export declare enum BlockType {
|
|
9
9
|
PromoFeaturesBlock = "promo-features-block",
|
|
10
10
|
ExtendedFeaturesBlock = "extended-features-block",
|
|
@@ -23,7 +23,8 @@ export declare enum BlockType {
|
|
|
23
23
|
ContentLayoutBlock = "content-layout-block",
|
|
24
24
|
ShareBlock = "share-block",
|
|
25
25
|
MapBlock = "map-block",
|
|
26
|
-
FilterBlock = "filter-block"
|
|
26
|
+
FilterBlock = "filter-block",
|
|
27
|
+
FormBlock = "form-block"
|
|
27
28
|
}
|
|
28
29
|
export declare const BlockTypes: BlockType[];
|
|
29
30
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -109,6 +110,7 @@ export interface HeaderBlockProps {
|
|
|
109
110
|
verticalOffset?: 's' | 'm' | 'l' | 'xl';
|
|
110
111
|
breadcrumbs?: HeaderBreadCrumbsProps;
|
|
111
112
|
status?: JSX.Element;
|
|
113
|
+
renderTitle?: (title: string) => React.ReactNode;
|
|
112
114
|
}
|
|
113
115
|
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
114
116
|
title: string;
|
|
@@ -294,6 +296,29 @@ export interface ShareBlockProps {
|
|
|
294
296
|
items: PCShareSocialNetwork[];
|
|
295
297
|
title?: string;
|
|
296
298
|
}
|
|
299
|
+
export declare enum FormBlockDataTypes {
|
|
300
|
+
YANDEX = "yandex",
|
|
301
|
+
HUBSPOT_INLINE = "hubspot-inline"
|
|
302
|
+
}
|
|
303
|
+
export declare enum FormBlockDirection {
|
|
304
|
+
FormContent = "form-content",
|
|
305
|
+
ContentForm = "content-form",
|
|
306
|
+
Center = "center"
|
|
307
|
+
}
|
|
308
|
+
export interface FormBlockYandexData {
|
|
309
|
+
yandex: YandexFormProps;
|
|
310
|
+
}
|
|
311
|
+
export interface FormBlockHubspotData {
|
|
312
|
+
hubspot: HubspotFormProps;
|
|
313
|
+
}
|
|
314
|
+
export type FormBlockData = FormBlockYandexData | FormBlockHubspotData;
|
|
315
|
+
export interface FormBlockProps {
|
|
316
|
+
formData: FormBlockData;
|
|
317
|
+
title?: string;
|
|
318
|
+
textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;
|
|
319
|
+
direction?: FormBlockDirection;
|
|
320
|
+
background?: BackgroundImageProps;
|
|
321
|
+
}
|
|
297
322
|
export type HeaderBlockModel = {
|
|
298
323
|
type: BlockType.HeaderBlock;
|
|
299
324
|
} & HeaderBlockProps;
|
|
@@ -348,6 +373,9 @@ export type ContentLayoutBlockModel = {
|
|
|
348
373
|
export type ShareBLockModel = {
|
|
349
374
|
type: BlockType.ShareBlock;
|
|
350
375
|
} & ShareBlockProps;
|
|
351
|
-
type
|
|
376
|
+
export type FormBlockModel = {
|
|
377
|
+
type: BlockType.FormBlock;
|
|
378
|
+
} & FormBlockProps;
|
|
379
|
+
type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel;
|
|
352
380
|
export type Block = BlockModels & BlockBaseProps;
|
|
353
381
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
3
|
+
exports.FormBlockDirection = exports.FormBlockDataTypes = exports.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
4
4
|
var BlockType;
|
|
5
5
|
(function (BlockType) {
|
|
6
6
|
BlockType["PromoFeaturesBlock"] = "promo-features-block";
|
|
@@ -21,6 +21,7 @@ var BlockType;
|
|
|
21
21
|
BlockType["ShareBlock"] = "share-block";
|
|
22
22
|
BlockType["MapBlock"] = "map-block";
|
|
23
23
|
BlockType["FilterBlock"] = "filter-block";
|
|
24
|
+
BlockType["FormBlock"] = "form-block";
|
|
24
25
|
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
|
25
26
|
exports.BlockTypes = Object.values(BlockType);
|
|
26
27
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -44,3 +45,14 @@ var PCShareSocialNetwork;
|
|
|
44
45
|
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
45
46
|
PCShareSocialNetwork["LinkedIn"] = "linkedin";
|
|
46
47
|
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
48
|
+
var FormBlockDataTypes;
|
|
49
|
+
(function (FormBlockDataTypes) {
|
|
50
|
+
FormBlockDataTypes["YANDEX"] = "yandex";
|
|
51
|
+
FormBlockDataTypes["HUBSPOT_INLINE"] = "hubspot-inline";
|
|
52
|
+
})(FormBlockDataTypes = exports.FormBlockDataTypes || (exports.FormBlockDataTypes = {}));
|
|
53
|
+
var FormBlockDirection;
|
|
54
|
+
(function (FormBlockDirection) {
|
|
55
|
+
FormBlockDirection["FormContent"] = "form-content";
|
|
56
|
+
FormBlockDirection["ContentForm"] = "content-form";
|
|
57
|
+
FormBlockDirection["Center"] = "center";
|
|
58
|
+
})(FormBlockDirection = exports.FormBlockDirection || (exports.FormBlockDirection = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
|
|
3
3
|
import { ThemeSupporting } from '../../utils';
|
|
4
|
-
import { AnalyticsEventsBase, ClassNameProps, PixelEventType, QAProps } from '../common';
|
|
4
|
+
import { AnalyticsEventsBase, ClassNameProps, PixelEvent, PixelEventType, QAProps } from '../common';
|
|
5
5
|
export declare enum AuthorType {
|
|
6
6
|
Column = "column",
|
|
7
7
|
Line = "line"
|
|
@@ -42,6 +42,10 @@ export declare enum MediaVideoControlsType {
|
|
|
42
42
|
Default = "default",
|
|
43
43
|
Custom = "custom"
|
|
44
44
|
}
|
|
45
|
+
export declare enum QuoteType {
|
|
46
|
+
Chevron = "chevron",
|
|
47
|
+
EnglishDouble = "english-double"
|
|
48
|
+
}
|
|
45
49
|
export type TextTheme = 'light' | 'dark';
|
|
46
50
|
export type TextSize = 'xs' | 's' | 'm' | 'l';
|
|
47
51
|
export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
@@ -333,4 +337,20 @@ export interface TitleProps {
|
|
|
333
337
|
title?: TitleItemProps | string;
|
|
334
338
|
subtitle?: string;
|
|
335
339
|
}
|
|
340
|
+
export interface YandexFormProps extends AnalyticsEventsBase {
|
|
341
|
+
id: number | string;
|
|
342
|
+
containerId?: string;
|
|
343
|
+
theme?: string;
|
|
344
|
+
className?: string;
|
|
345
|
+
headerHeight?: number;
|
|
346
|
+
customFormOrigin?: string;
|
|
347
|
+
customFormSection?: string;
|
|
348
|
+
params?: {
|
|
349
|
+
[key: string]: string;
|
|
350
|
+
};
|
|
351
|
+
onSubmit?: () => void;
|
|
352
|
+
onLoad?: () => void;
|
|
353
|
+
metrikaGoals?: string | string[];
|
|
354
|
+
pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
|
|
355
|
+
}
|
|
336
356
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsButtonPositioning = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
3
|
+
exports.QuoteType = exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsButtonPositioning = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
4
4
|
// enums
|
|
5
5
|
var AuthorType;
|
|
6
6
|
(function (AuthorType) {
|
|
@@ -51,3 +51,8 @@ var MediaVideoControlsType;
|
|
|
51
51
|
MediaVideoControlsType["Default"] = "default";
|
|
52
52
|
MediaVideoControlsType["Custom"] = "custom";
|
|
53
53
|
})(MediaVideoControlsType = exports.MediaVideoControlsType || (exports.MediaVideoControlsType = {}));
|
|
54
|
+
var QuoteType;
|
|
55
|
+
(function (QuoteType) {
|
|
56
|
+
QuoteType["Chevron"] = "chevron";
|
|
57
|
+
QuoteType["EnglishDouble"] = "english-double";
|
|
58
|
+
})(QuoteType = exports.QuoteType || (exports.QuoteType = {}));
|