@gravity-ui/page-constructor 1.11.1 → 1.12.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/CHANGELOG.md +16 -1
- package/build/cjs/blocks/Banner/schema.d.ts +12 -0
- package/build/cjs/blocks/Banner/schema.js +2 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +28 -22
- package/build/cjs/blocks/CardLayout/schema.js +1 -5
- package/build/cjs/blocks/Companies/schema.d.ts +2 -0
- package/build/cjs/blocks/Companies/schema.js +2 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +22 -16
- package/build/cjs/blocks/ExtendedFeatures/schema.js +3 -5
- package/build/cjs/blocks/Header/schema.d.ts +16 -0
- package/build/cjs/blocks/Header/schema.js +5 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +9 -23
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Icons/schema.js +2 -0
- package/build/cjs/blocks/Info/schema.d.ts +10 -0
- package/build/cjs/blocks/Info/schema.js +2 -0
- package/build/cjs/blocks/LinkTable/schema.d.ts +30 -20
- package/build/cjs/blocks/LinkTable/schema.js +1 -1
- package/build/cjs/blocks/Media/schema.d.ts +62 -53
- package/build/cjs/blocks/Media/schema.js +6 -10
- package/build/cjs/blocks/Preview/schema.d.ts +2 -0
- package/build/cjs/blocks/Preview/schema.js +4 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +20 -14
- package/build/cjs/blocks/PromoFeaturesBlock/schema.js +3 -5
- package/build/cjs/blocks/Questions/schema.d.ts +5 -0
- package/build/cjs/blocks/Questions/schema.js +2 -0
- package/build/cjs/blocks/Security/schema.d.ts +2 -0
- package/build/cjs/blocks/Security/schema.js +2 -0
- package/build/cjs/blocks/Simple/schema.d.ts +3 -0
- package/build/cjs/blocks/Simple/schema.js +1 -0
- package/build/cjs/blocks/Slider/Slider.d.ts +1 -6
- package/build/cjs/blocks/Slider/schema.d.ts +31 -45
- package/build/cjs/blocks/Slider/schema.js +2 -5
- package/build/cjs/blocks/Table/schema.d.ts +4 -0
- package/build/cjs/blocks/Table/schema.js +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +37 -23
- package/build/cjs/blocks/Tabs/schema.js +2 -3
- package/build/cjs/components/Author/Author.js +2 -2
- package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
- package/build/cjs/components/Author/schema.d.ts +3 -0
- package/build/cjs/components/BlockHeader/BlockHeader.css +8 -19
- package/build/cjs/components/BlockHeader/BlockHeader.js +4 -3
- package/build/cjs/components/Image/schema.d.ts +2 -0
- package/build/cjs/components/Image/schema.js +14 -23
- package/build/cjs/grid/Grid/Grid.css +16 -16
- package/build/cjs/models/constructor-items/common.d.ts +1 -0
- package/build/cjs/navigation/components/Header/Header.css +2 -1
- package/build/cjs/navigation/components/Logo/Logo.css +5 -6
- package/build/cjs/schema/index.d.ts +2 -0
- package/build/cjs/schema/validators/common.d.ts +48 -0
- package/build/cjs/schema/validators/common.js +21 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +5 -0
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +54 -46
- package/build/cjs/sub-blocks/CardWithImage/schema.js +7 -6
- package/build/cjs/sub-blocks/Content/schema.d.ts +8 -0
- package/build/cjs/sub-blocks/Content/schema.js +3 -1
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/NewsCard/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/NewsCard/schema.js +1 -0
- package/build/cjs/sub-blocks/Partner/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/Partner/schema.js +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +8 -0
- package/build/cjs/sub-blocks/Quote/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/Quote/schema.js +1 -0
- package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +2 -0
- package/build/cjs/sub-blocks/TutorialCard/schema.js +2 -0
- package/build/cjs/text-transform/blocks.js +49 -32
- package/build/esm/blocks/Banner/schema.d.ts +12 -0
- package/build/esm/blocks/Banner/schema.js +2 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +28 -22
- package/build/esm/blocks/CardLayout/schema.js +2 -6
- package/build/esm/blocks/Companies/schema.d.ts +2 -0
- package/build/esm/blocks/Companies/schema.js +2 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +22 -16
- package/build/esm/blocks/ExtendedFeatures/schema.js +4 -6
- package/build/esm/blocks/Header/schema.d.ts +16 -0
- package/build/esm/blocks/Header/schema.js +5 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +9 -23
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Icons/schema.js +2 -0
- package/build/esm/blocks/Info/schema.d.ts +10 -0
- package/build/esm/blocks/Info/schema.js +2 -0
- package/build/esm/blocks/LinkTable/schema.d.ts +30 -20
- package/build/esm/blocks/LinkTable/schema.js +2 -2
- package/build/esm/blocks/Media/schema.d.ts +62 -53
- package/build/esm/blocks/Media/schema.js +7 -11
- package/build/esm/blocks/Preview/schema.d.ts +2 -0
- package/build/esm/blocks/Preview/schema.js +4 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +20 -14
- package/build/esm/blocks/PromoFeaturesBlock/schema.js +4 -6
- package/build/esm/blocks/Questions/schema.d.ts +5 -0
- package/build/esm/blocks/Questions/schema.js +2 -0
- package/build/esm/blocks/Security/schema.d.ts +2 -0
- package/build/esm/blocks/Security/schema.js +2 -0
- package/build/esm/blocks/Simple/schema.d.ts +3 -0
- package/build/esm/blocks/Simple/schema.js +1 -0
- package/build/esm/blocks/Slider/Slider.d.ts +1 -6
- package/build/esm/blocks/Slider/schema.d.ts +31 -45
- package/build/esm/blocks/Slider/schema.js +3 -6
- package/build/esm/blocks/Table/schema.d.ts +4 -0
- package/build/esm/blocks/Table/schema.js +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +37 -23
- package/build/esm/blocks/Tabs/schema.js +3 -4
- package/build/esm/components/Author/Author.js +2 -2
- package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/esm/components/Author/__tests__/Author.test.js +46 -0
- package/build/esm/components/Author/schema.d.ts +3 -0
- package/build/esm/components/BlockHeader/BlockHeader.css +8 -19
- package/build/esm/components/BlockHeader/BlockHeader.js +5 -4
- package/build/esm/components/Image/schema.d.ts +2 -0
- package/build/esm/components/Image/schema.js +14 -23
- package/build/esm/grid/Grid/Grid.css +16 -16
- package/build/esm/models/constructor-items/common.d.ts +1 -0
- package/build/esm/navigation/components/Header/Header.css +2 -1
- package/build/esm/navigation/components/Logo/Logo.css +5 -6
- package/build/esm/schema/index.d.ts +2 -0
- package/build/esm/schema/validators/common.d.ts +48 -0
- package/build/esm/schema/validators/common.js +20 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +5 -0
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +4 -0
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +54 -46
- package/build/esm/sub-blocks/CardWithImage/schema.js +8 -7
- package/build/esm/sub-blocks/Content/schema.d.ts +8 -0
- package/build/esm/sub-blocks/Content/schema.js +3 -1
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +1 -0
- package/build/esm/sub-blocks/NewsCard/schema.d.ts +1 -0
- package/build/esm/sub-blocks/NewsCard/schema.js +1 -0
- package/build/esm/sub-blocks/Partner/schema.d.ts +1 -0
- package/build/esm/sub-blocks/Partner/schema.js +1 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.js +8 -0
- package/build/esm/sub-blocks/Quote/schema.d.ts +4 -0
- package/build/esm/sub-blocks/Quote/schema.js +1 -0
- package/build/esm/sub-blocks/TutorialCard/schema.d.ts +2 -0
- package/build/esm/sub-blocks/TutorialCard/schema.js +2 -0
- package/build/esm/text-transform/blocks.js +49 -32
- package/package.json +2 -3
- package/server/models/constructor-items/common.d.ts +1 -0
- package/server/text-transform/blocks.js +49 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-
|
|
1
|
+
.pc-logo__text {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -7,11 +7,6 @@ unpredictable css rules order in build */
|
|
|
7
7
|
.pc-logo {
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
11
|
-
font-size: var(--yc-text-header-1-font-size);
|
|
12
|
-
line-height: var(--yc-text-header-1-line-height);
|
|
13
|
-
color: var(--pc-text-header-color);
|
|
14
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
15
10
|
}
|
|
16
11
|
.pc-logo__icon {
|
|
17
12
|
display: flex;
|
|
@@ -19,5 +14,9 @@ unpredictable css rules order in build */
|
|
|
19
14
|
object-fit: contain;
|
|
20
15
|
}
|
|
21
16
|
.pc-logo__text {
|
|
17
|
+
font-size: var(--yc-text-header-1-font-size);
|
|
18
|
+
line-height: var(--yc-text-header-1-line-height);
|
|
19
|
+
color: var(--pc-text-header-color);
|
|
20
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
22
21
|
white-space: nowrap;
|
|
23
22
|
}
|
|
@@ -43,6 +43,7 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
43
43
|
properties: {
|
|
44
44
|
title: {
|
|
45
45
|
type: string;
|
|
46
|
+
contentType: string;
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
49
|
};
|
|
@@ -121,6 +122,7 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
121
122
|
};
|
|
122
123
|
text: {
|
|
123
124
|
type: string;
|
|
125
|
+
contentType: string;
|
|
124
126
|
};
|
|
125
127
|
};
|
|
126
128
|
};
|
|
@@ -83,6 +83,7 @@ export declare const PlayIconProps: {
|
|
|
83
83
|
};
|
|
84
84
|
text: {
|
|
85
85
|
type: string;
|
|
86
|
+
contentType: string;
|
|
86
87
|
};
|
|
87
88
|
};
|
|
88
89
|
};
|
|
@@ -141,6 +142,7 @@ export declare const VideoProps: {
|
|
|
141
142
|
};
|
|
142
143
|
text: {
|
|
143
144
|
type: string;
|
|
145
|
+
contentType: string;
|
|
144
146
|
};
|
|
145
147
|
};
|
|
146
148
|
};
|
|
@@ -264,6 +266,7 @@ export declare const BackgroundProps: {
|
|
|
264
266
|
};
|
|
265
267
|
text: {
|
|
266
268
|
type: string;
|
|
269
|
+
contentType: string;
|
|
267
270
|
};
|
|
268
271
|
};
|
|
269
272
|
};
|
|
@@ -295,6 +298,7 @@ export declare const LinkProps: {
|
|
|
295
298
|
properties: {
|
|
296
299
|
text: {
|
|
297
300
|
type: string;
|
|
301
|
+
contentType: string;
|
|
298
302
|
};
|
|
299
303
|
url: {
|
|
300
304
|
type: string;
|
|
@@ -328,6 +332,7 @@ export declare const FileLinkProps: {
|
|
|
328
332
|
};
|
|
329
333
|
text: {
|
|
330
334
|
type: string;
|
|
335
|
+
contentType: string;
|
|
331
336
|
};
|
|
332
337
|
type: {
|
|
333
338
|
type: string;
|
|
@@ -349,9 +354,11 @@ export declare const authorItem: {
|
|
|
349
354
|
properties: {
|
|
350
355
|
firstName: {
|
|
351
356
|
type: string;
|
|
357
|
+
contentType: string;
|
|
352
358
|
};
|
|
353
359
|
secondName: {
|
|
354
360
|
type: string;
|
|
361
|
+
contentType: string;
|
|
355
362
|
};
|
|
356
363
|
avatar: {
|
|
357
364
|
type: string;
|
|
@@ -359,12 +366,14 @@ export declare const authorItem: {
|
|
|
359
366
|
};
|
|
360
367
|
description: {
|
|
361
368
|
type: string;
|
|
369
|
+
contentType: string;
|
|
362
370
|
};
|
|
363
371
|
};
|
|
364
372
|
};
|
|
365
373
|
export declare const ButtonProps: {
|
|
366
374
|
text: {
|
|
367
375
|
type: string;
|
|
376
|
+
contentType: string;
|
|
368
377
|
};
|
|
369
378
|
url: {
|
|
370
379
|
type: string;
|
|
@@ -400,6 +409,7 @@ export declare const ButtonProps: {
|
|
|
400
409
|
};
|
|
401
410
|
alt: {
|
|
402
411
|
type: string;
|
|
412
|
+
contentType: string;
|
|
403
413
|
};
|
|
404
414
|
};
|
|
405
415
|
})[];
|
|
@@ -500,6 +510,7 @@ export declare const MenuProps: {
|
|
|
500
510
|
properties: {
|
|
501
511
|
title: {
|
|
502
512
|
type: string;
|
|
513
|
+
contentType: string;
|
|
503
514
|
};
|
|
504
515
|
};
|
|
505
516
|
};
|
|
@@ -518,6 +529,7 @@ export declare const AnchorProps: {
|
|
|
518
529
|
properties: {
|
|
519
530
|
text: {
|
|
520
531
|
type: string;
|
|
532
|
+
contentType: string;
|
|
521
533
|
};
|
|
522
534
|
url: {
|
|
523
535
|
type: string;
|
|
@@ -532,6 +544,7 @@ export declare const BlockBaseProps: {
|
|
|
532
544
|
properties: {
|
|
533
545
|
text: {
|
|
534
546
|
type: string;
|
|
547
|
+
contentType: string;
|
|
535
548
|
};
|
|
536
549
|
url: {
|
|
537
550
|
type: string;
|
|
@@ -555,6 +568,7 @@ export declare const TitleProps: {
|
|
|
555
568
|
properties: {
|
|
556
569
|
text: {
|
|
557
570
|
type: string;
|
|
571
|
+
contentType: string;
|
|
558
572
|
};
|
|
559
573
|
textSize: {
|
|
560
574
|
type: string;
|
|
@@ -574,6 +588,7 @@ export declare const ButtonBlock: {
|
|
|
574
588
|
properties: {
|
|
575
589
|
text: {
|
|
576
590
|
type: string;
|
|
591
|
+
contentType: string;
|
|
577
592
|
};
|
|
578
593
|
url: {
|
|
579
594
|
type: string;
|
|
@@ -609,6 +624,7 @@ export declare const ButtonBlock: {
|
|
|
609
624
|
};
|
|
610
625
|
alt: {
|
|
611
626
|
type: string;
|
|
627
|
+
contentType: string;
|
|
612
628
|
};
|
|
613
629
|
};
|
|
614
630
|
})[];
|
|
@@ -806,6 +822,7 @@ export declare const MediaProps: {
|
|
|
806
822
|
};
|
|
807
823
|
text: {
|
|
808
824
|
type: string;
|
|
825
|
+
contentType: string;
|
|
809
826
|
};
|
|
810
827
|
};
|
|
811
828
|
};
|
|
@@ -852,3 +869,34 @@ export declare const CardBase: {
|
|
|
852
869
|
enum: string[];
|
|
853
870
|
};
|
|
854
871
|
};
|
|
872
|
+
export declare const BlockHeaderProps: {
|
|
873
|
+
title: {
|
|
874
|
+
oneOf: ({
|
|
875
|
+
type: string;
|
|
876
|
+
additionalProperties: boolean;
|
|
877
|
+
required: string[];
|
|
878
|
+
properties: {
|
|
879
|
+
text: {
|
|
880
|
+
type: string;
|
|
881
|
+
contentType: string;
|
|
882
|
+
};
|
|
883
|
+
textSize: {
|
|
884
|
+
type: string;
|
|
885
|
+
enum: string[];
|
|
886
|
+
};
|
|
887
|
+
url: {
|
|
888
|
+
type: string;
|
|
889
|
+
};
|
|
890
|
+
resetMargin: {
|
|
891
|
+
type: string;
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
} | {
|
|
895
|
+
type: string;
|
|
896
|
+
})[];
|
|
897
|
+
};
|
|
898
|
+
description: {
|
|
899
|
+
type: string;
|
|
900
|
+
contentType: string;
|
|
901
|
+
};
|
|
902
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CardBase = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayIconProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
3
|
+
exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayIconProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
4
4
|
const pixel_1 = require("./pixel");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
@@ -79,6 +79,7 @@ exports.PlayIconProps = {
|
|
|
79
79
|
},
|
|
80
80
|
text: {
|
|
81
81
|
type: 'string',
|
|
82
|
+
contentType: 'text',
|
|
82
83
|
},
|
|
83
84
|
},
|
|
84
85
|
};
|
|
@@ -162,6 +163,7 @@ exports.LinkProps = {
|
|
|
162
163
|
required: ['text', 'url'],
|
|
163
164
|
properties: Object.assign(Object.assign({}, exports.BaseProps), { text: {
|
|
164
165
|
type: 'string',
|
|
166
|
+
contentType: 'text',
|
|
165
167
|
}, url: {
|
|
166
168
|
type: 'string',
|
|
167
169
|
}, arrow: {
|
|
@@ -187,6 +189,7 @@ exports.FileLinkProps = {
|
|
|
187
189
|
},
|
|
188
190
|
text: {
|
|
189
191
|
type: 'string',
|
|
192
|
+
contentType: 'text',
|
|
190
193
|
},
|
|
191
194
|
type: {
|
|
192
195
|
type: 'string',
|
|
@@ -208,9 +211,11 @@ exports.authorItem = {
|
|
|
208
211
|
properties: {
|
|
209
212
|
firstName: {
|
|
210
213
|
type: 'string',
|
|
214
|
+
contentType: 'text',
|
|
211
215
|
},
|
|
212
216
|
secondName: {
|
|
213
217
|
type: 'string',
|
|
218
|
+
contentType: 'text',
|
|
214
219
|
},
|
|
215
220
|
avatar: {
|
|
216
221
|
type: 'string',
|
|
@@ -218,12 +223,14 @@ exports.authorItem = {
|
|
|
218
223
|
},
|
|
219
224
|
description: {
|
|
220
225
|
type: 'string',
|
|
226
|
+
contentType: 'yfm',
|
|
221
227
|
},
|
|
222
228
|
},
|
|
223
229
|
};
|
|
224
230
|
exports.ButtonProps = {
|
|
225
231
|
text: {
|
|
226
232
|
type: 'string',
|
|
233
|
+
contentType: 'text',
|
|
227
234
|
},
|
|
228
235
|
url: {
|
|
229
236
|
type: 'string',
|
|
@@ -296,6 +303,7 @@ exports.ButtonProps = {
|
|
|
296
303
|
},
|
|
297
304
|
alt: {
|
|
298
305
|
type: 'string',
|
|
306
|
+
contentType: 'text',
|
|
299
307
|
},
|
|
300
308
|
},
|
|
301
309
|
},
|
|
@@ -335,6 +343,7 @@ exports.MenuProps = {
|
|
|
335
343
|
properties: {
|
|
336
344
|
title: {
|
|
337
345
|
type: 'string',
|
|
346
|
+
contentType: 'text',
|
|
338
347
|
},
|
|
339
348
|
},
|
|
340
349
|
};
|
|
@@ -359,6 +368,7 @@ exports.AnchorProps = {
|
|
|
359
368
|
properties: {
|
|
360
369
|
text: {
|
|
361
370
|
type: 'string',
|
|
371
|
+
contentType: 'text',
|
|
362
372
|
},
|
|
363
373
|
url: {
|
|
364
374
|
type: 'string',
|
|
@@ -378,6 +388,7 @@ exports.TitleProps = {
|
|
|
378
388
|
properties: {
|
|
379
389
|
text: {
|
|
380
390
|
type: 'string',
|
|
391
|
+
contentType: 'text',
|
|
381
392
|
},
|
|
382
393
|
textSize: {
|
|
383
394
|
type: 'string',
|
|
@@ -437,3 +448,12 @@ exports.CardBase = {
|
|
|
437
448
|
enum: ['border', 'shadow', 'none'],
|
|
438
449
|
},
|
|
439
450
|
};
|
|
451
|
+
exports.BlockHeaderProps = {
|
|
452
|
+
title: {
|
|
453
|
+
oneOf: [{ type: 'string' }, exports.TitleProps],
|
|
454
|
+
},
|
|
455
|
+
description: {
|
|
456
|
+
type: 'string',
|
|
457
|
+
contentType: 'yfm',
|
|
458
|
+
},
|
|
459
|
+
};
|
|
@@ -18,6 +18,7 @@ export declare const BackgroundCard: {
|
|
|
18
18
|
};
|
|
19
19
|
alt: {
|
|
20
20
|
type: string;
|
|
21
|
+
contentType: string;
|
|
21
22
|
};
|
|
22
23
|
disableCompress: {
|
|
23
24
|
type: string;
|
|
@@ -45,6 +46,7 @@ export declare const BackgroundCard: {
|
|
|
45
46
|
properties: {
|
|
46
47
|
text: {
|
|
47
48
|
type: string;
|
|
49
|
+
contentType: string;
|
|
48
50
|
};
|
|
49
51
|
textSize: {
|
|
50
52
|
type: string;
|
|
@@ -59,10 +61,12 @@ export declare const BackgroundCard: {
|
|
|
59
61
|
};
|
|
60
62
|
} | {
|
|
61
63
|
type: string;
|
|
64
|
+
contentType: string;
|
|
62
65
|
})[];
|
|
63
66
|
};
|
|
64
67
|
text: {
|
|
65
68
|
type: string;
|
|
69
|
+
contentType: string;
|
|
66
70
|
};
|
|
67
71
|
theme: {
|
|
68
72
|
type: string;
|
|
@@ -70,6 +74,7 @@ export declare const BackgroundCard: {
|
|
|
70
74
|
};
|
|
71
75
|
additionalInfo: {
|
|
72
76
|
type: string;
|
|
77
|
+
contentType: string;
|
|
73
78
|
};
|
|
74
79
|
links: {
|
|
75
80
|
type: string;
|
|
@@ -27,6 +27,7 @@ export declare const BasicCard: {
|
|
|
27
27
|
properties: {
|
|
28
28
|
text: {
|
|
29
29
|
type: string;
|
|
30
|
+
contentType: string;
|
|
30
31
|
};
|
|
31
32
|
textSize: {
|
|
32
33
|
type: string;
|
|
@@ -41,13 +42,16 @@ export declare const BasicCard: {
|
|
|
41
42
|
};
|
|
42
43
|
} | {
|
|
43
44
|
type: string;
|
|
45
|
+
contentType: string;
|
|
44
46
|
})[];
|
|
45
47
|
};
|
|
46
48
|
text: {
|
|
47
49
|
type: string;
|
|
50
|
+
contentType: string;
|
|
48
51
|
};
|
|
49
52
|
additionalInfo: {
|
|
50
53
|
type: string;
|
|
54
|
+
contentType: string;
|
|
51
55
|
};
|
|
52
56
|
links: {
|
|
53
57
|
type: string;
|
|
@@ -5,6 +5,30 @@ export declare const CardWithImageItem: {
|
|
|
5
5
|
image: {
|
|
6
6
|
type: string;
|
|
7
7
|
};
|
|
8
|
+
description: {
|
|
9
|
+
type: string;
|
|
10
|
+
contentType: string;
|
|
11
|
+
};
|
|
12
|
+
disableCompress: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
border: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
fullScreen: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
links: {
|
|
22
|
+
type: string;
|
|
23
|
+
items: {
|
|
24
|
+
type: string;
|
|
25
|
+
properties: {
|
|
26
|
+
when: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
8
32
|
title: {
|
|
9
33
|
oneOf: ({
|
|
10
34
|
type: string;
|
|
@@ -13,6 +37,7 @@ export declare const CardWithImageItem: {
|
|
|
13
37
|
properties: {
|
|
14
38
|
text: {
|
|
15
39
|
type: string;
|
|
40
|
+
contentType: string;
|
|
16
41
|
};
|
|
17
42
|
textSize: {
|
|
18
43
|
type: string;
|
|
@@ -27,33 +52,12 @@ export declare const CardWithImageItem: {
|
|
|
27
52
|
};
|
|
28
53
|
} | {
|
|
29
54
|
type: string;
|
|
55
|
+
contentType: string;
|
|
30
56
|
})[];
|
|
31
57
|
};
|
|
32
|
-
description: {
|
|
33
|
-
type: string;
|
|
34
|
-
};
|
|
35
58
|
additionalInfo: {
|
|
36
59
|
type: string;
|
|
37
|
-
|
|
38
|
-
disableCompress: {
|
|
39
|
-
type: string;
|
|
40
|
-
};
|
|
41
|
-
border: {
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
|
-
fullScreen: {
|
|
45
|
-
type: string;
|
|
46
|
-
};
|
|
47
|
-
links: {
|
|
48
|
-
type: string;
|
|
49
|
-
items: {
|
|
50
|
-
type: string;
|
|
51
|
-
properties: {
|
|
52
|
-
when: {
|
|
53
|
-
type: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
60
|
+
contentType: string;
|
|
57
61
|
};
|
|
58
62
|
buttons: {
|
|
59
63
|
type: string;
|
|
@@ -78,6 +82,30 @@ export declare const CardWithImage: {
|
|
|
78
82
|
image: {
|
|
79
83
|
type: string;
|
|
80
84
|
};
|
|
85
|
+
description: {
|
|
86
|
+
type: string;
|
|
87
|
+
contentType: string;
|
|
88
|
+
};
|
|
89
|
+
disableCompress: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
92
|
+
border: {
|
|
93
|
+
type: string;
|
|
94
|
+
};
|
|
95
|
+
fullScreen: {
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
links: {
|
|
99
|
+
type: string;
|
|
100
|
+
items: {
|
|
101
|
+
type: string;
|
|
102
|
+
properties: {
|
|
103
|
+
when: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
81
109
|
title: {
|
|
82
110
|
oneOf: ({
|
|
83
111
|
type: string;
|
|
@@ -86,6 +114,7 @@ export declare const CardWithImage: {
|
|
|
86
114
|
properties: {
|
|
87
115
|
text: {
|
|
88
116
|
type: string;
|
|
117
|
+
contentType: string;
|
|
89
118
|
};
|
|
90
119
|
textSize: {
|
|
91
120
|
type: string;
|
|
@@ -100,33 +129,12 @@ export declare const CardWithImage: {
|
|
|
100
129
|
};
|
|
101
130
|
} | {
|
|
102
131
|
type: string;
|
|
132
|
+
contentType: string;
|
|
103
133
|
})[];
|
|
104
134
|
};
|
|
105
|
-
description: {
|
|
106
|
-
type: string;
|
|
107
|
-
};
|
|
108
135
|
additionalInfo: {
|
|
109
136
|
type: string;
|
|
110
|
-
|
|
111
|
-
disableCompress: {
|
|
112
|
-
type: string;
|
|
113
|
-
};
|
|
114
|
-
border: {
|
|
115
|
-
type: string;
|
|
116
|
-
};
|
|
117
|
-
fullScreen: {
|
|
118
|
-
type: string;
|
|
119
|
-
};
|
|
120
|
-
links: {
|
|
121
|
-
type: string;
|
|
122
|
-
items: {
|
|
123
|
-
type: string;
|
|
124
|
-
properties: {
|
|
125
|
-
when: {
|
|
126
|
-
type: string;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
};
|
|
137
|
+
contentType: string;
|
|
130
138
|
};
|
|
131
139
|
buttons: {
|
|
132
140
|
type: string;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CardWithImage = exports.CardWithImageItem = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
4
5
|
const common_1 = require("../../schema/validators/common");
|
|
5
6
|
const utils_1 = require("../../schema/validators/utils");
|
|
7
|
+
const schema_1 = require("../../sub-blocks/Content/schema");
|
|
8
|
+
const CardWithImageContentProps = (0, lodash_1.omit)(schema_1.ContentBase, ['links', 'size', 'text', 'theme']);
|
|
6
9
|
const CardWithImageLinks = {
|
|
7
10
|
type: 'object',
|
|
8
11
|
additionalProperties: false,
|
|
9
12
|
required: ['title', 'link'],
|
|
10
13
|
properties: Object.assign(Object.assign({}, common_1.BaseProps), { title: {
|
|
11
14
|
type: 'string',
|
|
15
|
+
contentType: 'text',
|
|
12
16
|
}, link: {
|
|
13
17
|
type: 'string',
|
|
14
18
|
}, arrow: {
|
|
@@ -24,21 +28,18 @@ const CardWithImageLinks = {
|
|
|
24
28
|
exports.CardWithImageItem = {
|
|
25
29
|
additionalProperties: false,
|
|
26
30
|
required: ['image'],
|
|
27
|
-
properties: Object.assign(Object.assign({}, common_1.BaseProps), { image: {
|
|
31
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), CardWithImageContentProps), { image: {
|
|
28
32
|
type: 'string',
|
|
29
|
-
}, title: {
|
|
30
|
-
oneOf: [{ type: 'string' }, common_1.TitleProps],
|
|
31
33
|
}, description: {
|
|
32
34
|
type: 'string',
|
|
33
|
-
|
|
34
|
-
type: 'string',
|
|
35
|
+
contentType: 'yfm',
|
|
35
36
|
}, disableCompress: {
|
|
36
37
|
type: 'boolean',
|
|
37
38
|
}, border: {
|
|
38
39
|
type: 'boolean',
|
|
39
40
|
}, fullScreen: {
|
|
40
41
|
type: 'boolean',
|
|
41
|
-
}, links: (0, utils_1.filteredArray)(CardWithImageLinks)
|
|
42
|
+
}, links: (0, utils_1.filteredArray)(CardWithImageLinks) }),
|
|
42
43
|
};
|
|
43
44
|
exports.CardWithImage = {
|
|
44
45
|
'card-with-image': exports.CardWithImageItem,
|
|
@@ -7,6 +7,7 @@ export declare const ContentBase: {
|
|
|
7
7
|
properties: {
|
|
8
8
|
text: {
|
|
9
9
|
type: string;
|
|
10
|
+
contentType: string;
|
|
10
11
|
};
|
|
11
12
|
textSize: {
|
|
12
13
|
type: string;
|
|
@@ -21,13 +22,16 @@ export declare const ContentBase: {
|
|
|
21
22
|
};
|
|
22
23
|
} | {
|
|
23
24
|
type: string;
|
|
25
|
+
contentType: string;
|
|
24
26
|
})[];
|
|
25
27
|
};
|
|
26
28
|
text: {
|
|
27
29
|
type: string;
|
|
30
|
+
contentType: string;
|
|
28
31
|
};
|
|
29
32
|
additionalInfo: {
|
|
30
33
|
type: string;
|
|
34
|
+
contentType: string;
|
|
31
35
|
};
|
|
32
36
|
size: {
|
|
33
37
|
type: string;
|
|
@@ -76,6 +80,7 @@ export declare const ContentBlock: {
|
|
|
76
80
|
properties: {
|
|
77
81
|
text: {
|
|
78
82
|
type: string;
|
|
83
|
+
contentType: string;
|
|
79
84
|
};
|
|
80
85
|
textSize: {
|
|
81
86
|
type: string;
|
|
@@ -90,13 +95,16 @@ export declare const ContentBlock: {
|
|
|
90
95
|
};
|
|
91
96
|
} | {
|
|
92
97
|
type: string;
|
|
98
|
+
contentType: string;
|
|
93
99
|
})[];
|
|
94
100
|
};
|
|
95
101
|
text: {
|
|
96
102
|
type: string;
|
|
103
|
+
contentType: string;
|
|
97
104
|
};
|
|
98
105
|
additionalInfo: {
|
|
99
106
|
type: string;
|
|
107
|
+
contentType: string;
|
|
100
108
|
};
|
|
101
109
|
size: {
|
|
102
110
|
type: string;
|
|
@@ -5,13 +5,15 @@ const common_1 = require("../../schema/validators/common");
|
|
|
5
5
|
const utils_1 = require("../../schema/validators/utils");
|
|
6
6
|
exports.ContentBase = {
|
|
7
7
|
title: {
|
|
8
|
-
oneOf: [{ type: 'string' }, common_1.TitleProps],
|
|
8
|
+
oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
|
|
9
9
|
},
|
|
10
10
|
text: {
|
|
11
11
|
type: 'string',
|
|
12
|
+
contentType: 'yfm',
|
|
12
13
|
},
|
|
13
14
|
additionalInfo: {
|
|
14
15
|
type: 'string',
|
|
16
|
+
contentType: 'yfm',
|
|
15
17
|
},
|
|
16
18
|
size: {
|
|
17
19
|
type: 'string',
|