@gravity-ui/page-constructor 6.0.0 → 6.1.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.
Files changed (47) hide show
  1. package/build/cjs/blocks/SliderNew/Slider.js +12 -1
  2. package/build/cjs/blocks/SliderNew/Slider.js.map +1 -1
  3. package/build/cjs/components/ContentList/ContentList.css +7 -7
  4. package/build/cjs/components/FileLink/FileLink.js +8 -1
  5. package/build/cjs/components/FileLink/FileLink.js.map +1 -1
  6. package/build/cjs/components/Link/Link.js +11 -2
  7. package/build/cjs/components/Link/Link.js.map +1 -1
  8. package/build/cjs/components/Title/TitleItem.css +8 -1
  9. package/build/cjs/components/Title/TitleItem.js +1 -0
  10. package/build/cjs/components/Title/TitleItem.js.map +1 -1
  11. package/build/cjs/models/constructor-items/common.d.ts +2 -2
  12. package/build/cjs/models/constructor-items/common.js.map +1 -1
  13. package/build/cjs/schema/validators/common.js +1 -1
  14. package/build/cjs/schema/validators/common.js.map +1 -1
  15. package/build/cjs/sub-blocks/Content/Content.css +53 -6
  16. package/build/cjs/sub-blocks/Content/Content.js +2 -0
  17. package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
  18. package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +1 -0
  19. package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js.map +1 -1
  20. package/build/cjs/utils/blocks.js +1 -0
  21. package/build/cjs/utils/blocks.js.map +1 -1
  22. package/build/esm/blocks/SliderNew/Slider.js +12 -1
  23. package/build/esm/blocks/SliderNew/Slider.js.map +1 -1
  24. package/build/esm/components/ContentList/ContentList.css +7 -7
  25. package/build/esm/components/FileLink/FileLink.js +8 -1
  26. package/build/esm/components/FileLink/FileLink.js.map +1 -1
  27. package/build/esm/components/Link/Link.js +12 -3
  28. package/build/esm/components/Link/Link.js.map +1 -1
  29. package/build/esm/components/Title/TitleItem.css +8 -1
  30. package/build/esm/components/Title/TitleItem.js +1 -0
  31. package/build/esm/components/Title/TitleItem.js.map +1 -1
  32. package/build/esm/models/constructor-items/common.d.ts +2 -2
  33. package/build/esm/models/constructor-items/common.js.map +1 -1
  34. package/build/esm/schema/validators/common.js +1 -1
  35. package/build/esm/schema/validators/common.js.map +1 -1
  36. package/build/esm/sub-blocks/Content/Content.css +53 -6
  37. package/build/esm/sub-blocks/Content/Content.js +2 -0
  38. package/build/esm/sub-blocks/Content/Content.js.map +1 -1
  39. package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +1 -0
  40. package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js.map +1 -1
  41. package/build/esm/utils/blocks.js +1 -0
  42. package/build/esm/utils/blocks.js.map +1 -1
  43. package/package.json +1 -1
  44. package/schema/index.js +1 -1
  45. package/server/models/constructor-items/common.d.ts +2 -2
  46. package/server/utils/blocks.js +1 -0
  47. package/widget/index.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":"AAOA,QAAQ;AACR,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;AACzB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;AACf,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,iCAAa,CAAA;AACjB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,yDAAmC,CAAA;IACnC,oEAA8C,CAAA;AAClD,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACvC,gDAAa,CAAA;IACb,kDAAe,CAAA;IACf,oDAAiB,CAAA;AACrB,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,QAI1C;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;AACrB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;AACpC,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB","sourcesContent":["import * as React from 'react';\n\nimport {ButtonView, ButtonProps as UikitButtonProps} from '@gravity-ui/uikit';\n\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps} from '../common';\n\n// enums\nexport enum AuthorType {\n Column = 'column',\n Line = 'line',\n}\n\nexport enum PriceDetailsType {\n MARKED_LIST = 'marked-list',\n SETTINGS = 'settings',\n}\n\nexport enum PriceLabelColor {\n BLUE = 'blue',\n GREEN = 'green',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n RED = 'red',\n}\n\nexport enum PlayButtonType {\n Default = 'default',\n Text = 'text',\n}\n\nexport enum PlayButtonThemes {\n Blue = 'blue',\n Grey = 'grey',\n}\n\nexport enum CustomControlsType {\n WithMuteButton = 'with-mute-button',\n WithPlayPauseButton = 'with-play-pause-button',\n}\n\nexport enum CustomControlsButtonPositioning {\n Left = 'left',\n Right = 'right',\n Center = 'center',\n}\n\nexport enum MediaVideoType {\n Default = 'default',\n Player = 'player',\n}\n\nexport enum MediaVideoControlsType {\n Default = 'default',\n Custom = 'custom',\n}\n\nexport enum QuoteType {\n Chevron = 'chevron', // « »\n EnglishDouble = 'english-double', // “ ”\n}\n\n// types\nexport type TextTheme = 'light' | 'dark';\nexport type TextSize = 'xs' | 's' | 'm' | 'l';\nexport type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\nexport type HeaderWidth = 's' | 'm' | 'l';\nexport type HeaderImageSize = 's' | 'm';\nexport type HeaderOffset = 'default' | 'large';\nexport type Justify = 'start' | 'center' | 'end';\nexport type ColumnsCount = 1 | 2 | 3 | 4;\nexport type LegendTableMarkerType = 'disk' | 'tick';\nexport type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';\nexport type MediaDirection = 'media-content' | 'content-media';\nexport type PriceDescriptionColor = 'cornflower' | 'black';\nexport type ContentSize = 's' | 'l';\nexport type ContentTextSize = 's' | 'm' | 'l';\nexport type ContentTheme = 'default' | 'dark' | 'light';\nexport type FileLinkType = 'vertical' | 'horizontal';\nexport type ImageCardMargins = 's' | 'm';\nexport type LayoutItemContentMargin = 'm' | 'l';\n\n// modifiers\nexport interface Themable {\n theme?: TextTheme;\n}\n\nexport interface Justifyable {\n justify?: Justify;\n}\n\nexport interface Stylable {\n className?: string;\n}\n\nexport interface Animatable {\n animated?: boolean;\n}\n\nexport interface Tabbable {\n tabIndex?: number;\n}\n\nexport interface Roleable {\n role?: React.AriaRole;\n}\n\n//common props\nexport interface Background {\n image?: string;\n color?: string;\n}\n\nexport interface AnchorProps {\n text: string;\n url: string;\n}\n\n/**\n * @deprecated Component VideoBlock will be deleted, which uses this logic\n */\ninterface LoopProps {\n start: number;\n end?: number;\n}\n\n// images\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n > {\n alt?: string;\n fetchPriority?: 'high' | 'low' | 'auto';\n disableCompress?: boolean;\n}\n\nexport interface ImageObjectProps extends ImageInfoProps {\n src: string;\n}\n\nexport interface ImageDeviceProps extends ImageInfoProps {\n desktop: string;\n mobile: string;\n tablet?: string;\n}\n\nexport type ImageProps = string | ImageObjectProps | ImageDeviceProps;\nexport type ThemedImage = ThemeSupporting<ImageProps>;\n\nexport interface BackgroundImageProps\n extends React.HTMLProps<HTMLDivElement>,\n Partial<ImageDeviceProps>,\n Partial<ImageObjectProps>,\n QAProps {\n style?: React.CSSProperties;\n imageClassName?: string;\n hide?: boolean;\n}\n\n//components props\nexport interface MediaVideoProps extends AnalyticsEventsBase {\n src: string[];\n type?: MediaVideoType;\n loop?: LoopProps | boolean;\n muted?: boolean;\n autoplay?: boolean;\n elapsedTime?: number;\n playButton?: PlayButtonProps;\n controls?: MediaVideoControlsType;\n customControlsOptions?: CustomControlsOptions;\n ariaLabel?: string;\n contain?: boolean;\n}\n\n// links\nexport interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {\n url: string;\n urlTitle?: string;\n text?: string;\n textSize?: TextSize;\n theme?: LinkTheme;\n colorTheme?: TextTheme;\n arrow?: boolean;\n target?: string;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport interface FileLinkProps extends ClassNameProps, Tabbable {\n href: string;\n text: React.ReactNode;\n type?: FileLinkType;\n textSize?: TextSize;\n theme?: ContentTheme;\n urlTitle?: string;\n onClick?: () => void;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\n// buttons\nexport type ButtonTheme =\n | ButtonView\n | 'github'\n | 'app-store'\n | 'google-play'\n | 'scale'\n | 'monochrome';\n\nexport interface ButtonProps\n extends AnalyticsEventsBase,\n Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url: string;\n position?: ButtonImagePosition;\n alt?: string;\n}\n\nexport interface CustomControlsOptions {\n type?: CustomControlsType;\n muteButtonShown?: boolean;\n positioning?: CustomControlsButtonPositioning;\n}\n\nexport interface PlayButtonProps extends ClassNameProps {\n type?: PlayButtonType;\n theme?: PlayButtonThemes;\n text?: string;\n}\n\nexport type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;\n\nexport interface MediaComponentVideoProps extends AnalyticsEventsBase {\n video: MediaVideoProps;\n height?: number;\n ratio?: number | 'auto';\n previewImg?: string;\n}\n\nexport interface MediaComponentVideoIframeProps {\n videoIframe: string;\n}\n\nexport interface MediaComponentYoutubeProps {\n youtube: string;\n previewImg?: string;\n fullscreen?: boolean;\n}\n\nexport interface MediaComponentImageProps {\n image: ImageProps | ImageProps[] | ImageDeviceProps;\n video?: MediaVideoProps;\n parallax?: boolean;\n height?: number;\n disableImageSliderForArrayInput?: boolean;\n}\n\nexport interface MediaComponentDataLensProps {\n dataLens: DataLensProps;\n}\n\nexport interface MediaComponentIframeProps {\n iframe: IframeProps;\n margins?: boolean;\n}\n\nexport interface MediaProps\n extends Animatable,\n Partial<MediaComponentDataLensProps>,\n Partial<MediaComponentYoutubeProps>,\n Partial<MediaComponentVideoIframeProps>,\n Partial<MediaComponentImageProps>,\n Partial<MediaComponentIframeProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n videoMicrodata?: {\n name?: string;\n description?: string;\n duration?: string;\n uploadDate?: string;\n contentUrl?: string;\n thumbnailUrl?: string;\n };\n}\n\nexport interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {\n fullWidthMedia?: boolean;\n className?: string;\n mediaClassName?: string;\n}\n\nexport type Coordinate = number[];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n id: string;\n}\n\nexport interface YMapMarker {\n address?: string;\n coordinate?: Coordinate;\n label?: YMapMarkerLabel;\n}\n\nexport interface YMapMarkerLabel {\n iconCaption?: string;\n iconContent?: string;\n iconColor?: string;\n preset?: string;\n}\n\nexport type MapProps = GMapProps | YMapProps;\n\nexport type ThemedMediaProps = ThemeSupporting<MediaProps>;\n\nexport interface DataLensObjectProps {\n id: string;\n theme: 'dark' | 'light';\n}\n\nexport interface IframeProps {\n src: string;\n width?: number;\n height?: number;\n title?: string;\n name?: string;\n}\n\nexport type DataLensProps = string | DataLensObjectProps;\n\nexport interface AuthorItem {\n firstName: string;\n secondName: string;\n description?: string;\n avatar?: ThemeSupporting<ImageProps> | JSX.Element;\n}\n\nexport interface HeaderBreadCrumbsProps extends ClassNameProps {\n items: {\n url: string;\n text: React.ReactNode;\n }[];\n theme?: TextTheme;\n analyticsEvents?: AnalyticsEventsProp;\n}\n\nexport interface TitleItemProps extends Justifyable, TitleItemBaseProps {\n navTitle?: string;\n anchor?: string;\n}\n\nexport interface TitleItemBaseProps {\n text: string;\n textSize?: TextSize;\n url?: string;\n urlTitle?: string;\n custom?: string | React.ReactNode;\n onClick?: () => void;\n}\n\nexport type MediaView = 'fit' | 'full';\n\n// card\nexport type MediaBorder = 'shadow' | 'line' | 'none';\nexport type CardBorder = MediaBorder;\nexport type ControlPosition = 'content' | 'footer';\n\nexport interface CardBaseProps {\n border?: CardBorder;\n}\n\nexport type CardLayoutProps = {\n controlPosition?: ControlPosition;\n};\n\n//price\nexport interface PriceDescriptionProps {\n title: string;\n detailedTitle?: string;\n description: string;\n label?: {\n color: PriceLabelColor;\n text?: string;\n size?: TextSize;\n };\n}\n\nexport interface PriceDetailsSettingsProps {\n title: string;\n description: string;\n}\n\nexport interface PriceDetailsListProps {\n text: string;\n}\n\nexport interface PriceDetailsProps {\n items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];\n}\n\nexport interface PriceItemProps\n extends PriceDetailsProps,\n PriceDescriptionProps,\n AnalyticsEventsBase {}\n\nexport interface PriceFoldableDetailsProps {\n title: string;\n size?: TextSize;\n titleColor?: PriceDescriptionColor;\n}\n\n/** @deprecated */\nexport interface PriceDetailedProps extends CardBaseProps {\n items: PriceItemProps[];\n description?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n titleColor?: PriceDescriptionColor;\n };\n details?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n };\n priceType?: PriceDetailsType;\n numberGroupItems?: 3 | 4 | 5;\n isCombined?: boolean;\n useMixedView?: boolean;\n foldable?: PriceFoldableDetailsProps;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n}\n\nexport interface AuthorProps extends QAProps {\n author: AuthorItem;\n className?: string;\n authorContainerClassName?: string;\n type?: AuthorType;\n theme?: ContentTheme;\n}\n\nexport interface TitleProps {\n title?: TitleItemProps | string;\n subtitle?: string;\n}\n\nexport interface YandexFormProps extends AnalyticsEventsBase {\n id: number | string;\n containerId?: string;\n theme?: string;\n className?: string;\n headerHeight?: number;\n customFormOrigin?: string;\n customFormSection?: string;\n params?: {[key: string]: string};\n\n onSubmit?: () => void;\n onLoad?: () => void;\n}\n\nexport interface WithBorder {\n border?: MediaBorder;\n /**\n * @deprecated use custom class for media-component\n */\n disableShadow?: boolean;\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":"AAOA,QAAQ;AACR,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;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ACnB,6CAAgC,CAAA;AACpC,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB","sourcesContent":["import * as React from 'react';\n\nimport {ButtonView, ButtonProps as UikitButtonProps} from '@gravity-ui/uikit';\n\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps} from '../common';\n\n// enums\nexport enum AuthorType {\n Column = 'column',\n Line = 'line',\n}\n\nexport enum PriceDetailsType {\n MARKED_LIST = 'marked-list',\n SETTINGS = 'settings',\n}\n\nexport enum PriceLabelColor {\n BLUE = 'blue',\n GREEN = 'green',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n RED = 'red',\n}\n\nexport enum PlayButtonType {\n Default = 'default',\n Text = 'text',\n}\n\nexport enum PlayButtonThemes {\n Blue = 'blue',\n Grey = 'grey',\n}\n\nexport enum CustomControlsType {\n WithMuteButton = 'with-mute-button',\n WithPlayPauseButton = 'with-play-pause-button',\n}\n\nexport enum CustomControlsButtonPositioning {\n Left = 'left',\n Right = 'right',\n Center = 'center',\n}\n\nexport enum MediaVideoType {\n Default = 'default',\n Player = 'player',\n}\n\nexport enum MediaVideoControlsType {\n Default = 'default',\n Custom = 'custom',\n}\n\nexport enum QuoteType {\n Chevron = 'chevron', // « »\n EnglishDouble = 'english-double', // “ ”\n}\n\n// types\nexport type TextTheme = 'light' | 'dark';\nexport type TextSize = 'xs' | 's' | 'sm' | 'm' | 'l';\nexport type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\nexport type HeaderWidth = 's' | 'm' | 'l';\nexport type HeaderImageSize = 's' | 'm';\nexport type HeaderOffset = 'default' | 'large';\nexport type Justify = 'start' | 'center' | 'end';\nexport type ColumnsCount = 1 | 2 | 3 | 4;\nexport type LegendTableMarkerType = 'disk' | 'tick';\nexport type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';\nexport type MediaDirection = 'media-content' | 'content-media';\nexport type PriceDescriptionColor = 'cornflower' | 'black';\nexport type ContentSize = 's' | 'm' | 'l';\nexport type ContentTextSize = 's' | 'm' | 'l';\nexport type ContentTheme = 'default' | 'dark' | 'light';\nexport type FileLinkType = 'vertical' | 'horizontal';\nexport type ImageCardMargins = 's' | 'm';\nexport type LayoutItemContentMargin = 'm' | 'l';\n\n// modifiers\nexport interface Themable {\n theme?: TextTheme;\n}\n\nexport interface Justifyable {\n justify?: Justify;\n}\n\nexport interface Stylable {\n className?: string;\n}\n\nexport interface Animatable {\n animated?: boolean;\n}\n\nexport interface Tabbable {\n tabIndex?: number;\n}\n\nexport interface Roleable {\n role?: React.AriaRole;\n}\n\n//common props\nexport interface Background {\n image?: string;\n color?: string;\n}\n\nexport interface AnchorProps {\n text: string;\n url: string;\n}\n\n/**\n * @deprecated Component VideoBlock will be deleted, which uses this logic\n */\ninterface LoopProps {\n start: number;\n end?: number;\n}\n\n// images\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n > {\n alt?: string;\n fetchPriority?: 'high' | 'low' | 'auto';\n disableCompress?: boolean;\n}\n\nexport interface ImageObjectProps extends ImageInfoProps {\n src: string;\n}\n\nexport interface ImageDeviceProps extends ImageInfoProps {\n desktop: string;\n mobile: string;\n tablet?: string;\n}\n\nexport type ImageProps = string | ImageObjectProps | ImageDeviceProps;\nexport type ThemedImage = ThemeSupporting<ImageProps>;\n\nexport interface BackgroundImageProps\n extends React.HTMLProps<HTMLDivElement>,\n Partial<ImageDeviceProps>,\n Partial<ImageObjectProps>,\n QAProps {\n style?: React.CSSProperties;\n imageClassName?: string;\n hide?: boolean;\n}\n\n//components props\nexport interface MediaVideoProps extends AnalyticsEventsBase {\n src: string[];\n type?: MediaVideoType;\n loop?: LoopProps | boolean;\n muted?: boolean;\n autoplay?: boolean;\n elapsedTime?: number;\n playButton?: PlayButtonProps;\n controls?: MediaVideoControlsType;\n customControlsOptions?: CustomControlsOptions;\n ariaLabel?: string;\n contain?: boolean;\n}\n\n// links\nexport interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {\n url: string;\n urlTitle?: string;\n text?: string;\n textSize?: TextSize;\n theme?: LinkTheme;\n colorTheme?: TextTheme;\n arrow?: boolean;\n target?: string;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport interface FileLinkProps extends ClassNameProps, Tabbable {\n href: string;\n text: React.ReactNode;\n type?: FileLinkType;\n textSize?: TextSize;\n theme?: ContentTheme;\n urlTitle?: string;\n onClick?: () => void;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\n// buttons\nexport type ButtonTheme =\n | ButtonView\n | 'github'\n | 'app-store'\n | 'google-play'\n | 'scale'\n | 'monochrome';\n\nexport interface ButtonProps\n extends AnalyticsEventsBase,\n Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url: string;\n position?: ButtonImagePosition;\n alt?: string;\n}\n\nexport interface CustomControlsOptions {\n type?: CustomControlsType;\n muteButtonShown?: boolean;\n positioning?: CustomControlsButtonPositioning;\n}\n\nexport interface PlayButtonProps extends ClassNameProps {\n type?: PlayButtonType;\n theme?: PlayButtonThemes;\n text?: string;\n}\n\nexport type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;\n\nexport interface MediaComponentVideoProps extends AnalyticsEventsBase {\n video: MediaVideoProps;\n height?: number;\n ratio?: number | 'auto';\n previewImg?: string;\n}\n\nexport interface MediaComponentVideoIframeProps {\n videoIframe: string;\n}\n\nexport interface MediaComponentYoutubeProps {\n youtube: string;\n previewImg?: string;\n fullscreen?: boolean;\n}\n\nexport interface MediaComponentImageProps {\n image: ImageProps | ImageProps[] | ImageDeviceProps;\n video?: MediaVideoProps;\n parallax?: boolean;\n height?: number;\n disableImageSliderForArrayInput?: boolean;\n}\n\nexport interface MediaComponentDataLensProps {\n dataLens: DataLensProps;\n}\n\nexport interface MediaComponentIframeProps {\n iframe: IframeProps;\n margins?: boolean;\n}\n\nexport interface MediaProps\n extends Animatable,\n Partial<MediaComponentDataLensProps>,\n Partial<MediaComponentYoutubeProps>,\n Partial<MediaComponentVideoIframeProps>,\n Partial<MediaComponentImageProps>,\n Partial<MediaComponentIframeProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n videoMicrodata?: {\n name?: string;\n description?: string;\n duration?: string;\n uploadDate?: string;\n contentUrl?: string;\n thumbnailUrl?: string;\n };\n}\n\nexport interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {\n fullWidthMedia?: boolean;\n className?: string;\n mediaClassName?: string;\n}\n\nexport type Coordinate = number[];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n id: string;\n}\n\nexport interface YMapMarker {\n address?: string;\n coordinate?: Coordinate;\n label?: YMapMarkerLabel;\n}\n\nexport interface YMapMarkerLabel {\n iconCaption?: string;\n iconContent?: string;\n iconColor?: string;\n preset?: string;\n}\n\nexport type MapProps = GMapProps | YMapProps;\n\nexport type ThemedMediaProps = ThemeSupporting<MediaProps>;\n\nexport interface DataLensObjectProps {\n id: string;\n theme: 'dark' | 'light';\n}\n\nexport interface IframeProps {\n src: string;\n width?: number;\n height?: number;\n title?: string;\n name?: string;\n}\n\nexport type DataLensProps = string | DataLensObjectProps;\n\nexport interface AuthorItem {\n firstName: string;\n secondName: string;\n description?: string;\n avatar?: ThemeSupporting<ImageProps> | JSX.Element;\n}\n\nexport interface HeaderBreadCrumbsProps extends ClassNameProps {\n items: {\n url: string;\n text: React.ReactNode;\n }[];\n theme?: TextTheme;\n analyticsEvents?: AnalyticsEventsProp;\n}\n\nexport interface TitleItemProps extends Justifyable, TitleItemBaseProps {\n navTitle?: string;\n anchor?: string;\n}\n\nexport interface TitleItemBaseProps {\n text: string;\n textSize?: TextSize;\n url?: string;\n urlTitle?: string;\n custom?: string | React.ReactNode;\n onClick?: () => void;\n}\n\nexport type MediaView = 'fit' | 'full';\n\n// card\nexport type MediaBorder = 'shadow' | 'line' | 'none';\nexport type CardBorder = MediaBorder;\nexport type ControlPosition = 'content' | 'footer';\n\nexport interface CardBaseProps {\n border?: CardBorder;\n}\n\nexport type CardLayoutProps = {\n controlPosition?: ControlPosition;\n};\n\n//price\nexport interface PriceDescriptionProps {\n title: string;\n detailedTitle?: string;\n description: string;\n label?: {\n color: PriceLabelColor;\n text?: string;\n size?: TextSize;\n };\n}\n\nexport interface PriceDetailsSettingsProps {\n title: string;\n description: string;\n}\n\nexport interface PriceDetailsListProps {\n text: string;\n}\n\nexport interface PriceDetailsProps {\n items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];\n}\n\nexport interface PriceItemProps\n extends PriceDetailsProps,\n PriceDescriptionProps,\n AnalyticsEventsBase {}\n\nexport interface PriceFoldableDetailsProps {\n title: string;\n size?: TextSize;\n titleColor?: PriceDescriptionColor;\n}\n\n/** @deprecated */\nexport interface PriceDetailedProps extends CardBaseProps {\n items: PriceItemProps[];\n description?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n titleColor?: PriceDescriptionColor;\n };\n details?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n };\n priceType?: PriceDetailsType;\n numberGroupItems?: 3 | 4 | 5;\n isCombined?: boolean;\n useMixedView?: boolean;\n foldable?: PriceFoldableDetailsProps;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n}\n\nexport interface AuthorProps extends QAProps {\n author: AuthorItem;\n className?: string;\n authorContainerClassName?: string;\n type?: AuthorType;\n theme?: ContentTheme;\n}\n\nexport interface TitleProps {\n title?: TitleItemProps | string;\n subtitle?: string;\n}\n\nexport interface YandexFormProps extends AnalyticsEventsBase {\n id: number | string;\n containerId?: string;\n theme?: string;\n className?: string;\n headerHeight?: number;\n customFormOrigin?: string;\n customFormSection?: string;\n params?: {[key: string]: string};\n\n onSubmit?: () => void;\n onLoad?: () => void;\n}\n\nexport interface WithBorder {\n border?: MediaBorder;\n /**\n * @deprecated use custom class for media-component\n */\n disableShadow?: boolean;\n}\n"]}
