@gravity-ui/page-constructor 6.0.1-beta.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
- package/build/cjs/blocks/CardLayout/CardLayout.js.map +1 -1
- package/build/cjs/blocks/Form/schema.js +1 -1
- package/build/cjs/blocks/Form/schema.js.map +1 -1
- package/build/cjs/blocks/Header/Header.css +6 -0
- package/build/cjs/blocks/Header/Header.js +10 -4
- package/build/cjs/blocks/Header/Header.js.map +1 -1
- package/build/cjs/blocks/Header/schema.d.ts +6 -0
- package/build/cjs/blocks/Header/schema.js +3 -0
- package/build/cjs/blocks/Header/schema.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/HeaderSlider/schema.js +1 -1
- package/build/cjs/blocks/HeaderSlider/schema.js.map +1 -1
- package/build/cjs/blocks/Info/schema.js +1 -1
- package/build/cjs/blocks/Info/schema.js.map +1 -1
- package/build/cjs/blocks/Media/schema.js +1 -1
- package/build/cjs/blocks/Media/schema.js.map +1 -1
- package/build/cjs/blocks/Questions/schema.js +1 -1
- package/build/cjs/blocks/Questions/schema.js.map +1 -1
- package/build/cjs/blocks/Slider/Slider.js +3 -3
- package/build/cjs/blocks/Slider/Slider.js.map +1 -1
- package/build/cjs/blocks/Slider/utils.js +1 -1
- package/build/cjs/blocks/Slider/utils.js.map +1 -1
- package/build/cjs/blocks/SliderNew/Slider.d.ts +1 -1
- package/build/cjs/blocks/SliderNew/Slider.js +13 -2
- package/build/cjs/blocks/SliderNew/Slider.js.map +1 -1
- package/build/cjs/blocks/SliderNew/utils.js +2 -2
- package/build/cjs/blocks/SliderNew/utils.js.map +1 -1
- package/build/cjs/blocks/Tabs/schema.js +1 -1
- package/build/cjs/blocks/Tabs/schema.js.map +1 -1
- package/build/cjs/components/BackLink/BackLink.js +5 -2
- package/build/cjs/components/BackLink/BackLink.js.map +1 -1
- package/build/cjs/components/BalancedMasonry/BalancedMasonry.js +3 -3
- package/build/cjs/components/BalancedMasonry/BalancedMasonry.js.map +1 -1
- package/build/cjs/components/BrandFooter/BrandFooter.css +21 -17
- package/build/cjs/components/BrandFooter/BrandFooter.js +1 -1
- package/build/cjs/components/BrandFooter/BrandFooter.js.map +1 -1
- package/build/cjs/components/Button/Button.js +2 -3
- package/build/cjs/components/Button/Button.js.map +1 -1
- package/build/cjs/components/CardBase/CardBase.css +1 -0
- package/build/cjs/components/ContentList/ContentList.css +7 -7
- package/build/cjs/components/FileLink/FileLink.js +8 -1
- package/build/cjs/components/FileLink/FileLink.js.map +1 -1
- package/build/cjs/components/FullWidthBackground/FullWidthBackground.js +1 -1
- package/build/cjs/components/FullWidthBackground/FullWidthBackground.js.map +1 -1
- package/build/cjs/components/ImageBase/ImageBase.js +1 -1
- package/build/cjs/components/ImageBase/ImageBase.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/Map/GoogleMap.js +1 -1
- package/build/cjs/components/Map/GoogleMap.js.map +1 -1
- package/build/cjs/components/Map/YMap/YandexMap.js +1 -1
- package/build/cjs/components/Map/YMap/YandexMap.js.map +1 -1
- package/build/cjs/components/Media/Image/Image.js +1 -1
- package/build/cjs/components/Media/Image/Image.js.map +1 -1
- package/build/cjs/components/OutsideClick/OutsideClick.js +1 -1
- package/build/cjs/components/OutsideClick/OutsideClick.js.map +1 -1
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +1 -1
- package/build/cjs/components/OverflowScroller/OverflowScroller.js.map +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.js.map +1 -1
- package/build/cjs/components/Title/TitleItem.css +8 -1
- package/build/cjs/components/Title/TitleItem.js +1 -0
- package/build/cjs/components/Title/TitleItem.js.map +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js.map +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js.map +1 -1
- package/build/cjs/editor/components/AddBlock/AddBlock.js +1 -1
- package/build/cjs/editor/components/AddBlock/AddBlock.js.map +1 -1
- package/build/cjs/editor/components/BlockForm/BlockForm.js +2 -2
- package/build/cjs/editor/components/BlockForm/BlockForm.js.map +1 -1
- package/build/cjs/editor/components/CodeEditor/CodeEditor.js +1 -1
- package/build/cjs/editor/components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/cjs/editor/components/ControlPanel/ControlPanel.css +1 -1
- package/build/cjs/editor/components/PageSettings/PageSettings.js +1 -1
- package/build/cjs/editor/components/PageSettings/PageSettings.js.map +1 -1
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +1 -1
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js.map +1 -1
- package/build/cjs/editor/dynamic-forms-custom/config.js +1 -1
- package/build/cjs/editor/dynamic-forms-custom/config.js.map +1 -1
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.js +2 -2
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.js.map +1 -1
- package/build/cjs/editor/store/main/utils.js +1 -1
- package/build/cjs/editor/store/main/utils.js.map +1 -1
- package/build/cjs/editor/utils/index.js +1 -1
- package/build/cjs/editor/utils/index.js.map +1 -1
- package/build/cjs/editor/utils/validation.js +1 -1
- package/build/cjs/editor/utils/validation.js.map +1 -1
- package/build/cjs/hooks/useFocus.js +1 -1
- package/build/cjs/hooks/useFocus.js.map +1 -1
- package/build/cjs/hooks/useHeightCalculator.js +1 -1
- package/build/cjs/hooks/useHeightCalculator.js.map +1 -1
- package/build/cjs/hooks/useWindowBreakpoint.js +1 -1
- package/build/cjs/hooks/useWindowBreakpoint.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
- 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/navigation/components/NavigationItem/NavigationItem.js +1 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js.map +1 -1
- package/build/cjs/navigation/components/NavigationItem/hooks/useNavigationItemMap.js +1 -1
- package/build/cjs/navigation/components/NavigationItem/hooks/useNavigationItemMap.js.map +1 -1
- package/build/cjs/navigation/hooks/useActiveNavItem.d.ts +2 -2
- package/build/cjs/navigation/hooks/useShowBorder.js +1 -1
- package/build/cjs/navigation/hooks/useShowBorder.js.map +1 -1
- package/build/cjs/navigation/schema.js +1 -1
- package/build/cjs/navigation/schema.js.map +1 -1
- package/build/cjs/navigation/utils.d.ts +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/BackgroundCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Content/Content.css +53 -6
- package/build/cjs/sub-blocks/Content/Content.js +2 -0
- package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/ImageCard.css +2 -0
- package/build/cjs/sub-blocks/ImageCard/schema.js +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/cjs/sub-blocks/PriceCard/PriceCard.js +2 -3
- package/build/cjs/sub-blocks/PriceCard/PriceCard.js.map +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.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/text-transform/transformers.js +2 -2
- package/build/cjs/text-transform/transformers.js.map +1 -1
- package/build/cjs/utils/blocks.js +3 -2
- package/build/cjs/utils/blocks.js.map +1 -1
- package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
- package/build/esm/blocks/CardLayout/CardLayout.js.map +1 -1
- package/build/esm/blocks/Form/schema.js +1 -1
- package/build/esm/blocks/Form/schema.js.map +1 -1
- package/build/esm/blocks/Header/Header.css +6 -0
- package/build/esm/blocks/Header/Header.js +10 -4
- package/build/esm/blocks/Header/Header.js.map +1 -1
- package/build/esm/blocks/Header/schema.d.ts +6 -0
- package/build/esm/blocks/Header/schema.js +3 -0
- package/build/esm/blocks/Header/schema.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/HeaderSlider/schema.js +1 -1
- package/build/esm/blocks/HeaderSlider/schema.js.map +1 -1
- package/build/esm/blocks/Info/schema.js +1 -1
- package/build/esm/blocks/Info/schema.js.map +1 -1
- package/build/esm/blocks/Media/schema.js +1 -1
- package/build/esm/blocks/Media/schema.js.map +1 -1
- package/build/esm/blocks/Questions/schema.js +1 -1
- package/build/esm/blocks/Questions/schema.js.map +1 -1
- package/build/esm/blocks/Slider/Slider.js +3 -3
- package/build/esm/blocks/Slider/Slider.js.map +1 -1
- package/build/esm/blocks/Slider/utils.js +1 -1
- package/build/esm/blocks/Slider/utils.js.map +1 -1
- package/build/esm/blocks/SliderNew/Slider.d.ts +1 -1
- package/build/esm/blocks/SliderNew/Slider.js +13 -2
- package/build/esm/blocks/SliderNew/Slider.js.map +1 -1
- package/build/esm/blocks/SliderNew/utils.js +2 -2
- package/build/esm/blocks/SliderNew/utils.js.map +1 -1
- package/build/esm/blocks/Tabs/schema.js +1 -1
- package/build/esm/blocks/Tabs/schema.js.map +1 -1
- package/build/esm/components/BackLink/BackLink.js +5 -2
- package/build/esm/components/BackLink/BackLink.js.map +1 -1
- package/build/esm/components/BalancedMasonry/BalancedMasonry.js +3 -3
- package/build/esm/components/BalancedMasonry/BalancedMasonry.js.map +1 -1
- package/build/esm/components/BrandFooter/BrandFooter.css +21 -17
- package/build/esm/components/BrandFooter/BrandFooter.js +1 -1
- package/build/esm/components/BrandFooter/BrandFooter.js.map +1 -1
- package/build/esm/components/Button/Button.js +3 -4
- package/build/esm/components/Button/Button.js.map +1 -1
- package/build/esm/components/CardBase/CardBase.css +1 -0
- package/build/esm/components/ContentList/ContentList.css +7 -7
- package/build/esm/components/FileLink/FileLink.js +8 -1
- package/build/esm/components/FileLink/FileLink.js.map +1 -1
- package/build/esm/components/FullWidthBackground/FullWidthBackground.js +1 -1
- package/build/esm/components/FullWidthBackground/FullWidthBackground.js.map +1 -1
- package/build/esm/components/ImageBase/ImageBase.js +1 -1
- package/build/esm/components/ImageBase/ImageBase.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/Map/GoogleMap.js +1 -1
- package/build/esm/components/Map/GoogleMap.js.map +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js.map +1 -1
- package/build/esm/components/Media/Image/Image.js +1 -1
- package/build/esm/components/Media/Image/Image.js.map +1 -1
- package/build/esm/components/OutsideClick/OutsideClick.js +1 -1
- package/build/esm/components/OutsideClick/OutsideClick.js.map +1 -1
- package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
- package/build/esm/components/OverflowScroller/OverflowScroller.js.map +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js.map +1 -1
- package/build/esm/components/Title/TitleItem.css +8 -1
- package/build/esm/components/Title/TitleItem.js +1 -0
- package/build/esm/components/Title/TitleItem.js.map +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.js.map +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js.map +1 -1
- package/build/esm/editor/components/AddBlock/AddBlock.js +1 -1
- package/build/esm/editor/components/AddBlock/AddBlock.js.map +1 -1
- package/build/esm/editor/components/BlockForm/BlockForm.js +2 -2
- package/build/esm/editor/components/BlockForm/BlockForm.js.map +1 -1
- package/build/esm/editor/components/CodeEditor/CodeEditor.js +1 -1
- package/build/esm/editor/components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/esm/editor/components/ControlPanel/ControlPanel.css +1 -1
- package/build/esm/editor/components/PageSettings/PageSettings.js +1 -1
- package/build/esm/editor/components/PageSettings/PageSettings.js.map +1 -1
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +1 -1
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js.map +1 -1
- package/build/esm/editor/dynamic-forms-custom/config.js +1 -1
- package/build/esm/editor/dynamic-forms-custom/config.js.map +1 -1
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.js +2 -2
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.js.map +1 -1
- package/build/esm/editor/store/main/utils.js +1 -1
- package/build/esm/editor/store/main/utils.js.map +1 -1
- package/build/esm/editor/utils/index.js +1 -1
- package/build/esm/editor/utils/index.js.map +1 -1
- package/build/esm/editor/utils/validation.js +1 -1
- package/build/esm/editor/utils/validation.js.map +1 -1
- package/build/esm/hooks/useFocus.js +1 -1
- package/build/esm/hooks/useFocus.js.map +1 -1
- package/build/esm/hooks/useHeightCalculator.js +1 -1
- package/build/esm/hooks/useHeightCalculator.js.map +1 -1
- package/build/esm/hooks/useWindowBreakpoint.js +1 -1
- package/build/esm/hooks/useWindowBreakpoint.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +2 -1
- 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/navigation/components/NavigationItem/NavigationItem.js +1 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js.map +1 -1
- package/build/esm/navigation/components/NavigationItem/hooks/useNavigationItemMap.js +1 -1
- package/build/esm/navigation/components/NavigationItem/hooks/useNavigationItemMap.js.map +1 -1
- package/build/esm/navigation/hooks/useActiveNavItem.d.ts +2 -2
- package/build/esm/navigation/hooks/useShowBorder.js +1 -1
- package/build/esm/navigation/hooks/useShowBorder.js.map +1 -1
- package/build/esm/navigation/schema.js +1 -1
- package/build/esm/navigation/schema.js.map +1 -1
- package/build/esm/navigation/utils.d.ts +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/BackgroundCard/schema.js +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.js +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/Content/Content.css +53 -6
- package/build/esm/sub-blocks/Content/Content.js +2 -0
- package/build/esm/sub-blocks/Content/Content.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/ImageCard.css +2 -0
- package/build/esm/sub-blocks/ImageCard/schema.js +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/esm/sub-blocks/PriceCard/PriceCard.js +1 -1
- package/build/esm/sub-blocks/PriceCard/PriceCard.js.map +1 -1
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +1 -1
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.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/text-transform/transformers.js +2 -2
- package/build/esm/text-transform/transformers.js.map +1 -1
- package/build/esm/utils/blocks.js +3 -2
- package/build/esm/utils/blocks.js.map +1 -1
- package/package.json +16 -11
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +2 -1
- package/server/models/constructor-items/common.d.ts +2 -2
- package/server/utils/blocks.js +1 -0
- package/styles/root.scss +1 -0
- package/widget/2957.index.js +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BasicCard = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const omit_1 = tslib_1.__importDefault(require("lodash/omit"));
|
|
5
|
+
const omit_1 = tslib_1.__importDefault(require("lodash/omit.js"));
|
|
6
6
|
const schema_1 = require("../../components/Image/schema.js");
|
|
7
7
|
const common_1 = require("../../schema/validators/common.js");
|
|
8
8
|
const schema_2 = require("../Content/schema.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAAyD;AACzD,8DAAoF;AACpF,iDAA8C;AAE9C,MAAM,qBAAqB,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAEzE,QAAA,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,EAAE;QACZ,UAAU,4EACH,kBAAS,GACT,iBAAQ,GACR,wBAAe,GACf,qBAAqB,KACxB,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB,EACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB,EACD,IAAI,EAAE,mBAAU,EAChB,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;aAC/C,EACD,YAAY,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;aACxB,EACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps} from '../../components/Image/schema';\nimport {BaseProps, CardBase, CardLayoutProps} from '../../schema/validators/common';\nimport {ContentBase} from '../Content/schema';\n\nconst BasicCardContentProps = omit(ContentBase, ['size', 'theme', 'controlPosition']);\n\nexport const BasicCard = {\n 'basic-card': {\n additionalProperties: false,\n required: [],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...BasicCardContentProps,\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n icon: ImageProps,\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n iconPosition: {\n type: 'string',\n enum: ['top', 'left'],\n },\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n },\n },\n};\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.pc-content_size_l .pc-content__text .yfm,
|
|
2
|
-
.pc-content_size_l .pc-content__notice .yfm
|
|
2
|
+
.pc-content_size_l .pc-content__notice .yfm, .pc-content_size_m .pc-content__text .yfm,
|
|
3
|
+
.pc-content_size_m .pc-content__notice .yfm {
|
|
3
4
|
margin: 0;
|
|
4
5
|
}
|
|
5
6
|
|
|
@@ -37,6 +38,9 @@ unpredictable css rules order in build */
|
|
|
37
38
|
text-align: center;
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
.pc-content_centered .pc-content__list {
|
|
42
|
+
margin-inline: auto;
|
|
43
|
+
}
|
|
40
44
|
.pc-content_centered .pc-content__buttons {
|
|
41
45
|
justify-content: center;
|
|
42
46
|
}
|
|
@@ -52,8 +56,7 @@ unpredictable css rules order in build */
|
|
|
52
56
|
.pc-content_centered .pc-content__text .yfm ol {
|
|
53
57
|
text-align: left;
|
|
54
58
|
}
|
|
55
|
-
.pc-content_size_s .pc-content__text
|
|
56
|
-
.pc-content_size_s .pc-content__notice {
|
|
59
|
+
.pc-content_size_s .pc-content__text {
|
|
57
60
|
margin-top: 8px;
|
|
58
61
|
}
|
|
59
62
|
.pc-content_size_s .pc-content__text_without-title {
|
|
@@ -61,11 +64,44 @@ unpredictable css rules order in build */
|
|
|
61
64
|
}
|
|
62
65
|
.pc-content_size_s .pc-content__list,
|
|
63
66
|
.pc-content_size_s .pc-content__links,
|
|
64
|
-
.pc-content_size_s .pc-
|
|
67
|
+
.pc-content_size_s .pc-content__notice {
|
|
65
68
|
margin-top: 16px;
|
|
66
69
|
}
|
|
67
|
-
.pc-
|
|
68
|
-
|
|
70
|
+
.pc-content_size_s .pc-content__buttons {
|
|
71
|
+
margin-top: 20px;
|
|
72
|
+
}
|
|
73
|
+
.pc-content_size_s .pc-content__notice .yfm {
|
|
74
|
+
font-size: var(--g-text-body-1-font-size);
|
|
75
|
+
line-height: var(--g-text-body-1-line-height);
|
|
76
|
+
}
|
|
77
|
+
.pc-content_size_m .pc-content__text {
|
|
78
|
+
margin-top: 12px;
|
|
79
|
+
}
|
|
80
|
+
.pc-content_size_m .pc-content__text_without-title {
|
|
81
|
+
margin-top: 0;
|
|
82
|
+
}
|
|
83
|
+
.pc-content_size_m .pc-content__text .yfm,
|
|
84
|
+
.pc-content_size_m .pc-content__notice .yfm {
|
|
85
|
+
font-size: var(--g-text-body-3-font-size);
|
|
86
|
+
line-height: var(--g-text-body-3-line-height);
|
|
87
|
+
}
|
|
88
|
+
.pc-content_size_m .pc-content__text .yfm {
|
|
89
|
+
font-size: var(--g-text-body-3-font-size);
|
|
90
|
+
line-height: var(--g-text-body-3-line-height);
|
|
91
|
+
}
|
|
92
|
+
.pc-content_size_m .pc-content__notice .yfm {
|
|
93
|
+
font-size: var(--g-text-body-2-font-size);
|
|
94
|
+
line-height: var(--g-text-body-2-line-height);
|
|
95
|
+
}
|
|
96
|
+
.pc-content_size_m .pc-content__list,
|
|
97
|
+
.pc-content_size_m .pc-content__links,
|
|
98
|
+
.pc-content_size_m .pc-content__notice {
|
|
99
|
+
margin-top: 20px;
|
|
100
|
+
}
|
|
101
|
+
.pc-content_size_m .pc-content__buttons {
|
|
102
|
+
margin-top: 24px;
|
|
103
|
+
}
|
|
104
|
+
.pc-content_size_l .pc-content__text {
|
|
69
105
|
margin-top: 12px;
|
|
70
106
|
}
|
|
71
107
|
.pc-content_size_l .pc-content__text_without-title {
|
|
@@ -76,8 +112,19 @@ unpredictable css rules order in build */
|
|
|
76
112
|
font-size: var(--g-text-body-3-font-size);
|
|
77
113
|
line-height: var(--g-text-body-3-line-height);
|
|
78
114
|
}
|
|
115
|
+
.pc-content_size_l .pc-content__text .yfm {
|
|
116
|
+
font-size: var(--g-text-body-3-font-size);
|
|
117
|
+
line-height: var(--g-text-body-3-line-height);
|
|
118
|
+
}
|
|
119
|
+
.pc-content_size_l .pc-content__notice .yfm {
|
|
120
|
+
font-size: var(--g-text-body-2-font-size);
|
|
121
|
+
line-height: var(--g-text-body-2-line-height);
|
|
122
|
+
}
|
|
79
123
|
.pc-content_size_l .pc-content__list,
|
|
80
124
|
.pc-content_size_l .pc-content__links,
|
|
125
|
+
.pc-content_size_l .pc-content__notice {
|
|
126
|
+
margin-top: 20px;
|
|
127
|
+
}
|
|
81
128
|
.pc-content_size_l .pc-content__buttons {
|
|
82
129
|
margin-top: 24px;
|
|
83
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,0DAAgF;AAChF,8CAA+B;
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,0DAAgF;AAChF,8CAA+B;AAS/B,gDAAkC;AAClC,kDAAmD;AAInD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT;YACI,OAAO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AAC,CAAC,EAC/B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,OAAO,EACxB,QAAQ,EAAE,YAAY,CAAC,MAAM,GAC/B,CACL,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {Buttons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport {Col} from '../../grid';\nimport {\n ClassNameProps,\n ContentBlockProps,\n ContentSize,\n TextSize,\n TitleItemProps,\n} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize): TextSize {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n return 'sm';\n case 'l':\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n />\n </div>\n )}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links', {size})}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons', {size})}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
|
|
@@ -27,6 +27,7 @@ unpredictable css rules order in build */
|
|
|
27
27
|
.pc-image-card .pc-image-card__content {
|
|
28
28
|
display: flex;
|
|
29
29
|
padding: 32px;
|
|
30
|
+
padding-bottom: 36px;
|
|
30
31
|
flex: auto;
|
|
31
32
|
}
|
|
32
33
|
.pc-image-card .pc-image-card__image_inner {
|
|
@@ -44,6 +45,7 @@ unpredictable css rules order in build */
|
|
|
44
45
|
}
|
|
45
46
|
.pc-image-card .pc-image-card__image_margins_m {
|
|
46
47
|
padding: 32px;
|
|
48
|
+
padding-bottom: 36px;
|
|
47
49
|
}
|
|
48
50
|
.pc-image-card .pc-image-card__image_margins_m .pc-image-card__image_inner {
|
|
49
51
|
border-radius: initial;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ImageCard = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const omit_1 = tslib_1.__importDefault(require("lodash/omit"));
|
|
5
|
+
const omit_1 = tslib_1.__importDefault(require("lodash/omit.js"));
|
|
6
6
|
const common_1 = require("../../schema/validators/common.js");
|
|
7
7
|
const components_1 = require("../../schema/validators/components.js");
|
|
8
8
|
const schema_1 = require("../Content/schema.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/ImageCard/schema.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/ImageCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,8DAAoF;AACpF,sEAA8D;AAC9D,iDAA8C;AAE9C,MAAM,0BAA0B,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAErF,QAAA,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,4EACH,kBAAS,GACT,iBAAQ,GACR,wBAAe,GACf,0BAA0B,KAC7B,KAAK,EAAE,uBAAU,EACjB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;aAC9B,EACD,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;aACnB,EACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB,EACD,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB,EACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {BaseProps, CardBase, CardLayoutProps} from '../../schema/validators/common';\nimport {ImageProps} from '../../schema/validators/components';\nimport {ContentBase} from '../Content/schema';\n\nconst ImageCardBlockContentProps = omit(ContentBase, ['centered', 'colSizes', 'controlPosition']);\n\nexport const ImageCard = {\n 'image-card': {\n additionalProperties: false,\n required: ['image'],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...ImageCardBlockContentProps,\n image: ImageProps,\n direction: {\n type: 'string',\n enum: ['direct', 'reverse'],\n },\n margins: {\n type: 'string',\n enum: ['s', 'm'],\n },\n backgroundColor: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LayoutItem = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const omit_1 = tslib_1.__importDefault(require("lodash/omit"));
|
|
5
|
+
const omit_1 = tslib_1.__importDefault(require("lodash/omit.js"));
|
|
6
6
|
const schema_1 = tslib_1.__importDefault(require("../../components/MetaInfo/schema.js"));
|
|
7
7
|
const common_1 = require("../../schema/validators/common.js");
|
|
8
8
|
const event_1 = require("../../schema/validators/event.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/LayoutItem/schema.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/LayoutItem/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,yFAAwD;AACxD,8DAAsF;AACtF,4DAAmE;AACnE,iDAA4D;AAE/C,QAAA,UAAU,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9B,UAAU,gDACH,kBAAS,GACT,wBAAe,KAClB,KAAK,EAAE,mBAAU,EACjB,OAAO,EAAE,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,EAC3D,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YAChB,OAAO,EAAE,GAAG;SACf,EACD,QAAQ,EAAE,gBAAQ,EAClB,MAAM,EAAE;YACJ,IAAI,EAAE,SAAS;SAClB,EACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB,EACD,eAAe,EAAE;YACb,KAAK,EAAE;gDAEI,4BAAoB,KACvB,UAAU,EAAE,QAAQ;gBAExB;oBACI,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,4BAAoB;oBAC3B,UAAU,EAAE,MAAM;iBACrB;aACJ;SACJ,GACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport metaInfo from '../../components/MetaInfo/schema';\nimport {BaseProps, CardLayoutProps, MediaProps} from '../../schema/validators/common';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../../sub-blocks/Content/schema';\n\nexport const LayoutItem = {\n type: 'object',\n additionalProperties: false,\n required: ['content', 'media'],\n properties: {\n ...BaseProps,\n ...CardLayoutProps,\n media: MediaProps,\n content: omit(ContentBase, ['colSize', 'size', 'centered']),\n contentMargin: {\n type: 'string',\n enum: ['m', 'l'],\n default: 'm',\n },\n metaInfo: metaInfo,\n border: {\n type: 'boolean',\n },\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n"]}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
4
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
6
5
|
const components_1 = require("../../components/index.js");
|
|
7
6
|
const utils_1 = require("../../utils/index.js");
|
|
8
7
|
const b = (0, utils_1.block)('price-card');
|
|
9
8
|
const PriceCard = (props) => {
|
|
10
9
|
const { border, title, price, pricePeriod, priceDetails, theme, description, list, buttons, links, backgroundColor, } = props;
|
|
11
10
|
return ((0, jsx_runtime_1.jsx)(components_1.CardBase, { className: b({ theme }), border: border, children: (0, jsx_runtime_1.jsxs)(components_1.CardBase.Content, { children: [(0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('background'), style: { backgroundColor } }), (0, jsx_runtime_1.jsxs)("div", { className: b('content', { theme }), children: [(0, jsx_runtime_1.jsxs)("div", { className: b('info'), children: [(0, jsx_runtime_1.jsx)(components_1.HTML, { className: b('title'), children: title }), (0, jsx_runtime_1.jsxs)("div", { className: b('price'), children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: b('price-value'), children: price }), pricePeriod && ((0, jsx_runtime_1.jsxs)("span", { className: b('price-period'), children: ["/ ", pricePeriod] }))] }), priceDetails && ((0, jsx_runtime_1.jsx)("div", { className: b('price-details'), children: priceDetails }))] }), description && (0, jsx_runtime_1.jsx)("div", { className: b('description'), children: description }), (list === null || list === void 0 ? void 0 : list.length) ? ((0, jsx_runtime_1.jsx)("div", { className: b('list'), children: (0, jsx_runtime_1.jsx)(components_1.ContentList, { list: list.map((item) => ({
|
|
12
|
-
icon:
|
|
11
|
+
icon: icons_1.Check,
|
|
13
12
|
text: item,
|
|
14
13
|
})), size: "s" }) })) : null] }), (0, jsx_runtime_1.jsx)(components_1.Buttons, { className: b('buttons'), buttons: buttons, size: "s" }), (0, jsx_runtime_1.jsx)(components_1.Links, { className: b('links'), links: links, size: "s" })] })] }, "content") }));
|
|
15
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceCard.js","sourceRoot":"../../../../src","sources":["sub-blocks/PriceCard/PriceCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PriceCard.js","sourceRoot":"../../../../src","sources":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J,IAAI,uBAAJ,IAAI,CAAE,MAAM,EAAC,CAAC,CAAC,CACZ,gCAAK,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACrB,uBAAC,wBAAW,IACR,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;4CACtB,IAAI,EAAE,aAAK;4CACX,IAAI,EAAE,IAAI;yCACb,CAAC,CAAC,EACH,IAAI,EAAC,GAAG,GACV,GACA,CACT,CAAC,CAAC,CAAC,IAAI,IACN,EACN,uBAAC,oBAAO,IAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,GAAG,GAAG,EAC/D,uBAAC,kBAAK,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,GAAG,GAAG,IACrD,KA/BY,SAAS,CAgCZ,GACZ,CACd,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["import {Check} from '@gravity-ui/icons';\n\nimport {BackgroundImage, Buttons, CardBase, ContentList, HTML, Links} from '../../components';\nimport {PriceCardProps} from '../../models';\nimport {block} from '../../utils';\n\nimport './PriceCard.scss';\n\nconst b = block('price-card');\n\nconst PriceCard = (props: PriceCardProps) => {\n const {\n border,\n title,\n price,\n pricePeriod,\n priceDetails,\n theme,\n description,\n list,\n buttons,\n links,\n backgroundColor,\n } = props;\n return (\n <CardBase className={b({theme})} border={border}>\n <CardBase.Content key=\"content\">\n <BackgroundImage className={b('background')} style={{backgroundColor}} />\n <div className={b('content', {theme})}>\n <div className={b('info')}>\n <HTML className={b('title')}>{title}</HTML>\n <div className={b('price')}>\n <div>\n <span className={b('price-value')}>{price}</span>\n {pricePeriod && (\n <span className={b('price-period')}>/ {pricePeriod}</span>\n )}\n </div>\n {priceDetails && (\n <div className={b('price-details')}>{priceDetails}</div>\n )}\n </div>\n {description && <div className={b('description')}>{description}</div>}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList\n list={list.map((item) => ({\n icon: Check,\n text: item,\n }))}\n size=\"s\"\n />\n </div>\n ) : null}\n </div>\n <Buttons className={b('buttons')} buttons={buttons} size=\"s\" />\n <Links className={b('links')} links={links} size=\"s\" />\n </div>\n </CardBase.Content>\n </CardBase>\n );\n};\n\nexport default PriceCard;\n"]}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const chunk_1 = tslib_1.__importDefault(require("lodash/chunk"));
|
|
6
|
+
const chunk_1 = tslib_1.__importDefault(require("lodash/chunk.js"));
|
|
7
7
|
const components_1 = require("../../../components/index.js");
|
|
8
8
|
const constants_1 = require("../../../constants.js");
|
|
9
9
|
const grid_1 = require("../../../grid/index.js");
|
package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CombinedPriceDetailed.js","sourceRoot":"../../../../../src","sources":["sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,
|
|
1
|
+
{"version":3,"file":"CombinedPriceDetailed.js","sourceRoot":"../../../../../src","sources":["sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,oEAAiC;AAEjC,6DAA6C;AAC7C,qDAA+C;AAC/C,iDAA6D;AAS7D,mDAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,+BAA+B,CAAC,CAAC;AAEjD,MAAM,uBAAuB,GAAG;IAC5B,CAAC,qBAAc,CAAC,EAAE,CAAC,EAA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IAElD,OAAO,CACH,uBAAC,qBAAQ,IAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,YACtE,uBAAC,qBAAQ,CAAC,OAAO,cACb,uBAAC,WAAI,cACA,YAAY,CAAC,GAAG,CAAC,CAAC,IAAsB,EAAE,EAAE,EAAE,EAAE;oBAC7C,OAAO,CACH,uBAAC,UAAG,IAAU,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,YAC5B,QAAQ,CAAC,IAAI,CAAC,IADT,EAAE,CAEN,CACT,CAAC;gBACN,CAAC,CAAC,GACC,GACQ,GACZ,CACd,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,qBAAqB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport chunk from 'lodash/chunk';\n\nimport {CardBase} from '../../../components';\nimport {BREAKPOINTS} from '../../../constants';\nimport {Col, Grid, GridColumnSize, Row} from '../../../grid';\nimport {\n AnalyticsEventsBase,\n CardBorder,\n PriceDescriptionProps,\n PriceDetailsListProps,\n PriceDetailsSettingsProps,\n PriceItemProps,\n} from '../../../models';\nimport {block} from '../../../utils';\n\nimport './CombinedPriceDetailed.scss';\n\nconst b = block('combined-price-detailed-block');\n\nconst CombinedPricesGroupSize = {\n [GridColumnSize.Sm]: 1,\n [GridColumnSize.Md]: 2,\n [GridColumnSize.Lg]: 3,\n};\n\ninterface CombinedPriceDetailedProps extends AnalyticsEventsBase {\n items: PriceItemProps[];\n numberGroupItems: number;\n useMixedView?: boolean;\n getDescriptionComponent: (priceDescription: PriceDescriptionProps) => JSX.Element;\n getDetailsComponent: (\n priceDetails?: PriceDetailsSettingsProps[] | PriceDetailsListProps[],\n ) => JSX.Element;\n border?: CardBorder;\n}\n\nconst CombinedPriceDetailed = (props: CombinedPriceDetailedProps) => {\n const {\n items,\n numberGroupItems,\n border,\n useMixedView,\n getDescriptionComponent,\n getDetailsComponent,\n analyticsEvents,\n } = props;\n\n const [groupItemsSize, setGroupItemsSize] = React.useState<number>(numberGroupItems);\n\n const updateGroupItemsSize = React.useCallback(\n (windowWidth: number) => {\n if (windowWidth >= BREAKPOINTS.lg) {\n setGroupItemsSize(numberGroupItems);\n } else if (BREAKPOINTS.lg > windowWidth && windowWidth >= BREAKPOINTS.md) {\n setGroupItemsSize(CombinedPricesGroupSize[GridColumnSize.Lg]);\n } else if (BREAKPOINTS.md > windowWidth && windowWidth >= BREAKPOINTS.sm) {\n setGroupItemsSize(CombinedPricesGroupSize[GridColumnSize.Md]);\n } else {\n setGroupItemsSize(CombinedPricesGroupSize[GridColumnSize.Sm]);\n }\n },\n [numberGroupItems],\n );\n\n React.useEffect(() => {\n function handleResize() {\n updateGroupItemsSize(window.innerWidth);\n }\n\n handleResize();\n\n window.addEventListener('resize', handleResize, {passive: true});\n return () => window.removeEventListener('resize', handleResize);\n }, [updateGroupItemsSize]);\n\n const getPrice = (groupPrices: PriceItemProps[]) => {\n const descriptionComponents: JSX.Element[] = Array(groupItemsSize);\n const detailsComponents: JSX.Element[] = Array(groupItemsSize);\n\n for (let id = 0; id < groupItemsSize; id++) {\n const price = groupPrices[id];\n\n descriptionComponents[id] = (\n <Col key={`card_${id}`}>{price && getDescriptionComponent(price)}</Col>\n );\n detailsComponents[id] = (\n <Col key={`details_${id}`} className={price ? '' : b('empty-column')}>\n {price && getDetailsComponent(price.items)}\n </Col>\n );\n }\n\n return (\n <React.Fragment>\n <div>{descriptionComponents}</div>\n <div className={b('description', {delimiter: useMixedView})}>\n {detailsComponents}\n </div>\n </React.Fragment>\n );\n };\n\n const chunkedItems = chunk(items, groupItemsSize);\n\n return (\n <CardBase className={b()} border={border} analyticsEvents={analyticsEvents}>\n <CardBase.Content>\n <Grid>\n {chunkedItems.map((item: PriceItemProps[], id) => {\n return (\n <Row key={id} className={b('row')}>\n {getPrice(item)}\n </Row>\n );\n })}\n </Grid>\n </CardBase.Content>\n </CardBase>\n );\n};\n\nexport default CombinedPriceDetailed;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceDescription.js","sourceRoot":"../../../../../src","sources":["sub-blocks/PriceDetailed/PriceDescription/PriceDescription.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,6CAAoD;AAEpD,6DAA+C;AAC/C,2EAA6D;AAC7D,qDAKyB;AACzB,mDAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,mBAAmB,CAAC,CAAC;AAUrC,MAAM,kBAAkB,GAAG;IACvB,CAAC,wBAAe,CAAC,IAAI,CAAC,EAAE,MAAM;IAC9B,CAAC,wBAAe,CAAC,KAAK,CAAC,EAAE,SAAS;IAClC,CAAC,wBAAe,CAAC,MAAM,CAAC,EAAE,SAAS;IACnC,CAAC,wBAAe,CAAC,MAAM,CAAC,EAAE,QAAQ;IAClC,CAAC,wBAAe,CAAC,GAAG,CAAC,EAAE,QAAQ;CAClC,CAAC;AAEF,MAAM,YAAY,GAAyC;IACvD,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,IAAI;IACP,EAAE,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC5D,MAAM,EACF,KAAK,EACL,aAAa,GAAG,EAAE,EAClB,WAAW,EACX,SAAS,GAAG,GAAG,EACf,eAAe,GAAG,GAAG,EACrB,UAAU,GAAG,YAAY,EACzB,KAAK,EACL,iBAAiB,EACjB,SAAS,GACZ,GAAG,KAAK,CAAC;IAEV,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC1D,MAAM,EAAC,+BAA+B,EAAE,SAAS,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,6BAAa,CAAC,CAAC;IAErF,MAAM,oBAAoB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;;QAChD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YA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EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAClE,IACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Label, LabelProps} from '@gravity-ui/uikit';\n\nimport {YFMWrapper} from '../../../components';\nimport {StylesContext} from '../../../context/stylesContext';\nimport {\n PriceDescriptionColor,\n PriceDescriptionProps,\n PriceLabelColor,\n TextSize,\n} from '../../../models';\nimport {block} from '../../../utils';\n\nimport './PriceDescription.scss';\n\nconst b = block('price-description');\n\ninterface PriceDescriptionExtendProps extends PriceDescriptionProps {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n colorTitle?: PriceDescriptionColor;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n className?: string;\n}\n\nconst LabelColorsMapping = {\n [PriceLabelColor.BLUE]: 'info',\n [PriceLabelColor.GREEN]: 'success',\n [PriceLabelColor.YELLOW]: 'warning',\n [PriceLabelColor.PURPLE]: 'normal',\n [PriceLabelColor.RED]: 'dnager',\n};\n\nconst LabelSizeMap: Record<TextSize, LabelProps['size']> = {\n l: 's',\n m: 's',\n s: 'xs',\n xs: 'xs',\n};\n\nconst PriceDescription = (props: PriceDescriptionExtendProps) => {\n const {\n title,\n detailedTitle = '',\n description,\n titleSize = 'l',\n descriptionSize = 'm',\n colorTitle = 'cornflower',\n label,\n labelsDefaultText,\n className,\n } = props;\n\n const descriptionRef = React.useRef<HTMLDivElement>(null);\n const {pricesDetailedDescriptionHeight, setStyles} = React.useContext(StylesContext);\n\n const setDescriptionHeight = React.useCallback(() => {\n if (!descriptionRef || !descriptionRef.current) {\n return;\n }\n\n const descriptionChildren = descriptionRef.current?.children;\n\n if (!descriptionChildren) {\n return;\n }\n\n const childrenHeight = [...descriptionChildren].reduce(\n (result: number, element: Element) => result + element.clientHeight,\n 0,\n );\n\n if (\n pricesDetailedDescriptionHeight === undefined ||\n Number(pricesDetailedDescriptionHeight) < childrenHeight\n ) {\n setStyles({pricesDetailedDescriptionHeight: childrenHeight.toString()});\n } else if (childrenHeight < Number(pricesDetailedDescriptionHeight)) {\n descriptionRef.current.style.height = `${pricesDetailedDescriptionHeight}px`;\n }\n }, [pricesDetailedDescriptionHeight, setStyles]);\n\n React.useEffect(() => {\n setDescriptionHeight();\n\n window.addEventListener('resize', setDescriptionHeight, {passive: true});\n return () => window.removeEventListener('resize', setDescriptionHeight);\n }, [setDescriptionHeight]);\n\n const labelElement = React.useMemo(() => {\n if (!label) {\n return null;\n }\n\n const labelTitle = label.text || (labelsDefaultText && labelsDefaultText[label.color]);\n const labelColor = (LabelColorsMapping[label.color] || 'unknown') as LabelProps['theme'];\n const labelSize = LabelSizeMap[label.size || descriptionSize];\n\n return (\n <Label className={b('label', {size: labelSize})} theme={labelColor} size={labelSize}>\n {labelTitle}\n </Label>\n );\n }, [descriptionSize, label, labelsDefaultText]);\n\n const titleElement = React.useMemo(() => {\n return (\n <div className={b('title', {size: titleSize})}>\n <div className={b('main-title', {color: colorTitle})}>{title}</div>\n <div className={b('detailed-title', {size: descriptionSize})}>{detailedTitle}</div>\n </div>\n );\n }, [colorTitle, descriptionSize, detailedTitle, title, titleSize]);\n\n return (\n <div className={b(null, className)} ref={descriptionRef}>\n {labelElement}\n {titleElement}\n <div className={b('description', {size: descriptionSize})}>\n <YFMWrapper content={description} modifiers={{constructor: true}} />\n </div>\n </div>\n );\n};\n\nexport default PriceDescription;\n"]}
|
|
1
|
+
{"version":3,"file":"PriceDescription.js","sourceRoot":"../../../../../src","sources":["sub-blocks/PriceDetailed/PriceDescription/PriceDescription.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,6CAAoD;AAEpD,6DAA+C;AAC/C,2EAA6D;AAC7D,qDAKyB;AACzB,mDAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,mBAAmB,CAAC,CAAC;AAUrC,MAAM,kBAAkB,GAAG;IACvB,CAAC,wBAAe,CAAC,IAAI,CAAC,EAAE,MAAM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AAC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,YAC9E,UAAU,GACP,CACX,CAAC;IACN,CAAC,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEhD,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,CACH,iCAAK,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC,aACzC,gCAAK,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC,CAAC,YAAG,KAAK,GAAO,EACnE,gCAAK,SAAS,EAAE,CAAC,CAAC,gBAAgB,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC,YAAG,aAAa,GAAO,IACjF,CACT,CAAC;IACN,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnE,OAAO,CACH,iCAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,cAAc,aAClD,YAAY,EACZ,YAAY,EACb,gCAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC,YACrD,uBAAC,uBAAU,IAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAClE,IACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Label, LabelProps} from '@gravity-ui/uikit';\n\nimport {YFMWrapper} from '../../../components';\nimport {StylesContext} from '../../../context/stylesContext';\nimport {\n PriceDescriptionColor,\n PriceDescriptionProps,\n PriceLabelColor,\n TextSize,\n} from '../../../models';\nimport {block} from '../../../utils';\n\nimport './PriceDescription.scss';\n\nconst b = block('price-description');\n\ninterface PriceDescriptionExtendProps extends PriceDescriptionProps {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n colorTitle?: PriceDescriptionColor;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n className?: string;\n}\n\nconst LabelColorsMapping = {\n [PriceLabelColor.BLUE]: 'info',\n [PriceLabelColor.GREEN]: 'success',\n [PriceLabelColor.YELLOW]: 'warning',\n [PriceLabelColor.PURPLE]: 'normal',\n [PriceLabelColor.RED]: 'dnager',\n};\n\nconst LabelSizeMap: Record<TextSize, LabelProps['size']> = {\n l: 's',\n m: 's',\n sm: 's',\n s: 'xs',\n xs: 'xs',\n};\n\nconst PriceDescription = (props: PriceDescriptionExtendProps) => {\n const {\n title,\n detailedTitle = '',\n description,\n titleSize = 'l',\n descriptionSize = 'm',\n colorTitle = 'cornflower',\n label,\n labelsDefaultText,\n className,\n } = props;\n\n const descriptionRef = React.useRef<HTMLDivElement>(null);\n const {pricesDetailedDescriptionHeight, setStyles} = React.useContext(StylesContext);\n\n const setDescriptionHeight = React.useCallback(() => {\n if (!descriptionRef || !descriptionRef.current) {\n return;\n }\n\n const descriptionChildren = descriptionRef.current?.children;\n\n if (!descriptionChildren) {\n return;\n }\n\n const childrenHeight = [...descriptionChildren].reduce(\n (result: number, element: Element) => result + element.clientHeight,\n 0,\n );\n\n if (\n pricesDetailedDescriptionHeight === undefined ||\n Number(pricesDetailedDescriptionHeight) < childrenHeight\n ) {\n setStyles({pricesDetailedDescriptionHeight: childrenHeight.toString()});\n } else if (childrenHeight < Number(pricesDetailedDescriptionHeight)) {\n descriptionRef.current.style.height = `${pricesDetailedDescriptionHeight}px`;\n }\n }, [pricesDetailedDescriptionHeight, setStyles]);\n\n React.useEffect(() => {\n setDescriptionHeight();\n\n window.addEventListener('resize', setDescriptionHeight, {passive: true});\n return () => window.removeEventListener('resize', setDescriptionHeight);\n }, [setDescriptionHeight]);\n\n const labelElement = React.useMemo(() => {\n if (!label) {\n return null;\n }\n\n const labelTitle = label.text || (labelsDefaultText && labelsDefaultText[label.color]);\n const labelColor = (LabelColorsMapping[label.color] || 'unknown') as LabelProps['theme'];\n const labelSize = LabelSizeMap[label.size || descriptionSize];\n\n return (\n <Label className={b('label', {size: labelSize})} theme={labelColor} size={labelSize}>\n {labelTitle}\n </Label>\n );\n }, [descriptionSize, label, labelsDefaultText]);\n\n const titleElement = React.useMemo(() => {\n return (\n <div className={b('title', {size: titleSize})}>\n <div className={b('main-title', {color: colorTitle})}>{title}</div>\n <div className={b('detailed-title', {size: descriptionSize})}>{detailedTitle}</div>\n </div>\n );\n }, [colorTitle, descriptionSize, detailedTitle, title, titleSize]);\n\n return (\n <div className={b(null, className)} ref={descriptionRef}>\n {labelElement}\n {titleElement}\n <div className={b('description', {size: descriptionSize})}>\n <YFMWrapper content={description} modifiers={{constructor: true}} />\n </div>\n </div>\n );\n};\n\nexport default PriceDescription;\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.contentTransformer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep"));
|
|
6
|
-
const shuffle_1 = tslib_1.__importDefault(require("lodash/shuffle"));
|
|
5
|
+
const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep.js"));
|
|
6
|
+
const shuffle_1 = tslib_1.__importDefault(require("lodash/shuffle.js"));
|
|
7
7
|
const config_1 = require("./config.js");
|
|
8
8
|
const filter_1 = require("./filter.js");
|
|
9
9
|
function transformBlocks(blocks, lang, customConfig = {}, options = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformers.js","sourceRoot":"../../../src","sources":["text-transform/transformers.ts"],"names":[],"mappings":";;;;AAGA,
|
|
1
|
+
{"version":3,"file":"transformers.js","sourceRoot":"../../../src","sources":["text-transform/transformers.ts"],"names":[],"mappings":";;;;AAGA,4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AI,CAAC,CAAC,CAAC,CAAC,OAAO,CACtD,CAAC;IAEjB,MAAM,iBAAiB,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE;QAClE,OAAO;KACV,CAAC,CAAC;IAEH,OAAO;QACH,MAAM,EAAE,iBAAiB;KAC5B,CAAC;AACN,CAAC,CAAC;AAbW,QAAA,kBAAkB,sBAa7B","sourcesContent":["/* eslint-disable no-param-reassign */\n/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\nimport {MarkdownItPluginCb} from '@diplodoc/transform/lib/plugins/typings';\nimport cloneDeep from 'lodash/cloneDeep';\nimport shuffle from 'lodash/shuffle';\n\nimport {ConstructorBlock, PageContent} from '../models/constructor';\n\nimport {Transformer} from './common';\nimport {BlocksConfig, config} from './config';\nimport {FilterableContent, filterContent} from './filter';\nimport {Lang} from './types';\n\nexport type ContentVariables = Record<string, string>;\nexport type ContentTransformerProps = {\n content: {\n blocks?: ConstructorBlock[];\n };\n options: {\n lang: Lang;\n customConfig?: {};\n vars?: ContentVariables;\n plugins?: MarkdownItPluginCb[];\n };\n};\n\nfunction transformBlocks(\n blocks: ConstructorBlock[],\n lang: Lang,\n customConfig = {},\n options: {plugins?: MarkdownItPluginCb[]} = {},\n) {\n const fullConfig = {...config, ...customConfig};\n const {plugins = []} = options;\n\n const clonedBlocks = cloneDeep(blocks);\n\n return clonedBlocks.map((block) => transformBlock(lang, fullConfig, block, plugins));\n}\n\nfunction transformBlock(\n lang: Lang,\n blocksConfig: BlocksConfig,\n block: ConstructorBlock,\n plugins: MarkdownItPluginCb[],\n) {\n const blockConfig = blocksConfig[block.type];\n\n if (block) {\n if ('randomOrder' in block && block.randomOrder && 'children' in block && block.children) {\n block.children = shuffle(block.children as ConstructorBlock[]);\n }\n }\n\n if (blockConfig) {\n const configs = Array.isArray(blockConfig) ? blockConfig : [blockConfig];\n\n configs.forEach((transformConfig) => {\n const {fields, transformer: transformerRaw, parser} = transformConfig;\n const transformer: Transformer = (content) =>\n // eslint-disable-next-line no-useless-call\n transformerRaw.call(null, lang, content, {plugins});\n\n if (fields) {\n (fields as (keyof typeof block)[]).forEach((field) => {\n if (block[field]) {\n if (parser) {\n block[field] = parser(transformer, block[field]);\n } else if (typeof block[field] === 'string') {\n block[field] = transformer(block[field] as string);\n }\n }\n });\n } else if (parser) {\n parser(transformer, block);\n }\n });\n }\n\n if ('children' in block && block.children) {\n block.children = transformBlocks(block.children as ConstructorBlock[], lang, blocksConfig, {\n plugins,\n });\n }\n\n return block;\n}\n\nexport const contentTransformer = ({content, options}: ContentTransformerProps) => {\n const {lang, customConfig = {}, vars, plugins = []} = options;\n const {blocks = []} = (\n vars ? filterContent(content as FilterableContent, vars) : content\n ) as PageContent;\n\n const transformedBlocks = transformBlocks(blocks, lang, customConfig, {\n plugins,\n });\n\n return {\n blocks: transformedBlocks,\n };\n};\n"]}
|
|
@@ -5,8 +5,8 @@ exports.getHeaderTag = getHeaderTag;
|
|
|
5
5
|
exports.hasBlockTag = hasBlockTag;
|
|
6
6
|
exports.getBlockKey = getBlockKey;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
const camelCase_1 = tslib_1.__importDefault(require("lodash/camelCase"));
|
|
9
|
-
const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
|
|
8
|
+
const camelCase_1 = tslib_1.__importDefault(require("lodash/camelCase.js"));
|
|
9
|
+
const flatten_1 = tslib_1.__importDefault(require("lodash/flatten.js"));
|
|
10
10
|
const models_1 = require("../models/index.js");
|
|
11
11
|
const BLOCK_ELEMENTS = [
|
|
12
12
|
'div',
|
|
@@ -54,6 +54,7 @@ function getHeaderTag(size) {
|
|
|
54
54
|
return 'h3';
|
|
55
55
|
case 'xs':
|
|
56
56
|
return 'h4';
|
|
57
|
+
case 'sm':
|
|
57
58
|
case 'm':
|
|
58
59
|
default:
|
|
59
60
|
return 'h2';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["utils/blocks.ts"],"names":[],"mappings":";;;AA8CA,
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["utils/blocks.ts"],"names":[],"mappings":";;;AA8CA,oCAaC;AAED,kCAGC;AAED,kCAEC;;AApED,4EAAyC;AACzC,wEAAqC;AAErC,+CAAyF;AAEzF,MAAM,cAAc,GAAG;IACnB,KAAK;IACL,GAAG;IACH,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,KAAK;IACL,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,MAAM;IACN,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;CACP,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;AAEpE,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE7F,SAAgB,YAAY,CAAC,IAAc;IACvC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,IAAI;YACL,OAAO,IAAI,CAAC;QAChB,KAAK,IAAI,CAAC;QACV,KAAK,GAAG,CAAC;QACT;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,SAAgB,WAAW,CAAC,OAAe;IACvC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACpD,OAA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AO,qBAAqB,CAAC,iDAAiD,EAAE;gBAC5E,GAAG;aACN,CAAC,CAAC;QACP;YACI,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;YAE7C,OAAO,SAAS,CAAC;IACzB,CAAC;AACL,CAAC,CAAC;AAjCW,QAAA,YAAY,gBAiCvB;AAEK,MAAM,eAAe,GAAG,CAAC,EAAW,EAAE,GAAG,UAAsC,EAAE,EAAE;IACtF,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C,IAAI,EAAE,EAAE,CAAC;QACL,MAAM,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC,IAAA,iBAAO,EAAC,UAAU,CAAC,CAAC,CAAC;QAE5D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACjB,UAAU,CAAC,IAAA,mBAAS,EAAC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B","sourcesContent":["import camelCase from 'lodash/camelCase';\nimport flatten from 'lodash/flatten';\n\nimport {ConstructorBlock, CustomConfig, PCShareSocialNetwork, TextSize} from '../models';\n\nconst BLOCK_ELEMENTS = [\n 'div',\n 'p',\n 'h[1-6]',\n 'address',\n 'article',\n 'aside',\n 'blockquote',\n 'canvas',\n 'dd',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'footer',\n 'header',\n 'hr',\n 'main',\n 'nav',\n 'section',\n 'video',\n 'pre',\n 'figure',\n 'form',\n 'pre',\n 'ol',\n 'ul',\n 'li',\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'tr',\n 'th',\n 'td',\n];\n\nconst BLOCK_ELEMENTS_REGEX = `<(${BLOCK_ELEMENTS.join('|')})[^>]*>`;\n\nconst QA_ATTRIBUTES_KEYS = ['container', 'content', 'wrapper', 'image', 'button', 'animate'];\n\nexport function getHeaderTag(size: TextSize) {\n switch (size) {\n case 'l':\n return 'h1';\n case 's':\n return 'h3';\n case 'xs':\n return 'h4';\n case 'sm':\n case 'm':\n default:\n return 'h2';\n }\n}\n\nexport function hasBlockTag(content: string): boolean {\n const regex = new RegExp(BLOCK_ELEMENTS_REGEX, 'g');\n return regex.test(content);\n}\n\nexport function getBlockKey(block: ConstructorBlock, index: number) {\n return `${block.type}-${index}`;\n}\n\nexport const getCustomItems = (types: (keyof CustomConfig)[], customBlocks: CustomConfig = {}) => {\n return types.reduce((result, type: keyof CustomConfig) => {\n return Object.assign(result, customBlocks[type] || {});\n }, {});\n};\n\nexport const getCustomTypes = (types: (keyof CustomConfig)[], customBlocks: CustomConfig = {}) => {\n return types.reduce((result, type: keyof CustomConfig) => {\n return result.concat(Object.keys(customBlocks[type] || {}));\n }, [] as string[]);\n};\n\nconst getShareUrlWithParams = (url: string, params: Record<string, string | undefined> = {}) => {\n const result = new URL(url);\n\n Object.entries(params).forEach(([name, value]) => {\n if (value) {\n result.searchParams.set(name, value);\n }\n });\n\n return result.toString();\n};\n\nexport const getOrderedBlocks = (blocks: ConstructorBlock[], headerBlockTypes: string[] = []) => {\n return blocks.filter(({type}) => !headerBlockTypes.includes(type));\n};\n\nexport const getHeaderBlock = (blocks: ConstructorBlock[], headerBlockTypes: string[] = []) => {\n return blocks.find(({type}) => headerBlockTypes.includes(type));\n};\n\nexport const getShareLink = (\n url: string,\n type: PCShareSocialNetwork,\n title?: string,\n text?: string,\n) => {\n // https://github.com/bradvin/social-share-urls\n switch (type) {\n case PCShareSocialNetwork.Telegram:\n return getShareUrlWithParams('https://t.me/share/url', {url, text: title});\n case PCShareSocialNetwork.Facebook:\n return getShareUrlWithParams('https://facebook.com/sharer.php', {u: url});\n case PCShareSocialNetwork.Twitter:\n return getShareUrlWithParams('https://twitter.com/intent/tweet', {\n url,\n text: title,\n });\n case PCShareSocialNetwork.Vk:\n return getShareUrlWithParams('https://vk.com/share.php', {\n url,\n title,\n comment: text,\n });\n case PCShareSocialNetwork.LinkedIn:\n return getShareUrlWithParams('https://www.linkedin.com/sharing/share-offsite/', {\n url,\n });\n default:\n // eslint-disable-next-line no-console\n console.error(`Unknown share type: ${type}`);\n\n return undefined;\n }\n};\n\nexport const getQaAttrubutes = (qa?: string, ...customKeys: (string | Array<string>)[]) => {\n const attributes: Record<string, string> = {};\n\n if (qa) {\n const keys = QA_ATTRIBUTES_KEYS.concat(flatten(customKeys));\n\n keys.forEach((key) => {\n attributes[camelCase(key)] = `${qa}-${key}`;\n });\n\n attributes.default = qa;\n }\n\n return attributes;\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import isEmpty from
|
|
4
|
+
import isEmpty from "lodash/isEmpty.js";
|
|
5
5
|
import { AnimateBlock, BackgroundImage, Title } from "../../components/index.js";
|
|
6
6
|
import { useTheme } from "../../context/theme/index.js";
|
|
7
7
|
import { Col, Row } from "../../grid/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,KAAK,EAAC,kCAAyB;AACtE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,O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,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACjD,KAAK,IADA,KAAK,CAET,CACT,CAAC,GACA,IACJ,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout: React.FC<CardLayoutBlockProps> = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n}) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title title={title} subtitle={description} className={titleClassName} />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import omit from
|
|
1
|
+
import omit from "lodash/omit.js";
|
|
2
2
|
import { ImageProps } from "../../components/Image/schema.js";
|
|
3
3
|
import { YandexFormProps } from "../../components/YandexForm/schema.js";
|
|
4
4
|
import { BlockBaseProps, withTheme } from "../../schema/validators/common.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Form/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Form/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EAAC,eAAe,EAAC,8CAA2C;AACnE,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,0CAAuC;AACzE,OAAO,EAAC,WAAW,EAAC,2CAAwC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,+CAA4C;AAErE,MAAM,qBAAqB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAElF,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,UAAU,kCACH,cAAc,KACjB,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,QAAQ,EAAE;gBACN,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,QAAQ;wBACpB,UAAU,EAAE;4BACR,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC;yBACrC;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,SAAS;wBACrB,UAAU,EAAE;4BACR,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC;yBACvC;qBACJ;iBACJ;aACJ,EACD,WAAW,EAAE;gBACT,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE,qBAAqB;aACpC,EACD,SAAS,EAAE;gBACP,IAAI,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,QAAQ,CAAC;aACnD,EACD,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps} from '../../components/Image/schema';\nimport {YandexFormProps} from '../../components/YandexForm/schema';\nimport {BlockBaseProps, withTheme} from '../../schema/validators/common';\nimport {ContentBase} from '../../sub-blocks/Content/schema';\nimport {HubspotFormProps} from '../../sub-blocks/HubspotForm/schema';\n\nconst FormBlockContentProps = omit(ContentBase, ['size', 'centered', 'colSizes']);\n\nexport const FormBlock = {\n 'form-block': {\n additionalProperties: false,\n required: ['formData'],\n properties: {\n ...BlockBaseProps,\n title: {\n type: 'string',\n },\n formData: {\n oneOf: [\n {\n type: 'object',\n optionName: 'yandex',\n properties: {\n yandex: withTheme(YandexFormProps),\n },\n },\n {\n type: 'object',\n optionName: 'hubspot',\n properties: {\n hubspot: withTheme(HubspotFormProps),\n },\n },\n ],\n },\n textContent: {\n additionalProperties: false,\n properties: FormBlockContentProps,\n },\n direction: {\n enum: ['content-form', 'form-content', 'center'],\n },\n image: ImageProps,\n backgroundColor: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
@@ -52,6 +52,10 @@ unpredictable css rules order in build */
|
|
|
52
52
|
position: relative;
|
|
53
53
|
z-index: 10;
|
|
54
54
|
}
|
|
55
|
+
.pc-header-block__content-inner_centered {
|
|
56
|
+
margin-inline: auto;
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
55
59
|
.pc-header-block__title {
|
|
56
60
|
font-size: var(--g-text-display-4-font-size);
|
|
57
61
|
line-height: var(--g-text-display-4-line-height);
|
|
@@ -91,6 +95,8 @@ unpredictable css rules order in build */
|
|
|
91
95
|
}
|
|
92
96
|
.pc-header-block__button.pc-header-block__button {
|
|
93
97
|
margin-top: 16px;
|
|
98
|
+
}
|
|
99
|
+
.pc-header-block__button.pc-header-block__button:not(:last-child) {
|
|
94
100
|
margin-right: 16px;
|
|
95
101
|
}
|
|
96
102
|
|