@gravity-ui/page-constructor 6.0.0 → 7.0.0-beta.1
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/README.md +10 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.css +11 -6
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -5
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js.map +1 -1
- package/build/cjs/blocks/Header/Header.css +15 -10
- package/build/cjs/blocks/Header/Header.js +6 -1
- package/build/cjs/blocks/Header/Header.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.css +0 -10
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +2 -2
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +9 -1
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +43 -21
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +3 -1
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js.map +1 -1
- package/build/cjs/blocks/Share/Share.js +5 -1
- package/build/cjs/blocks/Share/Share.js.map +1 -1
- package/build/cjs/blocks/Slider/Arrow/Arrow.css +22 -21
- package/build/cjs/blocks/Slider/Arrow/Arrow.d.ts +4 -2
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/cjs/blocks/Slider/Arrow/Arrow.js.map +1 -1
- package/build/cjs/blocks/Slider/Slider.css +549 -329
- package/build/cjs/blocks/Slider/Slider.d.ts +6 -5
- package/build/cjs/blocks/Slider/Slider.js +31 -271
- package/build/cjs/blocks/Slider/Slider.js.map +1 -1
- package/build/cjs/blocks/Slider/i18n/en.json +1 -1
- package/build/cjs/blocks/Slider/i18n/ru.json +1 -1
- package/build/cjs/blocks/Slider/models.d.ts +2 -2
- package/build/cjs/blocks/Slider/models.js +1 -1
- package/build/cjs/blocks/Slider/models.js.map +1 -1
- package/build/cjs/blocks/Slider/schema.d.ts +18 -1
- package/build/cjs/blocks/Slider/schema.js +9 -0
- package/build/cjs/blocks/Slider/schema.js.map +1 -1
- package/build/{esm/blocks/SliderNew → cjs/blocks/Slider}/useSlider.d.ts +1 -0
- package/build/cjs/blocks/{SliderNew → Slider}/useSlider.js +4 -0
- package/build/cjs/blocks/Slider/useSlider.js.map +1 -0
- package/build/cjs/blocks/Slider/useSliderPagination.js.map +1 -0
- package/build/cjs/blocks/Slider/utils.d.ts +7 -28
- package/build/cjs/blocks/Slider/utils.js +27 -109
- package/build/cjs/blocks/Slider/utils.js.map +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/Arrow/Arrow.css +15 -12
- package/build/cjs/blocks/SliderOld/Arrow/Arrow.d.ts +9 -0
- package/build/cjs/blocks/SliderOld/Arrow/Arrow.js +11 -0
- package/build/cjs/blocks/SliderOld/Arrow/Arrow.js.map +1 -0
- package/build/cjs/blocks/SliderOld/SliderOld.css +703 -0
- package/build/cjs/blocks/SliderOld/SliderOld.d.ts +17 -0
- package/build/cjs/blocks/SliderOld/SliderOld.js +292 -0
- package/build/cjs/blocks/SliderOld/SliderOld.js.map +1 -0
- package/build/cjs/blocks/{SliderNew → SliderOld}/i18n/en.json +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/i18n/index.d.ts +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/i18n/index.js +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/i18n/index.js.map +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/i18n/ru.json +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/models.d.ts +2 -2
- package/build/cjs/blocks/{SliderNew → SliderOld}/models.js +1 -1
- package/build/cjs/blocks/{SliderNew → SliderOld}/models.js.map +1 -1
- package/build/{esm/blocks/SliderNew → cjs/blocks/SliderOld}/schema.d.ts +5 -21
- package/build/cjs/blocks/{SliderNew → SliderOld}/schema.js +6 -14
- package/build/cjs/blocks/SliderOld/schema.js.map +1 -0
- package/build/cjs/blocks/SliderOld/utils.d.ts +37 -0
- package/build/cjs/blocks/SliderOld/utils.js +126 -0
- package/build/cjs/blocks/SliderOld/utils.js.map +1 -0
- package/build/cjs/blocks/Table/Table.css +4 -3
- package/build/cjs/blocks/Table/Table.js +3 -1
- package/build/cjs/blocks/Table/Table.js.map +1 -1
- package/build/cjs/blocks/index.d.ts +2 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/blocks/index.js.map +1 -1
- package/build/cjs/blocks/validators.d.ts +1 -0
- package/build/cjs/blocks/validators.js +1 -0
- package/build/cjs/blocks/validators.js.map +1 -1
- package/build/cjs/components/ContentList/ContentList.css +16 -12
- package/build/cjs/components/ContentList/ContentList.js +1 -1
- package/build/cjs/components/ContentList/ContentList.js.map +1 -1
- package/build/cjs/components/FileLink/FileLink.js +8 -1
- package/build/cjs/components/FileLink/FileLink.js.map +1 -1
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +96 -18
- package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +5 -0
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +14 -2
- package/build/cjs/components/FullscreenImage/FullscreenImage.js.map +1 -1
- package/build/cjs/components/HTML/HTML.d.ts +15 -8
- package/build/cjs/components/HTML/HTML.js +15 -10
- package/build/cjs/components/HTML/HTML.js.map +1 -1
- package/build/cjs/components/Link/Link.js +11 -2
- package/build/cjs/components/Link/Link.js.map +1 -1
- package/build/cjs/components/Media/Image/Image.d.ts +1 -0
- package/build/cjs/components/Media/Image/Image.js +7 -5
- package/build/cjs/components/Media/Image/Image.js.map +1 -1
- package/build/cjs/components/Media/Media.css +4 -0
- package/build/cjs/components/Media/Media.d.ts +1 -0
- package/build/cjs/components/Media/Media.js +3 -2
- package/build/cjs/components/Media/Media.js.map +1 -1
- package/build/cjs/components/MetaInfo/MetaInfo.css +1 -1
- package/build/cjs/components/MetaInfo/MetaInfo.js +1 -1
- package/build/cjs/components/MetaInfo/MetaInfo.js.map +1 -1
- package/build/cjs/components/Table/Table.css +2 -1
- package/build/cjs/components/Table/Table.js +4 -2
- package/build/cjs/components/Table/Table.js.map +1 -1
- package/build/cjs/components/Title/TitleItem.css +15 -5
- package/build/cjs/components/Title/TitleItem.js +4 -1
- package/build/cjs/components/Title/TitleItem.js.map +1 -1
- package/build/cjs/components/YFMWrapper/YFMWrapper.d.ts +4 -2
- package/build/cjs/components/YFMWrapper/YFMWrapper.js +4 -3
- package/build/cjs/components/YFMWrapper/YFMWrapper.js.map +1 -1
- package/build/cjs/constructor-items.d.ts +2 -2
- package/build/cjs/constructor-items.js +2 -4
- package/build/cjs/constructor-items.js.map +1 -1
- package/build/cjs/editor/data/templates/{slider-new-block.json → slider-old-block.json} +2 -2
- package/build/cjs/models/common.d.ts +1 -0
- package/build/cjs/models/common.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +17 -15
- package/build/cjs/models/constructor-items/blocks.js +3 -2
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +2 -2
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/schema/constants.js +3 -1
- package/build/cjs/schema/constants.js.map +1 -1
- package/build/cjs/schema/validators/blocks.d.ts +2 -2
- package/build/cjs/schema/validators/blocks.js +2 -2
- package/build/cjs/schema/validators/blocks.js.map +1 -1
- package/build/cjs/schema/validators/common.js +1 -1
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +14 -8
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +3 -1
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js.map +1 -1
- package/build/cjs/sub-blocks/Content/Content.css +80 -31
- package/build/cjs/sub-blocks/Content/Content.js +3 -1
- package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
- package/build/cjs/sub-blocks/PriceCard/PriceCard.css +2 -1
- package/build/cjs/sub-blocks/PriceCard/PriceCard.js +1 -1
- package/build/cjs/sub-blocks/PriceCard/PriceCard.js.map +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js.map +1 -1
- package/build/cjs/sub-blocks/Quote/Quote.css +8 -4
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -1
- package/build/cjs/sub-blocks/Quote/Quote.js.map +1 -1
- package/build/cjs/text-transform/common.d.ts +4 -3
- package/build/cjs/text-transform/common.js +41 -18
- package/build/cjs/text-transform/common.js.map +1 -1
- package/build/cjs/text-transform/config.d.ts +5 -2
- package/build/cjs/text-transform/config.js +84 -43
- package/build/cjs/text-transform/config.js.map +1 -1
- package/build/cjs/text-transform/transformers.js +2 -2
- package/build/cjs/text-transform/transformers.js.map +1 -1
- package/build/cjs/utils/blocks.d.ts +10 -2
- package/build/cjs/utils/blocks.js +10 -3
- package/build/cjs/utils/blocks.js.map +1 -1
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.css +11 -6
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +4 -6
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js.map +1 -1
- package/build/esm/blocks/Header/Header.css +15 -10
- package/build/esm/blocks/Header/Header.js +7 -2
- package/build/esm/blocks/Header/Header.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/HeaderSlider.css +0 -10
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js +1 -1
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/schema.d.ts +9 -1
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +43 -21
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +4 -2
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js.map +1 -1
- package/build/esm/blocks/Share/Share.js +5 -1
- package/build/esm/blocks/Share/Share.js.map +1 -1
- package/build/esm/blocks/Slider/Arrow/Arrow.css +22 -21
- package/build/esm/blocks/Slider/Arrow/Arrow.d.ts +4 -2
- package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/esm/blocks/Slider/Arrow/Arrow.js.map +1 -1
- package/build/esm/blocks/Slider/Slider.css +549 -329
- package/build/esm/blocks/Slider/Slider.d.ts +6 -5
- package/build/esm/blocks/Slider/Slider.js +32 -272
- package/build/esm/blocks/Slider/Slider.js.map +1 -1
- package/build/esm/blocks/Slider/i18n/en.json +1 -1
- package/build/esm/blocks/Slider/i18n/ru.json +1 -1
- package/build/esm/blocks/Slider/models.d.ts +2 -2
- package/build/esm/blocks/Slider/models.js +1 -1
- package/build/esm/blocks/Slider/models.js.map +1 -1
- package/build/esm/blocks/Slider/schema.d.ts +18 -1
- package/build/esm/blocks/Slider/schema.js +9 -0
- package/build/esm/blocks/Slider/schema.js.map +1 -1
- package/build/{cjs/blocks/SliderNew → esm/blocks/Slider}/useSlider.d.ts +1 -0
- package/build/esm/blocks/{SliderNew → Slider}/useSlider.js +4 -0
- package/build/esm/blocks/Slider/useSlider.js.map +1 -0
- package/build/esm/blocks/Slider/useSliderPagination.js.map +1 -0
- package/build/esm/blocks/Slider/utils.d.ts +7 -28
- package/build/esm/blocks/Slider/utils.js +24 -103
- package/build/esm/blocks/Slider/utils.js.map +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/Arrow/Arrow.css +15 -12
- package/build/esm/blocks/SliderOld/Arrow/Arrow.d.ts +10 -0
- package/build/esm/blocks/SliderOld/Arrow/Arrow.js +9 -0
- package/build/esm/blocks/SliderOld/Arrow/Arrow.js.map +1 -0
- package/build/esm/blocks/SliderOld/SliderOld.css +703 -0
- package/build/esm/blocks/SliderOld/SliderOld.d.ts +18 -0
- package/build/esm/blocks/SliderOld/SliderOld.js +288 -0
- package/build/esm/blocks/SliderOld/SliderOld.js.map +1 -0
- package/build/esm/blocks/{SliderNew → SliderOld}/i18n/en.json +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/i18n/index.d.ts +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/i18n/index.js +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/i18n/index.js.map +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/i18n/ru.json +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/models.d.ts +2 -2
- package/build/esm/blocks/{SliderNew → SliderOld}/models.js +1 -1
- package/build/esm/blocks/{SliderNew → SliderOld}/models.js.map +1 -1
- package/build/{cjs/blocks/SliderNew → esm/blocks/SliderOld}/schema.d.ts +5 -21
- package/build/esm/blocks/{SliderNew → SliderOld}/schema.js +5 -13
- package/build/esm/blocks/SliderOld/schema.js.map +1 -0
- package/build/esm/blocks/SliderOld/utils.d.ts +37 -0
- package/build/esm/blocks/SliderOld/utils.js +116 -0
- package/build/esm/blocks/SliderOld/utils.js.map +1 -0
- package/build/esm/blocks/Table/Table.css +4 -3
- package/build/esm/blocks/Table/Table.js +4 -2
- package/build/esm/blocks/Table/Table.js.map +1 -1
- package/build/esm/blocks/index.d.ts +2 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/blocks/index.js.map +1 -1
- package/build/esm/blocks/validators.d.ts +1 -0
- package/build/esm/blocks/validators.js +1 -0
- package/build/esm/blocks/validators.js.map +1 -1
- package/build/esm/components/ContentList/ContentList.css +16 -12
- package/build/esm/components/ContentList/ContentList.js +1 -1
- package/build/esm/components/ContentList/ContentList.js.map +1 -1
- package/build/esm/components/FileLink/FileLink.js +8 -1
- package/build/esm/components/FileLink/FileLink.js.map +1 -1
- package/build/esm/components/FullscreenImage/FullscreenImage.css +96 -18
- package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +5 -0
- package/build/esm/components/FullscreenImage/FullscreenImage.js +14 -2
- package/build/esm/components/FullscreenImage/FullscreenImage.js.map +1 -1
- package/build/esm/components/HTML/HTML.d.ts +15 -8
- package/build/esm/components/HTML/HTML.js +17 -11
- package/build/esm/components/HTML/HTML.js.map +1 -1
- package/build/esm/components/Link/Link.js +12 -3
- package/build/esm/components/Link/Link.js.map +1 -1
- package/build/esm/components/Media/Image/Image.d.ts +1 -0
- package/build/esm/components/Media/Image/Image.js +7 -5
- package/build/esm/components/Media/Image/Image.js.map +1 -1
- package/build/esm/components/Media/Media.css +4 -0
- package/build/esm/components/Media/Media.d.ts +1 -0
- package/build/esm/components/Media/Media.js +3 -2
- package/build/esm/components/Media/Media.js.map +1 -1
- package/build/esm/components/MetaInfo/MetaInfo.css +1 -1
- package/build/esm/components/MetaInfo/MetaInfo.js +1 -1
- package/build/esm/components/MetaInfo/MetaInfo.js.map +1 -1
- package/build/esm/components/Table/Table.css +2 -1
- package/build/esm/components/Table/Table.js +5 -3
- package/build/esm/components/Table/Table.js.map +1 -1
- package/build/esm/components/Title/TitleItem.css +15 -5
- package/build/esm/components/Title/TitleItem.js +5 -2
- package/build/esm/components/Title/TitleItem.js.map +1 -1
- package/build/esm/components/YFMWrapper/YFMWrapper.d.ts +4 -2
- package/build/esm/components/YFMWrapper/YFMWrapper.js +5 -3
- package/build/esm/components/YFMWrapper/YFMWrapper.js.map +1 -1
- package/build/esm/constructor-items.d.ts +2 -2
- package/build/esm/constructor-items.js +3 -5
- package/build/esm/constructor-items.js.map +1 -1
- package/build/esm/editor/data/templates/{slider-new-block.json → slider-old-block.json} +2 -2
- package/build/esm/models/common.d.ts +1 -0
- package/build/esm/models/common.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +17 -15
- package/build/esm/models/constructor-items/blocks.js +3 -2
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +2 -2
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/schema/constants.js +4 -2
- package/build/esm/schema/constants.js.map +1 -1
- package/build/esm/schema/validators/blocks.d.ts +2 -2
- package/build/esm/schema/validators/blocks.js +2 -2
- package/build/esm/schema/validators/blocks.js.map +1 -1
- package/build/esm/schema/validators/common.js +1 -1
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +14 -8
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +4 -2
- package/build/esm/sub-blocks/BannerCard/BannerCard.js.map +1 -1
- package/build/esm/sub-blocks/Content/Content.css +80 -31
- package/build/esm/sub-blocks/Content/Content.js +3 -1
- package/build/esm/sub-blocks/Content/Content.js.map +1 -1
- package/build/esm/sub-blocks/PriceCard/PriceCard.css +2 -1
- package/build/esm/sub-blocks/PriceCard/PriceCard.js +2 -2
- package/build/esm/sub-blocks/PriceCard/PriceCard.js.map +1 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +1 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js.map +1 -1
- package/build/esm/sub-blocks/Quote/Quote.css +8 -4
- package/build/esm/sub-blocks/Quote/Quote.js +3 -2
- package/build/esm/sub-blocks/Quote/Quote.js.map +1 -1
- package/build/esm/text-transform/common.d.ts +4 -3
- package/build/esm/text-transform/common.js +41 -18
- package/build/esm/text-transform/common.js.map +1 -1
- package/build/esm/text-transform/config.d.ts +5 -2
- package/build/esm/text-transform/config.js +85 -44
- package/build/esm/text-transform/config.js.map +1 -1
- package/build/esm/text-transform/transformers.js +2 -2
- package/build/esm/text-transform/transformers.js.map +1 -1
- package/build/esm/utils/blocks.d.ts +10 -2
- package/build/esm/utils/blocks.js +9 -2
- package/build/esm/utils/blocks.js.map +1 -1
- package/package.json +2 -2
- package/schema/index.js +1 -1
- package/server/models/common.d.ts +1 -0
- package/server/models/constructor-items/blocks.d.ts +17 -15
- package/server/models/constructor-items/blocks.js +3 -2
- package/server/models/constructor-items/common.d.ts +2 -2
- package/server/text-transform/common.d.ts +4 -3
- package/server/text-transform/common.js +41 -18
- package/server/text-transform/config.d.ts +5 -2
- package/server/text-transform/config.js +84 -43
- package/server/text-transform/transformers.js +2 -2
- package/server/utils/blocks.d.ts +10 -2
- package/server/utils/blocks.js +10 -3
- package/styles/fonts.scss +1 -0
- package/styles/styles.css +0 -1
- package/styles/styles.scss +0 -1
- package/styles/variables.scss +1 -0
- package/widget/index.js +1 -1
- package/build/cjs/blocks/SliderNew/Arrow/Arrow.d.ts +0 -11
- package/build/cjs/blocks/SliderNew/Arrow/Arrow.js +0 -11
- package/build/cjs/blocks/SliderNew/Arrow/Arrow.js.map +0 -1
- package/build/cjs/blocks/SliderNew/Slider.css +0 -834
- package/build/cjs/blocks/SliderNew/Slider.d.ts +0 -13
- package/build/cjs/blocks/SliderNew/Slider.js +0 -49
- package/build/cjs/blocks/SliderNew/Slider.js.map +0 -1
- package/build/cjs/blocks/SliderNew/schema.js.map +0 -1
- package/build/cjs/blocks/SliderNew/useSlider.js.map +0 -1
- package/build/cjs/blocks/SliderNew/useSliderPagination.js.map +0 -1
- package/build/cjs/blocks/SliderNew/utils.d.ts +0 -16
- package/build/cjs/blocks/SliderNew/utils.js +0 -44
- package/build/cjs/blocks/SliderNew/utils.js.map +0 -1
- package/build/cjs/blocks/unstable.d.ts +0 -1
- package/build/cjs/blocks/unstable.js +0 -7
- package/build/cjs/blocks/unstable.js.map +0 -1
- package/build/esm/blocks/SliderNew/Arrow/Arrow.d.ts +0 -12
- package/build/esm/blocks/SliderNew/Arrow/Arrow.js +0 -9
- package/build/esm/blocks/SliderNew/Arrow/Arrow.js.map +0 -1
- package/build/esm/blocks/SliderNew/Slider.css +0 -834
- package/build/esm/blocks/SliderNew/Slider.d.ts +0 -14
- package/build/esm/blocks/SliderNew/Slider.js +0 -45
- package/build/esm/blocks/SliderNew/Slider.js.map +0 -1
- package/build/esm/blocks/SliderNew/schema.js.map +0 -1
- package/build/esm/blocks/SliderNew/useSlider.js.map +0 -1
- package/build/esm/blocks/SliderNew/useSliderPagination.js.map +0 -1
- package/build/esm/blocks/SliderNew/utils.d.ts +0 -16
- package/build/esm/blocks/SliderNew/utils.js +0 -37
- package/build/esm/blocks/SliderNew/utils.js.map +0 -1
- package/build/esm/blocks/unstable.d.ts +0 -1
- package/build/esm/blocks/unstable.js +0 -2
- package/build/esm/blocks/unstable.js.map +0 -1
- /package/build/cjs/blocks/{SliderNew → Slider}/useSliderPagination.d.ts +0 -0
- /package/build/cjs/blocks/{SliderNew → Slider}/useSliderPagination.js +0 -0
- /package/build/cjs/blocks/{Slider → SliderOld}/slick.css +0 -0
- /package/build/esm/blocks/{SliderNew → Slider}/useSliderPagination.d.ts +0 -0
- /package/build/esm/blocks/{SliderNew → Slider}/useSliderPagination.js +0 -0
- /package/build/esm/blocks/{Slider → SliderOld}/slick.css +0 -0
|
@@ -8,6 +8,8 @@ import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './s
|
|
|
8
8
|
export declare enum BlockType {
|
|
9
9
|
PromoFeaturesBlock = "promo-features-block",
|
|
10
10
|
ExtendedFeaturesBlock = "extended-features-block",
|
|
11
|
+
/** @deprecated */
|
|
12
|
+
SliderOldBlock = "slider-old-block",
|
|
11
13
|
SliderBlock = "slider-block",
|
|
12
14
|
QuestionsBlock = "questions-block",
|
|
13
15
|
BannerBlock = "banner-block",
|
|
@@ -24,8 +26,7 @@ export declare enum BlockType {
|
|
|
24
26
|
ShareBlock = "share-block",
|
|
25
27
|
MapBlock = "map-block",
|
|
26
28
|
FilterBlock = "filter-block",
|
|
27
|
-
FormBlock = "form-block"
|
|
28
|
-
SliderNewBlock = "slider-new-block"
|
|
29
|
+
FormBlock = "form-block"
|
|
29
30
|
}
|
|
30
31
|
export declare const BlockTypes: BlockType[];
|
|
31
32
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -62,11 +63,12 @@ export declare enum SliderBreakpointNames {
|
|
|
62
63
|
}
|
|
63
64
|
export declare enum SliderType {
|
|
64
65
|
MediaCard = "media-card",
|
|
65
|
-
HeaderCard = "header-card"
|
|
66
|
+
HeaderCard = "header-card",
|
|
67
|
+
FullscreenCard = "fullscreen-card"
|
|
66
68
|
}
|
|
67
69
|
export type SliderBreakpointParams = Record<SliderBreakpointNames, number>;
|
|
68
70
|
export type SlidesToShow = Partial<SliderBreakpointParams> | number;
|
|
69
|
-
export interface
|
|
71
|
+
export interface SliderOldProps extends Childable, Animatable, LoadableChildren {
|
|
70
72
|
dots?: boolean;
|
|
71
73
|
arrows?: boolean;
|
|
72
74
|
slidesToShow?: SlidesToShow;
|
|
@@ -80,7 +82,7 @@ export interface SliderProps extends Childable, Animatable, LoadableChildren {
|
|
|
80
82
|
randomOrder?: boolean;
|
|
81
83
|
adaptive?: boolean;
|
|
82
84
|
}
|
|
83
|
-
export interface
|
|
85
|
+
export interface SliderProps extends Childable, Animatable, LoadableChildren {
|
|
84
86
|
dots?: boolean;
|
|
85
87
|
arrows?: boolean;
|
|
86
88
|
slidesToShow?: SlidesToShow;
|
|
@@ -92,8 +94,9 @@ export interface SliderNewProps extends Childable, Animatable, LoadableChildren
|
|
|
92
94
|
description?: string;
|
|
93
95
|
autoplay?: number;
|
|
94
96
|
randomOrder?: boolean;
|
|
97
|
+
adaptive?: boolean;
|
|
95
98
|
}
|
|
96
|
-
export interface HeaderSliderBlockProps extends Omit<
|
|
99
|
+
export interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {
|
|
97
100
|
items: HeaderBlockProps[];
|
|
98
101
|
}
|
|
99
102
|
interface HeaderBackgroundProps {
|
|
@@ -356,9 +359,9 @@ export interface FormBlockProps {
|
|
|
356
359
|
export type HeaderBlockModel = {
|
|
357
360
|
type: BlockType.HeaderBlock;
|
|
358
361
|
} & HeaderBlockProps;
|
|
359
|
-
export type
|
|
360
|
-
type: BlockType.
|
|
361
|
-
} &
|
|
362
|
+
export type SliderOldBlockModel = {
|
|
363
|
+
type: BlockType.SliderOldBlock;
|
|
364
|
+
} & SliderOldProps;
|
|
362
365
|
export type ExtendedFeaturesBlockModel = {
|
|
363
366
|
type: BlockType.ExtendedFeaturesBlock;
|
|
364
367
|
} & ExtendedFeaturesProps;
|
|
@@ -410,10 +413,9 @@ export type ShareBLockModel = {
|
|
|
410
413
|
export type FormBlockModel = {
|
|
411
414
|
type: BlockType.FormBlock;
|
|
412
415
|
} & FormBlockProps;
|
|
413
|
-
export type
|
|
414
|
-
type: BlockType.
|
|
415
|
-
} &
|
|
416
|
-
type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel;
|
|
417
|
-
type
|
|
418
|
-
export type Block = (BlockModels | UnstableBlockModels) & BlockBaseProps;
|
|
416
|
+
export type SliderBlockModel = {
|
|
417
|
+
type: BlockType.SliderBlock;
|
|
418
|
+
} & SliderProps;
|
|
419
|
+
type BlockModels = SliderOldBlockModel | SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel;
|
|
420
|
+
export type Block = BlockModels & BlockBaseProps;
|
|
419
421
|
export {};
|
|
@@ -5,6 +5,8 @@ var BlockType;
|
|
|
5
5
|
(function (BlockType) {
|
|
6
6
|
BlockType["PromoFeaturesBlock"] = "promo-features-block";
|
|
7
7
|
BlockType["ExtendedFeaturesBlock"] = "extended-features-block";
|
|
8
|
+
/** @deprecated */
|
|
9
|
+
BlockType["SliderOldBlock"] = "slider-old-block";
|
|
8
10
|
BlockType["SliderBlock"] = "slider-block";
|
|
9
11
|
BlockType["QuestionsBlock"] = "questions-block";
|
|
10
12
|
BlockType["BannerBlock"] = "banner-block";
|
|
@@ -22,8 +24,6 @@ var BlockType;
|
|
|
22
24
|
BlockType["MapBlock"] = "map-block";
|
|
23
25
|
BlockType["FilterBlock"] = "filter-block";
|
|
24
26
|
BlockType["FormBlock"] = "form-block";
|
|
25
|
-
// unstable
|
|
26
|
-
BlockType["SliderNewBlock"] = "slider-new-block";
|
|
27
27
|
})(BlockType || (exports.BlockType = BlockType = {}));
|
|
28
28
|
exports.BlockTypes = Object.values(BlockType);
|
|
29
29
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -38,6 +38,7 @@ var SliderType;
|
|
|
38
38
|
(function (SliderType) {
|
|
39
39
|
SliderType["MediaCard"] = "media-card";
|
|
40
40
|
SliderType["HeaderCard"] = "header-card";
|
|
41
|
+
SliderType["FullscreenCard"] = "fullscreen-card";
|
|
41
42
|
})(SliderType || (exports.SliderType = SliderType = {}));
|
|
42
43
|
var PCShareSocialNetwork;
|
|
43
44
|
(function (PCShareSocialNetwork) {
|
|
@@ -47,7 +47,7 @@ export declare enum QuoteType {
|
|
|
47
47
|
EnglishDouble = "english-double"
|
|
48
48
|
}
|
|
49
49
|
export type TextTheme = 'light' | 'dark';
|
|
50
|
-
export type TextSize = 'xs' | 's' | 'm' | 'l';
|
|
50
|
+
export type TextSize = 'xs' | 's' | 'sm' | 'm' | 'l';
|
|
51
51
|
export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
52
52
|
export type HeaderWidth = 's' | 'm' | 'l';
|
|
53
53
|
export type HeaderImageSize = 's' | 'm';
|
|
@@ -58,7 +58,7 @@ export type LegendTableMarkerType = 'disk' | 'tick';
|
|
|
58
58
|
export type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';
|
|
59
59
|
export type MediaDirection = 'media-content' | 'content-media';
|
|
60
60
|
export type PriceDescriptionColor = 'cornflower' | 'black';
|
|
61
|
-
export type ContentSize = 's' | 'l';
|
|
61
|
+
export type ContentSize = 's' | 'm' | 'l';
|
|
62
62
|
export type ContentTextSize = 's' | 'm' | 'l';
|
|
63
63
|
export type ContentTheme = 'default' | 'dark' | 'light';
|
|
64
64
|
export type FileLinkType = 'vertical' | 'horizontal';
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { MarkdownItPluginCb } from '@diplodoc/transform/lib/plugins/typings';
|
|
2
2
|
import { Lang } from './types';
|
|
3
3
|
export type ComplexItem = {
|
|
4
|
-
[key: string]: string;
|
|
4
|
+
[key: string]: string | object;
|
|
5
5
|
};
|
|
6
6
|
export type Item = string | null | ComplexItem;
|
|
7
7
|
export type Transformer = (text: string) => string;
|
|
8
8
|
export type TransformerRaw = (lang: Lang, content: string, options: {
|
|
9
9
|
plugins: MarkdownItPluginCb[];
|
|
10
|
+
renderInline?: boolean;
|
|
10
11
|
}) => string;
|
|
11
12
|
export type Parser<T = any> = (transformer: Transformer, block: T) => T;
|
|
12
13
|
export declare const createItemsParser: (fields: string[]) => (transformer: Transformer, items: Item[]) => (string | {
|
|
13
|
-
[x: string]: string;
|
|
14
|
+
[x: string]: string | object;
|
|
14
15
|
} | null)[];
|
|
15
16
|
export declare function yfmTransformer(lang: Lang, content: string, options?: {
|
|
16
17
|
plugins?: MarkdownItPluginCb[];
|
|
17
|
-
}): string;
|
|
18
|
+
}, renderInline?: boolean): string;
|
|
18
19
|
export declare function typografTransformer(lang: Lang, content: string): string;
|
|
@@ -8,29 +8,52 @@ exports.yfmTransformer = yfmTransformer;
|
|
|
8
8
|
exports.typografTransformer = typografTransformer;
|
|
9
9
|
const plugins_1 = __importDefault(require("@diplodoc/transform/lib/plugins"));
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
|
-
const createItemsParser = (fields) => (transformer, items) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
11
|
+
const createItemsParser = (fields) => (transformer, items) => {
|
|
12
|
+
const applyTransform = (itemLocal) => typeof itemLocal === 'string' ? transformer(itemLocal) : itemLocal;
|
|
13
|
+
return items.map((item) => {
|
|
14
|
+
if (!item) {
|
|
15
|
+
return item;
|
|
16
|
+
}
|
|
17
|
+
else if (typeof item === 'string') {
|
|
18
|
+
return transformer(item);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return Object.assign(Object.assign({}, item), fields.reduce((acc, fieldName) => {
|
|
22
|
+
if (fieldName.includes('.')) {
|
|
23
|
+
const [firstProperty, secondProperty] = fieldName.split('.');
|
|
24
|
+
const root = item[firstProperty];
|
|
25
|
+
if (!root || typeof root !== 'object') {
|
|
26
|
+
return acc;
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(root)) {
|
|
29
|
+
if (!acc[firstProperty]) {
|
|
30
|
+
// eslint-disable-next-line no-param-reassign
|
|
31
|
+
acc[firstProperty] = [];
|
|
32
|
+
}
|
|
33
|
+
// eslint-disable-next-line no-param-reassign
|
|
34
|
+
acc[firstProperty] = root.map((subItem) => (Object.assign(Object.assign({}, subItem), { [secondProperty]: applyTransform(subItem[secondProperty]) })));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
// eslint-disable-next-line no-param-reassign
|
|
38
|
+
acc[firstProperty] = Object.assign(Object.assign({}, root), { [secondProperty]: applyTransform(root[secondProperty]) });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else if (item[fieldName]) {
|
|
42
|
+
// eslint-disable-next-line no-param-reassign
|
|
43
|
+
acc[fieldName] = applyTransform(item[fieldName]);
|
|
44
|
+
}
|
|
45
|
+
return acc;
|
|
46
|
+
}, {}));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
};
|
|
28
50
|
exports.createItemsParser = createItemsParser;
|
|
29
|
-
function yfmTransformer(lang, content, options = {}) {
|
|
51
|
+
function yfmTransformer(lang, content, options = {}, renderInline = false) {
|
|
30
52
|
const { plugins = [] } = options;
|
|
31
53
|
const { html } = (0, utils_1.fullTransform)(content, {
|
|
32
54
|
lang,
|
|
33
55
|
plugins: [...plugins_1.default, ...plugins],
|
|
56
|
+
renderInline,
|
|
34
57
|
});
|
|
35
58
|
return html;
|
|
36
59
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TitleItemProps } from '../models';
|
|
2
|
-
import { Parser, Transformer, TransformerRaw,
|
|
2
|
+
import { Parser, Transformer, TransformerRaw, yfmTransformer } from './common';
|
|
3
3
|
export declare const blockHeaderTransformer: ({
|
|
4
4
|
fields: string[];
|
|
5
|
-
transformer: typeof
|
|
5
|
+
transformer: typeof yfmTransformer;
|
|
6
6
|
parser: (transformer: Transformer, title: TitleItemProps | string) => string | {
|
|
7
7
|
text: string;
|
|
8
8
|
navTitle?: string;
|
|
@@ -14,15 +14,18 @@ export declare const blockHeaderTransformer: ({
|
|
|
14
14
|
custom?: string | React.ReactNode;
|
|
15
15
|
onClick?: () => void;
|
|
16
16
|
};
|
|
17
|
+
renderInline: boolean;
|
|
17
18
|
} | {
|
|
18
19
|
fields: string[];
|
|
19
20
|
transformer: typeof yfmTransformer;
|
|
20
21
|
parser?: undefined;
|
|
22
|
+
renderInline?: undefined;
|
|
21
23
|
})[];
|
|
22
24
|
interface BlockConfig {
|
|
23
25
|
transformer: TransformerRaw;
|
|
24
26
|
fields?: string[];
|
|
25
27
|
parser?: Parser;
|
|
28
|
+
renderInline?: boolean;
|
|
26
29
|
}
|
|
27
30
|
export type BlocksConfig = Record<string, BlockConfig | BlockConfig[]>;
|
|
28
31
|
export declare const config: BlocksConfig;
|
|
@@ -16,10 +16,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.config = exports.blockHeaderTransformer = void 0;
|
|
17
17
|
const models_1 = require("../models");
|
|
18
18
|
const common_1 = require("./common");
|
|
19
|
-
function
|
|
19
|
+
function parseTableBlockLegend(transformer, content) {
|
|
20
20
|
const legend = content === null || content === void 0 ? void 0 : content.legend;
|
|
21
21
|
return Object.assign(Object.assign({}, (content || {})), { legend: legend && legend.map((string) => transformer(string)) });
|
|
22
22
|
}
|
|
23
|
+
function parseTableBlockContent(transformer, content) {
|
|
24
|
+
const legend = content === null || content === void 0 ? void 0 : content.legend;
|
|
25
|
+
const tableContent = content === null || content === void 0 ? void 0 : content.content;
|
|
26
|
+
return Object.assign(Object.assign({}, (content || {})), { content: tableContent &&
|
|
27
|
+
tableContent.map((row, i) => row.map((cell, j) => {
|
|
28
|
+
if (legend) {
|
|
29
|
+
if (i === 0 || j === 0) {
|
|
30
|
+
return transformer(cell);
|
|
31
|
+
}
|
|
32
|
+
return cell;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return transformer(cell);
|
|
36
|
+
}
|
|
37
|
+
})) });
|
|
38
|
+
}
|
|
23
39
|
function parseFeatures(transformer, items) {
|
|
24
40
|
return items.map((_a) => {
|
|
25
41
|
var { title, text } = _a, rest = __rest(_a, ["title", "text"]);
|
|
@@ -94,8 +110,9 @@ function parseContentLayoutTitle(transformer, content) {
|
|
|
94
110
|
exports.blockHeaderTransformer = [
|
|
95
111
|
{
|
|
96
112
|
fields: ['title'],
|
|
97
|
-
transformer: common_1.
|
|
113
|
+
transformer: common_1.yfmTransformer,
|
|
98
114
|
parser: parseTitle,
|
|
115
|
+
renderInline: true,
|
|
99
116
|
},
|
|
100
117
|
{
|
|
101
118
|
fields: ['description'],
|
|
@@ -106,7 +123,8 @@ exports.config = {
|
|
|
106
123
|
[models_1.SubBlockType.BasicCard]: [
|
|
107
124
|
{
|
|
108
125
|
fields: ['title'],
|
|
109
|
-
transformer: common_1.
|
|
126
|
+
transformer: common_1.yfmTransformer,
|
|
127
|
+
renderInline: true,
|
|
110
128
|
},
|
|
111
129
|
{
|
|
112
130
|
fields: ['text', 'additionalInfo'],
|
|
@@ -115,22 +133,16 @@ exports.config = {
|
|
|
115
133
|
],
|
|
116
134
|
[models_1.SubBlockType.BackgroundCard]: [
|
|
117
135
|
{
|
|
118
|
-
fields: ['text', 'additionalInfo'],
|
|
136
|
+
fields: ['title', 'text', 'additionalInfo'],
|
|
119
137
|
transformer: common_1.yfmTransformer,
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
fields: ['title'],
|
|
123
|
-
transformer: common_1.typografTransformer,
|
|
138
|
+
renderInline: true,
|
|
124
139
|
},
|
|
125
140
|
],
|
|
126
141
|
[models_1.SubBlockType.ImageCard]: [
|
|
127
142
|
{
|
|
128
|
-
fields: ['text', 'additionalInfo'],
|
|
143
|
+
fields: ['title', 'text', 'additionalInfo'],
|
|
129
144
|
transformer: common_1.yfmTransformer,
|
|
130
|
-
|
|
131
|
-
{
|
|
132
|
-
fields: ['title'],
|
|
133
|
-
transformer: common_1.typografTransformer,
|
|
145
|
+
renderInline: true,
|
|
134
146
|
},
|
|
135
147
|
],
|
|
136
148
|
[models_1.SubBlockType.LayoutItem]: [
|
|
@@ -142,7 +154,8 @@ exports.config = {
|
|
|
142
154
|
{
|
|
143
155
|
fields: ['content'],
|
|
144
156
|
parser: parseContentLayoutTitle,
|
|
145
|
-
transformer: common_1.
|
|
157
|
+
transformer: common_1.yfmTransformer,
|
|
158
|
+
renderInline: true,
|
|
146
159
|
},
|
|
147
160
|
{
|
|
148
161
|
fields: ['metaInfo'],
|
|
@@ -152,26 +165,30 @@ exports.config = {
|
|
|
152
165
|
],
|
|
153
166
|
[models_1.SubBlockType.Quote]: [
|
|
154
167
|
{
|
|
155
|
-
fields: ['text'],
|
|
156
|
-
transformer: common_1.typografTransformer,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
fields: ['yfmText'],
|
|
168
|
+
fields: ['text', 'yfmText'],
|
|
160
169
|
transformer: common_1.yfmTransformer,
|
|
170
|
+
renderInline: true,
|
|
161
171
|
},
|
|
162
172
|
],
|
|
163
173
|
[models_1.BlockType.ExtendedFeaturesBlock]: [
|
|
164
174
|
...exports.blockHeaderTransformer,
|
|
165
175
|
{
|
|
166
176
|
fields: ['items'],
|
|
167
|
-
transformer: common_1.
|
|
177
|
+
transformer: common_1.yfmTransformer,
|
|
168
178
|
parser: (0, common_1.createItemsParser)(['title']),
|
|
179
|
+
renderInline: true,
|
|
169
180
|
},
|
|
170
181
|
{
|
|
171
182
|
fields: ['items'],
|
|
172
183
|
transformer: common_1.yfmTransformer,
|
|
173
184
|
parser: (0, common_1.createItemsParser)(['text', 'additionalInfo']),
|
|
174
185
|
},
|
|
186
|
+
{
|
|
187
|
+
fields: ['items'],
|
|
188
|
+
transformer: common_1.yfmTransformer,
|
|
189
|
+
parser: (0, common_1.createItemsParser)(['list.text']),
|
|
190
|
+
renderInline: true,
|
|
191
|
+
},
|
|
175
192
|
],
|
|
176
193
|
[models_1.BlockType.PromoFeaturesBlock]: [
|
|
177
194
|
...exports.blockHeaderTransformer,
|
|
@@ -181,16 +198,14 @@ exports.config = {
|
|
|
181
198
|
parser: parsePromoFeatures,
|
|
182
199
|
},
|
|
183
200
|
],
|
|
201
|
+
[models_1.BlockType.SliderOldBlock]: exports.blockHeaderTransformer,
|
|
184
202
|
[models_1.BlockType.SliderBlock]: exports.blockHeaderTransformer,
|
|
185
203
|
[models_1.BlockType.CompaniesBlock]: exports.blockHeaderTransformer,
|
|
186
204
|
[models_1.BlockType.QuestionsBlock]: [
|
|
187
205
|
{
|
|
188
|
-
fields: ['title'],
|
|
189
|
-
transformer: common_1.typografTransformer,
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
fields: ['text', 'additionalInfo'],
|
|
206
|
+
fields: ['title', 'text', 'additionalInfo'],
|
|
193
207
|
transformer: common_1.yfmTransformer,
|
|
208
|
+
renderInline: true,
|
|
194
209
|
},
|
|
195
210
|
{
|
|
196
211
|
fields: ['items'],
|
|
@@ -201,7 +216,8 @@ exports.config = {
|
|
|
201
216
|
[models_1.BlockType.BannerBlock]: [
|
|
202
217
|
{
|
|
203
218
|
fields: ['title'],
|
|
204
|
-
transformer: common_1.
|
|
219
|
+
transformer: common_1.yfmTransformer,
|
|
220
|
+
renderInline: true,
|
|
205
221
|
},
|
|
206
222
|
{
|
|
207
223
|
fields: ['subtitle'],
|
|
@@ -211,7 +227,8 @@ exports.config = {
|
|
|
211
227
|
[models_1.SubBlockType.BannerCard]: [
|
|
212
228
|
{
|
|
213
229
|
fields: ['title'],
|
|
214
|
-
transformer: common_1.
|
|
230
|
+
transformer: common_1.yfmTransformer,
|
|
231
|
+
renderInline: true,
|
|
215
232
|
},
|
|
216
233
|
{
|
|
217
234
|
fields: ['subtitle'],
|
|
@@ -221,7 +238,7 @@ exports.config = {
|
|
|
221
238
|
[models_1.BlockType.MediaBlock]: [
|
|
222
239
|
...exports.blockHeaderTransformer,
|
|
223
240
|
{
|
|
224
|
-
fields: ['
|
|
241
|
+
fields: ['additionalInfo'],
|
|
225
242
|
transformer: common_1.yfmTransformer,
|
|
226
243
|
},
|
|
227
244
|
{
|
|
@@ -246,27 +263,35 @@ exports.config = {
|
|
|
246
263
|
},
|
|
247
264
|
{
|
|
248
265
|
fields: ['items'],
|
|
249
|
-
transformer: common_1.
|
|
266
|
+
transformer: common_1.yfmTransformer,
|
|
250
267
|
parser: parseItemsTitle,
|
|
268
|
+
renderInline: true,
|
|
251
269
|
},
|
|
252
270
|
],
|
|
253
271
|
[models_1.BlockType.TableBlock]: [
|
|
272
|
+
{
|
|
273
|
+
fields: ['title'],
|
|
274
|
+
transformer: common_1.yfmTransformer,
|
|
275
|
+
renderInline: true,
|
|
276
|
+
},
|
|
254
277
|
{
|
|
255
278
|
fields: ['table'],
|
|
256
279
|
transformer: common_1.yfmTransformer,
|
|
257
|
-
parser:
|
|
280
|
+
parser: parseTableBlockLegend,
|
|
258
281
|
},
|
|
259
|
-
],
|
|
260
|
-
[models_1.BlockType.HeaderSliderBlock]: [
|
|
261
282
|
{
|
|
262
|
-
fields: ['
|
|
263
|
-
transformer: common_1.
|
|
264
|
-
parser:
|
|
283
|
+
fields: ['table'],
|
|
284
|
+
transformer: common_1.yfmTransformer,
|
|
285
|
+
parser: parseTableBlockContent,
|
|
286
|
+
renderInline: true,
|
|
265
287
|
},
|
|
288
|
+
],
|
|
289
|
+
[models_1.BlockType.HeaderSliderBlock]: [
|
|
266
290
|
{
|
|
267
291
|
fields: ['items'],
|
|
268
292
|
transformer: common_1.yfmTransformer,
|
|
269
|
-
parser: (0, common_1.createItemsParser)(['description']),
|
|
293
|
+
parser: (0, common_1.createItemsParser)(['title', 'overtitle', 'description']),
|
|
294
|
+
renderInline: true,
|
|
270
295
|
},
|
|
271
296
|
],
|
|
272
297
|
[models_1.SubBlockType.PriceDetailed]: [
|
|
@@ -280,6 +305,11 @@ exports.config = {
|
|
|
280
305
|
fields: ['description'],
|
|
281
306
|
transformer: common_1.yfmTransformer,
|
|
282
307
|
},
|
|
308
|
+
{
|
|
309
|
+
fields: ['overtitle', 'title'],
|
|
310
|
+
transformer: common_1.yfmTransformer,
|
|
311
|
+
renderInline: true,
|
|
312
|
+
},
|
|
283
313
|
],
|
|
284
314
|
[models_1.BlockType.ContentLayoutBlock]: [
|
|
285
315
|
{
|
|
@@ -289,8 +319,9 @@ exports.config = {
|
|
|
289
319
|
},
|
|
290
320
|
{
|
|
291
321
|
fields: ['textContent'],
|
|
292
|
-
transformer: common_1.
|
|
322
|
+
transformer: common_1.yfmTransformer,
|
|
293
323
|
parser: parseContentLayoutTitle,
|
|
324
|
+
renderInline: true,
|
|
294
325
|
},
|
|
295
326
|
],
|
|
296
327
|
[models_1.SubBlockType.Content]: [
|
|
@@ -300,8 +331,9 @@ exports.config = {
|
|
|
300
331
|
},
|
|
301
332
|
{
|
|
302
333
|
fields: ['title'],
|
|
303
|
-
transformer: common_1.
|
|
334
|
+
transformer: common_1.yfmTransformer,
|
|
304
335
|
parser: parseTitle,
|
|
336
|
+
renderInline: true,
|
|
305
337
|
},
|
|
306
338
|
{
|
|
307
339
|
fields: ['list'],
|
|
@@ -310,6 +342,11 @@ exports.config = {
|
|
|
310
342
|
},
|
|
311
343
|
],
|
|
312
344
|
[models_1.BlockType.InfoBlock]: [
|
|
345
|
+
{
|
|
346
|
+
fields: ['title'],
|
|
347
|
+
transformer: common_1.yfmTransformer,
|
|
348
|
+
renderInline: true,
|
|
349
|
+
},
|
|
313
350
|
{
|
|
314
351
|
fields: ['rightContent', 'leftContent'],
|
|
315
352
|
transformer: common_1.yfmTransformer,
|
|
@@ -317,14 +354,16 @@ exports.config = {
|
|
|
317
354
|
},
|
|
318
355
|
{
|
|
319
356
|
fields: ['rightContent', 'leftContent'],
|
|
320
|
-
transformer: common_1.
|
|
357
|
+
transformer: common_1.yfmTransformer,
|
|
321
358
|
parser: parseContentLayoutTitle,
|
|
359
|
+
renderInline: true,
|
|
322
360
|
},
|
|
323
361
|
],
|
|
324
362
|
[models_1.BlockType.ShareBlock]: [
|
|
325
363
|
{
|
|
326
364
|
fields: ['title'],
|
|
327
|
-
transformer: common_1.
|
|
365
|
+
transformer: common_1.yfmTransformer,
|
|
366
|
+
renderInline: true,
|
|
328
367
|
},
|
|
329
368
|
],
|
|
330
369
|
[models_1.BlockType.CardLayoutBlock]: exports.blockHeaderTransformer,
|
|
@@ -333,12 +372,13 @@ exports.config = {
|
|
|
333
372
|
[models_1.SubBlockType.PriceCard]: [
|
|
334
373
|
{
|
|
335
374
|
fields: ['title'],
|
|
336
|
-
transformer: common_1.
|
|
375
|
+
transformer: common_1.yfmTransformer,
|
|
376
|
+
renderInline: true,
|
|
337
377
|
},
|
|
338
378
|
{
|
|
339
379
|
fields: ['list'],
|
|
340
380
|
transformer: common_1.yfmTransformer,
|
|
341
|
-
parser: (0, common_1.createItemsParser)(['text']),
|
|
381
|
+
parser: (0, common_1.createItemsParser)(['title', 'text']),
|
|
342
382
|
},
|
|
343
383
|
],
|
|
344
384
|
[models_1.BlockType.FormBlock]: [
|
|
@@ -349,8 +389,9 @@ exports.config = {
|
|
|
349
389
|
},
|
|
350
390
|
{
|
|
351
391
|
fields: ['textContent'],
|
|
352
|
-
transformer: common_1.
|
|
392
|
+
transformer: common_1.yfmTransformer,
|
|
353
393
|
parser: parseContentLayoutTitle,
|
|
394
|
+
renderInline: true,
|
|
354
395
|
},
|
|
355
396
|
],
|
|
356
397
|
};
|
|
@@ -24,10 +24,10 @@ function transformBlock(lang, blocksConfig, block, plugins) {
|
|
|
24
24
|
if (blockConfig) {
|
|
25
25
|
const configs = Array.isArray(blockConfig) ? blockConfig : [blockConfig];
|
|
26
26
|
configs.forEach((transformConfig) => {
|
|
27
|
-
const { fields, transformer: transformerRaw, parser } = transformConfig;
|
|
27
|
+
const { fields, transformer: transformerRaw, parser, renderInline } = transformConfig;
|
|
28
28
|
const transformer = (content) =>
|
|
29
29
|
// eslint-disable-next-line no-useless-call
|
|
30
|
-
transformerRaw.call(null, lang, content, { plugins });
|
|
30
|
+
transformerRaw.call(null, lang, content, { plugins, renderInline });
|
|
31
31
|
if (fields) {
|
|
32
32
|
fields.forEach((field) => {
|
|
33
33
|
if (block[field]) {
|
package/server/utils/blocks.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ConstructorBlock, CustomConfig, PCShareSocialNetwork, TagName, TextSize } from '../models';
|
|
2
3
|
export declare function getHeaderTag(size: TextSize): "h1" | "h3" | "h4" | "h2";
|
|
3
|
-
|
|
4
|
+
type SelectVariantArgs = {
|
|
5
|
+
block?: boolean;
|
|
6
|
+
content?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
tagName?: TagName;
|
|
9
|
+
};
|
|
10
|
+
export declare function selectTagName({ content, children, tagName }: SelectVariantArgs): string;
|
|
4
11
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
12
|
export declare const getCustomItems: (types: (keyof CustomConfig)[], customBlocks?: CustomConfig) => {};
|
|
6
13
|
export declare const getCustomTypes: (types: (keyof CustomConfig)[], customBlocks?: CustomConfig) => string[];
|
|
@@ -8,3 +15,4 @@ export declare const getOrderedBlocks: (blocks: ConstructorBlock[], headerBlockT
|
|
|
8
15
|
export declare const getHeaderBlock: (blocks: ConstructorBlock[], headerBlockTypes?: string[]) => ConstructorBlock | undefined;
|
|
9
16
|
export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
|
|
10
17
|
export declare const getQaAttrubutes: (qa?: string, ...customKeys: (string | Array<string>)[]) => Record<string, string>;
|
|
18
|
+
export {};
|
package/server/utils/blocks.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getQaAttrubutes = exports.getShareLink = exports.getHeaderBlock = exports.getOrderedBlocks = exports.getCustomTypes = exports.getCustomItems = void 0;
|
|
7
7
|
exports.getHeaderTag = getHeaderTag;
|
|
8
|
-
exports.
|
|
8
|
+
exports.selectTagName = selectTagName;
|
|
9
9
|
exports.getBlockKey = getBlockKey;
|
|
10
10
|
const camelCase_1 = __importDefault(require("lodash/camelCase"));
|
|
11
11
|
const flatten_1 = __importDefault(require("lodash/flatten"));
|
|
@@ -56,14 +56,21 @@ function getHeaderTag(size) {
|
|
|
56
56
|
return 'h3';
|
|
57
57
|
case 'xs':
|
|
58
58
|
return 'h4';
|
|
59
|
+
case 'sm':
|
|
59
60
|
case 'm':
|
|
60
61
|
default:
|
|
61
62
|
return 'h2';
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function selectTagName({ content, children, tagName }) {
|
|
66
|
+
if (!children && tagName) {
|
|
67
|
+
return tagName;
|
|
68
|
+
}
|
|
69
|
+
if (!content) {
|
|
70
|
+
return 'span';
|
|
71
|
+
}
|
|
65
72
|
const regex = new RegExp(BLOCK_ELEMENTS_REGEX, 'g');
|
|
66
|
-
return regex.test(content);
|
|
73
|
+
return regex.test(content) ? 'div' : 'span';
|
|
67
74
|
}
|
|
68
75
|
function getBlockKey(block, index) {
|
|
69
76
|
return `${block.type}-${index}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '@gravity-ui/uikit/styles/fonts.css';
|
package/styles/styles.css
CHANGED
package/styles/styles.scss
CHANGED
package/styles/variables.scss
CHANGED
package/widget/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "(self.webpackChunk_gravity_ui_page_constructor=self.webpackChunk_gravity_ui_page_constructor||[]).push([[
|
|
1
|
+
export default "(self.webpackChunk_gravity_ui_page_constructor=self.webpackChunk_gravity_ui_page_constructor||[]).push([[2009],{32009:function(_,t,e){_.exports=function(_){\"use strict\";function t(_){return _&&\"object\"==typeof _&&\"default\"in _?_:{default:_}}var e=t(_),Y={name:\"zh\",weekdays:\"星期日_星期一_星期二_星期三_星期四_星期五_星期六\".split(\"_\"),weekdaysShort:\"周日_周一_周二_周三_周四_周五_周六\".split(\"_\"),weekdaysMin:\"日_一_二_三_四_五_六\".split(\"_\"),months:\"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月\".split(\"_\"),monthsShort:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),ordinal:function(_,t){return\"W\"===t?_+\"周\":_+\"日\"},weekStart:1,yearStart:4,formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY/MM/DD\",LL:\"YYYY年M月D日\",LLL:\"YYYY年M月D日Ah点mm分\",LLLL:\"YYYY年M月D日ddddAh点mm分\",l:\"YYYY/M/D\",ll:\"YYYY年M月D日\",lll:\"YYYY年M月D日 HH:mm\",llll:\"YYYY年M月D日dddd HH:mm\"},relativeTime:{future:\"%s后\",past:\"%s前\",s:\"几秒\",m:\"1 分钟\",mm:\"%d 分钟\",h:\"1 小时\",hh:\"%d 小时\",d:\"1 天\",dd:\"%d 天\",M:\"1 个月\",MM:\"%d 个月\",y:\"1 年\",yy:\"%d 年\"},meridiem:function(_,t){var e=100*_+t;return e<600?\"凌晨\":e<900?\"早上\":e<1100?\"上午\":e<1300?\"中午\":e<1800?\"下午\":\"晚上\"}};return e.default.locale(Y,null,!0),Y}(e(27484))}}]);";
|