@@ -5,7 +5,7 @@ export const mediaDirection = ['media-content', 'content-media'];
5
5
  export const textSize = ['s', 'm', 'l'];
6
6
  export const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
7
7
  export const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];
8
- export const contentSizes = ['s', 'l'];
8
+ export const contentSizes = ['s', 'm', 'l'];
9
9
  export const contentTextWidth = ['s', 'm', 'l'];
10
10
  export const videoTypes = ['default', 'player'];
11
11
  export const playIconTypes = ['default', 'text'];
@@ -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,mBAAgB;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC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C,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;4CAEM,UAAU,KACb,UAAU,EAAE,SAAS;SAE5B;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;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 = ['s', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', '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\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 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};\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"]}
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,mBAAgB;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACjD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAU,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tonPositioning,\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 = ['s', '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\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 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};\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"]}
@@ -1,5 +1,6 @@
1
1
  .pc-content_size_l .pc-content__text .yfm,
2
- .pc-content_size_l .pc-content__notice .yfm {
2
+ .pc-content_size_l .pc-content__notice .yfm, .pc-content_size_m .pc-content__text .yfm,
3
+ .pc-content_size_m .pc-content__notice .yfm {
3
4
  margin: 0;
4
5
  }
5
6
 
@@ -37,6 +38,9 @@ unpredictable css rules order in build */
37
38
  text-align: center;
38
39
  }
39
40
 
41
+ .pc-content_centered .pc-content__list {
42
+ margin-inline: auto;
43
+ }
40
44
  .pc-content_centered .pc-content__buttons {
41
45
  justify-content: center;
42
46
  }
@@ -52,8 +56,7 @@ unpredictable css rules order in build */
52
56
  .pc-content_centered .pc-content__text .yfm ol {
53
57
  text-align: left;
54
58
  }
55
- .pc-content_size_s .pc-content__text,
56
- .pc-content_size_s .pc-content__notice {
59
+ .pc-content_size_s .pc-content__text {
57
60
  margin-top: 8px;
58
61
  }
59
62
  .pc-content_size_s .pc-content__text_without-title {
@@ -61,11 +64,44 @@ unpredictable css rules order in build */
61
64
  }
62
65
  .pc-content_size_s .pc-content__list,
63
66
  .pc-content_size_s .pc-content__links,
64
- .pc-content_size_s .pc-content__buttons {
67
+ .pc-content_size_s .pc-content__notice {
65
68
  margin-top: 16px;
66
69
  }
67
- .pc-content_size_l .pc-content__text,
68
- .pc-content_size_l .pc-content__notice {
70
+ .pc-content_size_s .pc-content__buttons {
71
+ margin-top: 20px;
72
+ }
73
+ .pc-content_size_s .pc-content__notice .yfm {
74
+ font-size: var(--g-text-body-1-font-size);
75
+ line-height: var(--g-text-body-1-line-height);
76
+ }
77
+ .pc-content_size_m .pc-content__text {
78
+ margin-top: 12px;
79
+ }
80
+ .pc-content_size_m .pc-content__text_without-title {
81
+ margin-top: 0;
82
+ }
83
+ .pc-content_size_m .pc-content__text .yfm,
84
+ .pc-content_size_m .pc-content__notice .yfm {
85
+ font-size: var(--g-text-body-3-font-size);
86
+ line-height: var(--g-text-body-3-line-height);
87
+ }
88
+ .pc-content_size_m .pc-content__text .yfm {
89
+ font-size: var(--g-text-body-3-font-size);
90
+ line-height: var(--g-text-body-3-line-height);
91
+ }
92
+ .pc-content_size_m .pc-content__notice .yfm {
93
+ font-size: var(--g-text-body-2-font-size);
94
+ line-height: var(--g-text-body-2-line-height);
95
+ }
96
+ .pc-content_size_m .pc-content__list,
97
+ .pc-content_size_m .pc-content__links,
98
+ .pc-content_size_m .pc-content__notice {
99
+ margin-top: 20px;
100
+ }
101
+ .pc-content_size_m .pc-content__buttons {
102
+ margin-top: 24px;
103
+ }
104
+ .pc-content_size_l .pc-content__text {
69
105
  margin-top: 12px;
70
106
  }
71
107
  .pc-content_size_l .pc-content__text_without-title {
@@ -76,8 +112,19 @@ unpredictable css rules order in build */
76
112
  font-size: var(--g-text-body-3-font-size);
77
113
  line-height: var(--g-text-body-3-line-height);
78
114
  }
115
+ .pc-content_size_l .pc-content__text .yfm {
116
+ font-size: var(--g-text-body-3-font-size);
117
+ line-height: var(--g-text-body-3-line-height);
118
+ }
119
+ .pc-content_size_l .pc-content__notice .yfm {
120
+ font-size: var(--g-text-body-2-font-size);
121
+ line-height: var(--g-text-body-2-line-height);
122
+ }
79
123
  .pc-content_size_l .pc-content__list,
80
124
  .pc-content_size_l .pc-content__links,
125
+ .pc-content_size_l .pc-content__notice {
126
+ margin-top: 20px;
127
+ }
81
128
  .pc-content_size_l .pc-content__buttons {
82
129
  margin-top: 24px;
83
130
  }
@@ -10,6 +10,8 @@ function getTextSize(size) {
10
10
  switch (size) {
11
11
  case 's':
12
12
  return 's';
13
+ case 'm':
14
+ return 'sm';
13
15
  case 'l':
14
16
  default:
15
17
  return 'm';
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAChF,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAG/B,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,EAAC,eAAe,EAAC,8BAA2B;AAEnD,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CA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AAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,OAAO,EACxB,QAAQ,EAAE,YAAY,CAAC,MAAM,GAC/B,CACL,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {Buttons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport {Col} from '../../grid';\nimport {ClassNameProps, ContentBlockProps, ContentSize, TitleItemProps} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'l':\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n />\n </div>\n )}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links', {size})}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons', {size})}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
1
+ {"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAChF,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAS/B,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,EAAC,eAAe,EAAC,8BAA2B;AAEnD,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAID,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACpC,MAAM,EACF,KAAK,EACL,OAAO,EAAE,gBAAgB,EACzB,IAAI,EACJ,MAAM,EACN,cAAc,EACd,IAAI,GAAG,GAAG,EACV,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,EAAC,GAA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ons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport {Col} from '../../grid';\nimport {\n ClassNameProps,\n ContentBlockProps,\n ContentSize,\n TextSize,\n TitleItemProps,\n} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize): TextSize {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n return 'sm';\n case 'l':\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n />\n </div>\n )}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links', {size})}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons', {size})}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
@@ -17,6 +17,7 @@ const LabelColorsMapping = {
17
17
  const LabelSizeMap = {
18
18
  l: 's',
19
19
  m: 's',
20
+ sm: 's',
20
21
  s: 'xs',
21
22
  xs: 'xs',
22
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PriceDescription.js","sourceRoot":"../../../../../src","sources":["sub-blocks/PriceDetailed/PriceDescription/PriceDescription.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAC,UAAU,EAAC,qCAA4B;AAC/C,OAAO,EAAC,aAAa,EAAC,gDAAuC;AAC7D,OAAO,EAGH,eAAe,GAElB,iCAAwB;AACzB,OAAO,EAAC,KAAK,EAAC,gCAAuB;AAErC,OAAO,wBAAwB,CAAC;AAEhC,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAUrC,MAAM,kBAAkB,GAAG;IACvB,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM;IAC9B,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,SAAS;IAClC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS;IACnC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,QAAQ;IAClC,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,QAAQ;CAClC,CAAC;AAEF,MAAM,YAAY,GAAyC;IACvD,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,IAAI;IACP,EAAE,EAAE,IAAI;CACX,CAAC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AAK,EAAE,UAAU,EAAC,CAAC,YAAG,KAAK,GAAO,EACnE,cAAK,SAAS,EAAE,CAAC,CAAC,gBAAgB,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC,YAAG,aAAa,GAAO,IACjF,CACT,CAAC;IACN,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnE,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,cAAc,aAClD,YAAY,EACZ,YAAY,EACb,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC,YACrD,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAClE,IACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Label, LabelProps} from '@gravity-ui/uikit';\n\nimport {YFMWrapper} from '../../../components';\nimport {StylesContext} from '../../../context/stylesContext';\nimport {\n PriceDescriptionColor,\n PriceDescriptionProps,\n PriceLabelColor,\n TextSize,\n} from '../../../models';\nimport {block} from '../../../utils';\n\nimport './PriceDescription.scss';\n\nconst b = block('price-description');\n\ninterface PriceDescriptionExtendProps extends PriceDescriptionProps {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n colorTitle?: PriceDescriptionColor;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n className?: string;\n}\n\nconst LabelColorsMapping = {\n [PriceLabelColor.BLUE]: 'info',\n [PriceLabelColor.GREEN]: 'success',\n [PriceLabelColor.YELLOW]: 'warning',\n [PriceLabelColor.PURPLE]: 'normal',\n [PriceLabelColor.RED]: 'dnager',\n};\n\nconst LabelSizeMap: Record<TextSize, LabelProps['size']> = {\n l: 's',\n m: 's',\n s: 'xs',\n xs: 'xs',\n};\n\nconst PriceDescription = (props: PriceDescriptionExtendProps) => {\n const {\n title,\n detailedTitle = '',\n description,\n titleSize = 'l',\n descriptionSize = 'm',\n colorTitle = 'cornflower',\n label,\n labelsDefaultText,\n className,\n } = props;\n\n const descriptionRef = React.useRef<HTMLDivElement>(null);\n const {pricesDetailedDescriptionHeight, setStyles} = React.useContext(StylesContext);\n\n const setDescriptionHeight = React.useCallback(() => {\n if (!descriptionRef || !descriptionRef.current) {\n return;\n }\n\n const descriptionChildren = descriptionRef.current?.children;\n\n if (!descriptionChildren) {\n return;\n }\n\n const childrenHeight = [...descriptionChildren].reduce(\n (result: number, element: Element) => result + element.clientHeight,\n 0,\n );\n\n if (\n pricesDetailedDescriptionHeight === undefined ||\n Number(pricesDetailedDescriptionHeight) < childrenHeight\n ) {\n setStyles({pricesDetailedDescriptionHeight: childrenHeight.toString()});\n } else if (childrenHeight < Number(pricesDetailedDescriptionHeight)) {\n descriptionRef.current.style.height = `${pricesDetailedDescriptionHeight}px`;\n }\n }, [pricesDetailedDescriptionHeight, setStyles]);\n\n React.useEffect(() => {\n setDescriptionHeight();\n\n window.addEventListener('resize', setDescriptionHeight, {passive: true});\n return () => window.removeEventListener('resize', setDescriptionHeight);\n }, [setDescriptionHeight]);\n\n const labelElement = React.useMemo(() => {\n if (!label) {\n return null;\n }\n\n const labelTitle = label.text || (labelsDefaultText && labelsDefaultText[label.color]);\n const labelColor = (LabelColorsMapping[label.color] || 'unknown') as LabelProps['theme'];\n const labelSize = LabelSizeMap[label.size || descriptionSize];\n\n return (\n <Label className={b('label', {size: labelSize})} theme={labelColor} size={labelSize}>\n {labelTitle}\n </Label>\n );\n }, [descriptionSize, label, labelsDefaultText]);\n\n const titleElement = React.useMemo(() => {\n return (\n <div className={b('title', {size: titleSize})}>\n <div className={b('main-title', {color: colorTitle})}>{title}</div>\n <div className={b('detailed-title', {size: descriptionSize})}>{detailedTitle}</div>\n </div>\n );\n }, [colorTitle, descriptionSize, detailedTitle, title, titleSize]);\n\n return (\n <div className={b(null, className)} ref={descriptionRef}>\n {labelElement}\n {titleElement}\n <div className={b('description', {size: descriptionSize})}>\n <YFMWrapper content={description} modifiers={{constructor: true}} />\n </div>\n </div>\n );\n};\n\nexport default PriceDescription;\n"]}
1
+ {"version":3,"file":"PriceDescription.js","sourceRoot":"../../../../../src","sources":["sub-blocks/PriceDetailed/PriceDescription/PriceDescription.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAC,UAAU,EAAC,qCAA4B;AAC/C,OAAO,EAAC,aAAa,EAAC,gDAAuC;AAC7D,OAAO,EAGH,eAAe,GAElB,iCAAwB;AACzB,OAAO,EAAC,KAAK,EAAC,gCAAuB;AAErC,OAAO,wBAAwB,CAAC;AAEhC,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAUrC,MAAM,kBAAkB,GAAG;IACvB,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM;IAC9B,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,SAAS;IAClC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS;IACnC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,QAAQ;IAClC,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,QAAQ;CAClC,CAAC;AAEF,MAAM,YAAY,GAAyC;IACvD,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,EAAE,EAAE,GAAG;IACP,CAAC,EAAE,IAAI;IACP,EAAE,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC5D,MAAM,EACF,KAAK,EACL,aAAa,GAAG,EAAE,EAClB,WAAW,EACX,SAAS,GAAG,GAAG,EACf,eAAe,GAAG,GAAG,EACrB,UAAU,GAAG,YA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,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnE,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,cAAc,aAClD,YAAY,EACZ,YAAY,EACb,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC,YACrD,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAClE,IACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Label, LabelProps} from '@gravity-ui/uikit';\n\nimport {YFMWrapper} from '../../../components';\nimport {StylesContext} from '../../../context/stylesContext';\nimport {\n PriceDescriptionColor,\n PriceDescriptionProps,\n PriceLabelColor,\n TextSize,\n} from '../../../models';\nimport {block} from '../../../utils';\n\nimport './PriceDescription.scss';\n\nconst b = block('price-description');\n\ninterface PriceDescriptionExtendProps extends PriceDescriptionProps {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n colorTitle?: PriceDescriptionColor;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n className?: string;\n}\n\nconst LabelColorsMapping = {\n [PriceLabelColor.BLUE]: 'info',\n [PriceLabelColor.GREEN]: 'success',\n [PriceLabelColor.YELLOW]: 'warning',\n [PriceLabelColor.PURPLE]: 'normal',\n [PriceLabelColor.RED]: 'dnager',\n};\n\nconst LabelSizeMap: Record<TextSize, LabelProps['size']> = {\n l: 's',\n m: 's',\n sm: 's',\n s: 'xs',\n xs: 'xs',\n};\n\nconst PriceDescription = (props: PriceDescriptionExtendProps) => {\n const {\n title,\n detailedTitle = '',\n description,\n titleSize = 'l',\n descriptionSize = 'm',\n colorTitle = 'cornflower',\n label,\n labelsDefaultText,\n className,\n } = props;\n\n const descriptionRef = React.useRef<HTMLDivElement>(null);\n const {pricesDetailedDescriptionHeight, setStyles} = React.useContext(StylesContext);\n\n const setDescriptionHeight = React.useCallback(() => {\n if (!descriptionRef || !descriptionRef.current) {\n return;\n }\n\n const descriptionChildren = descriptionRef.current?.children;\n\n if (!descriptionChildren) {\n return;\n }\n\n const childrenHeight = [...descriptionChildren].reduce(\n (result: number, element: Element) => result + element.clientHeight,\n 0,\n );\n\n if (\n pricesDetailedDescriptionHeight === undefined ||\n Number(pricesDetailedDescriptionHeight) < childrenHeight\n ) {\n setStyles({pricesDetailedDescriptionHeight: childrenHeight.toString()});\n } else if (childrenHeight < Number(pricesDetailedDescriptionHeight)) {\n descriptionRef.current.style.height = `${pricesDetailedDescriptionHeight}px`;\n }\n }, [pricesDetailedDescriptionHeight, setStyles]);\n\n React.useEffect(() => {\n setDescriptionHeight();\n\n window.addEventListener('resize', setDescriptionHeight, {passive: true});\n return () => window.removeEventListener('resize', setDescriptionHeight);\n }, [setDescriptionHeight]);\n\n const labelElement = React.useMemo(() => {\n if (!label) {\n return null;\n }\n\n const labelTitle = label.text || (labelsDefaultText && labelsDefaultText[label.color]);\n const labelColor = (LabelColorsMapping[label.color] || 'unknown') as LabelProps['theme'];\n const labelSize = LabelSizeMap[label.size || descriptionSize];\n\n return (\n <Label className={b('label', {size: labelSize})} theme={labelColor} size={labelSize}>\n {labelTitle}\n </Label>\n );\n }, [descriptionSize, label, labelsDefaultText]);\n\n const titleElement = React.useMemo(() => {\n return (\n <div className={b('title', {size: titleSize})}>\n <div className={b('main-title', {color: colorTitle})}>{title}</div>\n <div className={b('detailed-title', {size: descriptionSize})}>{detailedTitle}</div>\n </div>\n );\n }, [colorTitle, descriptionSize, detailedTitle, title, titleSize]);\n\n return (\n <div className={b(null, className)} ref={descriptionRef}>\n {labelElement}\n {titleElement}\n <div className={b('description', {size: descriptionSize})}>\n <YFMWrapper content={description} modifiers={{constructor: true}} />\n </div>\n </div>\n );\n};\n\nexport default PriceDescription;\n"]}
@@ -47,6 +47,7 @@ export function getHeaderTag(size) {
47
47
  return 'h3';
48
48
  case 'xs':
49
49
  return 'h4';
50
+ case 'sm':
50
51
  case 'm':
51
52
  default:
52
53
  return 'h2';
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["utils/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,4BAAyB;AACzC,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAiC,oBAAoB,EAAW,2BAAkB;AAEzF,MAAM,cAAc,GAAG;IACnB,KAAK;IACL,GAAG;IACH,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,KAAK;IACL,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;CACP,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;AAEpE,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE7F,MAAM,UAAU,YAAY,CAAC,IAAc;IACvC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,IAAI;YACL,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAA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CAAC;QACP,KAAK,oBAAoB,CAAC,QAAQ;YAC9B,OAAO,qBAAqB,CAAC,iDAAiD,EAAE;gBAC5E,GAAG;aACN,CAAC,CAAC;QACP;YACI,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;YAE7C,OAAO,SAAS,CAAC;IACzB,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAW,EAAE,GAAG,UAAsC,EAAE,EAAE;IACtF,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C,IAAI,EAAE,EAAE,CAAC;QACL,MAAM,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAE5D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACjB,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import camelCase from 'lodash/camelCase';\nimport flatten from 'lodash/flatten';\n\nimport {ConstructorBlock, CustomConfig, PCShareSocialNetwork, TextSize} from '../models';\n\nconst BLOCK_ELEMENTS = [\n 'div',\n 'p',\n 'h[1-6]',\n 'address',\n 'article',\n 'aside',\n 'blockquote',\n 'canvas',\n 'dd',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'footer',\n 'header',\n 'hr',\n 'main',\n 'nav',\n 'section',\n 'video',\n 'pre',\n 'figure',\n 'form',\n 'pre',\n 'ol',\n 'ul',\n 'li',\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'tr',\n 'th',\n 'td',\n];\n\nconst BLOCK_ELEMENTS_REGEX = `<(${BLOCK_ELEMENTS.join('|')})[^>]*>`;\n\nconst QA_ATTRIBUTES_KEYS = ['container', 'content', 'wrapper', 'image', 'button', 'animate'];\n\nexport function getHeaderTag(size: TextSize) {\n switch (size) {\n case 'l':\n return 'h1';\n case 's':\n return 'h3';\n case 'xs':\n return 'h4';\n case 'm':\n default:\n return 'h2';\n }\n}\n\nexport function hasBlockTag(content: string): boolean {\n const regex = new RegExp(BLOCK_ELEMENTS_REGEX, 'g');\n return regex.test(content);\n}\n\nexport function getBlockKey(block: ConstructorBlock, index: number) {\n return `${block.type}-${index}`;\n}\n\nexport const getCustomItems = (types: (keyof CustomConfig)[], customBlocks: CustomConfig = {}) => {\n return types.reduce((result, type: keyof CustomConfig) => {\n return Object.assign(result, customBlocks[type] || {});\n }, {});\n};\n\nexport const getCustomTypes = (types: (keyof CustomConfig)[], customBlocks: CustomConfig = {}) => {\n return types.reduce((result, type: keyof CustomConfig) => {\n return result.concat(Object.keys(customBlocks[type] || {}));\n }, [] as string[]);\n};\n\nconst getShareUrlWithParams = (url: string, params: Record<string, string | undefined> = {}) => {\n const result = new URL(url);\n\n Object.entries(params).forEach(([name, value]) => {\n if (value) {\n result.searchParams.set(name, value);\n }\n });\n\n return result.toString();\n};\n\nexport const getOrderedBlocks = (blocks: ConstructorBlock[], headerBlockTypes: string[] = []) => {\n return blocks.filter(({type}) => !headerBlockTypes.includes(type));\n};\n\nexport const getHeaderBlock = (blocks: ConstructorBlock[], headerBlockTypes: string[] = []) => {\n return blocks.find(({type}) => headerBlockTypes.includes(type));\n};\n\nexport const getShareLink = (\n url: string,\n type: PCShareSocialNetwork,\n title?: string,\n text?: string,\n) => {\n // https://github.com/bradvin/social-share-urls\n switch (type) {\n case PCShareSocialNetwork.Telegram:\n return getShareUrlWithParams('https://t.me/share/url', {url, text: title});\n case PCShareSocialNetwork.Facebook:\n return getShareUrlWithParams('https://facebook.com/sharer.php', {u: url});\n case PCShareSocialNetwork.Twitter:\n return getShareUrlWithParams('https://twitter.com/intent/tweet', {\n url,\n text: title,\n });\n case PCShareSocialNetwork.Vk:\n return getShareUrlWithParams('https://vk.com/share.php', {\n url,\n title,\n comment: text,\n });\n case PCShareSocialNetwork.LinkedIn:\n return getShareUrlWithParams('https://www.linkedin.com/sharing/share-offsite/', {\n url,\n });\n default:\n // eslint-disable-next-line no-console\n console.error(`Unknown share type: ${type}`);\n\n return undefined;\n }\n};\n\nexport const getQaAttrubutes = (qa?: string, ...customKeys: (string | Array<string>)[]) => {\n const attributes: Record<string, string> = {};\n\n if (qa) {\n const keys = QA_ATTRIBUTES_KEYS.concat(flatten(customKeys));\n\n keys.forEach((key) => {\n attributes[camelCase(key)] = `${qa}-${key}`;\n });\n\n attributes.default = qa;\n }\n\n return attributes;\n};\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["utils/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,4BAAyB;AACzC,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAiC,oBAAoB,EAAW,2BAAkB;AAEzF,MAAM,cAAc,GAAG;IACnB,KAAK;IACL,GAAG;IACH,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,KAAK;IACL,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;CACP,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;AAEpE,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE7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AAE,EAAC,CAAC,EAAE,GAAG,EAAC,CAAC,CAAC;QAC9E,KAAK,oBAAoB,CAAC,OAAO;YAC7B,OAAO,qBAAqB,CAAC,kCAAkC,EAAE;gBAC7D,GAAG;gBACH,IAAI,EAAE,KAAK;aACd,CAAC,CAAC;QACP,KAAK,oBAAoB,CAAC,EAAE;YACxB,OAAO,qBAAqB,CAAC,0BAA0B,EAAE;gBACrD,GAAG;gBACH,KAAK;gBACL,OAAO,EAAE,IAAI;aAChB,CAAC,CAAC;QACP,KAAK,oBAAoB,CAAC,QAAQ;YAC9B,OAAO,qBAAqB,CAAC,iDAAiD,EAAE;gBAC5E,GAAG;aACN,CAAC,CAAC;QACP;YACI,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;YAE7C,OAAO,SAAS,CAAC;IACzB,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAW,EAAE,GAAG,UAAsC,EAAE,EAAE;IACtF,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C,IAAI,EAAE,EAAE,CAAC;QACL,MAAM,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAE5D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACjB,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import camelCase from 'lodash/camelCase';\nimport flatten from 'lodash/flatten';\n\nimport {ConstructorBlock, CustomConfig, PCShareSocialNetwork, TextSize} from '../models';\n\nconst BLOCK_ELEMENTS = [\n 'div',\n 'p',\n 'h[1-6]',\n 'address',\n 'article',\n 'aside',\n 'blockquote',\n 'canvas',\n 'dd',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'footer',\n 'header',\n 'hr',\n 'main',\n 'nav',\n 'section',\n 'video',\n 'pre',\n 'figure',\n 'form',\n 'pre',\n 'ol',\n 'ul',\n 'li',\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'tr',\n 'th',\n 'td',\n];\n\nconst BLOCK_ELEMENTS_REGEX = `<(${BLOCK_ELEMENTS.join('|')})[^>]*>`;\n\nconst QA_ATTRIBUTES_KEYS = ['container', 'content', 'wrapper', 'image', 'button', 'animate'];\n\nexport function getHeaderTag(size: TextSize) {\n switch (size) {\n case 'l':\n return 'h1';\n case 's':\n return 'h3';\n case 'xs':\n return 'h4';\n case 'sm':\n case 'm':\n default:\n return 'h2';\n }\n}\n\nexport function hasBlockTag(content: string): boolean {\n const regex = new RegExp(BLOCK_ELEMENTS_REGEX, 'g');\n return regex.test(content);\n}\n\nexport function getBlockKey(block: ConstructorBlock, index: number) {\n return `${block.type}-${index}`;\n}\n\nexport const getCustomItems = (types: (keyof CustomConfig)[], customBlocks: CustomConfig = {}) => {\n return types.reduce((result, type: keyof CustomConfig) => {\n return Object.assign(result, customBlocks[type] || {});\n }, {});\n};\n\nexport const getCustomTypes = (types: (keyof CustomConfig)[], customBlocks: CustomConfig = {}) => {\n return types.reduce((result, type: keyof CustomConfig) => {\n return result.concat(Object.keys(customBlocks[type] || {}));\n }, [] as string[]);\n};\n\nconst getShareUrlWithParams = (url: string, params: Record<string, string | undefined> = {}) => {\n const result = new URL(url);\n\n Object.entries(params).forEach(([name, value]) => {\n if (value) {\n result.searchParams.set(name, value);\n }\n });\n\n return result.toString();\n};\n\nexport const getOrderedBlocks = (blocks: ConstructorBlock[], headerBlockTypes: string[] = []) => {\n return blocks.filter(({type}) => !headerBlockTypes.includes(type));\n};\n\nexport const getHeaderBlock = (blocks: ConstructorBlock[], headerBlockTypes: string[] = []) => {\n return blocks.find(({type}) => headerBlockTypes.includes(type));\n};\n\nexport const getShareLink = (\n url: string,\n type: PCShareSocialNetwork,\n title?: string,\n text?: string,\n) => {\n // https://github.com/bradvin/social-share-urls\n switch (type) {\n case PCShareSocialNetwork.Telegram:\n return getShareUrlWithParams('https://t.me/share/url', {url, text: title});\n case PCShareSocialNetwork.Facebook:\n return getShareUrlWithParams('https://facebook.com/sharer.php', {u: url});\n case PCShareSocialNetwork.Twitter:\n return getShareUrlWithParams('https://twitter.com/intent/tweet', {\n url,\n text: title,\n });\n case PCShareSocialNetwork.Vk:\n return getShareUrlWithParams('https://vk.com/share.php', {\n url,\n title,\n comment: text,\n });\n case PCShareSocialNetwork.LinkedIn:\n return getShareUrlWithParams('https://www.linkedin.com/sharing/share-offsite/', {\n url,\n });\n default:\n // eslint-disable-next-line no-console\n console.error(`Unknown share type: ${type}`);\n\n return undefined;\n }\n};\n\nexport const getQaAttrubutes = (qa?: string, ...customKeys: (string | Array<string>)[]) => {\n const attributes: Record<string, string> = {};\n\n if (qa) {\n const keys = QA_ATTRIBUTES_KEYS.concat(flatten(customKeys));\n\n keys.forEach((key) => {\n attributes[camelCase(key)] = `${qa}-${key}`;\n });\n\n attributes.default = qa;\n }\n\n return attributes;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",