@gravity-ui/page-constructor 7.20.0-alpha.1 → 7.21.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/Media/Media.js +1 -1
- package/build/cjs/blocks/Media/Media.js.map +1 -1
- package/build/cjs/blocks/Share/Share.js +1 -3
- package/build/cjs/blocks/Share/Share.js.map +1 -1
- package/build/cjs/blocks/Slider/Slider.css +4 -1
- package/build/cjs/blocks/Slider/Slider.d.ts +4 -6
- package/build/cjs/blocks/Slider/Slider.js +7 -7
- package/build/cjs/blocks/Slider/Slider.js.map +1 -1
- package/build/cjs/blocks/Slider/useSlider.d.ts +2 -1
- package/build/cjs/blocks/Slider/useSlider.js +7 -3
- package/build/cjs/blocks/Slider/useSlider.js.map +1 -1
- package/build/cjs/blocks/Slider/useSliderPagination.d.ts +1 -1
- package/build/cjs/blocks/Slider/useSliderPagination.js.map +1 -1
- package/build/cjs/blocks/Slider/utils.d.ts +1 -1
- package/build/cjs/blocks/Slider/utils.js.map +1 -1
- package/build/cjs/blocks/Table/Table.js +4 -3
- package/build/cjs/blocks/Table/Table.js.map +1 -1
- package/build/cjs/blocks/Table/models.d.ts +5 -0
- package/build/cjs/blocks/Table/models.js +9 -0
- package/build/cjs/blocks/Table/models.js.map +1 -0
- package/build/cjs/components/CardBase/CardBase.css +3 -0
- package/build/cjs/components/Map/GoogleMap.js +13 -1
- package/build/cjs/components/Map/GoogleMap.js.map +1 -1
- package/build/cjs/components/Map/YMap/YandexMap.js +39 -2
- package/build/cjs/components/Map/YMap/YandexMap.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +7 -0
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -0
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +3 -0
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +10 -2
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js +3 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/blocks/Media/Media.js +1 -1
- package/build/esm/blocks/Media/Media.js.map +1 -1
- package/build/esm/blocks/Share/Share.js +1 -3
- package/build/esm/blocks/Share/Share.js.map +1 -1
- package/build/esm/blocks/Slider/Slider.css +4 -1
- package/build/esm/blocks/Slider/Slider.d.ts +4 -6
- package/build/esm/blocks/Slider/Slider.js +7 -7
- package/build/esm/blocks/Slider/Slider.js.map +1 -1
- package/build/esm/blocks/Slider/useSlider.d.ts +3 -2
- package/build/esm/blocks/Slider/useSlider.js +7 -3
- package/build/esm/blocks/Slider/useSlider.js.map +1 -1
- package/build/esm/blocks/Slider/useSliderPagination.d.ts +1 -1
- package/build/esm/blocks/Slider/useSliderPagination.js.map +1 -1
- package/build/esm/blocks/Slider/utils.d.ts +1 -1
- package/build/esm/blocks/Slider/utils.js.map +1 -1
- package/build/esm/blocks/Table/Table.js +4 -3
- package/build/esm/blocks/Table/Table.js.map +1 -1
- package/build/esm/blocks/Table/models.d.ts +5 -0
- package/build/esm/blocks/Table/models.js +6 -0
- package/build/esm/blocks/Table/models.js.map +1 -0
- package/build/esm/components/CardBase/CardBase.css +3 -0
- package/build/esm/components/Map/GoogleMap.js +13 -1
- package/build/esm/components/Map/GoogleMap.js.map +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js +39 -2
- package/build/esm/components/Map/YMap/YandexMap.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +1 -1
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +7 -0
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -0
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +3 -0
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +10 -2
- package/build/esm/sub-blocks/BasicCard/BasicCard.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +3 -0
- package/build/esm/sub-blocks/BasicCard/schema.js +3 -0
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/package.json +2 -4
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -1
- package/server/models/constructor-items/common.d.ts +7 -0
- package/server/models/constructor-items/sub-blocks.d.ts +1 -0
- package/styles/mixins.scss +6 -0
- package/widget/index.js +1 -1
- package/build/cjs/_vendor/swiper-modules.js +0 -1309
- package/build/cjs/_vendor/swiper-modules.js.map +0 -7
- package/build/cjs/_vendor/swiper-react.js +0 -4651
- package/build/cjs/_vendor/swiper-react.js.map +0 -7
- package/build/cjs/_vendor/swiper.js +0 -3822
- package/build/cjs/_vendor/swiper.js.map +0 -7
- package/build/cjs/node_modules/swiper/modules/a11y.css +0 -9
- package/build/cjs/node_modules/swiper/modules/autoplay.css +0 -0
- package/build/cjs/node_modules/swiper/modules/index.js +0 -1309
- package/build/cjs/node_modules/swiper/modules/pagination.css +0 -181
- package/build/cjs/node_modules/swiper/package.json +0 -14
- package/build/cjs/node_modules/swiper/swiper-react.d.ts +0 -497
- package/build/cjs/node_modules/swiper/swiper-react.js +0 -4651
- package/build/cjs/node_modules/swiper/swiper.css +0 -229
- package/build/cjs/node_modules/swiper/swiper.d.ts +0 -5
- package/build/cjs/node_modules/swiper/swiper.js +0 -3822
- package/build/cjs/node_modules/swiper/types/index.d.ts +0 -6
- package/build/cjs/node_modules/swiper/types/modules/index.d.ts +0 -53
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSlider.js","sourceRoot":"../../../../src","sources":["blocks/Slider/useSlider.tsx"],"names":[],"mappings":"AA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B,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE,UAAU;QAClB,aAAa,EAAE,iBAAiB;QAChC,WAAW;QACX,aAAa;QACb,QAAQ;QACR,WAAW;QACX,QAAQ,EAAE,eAAe,IAAI;YACzB,KAAK,EAAE,UAAU;YACjB,oBAAoB,EAAE,KAAK;SAC9B;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport type {Swiper} from 'swiper';\n\nimport {SliderType, SlidesToShow} from '../../models';\n\nimport {getSliderResponsiveParams, useMemoized} from './utils';\n\ntype UseSliderProps = React.PropsWithChildren<{\n autoplayMs?: number;\n type?: string;\n slidesToShow?: SlidesToShow;\n}>;\n\nexport const useSlider = ({children, autoplayMs, type, ...props}: UseSliderProps) => {\n const [slider, setSlider] = React.useState<Swiper>();\n const [isLocked, setIsLocked] = React.useState(false);\n const slidesToShow = useMemoized(props.slidesToShow);\n\n const childrenCount = React.Children.count(children);\n\n const autoplayEnabled = autoplayMs !== undefined && autoplayMs > 0;\n\n const breakpoints = React.useMemo(() => {\n return getSliderResponsiveParams({\n contentLength: childrenCount,\n slidesToShow,\n mobileFullscreen: Boolean(\n type && Object.values(SliderType).includes(type as SliderType),\n ),\n });\n }, [slidesToShow, type, childrenCount]);\n\n const handleNext = () => {\n if (!slider) {\n return;\n }\n\n if (slider.isEnd) {\n slider.slideTo(0);\n return;\n }\n\n slider.slideNext();\n };\n\n const handlePrev = () => {\n if (!slider) {\n return;\n }\n\n if (slider.isBeginning) {\n slider.slideTo(childrenCount - 1);\n return;\n }\n\n slider.slidePrev();\n };\n\n const handleImagesReady = React.useCallback((localSlider: Swiper) => {\n setTimeout(() => localSlider.update(), 100);\n }, []);\n\n React.useEffect(() => {\n if (!slider) {\n return;\n }\n\n if (autoplayEnabled) {\n slider.autoplay.start();\n } else {\n slider.autoplay.stop();\n }\n }, [slider, autoplayEnabled]);\n\n return {\n slider,\n onSwiper: setSlider,\n onNext: handleNext,\n onPrev: handlePrev,\n onImagesReady: handleImagesReady,\n breakpoints,\n childrenCount,\n isLocked,\n setIsLocked,\n autoplay: autoplayEnabled && {\n delay: autoplayMs,\n disableOnInteraction: false,\n },\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSliderPagination.js","sourceRoot":"../../../../src","sources":["blocks/Slider/useSliderPagination.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,mBAAgB;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAOnC,EAAsE,EAAE;IACrE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,EAAC,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAC,GACzF,KAAK,CAAC;IAEV,OAAO;QACH,UAAU,EAAE;YACR,SAAS,EAAE,IAAI;YACf,WAAW;YACX,iBAAiB;SACpB;QACD,kBAAkB,EAAE,CAAC,MAAM,EAAE,EAAE;YAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;YAExC,oBAAoB,CAAC,UAAU,EAAE;gBAC7B,IAAI,EAAE,MAAM;gBACZ,aAAa,EAAE,mBAAmB;gBAClC,YAAY,EAAE,eAAe;aAChC,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC;YAE/D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBACvB,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;gBAE9D,oBAAoB,CAAC,MAAM,EAAE;oBACzB,IAAI,EAAE,eAAe;oBACrB,aAAa,EAAE,mBAAmB;oBAClC,cAAc,EAAE,QAAQ;oBACxB,QAAQ,EAAE,eAAe;iBAC5B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"useSliderPagination.js","sourceRoot":"../../../../src","sources":["blocks/Slider/useSliderPagination.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,mBAAgB;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAOnC,EAAsE,EAAE;IACrE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,EAAC,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAC,GACzF,KAAK,CAAC;IAEV,OAAO;QACH,UAAU,EAAE;YACR,SAAS,EAAE,IAAI;YACf,WAAW;YACX,iBAAiB;SACpB;QACD,kBAAkB,EAAE,CAAC,MAAM,EAAE,EAAE;YAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;YAExC,oBAAoB,CAAC,UAAU,EAAE;gBAC7B,IAAI,EAAE,MAAM;gBACZ,aAAa,EAAE,mBAAmB;gBAClC,YAAY,EAAE,eAAe;aAChC,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC;YAE/D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBACvB,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;gBAE9D,oBAAoB,CAAC,MAAM,EAAE;oBACzB,IAAI,EAAE,eAAe;oBACrB,aAAa,EAAE,mBAAmB;oBAClC,cAAc,EAAE,QAAQ;oBACxB,QAAQ,EAAE,eAAe;iBAC5B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import {Swiper as SwiperProps} from 'swiper/swiper-react';\n\nimport {setElementAtrributes} from './utils';\n\nexport const useSliderPagination = (props: {\n enabled: boolean;\n isA11yControlHidden: boolean;\n controlTabIndex: number;\n bulletClass: string;\n bulletActiveClass: string;\n paginationLabel: string;\n}): Pick<SwiperProps, 'pagination' | 'onPaginationUpdate'> | undefined => {\n if (!props.enabled) {\n return undefined;\n }\n\n const {isA11yControlHidden, controlTabIndex, bulletClass, bulletActiveClass, paginationLabel} =\n props;\n\n return {\n pagination: {\n clickable: true,\n bulletClass,\n bulletActiveClass,\n },\n onPaginationUpdate: (slider) => {\n const pagination = slider.pagination.el;\n\n setElementAtrributes(pagination, {\n role: 'menu',\n 'aria-hidden': isA11yControlHidden,\n 'aria-label': paginationLabel,\n });\n\n const bullets = pagination.querySelectorAll(`.${bulletClass}`);\n\n bullets.forEach((bullet) => {\n const isActive = bullet.classList.contains(bulletActiveClass);\n\n setElementAtrributes(bullet, {\n role: 'menuitemradio',\n 'aria-hidden': isA11yControlHidden,\n 'aria-checked': isActive,\n tabindex: controlTabIndex,\n });\n });\n },\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"../../../../src","sources":["blocks/Slider/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,OAAO,0BAAuB;AACrC,OAAO,MAAM,yBAAsB;AAGnC,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAE5C,OAAO,EAAC,qBAAqB,EAAuC,oBAAiB;AAErF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,IAAI;CACnC,CAAC;AAQF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ACjB,gBAAgB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CACpF,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,aAAa,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAgB,EAAE,UAAmC,EAAE,EAAE,CAC1F,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE,CACtD,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CACjD,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEqual from 'lodash/isEqual';\nimport pickBy from 'lodash/pickBy';\nimport type {SwiperOptions} from 'swiper/types';\n\nimport {BREAKPOINTS} from '../../constants';\n\nimport {SliderBreakpointNames, SliderBreakpointParams, SlidesToShow} from './models';\n\nexport const DEFAULT_SLIDE_BREAKPOINTS = {\n [SliderBreakpointNames.Lg]: 3,\n [SliderBreakpointNames.Md]: 2,\n [SliderBreakpointNames.Sm]: 2,\n [SliderBreakpointNames.Xs]: 1.15,\n};\n\nexport interface GetSlidesToShowParams {\n contentLength: number;\n slidesToShow?: SlidesToShow;\n mobileFullscreen?: boolean;\n}\n\nexport function getSliderResponsiveParams({\n contentLength,\n slidesToShow,\n mobileFullscreen,\n}: GetSlidesToShowParams) {\n let result;\n\n if (typeof slidesToShow === 'number') {\n result = Object.keys(DEFAULT_SLIDE_BREAKPOINTS).reduce(\n (acc, breakpointName) => ({...acc, [breakpointName]: slidesToShow}),\n {} as SliderBreakpointParams,\n );\n } else {\n result = slidesToShow || DEFAULT_SLIDE_BREAKPOINTS;\n }\n\n const showCount = {\n ...DEFAULT_SLIDE_BREAKPOINTS,\n ...pickBy(result, (value) => !isNaN(value)),\n xs: !mobileFullscreen && contentLength > 1 ? DEFAULT_SLIDE_BREAKPOINTS.xs : 1,\n };\n\n return Object.entries(showCount).reduce(\n (res, [breakpointName, value]) => {\n // eslint-disable-next-line no-param-reassign\n res[BREAKPOINTS[breakpointName as SliderBreakpointNames] + 1] = {\n slidesPerView: value,\n };\n return res;\n },\n {} as Record<number, SwiperOptions>,\n );\n}\n\nexport const useMemoized = <T>(value: T): T => {\n const [memoizedValue, setMemoizedValue] = React.useState(value);\n\n React.useEffect(() => {\n setMemoizedValue((memoized) =>\n value && typeof value === 'object' && isEqual(memoized, value) ? memoized : value,\n );\n }, [value]);\n\n return memoizedValue;\n};\n\nexport const setElementAtrributes = (element: Element, attributes: Record<string, unknown>) =>\n Object.entries(attributes).forEach(([attribute, value]) =>\n element.setAttribute(attribute, String(value)),\n );\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"../../../../src","sources":["blocks/Slider/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,OAAO,0BAAuB;AACrC,OAAO,MAAM,yBAAsB;AAGnC,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAE5C,OAAO,EAAC,qBAAqB,EAAuC,oBAAiB;AAErF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,IAAI;CACnC,CAAC;AAQF,MAAM,UAAU,yBAAyB,CAAC,EACtC,aAAa,EACb,YAAY,EACZ,gBAAgB,GACI;IACpB,IAAI,MAAM,CAAC;IAEX,IAAI,OAAO,YAAY,KAAK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AK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CACpF,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,aAAa,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAgB,EAAE,UAAmC,EAAE,EAAE,CAC1F,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE,CACtD,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CACjD,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEqual from 'lodash/isEqual';\nimport pickBy from 'lodash/pickBy';\nimport type {SwiperOptions} from 'swiper/types/swiper-options';\n\nimport {BREAKPOINTS} from '../../constants';\n\nimport {SliderBreakpointNames, SliderBreakpointParams, SlidesToShow} from './models';\n\nexport const DEFAULT_SLIDE_BREAKPOINTS = {\n [SliderBreakpointNames.Lg]: 3,\n [SliderBreakpointNames.Md]: 2,\n [SliderBreakpointNames.Sm]: 2,\n [SliderBreakpointNames.Xs]: 1.15,\n};\n\nexport interface GetSlidesToShowParams {\n contentLength: number;\n slidesToShow?: SlidesToShow;\n mobileFullscreen?: boolean;\n}\n\nexport function getSliderResponsiveParams({\n contentLength,\n slidesToShow,\n mobileFullscreen,\n}: GetSlidesToShowParams) {\n let result;\n\n if (typeof slidesToShow === 'number') {\n result = Object.keys(DEFAULT_SLIDE_BREAKPOINTS).reduce(\n (acc, breakpointName) => ({...acc, [breakpointName]: slidesToShow}),\n {} as SliderBreakpointParams,\n );\n } else {\n result = slidesToShow || DEFAULT_SLIDE_BREAKPOINTS;\n }\n\n const showCount = {\n ...DEFAULT_SLIDE_BREAKPOINTS,\n ...pickBy(result, (value) => !isNaN(value)),\n xs: !mobileFullscreen && contentLength > 1 ? DEFAULT_SLIDE_BREAKPOINTS.xs : 1,\n };\n\n return Object.entries(showCount).reduce(\n (res, [breakpointName, value]) => {\n // eslint-disable-next-line no-param-reassign\n res[BREAKPOINTS[breakpointName as SliderBreakpointNames] + 1] = {\n slidesPerView: value,\n };\n return res;\n },\n {} as Record<number, SwiperOptions>,\n );\n}\n\nexport const useMemoized = <T>(value: T): T => {\n const [memoizedValue, setMemoizedValue] = React.useState(value);\n\n React.useEffect(() => {\n setMemoizedValue((memoized) =>\n value && typeof value === 'object' && isEqual(memoized, value) ? memoized : value,\n );\n }, [value]);\n\n return memoizedValue;\n};\n\nexport const setElementAtrributes = (element: Element, attributes: Record<string, unknown>) =>\n Object.entries(attributes).forEach(([attribute, value]) =>\n element.setAttribute(attribute, String(value)),\n );\n"]}
|
|
@@ -2,13 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Table, YFMWrapper } from "../../components/index.js";
|
|
3
3
|
import { Col, Grid, GridColumnSize, Row } from "../../grid/index.js";
|
|
4
4
|
import { block } from "../../utils/index.js";
|
|
5
|
+
import { TableMicrodataValues } from "./models.js";
|
|
5
6
|
import './Table.css';
|
|
6
7
|
const b = block('table-block');
|
|
7
8
|
export const TableBlock = (props) => {
|
|
8
9
|
const { title, table } = props;
|
|
9
|
-
return (
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
return (_jsxs("div", { className: b(), itemScope: true, itemType: TableMicrodataValues.TableType, children: [_jsx("meta", { itemProp: TableMicrodataValues.accessModeProp, content: "textual" }), _jsx(Grid, { className: b('content'), children: _jsxs(Row, { className: b('row'), children: [_jsx(Col, { sizes: { [GridColumnSize.Md]: 4, [GridColumnSize.All]: 12 }, children: _jsx(YFMWrapper, { tagName: "h2", contentClassName: b('title'), itemProp: TableMicrodataValues.AboutProp, content: title, modifiers: {
|
|
11
|
+
constructor: true,
|
|
12
|
+
} }) }), _jsx(Col, { sizes: { [GridColumnSize.Md]: 8, [GridColumnSize.All]: 12 }, children: _jsx(Table, { className: b('table'), ...table }) })] }) })] }));
|
|
12
13
|
};
|
|
13
14
|
export default TableBlock;
|
|
14
15
|
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"../../../../src","sources":["blocks/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,kCAAyB;AACnD,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAC,4BAAmB;AAE1D,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAElC,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IACjD,MAAM,EAAC,KAAK,EAAE,KAAK,EAAC,GAAG,KAAK,CAAC;IAE7B,OAAO,CACH,
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"../../../../src","sources":["blocks/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,kCAAyB;AACnD,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAC,4BAAmB;AAE1D,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAElC,OAAO,EAAC,oBAAoB,EAAC,oBAAiB;AAE9C,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IACjD,MAAM,EAAC,KAAK,EAAE,KAAK,EAAC,GAAG,KAAK,CAAC;IAE7B,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,EAAE,EAAE,SAAS,QAAC,QAAQ,EAAE,oBAAoB,CAAC,SAAS,aACnE,eAAM,QAAQ,EAAE,oBAAoB,CAAC,cAAc,EAAE,OAAO,EAAC,SAAS,GAAG,EACzE,KAAC,IAAI,IAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YACzB,MAAC,GAAG,IAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,aACpB,KAAC,GAAG,IAAC,KAAK,EAAE,EAAC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,EAAC,YAC1D,KAAC,UAAU,IACP,OAAO,EAAC,IAAI,EACZ,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,EAC5B,QAAQ,EAAE,oBAAoB,CAAC,SAAS,EACxC,OAAO,EAAE,KAAK,EACd,SAAS,EAAE;oCACP,WAAW,EAAE,IAAI;iCACpB,GACH,GACA,EACN,KAAC,GAAG,IAAC,KAAK,EAAE,EAAC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,EAAC,YAC1D,KAAC,KAAK,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,KAAM,KAAK,GAAI,GACzC,IACJ,GACH,IACL,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import {Table, YFMWrapper} from '../../components';\nimport {Col, Grid, GridColumnSize, Row} from '../../grid';\nimport {TableBlockProps} from '../../models';\nimport {block} from '../../utils';\n\nimport {TableMicrodataValues} from './models';\n\nimport './Table.scss';\n\nconst b = block('table-block');\n\nexport const TableBlock = (props: TableBlockProps) => {\n const {title, table} = props;\n\n return (\n <div className={b()} itemScope itemType={TableMicrodataValues.TableType}>\n <meta itemProp={TableMicrodataValues.accessModeProp} content=\"textual\" />\n <Grid className={b('content')}>\n <Row className={b('row')}>\n <Col sizes={{[GridColumnSize.Md]: 4, [GridColumnSize.All]: 12}}>\n <YFMWrapper\n tagName=\"h2\"\n contentClassName={b('title')}\n itemProp={TableMicrodataValues.AboutProp}\n content={title}\n modifiers={{\n constructor: true,\n }}\n />\n </Col>\n <Col sizes={{[GridColumnSize.Md]: 8, [GridColumnSize.All]: 12}}>\n <Table className={b('table')} {...table} />\n </Col>\n </Row>\n </Grid>\n </div>\n );\n};\n\nexport default TableBlock;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"../../../../src","sources":["blocks/Table/models.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,OAAO;IAClB,cAAc,EAAE,YAAY;CACtB,CAAC","sourcesContent":["export const TableMicrodataValues = {\n TableType: 'https://schema.org/Table',\n AboutProp: 'about',\n accessModeProp: 'accessMode',\n} as const;\n"]}
|
|
@@ -36,12 +36,24 @@ const GoogleMap = (props) => {
|
|
|
36
36
|
window.removeEventListener('resize', updateSize);
|
|
37
37
|
};
|
|
38
38
|
}, [forceAspectRatio, isMobile]);
|
|
39
|
+
// Generate Schema.org JSON-LD for Google Map
|
|
40
|
+
const mapMicrodataScript = React.useMemo(() => {
|
|
41
|
+
if (!address) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const json = JSON.stringify({
|
|
45
|
+
'@context': 'https://schema.org',
|
|
46
|
+
'@type': 'Place',
|
|
47
|
+
address,
|
|
48
|
+
});
|
|
49
|
+
return _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: json } });
|
|
50
|
+
}, [address]);
|
|
39
51
|
if (!apiKey || !address) {
|
|
40
52
|
return null;
|
|
41
53
|
}
|
|
42
54
|
return (_jsx("iframe", { className: b(null, className), ref: ref, style: {
|
|
43
55
|
height,
|
|
44
|
-
}, title: "Google Map", loading: "lazy", allowFullScreen: true, referrerPolicy: "no-referrer-when-downgrade", src: src }));
|
|
56
|
+
}, title: "Google Map", loading: "lazy", allowFullScreen: true, referrerPolicy: "no-referrer-when-downgrade", src: src, children: mapMicrodataScript }));
|
|
45
57
|
};
|
|
46
58
|
export default GoogleMap;
|
|
47
59
|
//# sourceMappingURL=GoogleMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMap.js","sourceRoot":"../../../../src","sources":["components/Map/GoogleMap.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,QAAQ,2BAAwB;AAEvC,OAAO,EAAC,aAAa,EAAC,qDAAkD;AACxE,OAAO,EAAC,WAAW,EAAC,iDAA8C;AAClE,OAAO,EAAC,aAAa,EAAC,6CAAoC;AAE1D,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAElC,OAAO,EAAC,YAAY,EAAC,qBAAkB;AAEvC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAUvB,SAAS,YAAY,CAAC,MAA2B;IAC7C,MAAM,EAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,GAAG,MAAM,CAAC;IAExD,OAAO,GAAG,SAAS,QAAQ,MAAM,aAAa,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,SAAS,CAC3F,OAAO,CACV,EAAE,CAAC;AACR,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,KAAgB,EAAE,EAAE;IACnC,MAAM,EAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;IAClE,MAAM,EAAC,MAAM,EAAE,SAAS,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,EAAC,IAAI,GAAG,IAAI,CAAC,EAAE,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACzD,MAAM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AC;IAEjC,6CAA6C;IAC7C,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;YACxB,UAAU,EAAE,oBAAoB;YAChC,OAAO,EAAE,OAAO;YAChB,OAAO;SACV,CAAC,CAAC;QAEH,OAAO,iBAAQ,IAAI,EAAC,qBAAqB,EAAC,uBAAuB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,GAAI,CAAC;IAC1F,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,iBACI,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAC7B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE;YACH,MAAM;SACT,EACD,KAAK,EAAC,YAAY,EAClB,OAAO,EAAC,MAAM,EACd,eAAe,QACf,cAAc,EAAC,4BAA4B,EAC3C,GAAG,EAAE,GAAG,YAEP,kBAAkB,GACd,CACZ,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Lang} from '@gravity-ui/uikit';\nimport debounce from 'lodash/debounce';\n\nimport {LocaleContext} from '../../context/localeContext/localeContext';\nimport {MapsContext} from '../../context/mapsContext/mapsContext';\nimport {MobileContext} from '../../context/mobileContext';\nimport {GMapProps} from '../../models';\nimport {block} from '../../utils';\n\nimport {getMapHeight} from './helpers';\n\nconst b = block('map');\n\ninterface GoogleMapLinkParams {\n apiKey: string;\n scriptSrc: string;\n address: string;\n lang: `${Lang}`;\n zoom?: number;\n}\n\nfunction getScriptSrc(params: GoogleMapLinkParams) {\n const {apiKey, scriptSrc, address, lang, zoom} = params;\n\n return `${scriptSrc}?key=${apiKey}&language=${lang}${zoom ? '&zoom=' + zoom : ''}&q=${encodeURI(\n address,\n )}`;\n}\n\nconst GoogleMap = (props: GMapProps) => {\n const {address, zoom, className, forceAspectRatio = true} = props;\n const {apiKey, scriptSrc} = React.useContext(MapsContext);\n const {lang = Lang.Ru} = React.useContext(LocaleContext);\n const isMobile = React.useContext(MobileContext);\n\n const [height, setHeight] = React.useState<number | undefined>(undefined);\n const ref = React.useRef<HTMLIFrameElement>(null);\n const src = React.useMemo(\n () => getScriptSrc({apiKey, scriptSrc, address, lang, zoom}),\n [apiKey, scriptSrc, address, lang, zoom],\n );\n\n React.useEffect(() => {\n if (!forceAspectRatio) {\n return;\n }\n\n const updateSize = debounce(() => {\n if (ref.current) {\n setHeight(Math.round(getMapHeight(ref.current.offsetWidth, isMobile)));\n }\n }, 100);\n\n updateSize();\n window.addEventListener('resize', updateSize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, [forceAspectRatio, isMobile]);\n\n // Generate Schema.org JSON-LD for Google Map\n const mapMicrodataScript = React.useMemo(() => {\n if (!address) {\n return null;\n }\n\n const json = JSON.stringify({\n '@context': 'https://schema.org',\n '@type': 'Place',\n address,\n });\n\n return <script type=\"application/ld+json\" dangerouslySetInnerHTML={{__html: json}} />;\n }, [address]);\n\n if (!apiKey || !address) {\n return null;\n }\n\n return (\n <iframe\n className={b(null, className)}\n ref={ref}\n style={{\n height,\n }}\n title=\"Google Map\"\n loading=\"lazy\"\n allowFullScreen\n referrerPolicy=\"no-referrer-when-downgrade\"\n src={src}\n >\n {mapMicrodataScript}\n </iframe>\n );\n};\n\nexport default GoogleMap;\n"]}
|
|
@@ -22,8 +22,27 @@ const BALLOON_DISABLING_MARKER_OPTIONS = {
|
|
|
22
22
|
cursor: 'drag',
|
|
23
23
|
interactivityModel: 'default#silent',
|
|
24
24
|
};
|
|
25
|
+
// Helper function to convert YMapMarker to Schema.org Place object
|
|
26
|
+
const markerToSchemaPlace = (marker) => {
|
|
27
|
+
return {
|
|
28
|
+
'@type': 'Place',
|
|
29
|
+
address: marker.address
|
|
30
|
+
? {
|
|
31
|
+
'@type': 'Text',
|
|
32
|
+
'@value': marker.address,
|
|
33
|
+
}
|
|
34
|
+
: undefined,
|
|
35
|
+
geo: marker.coordinate && marker.coordinate.length === 2
|
|
36
|
+
? {
|
|
37
|
+
'@type': 'GeoCoordinates',
|
|
38
|
+
latitude: marker.coordinate[0],
|
|
39
|
+
longitude: marker.coordinate[1],
|
|
40
|
+
}
|
|
41
|
+
: undefined,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
25
44
|
const YandexMap = (props) => {
|
|
26
|
-
const { markers, zoom, id, disableControls = false, disableBalloons = false, areaMargin, className, forceAspectRatio = true, } = props;
|
|
45
|
+
const { markers, zoom, id, disableControls = false, disableBalloons = false, areaMargin, copyrightPosition, className, forceAspectRatio = true, } = props;
|
|
27
46
|
const { apiKey, scriptSrc, nonce } = React.useContext(MapsContext);
|
|
28
47
|
const isMobile = React.useContext(MobileContext);
|
|
29
48
|
const { lang = 'ru' } = React.useContext(LocaleContext);
|
|
@@ -50,6 +69,7 @@ const YandexMap = (props) => {
|
|
|
50
69
|
autoFitToViewport: 'always',
|
|
51
70
|
suppressMapOpenBlock: disableControls,
|
|
52
71
|
yandexMapDisablePoiInteractivity: disableControls,
|
|
72
|
+
copyrightPosition,
|
|
53
73
|
}), ref.current));
|
|
54
74
|
});
|
|
55
75
|
setLoading(false);
|
|
@@ -64,6 +84,7 @@ const YandexMap = (props) => {
|
|
|
64
84
|
attemptsIndex,
|
|
65
85
|
setLoading,
|
|
66
86
|
disableControls,
|
|
87
|
+
copyrightPosition,
|
|
67
88
|
]);
|
|
68
89
|
React.useEffect(() => {
|
|
69
90
|
if (!forceAspectRatio) {
|
|
@@ -97,9 +118,25 @@ const YandexMap = (props) => {
|
|
|
97
118
|
showPlacemarks();
|
|
98
119
|
}
|
|
99
120
|
}, [ymap, markers, zoom, disableBalloons, areaMargin]);
|
|
121
|
+
const mapMicrodataScript = React.useMemo(() => {
|
|
122
|
+
if (!markers.length) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const places = markers
|
|
126
|
+
.filter((marker) => marker.address || marker.coordinate)
|
|
127
|
+
.map(markerToSchemaPlace);
|
|
128
|
+
if (places.length === 0) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
const json = JSON.stringify({
|
|
132
|
+
'@context': 'https://schema.org',
|
|
133
|
+
'@graph': places,
|
|
134
|
+
});
|
|
135
|
+
return _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: json } });
|
|
136
|
+
}, [markers]);
|
|
100
137
|
if (!markers)
|
|
101
138
|
return null;
|
|
102
|
-
return (_jsx(ErrorWrapper, { isError: YMapsApiLoader.status === MapApiStatus.Error, text: i18n('map-load-error'), buttonText: i18n('map-try-again'), handler: onTryAgain, className: b('wrapper'), children: _jsxs("div", { className: b('wrapper'), children: [_jsx("div", { id: containerId, className: b({ hidden: !ready }, className), ref: ref, style: { height } }), loading ? _jsx(Spin, { size: "xl", className: b('spinner') }) : null] }) }));
|
|
139
|
+
return (_jsx(ErrorWrapper, { isError: YMapsApiLoader.status === MapApiStatus.Error, text: i18n('map-load-error'), buttonText: i18n('map-try-again'), handler: onTryAgain, className: b('wrapper'), children: _jsxs("div", { className: b('wrapper'), children: [mapMicrodataScript, _jsx("div", { id: containerId, className: b({ hidden: !ready }, className), ref: ref, style: { height } }), loading ? _jsx(Spin, { size: "xl", className: b('spinner') }) : null] }) }));
|
|
103
140
|
};
|
|
104
141
|
export default YandexMap;
|
|
105
142
|
//# sourceMappingURL=YandexMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YandexMap.js","sourceRoot":"../../../../../src","sources":["components/Map/YMap/YandexMap.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B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":["import * as React from 'react';\n\nimport {Spin} from '@gravity-ui/uikit';\nimport debounce from 'lodash/debounce';\n\nimport {LocaleContext} from '../../../context/localeContext/localeContext';\nimport {MapsContext} from '../../../context/mapsContext/mapsContext';\nimport {MobileContext} from '../../../context/mobileContext';\nimport {YMapMarkerLabelPrivate, YMapMarkerPrivate, YMapProps} from '../../../models';\nimport {block} from '../../../utils';\nimport ErrorWrapper from '../../ErrorWrapper/ErrorWrapper';\nimport {getMapHeight} from '../helpers';\n\nimport {YMap} from './YMap';\nimport {MapApiStatus, YMapsApiLoader} from './YandexMapApiLoader';\nimport {i18n} from './i18n';\n\nconst b = block('map');\nconst DEFAULT_CONTAINER_ID = 'ymap';\nconst DEFAULT_ZOOM = 9;\n// Center - is a required parameter for creating a new map\n// We use this init center to create a map\n// The real center of the map will be calculated later, using the coordinates of the markers\nconst INITIAL_CENTER = [0, 0];\n\nconst BALLOON_DISABLING_MARKER_OPTIONS: YMapMarkerLabelPrivate = {\n cursor: 'drag',\n interactivityModel: 'default#silent',\n};\n\nconst YandexMap = (props: YMapProps) => {\n const {\n markers,\n zoom,\n id,\n disableControls = false,\n disableBalloons = false,\n areaMargin,\n className,\n forceAspectRatio = true,\n } = props;\n const {apiKey, scriptSrc, nonce} = React.useContext(MapsContext);\n const isMobile = React.useContext(MobileContext);\n\n const {lang = 'ru'} = React.useContext(LocaleContext);\n const containerId = `${DEFAULT_CONTAINER_ID}-${id}`;\n\n const [ymap, setYmaps] = React.useState<YMap | null>(null);\n const [height, setHeight] = React.useState<number | undefined>(undefined);\n const ref = React.useRef<HTMLDivElement>(null);\n\n const [loading, setLoading] = React.useState<boolean>(false);\n const [ready, setReady] = React.useState<boolean>(false);\n const [attemptsIndex, setAttemptsIndex] = React.useState<number>(0);\n const onTryAgain = React.useCallback(() => {\n setAttemptsIndex(attemptsIndex + 1);\n }, [attemptsIndex]);\n\n React.useEffect(() => {\n (async function () {\n setLoading(true);\n\n await YMapsApiLoader.loadApi(apiKey, scriptSrc, lang, nonce);\n\n window.ymaps?.ready(() => {\n setYmaps(\n new YMap(\n new window.ymaps.Map(\n containerId,\n {\n center: INITIAL_CENTER,\n zoom: zoom || DEFAULT_ZOOM,\n controls: disableControls ? [] : undefined,\n },\n {\n autoFitToViewport: 'always',\n suppressMapOpenBlock: disableControls,\n yandexMapDisablePoiInteractivity: disableControls,\n },\n ),\n ref.current,\n ),\n );\n });\n\n setLoading(false);\n })();\n }, [\n apiKey,\n lang,\n scriptSrc,\n containerId,\n zoom,\n nonce,\n attemptsIndex,\n setLoading,\n disableControls,\n ]);\n\n React.useEffect(() => {\n if (!forceAspectRatio) {\n return;\n }\n\n const updateSize = debounce(() => {\n if (ref.current) {\n setHeight(Math.round(getMapHeight(ref.current.offsetWidth, isMobile)));\n }\n }, 100);\n\n updateSize();\n window.addEventListener('resize', updateSize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, [isMobile, forceAspectRatio]);\n\n React.useEffect(() => {\n if (ymap) {\n // show with computed center and placemarks\n const showPlacemarks = async () => {\n const privateMarkers: YMapMarkerPrivate[] = disableBalloons\n ? markers.map(({label, ...marker}) => ({\n ...marker,\n label: {...label, ...BALLOON_DISABLING_MARKER_OPTIONS},\n }))\n : markers;\n\n await ymap.showPlacemarks({markers: privateMarkers, zoom, areaMargin});\n\n setReady(true);\n };\n\n showPlacemarks();\n }\n }, [ymap, markers, zoom, disableBalloons, areaMargin]);\n\n if (!markers) return null;\n\n return (\n <ErrorWrapper\n isError={YMapsApiLoader.status === MapApiStatus.Error}\n text={i18n('map-load-error')}\n buttonText={i18n('map-try-again')}\n handler={onTryAgain}\n className={b('wrapper')}\n >\n <div className={b('wrapper')}>\n {/* hidden - to show the map after calculating the center */}\n <div\n id={containerId}\n className={b({hidden: !ready}, className)}\n ref={ref}\n style={{height}}\n />\n {loading ? <Spin size=\"xl\" className={b('spinner')} /> : null}\n </div>\n </ErrorWrapper>\n );\n};\n\nexport default YandexM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AAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,IAC3D,GACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Spin} from '@gravity-ui/uikit';\nimport debounce from 'lodash/debounce';\n\nimport {LocaleContext} from '../../../context/localeContext/localeContext';\nimport {MapsContext} from '../../../context/mapsContext/mapsContext';\nimport {MobileContext} from '../../../context/mobileContext';\nimport {YMapMarker, YMapMarkerLabelPrivate, YMapMarkerPrivate, YMapProps} from '../../../models';\nimport {block} from '../../../utils';\nimport ErrorWrapper from '../../ErrorWrapper/ErrorWrapper';\nimport {getMapHeight} from '../helpers';\n\nimport {YMap} from './YMap';\nimport {MapApiStatus, YMapsApiLoader} from './YandexMapApiLoader';\nimport {i18n} from './i18n';\n\nconst b = block('map');\nconst DEFAULT_CONTAINER_ID = 'ymap';\nconst DEFAULT_ZOOM = 9;\n// Center - is a required parameter for creating a new map\n// We use this init center to create a map\n// The real center of the map will be calculated later, using the coordinates of the markers\nconst INITIAL_CENTER = [0, 0];\n\nconst BALLOON_DISABLING_MARKER_OPTIONS: YMapMarkerLabelPrivate = {\n cursor: 'drag',\n interactivityModel: 'default#silent',\n};\n\n// Helper function to convert YMapMarker to Schema.org Place object\nconst markerToSchemaPlace = (marker: YMapMarker) => {\n return {\n '@type': 'Place',\n address: marker.address\n ? {\n '@type': 'Text',\n '@value': marker.address,\n }\n : undefined,\n geo:\n marker.coordinate && marker.coordinate.length === 2\n ? {\n '@type': 'GeoCoordinates',\n latitude: marker.coordinate[0],\n longitude: marker.coordinate[1],\n }\n : undefined,\n };\n};\n\nconst YandexMap = (props: YMapProps) => {\n const {\n markers,\n zoom,\n id,\n disableControls = false,\n disableBalloons = false,\n areaMargin,\n copyrightPosition,\n className,\n forceAspectRatio = true,\n } = props;\n const {apiKey, scriptSrc, nonce} = React.useContext(MapsContext);\n const isMobile = React.useContext(MobileContext);\n\n const {lang = 'ru'} = React.useContext(LocaleContext);\n const containerId = `${DEFAULT_CONTAINER_ID}-${id}`;\n\n const [ymap, setYmaps] = React.useState<YMap | null>(null);\n const [height, setHeight] = React.useState<number | undefined>(undefined);\n const ref = React.useRef<HTMLDivElement>(null);\n\n const [loading, setLoading] = React.useState<boolean>(false);\n const [ready, setReady] = React.useState<boolean>(false);\n const [attemptsIndex, setAttemptsIndex] = React.useState<number>(0);\n const onTryAgain = React.useCallback(() => {\n setAttemptsIndex(attemptsIndex + 1);\n }, [attemptsIndex]);\n\n React.useEffect(() => {\n (async function () {\n setLoading(true);\n\n await YMapsApiLoader.loadApi(apiKey, scriptSrc, lang, nonce);\n\n window.ymaps?.ready(() => {\n setYmaps(\n new YMap(\n new window.ymaps.Map(\n containerId,\n {\n center: INITIAL_CENTER,\n zoom: zoom || DEFAULT_ZOOM,\n controls: disableControls ? [] : undefined,\n },\n {\n autoFitToViewport: 'always',\n suppressMapOpenBlock: disableControls,\n yandexMapDisablePoiInteractivity: disableControls,\n copyrightPosition,\n },\n ),\n ref.current,\n ),\n );\n });\n\n setLoading(false);\n })();\n }, [\n apiKey,\n lang,\n scriptSrc,\n containerId,\n zoom,\n nonce,\n attemptsIndex,\n setLoading,\n disableControls,\n copyrightPosition,\n ]);\n\n React.useEffect(() => {\n if (!forceAspectRatio) {\n return;\n }\n\n const updateSize = debounce(() => {\n if (ref.current) {\n setHeight(Math.round(getMapHeight(ref.current.offsetWidth, isMobile)));\n }\n }, 100);\n\n updateSize();\n window.addEventListener('resize', updateSize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, [isMobile, forceAspectRatio]);\n\n React.useEffect(() => {\n if (ymap) {\n // show with computed center and placemarks\n const showPlacemarks = async () => {\n const privateMarkers: YMapMarkerPrivate[] = disableBalloons\n ? markers.map(({label, ...marker}) => ({\n ...marker,\n label: {...label, ...BALLOON_DISABLING_MARKER_OPTIONS},\n }))\n : markers;\n\n await ymap.showPlacemarks({markers: privateMarkers, zoom, areaMargin});\n\n setReady(true);\n };\n\n showPlacemarks();\n }\n }, [ymap, markers, zoom, disableBalloons, areaMargin]);\n\n const mapMicrodataScript = React.useMemo(() => {\n if (!markers.length) {\n return null;\n }\n\n const places = markers\n .filter((marker) => marker.address || marker.coordinate)\n .map(markerToSchemaPlace);\n\n if (places.length === 0) {\n return null;\n }\n\n const json = JSON.stringify({\n '@context': 'https://schema.org',\n '@graph': places,\n });\n\n return <script type=\"application/ld+json\" dangerouslySetInnerHTML={{__html: json}} />;\n }, [markers]);\n\n if (!markers) return null;\n\n return (\n <ErrorWrapper\n isError={YMapsApiLoader.status === MapApiStatus.Error}\n text={i18n('map-load-error')}\n buttonText={i18n('map-try-again')}\n handler={onTryAgain}\n className={b('wrapper')}\n >\n <div className={b('wrapper')}>\n {mapMicrodataScript}\n {/* hidden - to show the map after calculating the center */}\n <div\n id={containerId}\n className={b({hidden: !ready}, className)}\n ref={ref}\n style={{height}}\n />\n {loading ? <Spin size=\"xl\" className={b('spinner')} /> : null}\n </div>\n </ErrorWrapper>\n );\n};\n\nexport default YandexMap;\n"]}
|
|
@@ -217,7 +217,7 @@ export interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {
|
|
|
217
217
|
media: ThemeSupporting<MediaProps>;
|
|
218
218
|
}
|
|
219
219
|
export interface MapBlockProps extends MediaBaseBlockProps, WithBorder {
|
|
220
|
-
map: Omit<MapProps, 'forceAspectRatio' | '
|
|
220
|
+
map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;
|
|
221
221
|
}
|
|
222
222
|
export interface InfoBlockProps {
|
|
223
223
|
theme?: TextTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA4CA,MAAM,C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AoB,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 {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' | 'areaOffset'>;\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, LoadableChildren {\n title?: TitleItemProps | string;\n description?: string;\n tags: FilterTag[];\n items: FilterItem[];\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":"AA4CA,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;AA0UD,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 {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, LoadableChildren {\n title?: TitleItemProps | string;\n description?: string;\n tags: FilterTag[];\n items: FilterItem[];\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"]}
|
|
@@ -255,11 +255,18 @@ export interface GMapProps extends MapBaseProps {
|
|
|
255
255
|
address: string;
|
|
256
256
|
}
|
|
257
257
|
export type YMapMargin = number | [vertical: number, horizontal: number] | [top: number, right: number, bottom: number, left: number];
|
|
258
|
+
export interface YMapCopyrightPosition {
|
|
259
|
+
top?: number;
|
|
260
|
+
right?: number;
|
|
261
|
+
bottom?: number;
|
|
262
|
+
left?: number;
|
|
263
|
+
}
|
|
258
264
|
export interface YMapProps extends MapBaseProps {
|
|
259
265
|
markers: YMapMarker[];
|
|
260
266
|
disableControls?: boolean;
|
|
261
267
|
disableBalloons?: boolean;
|
|
262
268
|
areaMargin?: YMapMargin;
|
|
269
|
+
copyrightPosition?: YMapCopyrightPosition;
|
|
263
270
|
id: string;
|
|
264
271
|
}
|
|
265
272
|
export interface YMapMarker {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":"AAQA,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;AAuED,SAAS;AAET,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;AACrB,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB","sourcesContent":["import * as React from 'react';\n\nimport * as icons from '@gravity-ui/icons';\nimport {ButtonView, IconData, 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';\nexport type GravityIconProps = string | {name: keyof typeof icons; color: 'brand' | 'text-color'};\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\nexport interface AriaProps {\n ariaProps?: React.AriaAttributes;\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 enum Device {\n Desktop = 'desktop',\n Mobile = 'mobile',\n Tablet = 'tablet',\n}\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n >,\n ImageDevicesVisibleProps {\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 [Device.Desktop]: string;\n [Device.Mobile]: string;\n [Device.Tablet]?: string;\n}\n\nexport interface ImageDevicesVisibleProps {\n hide?: boolean | Partial<Record<Device, boolean>>;\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 ImageDevicesVisibleProps {\n style?: React.CSSProperties;\n imageClassName?: string;\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 onVideoEnd?: () => void;\n ref?: React.Ref<HTMLVideoElement | null>;\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 extends AnalyticsEventsBase {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n size?: UikitButtonProps['size'];\n width?: UikitButtonProps['width'];\n extraProps?: UikitButtonProps['extraProps'];\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url?: string;\n position?: ButtonImagePosition;\n alt?: string;\n iconData?: IconData;\n iconSize?: number;\n className?: 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, number];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n forceAspectRatio?: boolean;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport type YMapMargin =\n | number\n | [vertical: number, horizontal: number]\n | [top: number, right: number, bottom: number, left: number];\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n disableControls?: boolean;\n disableBalloons?: boolean;\n areaMargin?: YMapMargin;\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 iconImageHref?: string;\n iconImageSize?: [number, number];\n iconImageOffset?: [number, number];\n iconImageClipRect?: [[number, number], [number, number]];\n iconLayout?: 'default#image';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n iconShape?: Record<string, any>;\n preset?: string;\n}\n\nexport interface YMapMarkerPrivate extends YMapMarker {\n label?: YMapMarkerLabelPrivate;\n}\n\nexport interface YMapMarkerLabelPrivate extends YMapMarkerLabel {\n cursor?: string;\n interactivityModel?: 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":"AAQA,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;AAuED,SAAS;AAET,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;AACrB,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB","sourcesContent":["import * as React from 'react';\n\nimport * as icons from '@gravity-ui/icons';\nimport {ButtonView, IconData, 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';\nexport type GravityIconProps = string | {name: keyof typeof icons; color: 'brand' | 'text-color'};\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\nexport interface AriaProps {\n ariaProps?: React.AriaAttributes;\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 enum Device {\n Desktop = 'desktop',\n Mobile = 'mobile',\n Tablet = 'tablet',\n}\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n >,\n ImageDevicesVisibleProps {\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 [Device.Desktop]: string;\n [Device.Mobile]: string;\n [Device.Tablet]?: string;\n}\n\nexport interface ImageDevicesVisibleProps {\n hide?: boolean | Partial<Record<Device, boolean>>;\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 ImageDevicesVisibleProps {\n style?: React.CSSProperties;\n imageClassName?: string;\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 onVideoEnd?: () => void;\n ref?: React.Ref<HTMLVideoElement | null>;\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 extends AnalyticsEventsBase {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n size?: UikitButtonProps['size'];\n width?: UikitButtonProps['width'];\n extraProps?: UikitButtonProps['extraProps'];\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url?: string;\n position?: ButtonImagePosition;\n alt?: string;\n iconData?: IconData;\n iconSize?: number;\n className?: 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, number];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n forceAspectRatio?: boolean;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport type YMapMargin =\n | number\n | [vertical: number, horizontal: number]\n | [top: number, right: number, bottom: number, left: number];\n\nexport interface YMapCopyrightPosition {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n disableControls?: boolean;\n disableBalloons?: boolean;\n areaMargin?: YMapMargin;\n copyrightPosition?: YMapCopyrightPosition;\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 iconImageHref?: string;\n iconImageSize?: [number, number];\n iconImageOffset?: [number, number];\n iconImageClipRect?: [[number, number], [number, number]];\n iconLayout?: 'default#image';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n iconShape?: Record<string, any>;\n preset?: string;\n}\n\nexport interface YMapMarkerPrivate extends YMapMarker {\n label?: YMapMarkerLabelPrivate;\n}\n\nexport interface YMapMarkerLabelPrivate extends YMapMarkerLabel {\n cursor?: string;\n interactivityModel?: 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"]}
|
|
@@ -117,6 +117,7 @@ export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, Card
|
|
|
117
117
|
gravityIcon?: ThemeSupporting<GravityIconProps>;
|
|
118
118
|
target?: string;
|
|
119
119
|
iconPosition?: IconPosition;
|
|
120
|
+
hoverBackgroundColor?: string;
|
|
120
121
|
}
|
|
121
122
|
export interface BannerCardProps {
|
|
122
123
|
title: string;
|
|
@@ -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}\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'> {\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"]}
|