@gravity-ui/page-constructor 8.5.0-alpha.6 → 8.5.0-alpha.8

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.
@@ -4,7 +4,13 @@ exports.blockBaseExtension = exports.BlockBaseExtensionBlockWrapper = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const BlockBase_1 = tslib_1.__importDefault(require("../../components/BlockBase/BlockBase.js"));
7
- const BlockBaseExtensionBlockWrapper = ({ props, content, children }) => ((0, jsx_runtime_1.jsx)(BlockBase_1.default, { anchor: content?.anchor ?? props?.anchor, indent: content?.indent ?? props?.indent, visible: content?.visible ?? props?.visible, resetPaddings: content?.resetPaddings ?? props?.resetPaddings, qa: content?.qa ?? props?.qa, children: children }));
7
+ const BlockBaseExtensionBlockWrapper = ({ props, content, children, type }) => {
8
+ let defaultIndent;
9
+ if (type.includes('header-block')) {
10
+ defaultIndent = { top: '0', bottom: '0' };
11
+ }
12
+ return ((0, jsx_runtime_1.jsx)(BlockBase_1.default, { anchor: content?.anchor ?? props?.anchor, indent: content?.indent ?? props?.indent ?? defaultIndent, visible: content?.visible ?? props?.visible, resetPaddings: content?.resetPaddings ?? props?.resetPaddings, qa: content?.qa ?? props?.qa, children: children }));
13
+ };
8
14
  exports.BlockBaseExtensionBlockWrapper = BlockBaseExtensionBlockWrapper;
