@gravity-ui/page-constructor 7.21.1 → 7.22.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/ContentLayout/schema.d.ts +11 -0
- package/build/cjs/blocks/FoldableList/schema.d.ts +11 -0
- package/build/cjs/blocks/Form/Form.css +5 -2
- package/build/cjs/blocks/Form/Form.js +12 -9
- package/build/cjs/blocks/Form/Form.js.map +1 -1
- package/build/cjs/blocks/Form/schema.d.ts +12 -4
- package/build/cjs/blocks/Form/schema.js +1 -4
- package/build/cjs/blocks/Form/schema.js.map +1 -1
- package/build/cjs/blocks/Form/utils.d.ts +3 -0
- package/build/cjs/blocks/Form/utils.js +20 -0
- package/build/cjs/blocks/Form/utils.js.map +1 -0
- package/build/cjs/blocks/Info/schema.d.ts +22 -0
- package/build/cjs/blocks/Map/schema.d.ts +11 -0
- package/build/cjs/blocks/Media/schema.d.ts +22 -0
- package/build/cjs/blocks/Questions/schema.d.ts +11 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +11 -0
- package/build/cjs/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
- package/build/cjs/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
- package/build/cjs/components/ContentIcon/ContentIcon.js.map +1 -0
- package/build/cjs/components/ContentLabels/ContentLabels.css +53 -0
- package/build/cjs/components/ContentLabels/ContentLabels.d.ts +3 -0
- package/build/cjs/components/ContentLabels/ContentLabels.js +16 -0
- package/build/cjs/components/ContentLabels/ContentLabels.js.map +1 -0
- package/build/cjs/components/ContentList/ContentList.js +2 -2
- package/build/cjs/components/ContentList/ContentList.js.map +1 -1
- package/build/cjs/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
- package/build/cjs/context/windowWidthContext/WindowWidthContext.js.map +1 -0
- package/build/cjs/context/windowWidthContext/index.d.ts +1 -1
- package/build/cjs/context/windowWidthContext/index.js +1 -1
- package/build/cjs/context/windowWidthContext/index.js.map +1 -1
- package/build/cjs/hooks/useDeviceValue.d.ts +2 -0
- package/build/cjs/hooks/useDeviceValue.js +33 -0
- package/build/cjs/hooks/useDeviceValue.js.map +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +25 -9
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -5
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +33 -0
- package/build/cjs/schema/validators/common.d.ts +12 -1
- package/build/cjs/schema/validators/common.js +21 -0
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +11 -0
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +11 -0
- package/build/cjs/sub-blocks/Content/Content.css +16 -0
- package/build/cjs/sub-blocks/Content/Content.js +12 -3
- package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
- package/build/cjs/sub-blocks/Content/schema.d.ts +103 -1
- package/build/cjs/sub-blocks/Content/schema.js +22 -2
- package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.d.ts +11 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +11 -0
- package/build/cjs/utils/breakpoint.d.ts +7 -0
- package/build/cjs/utils/breakpoint.js +12 -0
- package/build/cjs/utils/breakpoint.js.map +1 -0
- package/build/cjs/utils/index.d.ts +1 -0
- package/build/cjs/utils/index.js +1 -0
- package/build/cjs/utils/index.js.map +1 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +11 -0
- package/build/esm/blocks/FoldableList/schema.d.ts +11 -0
- package/build/esm/blocks/Form/Form.css +5 -2
- package/build/esm/blocks/Form/Form.js +12 -9
- package/build/esm/blocks/Form/Form.js.map +1 -1
- package/build/esm/blocks/Form/schema.d.ts +12 -4
- package/build/esm/blocks/Form/schema.js +1 -4
- package/build/esm/blocks/Form/schema.js.map +1 -1
- package/build/esm/blocks/Form/utils.d.ts +3 -0
- package/build/esm/blocks/Form/utils.js +16 -0
- package/build/esm/blocks/Form/utils.js.map +1 -0
- package/build/esm/blocks/Info/schema.d.ts +22 -0
- package/build/esm/blocks/Map/schema.d.ts +11 -0
- package/build/esm/blocks/Media/schema.d.ts +22 -0
- package/build/esm/blocks/Questions/schema.d.ts +11 -0
- package/build/esm/blocks/Tabs/schema.d.ts +11 -0
- package/build/esm/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
- package/build/esm/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
- package/build/esm/components/ContentIcon/ContentIcon.js.map +1 -0
- package/build/esm/components/ContentLabels/ContentLabels.css +53 -0
- package/build/esm/components/ContentLabels/ContentLabels.d.ts +4 -0
- package/build/esm/components/ContentLabels/ContentLabels.js +14 -0
- package/build/esm/components/ContentLabels/ContentLabels.js.map +1 -0
- package/build/esm/components/ContentList/ContentList.js +2 -2
- package/build/esm/components/ContentList/ContentList.js.map +1 -1
- package/build/esm/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
- package/build/esm/context/windowWidthContext/WindowWidthContext.js.map +1 -0
- package/build/esm/context/windowWidthContext/index.d.ts +1 -1
- package/build/esm/context/windowWidthContext/index.js +1 -1
- package/build/esm/context/windowWidthContext/index.js.map +1 -1
- package/build/esm/hooks/useDeviceValue.d.ts +2 -0
- package/build/esm/hooks/useDeviceValue.js +29 -0
- package/build/esm/hooks/useDeviceValue.js.map +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +25 -9
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -5
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +33 -0
- package/build/esm/schema/validators/common.d.ts +12 -1
- package/build/esm/schema/validators/common.js +21 -1
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +11 -0
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +11 -0
- package/build/esm/sub-blocks/Content/Content.css +16 -0
- package/build/esm/sub-blocks/Content/Content.js +11 -3
- package/build/esm/sub-blocks/Content/Content.js.map +1 -1
- package/build/esm/sub-blocks/Content/schema.d.ts +103 -1
- package/build/esm/sub-blocks/Content/schema.js +21 -1
- package/build/esm/sub-blocks/Content/schema.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.d.ts +11 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +11 -0
- package/build/esm/utils/breakpoint.d.ts +7 -0
- package/build/esm/utils/breakpoint.js +9 -0
- package/build/esm/utils/breakpoint.js.map +1 -0
- package/build/esm/utils/index.d.ts +1 -0
- package/build/esm/utils/index.js +1 -0
- package/build/esm/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +25 -9
- package/server/models/constructor-items/sub-blocks.d.ts +5 -5
- package/server/utils/breakpoint.d.ts +7 -0
- package/server/utils/breakpoint.js +11 -0
- package/server/utils/index.d.ts +1 -0
- package/server/utils/index.js +1 -0
- package/build/cjs/components/ContentList/ContentListItemIcon.js.map +0 -1
- package/build/cjs/context/windowWidthContext/BreakpointContext.js.map +0 -1
- package/build/esm/components/ContentList/ContentListItemIcon.js.map +0 -1
- package/build/esm/context/windowWidthContext/BreakpointContext.js.map +0 -1
- /package/build/cjs/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
- /package/build/esm/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAN,IAAY,SAuBX;AAvBD,WAAY,SAAS;I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AGX;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 {AnalyticsEventsBase} 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 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 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}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\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 ExtendedFeaturesItem\n extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {\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}\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 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};\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;\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[];\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 FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<BackgroundImageProps>;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\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 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 | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA6CA,MAAM,CAAN,IAAY,SAuBX;AAvBD,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,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAvBW,SAAS,KAAT,SAAS,QAuBpB;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgCrF,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;AA0VD,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} 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 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 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}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\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 ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'theme' | 'centered' | 'colSizes' | 'size' | 'title' | 'labels'\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}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\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' | 'labels'> {\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' | 'labels'> {\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' | 'labels'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\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' | 'labels'>,\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 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};\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;\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: Omit<ContentBlockProps, 'labels'>;\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 ContentLabelProps {\n text: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentLabelsProps {\n labels: ContentLabelProps[];\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[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n labels?: ContentLabelProps[];\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}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\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 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 | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
@@ -103,14 +103,14 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
103
103
|
quoteType?: QuoteType;
|
|
104
104
|
button?: ButtonProps;
|
|
105
105
|
}
|
|
106
|
-
export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'centered' | 'controlPosition'> {
|
|
106
|
+
export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'centered' | 'controlPosition' | 'labels'> {
|
|
107
107
|
url?: string;
|
|
108
108
|
urlTitle?: string;
|
|
109
109
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
110
110
|
paddingBottom?: 's' | 'm' | 'l' | 'xl';
|
|
111
111
|
backgroundColor?: string;
|
|
112
112
|
}
|
|
113
|
-
export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition'> {
|
|
113
|
+
export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition' | 'labels'> {
|
|
114
114
|
url: string;
|
|
115
115
|
urlTitle?: string;
|
|
116
116
|
icon?: ThemeSupporting<ImageProps>;
|
|
@@ -132,7 +132,7 @@ export interface BannerCardProps {
|
|
|
132
132
|
}
|
|
133
133
|
export interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {
|
|
134
134
|
}
|
|
135
|
-
export interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {
|
|
135
|
+
export interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme' | 'labels'> {
|
|
136
136
|
title: string;
|
|
137
137
|
price: string;
|
|
138
138
|
pricePeriod?: string;
|
|
@@ -144,7 +144,7 @@ export interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, '
|
|
|
144
144
|
list?: string[];
|
|
145
145
|
}
|
|
146
146
|
export interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {
|
|
147
|
-
content: Omit<ContentBlockProps, 'colSizes' | 'centered'>;
|
|
147
|
+
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'labels'>;
|
|
148
148
|
contentMargin?: LayoutItemContentMargin;
|
|
149
149
|
media?: ThemeSupporting<MediaProps>;
|
|
150
150
|
metaInfo?: string[];
|
|
@@ -152,7 +152,7 @@ export interface LayoutItemProps extends ClassNameProps, CardLayoutProps, Analyt
|
|
|
152
152
|
fullscreen?: boolean;
|
|
153
153
|
icon?: ThemeSupporting<PositionedIcon>;
|
|
154
154
|
}
|
|
155
|
-
export interface ImageCardProps extends CardBaseProps, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {
|
|
155
|
+
export interface ImageCardProps extends CardBaseProps, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition' | 'labels'> {
|
|
156
156
|
image: ThemeSupporting<ImageProps>;
|
|
157
157
|
enableImageBorderRadius?: boolean;
|
|
158
158
|
margins?: ImageCardMargins;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/sub-blocks.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAN,IAAY,YAoBX;AApBD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf;;OAEG;IACH,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,kDAAkC,CAAA;IAClC,wCAAwB,CAAA;IACxB,mCAAmB,CAAA;IACnB,4CAA4B,CAAA;IAC5B;;OAEG;IACH,6BAAa,CAAA;IACb,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;AAC5B,CAAC,EApBW,YAAY,KAAZ,YAAY,QAoBvB;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAkBD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import {ClassNameProps, GravityIconProps, QuoteType} from '../../models';\nimport {ThemeSupporting} from '../../utils';\nimport {\n HubspotEventData,\n HubspotEventHandlers,\n HubspotFormDefaultValues,\n} from '../../utils/hubspot';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {ContentBlockProps} from './blocks';\nimport {\n AuthorItem,\n ButtonProps,\n CardBaseProps,\n CardLayoutProps,\n ContentTheme,\n DividerSize,\n ImageCardMargins,\n ImageObjectProps,\n ImageProps,\n LayoutItemContentMargin,\n LinkProps,\n MediaProps,\n MediaView,\n PriceDetailedProps,\n TextTheme,\n Themable,\n ThemedImage,\n} from './common';\n\nexport enum SubBlockType {\n Divider = 'divider',\n Quote = 'quote',\n /**\n * @deprecated Will be removed\n */\n PriceDetailed = 'price-detailed',\n MediaCard = 'media-card',\n BannerCard = 'banner-card',\n LayoutItem = 'layout-item',\n BackgroundCard = 'background-card',\n BasicCard = 'basic-card',\n Content = 'content',\n HubspotForm = 'hubspot-form',\n /**\n * @deprecated Will be removed, use BasicCard instead\n */\n Card = 'card',\n PriceCard = 'price-card',\n ImageCard = 'image-card',\n}\n\nexport enum IconPosition {\n Top = 'top',\n Left = 'left',\n}\n\nexport interface PositionedIcon {\n value: ImageProps;\n position?: IconPosition;\n}\n\nexport interface PositionedGravityIcon {\n value: GravityIconProps;\n position?: IconPosition;\n}\n\nexport interface IconWrapperProps {\n icon?: PositionedIcon;\n gravityIcon?: PositionedGravityIcon;\n size?: 's' | 'm' | 'l';\n}\n\nexport enum ImageCardDirection {\n Direct = 'direct',\n Reverse = 'reverse',\n}\n\nexport const SubBlockTypes = Object.values(SubBlockType);\n\nexport interface DividerProps {\n size?: DividerSize;\n border?: boolean;\n}\n\nexport interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {\n className?: string;\n theme?: ContentTheme;\n isMobile?: boolean;\n region?: string;\n portalId: string;\n formId: string;\n formInstanceId?: string;\n formClassName?: string;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeLoad?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onLoad?: (arg: HubspotEventData) => void;\n hubspotEvents?: string[];\n createDOMElement?: boolean;\n defaultValues?: HubspotFormDefaultValues;\n}\n\n//cards\nexport interface QuoteProps extends Themable, CardBaseProps {\n text?: string;\n // for backward compatibility, yfmText will become property 'text' in major\n yfmText?: string;\n image: ThemedImage;\n logo: ThemeSupporting<ImageProps>;\n color?: string;\n /**\n * @deprecated use property button instead\n */\n url?: string;\n /**\n * @deprecated use property button instead\n */\n urlTitle?: string;\n author?: AuthorItem;\n /**\n * @deprecated use property button instead\n */\n buttonText?: string;\n theme?: TextTheme;\n quoteType?: QuoteType;\n button?: ButtonProps;\n}\n\nexport interface BackgroundCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'centered' | 'controlPosition'> {\n url?: string;\n urlTitle?: string;\n background?: ThemeSupporting<ImageObjectProps>;\n paddingBottom?: 's' | 'm' | 'l' | 'xl';\n backgroundColor?: string;\n}\n\nexport interface BasicCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition'> {\n url: string;\n urlTitle?: string;\n icon?: ThemeSupporting<ImageProps>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n target?: string;\n iconPosition?: IconPosition;\n hoverBackgroundColor?: string;\n}\n\nexport interface BannerCardProps {\n title: string;\n subtitle?: string;\n className?: string;\n image?: ThemeSupporting<string>;\n disableCompress?: boolean;\n color?: ThemeSupporting<string>;\n theme?: TextTheme;\n button?: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;\n mediaView?: MediaView;\n}\n\nexport interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}\n\nexport interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {\n title: string;\n price: string;\n pricePeriod?: string;\n priceDetails?: string;\n description?: string;\n buttons?: ButtonProps[];\n links?: LinkProps[];\n backgroundColor?: string;\n list?: string[];\n}\n\nexport interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {\n content: Omit<ContentBlockProps, 'colSizes' | 'centered'>;\n contentMargin?: LayoutItemContentMargin;\n media?: ThemeSupporting<MediaProps>;\n metaInfo?: string[];\n border?: boolean;\n fullscreen?: boolean;\n icon?: ThemeSupporting<PositionedIcon>;\n}\n\nexport interface ImageCardProps\n extends CardBaseProps,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {\n image: ThemeSupporting<ImageProps>;\n enableImageBorderRadius?: boolean;\n margins?: ImageCardMargins;\n direction?: ImageCardDirection;\n backgroundColor?: string;\n url?: string;\n urlTitle?: string;\n target?: string;\n}\n\n// sub-block models\nexport type DividerModel = {\n type: SubBlockType.Divider;\n} & DividerProps;\n\nexport type QuoteModel = {\n type: SubBlockType.Quote;\n} & QuoteProps;\n\nexport type LayoutItemModel = {\n type: SubBlockType.LayoutItem;\n} & LayoutItemProps;\n\nexport type BackgroundCardModel = {\n type: SubBlockType.BackgroundCard;\n} & BackgroundCardProps;\n\n/** @deprecated */\nexport type PriceDetailedModel = {\n type: SubBlockType.PriceDetailed;\n} & PriceDetailedProps;\n\nexport type MediaCardModel = {\n type: SubBlockType.MediaCard;\n} & MediaCardProps;\n\nexport type HubspotFormModel = {\n type: SubBlockType.HubspotForm;\n} & HubspotFormProps;\n\nexport type BannerCardModel = {\n type: SubBlockType.BannerCard;\n} & BannerCardProps;\n\nexport type BasicCardModel = {\n type: SubBlockType.BasicCard;\n} & BasicCardProps;\n\nexport type PriceCardModel = {\n type: SubBlockType.PriceCard;\n} & PriceCardProps;\n\nexport type ImageCardModel = {\n type: SubBlockType.ImageCard;\n} & ImageCardProps;\n\nexport type SubBlockModels =\n | DividerModel\n | QuoteModel\n | PriceDetailedModel\n | MediaCardModel\n | BackgroundCardModel\n | HubspotFormModel\n | BannerCardModel\n | BasicCardModel\n | PriceCardModel\n | LayoutItemModel\n | ImageCardModel;\n\nexport type SubBlock = SubBlockModels;\n"]}
|
|
1
|
+
{"version":3,"file":"sub-blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/sub-blocks.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAN,IAAY,YAoBX;AApBD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf;;OAEG;IACH,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,kDAAkC,CAAA;IAClC,wCAAwB,CAAA;IACxB,mCAAmB,CAAA;IACnB,4CAA4B,CAAA;IAC5B;;OAEG;IACH,6BAAa,CAAA;IACb,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;AAC5B,CAAC,EApBW,YAAY,KAAZ,YAAY,QAoBvB;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAkBD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import {ClassNameProps, GravityIconProps, QuoteType} from '../../models';\nimport {ThemeSupporting} from '../../utils';\nimport {\n HubspotEventData,\n HubspotEventHandlers,\n HubspotFormDefaultValues,\n} from '../../utils/hubspot';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {ContentBlockProps} from './blocks';\nimport {\n AuthorItem,\n ButtonProps,\n CardBaseProps,\n CardLayoutProps,\n ContentTheme,\n DividerSize,\n ImageCardMargins,\n ImageObjectProps,\n ImageProps,\n LayoutItemContentMargin,\n LinkProps,\n MediaProps,\n MediaView,\n PriceDetailedProps,\n TextTheme,\n Themable,\n ThemedImage,\n} from './common';\n\nexport enum SubBlockType {\n Divider = 'divider',\n Quote = 'quote',\n /**\n * @deprecated Will be removed\n */\n PriceDetailed = 'price-detailed',\n MediaCard = 'media-card',\n BannerCard = 'banner-card',\n LayoutItem = 'layout-item',\n BackgroundCard = 'background-card',\n BasicCard = 'basic-card',\n Content = 'content',\n HubspotForm = 'hubspot-form',\n /**\n * @deprecated Will be removed, use BasicCard instead\n */\n Card = 'card',\n PriceCard = 'price-card',\n ImageCard = 'image-card',\n}\n\nexport enum IconPosition {\n Top = 'top',\n Left = 'left',\n}\n\nexport interface PositionedIcon {\n value: ImageProps;\n position?: IconPosition;\n}\n\nexport interface PositionedGravityIcon {\n value: GravityIconProps;\n position?: IconPosition;\n}\n\nexport interface IconWrapperProps {\n icon?: PositionedIcon;\n gravityIcon?: PositionedGravityIcon;\n size?: 's' | 'm' | 'l';\n}\n\nexport enum ImageCardDirection {\n Direct = 'direct',\n Reverse = 'reverse',\n}\n\nexport const SubBlockTypes = Object.values(SubBlockType);\n\nexport interface DividerProps {\n size?: DividerSize;\n border?: boolean;\n}\n\nexport interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {\n className?: string;\n theme?: ContentTheme;\n isMobile?: boolean;\n region?: string;\n portalId: string;\n formId: string;\n formInstanceId?: string;\n formClassName?: string;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeLoad?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onLoad?: (arg: HubspotEventData) => void;\n hubspotEvents?: string[];\n createDOMElement?: boolean;\n defaultValues?: HubspotFormDefaultValues;\n}\n\n//cards\nexport interface QuoteProps extends Themable, CardBaseProps {\n text?: string;\n // for backward compatibility, yfmText will become property 'text' in major\n yfmText?: string;\n image: ThemedImage;\n logo: ThemeSupporting<ImageProps>;\n color?: string;\n /**\n * @deprecated use property button instead\n */\n url?: string;\n /**\n * @deprecated use property button instead\n */\n urlTitle?: string;\n author?: AuthorItem;\n /**\n * @deprecated use property button instead\n */\n buttonText?: string;\n theme?: TextTheme;\n quoteType?: QuoteType;\n button?: ButtonProps;\n}\n\nexport interface BackgroundCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'centered' | 'controlPosition' | 'labels'> {\n url?: string;\n urlTitle?: string;\n background?: ThemeSupporting<ImageObjectProps>;\n paddingBottom?: 's' | 'm' | 'l' | 'xl';\n backgroundColor?: string;\n}\n\nexport interface BasicCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition' | 'labels'> {\n url: string;\n urlTitle?: string;\n icon?: ThemeSupporting<ImageProps>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n target?: string;\n iconPosition?: IconPosition;\n hoverBackgroundColor?: string;\n}\n\nexport interface BannerCardProps {\n title: string;\n subtitle?: string;\n className?: string;\n image?: ThemeSupporting<string>;\n disableCompress?: boolean;\n color?: ThemeSupporting<string>;\n theme?: TextTheme;\n button?: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;\n mediaView?: MediaView;\n}\n\nexport interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}\n\nexport interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme' | 'labels'> {\n title: string;\n price: string;\n pricePeriod?: string;\n priceDetails?: string;\n description?: string;\n buttons?: ButtonProps[];\n links?: LinkProps[];\n backgroundColor?: string;\n list?: string[];\n}\n\nexport interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {\n content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'labels'>;\n contentMargin?: LayoutItemContentMargin;\n media?: ThemeSupporting<MediaProps>;\n metaInfo?: string[];\n border?: boolean;\n fullscreen?: boolean;\n icon?: ThemeSupporting<PositionedIcon>;\n}\n\nexport interface ImageCardProps\n extends CardBaseProps,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition' | 'labels'> {\n image: ThemeSupporting<ImageProps>;\n enableImageBorderRadius?: boolean;\n margins?: ImageCardMargins;\n direction?: ImageCardDirection;\n backgroundColor?: string;\n url?: string;\n urlTitle?: string;\n target?: string;\n}\n\n// sub-block models\nexport type DividerModel = {\n type: SubBlockType.Divider;\n} & DividerProps;\n\nexport type QuoteModel = {\n type: SubBlockType.Quote;\n} & QuoteProps;\n\nexport type LayoutItemModel = {\n type: SubBlockType.LayoutItem;\n} & LayoutItemProps;\n\nexport type BackgroundCardModel = {\n type: SubBlockType.BackgroundCard;\n} & BackgroundCardProps;\n\n/** @deprecated */\nexport type PriceDetailedModel = {\n type: SubBlockType.PriceDetailed;\n} & PriceDetailedProps;\n\nexport type MediaCardModel = {\n type: SubBlockType.MediaCard;\n} & MediaCardProps;\n\nexport type HubspotFormModel = {\n type: SubBlockType.HubspotForm;\n} & HubspotFormProps;\n\nexport type BannerCardModel = {\n type: SubBlockType.BannerCard;\n} & BannerCardProps;\n\nexport type BasicCardModel = {\n type: SubBlockType.BasicCard;\n} & BasicCardProps;\n\nexport type PriceCardModel = {\n type: SubBlockType.PriceCard;\n} & PriceCardProps;\n\nexport type ImageCardModel = {\n type: SubBlockType.ImageCard;\n} & ImageCardProps;\n\nexport type SubBlockModels =\n | DividerModel\n | QuoteModel\n | PriceDetailedModel\n | MediaCardModel\n | BackgroundCardModel\n | HubspotFormModel\n | BannerCardModel\n | BasicCardModel\n | PriceCardModel\n | LayoutItemModel\n | ImageCardModel;\n\nexport type SubBlock = SubBlockModels;\n"]}
|
|
@@ -131,6 +131,17 @@ export declare const cardSchemas: {
|
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
133
|
} | undefined;
|
|
134
|
+
labels?: {
|
|
135
|
+
type: string;
|
|
136
|
+
items: {
|
|
137
|
+
type: string;
|
|
138
|
+
properties: {
|
|
139
|
+
when: {
|
|
140
|
+
type: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
} | undefined;
|
|
134
145
|
controlPosition: {
|
|
135
146
|
type: string;
|
|
136
147
|
enum: string[];
|
|
@@ -580,6 +591,17 @@ export declare const cardSchemas: {
|
|
|
580
591
|
contentType: string;
|
|
581
592
|
inputType: string;
|
|
582
593
|
};
|
|
594
|
+
labels: {
|
|
595
|
+
type: string;
|
|
596
|
+
items: {
|
|
597
|
+
type: string;
|
|
598
|
+
properties: {
|
|
599
|
+
when: {
|
|
600
|
+
type: string;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
583
605
|
additionalInfo: {
|
|
584
606
|
type: string;
|
|
585
607
|
contentType: string;
|
|
@@ -996,6 +1018,17 @@ export declare const cardSchemas: {
|
|
|
996
1018
|
type: string;
|
|
997
1019
|
enum: string[];
|
|
998
1020
|
};
|
|
1021
|
+
labels: {
|
|
1022
|
+
type: string;
|
|
1023
|
+
items: {
|
|
1024
|
+
type: string;
|
|
1025
|
+
properties: {
|
|
1026
|
+
when: {
|
|
1027
|
+
type: string;
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
999
1032
|
additionalInfo: {
|
|
1000
1033
|
type: string;
|
|
1001
1034
|
contentType: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme } from "../../models/index.js";
|
|
1
|
+
import { CustomControlsButtonPositioning, CustomControlsType, Device, MediaVideoControlsType, QuoteType, Theme } from "../../models/index.js";
|
|
2
2
|
export declare const mediaDirection: string[];
|
|
3
3
|
export declare const textSize: string[];
|
|
4
4
|
export declare const containerSizesArray: string[];
|
|
@@ -739,6 +739,17 @@ export declare function withTheme<T extends object>(value: T): {
|
|
|
739
739
|
optionName: string;
|
|
740
740
|
})[];
|
|
741
741
|
};
|
|
742
|
+
export declare function withDevice<T extends object>(value: T): {
|
|
743
|
+
oneOf: ((T & {
|
|
744
|
+
optionName: string;
|
|
745
|
+
}) | {
|
|
746
|
+
type: string;
|
|
747
|
+
additionalProperties: boolean;
|
|
748
|
+
required: Device[];
|
|
749
|
+
properties: {};
|
|
750
|
+
optionName: string;
|
|
751
|
+
})[];
|
|
752
|
+
};
|
|
742
753
|
export declare const AnchorProps: {
|
|
743
754
|
type: string;
|
|
744
755
|
additionalProperties: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "../../components/Image/schema.js";
|
|
2
|
-
import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme, } from "../../models/index.js";
|
|
2
|
+
import { CustomControlsButtonPositioning, CustomControlsType, Device, MediaVideoControlsType, QuoteType, Theme, } from "../../models/index.js";
|
|
3
3
|
import { AnalyticsEventSchema } from "./event.js";
|
|
4
4
|
export const mediaDirection = ['media-content', 'content-media'];
|
|
5
5
|
export const textSize = ['xs', 's', 'sm', 'm', 'l'];
|
|
@@ -446,6 +446,26 @@ export function withTheme(value) {
|
|
|
446
446
|
],
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
+
export function withDevice(value) {
|
|
450
|
+
return {
|
|
451
|
+
oneOf: [
|
|
452
|
+
{
|
|
453
|
+
...value,
|
|
454
|
+
optionName: 'no device',
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
type: 'object',
|
|
458
|
+
additionalProperties: false,
|
|
459
|
+
required: [Device.Desktop, Device.Mobile],
|
|
460
|
+
properties: Object.values(Device).reduce((result, deviceName) => ({
|
|
461
|
+
...result,
|
|
462
|
+
[deviceName]: value,
|
|
463
|
+
}), {}),
|
|
464
|
+
optionName: 'devices',
|
|
465
|
+
},
|
|
466
|
+
],
|
|
467
|
+
};
|
|
468
|
+
}
|
|
449
469
|
export const AnchorProps = {
|
|
450
470
|
type: 'object',
|
|
451
471
|
additionalProperties: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["schema/validators/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,KAAK,GACR,8BAAqB;AAEtB,OAAO,EAAC,oBAAoB,EAAC,mBA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ACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,UAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;iBACjB;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;iBAChC;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n CustomControlsButtonPositioning,\n CustomControlsType,\n MediaVideoControlsType,\n QuoteType,\n Theme,\n} from '../../models';\n\nimport {AnalyticsEventSchema} from './event';\n\nexport const mediaDirection = ['media-content', 'content-media'];\nexport const textSize = ['xs', 's', 'sm', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', 'm', 'l'];\nexport const contentTextWidth = ['s', 'm', 'l'];\n\nexport const videoTypes = ['default', 'player'];\nexport const playIconTypes = ['default', 'text'];\nexport const playIconThemes = ['blue', 'grey'];\nexport const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];\nexport const fileLinkTypes = ['vertical', 'horizontal'];\n\nexport const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']};\nexport const sizeNumber = {type: 'number', maximum: 12, minimum: 1};\nexport const contentThemes = ['default', 'dark', 'light'];\nexport const quoteTypes = Object.values(QuoteType);\nexport const mediaView = ['fit', 'full'];\nexport const customControlsType = [\n CustomControlsType.WithMuteButton,\n CustomControlsType.WithPlayPauseButton,\n];\nexport const customControlsButtonPositioning = [\n CustomControlsButtonPositioning.Center,\n CustomControlsButtonPositioning.Left,\n CustomControlsButtonPositioning.Right,\n];\n\nexport const BaseProps = {\n type: {},\n when: {\n type: 'string',\n },\n};\n\nexport const CardLayoutProps = {\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n};\n\nexport const containerSizesObject = {\n type: 'object',\n additionalProperties: false,\n properties: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n};\n\nexport const sliderSizesObject = {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: sliderSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n optionName: 'custom',\n },\n {\n type: 'number',\n optionName: 'constant',\n },\n ],\n};\n\nexport const AnimatableProps = {\n animated: {\n type: 'boolean',\n },\n};\n\nexport const ChildrenProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/children'},\n};\n\nexport const ChildrenCardsProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/cards'},\n};\n\nexport const LoopProps = {\n type: 'object',\n additionalProperties: false,\n required: ['start'],\n properties: {\n start: {\n type: 'number',\n },\n end: {\n type: 'number',\n },\n },\n};\n\nexport const PlayButtonProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: playIconTypes,\n },\n theme: {\n type: 'string',\n enum: playIconThemes,\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const CustomControlsOptionsProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: customControlsType,\n },\n muteButtonShown: {\n type: 'boolean',\n },\n positioning: {\n type: 'string',\n enum: customControlsButtonPositioning,\n },\n },\n};\n\nexport const VideoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n loop: {\n oneOf: [\n {\n ...LoopProps,\n optionName: 'options',\n },\n {\n type: 'boolean',\n optionName: 'enabled',\n },\n ],\n },\n type: {\n type: 'string',\n enum: videoTypes,\n },\n muted: {\n type: 'boolean',\n },\n autoplay: {\n type: 'boolean',\n },\n elapsedTime: {\n type: 'number',\n },\n playButton: PlayButtonProps,\n controls: {\n type: 'string',\n enum: videoControlsTypes,\n },\n customControlsOptions: CustomControlsOptionsProps,\n ariaLabel: {\n type: 'string',\n },\n contain: {\n type: 'boolean',\n },\n },\n};\n\nexport const ThemeProps = {\n type: 'string',\n enum: ['light', 'dark'],\n};\n\nexport const JustifyProps = {\n type: 'string',\n enum: ['start', 'center', 'end'],\n};\n\nexport const DataLensObjectProps = {\n type: 'object',\n additionalProperties: false,\n required: ['id'],\n properties: {\n id: {\n type: 'string',\n },\n theme: ThemeProps,\n },\n};\n\nexport const DataLensProps = {\n oneOf: [\n {\n type: 'string',\n optionName: 'id',\n },\n {\n ...DataLensObjectProps,\n optionName: 'options',\n },\n ],\n};\n\nexport const BackgroundProps = {\n additionalProperties: false,\n properties: {\n ...AnimatableProps,\n image: ImageProps,\n color: {\n type: 'string',\n },\n video: VideoProps,\n height: {\n type: 'number',\n },\n size: {\n type: 'string',\n enum: ['contain', 'cover'],\n },\n parallax: {\n type: 'boolean',\n },\n fullWidthMedia: {\n type: 'boolean',\n },\n },\n};\n\nexport const LinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n ...BaseProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n theme: {\n type: 'string',\n enum: ['back', 'file-link', 'normal'],\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n\nexport const FileLinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['href', 'text'],\n properties: {\n href: {\n type: 'string',\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n type: {\n type: 'string',\n enum: fileLinkTypes,\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n },\n};\n\nexport const authorItem = {\n type: 'object',\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {\n type: 'string',\n contentType: 'text',\n },\n secondName: {\n type: 'string',\n contentType: 'text',\n },\n avatar: ImageProps,\n description: {\n type: 'string',\n contentType: 'yfm',\n },\n },\n};\n\nexport const ButtonProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n primary: {\n type: 'boolean',\n },\n size: {\n type: 'string',\n enum: [\n 'xs', // deprecated, use 's'\n 'ns', // deprecated, use 's'\n 's',\n 'n', // deprecated, use 'l'\n 'm',\n 'l',\n 'xl',\n 'head', // deprecated, use 'l'\n 'promo', // deprecated, use 'xl'\n ],\n },\n theme: {\n type: 'string',\n enum: [\n 'normal',\n 'action',\n 'outlined',\n 'outlined-info',\n 'outlined-danger',\n 'raised',\n 'flat',\n 'flat-info',\n 'flat-danger',\n 'flat-secondary',\n 'clear',\n 'normal-contrast',\n 'outlined-contrast',\n 'flat-contrast',\n 'link', // deprecated, use 'outlined-info'\n 'pseudo', // deprecated, use 'outlined'\n 'pseudo-special', // deprecated, use 'outlined-contrast'\n 'websearch', // deprecated, use 'action'\n 'normal-dark', // deprecated, use 'outlined-contrast'\n 'normal-special', // deprecated, use 'normal-contrast'\n 'accent', // deprecated, use 'action'\n 'dark-grey', // deprecated, use 'github'\n 'app-store',\n 'google-play',\n 'scale',\n 'github',\n 'monochrome',\n ],\n },\n img: {\n oneOf: [\n {\n type: 'string',\n optionName: 'url',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['data'],\n properties: {\n data: {\n type: 'string',\n },\n position: {\n type: 'string',\n enum: ['left', 'right'],\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n optionName: 'options',\n },\n ],\n },\n analyticsEvents: {\n oneOf: [\n {...AnalyticsEventSchema, optionName: 'single'},\n {type: 'array', items: AnalyticsEventSchema, optionName: 'list'},\n ],\n },\n target: {\n type: 'string',\n enum: ['_self', '_blank', '_parent', '_top'],\n },\n width: {\n type: 'string',\n enum: ['auto', 'max'],\n },\n};\n\nexport const MenuProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport function withTheme<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no theme',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Theme.Light],\n properties: Object.values(Theme).reduce(\n (result, themeName) => ({\n ...result,\n [themeName]: value,\n }),\n {},\n ),\n optionName: 'themes',\n },\n ],\n };\n}\n\nexport const AnchorProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n};\n\nexport const BlockBaseProps = {\n ...BaseProps,\n anchor: AnchorProps,\n visible: {\n type: 'string',\n enum: containerSizesArray,\n },\n resetPaddings: {\n type: 'boolean',\n },\n context: {\n type: 'string',\n },\n indent: {\n type: 'object',\n additionalProperties: false,\n properties: {\n top: dividerEnum,\n bottom: dividerEnum,\n },\n },\n};\n\nexport const TitleProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n resetMargin: {\n type: 'boolean',\n },\n },\n};\n\nexport const ButtonBlock = {\n type: 'object',\n additionalProperties: false,\n properties: ButtonProps,\n if: {\n properties: {\n theme: {\n enum: ['app-store', 'google-play'],\n },\n },\n },\n then: {\n required: ['url'],\n },\n else: {\n required: ['text', 'url'],\n },\n};\n\nconst IframeProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n height: {\n type: 'number',\n },\n width: {\n type: 'number',\n },\n },\n};\n\nexport const MediaProps = {\n color: {\n type: 'string',\n },\n image: {\n oneOf: [\n {...ImageProps, optionName: 'single'},\n {type: 'array', items: ImageProps, optionName: 'list'},\n ],\n },\n disableImageSliderForArrayInput: {\n type: 'boolean',\n },\n video: VideoProps,\n youtube: {\n type: 'string',\n },\n videoIframe: {\n type: 'string',\n },\n autoplay: {\n type: 'boolean',\n },\n parallax: {\n type: 'boolean',\n },\n height: {\n type: 'number',\n },\n previewImg: {\n type: 'string',\n },\n dataLens: DataLensProps,\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n anyOf: [AnalyticsEventSchema, {type: 'array', items: AnalyticsEventSchema}],\n },\n ratio: {\n type: ['number', 'string'],\n pattern: '^auto$',\n },\n iframe: {\n ...IframeProps,\n },\n margins: {\n type: 'boolean',\n },\n};\n\nconst YMapXY = {\n type: 'array',\n items: {type: 'number'},\n minItems: 2,\n maxItems: 2,\n};\n\nexport const YMapMarkerLabel = {\n type: 'object',\n required: [],\n properties: {\n iconCaption: {\n type: 'string',\n },\n iconContent: {\n type: 'string',\n },\n iconColor: {\n type: 'string',\n },\n iconImageHref: {\n type: 'string',\n },\n iconImageSize: YMapXY,\n iconImageOffset: YMapXY,\n iconImageClipRect: {\n type: 'array',\n items: YMapXY,\n minItems: 2,\n maxItems: 2,\n },\n iconLayout: {\n type: 'string',\n },\n iconShape: {\n type: 'object',\n additionalProperties: true,\n },\n preset: {\n type: 'string',\n },\n },\n};\n\nexport const YMapMarker = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n coordinate: {\n type: 'array',\n items: {type: 'number'},\n },\n address: {\n type: 'string',\n },\n label: YMapMarkerLabel,\n },\n};\n\nexport const MapProps = {\n zoom: {\n type: 'number',\n },\n address: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n markers: {\n type: 'array',\n items: YMapMarker,\n },\n disableControls: {\n type: 'boolean',\n },\n disableBalloons: {\n type: 'boolean',\n },\n};\n\nexport const BorderProps = {\n type: 'string',\n enum: ['line', 'shadow', 'none'],\n};\n\nexport const CardBase = {\n border: BorderProps,\n};\n\nexport const BlockHeaderProps = {\n title: {\n oneOf: [\n {\n type: 'string',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n};\n\nexport const GravityIconProps = {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['name'],\n properties: {\n name: {\n type: 'string',\n },\n color: {\n type: 'string',\n enum: ['brand', 'text-color'],\n },\n },\n },\n ],\n};\n"]}
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["schema/validators/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,+BAA+B,EAC/B,kBAAkB,EAClB,MAAM,EACN,sBAAsB,EACtB,SAAS,EACT,KAAK,GACR,8BAAqB;AAEtB,OAAO,EAAC,oBAAoB,EAAC,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AAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;iBAChC;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n CustomControlsButtonPositioning,\n CustomControlsType,\n Device,\n MediaVideoControlsType,\n QuoteType,\n Theme,\n} from '../../models';\n\nimport {AnalyticsEventSchema} from './event';\n\nexport const mediaDirection = ['media-content', 'content-media'];\nexport const textSize = ['xs', 's', 'sm', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', 'm', 'l'];\nexport const contentTextWidth = ['s', 'm', 'l'];\n\nexport const videoTypes = ['default', 'player'];\nexport const playIconTypes = ['default', 'text'];\nexport const playIconThemes = ['blue', 'grey'];\nexport const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];\nexport const fileLinkTypes = ['vertical', 'horizontal'];\n\nexport const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']};\nexport const sizeNumber = {type: 'number', maximum: 12, minimum: 1};\nexport const contentThemes = ['default', 'dark', 'light'];\nexport const quoteTypes = Object.values(QuoteType);\nexport const mediaView = ['fit', 'full'];\nexport const customControlsType = [\n CustomControlsType.WithMuteButton,\n CustomControlsType.WithPlayPauseButton,\n];\nexport const customControlsButtonPositioning = [\n CustomControlsButtonPositioning.Center,\n CustomControlsButtonPositioning.Left,\n CustomControlsButtonPositioning.Right,\n];\n\nexport const BaseProps = {\n type: {},\n when: {\n type: 'string',\n },\n};\n\nexport const CardLayoutProps = {\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n};\n\nexport const containerSizesObject = {\n type: 'object',\n additionalProperties: false,\n properties: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n};\n\nexport const sliderSizesObject = {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: sliderSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n optionName: 'custom',\n },\n {\n type: 'number',\n optionName: 'constant',\n },\n ],\n};\n\nexport const AnimatableProps = {\n animated: {\n type: 'boolean',\n },\n};\n\nexport const ChildrenProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/children'},\n};\n\nexport const ChildrenCardsProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/cards'},\n};\n\nexport const LoopProps = {\n type: 'object',\n additionalProperties: false,\n required: ['start'],\n properties: {\n start: {\n type: 'number',\n },\n end: {\n type: 'number',\n },\n },\n};\n\nexport const PlayButtonProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: playIconTypes,\n },\n theme: {\n type: 'string',\n enum: playIconThemes,\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const CustomControlsOptionsProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: customControlsType,\n },\n muteButtonShown: {\n type: 'boolean',\n },\n positioning: {\n type: 'string',\n enum: customControlsButtonPositioning,\n },\n },\n};\n\nexport const VideoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n loop: {\n oneOf: [\n {\n ...LoopProps,\n optionName: 'options',\n },\n {\n type: 'boolean',\n optionName: 'enabled',\n },\n ],\n },\n type: {\n type: 'string',\n enum: videoTypes,\n },\n muted: {\n type: 'boolean',\n },\n autoplay: {\n type: 'boolean',\n },\n elapsedTime: {\n type: 'number',\n },\n playButton: PlayButtonProps,\n controls: {\n type: 'string',\n enum: videoControlsTypes,\n },\n customControlsOptions: CustomControlsOptionsProps,\n ariaLabel: {\n type: 'string',\n },\n contain: {\n type: 'boolean',\n },\n },\n};\n\nexport const ThemeProps = {\n type: 'string',\n enum: ['light', 'dark'],\n};\n\nexport const JustifyProps = {\n type: 'string',\n enum: ['start', 'center', 'end'],\n};\n\nexport const DataLensObjectProps = {\n type: 'object',\n additionalProperties: false,\n required: ['id'],\n properties: {\n id: {\n type: 'string',\n },\n theme: ThemeProps,\n },\n};\n\nexport const DataLensProps = {\n oneOf: [\n {\n type: 'string',\n optionName: 'id',\n },\n {\n ...DataLensObjectProps,\n optionName: 'options',\n },\n ],\n};\n\nexport const BackgroundProps = {\n additionalProperties: false,\n properties: {\n ...AnimatableProps,\n image: ImageProps,\n color: {\n type: 'string',\n },\n video: VideoProps,\n height: {\n type: 'number',\n },\n size: {\n type: 'string',\n enum: ['contain', 'cover'],\n },\n parallax: {\n type: 'boolean',\n },\n fullWidthMedia: {\n type: 'boolean',\n },\n },\n};\n\nexport const LinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n ...BaseProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n theme: {\n type: 'string',\n enum: ['back', 'file-link', 'normal'],\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n\nexport const FileLinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['href', 'text'],\n properties: {\n href: {\n type: 'string',\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n type: {\n type: 'string',\n enum: fileLinkTypes,\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n },\n};\n\nexport const authorItem = {\n type: 'object',\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {\n type: 'string',\n contentType: 'text',\n },\n secondName: {\n type: 'string',\n contentType: 'text',\n },\n avatar: ImageProps,\n description: {\n type: 'string',\n contentType: 'yfm',\n },\n },\n};\n\nexport const ButtonProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n primary: {\n type: 'boolean',\n },\n size: {\n type: 'string',\n enum: [\n 'xs', // deprecated, use 's'\n 'ns', // deprecated, use 's'\n 's',\n 'n', // deprecated, use 'l'\n 'm',\n 'l',\n 'xl',\n 'head', // deprecated, use 'l'\n 'promo', // deprecated, use 'xl'\n ],\n },\n theme: {\n type: 'string',\n enum: [\n 'normal',\n 'action',\n 'outlined',\n 'outlined-info',\n 'outlined-danger',\n 'raised',\n 'flat',\n 'flat-info',\n 'flat-danger',\n 'flat-secondary',\n 'clear',\n 'normal-contrast',\n 'outlined-contrast',\n 'flat-contrast',\n 'link', // deprecated, use 'outlined-info'\n 'pseudo', // deprecated, use 'outlined'\n 'pseudo-special', // deprecated, use 'outlined-contrast'\n 'websearch', // deprecated, use 'action'\n 'normal-dark', // deprecated, use 'outlined-contrast'\n 'normal-special', // deprecated, use 'normal-contrast'\n 'accent', // deprecated, use 'action'\n 'dark-grey', // deprecated, use 'github'\n 'app-store',\n 'google-play',\n 'scale',\n 'github',\n 'monochrome',\n ],\n },\n img: {\n oneOf: [\n {\n type: 'string',\n optionName: 'url',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['data'],\n properties: {\n data: {\n type: 'string',\n },\n position: {\n type: 'string',\n enum: ['left', 'right'],\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n optionName: 'options',\n },\n ],\n },\n analyticsEvents: {\n oneOf: [\n {...AnalyticsEventSchema, optionName: 'single'},\n {type: 'array', items: AnalyticsEventSchema, optionName: 'list'},\n ],\n },\n target: {\n type: 'string',\n enum: ['_self', '_blank', '_parent', '_top'],\n },\n width: {\n type: 'string',\n enum: ['auto', 'max'],\n },\n};\n\nexport const MenuProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport function withTheme<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no theme',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Theme.Light],\n properties: Object.values(Theme).reduce(\n (result, themeName) => ({\n ...result,\n [themeName]: value,\n }),\n {},\n ),\n optionName: 'themes',\n },\n ],\n };\n}\n\nexport function withDevice<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no device',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Device.Desktop, Device.Mobile],\n properties: Object.values(Device).reduce(\n (result, deviceName) => ({\n ...result,\n [deviceName]: value,\n }),\n {},\n ),\n optionName: 'devices',\n },\n ],\n };\n}\n\nexport const AnchorProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n};\n\nexport const BlockBaseProps = {\n ...BaseProps,\n anchor: AnchorProps,\n visible: {\n type: 'string',\n enum: containerSizesArray,\n },\n resetPaddings: {\n type: 'boolean',\n },\n context: {\n type: 'string',\n },\n indent: {\n type: 'object',\n additionalProperties: false,\n properties: {\n top: dividerEnum,\n bottom: dividerEnum,\n },\n },\n};\n\nexport const TitleProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n resetMargin: {\n type: 'boolean',\n },\n },\n};\n\nexport const ButtonBlock = {\n type: 'object',\n additionalProperties: false,\n properties: ButtonProps,\n if: {\n properties: {\n theme: {\n enum: ['app-store', 'google-play'],\n },\n },\n },\n then: {\n required: ['url'],\n },\n else: {\n required: ['text', 'url'],\n },\n};\n\nconst IframeProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n height: {\n type: 'number',\n },\n width: {\n type: 'number',\n },\n },\n};\n\nexport const MediaProps = {\n color: {\n type: 'string',\n },\n image: {\n oneOf: [\n {...ImageProps, optionName: 'single'},\n {type: 'array', items: ImageProps, optionName: 'list'},\n ],\n },\n disableImageSliderForArrayInput: {\n type: 'boolean',\n },\n video: VideoProps,\n youtube: {\n type: 'string',\n },\n videoIframe: {\n type: 'string',\n },\n autoplay: {\n type: 'boolean',\n },\n parallax: {\n type: 'boolean',\n },\n height: {\n type: 'number',\n },\n previewImg: {\n type: 'string',\n },\n dataLens: DataLensProps,\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n anyOf: [AnalyticsEventSchema, {type: 'array', items: AnalyticsEventSchema}],\n },\n ratio: {\n type: ['number', 'string'],\n pattern: '^auto$',\n },\n iframe: {\n ...IframeProps,\n },\n margins: {\n type: 'boolean',\n },\n};\n\nconst YMapXY = {\n type: 'array',\n items: {type: 'number'},\n minItems: 2,\n maxItems: 2,\n};\n\nexport const YMapMarkerLabel = {\n type: 'object',\n required: [],\n properties: {\n iconCaption: {\n type: 'string',\n },\n iconContent: {\n type: 'string',\n },\n iconColor: {\n type: 'string',\n },\n iconImageHref: {\n type: 'string',\n },\n iconImageSize: YMapXY,\n iconImageOffset: YMapXY,\n iconImageClipRect: {\n type: 'array',\n items: YMapXY,\n minItems: 2,\n maxItems: 2,\n },\n iconLayout: {\n type: 'string',\n },\n iconShape: {\n type: 'object',\n additionalProperties: true,\n },\n preset: {\n type: 'string',\n },\n },\n};\n\nexport const YMapMarker = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n coordinate: {\n type: 'array',\n items: {type: 'number'},\n },\n address: {\n type: 'string',\n },\n label: YMapMarkerLabel,\n },\n};\n\nexport const MapProps = {\n zoom: {\n type: 'number',\n },\n address: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n markers: {\n type: 'array',\n items: YMapMarker,\n },\n disableControls: {\n type: 'boolean',\n },\n disableBalloons: {\n type: 'boolean',\n },\n};\n\nexport const BorderProps = {\n type: 'string',\n enum: ['line', 'shadow', 'none'],\n};\n\nexport const CardBase = {\n border: BorderProps,\n};\n\nexport const BlockHeaderProps = {\n title: {\n oneOf: [\n {\n type: 'string',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n};\n\nexport const GravityIconProps = {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['name'],\n properties: {\n name: {\n type: 'string',\n },\n color: {\n type: 'string',\n enum: ['brand', 'text-color'],\n },\n },\n },\n ],\n};\n"]}
|
|
@@ -221,6 +221,17 @@ export declare const BackgroundCard: {
|
|
|
221
221
|
type: string;
|
|
222
222
|
enum: string[];
|
|
223
223
|
};
|
|
224
|
+
labels: {
|
|
225
|
+
type: string;
|
|
226
|
+
items: {
|
|
227
|
+
type: string;
|
|
228
|
+
properties: {
|
|
229
|
+
when: {
|
|
230
|
+
type: string;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
224
235
|
additionalInfo: {
|
|
225
236
|
type: string;
|
|
226
237
|
contentType: string;
|
|
@@ -109,6 +109,17 @@ export declare const BasicCard: {
|
|
|
109
109
|
contentType: string;
|
|
110
110
|
inputType: string;
|
|
111
111
|
};
|
|
112
|
+
labels: {
|
|
113
|
+
type: string;
|
|
114
|
+
items: {
|
|
115
|
+
type: string;
|
|
116
|
+
properties: {
|
|
117
|
+
when: {
|
|
118
|
+
type: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
112
123
|
additionalInfo: {
|
|
113
124
|
type: string;
|
|
114
125
|
contentType: string;
|
|
@@ -38,6 +38,10 @@ unpredictable css rules order in build */
|
|
|
38
38
|
text-align: center;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
.pc-content_centered .pc-content__labels {
|
|
42
|
+
justify-content: center;
|
|
43
|
+
margin-inline: auto;
|
|
44
|
+
}
|
|
41
45
|
.pc-content_centered .pc-content__list {
|
|
42
46
|
margin-inline: auto;
|
|
43
47
|
}
|
|
@@ -62,11 +66,15 @@ unpredictable css rules order in build */
|
|
|
62
66
|
.pc-content_size_s .pc-content__text_without-title {
|
|
63
67
|
margin-top: 0;
|
|
64
68
|
}
|
|
69
|
+
.pc-content_size_s .pc-content__labels,
|
|
65
70
|
.pc-content_size_s .pc-content__list,
|
|
66
71
|
.pc-content_size_s .pc-content__links,
|
|
67
72
|
.pc-content_size_s .pc-content__notice {
|
|
68
73
|
margin-top: 16px;
|
|
69
74
|
}
|
|
75
|
+
.pc-content_size_s .pc-content__labels + .pc-content__list, .pc-content_size_s .pc-content__labels + .pc-content__link, .pc-content_size_s .pc-content__labels + .pc-content__notice {
|
|
76
|
+
margin-top: 20px;
|
|
77
|
+
}
|
|
70
78
|
.pc-content_size_s .pc-content__buttons {
|
|
71
79
|
margin-top: 20px;
|
|
72
80
|
}
|
|
@@ -93,11 +101,15 @@ unpredictable css rules order in build */
|
|
|
93
101
|
font-size: var(--g-text-body-2-font-size);
|
|
94
102
|
line-height: var(--g-text-body-2-line-height);
|
|
95
103
|
}
|
|
104
|
+
.pc-content_size_m .pc-content__labels,
|
|
96
105
|
.pc-content_size_m .pc-content__list,
|
|
97
106
|
.pc-content_size_m .pc-content__links,
|
|
98
107
|
.pc-content_size_m .pc-content__notice {
|
|
99
108
|
margin-top: 20px;
|
|
100
109
|
}
|
|
110
|
+
.pc-content_size_m .pc-content__labels + .pc-content__list, .pc-content_size_m .pc-content__labels + .pc-content__link, .pc-content_size_m .pc-content__labels + .pc-content__notice {
|
|
111
|
+
margin-top: 24px;
|
|
112
|
+
}
|
|
101
113
|
.pc-content_size_m .pc-content__buttons {
|
|
102
114
|
margin-top: 24px;
|
|
103
115
|
}
|
|
@@ -120,11 +132,15 @@ unpredictable css rules order in build */
|
|
|
120
132
|
font-size: var(--g-text-body-2-font-size);
|
|
121
133
|
line-height: var(--g-text-body-2-line-height);
|
|
122
134
|
}
|
|
135
|
+
.pc-content_size_l .pc-content__labels,
|
|
123
136
|
.pc-content_size_l .pc-content__list,
|
|
124
137
|
.pc-content_size_l .pc-content__links,
|
|
125
138
|
.pc-content_size_l .pc-content__notice {
|
|
126
139
|
margin-top: 20px;
|
|
127
140
|
}
|
|
141
|
+
.pc-content_size_l .pc-content__labels + .pc-content__list, .pc-content_size_l .pc-content__labels + .pc-content__link, .pc-content_size_l .pc-content__labels + .pc-content__notice {
|
|
142
|
+
margin-top: 24px;
|
|
143
|
+
}
|
|
128
144
|
.pc-content_size_l .pc-content__buttons {
|
|
129
145
|
margin-top: 24px;
|
|
130
146
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useUniqId } from '@gravity-ui/uikit';
|
|
3
3
|
import { Buttons, ContentList, Links, Title, YFMWrapper } from "../../components/index.js";
|
|
4
|
+
import ContentLabels from "../../components/ContentLabels/ContentLabels.js";
|
|
4
5
|
import { Col } from "../../grid/index.js";
|
|
5
6
|
import { block } from "../../utils/index.js";
|
|
6
7
|
import { getQaAttrubutes } from "../../utils/blocks.js";
|
|
@@ -18,15 +19,22 @@ function getTextSize(size) {
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
const Content = (props) => {
|
|
21
|
-
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, controlPosition, } = props;
|
|
22
|
-
const qaAttributes = getQaAttrubutes(qa, [
|
|
22
|
+
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, labels, qa, controlPosition, } = props;
|
|
23
|
+
const qaAttributes = getQaAttrubutes(qa, [
|
|
24
|
+
'links',
|
|
25
|
+
'link',
|
|
26
|
+
'buttons',
|
|
27
|
+
'button',
|
|
28
|
+
'list',
|
|
29
|
+
'labels',
|
|
30
|
+
]);
|
|
23
31
|
const titleProps = !title || typeof title === 'string'
|
|
24
32
|
? { text: title, textSize: getTextSize(size) }
|
|
25
33
|
: title;
|
|
26
34
|
const hasTitle = Boolean(title);
|
|
27
35
|
const defaultTitleId = useUniqId();
|
|
28
36
|
const titleId = titleIdFromProps || defaultTitleId;
|
|
29
|
-
return (_jsxs(Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && (_jsx(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && (_jsx("div", { className: b('text', { ['without-title']: !hasTitle }), children: _jsx(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), list?.length ? (_jsx("div", { className: b('list'), children: _jsx(ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && (_jsx("div", { className: b('notice'), children: _jsx(YFMWrapper, { content: additionalInfo, modifiers: {
|
|
37
|
+
return (_jsxs(Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && (_jsx(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && (_jsx("div", { className: b('text', { ['without-title']: !hasTitle }), children: _jsx(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), labels?.length ? (_jsx("div", { className: b('labels'), children: _jsx(ContentLabels, { labels: labels, theme: theme, size: size, qa: qaAttributes.labels }) })) : null, list?.length ? (_jsx("div", { className: b('list'), children: _jsx(ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && (_jsx("div", { className: b('notice'), children: _jsx(YFMWrapper, { content: additionalInfo, modifiers: {
|
|
30
38
|
constructor: true,
|
|
31
39
|
'constructor-notice': true,
|
|
32
40
|
[`constructor-size-${size}`]: true,
|