UNPKG

@wordpress/block-library

Version:
1 lines • 21.6 kB
{"version":3,"file":"deprecated.cjs","names":["unlock","blockEditorPrivateApis","createBlock","useBlockProps","useInnerBlocksProps","InnerBlocks"],"sources":["../../src/query/deprecated.jsx"],"sourcesContent":["import { createBlock } from '@wordpress/blocks';\nimport {\n\tInnerBlocks,\n\tuseInnerBlocksProps,\n\tuseBlockProps,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { unlock } from '../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nconst migrateToTaxQuery = ( attributes ) => {\n\tconst { query } = attributes;\n\tconst { categoryIds, tagIds, taxQuery, ...newQuery } = query;\n\t// First `taxQuery` migration that moves `categoryIds` and `tagIds`\n\t// into `taxQuery` (v2 deprecation).\n\tif ( !! categoryIds?.length || !! tagIds?.length ) {\n\t\tnewQuery.taxQuery = {\n\t\t\tinclude: {\n\t\t\t\tcategory: !! categoryIds?.length ? categoryIds : undefined,\n\t\t\t\tpost_tag: !! tagIds?.length ? tagIds : undefined,\n\t\t\t},\n\t\t};\n\t}\n\t// Second `taxQuery` migration that changes the structure from\n\t// taxQuery: { taxonomy: [ids] } to\n\t// taxQuery: { include: { taxonomy: [ids] } } (v6 deprecation).\n\tif ( !! Object.keys( taxQuery || {} ).length ) {\n\t\tnewQuery.taxQuery = { include: taxQuery };\n\t}\n\treturn {\n\t\t...attributes,\n\t\tquery: newQuery,\n\t};\n};\n\nconst migrateColors = ( attributes, innerBlocks ) => {\n\t// Remove color style attributes from the Query block.\n\tconst { style, backgroundColor, gradient, textColor, ...newAttributes } =\n\t\tattributes;\n\n\tconst hasColorStyles =\n\t\tbackgroundColor ||\n\t\tgradient ||\n\t\ttextColor ||\n\t\tstyle?.color ||\n\t\tstyle?.elements?.link;\n\n\t// If the query block doesn't currently have any color styles,\n\t// nothing needs migrating.\n\tif ( ! hasColorStyles ) {\n\t\treturn [ attributes, innerBlocks ];\n\t}\n\n\t// Clean color values from style attribute object.\n\tif ( style ) {\n\t\tnewAttributes.style = cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tcolor: undefined,\n\t\t\telements: {\n\t\t\t\t...style.elements,\n\t\t\t\tlink: undefined,\n\t\t\t},\n\t\t} );\n\t}\n\n\t// If the inner blocks are already wrapped in a single group\n\t// block, add the color support styles to that group block.\n\tif ( hasSingleInnerGroupBlock( innerBlocks ) ) {\n\t\tconst groupBlock = innerBlocks[ 0 ];\n\n\t\t// Create new styles for the group block.\n\t\tconst hasStyles =\n\t\t\tstyle?.color ||\n\t\t\tstyle?.elements?.link ||\n\t\t\tgroupBlock.attributes.style;\n\n\t\tconst newStyles = hasStyles\n\t\t\t? cleanEmptyObject( {\n\t\t\t\t\t...groupBlock.attributes.style,\n\t\t\t\t\tcolor: style?.color,\n\t\t\t\t\telements: style?.elements?.link\n\t\t\t\t\t\t? { link: style?.elements?.link }\n\t\t\t\t\t\t: undefined,\n\t\t\t\t} )\n\t\t\t: undefined;\n\n\t\t// Create a new Group block from the original.\n\t\tconst updatedGroupBlock = createBlock(\n\t\t\t'core/group',\n\t\t\t{\n\t\t\t\t...groupBlock.attributes,\n\t\t\t\tbackgroundColor,\n\t\t\t\tgradient,\n\t\t\t\ttextColor,\n\t\t\t\tstyle: newStyles,\n\t\t\t},\n\t\t\tgroupBlock.innerBlocks\n\t\t);\n\n\t\treturn [ newAttributes, [ updatedGroupBlock ] ];\n\t}\n\n\t// When we don't have a single wrapping group block for the inner\n\t// blocks, wrap the current inner blocks in a group applying the\n\t// color styles to that.\n\tconst newGroupBlock = createBlock(\n\t\t'core/group',\n\t\t{\n\t\t\tbackgroundColor,\n\t\t\tgradient,\n\t\t\ttextColor,\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\tcolor: style?.color,\n\t\t\t\telements: style?.elements?.link\n\t\t\t\t\t? { link: style?.elements?.link }\n\t\t\t\t\t: undefined,\n\t\t\t} ),\n\t\t},\n\t\tinnerBlocks\n\t);\n\n\treturn [ newAttributes, [ newGroupBlock ] ];\n};\n\nconst hasSingleInnerGroupBlock = ( innerBlocks = [] ) =>\n\tinnerBlocks.length === 1 && innerBlocks[ 0 ].name === 'core/group';\n\nconst migrateToConstrainedLayout = ( attributes ) => {\n\tconst { layout = null } = attributes;\n\tif ( ! layout ) {\n\t\treturn attributes;\n\t}\n\tconst { inherit = null, contentSize = null, ...newLayout } = layout;\n\n\tif ( inherit || contentSize ) {\n\t\treturn {\n\t\t\t...attributes,\n\t\t\tlayout: {\n\t\t\t\t...newLayout,\n\t\t\t\tcontentSize,\n\t\t\t\ttype: 'constrained',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn attributes;\n};\n\nconst findPostTemplateBlock = ( innerBlocks = [] ) => {\n\tlet foundBlock = null;\n\tfor ( const block of innerBlocks ) {\n\t\tif ( block.name === 'core/post-template' ) {\n\t\t\tfoundBlock = block;\n\t\t\tbreak;\n\t\t} else if ( block.innerBlocks.length ) {\n\t\t\tfoundBlock = findPostTemplateBlock( block.innerBlocks );\n\t\t}\n\t}\n\treturn foundBlock;\n};\n\nconst replacePostTemplateBlock = ( innerBlocks = [], replacementBlock ) => {\n\tinnerBlocks.forEach( ( block, index ) => {\n\t\tif ( block.name === 'core/post-template' ) {\n\t\t\tinnerBlocks.splice( index, 1, replacementBlock );\n\t\t} else if ( block.innerBlocks.length ) {\n\t\t\tblock.innerBlocks = replacePostTemplateBlock(\n\t\t\t\tblock.innerBlocks,\n\t\t\t\treplacementBlock\n\t\t\t);\n\t\t}\n\t} );\n\treturn innerBlocks;\n};\n\nconst migrateDisplayLayout = ( attributes, innerBlocks ) => {\n\tconst { displayLayout = null, ...newAttributes } = attributes;\n\tif ( ! displayLayout ) {\n\t\treturn [ attributes, innerBlocks ];\n\t}\n\tconst postTemplateBlock = findPostTemplateBlock( innerBlocks );\n\tif ( ! postTemplateBlock ) {\n\t\treturn [ attributes, innerBlocks ];\n\t}\n\n\tconst { type, columns } = displayLayout;\n\n\t// Convert custom displayLayout values to canonical layout types.\n\tconst updatedLayoutType = type === 'flex' ? 'grid' : 'default';\n\n\tconst newPostTemplateBlock = createBlock(\n\t\t'core/post-template',\n\t\t{\n\t\t\t...postTemplateBlock.attributes,\n\t\t\tlayout: {\n\t\t\t\ttype: updatedLayoutType,\n\t\t\t\t...( columns && { columnCount: columns } ),\n\t\t\t},\n\t\t},\n\t\tpostTemplateBlock.innerBlocks\n\t);\n\treturn [\n\t\tnewAttributes,\n\t\treplacePostTemplateBlock( innerBlocks, newPostTemplateBlock ),\n\t];\n};\n\n// Version with NO wrapper `div` element.\nconst v1 = {\n\tattributes: {\n\t\tqueryId: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tquery: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\tperPage: null,\n\t\t\t\tpages: 0,\n\t\t\t\toffset: 0,\n\t\t\t\tpostType: 'post',\n\t\t\t\tcategoryIds: [],\n\t\t\t\ttagIds: [],\n\t\t\t\torder: 'desc',\n\t\t\t\torderBy: 'date',\n\t\t\t\tauthor: '',\n\t\t\t\tsearch: '',\n\t\t\t\texclude: [],\n\t\t\t\tsticky: '',\n\t\t\t\tinherit: true,\n\t\t\t},\n\t\t},\n\t\tlayout: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\ttype: 'list',\n\t\t\t},\n\t\t},\n\t},\n\tsupports: {\n\t\thtml: false,\n\t},\n\tmigrate( attributes, innerBlocks ) {\n\t\tconst withTaxQuery = migrateToTaxQuery( attributes );\n\t\tconst { layout, ...restWithTaxQuery } = withTaxQuery;\n\t\tconst newAttributes = {\n\t\t\t...restWithTaxQuery,\n\t\t\tdisplayLayout: withTaxQuery.layout,\n\t\t};\n\t\treturn migrateDisplayLayout( newAttributes, innerBlocks );\n\t},\n\tsave() {\n\t\treturn <InnerBlocks.Content />;\n\t},\n};\n\n// Version with `categoryIds and tagIds`.\nconst v2 = {\n\tattributes: {\n\t\tqueryId: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tquery: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\tperPage: null,\n\t\t\t\tpages: 0,\n\t\t\t\toffset: 0,\n\t\t\t\tpostType: 'post',\n\t\t\t\tcategoryIds: [],\n\t\t\t\ttagIds: [],\n\t\t\t\torder: 'desc',\n\t\t\t\torderBy: 'date',\n\t\t\t\tauthor: '',\n\t\t\t\tsearch: '',\n\t\t\t\texclude: [],\n\t\t\t\tsticky: '',\n\t\t\t\tinherit: true,\n\t\t\t},\n\t\t},\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t\tdisplayLayout: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\ttype: 'list',\n\t\t\t},\n\t\t},\n\t},\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t},\n\t\tlayout: true,\n\t},\n\tisEligible: ( { query: { categoryIds, tagIds } = {} } ) =>\n\t\tcategoryIds || tagIds,\n\tmigrate( attributes, innerBlocks ) {\n\t\tconst withTaxQuery = migrateToTaxQuery( attributes );\n\t\tconst [ withColorAttributes, withColorInnerBlocks ] = migrateColors(\n\t\t\twithTaxQuery,\n\t\t\tinnerBlocks\n\t\t);\n\t\tconst withConstrainedLayoutAttributes =\n\t\t\tmigrateToConstrainedLayout( withColorAttributes );\n\t\treturn migrateDisplayLayout(\n\t\t\twithConstrainedLayoutAttributes,\n\t\t\twithColorInnerBlocks\n\t\t);\n\t},\n\tsave( { attributes: { tagName: Tag = 'div' } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\t\treturn <Tag { ...innerBlocksProps } />;\n\t},\n};\n\n// Version with color support prior to moving it to the PostTemplate block.\nconst v3 = {\n\tattributes: {\n\t\tqueryId: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tquery: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\tperPage: null,\n\t\t\t\tpages: 0,\n\t\t\t\toffset: 0,\n\t\t\t\tpostType: 'post',\n\t\t\t\torder: 'desc',\n\t\t\t\torderBy: 'date',\n\t\t\t\tauthor: '',\n\t\t\t\tsearch: '',\n\t\t\t\texclude: [],\n\t\t\t\tsticky: '',\n\t\t\t\tinherit: true,\n\t\t\t\ttaxQuery: null,\n\t\t\t\tparents: [],\n\t\t\t},\n\t\t},\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t\tdisplayLayout: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\ttype: 'list',\n\t\t\t},\n\t\t},\n\t\tnamespace: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t\tlayout: true,\n\t},\n\tisEligible( attributes ) {\n\t\tconst { style, backgroundColor, gradient, textColor } = attributes;\n\t\treturn (\n\t\t\tbackgroundColor ||\n\t\t\tgradient ||\n\t\t\ttextColor ||\n\t\t\tstyle?.color ||\n\t\t\tstyle?.elements?.link\n\t\t);\n\t},\n\tmigrate( attributes, innerBlocks ) {\n\t\tconst [ withColorAttributes, withColorInnerBlocks ] = migrateColors(\n\t\t\tattributes,\n\t\t\tinnerBlocks\n\t\t);\n\t\tconst withConstrainedLayoutAttributes =\n\t\t\tmigrateToConstrainedLayout( withColorAttributes );\n\t\treturn migrateDisplayLayout(\n\t\t\twithConstrainedLayoutAttributes,\n\t\t\twithColorInnerBlocks\n\t\t);\n\t},\n\tsave( { attributes: { tagName: Tag = 'div' } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\t\treturn <Tag { ...innerBlocksProps } />;\n\t},\n};\n\nconst v4 = {\n\tattributes: {\n\t\tqueryId: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tquery: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\tperPage: null,\n\t\t\t\tpages: 0,\n\t\t\t\toffset: 0,\n\t\t\t\tpostType: 'post',\n\t\t\t\torder: 'desc',\n\t\t\t\torderBy: 'date',\n\t\t\t\tauthor: '',\n\t\t\t\tsearch: '',\n\t\t\t\texclude: [],\n\t\t\t\tsticky: '',\n\t\t\t\tinherit: true,\n\t\t\t\ttaxQuery: null,\n\t\t\t\tparents: [],\n\t\t\t},\n\t\t},\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t\tdisplayLayout: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\ttype: 'list',\n\t\t\t},\n\t\t},\n\t\tnamespace: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t\tlayout: true,\n\t},\n\tsave( { attributes: { tagName: Tag = 'div' } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\t\treturn <Tag { ...innerBlocksProps } />;\n\t},\n\tisEligible: ( { layout } ) =>\n\t\tlayout?.inherit ||\n\t\t( layout?.contentSize && layout?.type !== 'constrained' ),\n\tmigrate( attributes, innerBlocks ) {\n\t\tconst withConstrainedLayoutAttributes =\n\t\t\tmigrateToConstrainedLayout( attributes );\n\t\treturn migrateDisplayLayout(\n\t\t\twithConstrainedLayoutAttributes,\n\t\t\tinnerBlocks\n\t\t);\n\t},\n};\n\nconst v5 = {\n\tattributes: {\n\t\tqueryId: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tquery: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\tperPage: null,\n\t\t\t\tpages: 0,\n\t\t\t\toffset: 0,\n\t\t\t\tpostType: 'post',\n\t\t\t\torder: 'desc',\n\t\t\t\torderBy: 'date',\n\t\t\t\tauthor: '',\n\t\t\t\tsearch: '',\n\t\t\t\texclude: [],\n\t\t\t\tsticky: '',\n\t\t\t\tinherit: true,\n\t\t\t\ttaxQuery: null,\n\t\t\t\tparents: [],\n\t\t\t},\n\t\t},\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t\tdisplayLayout: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\ttype: 'list',\n\t\t\t},\n\t\t},\n\t\tnamespace: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\tanchor: true,\n\t\thtml: false,\n\t\tlayout: true,\n\t},\n\tsave( { attributes: { tagName: Tag = 'div' } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\t\treturn <Tag { ...innerBlocksProps } />;\n\t},\n\tisEligible: ( { displayLayout } ) => {\n\t\treturn !! displayLayout;\n\t},\n\tmigrate: migrateDisplayLayout,\n};\n\nconst v6 = {\n\tattributes: {\n\t\tqueryId: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tquery: {\n\t\t\ttype: 'object',\n\t\t\tdefault: {\n\t\t\t\tperPage: null,\n\t\t\t\tpages: 0,\n\t\t\t\toffset: 0,\n\t\t\t\tpostType: 'post',\n\t\t\t\torder: 'desc',\n\t\t\t\torderBy: 'date',\n\t\t\t\tauthor: '',\n\t\t\t\tsearch: '',\n\t\t\t\texclude: [],\n\t\t\t\tsticky: '',\n\t\t\t\tinherit: true,\n\t\t\t\ttaxQuery: null,\n\t\t\t\tparents: [],\n\t\t\t\tformat: [],\n\t\t\t},\n\t\t},\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t\tnamespace: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tenhancedPagination: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tlayout: true,\n\t\tinteractivity: true,\n\t\tcontentRole: true,\n\t},\n\tsave( { attributes: { tagName: Tag = 'div' } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\t\treturn <Tag { ...innerBlocksProps } />;\n\t},\n\tisEligible: ( { query: { taxQuery } = {} } ) =>\n\t\t!! taxQuery &&\n\t\tObject.keys( taxQuery ).some(\n\t\t\t( key ) => ! [ 'include', 'exclude' ].includes( key )\n\t\t),\n\tmigrate( attributes, innerBlocks ) {\n\t\tconst withTaxQuery = migrateToTaxQuery( attributes );\n\t\treturn migrateDisplayLayout( withTaxQuery, innerBlocks );\n\t},\n};\n\nconst deprecated = [ v6, v5, v4, v3, v2, v1 ];\n\nexport default deprecated;\n"],"mappings":";;;;;;;;;;AASA,MAAM,EAAE,sBAAA,GAAqBA,kBAAAA,OAAAA,CAAQC,wBAAAA,WAAuB;AAE5D,MAAM,qBAAsB,eAAgB;CAC3C,MAAM,EAAE,UAAU;CAClB,MAAM,EAAE,aAAa,QAAQ,UAAU,GAAG,aAAa;CAGvD,IAAK,CAAC,CAAE,aAAa,UAAU,CAAC,CAAE,QAAQ,QACzC,SAAS,WAAW,EACnB,SAAS;EACR,UAAU,CAAC,CAAE,aAAa,SAAS,cAAc,KAAA;EACjD,UAAU,CAAC,CAAE,QAAQ,SAAS,SAAS,KAAA;CACxC,EACD;CAKD,IAAK,CAAC,CAAE,OAAO,KAAM,YAAY,CAAC,CAAE,CAAC,CAAC,QACrC,SAAS,WAA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