@gravity-ui/page-constructor 7.7.1 → 7.9.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/components/Button/Button.css +2 -7
- package/build/cjs/components/Button/Button.js +19 -2
- package/build/cjs/components/Button/Button.js.map +1 -1
- package/build/cjs/components/ContentList/ContentList.js +2 -2
- package/build/cjs/components/ContentList/ContentList.js.map +1 -1
- package/build/cjs/components/ContentList/ContentListItemIcon.d.ts +4 -3
- package/build/cjs/components/ContentList/ContentListItemIcon.js +7 -8
- package/build/cjs/components/ContentList/ContentListItemIcon.js.map +1 -1
- package/build/cjs/components/Icon/Icon.css +10 -0
- package/build/cjs/components/Icon/Icon.d.ts +9 -0
- package/build/cjs/components/Icon/Icon.js +24 -0
- package/build/cjs/components/Icon/Icon.js.map +1 -0
- package/build/cjs/components/IconWrapper/IconWrapper.css +3 -2
- package/build/cjs/components/IconWrapper/IconWrapper.js +6 -6
- package/build/cjs/components/IconWrapper/IconWrapper.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +3 -2
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +10 -2
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +7 -1
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +21 -0
- package/build/cjs/schema/validators/common.d.ts +21 -0
- package/build/cjs/schema/validators/common.js +22 -0
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +5 -2
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +21 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Content/schema.d.ts +31 -0
- package/build/cjs/sub-blocks/Content/schema.js +1 -0
- package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
- package/build/cjs/text-transform/config.js +0 -9
- package/build/cjs/text-transform/config.js.map +1 -1
- package/build/esm/components/Button/Button.css +2 -7
- package/build/esm/components/Button/Button.js +19 -2
- package/build/esm/components/Button/Button.js.map +1 -1
- package/build/esm/components/ContentList/ContentList.js +2 -2
- package/build/esm/components/ContentList/ContentList.js.map +1 -1
- package/build/esm/components/ContentList/ContentListItemIcon.d.ts +4 -3
- package/build/esm/components/ContentList/ContentListItemIcon.js +7 -8
- package/build/esm/components/ContentList/ContentListItemIcon.js.map +1 -1
- package/build/esm/components/Icon/Icon.css +10 -0
- package/build/esm/components/Icon/Icon.d.ts +10 -0
- package/build/esm/components/Icon/Icon.js +22 -0
- package/build/esm/components/Icon/Icon.js.map +1 -0
- package/build/esm/components/IconWrapper/IconWrapper.css +3 -2
- package/build/esm/components/IconWrapper/IconWrapper.js +6 -6
- package/build/esm/components/IconWrapper/IconWrapper.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +3 -2
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +10 -2
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +7 -1
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +21 -0
- package/build/esm/schema/validators/common.d.ts +21 -0
- package/build/esm/schema/validators/common.js +21 -0
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +5 -2
- package/build/esm/sub-blocks/BasicCard/BasicCard.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +21 -0
- package/build/esm/sub-blocks/BasicCard/schema.js +2 -1
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/Content/schema.d.ts +31 -0
- package/build/esm/sub-blocks/Content/schema.js +2 -1
- package/build/esm/sub-blocks/Content/schema.js.map +1 -1
- package/build/esm/text-transform/config.js +0 -9
- package/build/esm/text-transform/config.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +3 -2
- package/server/models/constructor-items/common.d.ts +10 -2
- package/server/models/constructor-items/sub-blocks.d.ts +7 -1
- package/server/text-transform/config.js +0 -9
|
@@ -673,4 +673,25 @@ export const BlockHeaderProps = {
|
|
|
673
673
|
inputType: 'textarea',
|
|
674
674
|
},
|
|
675
675
|
};
|
|
676
|
+
export const GravityIconProps = {
|
|
677
|
+
oneOf: [
|
|
678
|
+
{
|
|
679
|
+
type: 'string',
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
type: 'object',
|
|
683
|
+
additionalProperties: false,
|
|
684
|
+
required: ['name'],
|
|
685
|
+
properties: {
|
|
686
|
+
name: {
|
|
687
|
+
type: 'string',
|
|
688
|
+
},
|
|
689
|
+
color: {
|
|
690
|
+
type: 'string',
|
|
691
|
+
enum: ['brand', 'text-color'],
|
|
692
|
+
},
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
],
|
|
696
|
+
};
|
|
676
697
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["schema/validators/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,KAAK,GACR,8BAAqB;AAEtB,OAAO,EAAC,oBAAoB,EAAC,mBAAgB;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,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AAE,OAAO;YACb,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;SAC1B;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,KAAK,EAAE,eAAe;KACzB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;KACjB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,QAAQ;KACjB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,QAAQ;KACjB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,UAAU;KACpB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,UAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n CustomControlsButtonPositioning,\n CustomControlsType,\n MediaVideoControlsType,\n QuoteType,\n Theme,\n} from '../../models';\n\nimport {AnalyticsEventSchema} from './event';\n\nexport const mediaDirection = ['media-content', 'content-media'];\nexport const textSize = ['xs', 's', 'sm', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', 'm', 'l'];\nexport const contentTextWidth = ['s', 'm', 'l'];\n\nexport const videoTypes = ['default', 'player'];\nexport const playIconTypes = ['default', 'text'];\nexport const playIconThemes = ['blue', 'grey'];\nexport const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];\nexport const fileLinkTypes = ['vertical', 'horizontal'];\n\nexport const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']};\nexport const sizeNumber = {type: 'number', maximum: 12, minimum: 1};\nexport const contentThemes = ['default', 'dark', 'light'];\nexport const quoteTypes = Object.values(QuoteType);\nexport const mediaView = ['fit', 'full'];\nexport const customControlsType = [\n CustomControlsType.WithMuteButton,\n CustomControlsType.WithPlayPauseButton,\n];\nexport const customControlsButtonPositioning = [\n CustomControlsButtonPositioning.Center,\n CustomControlsButtonPositioning.Left,\n CustomControlsButtonPositioning.Right,\n];\n\nexport const BaseProps = {\n type: {},\n when: {\n type: 'string',\n },\n};\n\nexport const CardLayoutProps = {\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n};\n\nexport const containerSizesObject = {\n type: 'object',\n additionalProperties: false,\n properties: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n};\n\nexport const sliderSizesObject = {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: sliderSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n optionName: 'custom',\n },\n {\n type: 'number',\n optionName: 'constant',\n },\n ],\n};\n\nexport const AnimatableProps = {\n animated: {\n type: 'boolean',\n },\n};\n\nexport const ChildrenProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/children'},\n};\n\nexport const ChildrenCardsProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/cards'},\n};\n\nexport const LoopProps = {\n type: 'object',\n additionalProperties: false,\n required: ['start'],\n properties: {\n start: {\n type: 'number',\n },\n end: {\n type: 'number',\n },\n },\n};\n\nexport const PlayButtonProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: playIconTypes,\n },\n theme: {\n type: 'string',\n enum: playIconThemes,\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const CustomControlsOptionsProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: customControlsType,\n },\n muteButtonShown: {\n type: 'boolean',\n },\n positioning: {\n type: 'string',\n enum: customControlsButtonPositioning,\n },\n },\n};\n\nexport const VideoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n loop: {\n oneOf: [\n {\n ...LoopProps,\n optionName: 'options',\n },\n {\n type: 'boolean',\n optionName: 'enabled',\n },\n ],\n },\n type: {\n type: 'string',\n enum: videoTypes,\n },\n muted: {\n type: 'boolean',\n },\n autoplay: {\n type: 'boolean',\n },\n elapsedTime: {\n type: 'number',\n },\n playButton: PlayButtonProps,\n controls: {\n type: 'string',\n enum: videoControlsTypes,\n },\n customControlsOptions: CustomControlsOptionsProps,\n ariaLabel: {\n type: 'string',\n },\n contain: {\n type: 'boolean',\n },\n },\n};\n\nexport const ThemeProps = {\n type: 'string',\n enum: ['light', 'dark'],\n};\n\nexport const JustifyProps = {\n type: 'string',\n enum: ['start', 'center', 'end'],\n};\n\nexport const DataLensObjectProps = {\n type: 'object',\n additionalProperties: false,\n required: ['id'],\n properties: {\n id: {\n type: 'string',\n },\n theme: ThemeProps,\n },\n};\n\nexport const DataLensProps = {\n oneOf: [\n {\n type: 'string',\n optionName: 'id',\n },\n {\n ...DataLensObjectProps,\n optionName: 'options',\n },\n ],\n};\n\nexport const BackgroundProps = {\n additionalProperties: false,\n properties: {\n ...AnimatableProps,\n image: ImageProps,\n color: {\n type: 'string',\n },\n video: VideoProps,\n height: {\n type: 'number',\n },\n size: {\n type: 'string',\n enum: ['contain', 'cover'],\n },\n parallax: {\n type: 'boolean',\n },\n fullWidthMedia: {\n type: 'boolean',\n },\n },\n};\n\nexport const LinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n ...BaseProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n theme: {\n type: 'string',\n enum: ['back', 'file-link', 'normal'],\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n\nexport const FileLinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['href', 'text'],\n properties: {\n href: {\n type: 'string',\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n type: {\n type: 'string',\n enum: fileLinkTypes,\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n },\n};\n\nexport const authorItem = {\n type: 'object',\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {\n type: 'string',\n contentType: 'text',\n },\n secondName: {\n type: 'string',\n contentType: 'text',\n },\n avatar: ImageProps,\n description: {\n type: 'string',\n contentType: 'yfm',\n },\n },\n};\n\nexport const ButtonProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n primary: {\n type: 'boolean',\n },\n size: {\n type: 'string',\n enum: [\n 'xs', // deprecated, use 's'\n 'ns', // deprecated, use 's'\n 's',\n 'n', // deprecated, use 'l'\n 'm',\n 'l',\n 'xl',\n 'head', // deprecated, use 'l'\n 'promo', // deprecated, use 'xl'\n ],\n },\n theme: {\n type: 'string',\n enum: [\n 'normal',\n 'action',\n 'outlined',\n 'outlined-info',\n 'outlined-danger',\n 'raised',\n 'flat',\n 'flat-info',\n 'flat-danger',\n 'flat-secondary',\n 'clear',\n 'normal-contrast',\n 'outlined-contrast',\n 'flat-contrast',\n 'link', // deprecated, use 'outlined-info'\n 'pseudo', // deprecated, use 'outlined'\n 'pseudo-special', // deprecated, use 'outlined-contrast'\n 'websearch', // deprecated, use 'action'\n 'normal-dark', // deprecated, use 'outlined-contrast'\n 'normal-special', // deprecated, use 'normal-contrast'\n 'accent', // deprecated, use 'action'\n 'dark-grey', // deprecated, use 'github'\n 'app-store',\n 'google-play',\n 'scale',\n 'github',\n 'monochrome',\n ],\n },\n img: {\n oneOf: [\n {\n type: 'string',\n optionName: 'url',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['data'],\n properties: {\n data: {\n type: 'string',\n },\n position: {\n type: 'string',\n enum: ['left', 'right'],\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n optionName: 'options',\n },\n ],\n },\n analyticsEvents: {\n oneOf: [\n {...AnalyticsEventSchema, optionName: 'single'},\n {type: 'array', items: AnalyticsEventSchema, optionName: 'list'},\n ],\n },\n target: {\n type: 'string',\n enum: ['_self', '_blank', '_parent', '_top'],\n },\n width: {\n type: 'string',\n enum: ['auto', 'max'],\n },\n};\n\nexport const MenuProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport function withTheme<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no theme',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Theme.Light],\n properties: Object.values(Theme).reduce(\n (result, themeName) => ({\n ...result,\n [themeName]: value,\n }),\n {},\n ),\n optionName: 'themes',\n },\n ],\n };\n}\n\nexport const AnchorProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n};\n\nexport const BlockBaseProps = {\n ...BaseProps,\n anchor: AnchorProps,\n visible: {\n type: 'string',\n enum: containerSizesArray,\n },\n resetPaddings: {\n type: 'boolean',\n },\n context: {\n type: 'string',\n },\n indent: {\n type: 'object',\n additionalProperties: false,\n properties: {\n top: dividerEnum,\n bottom: dividerEnum,\n },\n },\n};\n\nexport const TitleProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n resetMargin: {\n type: 'boolean',\n },\n },\n};\n\nexport const ButtonBlock = {\n type: 'object',\n additionalProperties: false,\n properties: ButtonProps,\n if: {\n properties: {\n theme: {\n enum: ['app-store', 'google-play'],\n },\n },\n },\n then: {\n required: ['url'],\n },\n else: {\n required: ['text', 'url'],\n },\n};\n\nconst IframeProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n height: {\n type: 'number',\n },\n width: {\n type: 'number',\n },\n },\n};\n\nexport const MediaProps = {\n color: {\n type: 'string',\n },\n image: {\n oneOf: [\n {...ImageProps, optionName: 'single'},\n {type: 'array', items: ImageProps, optionName: 'list'},\n ],\n },\n disableImageSliderForArrayInput: {\n type: 'boolean',\n },\n video: VideoProps,\n youtube: {\n type: 'string',\n },\n videoIframe: {\n type: 'string',\n },\n autoplay: {\n type: 'boolean',\n },\n parallax: {\n type: 'boolean',\n },\n height: {\n type: 'number',\n },\n previewImg: {\n type: 'string',\n },\n dataLens: DataLensProps,\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n anyOf: [AnalyticsEventSchema, {type: 'array', items: AnalyticsEventSchema}],\n },\n ratio: {\n type: ['number', 'string'],\n pattern: '^auto$',\n },\n iframe: {\n ...IframeProps,\n },\n margins: {\n type: 'boolean',\n },\n};\n\nexport const YMapMarkerLabel = {\n type: 'object',\n required: [],\n properties: {\n iconCaption: {\n type: 'string',\n },\n iconContent: {\n type: 'string',\n },\n iconColor: {\n type: 'string',\n },\n preset: {\n type: 'string',\n },\n },\n};\n\nexport const YMapMarker = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n coordinate: {\n type: 'array',\n items: {type: 'number'},\n },\n address: {\n type: 'string',\n },\n label: YMapMarkerLabel,\n },\n};\n\nexport const MapProps = {\n zoom: {\n type: 'number',\n },\n address: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n markers: {\n type: 'array',\n items: YMapMarker,\n },\n};\n\nexport const BorderProps = {\n type: 'string',\n enum: ['line', 'shadow', 'none'],\n};\n\nexport const CardBase = {\n border: BorderProps,\n};\n\nexport const BlockHeaderProps = {\n title: {\n oneOf: [\n {\n type: 'string',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["schema/validators/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,KAAK,GACR,8BAAqB;AAEtB,OAAO,EAAC,oBAAoB,EAAC,mBAAgB;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAA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E;QACF,IAAI,EAAE,QAAQ;KACjB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,QAAQ;KACjB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,QAAQ;KACjB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,UAAU;KACpB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,UAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;iBACjB;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;iBAChC;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n CustomControlsButtonPositioning,\n CustomControlsType,\n MediaVideoControlsType,\n QuoteType,\n Theme,\n} from '../../models';\n\nimport {AnalyticsEventSchema} from './event';\n\nexport const mediaDirection = ['media-content', 'content-media'];\nexport const textSize = ['xs', 's', 'sm', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', 'm', 'l'];\nexport const contentTextWidth = ['s', 'm', 'l'];\n\nexport const videoTypes = ['default', 'player'];\nexport const playIconTypes = ['default', 'text'];\nexport const playIconThemes = ['blue', 'grey'];\nexport const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];\nexport const fileLinkTypes = ['vertical', 'horizontal'];\n\nexport const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']};\nexport const sizeNumber = {type: 'number', maximum: 12, minimum: 1};\nexport const contentThemes = ['default', 'dark', 'light'];\nexport const quoteTypes = Object.values(QuoteType);\nexport const mediaView = ['fit', 'full'];\nexport const customControlsType = [\n CustomControlsType.WithMuteButton,\n CustomControlsType.WithPlayPauseButton,\n];\nexport const customControlsButtonPositioning = [\n CustomControlsButtonPositioning.Center,\n CustomControlsButtonPositioning.Left,\n CustomControlsButtonPositioning.Right,\n];\n\nexport const BaseProps = {\n type: {},\n when: {\n type: 'string',\n },\n};\n\nexport const CardLayoutProps = {\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n};\n\nexport const containerSizesObject = {\n type: 'object',\n additionalProperties: false,\n properties: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n};\n\nexport const sliderSizesObject = {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: sliderSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n optionName: 'custom',\n },\n {\n type: 'number',\n optionName: 'constant',\n },\n ],\n};\n\nexport const AnimatableProps = {\n animated: {\n type: 'boolean',\n },\n};\n\nexport const ChildrenProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/children'},\n};\n\nexport const ChildrenCardsProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/cards'},\n};\n\nexport const LoopProps = {\n type: 'object',\n additionalProperties: false,\n required: ['start'],\n properties: {\n start: {\n type: 'number',\n },\n end: {\n type: 'number',\n },\n },\n};\n\nexport const PlayButtonProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: playIconTypes,\n },\n theme: {\n type: 'string',\n enum: playIconThemes,\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const CustomControlsOptionsProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: customControlsType,\n },\n muteButtonShown: {\n type: 'boolean',\n },\n positioning: {\n type: 'string',\n enum: customControlsButtonPositioning,\n },\n },\n};\n\nexport const VideoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n loop: {\n oneOf: [\n {\n ...LoopProps,\n optionName: 'options',\n },\n {\n type: 'boolean',\n optionName: 'enabled',\n },\n ],\n },\n type: {\n type: 'string',\n enum: videoTypes,\n },\n muted: {\n type: 'boolean',\n },\n autoplay: {\n type: 'boolean',\n },\n elapsedTime: {\n type: 'number',\n },\n playButton: PlayButtonProps,\n controls: {\n type: 'string',\n enum: videoControlsTypes,\n },\n customControlsOptions: CustomControlsOptionsProps,\n ariaLabel: {\n type: 'string',\n },\n contain: {\n type: 'boolean',\n },\n },\n};\n\nexport const ThemeProps = {\n type: 'string',\n enum: ['light', 'dark'],\n};\n\nexport const JustifyProps = {\n type: 'string',\n enum: ['start', 'center', 'end'],\n};\n\nexport const DataLensObjectProps = {\n type: 'object',\n additionalProperties: false,\n required: ['id'],\n properties: {\n id: {\n type: 'string',\n },\n theme: ThemeProps,\n },\n};\n\nexport const DataLensProps = {\n oneOf: [\n {\n type: 'string',\n optionName: 'id',\n },\n {\n ...DataLensObjectProps,\n optionName: 'options',\n },\n ],\n};\n\nexport const BackgroundProps = {\n additionalProperties: false,\n properties: {\n ...AnimatableProps,\n image: ImageProps,\n color: {\n type: 'string',\n },\n video: VideoProps,\n height: {\n type: 'number',\n },\n size: {\n type: 'string',\n enum: ['contain', 'cover'],\n },\n parallax: {\n type: 'boolean',\n },\n fullWidthMedia: {\n type: 'boolean',\n },\n },\n};\n\nexport const LinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n ...BaseProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n theme: {\n type: 'string',\n enum: ['back', 'file-link', 'normal'],\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n\nexport const FileLinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['href', 'text'],\n properties: {\n href: {\n type: 'string',\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n type: {\n type: 'string',\n enum: fileLinkTypes,\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n },\n};\n\nexport const authorItem = {\n type: 'object',\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {\n type: 'string',\n contentType: 'text',\n },\n secondName: {\n type: 'string',\n contentType: 'text',\n },\n avatar: ImageProps,\n description: {\n type: 'string',\n contentType: 'yfm',\n },\n },\n};\n\nexport const ButtonProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n primary: {\n type: 'boolean',\n },\n size: {\n type: 'string',\n enum: [\n 'xs', // deprecated, use 's'\n 'ns', // deprecated, use 's'\n 's',\n 'n', // deprecated, use 'l'\n 'm',\n 'l',\n 'xl',\n 'head', // deprecated, use 'l'\n 'promo', // deprecated, use 'xl'\n ],\n },\n theme: {\n type: 'string',\n enum: [\n 'normal',\n 'action',\n 'outlined',\n 'outlined-info',\n 'outlined-danger',\n 'raised',\n 'flat',\n 'flat-info',\n 'flat-danger',\n 'flat-secondary',\n 'clear',\n 'normal-contrast',\n 'outlined-contrast',\n 'flat-contrast',\n 'link', // deprecated, use 'outlined-info'\n 'pseudo', // deprecated, use 'outlined'\n 'pseudo-special', // deprecated, use 'outlined-contrast'\n 'websearch', // deprecated, use 'action'\n 'normal-dark', // deprecated, use 'outlined-contrast'\n 'normal-special', // deprecated, use 'normal-contrast'\n 'accent', // deprecated, use 'action'\n 'dark-grey', // deprecated, use 'github'\n 'app-store',\n 'google-play',\n 'scale',\n 'github',\n 'monochrome',\n ],\n },\n img: {\n oneOf: [\n {\n type: 'string',\n optionName: 'url',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['data'],\n properties: {\n data: {\n type: 'string',\n },\n position: {\n type: 'string',\n enum: ['left', 'right'],\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n optionName: 'options',\n },\n ],\n },\n analyticsEvents: {\n oneOf: [\n {...AnalyticsEventSchema, optionName: 'single'},\n {type: 'array', items: AnalyticsEventSchema, optionName: 'list'},\n ],\n },\n target: {\n type: 'string',\n enum: ['_self', '_blank', '_parent', '_top'],\n },\n width: {\n type: 'string',\n enum: ['auto', 'max'],\n },\n};\n\nexport const MenuProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport function withTheme<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no theme',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Theme.Light],\n properties: Object.values(Theme).reduce(\n (result, themeName) => ({\n ...result,\n [themeName]: value,\n }),\n {},\n ),\n optionName: 'themes',\n },\n ],\n };\n}\n\nexport const AnchorProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n};\n\nexport const BlockBaseProps = {\n ...BaseProps,\n anchor: AnchorProps,\n visible: {\n type: 'string',\n enum: containerSizesArray,\n },\n resetPaddings: {\n type: 'boolean',\n },\n context: {\n type: 'string',\n },\n indent: {\n type: 'object',\n additionalProperties: false,\n properties: {\n top: dividerEnum,\n bottom: dividerEnum,\n },\n },\n};\n\nexport const TitleProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n resetMargin: {\n type: 'boolean',\n },\n },\n};\n\nexport const ButtonBlock = {\n type: 'object',\n additionalProperties: false,\n properties: ButtonProps,\n if: {\n properties: {\n theme: {\n enum: ['app-store', 'google-play'],\n },\n },\n },\n then: {\n required: ['url'],\n },\n else: {\n required: ['text', 'url'],\n },\n};\n\nconst IframeProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n height: {\n type: 'number',\n },\n width: {\n type: 'number',\n },\n },\n};\n\nexport const MediaProps = {\n color: {\n type: 'string',\n },\n image: {\n oneOf: [\n {...ImageProps, optionName: 'single'},\n {type: 'array', items: ImageProps, optionName: 'list'},\n ],\n },\n disableImageSliderForArrayInput: {\n type: 'boolean',\n },\n video: VideoProps,\n youtube: {\n type: 'string',\n },\n videoIframe: {\n type: 'string',\n },\n autoplay: {\n type: 'boolean',\n },\n parallax: {\n type: 'boolean',\n },\n height: {\n type: 'number',\n },\n previewImg: {\n type: 'string',\n },\n dataLens: DataLensProps,\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n anyOf: [AnalyticsEventSchema, {type: 'array', items: AnalyticsEventSchema}],\n },\n ratio: {\n type: ['number', 'string'],\n pattern: '^auto$',\n },\n iframe: {\n ...IframeProps,\n },\n margins: {\n type: 'boolean',\n },\n};\n\nexport const YMapMarkerLabel = {\n type: 'object',\n required: [],\n properties: {\n iconCaption: {\n type: 'string',\n },\n iconContent: {\n type: 'string',\n },\n iconColor: {\n type: 'string',\n },\n preset: {\n type: 'string',\n },\n },\n};\n\nexport const YMapMarker = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n coordinate: {\n type: 'array',\n items: {type: 'number'},\n },\n address: {\n type: 'string',\n },\n label: YMapMarkerLabel,\n },\n};\n\nexport const MapProps = {\n zoom: {\n type: 'number',\n },\n address: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n markers: {\n type: 'array',\n items: YMapMarker,\n },\n};\n\nexport const BorderProps = {\n type: 'string',\n enum: ['line', 'shadow', 'none'],\n};\n\nexport const CardBase = {\n border: BorderProps,\n};\n\nexport const BlockHeaderProps = {\n title: {\n oneOf: [\n {\n type: 'string',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n};\n\nexport const GravityIconProps = {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['name'],\n properties: {\n name: {\n type: 'string',\n },\n color: {\n type: 'string',\n enum: ['brand', 'text-color'],\n },\n },\n },\n ],\n};\n"]}
|
|
@@ -8,13 +8,16 @@ import Content from "../Content/Content.js";
|
|
|
8
8
|
import './BasicCard.css';
|
|
9
9
|
const b = block('basic-card');
|
|
10
10
|
const BasicCard = (props) => {
|
|
11
|
-
const { title, text, icon, additionalInfo, links, list, buttons, iconPosition = IconPosition.Top, controlPosition = 'content', size = 's', ...cardParams } = props;
|
|
11
|
+
const { title, text, icon, additionalInfo, links, list, buttons, iconPosition = IconPosition.Top, controlPosition = 'content', size = 's', gravityIcon, ...cardParams } = props;
|
|
12
12
|
const titleId = useUniqId();
|
|
13
13
|
const descriptionId = useUniqId();
|
|
14
14
|
const areControlsInFooter = controlPosition === 'footer';
|
|
15
15
|
const theme = useTheme();
|
|
16
16
|
const themedIcon = getThemedValue(icon, theme);
|
|
17
|
-
|
|
17
|
+
const themedGravityIcon = getThemedValue(gravityIcon, theme);
|
|
18
|
+
return (_jsx(CardBase, { className: b(), contentClassName: b('content'), ...cardParams, extraProps: { 'aria-describedby': descriptionId, 'aria-labelledby': titleId }, children: _jsx(CardBase.Content, { children: _jsx(IconWrapper, { icon: themedIcon ? { value: themedIcon, position: iconPosition } : undefined, gravityIcon: themedGravityIcon
|
|
19
|
+
? { value: themedGravityIcon, position: iconPosition }
|
|
20
|
+
: undefined, className: b('wrapper'), size: size, children: _jsx(Content, { title: title, titleId: titleId, text: text, textId: descriptionId, additionalInfo: additionalInfo, links: links, list: list, buttons: buttons, size: size, colSizes: { all: 12, md: 12 }, controlPosition: areControlsInFooter ? 'bottom' : 'default' }) }) }) }));
|
|
18
21
|
};
|
|
19
22
|
export default BasicCard;
|
|
20
23
|
//# sourceMappingURL=BasicCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicCard.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/BasicCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,QAAQ,EAAE,WAAW,EAAC,kCAAyB;AACvD,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAE7C,OAAO,EAAC,YAAY,EAAC,qDAAkD;AACvE,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAClD,OAAO,OAAO,8BAA2B;AAEzC,OAAO,iBAAiB,CAAC;AAEzB,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;AAE9B,MAAM,SAAS,GAAG,CAAC,KAAqB,EAA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,GACZ,CACd,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {CardBase, IconWrapper} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {BasicCardProps} from '../../models';\nimport {IconPosition} from '../../models/constructor-items/sub-blocks';\nimport {block, getThemedValue} from '../../utils';\nimport Content from '../Content/Content';\n\nimport './BasicCard.scss';\n\nconst b = block('basic-card');\n\nconst BasicCard = (props: BasicCardProps) => {\n const {\n title,\n text,\n icon,\n additionalInfo,\n links,\n list,\n buttons,\n iconPosition = IconPosition.Top,\n controlPosition = 'content',\n size = 's',\n gravityIcon,\n ...cardParams\n } = props;\n const titleId = useUniqId();\n const descriptionId = useUniqId();\n const areControlsInFooter = controlPosition === 'footer';\n const theme = useTheme();\n const themedIcon = getThemedValue(icon, theme);\n const themedGravityIcon = getThemedValue(gravityIcon, theme);\n\n return (\n <CardBase\n className={b()}\n contentClassName={b('content')}\n {...cardParams}\n extraProps={{'aria-describedby': descriptionId, 'aria-labelledby': titleId}}\n >\n <CardBase.Content>\n <IconWrapper\n icon={themedIcon ? {value: themedIcon, position: iconPosition} : undefined}\n gravityIcon={\n themedGravityIcon\n ? {value: themedGravityIcon, position: iconPosition}\n : undefined\n }\n className={b('wrapper')}\n size={size}\n >\n <Content\n title={title}\n titleId={titleId}\n text={text}\n textId={descriptionId}\n additionalInfo={additionalInfo}\n links={links}\n list={list}\n buttons={buttons}\n size={size}\n colSizes={{all: 12, md: 12}}\n controlPosition={areControlsInFooter ? 'bottom' : 'default'}\n />\n </IconWrapper>\n </CardBase.Content>\n </CardBase>\n );\n};\n\nexport default BasicCard;\n"]}
|
|
@@ -36,6 +36,27 @@ export declare const BasicCard: {
|
|
|
36
36
|
pattern?: undefined;
|
|
37
37
|
})[];
|
|
38
38
|
};
|
|
39
|
+
gravityIcon: {
|
|
40
|
+
oneOf: ({
|
|
41
|
+
type: string;
|
|
42
|
+
additionalProperties?: undefined;
|
|
43
|
+
required?: undefined;
|
|
44
|
+
properties?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
type: string;
|
|
47
|
+
additionalProperties: boolean;
|
|
48
|
+
required: string[];
|
|
49
|
+
properties: {
|
|
50
|
+
name: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
color: {
|
|
54
|
+
type: string;
|
|
55
|
+
enum: string[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
})[];
|
|
59
|
+
};
|
|
39
60
|
target: {
|
|
40
61
|
type: string;
|
|
41
62
|
enum: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import omit from "lodash/omit.js";
|
|
2
2
|
import { ImageProps } from "../../components/Image/schema.js";
|
|
3
|
-
import { BaseProps, CardBase, CardLayoutProps } from "../../schema/validators/common.js";
|
|
3
|
+
import { BaseProps, CardBase, CardLayoutProps, GravityIconProps, } from "../../schema/validators/common.js";
|
|
4
4
|
import { ContentBase } from "../Content/schema.js";
|
|
5
5
|
const BasicCardContentProps = omit(ContentBase, ['size', 'theme', 'controlPosition']);
|
|
6
6
|
export const BasicCard = {
|
|
@@ -19,6 +19,7 @@ export const BasicCard = {
|
|
|
19
19
|
type: 'string',
|
|
20
20
|
},
|
|
21
21
|
icon: ImageProps,
|
|
22
|
+
gravityIcon: GravityIconProps,
|
|
22
23
|
target: {
|
|
23
24
|
type: 'string',
|
|
24
25
|
enum: ['_blank', '_parent', '_top', '_self'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,SAAS,EACT,QAAQ,EACR,eAAe,EACf,gBAAgB,GACnB,0CAAuC;AACxC,OAAO,EAAC,WAAW,EAAC,6BAA0B;AAE9C,MAAM,qBAAqB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE;YACR,GAAG,SAAS;YACZ,GAAG,QAAQ;YACX,GAAG,eAAe;YAClB,GAAG,qBAAqB;YACxB,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,gBAAgB;YAC7B,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;aAC/C;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;aACxB;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps} from '../../components/Image/schema';\nimport {\n BaseProps,\n CardBase,\n CardLayoutProps,\n GravityIconProps,\n} 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 gravityIcon: GravityIconProps,\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"]}
|
|
@@ -47,6 +47,37 @@ export declare const ContentItem: {
|
|
|
47
47
|
optionName: string;
|
|
48
48
|
})[];
|
|
49
49
|
};
|
|
50
|
+
gravityIcon: {
|
|
51
|
+
oneOf: (({
|
|
52
|
+
oneOf: ({
|
|
53
|
+
type: string;
|
|
54
|
+
additionalProperties?: undefined;
|
|
55
|
+
required?: undefined;
|
|
56
|
+
properties?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
type: string;
|
|
59
|
+
additionalProperties: boolean;
|
|
60
|
+
required: string[];
|
|
61
|
+
properties: {
|
|
62
|
+
name: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
color: {
|
|
66
|
+
type: string;
|
|
67
|
+
enum: string[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
})[];
|
|
71
|
+
} & {
|
|
72
|
+
optionName: string;
|
|
73
|
+
}) | {
|
|
74
|
+
type: string;
|
|
75
|
+
additionalProperties: boolean;
|
|
76
|
+
required: import("../../index.js").Theme[];
|
|
77
|
+
properties: {};
|
|
78
|
+
optionName: string;
|
|
79
|
+
})[];
|
|
80
|
+
};
|
|
50
81
|
};
|
|
51
82
|
};
|
|
52
83
|
export declare const ContentBase: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "../../components/Image/schema.js";
|
|
2
|
-
import { ButtonBlock, LinkProps, TitleProps, containerSizesArray, contentSizes, contentThemes, sizeNumber, withTheme, } from "../../schema/validators/common.js";
|
|
2
|
+
import { ButtonBlock, GravityIconProps, LinkProps, TitleProps, containerSizesArray, contentSizes, contentThemes, sizeNumber, withTheme, } from "../../schema/validators/common.js";
|
|
3
3
|
import { filteredArray } from "../../schema/validators/utils.js";
|
|
4
4
|
export const ContentItem = {
|
|
5
5
|
additionalProperties: false,
|
|
@@ -14,6 +14,7 @@ export const ContentItem = {
|
|
|
14
14
|
contentType: 'yfm',
|
|
15
15
|
},
|
|
16
16
|
icon: withTheme(ImageProps),
|
|
17
|
+
gravityIcon: withTheme(GravityIconProps),
|
|
17
18
|
},
|
|
18
19
|
};
|
|
19
20
|
export const ContentBase = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,WAAW,EACX,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK;SACrB;QACD,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAE5D,M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W;YACd,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAC,CAAC,EAAE,EAAE,CAAC;YACvF,QAAQ,EAAE;gBACN,IAAI,EAAE,SAAS;aAClB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n ButtonBlock,\n GravityIconProps,\n LinkProps,\n TitleProps,\n containerSizesArray,\n contentSizes,\n contentThemes,\n sizeNumber,\n withTheme,\n} from '../../schema/validators/common';\nimport {filteredArray} from '../../schema/validators/utils';\n\nexport const ContentItem = {\n additionalProperties: false,\n required: ['icon'],\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n },\n icon: withTheme(ImageProps),\n gravityIcon: withTheme(GravityIconProps),\n },\n};\n\nexport const ContentBase = {\n title: {\n oneOf: [\n {\n type: 'string',\n contentType: 'text',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n additionalInfo: {\n type: 'string',\n contentType: 'yfm',\n },\n size: {\n type: 'string',\n enum: contentSizes,\n },\n links: filteredArray(LinkProps),\n buttons: filteredArray(ButtonBlock),\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n list: filteredArray(ContentItem),\n controlPosition: {\n type: 'string',\n enum: ['default', 'bottom'],\n },\n};\n\nexport const ContentBlock = {\n content: {\n additionalProperties: false,\n properties: {\n ...ContentBase,\n colSizes: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n centered: {\n type: 'boolean',\n },\n },\n },\n};\n"]}
|
|
@@ -104,10 +104,6 @@ function parseContentLayoutTitle(transformer, content) {
|
|
|
104
104
|
}
|
|
105
105
|
return content;
|
|
106
106
|
}
|
|
107
|
-
const parseBackgroundCardItems = (transformer, items) => items.map(({ text, ...rest }) => ({
|
|
108
|
-
text: text && parseTitle(transformer, text),
|
|
109
|
-
...rest,
|
|
110
|
-
}));
|
|
111
107
|
export const blockHeaderTransformer = [
|
|
112
108
|
{
|
|
113
109
|
fields: ['title'],
|
|
@@ -137,11 +133,6 @@ export const config = {
|
|
|
137
133
|
fields: ['title', 'text', 'additionalInfo'],
|
|
138
134
|
transformer: yfmTransformer,
|
|
139
135
|
},
|
|
140
|
-
{
|
|
141
|
-
fields: ['list'],
|
|
142
|
-
parser: parseBackgroundCardItems,
|
|
143
|
-
transformer: typografTransformer,
|
|
144
|
-
},
|
|
145
136
|
{
|
|
146
137
|
fields: ['list'],
|
|
147
138
|
transformer: yfmTransformer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"../../../src","sources":["text-transform/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4EAA4E;AAE5E,OAAO,EACH,SAAS,EAQT,YAAY,GAGf,2BAAkB;AAEnB,OAAO,EAIH,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACjB,oBAAiB;AAElB,SAAS,qBAAqB,CAAC,WAAwB,EAAE,OAAmB;IACxE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAE/B,OAAO;QACH,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;KAChE,CAAC;AACN,CAAC;AAED,SAAS,sBAAsB,CAAC,WAAwB,EAAE,OAAmB;IACzE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,YAAY,GAAG,OAAO,EAAE,OAAO,CAAC;IAEtC,OAAO;QACH,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QAClB,OAAO,EACH,YAAY;YACZ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AAW,EAAE,cAAc;YAC3B,MAAM,EAAE,kBAAkB;SAC7B;QACD;YACI,MAAM,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;YACvC,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,uBAAuB;YAC/B,YAAY,EAAE,IAAI;SACrB;KACJ;IACD,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;QACpB;YACI,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,IAAI;SACrB;KACJ;IACD,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,sBAAsB;IACnD,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,sBAAsB;IAC/C,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,sBAAsB;IAC9C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;QACtB;YACI,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,IAAI;SACrB;QACD;YACI,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,iBAAiB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SAC/C;KACJ;IACD,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;QACnB;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,kBAAkB;SAC7B;QACD;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,uBAAuB;YAC/B,YAAY,EAAE,IAAI;SACrB;KACJ;CACJ,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\nimport {\n BlockType,\n ContentBlockProps,\n ContentItemProps,\n ExtendedFeaturesItem,\n PriceDetailedProps,\n PriceDetailsListProps,\n PriceDetailsSettingsProps,\n PromoFeaturesItem,\n SubBlockType,\n TableProps,\n TitleItemProps,\n} from '../models';\n\nimport {\n Parser,\n Transformer,\n TransformerRaw,\n createItemsParser,\n typografTransformer,\n yfmTransformer,\n} from './common';\n\nfunction parseTableBlockLegend(transformer: Transformer, content: TableProps) {\n const legend = content?.legend;\n\n return {\n ...(content || {}),\n legend: legend && legend.map((string) => transformer(string)),\n };\n}\n\nfunction parseTableBlockContent(transformer: Transformer, content: TableProps) {\n const legend = content?.legend;\n const tableContent = content?.content;\n\n return {\n ...(content || {}),\n content:\n tableContent &&\n tableContent.map((row, i) =>\n row.map((cell, j) => {\n if (legend) {\n if (i === 0 || j === 0) {\n return transformer(cell);\n }\n return cell;\n } else {\n return transformer(cell);\n }\n }),\n ),\n };\n}\n\nfunction parseFeatures(transformer: Transformer, items: ExtendedFeaturesItem[]) {\n return items.map(({title, text, ...rest}) => ({\n title: title && transformer(title),\n text: text && transformer(text),\n ...rest,\n }));\n}\n\nfunction parsePromoFeatures(transformer: Transformer, items: PromoFeaturesItem[]) {\n return items.map(({text, ...rest}) => ({\n text: transformer(text),\n ...rest,\n }));\n}\n\nconst parseTitle = (transformer: Transformer, title: TitleItemProps | string) =>\n typeof title === 'object' && 'text' in title\n ? {...title, text: transformer(title.text)}\n : title && transformer(title);\n\nconst parseItemsTitle = (transformer: Transformer, items: ExtendedFeaturesItem[]) =>\n items.map(({title, ...rest}) => ({\n title: title && parseTitle(transformer, title),\n ...rest,\n }));\n\nfunction parsePriceDetailedBlock(transformer: Transformer, block: PriceDetailedProps) {\n const {priceType} = block;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n block.items = block.items.map((item) => {\n const {description, items: details = []} = item;\n\n if (priceType === 'marked-list') {\n item.items = (details as PriceDetailsListProps[]).map((detail) => {\n detail.text = detail.text && transformer(detail.text);\n\n return detail;\n });\n } else {\n item.items = (details as PriceDetailsSettingsProps[]).map((detail) => {\n detail.description = detail.description && transformer(detail.description);\n\n return detail;\n });\n }\n\n item.description = transformer(description);\n\n return item;\n });\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\n return block;\n}\n\nconst parseContentLayout = (transformer: Transformer, content: ContentBlockProps) => {\n if (content) {\n const {text, additionalInfo, list} = content;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n if (text) {\n content.text = transformer(text);\n }\n\n if (additionalInfo) {\n content.additionalInfo = transformer(additionalInfo);\n }\n\n if (list) {\n content.list = list.map((item) => {\n if (item?.text) {\n return {\n ...item,\n text: transformer(item.text),\n };\n }\n\n return item;\n });\n }\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n }\n\n return content;\n};\n\nfunction parseContentLayoutTitle(transformer: Transformer, content: ContentBlockProps) {\n if (content?.title) {\n const {title} = content;\n\n // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign\n content.title = title && parseTitle(transformer, title);\n }\n\n return content;\n}\n\nconst parseBackgroundCardItems = (transformer: Transformer, items: ContentItemProps[]) =>\n items.map(({text, ...rest}) => ({\n text: text && parseTitle(transformer, text),\n ...rest,\n }));\n\nexport const blockHeaderTransformer = [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n parser: parseTitle,\n renderInline: true,\n },\n {\n fields: ['description'],\n transformer: yfmTransformer,\n },\n];\n\ninterface BlockConfig {\n transformer: TransformerRaw;\n fields?: string[];\n parser?: Parser;\n renderInline?: boolean;\n}\n\nexport type BlocksConfig = Record<string, BlockConfig | BlockConfig[]>;\n\nexport const config: BlocksConfig = {\n [SubBlockType.BasicCard]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BackgroundCard]: [\n {\n fields: ['title', 'text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['list'],\n parser: parseBackgroundCardItems,\n transformer: typografTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [SubBlockType.ImageCard]: [\n {\n fields: ['title', 'text', 'additionalInfo'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [SubBlockType.LayoutItem]: [\n {\n fields: ['content'],\n parser: parseContentLayout,\n transformer: yfmTransformer,\n },\n {\n fields: ['content'],\n parser: parseContentLayoutTitle,\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['metaInfo'],\n parser: createItemsParser([]),\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.Quote]: [\n {\n fields: ['text', 'yfmText'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [BlockType.ExtendedFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title']),\n renderInline: true,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['list.text']),\n renderInline: true,\n },\n ],\n [BlockType.PromoFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parsePromoFeatures,\n },\n ],\n [BlockType.SliderOldBlock]: blockHeaderTransformer,\n [BlockType.SliderBlock]: blockHeaderTransformer,\n [BlockType.CompaniesBlock]: blockHeaderTransformer,\n [BlockType.QuestionsBlock]: [\n {\n fields: ['title', 'text', 'additionalInfo'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n [BlockType.FoldableListBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n\n [BlockType.BannerBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BannerCard]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.MediaBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [BlockType.MapBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['title', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.TabsBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo', 'caption']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseItemsTitle,\n renderInline: true,\n },\n ],\n [BlockType.TableBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['table'],\n transformer: yfmTransformer,\n parser: parseTableBlockLegend,\n },\n {\n fields: ['table'],\n transformer: yfmTransformer,\n parser: parseTableBlockContent,\n renderInline: true,\n },\n ],\n [BlockType.HeaderSliderBlock]: [\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'overtitle', 'description']),\n renderInline: true,\n },\n ],\n [SubBlockType.PriceDetailed]: [\n {\n transformer: yfmTransformer,\n parser: parsePriceDetailedBlock,\n },\n ],\n [BlockType.HeaderBlock]: [\n {\n fields: ['description', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['overtitle', 'title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [BlockType.ContentLayoutBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayoutTitle,\n renderInline: true,\n },\n ],\n [SubBlockType.Content]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: yfmTransformer,\n parser: parseTitle,\n renderInline: true,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'text']),\n },\n ],\n [BlockType.InfoBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['rightContent', 'leftContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['rightContent', 'leftContent'],\n transformer: yfmTransformer,\n parser: parseContentLayoutTitle,\n renderInline: true,\n },\n ],\n [BlockType.ShareBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [BlockType.CardLayoutBlock]: blockHeaderTransformer,\n [BlockType.FilterBlock]: blockHeaderTransformer,\n [BlockType.IconsBlock]: blockHeaderTransformer,\n [SubBlockType.PriceCard]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'text']),\n },\n ],\n [BlockType.FormBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayoutTitle,\n renderInline: true,\n },\n ],\n};\n"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"../../../src","sources":["text-transform/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4EAA4E;AAE5E,OAAO,EACH,SAAS,EAOT,YAAY,GAGf,2BAAkB;AAEnB,OAAO,EAIH,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACjB,oBAAiB;AAElB,SAAS,qBAAqB,CAAC,WAAwB,EAAE,OAAmB;IACxE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAE/B,OAAO;QACH,GAAG,CAAC,OAAO,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AC;YACvC,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,kBAAkB;SAC7B;QACD;YACI,MAAM,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;YACvC,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,uBAAuB;YAC/B,YAAY,EAAE,IAAI;SACrB;KACJ;IACD,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;QACpB;YACI,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,IAAI;SACrB;KACJ;IACD,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,sBAAsB;IACnD,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,sBAAsB;IAC/C,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,sBAAsB;IAC9C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;QACtB;YACI,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,IAAI;SACrB;QACD;YACI,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,iBAAiB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SAC/C;KACJ;IACD,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;QACnB;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,kBAAkB;SAC7B;QACD;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,uBAAuB;YAC/B,YAAY,EAAE,IAAI;SACrB;KACJ;CACJ,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\nimport {\n BlockType,\n ContentBlockProps,\n ExtendedFeaturesItem,\n PriceDetailedProps,\n PriceDetailsListProps,\n PriceDetailsSettingsProps,\n PromoFeaturesItem,\n SubBlockType,\n TableProps,\n TitleItemProps,\n} from '../models';\n\nimport {\n Parser,\n Transformer,\n TransformerRaw,\n createItemsParser,\n typografTransformer,\n yfmTransformer,\n} from './common';\n\nfunction parseTableBlockLegend(transformer: Transformer, content: TableProps) {\n const legend = content?.legend;\n\n return {\n ...(content || {}),\n legend: legend && legend.map((string) => transformer(string)),\n };\n}\n\nfunction parseTableBlockContent(transformer: Transformer, content: TableProps) {\n const legend = content?.legend;\n const tableContent = content?.content;\n\n return {\n ...(content || {}),\n content:\n tableContent &&\n tableContent.map((row, i) =>\n row.map((cell, j) => {\n if (legend) {\n if (i === 0 || j === 0) {\n return transformer(cell);\n }\n return cell;\n } else {\n return transformer(cell);\n }\n }),\n ),\n };\n}\n\nfunction parseFeatures(transformer: Transformer, items: ExtendedFeaturesItem[]) {\n return items.map(({title, text, ...rest}) => ({\n title: title && transformer(title),\n text: text && transformer(text),\n ...rest,\n }));\n}\n\nfunction parsePromoFeatures(transformer: Transformer, items: PromoFeaturesItem[]) {\n return items.map(({text, ...rest}) => ({\n text: transformer(text),\n ...rest,\n }));\n}\n\nconst parseTitle = (transformer: Transformer, title: TitleItemProps | string) =>\n typeof title === 'object' && 'text' in title\n ? {...title, text: transformer(title.text)}\n : title && transformer(title);\n\nconst parseItemsTitle = (transformer: Transformer, items: ExtendedFeaturesItem[]) =>\n items.map(({title, ...rest}) => ({\n title: title && parseTitle(transformer, title),\n ...rest,\n }));\n\nfunction parsePriceDetailedBlock(transformer: Transformer, block: PriceDetailedProps) {\n const {priceType} = block;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n block.items = block.items.map((item) => {\n const {description, items: details = []} = item;\n\n if (priceType === 'marked-list') {\n item.items = (details as PriceDetailsListProps[]).map((detail) => {\n detail.text = detail.text && transformer(detail.text);\n\n return detail;\n });\n } else {\n item.items = (details as PriceDetailsSettingsProps[]).map((detail) => {\n detail.description = detail.description && transformer(detail.description);\n\n return detail;\n });\n }\n\n item.description = transformer(description);\n\n return item;\n });\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\n return block;\n}\n\nconst parseContentLayout = (transformer: Transformer, content: ContentBlockProps) => {\n if (content) {\n const {text, additionalInfo, list} = content;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n if (text) {\n content.text = transformer(text);\n }\n\n if (additionalInfo) {\n content.additionalInfo = transformer(additionalInfo);\n }\n\n if (list) {\n content.list = list.map((item) => {\n if (item?.text) {\n return {\n ...item,\n text: transformer(item.text),\n };\n }\n\n return item;\n });\n }\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n }\n\n return content;\n};\n\nfunction parseContentLayoutTitle(transformer: Transformer, content: ContentBlockProps) {\n if (content?.title) {\n const {title} = content;\n\n // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign\n content.title = title && parseTitle(transformer, title);\n }\n\n return content;\n}\n\nexport const blockHeaderTransformer = [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n parser: parseTitle,\n renderInline: true,\n },\n {\n fields: ['description'],\n transformer: yfmTransformer,\n },\n];\n\ninterface BlockConfig {\n transformer: TransformerRaw;\n fields?: string[];\n parser?: Parser;\n renderInline?: boolean;\n}\n\nexport type BlocksConfig = Record<string, BlockConfig | BlockConfig[]>;\n\nexport const config: BlocksConfig = {\n [SubBlockType.BasicCard]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BackgroundCard]: [\n {\n fields: ['title', 'text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [SubBlockType.ImageCard]: [\n {\n fields: ['title', 'text', 'additionalInfo'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [SubBlockType.LayoutItem]: [\n {\n fields: ['content'],\n parser: parseContentLayout,\n transformer: yfmTransformer,\n },\n {\n fields: ['content'],\n parser: parseContentLayoutTitle,\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['metaInfo'],\n parser: createItemsParser([]),\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.Quote]: [\n {\n fields: ['text', 'yfmText'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [BlockType.ExtendedFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title']),\n renderInline: true,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['list.text']),\n renderInline: true,\n },\n ],\n [BlockType.PromoFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parsePromoFeatures,\n },\n ],\n [BlockType.SliderOldBlock]: blockHeaderTransformer,\n [BlockType.SliderBlock]: blockHeaderTransformer,\n [BlockType.CompaniesBlock]: blockHeaderTransformer,\n [BlockType.QuestionsBlock]: [\n {\n fields: ['title', 'text', 'additionalInfo'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n [BlockType.FoldableListBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n\n [BlockType.BannerBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BannerCard]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.MediaBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [BlockType.MapBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['title', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.TabsBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo', 'caption']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseItemsTitle,\n renderInline: true,\n },\n ],\n [BlockType.TableBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['table'],\n transformer: yfmTransformer,\n parser: parseTableBlockLegend,\n },\n {\n fields: ['table'],\n transformer: yfmTransformer,\n parser: parseTableBlockContent,\n renderInline: true,\n },\n ],\n [BlockType.HeaderSliderBlock]: [\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'overtitle', 'description']),\n renderInline: true,\n },\n ],\n [SubBlockType.PriceDetailed]: [\n {\n transformer: yfmTransformer,\n parser: parsePriceDetailedBlock,\n },\n ],\n [BlockType.HeaderBlock]: [\n {\n fields: ['description', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['overtitle', 'title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [BlockType.ContentLayoutBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayoutTitle,\n renderInline: true,\n },\n ],\n [SubBlockType.Content]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: yfmTransformer,\n parser: parseTitle,\n renderInline: true,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'text']),\n },\n ],\n [BlockType.InfoBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['rightContent', 'leftContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['rightContent', 'leftContent'],\n transformer: yfmTransformer,\n parser: parseContentLayoutTitle,\n renderInline: true,\n },\n ],\n [BlockType.ShareBlock]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n ],\n [BlockType.CardLayoutBlock]: blockHeaderTransformer,\n [BlockType.FilterBlock]: blockHeaderTransformer,\n [BlockType.IconsBlock]: blockHeaderTransformer,\n [SubBlockType.PriceCard]: [\n {\n fields: ['title'],\n transformer: yfmTransformer,\n renderInline: true,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'text']),\n },\n ],\n [BlockType.FormBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayoutTitle,\n renderInline: true,\n },\n ],\n};\n"]}
|