@gravity-ui/page-constructor 8.23.0 → 8.23.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/Banner/schema.js +1 -1
- package/build/cjs/blocks/Banner/schema.js.map +1 -1
- package/build/cjs/blocks/CardLayout/schema.d.ts +8 -2
- package/build/cjs/blocks/ContentLayout/schema.d.ts +9 -173
- package/build/cjs/blocks/ContentLayout/schema.js +0 -4
- package/build/cjs/blocks/ContentLayout/schema.js.map +1 -1
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +4 -1
- package/build/cjs/blocks/FilterBlock/schema.d.ts +8 -2
- package/build/cjs/blocks/FoldableList/schema.d.ts +4 -1
- package/build/cjs/blocks/Form/schema.d.ts +4 -1
- package/build/cjs/blocks/Header/schema.d.ts +12 -3
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +4 -1
- package/build/cjs/blocks/Hero/schema.d.ts +16 -4
- package/build/cjs/blocks/Icons/schema.d.ts +92 -92
- package/build/cjs/blocks/Icons/schema.js +1 -13
- package/build/cjs/blocks/Icons/schema.js.map +1 -1
- package/build/cjs/blocks/Info/schema.d.ts +8 -2
- package/build/cjs/blocks/Map/schema.d.ts +4 -1
- package/build/cjs/blocks/Media/schema.d.ts +16 -4
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +8 -2
- package/build/cjs/blocks/Questions/schema.d.ts +4 -1
- package/build/cjs/blocks/Slider/schema.d.ts +4 -1
- package/build/cjs/blocks/SliderOld/schema.d.ts +4 -1
- package/build/cjs/blocks/Tabs/schema.d.ts +17 -4
- package/build/cjs/blocks/Tabs/schema.js +1 -1
- package/build/cjs/blocks/Tabs/schema.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +4 -1
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +20 -5
- package/build/cjs/schema/validators/common.d.ts +12 -3
- package/build/cjs/schema/validators/common.js +4 -25
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/schema/validators/event.d.ts +81 -0
- package/build/cjs/schema/validators/event.js +14 -1
- package/build/cjs/schema/validators/event.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +4 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -13
- package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +4 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -13
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Content/schema.d.ts +13 -3
- package/build/cjs/sub-blocks/Content/schema.js +1 -1
- package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.d.ts +4 -1
- package/build/cjs/sub-blocks/ImageCard/schema.js +1 -13
- package/build/cjs/sub-blocks/ImageCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +16 -4
- package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -13
- package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/cjs/sub-blocks/MediaCard/schema.js +1 -13
- package/build/cjs/sub-blocks/MediaCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +1 -13
- package/build/cjs/sub-blocks/PriceDetailed/schema.js.map +1 -1
- package/build/esm/blocks/Banner/schema.js +1 -1
- package/build/esm/blocks/Banner/schema.js.map +1 -1
- package/build/esm/blocks/CardLayout/schema.d.ts +8 -2
- package/build/esm/blocks/ContentLayout/schema.d.ts +9 -173
- package/build/esm/blocks/ContentLayout/schema.js +0 -4
- package/build/esm/blocks/ContentLayout/schema.js.map +1 -1
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +4 -1
- package/build/esm/blocks/FilterBlock/schema.d.ts +8 -2
- package/build/esm/blocks/FoldableList/schema.d.ts +4 -1
- package/build/esm/blocks/Form/schema.d.ts +4 -1
- package/build/esm/blocks/Header/schema.d.ts +12 -3
- package/build/esm/blocks/HeaderSlider/schema.d.ts +4 -1
- package/build/esm/blocks/Hero/schema.d.ts +16 -4
- package/build/esm/blocks/Icons/schema.d.ts +92 -92
- package/build/esm/blocks/Icons/schema.js +2 -14
- package/build/esm/blocks/Icons/schema.js.map +1 -1
- package/build/esm/blocks/Info/schema.d.ts +8 -2
- package/build/esm/blocks/Map/schema.d.ts +4 -1
- package/build/esm/blocks/Media/schema.d.ts +16 -4
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +8 -2
- package/build/esm/blocks/Questions/schema.d.ts +4 -1
- package/build/esm/blocks/Slider/schema.d.ts +4 -1
- package/build/esm/blocks/SliderOld/schema.d.ts +4 -1
- package/build/esm/blocks/Tabs/schema.d.ts +17 -4
- package/build/esm/blocks/Tabs/schema.js +2 -2
- package/build/esm/blocks/Tabs/schema.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +4 -1
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +20 -5
- package/build/esm/schema/validators/common.d.ts +12 -3
- package/build/esm/schema/validators/common.js +5 -26
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/schema/validators/event.d.ts +81 -0
- package/build/esm/schema/validators/event.js +13 -0
- package/build/esm/schema/validators/event.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +4 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -14
- package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +4 -1
- package/build/esm/sub-blocks/BasicCard/schema.js +2 -14
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/Content/schema.d.ts +13 -3
- package/build/esm/sub-blocks/Content/schema.js +2 -2
- package/build/esm/sub-blocks/Content/schema.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.d.ts +4 -1
- package/build/esm/sub-blocks/ImageCard/schema.js +2 -14
- package/build/esm/sub-blocks/ImageCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +16 -4
- package/build/esm/sub-blocks/LayoutItem/schema.js +2 -14
- package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/esm/sub-blocks/MediaCard/schema.js +2 -14
- package/build/esm/sub-blocks/MediaCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/PriceDetailed/schema.js +2 -14
- package/build/esm/sub-blocks/PriceDetailed/schema.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +4 -1
- package/widget/index.js +1 -1
|
@@ -212,7 +212,8 @@ export declare const tabsItem: {
|
|
|
212
212
|
type: string;
|
|
213
213
|
};
|
|
214
214
|
analyticsEvents: {
|
|
215
|
-
|
|
215
|
+
oneOf: ({
|
|
216
|
+
optionName: string;
|
|
216
217
|
type: string;
|
|
217
218
|
additionalProperties: {
|
|
218
219
|
type: string;
|
|
@@ -248,6 +249,7 @@ export declare const tabsItem: {
|
|
|
248
249
|
type: string;
|
|
249
250
|
};
|
|
250
251
|
};
|
|
252
|
+
items?: undefined;
|
|
251
253
|
} | {
|
|
252
254
|
type: string;
|
|
253
255
|
items: {
|
|
@@ -287,6 +289,7 @@ export declare const tabsItem: {
|
|
|
287
289
|
};
|
|
288
290
|
};
|
|
289
291
|
};
|
|
292
|
+
optionName: string;
|
|
290
293
|
})[];
|
|
291
294
|
};
|
|
292
295
|
ratio: {
|
|
@@ -519,7 +522,8 @@ export declare const tabsItem: {
|
|
|
519
522
|
type: string;
|
|
520
523
|
};
|
|
521
524
|
analyticsEvents: {
|
|
522
|
-
|
|
525
|
+
oneOf: ({
|
|
526
|
+
optionName: string;
|
|
523
527
|
type: string;
|
|
524
528
|
additionalProperties: {
|
|
525
529
|
type: string;
|
|
@@ -555,6 +559,7 @@ export declare const tabsItem: {
|
|
|
555
559
|
type: string;
|
|
556
560
|
};
|
|
557
561
|
};
|
|
562
|
+
items?: undefined;
|
|
558
563
|
} | {
|
|
559
564
|
type: string;
|
|
560
565
|
items: {
|
|
@@ -594,6 +599,7 @@ export declare const tabsItem: {
|
|
|
594
599
|
};
|
|
595
600
|
};
|
|
596
601
|
};
|
|
602
|
+
optionName: string;
|
|
597
603
|
})[];
|
|
598
604
|
};
|
|
599
605
|
};
|
|
@@ -661,7 +667,11 @@ export declare const TabsBlock: {
|
|
|
661
667
|
additionalProperties: boolean;
|
|
662
668
|
required: string[];
|
|
663
669
|
properties: {
|
|
664
|
-
tabsColSizes: {
|
|
670
|
+
tabsColSizes: {
|
|
671
|
+
type: string;
|
|
672
|
+
additionalProperties: boolean;
|
|
673
|
+
properties: {};
|
|
674
|
+
};
|
|
665
675
|
direction: {
|
|
666
676
|
type: string;
|
|
667
677
|
enum: string[];
|
|
@@ -713,7 +723,8 @@ export declare const TabsBlock: {
|
|
|
713
723
|
type: string;
|
|
714
724
|
};
|
|
715
725
|
analyticsEvents: {
|
|
716
|
-
|
|
726
|
+
oneOf: ({
|
|
727
|
+
optionName: string;
|
|
717
728
|
type: string;
|
|
718
729
|
additionalProperties: {
|
|
719
730
|
type: string;
|
|
@@ -749,6 +760,7 @@ export declare const TabsBlock: {
|
|
|
749
760
|
type: string;
|
|
750
761
|
};
|
|
751
762
|
};
|
|
763
|
+
items?: undefined;
|
|
752
764
|
} | {
|
|
753
765
|
type: string;
|
|
754
766
|
items: {
|
|
@@ -788,6 +800,7 @@ export declare const TabsBlock: {
|
|
|
788
800
|
};
|
|
789
801
|
};
|
|
790
802
|
};
|
|
803
|
+
optionName: string;
|
|
791
804
|
})[];
|
|
792
805
|
};
|
|
793
806
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import omit from "lodash/omit.js";
|
|
2
2
|
import { ImageProps } from "../../components/Image/schema.js";
|
|
3
|
-
import { BlockBaseProps, BlockHeaderProps, LinkProps, MediaProps,
|
|
3
|
+
import { BlockBaseProps, BlockHeaderProps, LinkProps, MediaProps, containerSizesObject, contentSizes, mediaBorders, mediaDirection, withTheme, } from "../../schema/validators/common.js";
|
|
4
4
|
import { filteredArray } from "../../schema/validators/utils.js";
|
|
5
5
|
import { ContentBase } from "../../sub-blocks/Content/schema.js";
|
|
6
6
|
const TabsItemContentProps = omit(ContentBase, ['size', 'colSizes', 'centered', 'theme']);
|
|
@@ -37,7 +37,7 @@ export const TabsBlock = {
|
|
|
37
37
|
properties: {
|
|
38
38
|
...BlockBaseProps,
|
|
39
39
|
...BlockHeaderProps,
|
|
40
|
-
tabsColSizes:
|
|
40
|
+
tabsColSizes: containerSizesObject,
|
|
41
41
|
direction: {
|
|
42
42
|
type: 'string',
|
|
43
43
|
enum: mediaDirection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Tabs/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Tabs/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAC5D,OAAO,EAAC,WAAW,EAAC,2CAAwC;AAE5D,MAAM,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AAE1F,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,UAAU,EAAE;QACR,GAAG,oBAAoB;QACvB,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,KAAK,EAAE,SAAS,CAAC;YACb,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,UAAU;SACzB,CAAC;QACF,iBAAiB;QACjB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC;QAC5B,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,YAAY;SACrB;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAC5B,UAAU,EAAE;YACR,GAAG,cAAc;YACjB,GAAG,gBAAgB;YACnB,YAAY,EAAE,oBAAoB;YAClC,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,cAAc;aACvB;YACD,QAAQ,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;YAC3B,KAAK,EAAE;gBACH,GAAG,aAAa,CAAC,QAAQ,CAAC;gBAC1B,QAAQ,EAAE,CAAC;aACd;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,YAAY;aACrB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps} from '../../components/Image/schema';\nimport {\n BlockBaseProps,\n BlockHeaderProps,\n LinkProps,\n MediaProps,\n containerSizesObject,\n contentSizes,\n mediaBorders,\n mediaDirection,\n withTheme,\n} from '../../schema/validators/common';\nimport {filteredArray} from '../../schema/validators/utils';\nimport {ContentBase} from '../../sub-blocks/Content/schema';\n\nconst TabsItemContentProps = omit(ContentBase, ['size', 'colSizes', 'centered', 'theme']);\n\nexport const tabsItem = {\n type: 'object',\n additionalProperties: false,\n required: ['tabName'],\n properties: {\n ...TabsItemContentProps,\n tabName: {\n type: 'string',\n },\n caption: {\n type: 'string',\n contentType: 'text',\n },\n media: withTheme({\n type: 'object',\n properties: MediaProps,\n }),\n //TODO deprecated\n link: LinkProps,\n image: withTheme(ImageProps),\n border: {\n type: 'string',\n enum: mediaBorders,\n },\n },\n};\n\nexport const TabsBlock = {\n 'tabs-block': {\n additionalProperties: false,\n required: ['title', 'items'],\n properties: {\n ...BlockBaseProps,\n ...BlockHeaderProps,\n tabsColSizes: containerSizesObject,\n direction: {\n type: 'string',\n enum: mediaDirection,\n },\n centered: {type: 'boolean'},\n items: {\n ...filteredArray(tabsItem),\n minItems: 1,\n },\n contentSize: {\n type: 'string',\n enum: contentSizes,\n },\n },\n },\n};\n"]}
|
|
@@ -152,7 +152,10 @@ export interface HeroBlockBackground extends Partial<MediaComponentImageProps>,
|
|
|
152
152
|
export interface HeroBlockMedia extends Partial<MediaProps> {
|
|
153
153
|
roundCorners?: boolean;
|
|
154
154
|
}
|
|
155
|
-
export interface
|
|
155
|
+
export interface HeroBlockContent extends Pick<ContentBlockProps, 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'> {
|
|
156
|
+
title: Required<ContentBlockProps>['title'];
|
|
157
|
+
}
|
|
158
|
+
export interface HeroBlockProps extends HeroBlockContent {
|
|
156
159
|
breadcrumbs?: HeaderBreadCrumbsProps;
|
|
157
160
|
overtitle?: string | JSX.Element;
|
|
158
161
|
/** Buttons are always rendered at size `xl` — a per-button `size` has no effect. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA+CA,MAAM,CAAN,IAAY,SAyBX;AAzBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,yCAA4B,CAAA;AAChC,CAAC,EAzBW,SAAS,KAAT,SAAS,QAyBpB;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS,CAAC,WAAW;IACrB,SAAS,CAAC,iBAAiB;IAC3B,SAAS,CAAC,SAAS;CACtB,CAAC;AAgCF,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAgXD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAOD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase, AnalyticsEventsProp} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaComponentImageProps,\n MediaComponentVideoProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n HeroBlock = 'hero-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n FooterBlock = 'footer-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [\n BlockType.HeaderBlock,\n BlockType.HeaderSliderBlock,\n BlockType.HeroBlock,\n];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize | Partial<Record<GridColumnSize, boolean>>;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface HeroBlockBackground\n extends Partial<MediaComponentImageProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n}\n\nexport interface HeroBlockMedia extends Partial<MediaProps> {\n roundCorners?: boolean;\n}\n\nexport interface HeroBlockProps\n extends Pick<\n ContentBlockProps,\n 'title' | 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'\n > {\n breadcrumbs?: HeaderBreadCrumbsProps;\n // TODO: add overtitle to ContentProps\n overtitle?: string | JSX.Element;\n /** Buttons are always rendered at size `xl` — a per-button `size` has no effect. */\n buttons?: ThemeSupporting<\n | Pick<\n ButtonProps,\n 'url' | 'text' | 'theme' | 'primary' | 'extraProps' | 'target' | 'analyticsEvents'\n >\n | React.ReactNode\n >[];\n media?: ThemeSupporting<HeroBlockMedia>;\n fullWidth?: boolean;\n verticalOffset?: 's' | 'm' | 'l' | 'xl';\n background?: ThemeSupporting<HeroBlockBackground>;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'title' | 'theme' | 'centered' | 'colSizes' | 'size' | 'title'\n > {\n title?: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n onClick?: (index: number, newOpenState: boolean) => void;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n centered?: boolean;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n analyticsEvent?: AnalyticsEventsProp;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string | FilterTag;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url?: string;\n text?: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: ContentBlockProps;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: (ButtonProps | React.ReactNode)[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n additionalContentNode?: React.ReactNode;\n}\n\nexport interface FooterLinkColumn {\n title: string;\n links: LinkProps[];\n}\n\nexport interface FooterLogoProps {\n image: ThemeSupporting<ImageProps>;\n url?: string;\n alt?: string;\n}\n\nexport interface FooterSection {\n columns: FooterLinkColumn[];\n}\n\nexport interface FooterContactItem {\n icon: ThemeSupporting<ImageProps>;\n url: string;\n urlTitle?: string;\n}\n\nexport interface FooterContacts {\n title?: string;\n iconsSize?: 'm' | 'l';\n links?: FooterContactItem[];\n linksPosition?: 'left' | 'center';\n titlePosition?: 'top' | 'near';\n}\n\nexport interface FooterDisclaimerFloor {\n text: string;\n align: 'left' | 'center';\n}\n\nexport interface FooterCopyright {\n links?: Required<Pick<LinkProps, 'text' | 'url'>>[];\n linksOverflowStrategy?: 'dropdown' | 'line-wrap';\n languageSwitcher?: {\n items: {\n text: string;\n href: string;\n }[];\n buttonText?: string;\n image?: ThemeSupporting<ImageProps>;\n };\n logo?: FooterLogoProps;\n copyrightText?: string;\n}\n\nexport interface FooterAttributionFloor {\n text: string;\n}\n\nexport interface FooterSecondFloor {\n copyright?: string;\n links?: LinkProps[];\n contacts?: FooterContactItem[];\n}\n\nexport interface FooterBlockProps {\n /** Floor 1: first row — logo (if present) + these columns */\n navigation?: {\n logo?: FooterLogoProps & {\n placement?: 'left' | 'top';\n };\n colSizes?: GridColumnSizesType;\n columnsPerRow?: number;\n columns: FooterLinkColumn[];\n };\n /** Floor 2: social row (title + social icons) */\n contacts?: FooterContacts;\n /** Floor 3: legal disclaimer (YFM) */\n disclaimer?: FooterDisclaimerFloor;\n /** Floor 4: privacy/terms links, language, copyright */\n copyright?: FooterCopyright;\n /** Floor 5: attribution (\"Created with ...\") */\n attribution?: boolean;\n backgroundColor?: ThemeSupporting<string>;\n indentTop?: IndentValue;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type HeroBlockModel = {\n type: BlockType.HeroBlock;\n} & HeroBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type FooterBlockModel = {\n type: BlockType.FooterBlock;\n} & FooterBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | HeroBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel\n | FooterBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA+CA,MAAM,CAAN,IAAY,SAyBX;AAzBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,yCAA4B,CAAA;AAChC,CAAC,EAzBW,SAAS,KAAT,SAAS,QAyBpB;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS,CAAC,WAAW;IACrB,SAAS,CAAC,iBAAiB;IAC3B,SAAS,CAAC,SAAS;CACtB,CAAC;AAgCF,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAiXD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAOD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase, AnalyticsEventsProp} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaComponentImageProps,\n MediaComponentVideoProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n HeroBlock = 'hero-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n FooterBlock = 'footer-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [\n BlockType.HeaderBlock,\n BlockType.HeaderSliderBlock,\n BlockType.HeroBlock,\n];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize | Partial<Record<GridColumnSize, boolean>>;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface HeroBlockBackground\n extends Partial<MediaComponentImageProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n}\n\nexport interface HeroBlockMedia extends Partial<MediaProps> {\n roundCorners?: boolean;\n}\n\nexport interface HeroBlockContent\n extends Pick<ContentBlockProps, 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'> {\n title: Required<ContentBlockProps>['title'];\n}\n\nexport interface HeroBlockProps extends HeroBlockContent {\n breadcrumbs?: HeaderBreadCrumbsProps;\n // TODO: add overtitle to ContentProps\n overtitle?: string | JSX.Element;\n /** Buttons are always rendered at size `xl` — a per-button `size` has no effect. */\n buttons?: ThemeSupporting<\n | Pick<\n ButtonProps,\n 'url' | 'text' | 'theme' | 'primary' | 'extraProps' | 'target' | 'analyticsEvents'\n >\n | React.ReactNode\n >[];\n media?: ThemeSupporting<HeroBlockMedia>;\n fullWidth?: boolean;\n verticalOffset?: 's' | 'm' | 'l' | 'xl';\n background?: ThemeSupporting<HeroBlockBackground>;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'title' | 'theme' | 'centered' | 'colSizes' | 'size' | 'title'\n > {\n title?: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n onClick?: (index: number, newOpenState: boolean) => void;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n centered?: boolean;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n analyticsEvent?: AnalyticsEventsProp;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string | FilterTag;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url?: string;\n text?: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: ContentBlockProps;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: (ButtonProps | React.ReactNode)[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n additionalContentNode?: React.ReactNode;\n}\n\nexport interface FooterLinkColumn {\n title: string;\n links: LinkProps[];\n}\n\nexport interface FooterLogoProps {\n image: ThemeSupporting<ImageProps>;\n url?: string;\n alt?: string;\n}\n\nexport interface FooterSection {\n columns: FooterLinkColumn[];\n}\n\nexport interface FooterContactItem {\n icon: ThemeSupporting<ImageProps>;\n url: string;\n urlTitle?: string;\n}\n\nexport interface FooterContacts {\n title?: string;\n iconsSize?: 'm' | 'l';\n links?: FooterContactItem[];\n linksPosition?: 'left' | 'center';\n titlePosition?: 'top' | 'near';\n}\n\nexport interface FooterDisclaimerFloor {\n text: string;\n align: 'left' | 'center';\n}\n\nexport interface FooterCopyright {\n links?: Required<Pick<LinkProps, 'text' | 'url'>>[];\n linksOverflowStrategy?: 'dropdown' | 'line-wrap';\n languageSwitcher?: {\n items: {\n text: string;\n href: string;\n }[];\n buttonText?: string;\n image?: ThemeSupporting<ImageProps>;\n };\n logo?: FooterLogoProps;\n copyrightText?: string;\n}\n\nexport interface FooterAttributionFloor {\n text: string;\n}\n\nexport interface FooterSecondFloor {\n copyright?: string;\n links?: LinkProps[];\n contacts?: FooterContactItem[];\n}\n\nexport interface FooterBlockProps {\n /** Floor 1: first row — logo (if present) + these columns */\n navigation?: {\n logo?: FooterLogoProps & {\n placement?: 'left' | 'top';\n };\n colSizes?: GridColumnSizesType;\n columnsPerRow?: number;\n columns: FooterLinkColumn[];\n };\n /** Floor 2: social row (title + social icons) */\n contacts?: FooterContacts;\n /** Floor 3: legal disclaimer (YFM) */\n disclaimer?: FooterDisclaimerFloor;\n /** Floor 4: privacy/terms links, language, copyright */\n copyright?: FooterCopyright;\n /** Floor 5: attribution (\"Created with ...\") */\n attribution?: boolean;\n backgroundColor?: ThemeSupporting<string>;\n indentTop?: IndentValue;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type HeroBlockModel = {\n type: BlockType.HeroBlock;\n} & HeroBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type FooterBlockModel = {\n type: BlockType.FooterBlock;\n} & FooterBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | HeroBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel\n | FooterBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
@@ -175,7 +175,8 @@ export declare const cardSchemas: {
|
|
|
175
175
|
type: string;
|
|
176
176
|
};
|
|
177
177
|
analyticsEvents: {
|
|
178
|
-
|
|
178
|
+
oneOf: ({
|
|
179
|
+
optionName: string;
|
|
179
180
|
type: string;
|
|
180
181
|
additionalProperties: {
|
|
181
182
|
type: string;
|
|
@@ -211,6 +212,7 @@ export declare const cardSchemas: {
|
|
|
211
212
|
type: string;
|
|
212
213
|
};
|
|
213
214
|
};
|
|
215
|
+
items?: undefined;
|
|
214
216
|
} | {
|
|
215
217
|
type: string;
|
|
216
218
|
items: {
|
|
@@ -250,6 +252,7 @@ export declare const cardSchemas: {
|
|
|
250
252
|
};
|
|
251
253
|
};
|
|
252
254
|
};
|
|
255
|
+
optionName: string;
|
|
253
256
|
})[];
|
|
254
257
|
};
|
|
255
258
|
};
|
|
@@ -858,7 +861,8 @@ export declare const cardSchemas: {
|
|
|
858
861
|
type: string;
|
|
859
862
|
};
|
|
860
863
|
analyticsEvents: {
|
|
861
|
-
|
|
864
|
+
oneOf: ({
|
|
865
|
+
optionName: string;
|
|
862
866
|
type: string;
|
|
863
867
|
additionalProperties: {
|
|
864
868
|
type: string;
|
|
@@ -894,6 +898,7 @@ export declare const cardSchemas: {
|
|
|
894
898
|
type: string;
|
|
895
899
|
};
|
|
896
900
|
};
|
|
901
|
+
items?: undefined;
|
|
897
902
|
} | {
|
|
898
903
|
type: string;
|
|
899
904
|
items: {
|
|
@@ -933,6 +938,7 @@ export declare const cardSchemas: {
|
|
|
933
938
|
};
|
|
934
939
|
};
|
|
935
940
|
};
|
|
941
|
+
optionName: string;
|
|
936
942
|
})[];
|
|
937
943
|
};
|
|
938
944
|
ratio: {
|
|
@@ -1000,7 +1006,8 @@ export declare const cardSchemas: {
|
|
|
1000
1006
|
type: string;
|
|
1001
1007
|
};
|
|
1002
1008
|
analyticsEvents: {
|
|
1003
|
-
|
|
1009
|
+
oneOf: ({
|
|
1010
|
+
optionName: string;
|
|
1004
1011
|
type: string;
|
|
1005
1012
|
additionalProperties: {
|
|
1006
1013
|
type: string;
|
|
@@ -1036,6 +1043,7 @@ export declare const cardSchemas: {
|
|
|
1036
1043
|
type: string;
|
|
1037
1044
|
};
|
|
1038
1045
|
};
|
|
1046
|
+
items?: undefined;
|
|
1039
1047
|
} | {
|
|
1040
1048
|
type: string;
|
|
1041
1049
|
items: {
|
|
@@ -1075,6 +1083,7 @@ export declare const cardSchemas: {
|
|
|
1075
1083
|
};
|
|
1076
1084
|
};
|
|
1077
1085
|
};
|
|
1086
|
+
optionName: string;
|
|
1078
1087
|
})[];
|
|
1079
1088
|
};
|
|
1080
1089
|
};
|
|
@@ -1485,7 +1494,8 @@ export declare const cardSchemas: {
|
|
|
1485
1494
|
type: string;
|
|
1486
1495
|
};
|
|
1487
1496
|
analyticsEvents: {
|
|
1488
|
-
|
|
1497
|
+
oneOf: ({
|
|
1498
|
+
optionName: string;
|
|
1489
1499
|
type: string;
|
|
1490
1500
|
additionalProperties: {
|
|
1491
1501
|
type: string;
|
|
@@ -1521,6 +1531,7 @@ export declare const cardSchemas: {
|
|
|
1521
1531
|
type: string;
|
|
1522
1532
|
};
|
|
1523
1533
|
};
|
|
1534
|
+
items?: undefined;
|
|
1524
1535
|
} | {
|
|
1525
1536
|
type: string;
|
|
1526
1537
|
items: {
|
|
@@ -1560,6 +1571,7 @@ export declare const cardSchemas: {
|
|
|
1560
1571
|
};
|
|
1561
1572
|
};
|
|
1562
1573
|
};
|
|
1574
|
+
optionName: string;
|
|
1563
1575
|
})[];
|
|
1564
1576
|
};
|
|
1565
1577
|
};
|
|
@@ -2137,7 +2149,8 @@ export declare const cardSchemas: {
|
|
|
2137
2149
|
type: string;
|
|
2138
2150
|
};
|
|
2139
2151
|
analyticsEvents: {
|
|
2140
|
-
|
|
2152
|
+
oneOf: ({
|
|
2153
|
+
optionName: string;
|
|
2141
2154
|
type: string;
|
|
2142
2155
|
additionalProperties: {
|
|
2143
2156
|
type: string;
|
|
@@ -2173,6 +2186,7 @@ export declare const cardSchemas: {
|
|
|
2173
2186
|
type: string;
|
|
2174
2187
|
};
|
|
2175
2188
|
};
|
|
2189
|
+
items?: undefined;
|
|
2176
2190
|
} | {
|
|
2177
2191
|
type: string;
|
|
2178
2192
|
items: {
|
|
@@ -2212,6 +2226,7 @@ export declare const cardSchemas: {
|
|
|
2212
2226
|
};
|
|
2213
2227
|
};
|
|
2214
2228
|
};
|
|
2229
|
+
optionName: string;
|
|
2215
2230
|
})[];
|
|
2216
2231
|
};
|
|
2217
2232
|
};
|
|
@@ -848,7 +848,8 @@ export declare const TitleProps: {
|
|
|
848
848
|
type: string;
|
|
849
849
|
};
|
|
850
850
|
analyticsEvents: {
|
|
851
|
-
|
|
851
|
+
oneOf: ({
|
|
852
|
+
optionName: string;
|
|
852
853
|
type: string;
|
|
853
854
|
additionalProperties: {
|
|
854
855
|
type: string;
|
|
@@ -884,6 +885,7 @@ export declare const TitleProps: {
|
|
|
884
885
|
type: string;
|
|
885
886
|
};
|
|
886
887
|
};
|
|
888
|
+
items?: undefined;
|
|
887
889
|
} | {
|
|
888
890
|
type: string;
|
|
889
891
|
items: {
|
|
@@ -923,6 +925,7 @@ export declare const TitleProps: {
|
|
|
923
925
|
};
|
|
924
926
|
};
|
|
925
927
|
};
|
|
928
|
+
optionName: string;
|
|
926
929
|
})[];
|
|
927
930
|
};
|
|
928
931
|
};
|
|
@@ -1283,7 +1286,8 @@ export declare const MediaProps: {
|
|
|
1283
1286
|
type: string;
|
|
1284
1287
|
};
|
|
1285
1288
|
analyticsEvents: {
|
|
1286
|
-
|
|
1289
|
+
oneOf: ({
|
|
1290
|
+
optionName: string;
|
|
1287
1291
|
type: string;
|
|
1288
1292
|
additionalProperties: {
|
|
1289
1293
|
type: string;
|
|
@@ -1319,6 +1323,7 @@ export declare const MediaProps: {
|
|
|
1319
1323
|
type: string;
|
|
1320
1324
|
};
|
|
1321
1325
|
};
|
|
1326
|
+
items?: undefined;
|
|
1322
1327
|
} | {
|
|
1323
1328
|
type: string;
|
|
1324
1329
|
items: {
|
|
@@ -1358,6 +1363,7 @@ export declare const MediaProps: {
|
|
|
1358
1363
|
};
|
|
1359
1364
|
};
|
|
1360
1365
|
};
|
|
1366
|
+
optionName: string;
|
|
1361
1367
|
})[];
|
|
1362
1368
|
};
|
|
1363
1369
|
ratio: {
|
|
@@ -1652,7 +1658,8 @@ export declare const BlockHeaderProps: {
|
|
|
1652
1658
|
type: string;
|
|
1653
1659
|
};
|
|
1654
1660
|
analyticsEvents: {
|
|
1655
|
-
|
|
1661
|
+
oneOf: ({
|
|
1662
|
+
optionName: string;
|
|
1656
1663
|
type: string;
|
|
1657
1664
|
additionalProperties: {
|
|
1658
1665
|
type: string;
|
|
@@ -1688,6 +1695,7 @@ export declare const BlockHeaderProps: {
|
|
|
1688
1695
|
type: string;
|
|
1689
1696
|
};
|
|
1690
1697
|
};
|
|
1698
|
+
items?: undefined;
|
|
1691
1699
|
} | {
|
|
1692
1700
|
type: string;
|
|
1693
1701
|
items: {
|
|
@@ -1727,6 +1735,7 @@ export declare const BlockHeaderProps: {
|
|
|
1727
1735
|
};
|
|
1728
1736
|
};
|
|
1729
1737
|
};
|
|
1738
|
+
optionName: string;
|
|
1730
1739
|
})[];
|
|
1731
1740
|
};
|
|
1732
1741
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ImageProps } from "../../components/Image/schema.js";
|
|
2
2
|
import { CustomControlsButtonPositioning, CustomControlsType, Device, MediaVideoControlsType, QuoteType, Theme, } from "../../models/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { AnalyticsEvents } from "./event.js";
|
|
4
4
|
export const mediaDirection = ['media-content', 'content-media'];
|
|
5
5
|
export const textSize = ['xs', 's', 'sm', 'm', 'l'];
|
|
6
6
|
export const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
|
|
@@ -257,19 +257,7 @@ export const LinkProps = {
|
|
|
257
257
|
enum: linkTargets,
|
|
258
258
|
},
|
|
259
259
|
colorTheme: ThemeProps,
|
|
260
|
-
analyticsEvents:
|
|
261
|
-
oneOf: [
|
|
262
|
-
{
|
|
263
|
-
...AnalyticsEventSchema,
|
|
264
|
-
optionName: 'single',
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
type: 'array',
|
|
268
|
-
items: AnalyticsEventSchema,
|
|
269
|
-
optionName: 'list',
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
},
|
|
260
|
+
analyticsEvents: AnalyticsEvents,
|
|
273
261
|
},
|
|
274
262
|
};
|
|
275
263
|
export const FileLinkProps = {
|
|
@@ -404,12 +392,7 @@ export const ButtonProps = {
|
|
|
404
392
|
},
|
|
405
393
|
],
|
|
406
394
|
},
|
|
407
|
-
analyticsEvents:
|
|
408
|
-
oneOf: [
|
|
409
|
-
{ ...AnalyticsEventSchema, optionName: 'single' },
|
|
410
|
-
{ type: 'array', items: AnalyticsEventSchema, optionName: 'list' },
|
|
411
|
-
],
|
|
412
|
-
},
|
|
395
|
+
analyticsEvents: AnalyticsEvents,
|
|
413
396
|
target: {
|
|
414
397
|
type: 'string',
|
|
415
398
|
enum: linkTargets,
|
|
@@ -539,9 +522,7 @@ export const TitleProps = {
|
|
|
539
522
|
resetMargin: {
|
|
540
523
|
type: 'boolean',
|
|
541
524
|
},
|
|
542
|
-
analyticsEvents:
|
|
543
|
-
anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
|
|
544
|
-
},
|
|
525
|
+
analyticsEvents: AnalyticsEvents,
|
|
545
526
|
},
|
|
546
527
|
};
|
|
547
528
|
export const ButtonBlock = {
|
|
@@ -621,9 +602,7 @@ export const MediaProps = {
|
|
|
621
602
|
fullscreen: {
|
|
622
603
|
type: 'boolean',
|
|
623
604
|
},
|
|
624
|
-
analyticsEvents:
|
|
625
|
-
anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
|
|
626
|
-
},
|
|
605
|
+
analyticsEvents: AnalyticsEvents,
|
|
627
606
|
ratio: {
|
|
628
607
|
type: ['number', 'string'],
|
|
629
608
|
pattern: '^auto$',
|