9
15
  const blockBaseExtension = () => ({
10
16
  name: 'Block Base',
@@ -1 +1 @@
1
- {"version":3,"file":"BlockBaseExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/BlockBaseExtension.tsx"],"names":[],"mappings":";;;;;AAEA,gGAA6D;AAItD,MAAM,8BAA8B,GAEvC,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,CAChC,uBAAC,mBAAS,IACN,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,EAC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EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;4BACb,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,oBAAoB;wBAC3B,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC;4BACjC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;yBACxC;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC,CAAC;AAhEU,QAAA,kBAAkB,sBAgE5B","sourcesContent":["import * as React from 'react';\n\nimport BlockBase from '../../components/BlockBase/BlockBase';\nimport type {PageConstructorExtension} from '../../containers/PageConstructor/PageConstructor';\nimport type {BlockBaseProps, BlockWrapperDataProps} from '../../models';\n\nexport const BlockBaseExtensionBlockWrapper: React.FC<\n BlockWrapperDataProps<BlockBaseProps> & React.PropsWithChildren\n> = ({props, content, children}) => (\n <BlockBase\n anchor={content?.anchor ?? props?.anchor}\n indent={content?.indent ?? props?.indent}\n visible={content?.visible ?? props?.visible}\n resetPaddings={content?.resetPaddings ?? props?.resetPaddings}\n qa={content?.qa ?? props?.qa}\n >\n {children}\n </BlockBase>\n);\n\nexport const blockBaseExtension = (): PageConstructorExtension<{}, {}, BlockBaseProps> => ({\n name: 'Block Base',\n id: '@gravity-ui/page-constructor/block-base',\n settings: {\n blockWrapper: BlockBaseExtensionBlockWrapper,\n blockInputs: [\n {\n type: 'section',\n title: 'Block Base',\n fields: [\n {\n type: 'textInput',\n title: 'Anchor',\n name: 'anchor.url',\n },\n {\n type: 'textInput',\n title: 'Anchor text',\n name: 'anchor.text',\n },\n {\n type: 'select',\n title: 'Top indent',\n name: 'indent.top',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Bottom indent',\n name: 'indent.bottom',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Hide on breakpoint',\n name: 'visible',\n hasClear: true,\n options: [\n {value: 'sm', content: 'SM only'},\n {value: 'md', content: 'MD and down'},\n {value: 'lg', content: 'LG and down'},\n {value: 'xl', content: 'XL and down'},\n ],\n },\n ],\n },\n ],\n },\n});\n"]}
1
+ {"version":3,"file":"BlockBaseExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/BlockBaseExtension.tsx"],"names":[],"mappings":";;;;;AAEA,gGAA6D;AAKtD,MAAM,8BAA8B,GAEvC,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAC,EAAE,EAAE;IACrC,IAAI,aAAa,CAAC;IAElB,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;QAChC,aAAa,GAAG,EAAC,GAAG,EAAE,GAAkB,EAAE,MAAM,EAAE,GAAkB,EAAC,CAAC;IAC1E,CAAC;IAED,OAAO,CACH,uBAAC,mBAAS,IACN,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,EACxC,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,IAAI,aAAa,EACzD,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,OAAO,EAC3C,aAAa,EAAE,OAAO,EAAE,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AAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,oBAAoB;wBAC3B,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC;4BACjC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;yBACxC;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC,CAAC;AAhEU,QAAA,kBAAkB,sBAgE5B","sourcesContent":["import * as React from 'react';\n\nimport BlockBase from '../../components/BlockBase/BlockBase';\nimport type {PageConstructorExtension} from '../../containers/PageConstructor/PageConstructor';\nimport type {BlockBaseProps, BlockWrapperDataProps} from '../../models';\nimport {IndentValue} from '../grid';\n\nexport const BlockBaseExtensionBlockWrapper: React.FC<\n BlockWrapperDataProps<BlockBaseProps> & React.PropsWithChildren\n> = ({props, content, children, type}) => {\n let defaultIndent;\n\n if (type.includes('header-block')) {\n defaultIndent = {top: '0' as IndentValue, bottom: '0' as IndentValue};\n }\n\n return (\n <BlockBase\n anchor={content?.anchor ?? props?.anchor}\n indent={content?.indent ?? props?.indent ?? defaultIndent}\n visible={content?.visible ?? props?.visible}\n resetPaddings={content?.resetPaddings ?? props?.resetPaddings}\n qa={content?.qa ?? props?.qa}\n >\n {children}\n </BlockBase>\n );\n};\n\nexport const blockBaseExtension = (): PageConstructorExtension<{}, {}, BlockBaseProps> => ({\n name: 'Block Base',\n id: '@gravity-ui/page-constructor/block-base',\n settings: {\n blockWrapper: BlockBaseExtensionBlockWrapper,\n blockInputs: [\n {\n type: 'section',\n title: 'Block Base',\n fields: [\n {\n type: 'textInput',\n title: 'Anchor',\n name: 'anchor.url',\n },\n {\n type: 'textInput',\n title: 'Anchor text',\n name: 'anchor.text',\n },\n {\n type: 'select',\n title: 'Top indent',\n name: 'indent.top',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Bottom indent',\n name: 'indent.bottom',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Hide on breakpoint',\n name: 'visible',\n hasClear: true,\n options: [\n {value: 'sm', content: 'SM only'},\n {value: 'md', content: 'MD and down'},\n {value: 'lg', content: 'LG and down'},\n {value: 'xl', content: 'XL and down'},\n ],\n },\n ],\n },\n ],\n },\n});\n"]}
@@ -1,6 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import BlockBase from "../../components/BlockBase/BlockBase.js";
3
- export const BlockBaseExtensionBlockWrapper = ({ props, content, children }) => (_jsx(BlockBase, { anchor: content?.anchor ?? props?.anchor, indent: content?.indent ?? props?.indent, visible: content?.visible ?? props?.visible, resetPaddings: content?.resetPaddings ?? props?.resetPaddings, qa: content?.qa ?? props?.qa, children: children }));
3
+ export const BlockBaseExtensionBlockWrapper = ({ props, content, children, type }) => {
4
+ let defaultIndent;
5
+ if (type.includes('header-block')) {
6
+ defaultIndent = { top: '0', bottom: '0' };
7
+ }
8
+ return (_jsx(BlockBase, { anchor: content?.anchor ?? props?.anchor, indent: content?.indent ?? props?.indent ?? defaultIndent, visible: content?.visible ?? props?.visible, resetPaddings: content?.resetPaddings ?? props?.resetPaddings, qa: content?.qa ?? props?.qa, children: children }));
9
+ };
4
10
  export const blockBaseExtension = () => ({
5
11
  name: 'Block Base',
6
12
  id: '@gravity-ui/page-constructor/block-base',
@@ -1 +1 @@
1
- {"version":3,"file":"BlockBaseExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/BlockBaseExtension.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,gDAA6C;AAI7D,MAAM,CAAC,MAAM,8BAA8B,GAEvC,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,CAChC,KAAC,SAAS,IACN,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,EACxC,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,EACxC,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,OAAO,EAC3C,aAAa,EAAE,OAAO,EAAE,aAAa,IAAI,KAAK,EAAE,aAAa,EAC7D,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,KAAK,EAAE,EAAE,YAE3B,QAAQ,GACD,CACf,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAqD,EAAE,CAAC,CAAC;IACvF,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,yCAAyC;IAC7C,QAAQ,EAAE;QACN,YAAY,EAAE,8BAA8B;QAC5C,WAAW,EAAE;YACT;gBACI,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,YAAY;gBACnB,MAAM,EAAE;oBACJ;wBACI,IAAI,EAAE,WAAW;wBACjB,KAAK,EAAE,QAAQ;wBACf,IAAI,EAAE,YAAY;qBACrB;oBACD;wBACI,IAAI,EAAE,WAAW;wBACjB,KAAK,EAAE,aAAa;wBACpB,IAAI,EAAE,aAAa;qBACtB;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,YAAY;wBACnB,IAAI,EAAE,YAAY;wBAClB,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;4BACb,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE,eAAe;wBACrB,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;4BACb,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,oBAAoB;wBAC3B,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC;4BACjC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;yBACxC;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport BlockBase from '../../components/BlockBase/BlockBase';\nimport type {PageConstructorExtension} from '../../containers/PageConstructor/PageConstructor';\nimport type {BlockBaseProps, BlockWrapperDataProps} from '../../models';\n\nexport const BlockBaseExtensionBlockWrapper: React.FC<\n BlockWrapperDataProps<BlockBaseProps> & React.PropsWithChildren\n> = ({props, content, children}) => (\n <BlockBase\n anchor={content?.anchor ?? props?.anchor}\n indent={content?.indent ?? props?.indent}\n visible={content?.visible ?? props?.visible}\n resetPaddings={content?.resetPaddings ?? props?.resetPaddings}\n qa={content?.qa ?? props?.qa}\n >\n {children}\n </BlockBase>\n);\n\nexport const blockBaseExtension = (): PageConstructorExtension<{}, {}, BlockBaseProps> => ({\n name: 'Block Base',\n id: '@gravity-ui/page-constructor/block-base',\n settings: {\n blockWrapper: BlockBaseExtensionBlockWrapper,\n blockInputs: [\n {\n type: 'section',\n title: 'Block Base',\n fields: [\n {\n type: 'textInput',\n title: 'Anchor',\n name: 'anchor.url',\n },\n {\n type: 'textInput',\n title: 'Anchor text',\n name: 'anchor.text',\n },\n {\n type: 'select',\n title: 'Top indent',\n name: 'indent.top',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Bottom indent',\n name: 'indent.bottom',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Hide on breakpoint',\n name: 'visible',\n hasClear: true,\n options: [\n {value: 'sm', content: 'SM only'},\n {value: 'md', content: 'MD and down'},\n {value: 'lg', content: 'LG and down'},\n {value: 'xl', content: 'XL and down'},\n ],\n },\n ],\n },\n ],\n },\n});\n"]}
1
+ {"version":3,"file":"BlockBaseExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/BlockBaseExtension.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,gDAA6C;AAK7D,MAAM,CAAC,MAAM,8BAA8B,GAEvC,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAC,EAAE,EAAE;IACrC,IAAI,aAAa,CAAC;IAElB,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;QAChC,aAAa,GAAG,EAAC,GAAG,EAAE,GAAkB,EAAE,MAAM,EAAE,GAAk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AQ;wBACd,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE,eAAe;wBACrB,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;4BACb,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,oBAAoB;wBAC3B,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC;4BACjC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;yBACxC;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport BlockBase from '../../components/BlockBase/BlockBase';\nimport type {PageConstructorExtension} from '../../containers/PageConstructor/PageConstructor';\nimport type {BlockBaseProps, BlockWrapperDataProps} from '../../models';\nimport {IndentValue} from '../grid';\n\nexport const BlockBaseExtensionBlockWrapper: React.FC<\n BlockWrapperDataProps<BlockBaseProps> & React.PropsWithChildren\n> = ({props, content, children, type}) => {\n let defaultIndent;\n\n if (type.includes('header-block')) {\n defaultIndent = {top: '0' as IndentValue, bottom: '0' as IndentValue};\n }\n\n return (\n <BlockBase\n anchor={content?.anchor ?? props?.anchor}\n indent={content?.indent ?? props?.indent ?? defaultIndent}\n visible={content?.visible ?? props?.visible}\n resetPaddings={content?.resetPaddings ?? props?.resetPaddings}\n qa={content?.qa ?? props?.qa}\n >\n {children}\n </BlockBase>\n );\n};\n\nexport const blockBaseExtension = (): PageConstructorExtension<{}, {}, BlockBaseProps> => ({\n name: 'Block Base',\n id: '@gravity-ui/page-constructor/block-base',\n settings: {\n blockWrapper: BlockBaseExtensionBlockWrapper,\n blockInputs: [\n {\n type: 'section',\n title: 'Block Base',\n fields: [\n {\n type: 'textInput',\n title: 'Anchor',\n name: 'anchor.url',\n },\n {\n type: 'textInput',\n title: 'Anchor text',\n name: 'anchor.text',\n },\n {\n type: 'select',\n title: 'Top indent',\n name: 'indent.top',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Bottom indent',\n name: 'indent.bottom',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Hide on breakpoint',\n name: 'visible',\n hasClear: true,\n options: [\n {value: 'sm', content: 'SM only'},\n {value: 'md', content: 'MD and down'},\n {value: 'lg', content: 'LG and down'},\n {value: 'xl', content: 'XL and down'},\n ],\n },\n ],\n },\n ],\n },\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "8.5.0-alpha.6",
3
+ "version": "8.5.0-alpha.8",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",