diff --git a/src/block/accordion/deprecated.js b/src/block/accordion/deprecated.js index 7434314cb..962ab1715 100644 --- a/src/block/accordion/deprecated.js +++ b/src/block/accordion/deprecated.js @@ -23,6 +23,8 @@ const deprecated = [ newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) return newAttributes }, @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -52,7 +56,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/blockquote/deprecated.js b/src/block/blockquote/deprecated.js index 38a4aefdb..da35e425a 100644 --- a/src/block/blockquote/deprecated.js +++ b/src/block/blockquote/deprecated.js @@ -15,14 +15,20 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, migrate: attributes => { - let newAttributes = { ...attributes } + let newAttributes = { + ...attributes, + version: 2, + } newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) return newAttributes }, @@ -44,6 +50,8 @@ const deprecated = [ version: 2, } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) @@ -85,6 +93,8 @@ const deprecated = [ } } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) diff --git a/src/block/button-group/deprecated/index.js b/src/block/button-group/deprecated/index.js index ea2d66e33..55251ee12 100644 --- a/src/block/button-group/deprecated/index.js +++ b/src/block/button-group/deprecated/index.js @@ -25,6 +25,8 @@ const deprecated = [ newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) return newAttributes }, @@ -44,6 +46,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -53,7 +57,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/button/deprecated.js b/src/block/button/deprecated.js index 644acc839..e7b1f9feb 100644 --- a/src/block/button/deprecated.js +++ b/src/block/button/deprecated.js @@ -25,7 +25,10 @@ const deprecated = [ newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) - newAttributes = deprecateShadowColor.migrate( 'button%s' )( attributes ) + newAttributes = deprecateShadowColor.migrate( 'button%s' )( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateButtonGradientColor.migrate( 'button%s' )( newAttributes ) return newAttributes }, @@ -47,6 +50,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateButtonGradientColor.migrate( 'button%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'button%s' )( newAttributes ) return newAttributes }, @@ -58,6 +64,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateButtonGradientColor.migrate( 'button%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'button%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/call-to-action/deprecated.js b/src/block/call-to-action/deprecated.js index 60b67c2ce..e185c0314 100644 --- a/src/block/call-to-action/deprecated.js +++ b/src/block/call-to-action/deprecated.js @@ -44,18 +44,69 @@ const deprecated = [ const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes ) const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow + return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) - return newAttributes + return [ newAttributes, innerBlocks ] }, }, // Support the new combined opacity and color. @@ -122,6 +173,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return [ newAttributes, innerBlocks ] }, @@ -200,6 +255,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/card/deprecated.js b/src/block/card/deprecated.js index 7fdfa2ea4..da6cd555b 100644 --- a/src/block/card/deprecated.js +++ b/src/block/card/deprecated.js @@ -93,16 +93,68 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes ), + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) - return newAttributes + return [ newAttributes, innerBlocks ] }, }, { @@ -170,6 +222,8 @@ const deprecated = [ newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes ), newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, @@ -249,6 +303,8 @@ const deprecated = [ newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes ), newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/carousel/deprecated.js b/src/block/carousel/deprecated.js index 53d9c18ea..047bfa76c 100644 --- a/src/block/carousel/deprecated.js +++ b/src/block/carousel/deprecated.js @@ -27,6 +27,8 @@ const deprecated = [ newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) return newAttributes }, @@ -46,6 +48,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, diff --git a/src/block/column/deprecated.js b/src/block/column/deprecated.js index ac8bdc3d3..1c889b75e 100644 --- a/src/block/column/deprecated.js +++ b/src/block/column/deprecated.js @@ -82,16 +82,71 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 4, + className: classnames( attributes.className, { + 'stk-block-column--v2': false, + 'stk-block-column--v3': false, + } ), + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) - return newAttributes + return [ newAttributes, innerBlocks ] }, }, { @@ -162,6 +217,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, @@ -244,6 +301,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/columns/deprecated.js b/src/block/columns/deprecated.js index caf351751..8b6d5db02 100644 --- a/src/block/columns/deprecated.js +++ b/src/block/columns/deprecated.js @@ -45,12 +45,20 @@ const deprecated = [ const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes ) const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes ) + const hasColumnFit = !! attributes.columnFit - return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow + return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || hasColumnFit }, migrate: attributes => { - let newAttributes = { ...attributes } + let newAttributes = { + ...attributes, + columnFit: '', + columnFitAlign: '', + columnJustify: !! attributes.columnFit ? ( attributes.columnFitAlign || 'flex-start' ) : '', + } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) @@ -80,6 +88,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, @@ -102,6 +114,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, diff --git a/src/block/count-up/deprecated.js b/src/block/count-up/deprecated.js index d9a18b572..0db656007 100644 --- a/src/block/count-up/deprecated.js +++ b/src/block/count-up/deprecated.js @@ -22,6 +22,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -46,6 +49,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, @@ -57,6 +63,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/countdown/deprecated.js b/src/block/countdown/deprecated.js index 9de29a4e8..31e834a1a 100644 --- a/src/block/countdown/deprecated.js +++ b/src/block/countdown/deprecated.js @@ -15,12 +15,18 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'digit%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'label%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'message%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -49,6 +55,8 @@ const deprecated = [ newAttributes = deprecateTypographyGradientColor.migrate( 'digit%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'label%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'message%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -90,6 +98,8 @@ const deprecated = [ newAttributes = deprecateTypographyGradientColor.migrate( 'digit%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'label%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'message%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -103,6 +113,8 @@ const deprecated = [ newAttributes = deprecateTypographyGradientColor.migrate( 'digit%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'label%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'message%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, diff --git a/src/block/divider/deprecated.js b/src/block/divider/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/divider/deprecated.js +++ b/src/block/divider/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/expand/deprecated.js b/src/block/expand/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/expand/deprecated.js +++ b/src/block/expand/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/feature-grid/deprecated.js b/src/block/feature-grid/deprecated.js index c17f2cb76..d863d3c19 100644 --- a/src/block/feature-grid/deprecated.js +++ b/src/block/feature-grid/deprecated.js @@ -47,12 +47,20 @@ const deprecated = [ const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes ) const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes ) + const hasColumnFit = !! attributes.columnFit - return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow + return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || hasColumnFit }, migrate: attributes => { - let newAttributes = { ...attributes } + let newAttributes = { + ...attributes, + columnFit: '', + columnFitAlign: '', + columnJustify: !! attributes.columnFit ? ( attributes.columnFitAlign || 'flex-start' ) : '', + } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) @@ -82,6 +90,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, @@ -100,6 +112,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, diff --git a/src/block/feature/deprecated.js b/src/block/feature/deprecated.js index 6c9890522..851ca5574 100644 --- a/src/block/feature/deprecated.js +++ b/src/block/feature/deprecated.js @@ -71,12 +71,29 @@ const deprecated = [ const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes ) const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow + return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || isNotV4 }, migrate: attributes => { - let newAttributes = { ...attributes } + let newAttributes = { + ...attributes, + version: 2, + } + + // Update the old column fit into flexbox + const hasOldColumnFit = !! attributes.columnFit + if ( hasOldColumnFit ) { + newAttributes = { + ...newAttributes, + columnFit: '', + columnFitAlign: '', + columnJustify: attributes.columnFitAlign, + } + } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) @@ -115,6 +132,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, @@ -167,6 +188,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, diff --git a/src/block/heading/deprecated.js b/src/block/heading/deprecated.js index 97b7c590d..e8cc3be19 100644 --- a/src/block/heading/deprecated.js +++ b/src/block/heading/deprecated.js @@ -48,6 +48,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -72,6 +75,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, @@ -83,6 +89,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/hero/deprecated.js b/src/block/hero/deprecated.js index 1d6da3d34..cc43238e3 100644 --- a/src/block/hero/deprecated.js +++ b/src/block/hero/deprecated.js @@ -44,12 +44,63 @@ const deprecated = [ const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes ) const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow + return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) @@ -122,6 +173,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return newAttributes }, @@ -201,6 +256,10 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/horizontal-scroller/deprecated.js b/src/block/horizontal-scroller/deprecated.js index 47ffde6e0..a3d054b75 100644 --- a/src/block/horizontal-scroller/deprecated.js +++ b/src/block/horizontal-scroller/deprecated.js @@ -35,6 +35,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -56,6 +58,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -65,7 +69,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/icon-box/deprecated.js b/src/block/icon-box/deprecated.js index 4d270e69c..7a6bc048e 100644 --- a/src/block/icon-box/deprecated.js +++ b/src/block/icon-box/deprecated.js @@ -15,12 +15,29 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, migrate: attributes => { - let newAttributes = { ...attributes } + let newAttributes = { + ...attributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -57,6 +74,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -109,6 +128,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, diff --git a/src/block/icon-button/deprecated.js b/src/block/icon-button/deprecated.js index e16bdd1b6..9bf89108c 100644 --- a/src/block/icon-button/deprecated.js +++ b/src/block/icon-button/deprecated.js @@ -23,9 +23,12 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateButtonGradientColor.migrate( 'button%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) - newAttributes = deprecateShadowColor.migrate( 'button%s' )( attributes ) + newAttributes = deprecateShadowColor.migrate( 'button%s' )( newAttributes ) return newAttributes }, @@ -47,6 +50,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateButtonGradientColor.migrate( 'button%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'button%s' )( newAttributes ) return newAttributes }, @@ -58,6 +64,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateButtonGradientColor.migrate( 'button%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'button%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/icon-label/deprecated.js b/src/block/icon-label/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/icon-label/deprecated.js +++ b/src/block/icon-label/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/icon-list/deprecated/index.js b/src/block/icon-list/deprecated/index.js index 4cfda6cdc..3339592e6 100644 --- a/src/block/icon-list/deprecated/index.js +++ b/src/block/icon-list/deprecated/index.js @@ -77,13 +77,53 @@ const deprecated = [ return hasBlockShadow || hasContainerShadow }, - migrate: attributes => { + supports: { + anchor: true, + spacing: true, + __unstablePasteTextInline: true, + __experimentalSelector: 'ol,ul', + __experimentalOnMerge: true, + }, + migrate: ( attributes, innerBlocks ) => { let newAttributes = { ...attributes } + const { + text, icons, iconSize, ordered, iconGap, + } = attributes + + const _iconSize = iconSize ? iconSize : 1 + const _iconGap = iconGap ? iconGap : 0 + + newAttributes = { + ...newAttributes, + listFullWidth: false, + iconVerticalAlignment: 'baseline', + iconGap: _iconGap + 4, // Our gap is smaller now. + iconSize: ordered + ? getEquivalentFontSize( _iconSize ) + : getEquivalentIconSize( _iconSize ), + } + if ( ! text ) { + const block = createBlock( 'stackable/icon-list-item' ) + innerBlocks = [ block ] + } else { + const contents = textToArray( text ) + const blocks = contents.map( ( content, index ) => { + return createBlock( 'stackable/icon-list-item', { + text: content, + icon: getUniqueIcon( icons, index ), + } ) + } ) + innerBlocks = blocks + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) - return newAttributes + return [ newAttributes, innerBlocks ] }, }, { @@ -132,6 +172,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, @@ -153,6 +195,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -164,6 +208,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, diff --git a/src/block/icon/deprecated.js b/src/block/icon/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/icon/deprecated.js +++ b/src/block/icon/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/image-box/deprecated.js b/src/block/image-box/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/image-box/deprecated.js +++ b/src/block/image-box/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/image/deprecated.js b/src/block/image/deprecated.js index 004e20078..04e709ee1 100644 --- a/src/block/image/deprecated.js +++ b/src/block/image/deprecated.js @@ -73,6 +73,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'image%s' )( newAttributes ) @@ -104,6 +107,9 @@ const deprecated = [ newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes ) newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'image%s' )( newAttributes ) return newAttributes }, @@ -115,6 +121,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecationImageOverlayOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'image%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/map/deprecated.js b/src/block/map/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/map/deprecated.js +++ b/src/block/map/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/notification/deprecated.js b/src/block/notification/deprecated.js index a255aa32f..843109e86 100644 --- a/src/block/notification/deprecated.js +++ b/src/block/notification/deprecated.js @@ -42,12 +42,63 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -118,6 +169,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -196,6 +249,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/number-box/deprecated.js b/src/block/number-box/deprecated.js index ea68ebb9b..d66bfcf0e 100644 --- a/src/block/number-box/deprecated.js +++ b/src/block/number-box/deprecated.js @@ -20,8 +20,9 @@ const deprecated = [ return hasBlockShadow || hasContainerShadow || hasShapeShadow }, migrate: attributes => { - let newAttributes = { ...attributes } - + let newAttributes = deprecateBlockBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecationBackgrounColorOpacity.migrate( 'shape%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'shape%s' )( newAttributes ) @@ -42,6 +43,9 @@ const deprecated = [ let newAttributes = deprecateBlockBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecationBackgrounColorOpacity.migrate( 'shape%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'shape%s' )( newAttributes ) return newAttributes }, }, @@ -54,6 +58,9 @@ const deprecated = [ let newAttributes = deprecateBlockBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecationBackgrounColorOpacity.migrate( 'shape%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'shape%s' )( newAttributes ) return newAttributes }, }, diff --git a/src/block/posts/deprecated.js b/src/block/posts/deprecated.js index 38b32a15b..88bb28a62 100644 --- a/src/block/posts/deprecated.js +++ b/src/block/posts/deprecated.js @@ -49,11 +49,52 @@ const deprecated = [ const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) const hasImageShadow = deprecateShadowColor.isEligible( 'image%s' )( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow || hasImageShadow + return hasBlockShadow || hasContainerShadow || hasImageShadow || isNotV4 }, migrate: attributes => { - let newAttributes = { ...attributes } + let newAttributes = { + ...attributes, + version: 2, + } + + // We used to have an "Inner content width" which is now just the block width + const hasOldInnerContentWidth = attributes.innerBlockContentWidth || attributes.innerBlockContentWidthTablet || attributes.innerBlockContentWidthMobile + + if ( hasOldInnerContentWidth ) { + newAttributes = { + ...newAttributes, + innerBlockContentWidth: '', + innerBlockContentWidthTablet: '', + innerBlockContentWidthMobile: '', + innerBlockContentWidthUnit: 'px', + innerBlockContentWidthUnitTablet: '', + innerBlockContentWidthUnitMobile: '', + blockWidth: attributes.innerBlockContentWidth, + blockWidthTablet: attributes.innerBlockContentWidthTablet, + blockWidthMobile: attributes.innerBlockContentWidthMobile, + blockWidthUnit: attributes.innerBlockContentWidthUnit, + blockWidthUnitTablet: attributes.innerBlockContentWidthUnitTablet, + blockWidthUnitMobile: attributes.innerBlockContentWidthUnitMobile, + innerBlockAlign: '', + innerBlockAlignTablet: '', + innerBlockAlignMobile: '', + blockHorizontalAlign: attributes.innerBlockAlign, + blockHorizontalAlignTablet: attributes.innerBlockAlignTablet, + blockHorizontalAlignMobile: attributes.innerBlockAlignMobile, + } + } + + newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes ) + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + + newAttributes = deprecateTypographyGradientColor.migrate( 'title%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'category%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'excerpt%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'meta%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'readmore%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -133,6 +174,10 @@ const deprecated = [ newAttributes = deprecateTypographyGradientColor.migrate( 'meta%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'readmore%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'image%s' )( newAttributes ) + return newAttributes }, }, @@ -208,6 +253,10 @@ const deprecated = [ newAttributes = deprecateTypographyGradientColor.migrate( 'meta%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'readmore%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'image%s' )( newAttributes ) + return newAttributes }, }, diff --git a/src/block/price/deprecated.js b/src/block/price/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/price/deprecated.js +++ b/src/block/price/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/pricing-box/deprecated.js b/src/block/pricing-box/deprecated.js index 58728fb1c..aa0e1113f 100644 --- a/src/block/pricing-box/deprecated.js +++ b/src/block/pricing-box/deprecated.js @@ -41,12 +41,63 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -117,6 +168,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -195,6 +248,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/progress-bar/deprecated.js b/src/block/progress-bar/deprecated.js index d9a18b572..0db656007 100644 --- a/src/block/progress-bar/deprecated.js +++ b/src/block/progress-bar/deprecated.js @@ -22,6 +22,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -46,6 +49,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, @@ -57,6 +63,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/progress-circle/deprecated.js b/src/block/progress-circle/deprecated.js index d9a18b572..0db656007 100644 --- a/src/block/progress-circle/deprecated.js +++ b/src/block/progress-circle/deprecated.js @@ -22,6 +22,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -46,6 +49,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, @@ -57,6 +63,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/separator/deprecated.js b/src/block/separator/deprecated.js index 2b91d3ed7..329d461cd 100644 --- a/src/block/separator/deprecated.js +++ b/src/block/separator/deprecated.js @@ -22,6 +22,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateShadowColor.migrate( 'separator%s' )( newAttributes ) @@ -44,6 +46,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'separator%s' )( newAttributes ) return newAttributes }, @@ -53,7 +58,10 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'separator%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/spacer/deprecated.js b/src/block/spacer/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/spacer/deprecated.js +++ b/src/block/spacer/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/subtitle/deprecated.js b/src/block/subtitle/deprecated.js index d87a7096d..a0c6c4240 100644 --- a/src/block/subtitle/deprecated.js +++ b/src/block/subtitle/deprecated.js @@ -22,6 +22,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -46,6 +49,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, @@ -57,6 +63,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/tab-content/deprecated.js b/src/block/tab-content/deprecated.js index 9d99c2c45..57fd88d26 100644 --- a/src/block/tab-content/deprecated.js +++ b/src/block/tab-content/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, diff --git a/src/block/tab-labels/deprecated.js b/src/block/tab-labels/deprecated.js index 5750f1f45..6f6cca19d 100644 --- a/src/block/tab-labels/deprecated.js +++ b/src/block/tab-labels/deprecated.js @@ -24,6 +24,11 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'tab%s' )( newAttributes ) + newAttributes = deprecateButtonGradientColor.migrate( 'tab%s' )( newAttributes ) + newAttributes = deprecateButtonGradientColor.migrate( 'activeTab%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -54,6 +59,11 @@ const deprecated = [ newAttributes = deprecateTypographyGradientColor.migrate( 'tab%s' )( newAttributes ) newAttributes = deprecateButtonGradientColor.migrate( 'tab%s' )( newAttributes ) newAttributes = deprecateButtonGradientColor.migrate( 'activeTab%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'tab%s' )( newAttributes ) + newAttributes = deprecateShadowColor.migrate( 'activeTab%s' )( newAttributes ) return newAttributes }, diff --git a/src/block/table-of-contents/deprecated.js b/src/block/table-of-contents/deprecated.js index 7adc61dca..1aa3cccf6 100644 --- a/src/block/table-of-contents/deprecated.js +++ b/src/block/table-of-contents/deprecated.js @@ -49,6 +49,10 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( 'title%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -74,6 +78,8 @@ const deprecated = [ newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'title%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -86,6 +92,8 @@ const deprecated = [ let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( 'title%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/tabs/deprecated.js b/src/block/tabs/deprecated.js index de0ab8522..85ccf8730 100644 --- a/src/block/tabs/deprecated.js +++ b/src/block/tabs/deprecated.js @@ -21,10 +21,23 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes ) + if ( hasContainerOpacity ) { + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + } + + const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes ) + if ( hasBlockOpacity ) { + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + } + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) - return newAttributes + return { + ...newAttributes, + equalTabHeight: true, + } }, }, { @@ -43,6 +56,9 @@ const deprecated = [ newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) } + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + return { ...newAttributes, equalTabHeight: true, @@ -65,6 +81,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, diff --git a/src/block/team-member/deprecated.js b/src/block/team-member/deprecated.js index 44abebc7b..ef5c7d6b2 100644 --- a/src/block/team-member/deprecated.js +++ b/src/block/team-member/deprecated.js @@ -42,12 +42,63 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -118,6 +169,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -196,6 +249,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/testimonial/deprecated.js b/src/block/testimonial/deprecated.js index c66975a6b..cc64e5fd2 100644 --- a/src/block/testimonial/deprecated.js +++ b/src/block/testimonial/deprecated.js @@ -42,12 +42,63 @@ const deprecated = [ isEligible: attributes => { const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes ) const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes ) + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' - return hasBlockShadow || hasContainerShadow + return hasBlockShadow || hasContainerShadow || isNotV4 }, - migrate: attributes => { - let newAttributes = { ...attributes } + migrate: ( attributes, innerBlocks ) => { + const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined' + + let newAttributes = { + ...attributes, + } + if ( isNotV4 ) { + newAttributes = { + ...newAttributes, + version: 2, + } + + // Update the vertical align into flexbox + const hasOldVerticalAlign = !! attributes.containerVerticalAlign // Column only, this was changed to flexbox + + if ( hasOldVerticalAlign ) { + newAttributes = { + ...newAttributes, + containerVerticalAlign: '', + innerBlockAlign: attributes.containerVerticalAlign, + } + } + + // If the inner blocks are horizontal, adjust to accomodate the new + // column gap, it will modify blocks because people used block + // margins before instead of a proper column gap. + if ( attributes.innerBlockOrientation === 'horizontal' ) { + innerBlocks.forEach( ( block, index ) => { + if ( index ) { + if ( ! block.attributes.blockMargin ) { + block.attributes.blockMargin = { + top: '', + right: '', + bottom: '', + left: '', + } + } + if ( block.attributes.blockMargin.left === '' ) { + block.attributes.blockMargin.left = 24 + } + } + } ) + + newAttributes = { + ...newAttributes, + innerBlockColumnGap: 0, + } + } + } + + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -118,6 +169,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -196,6 +249,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return [ newAttributes, innerBlocks ] }, diff --git a/src/block/text/deprecated.js b/src/block/text/deprecated.js index 3e145ed3b..57d902aa2 100644 --- a/src/block/text/deprecated.js +++ b/src/block/text/deprecated.js @@ -22,6 +22,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -46,6 +49,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, @@ -57,6 +63,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/block/timeline/deprecated.js b/src/block/timeline/deprecated.js index de196957d..8ef5054ff 100644 --- a/src/block/timeline/deprecated.js +++ b/src/block/timeline/deprecated.js @@ -22,6 +22,9 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) @@ -46,6 +49,9 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateTypographyGradientColor.migrate( '%s' )( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) + newAttributes = deprecateTypographyShadowColor.migrate( '%s' )( newAttributes ) return newAttributes }, diff --git a/src/block/video-popup/deprecated.js b/src/block/video-popup/deprecated.js index 6024aad74..395ffb36b 100644 --- a/src/block/video-popup/deprecated.js +++ b/src/block/video-popup/deprecated.js @@ -21,6 +21,8 @@ const deprecated = [ migrate: attributes => { let newAttributes = { ...attributes } + newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) @@ -42,6 +44,8 @@ const deprecated = [ newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes ) newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return newAttributes }, @@ -51,7 +55,9 @@ const deprecated = [ attributes: attributes( '3.7.9' ), save: withVersion( '3.7.9' )( Save ), migrate: attributes => { - const newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + let newAttributes = deprecateContainerBackgroundColorOpacity.migrate( attributes ) + newAttributes = deprecateBlockShadowColor.migrate( newAttributes ) + newAttributes = deprecateContainerShadowColor.migrate( newAttributes ) return deprecateBlockBackgroundColorOpacity.migrate( newAttributes ) }, }, diff --git a/src/dynamic-breakpoints.php b/src/dynamic-breakpoints.php index 839b0b4ba..1b4277d9b 100644 --- a/src/dynamic-breakpoints.php +++ b/src/dynamic-breakpoints.php @@ -15,7 +15,7 @@ function stackable_get_responsive_css() { // NOTE: THE VALUE BELOW IS AUTOMATICALLY GENERATED BY THE BUILD PROCESS. return <<.stk-inner-blocks.stk-block-tabs--vertical{grid-template-columns:auto 1fr auto}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-labels:first-child{grid-column:1/2}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-content:last-child{grid-column:2/4}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-content:first-child{grid-column:1/3}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-labels:last-child{grid-column:3/4}.stk-block .stk-block.aligncenter,.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align:not(.alignwide):not(.alignfull){margin-left:auto;margin-right:auto;max-width:var(--stk-block-default-width,var(--stk-block-width-default-detected,900px));width:100%}.stk-block .stk-block.alignwide,.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align.alignwide{margin-left:auto;margin-right:auto;max-width:var(--stk-block-wide-width,var(--stk-block-width-wide-detected,80vw));width:100%}.stk-row.stk-columns-2>.stk-column{flex:1 1 50%;max-width:50%}.stk-row.stk-columns-3>.stk-column{flex:1 1 33.3333333333%;max-width:33.3333333333%}.stk-row.stk-columns-4>.stk-column{flex:1 1 25%;max-width:25%}.stk-row.stk-columns-5>.stk-column{flex:1 1 20%;max-width:20%}.stk-row.stk-columns-6>.stk-column{flex:1 1 16.6666666667%;max-width:16.6666666667%}.stk-row.stk-columns-7>.stk-column{flex:1 1 14.2857142857%;max-width:14.2857142857%}.stk-row.stk-columns-8>.stk-column{flex:1 1 12.5%;max-width:12.5%}.stk-row.stk-columns-9>.stk-column{flex:1 1 11.1111111111%;max-width:11.1111111111%}.stk-row.stk-columns-10>.stk-column{flex:1 1 10%;max-width:10%}}@media only screen and (min-width:768px) and (max-width:1023px){:where(.has-text-align-left-tablet) .stk-block-divider{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}:where(.has-text-align-right-tablet) .stk-block-divider{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}:where(.has-text-align-center-tablet) .stk-block-divider{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk--hide-tablet,.stk--hide-tablet.stk-block{display:none!important}.stk-button-group:is(.stk--collapse-on-tablet) .stk-block:is(.stk-block-button,.stk-block-icon-button){margin-inline-end:var(--stk-alignment-margin-right);margin-inline-start:var(--stk-alignment-margin-left)}}@media only screen and (max-width:1023px){.stk-block-button{min-width:-moz-fit-content;min-width:fit-content}.stk-block.stk-block-divider.has-text-align-center-tablet{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-right-tablet{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-left-tablet{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}.stk-block-timeline.stk-block-timeline__ios-polyfill{--fixed-bg:linear-gradient(to bottom,var(--line-accent-bg-color,#000) 0,var(--line-accent-bg-color-2,#000) var(--line-accent-bg-location,50%))}.has-text-align-center-tablet{--stk-alignment-padding-left:0;--stk-alignment-justify-content:center;--stk-alignment-text-align:center;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-left-tablet{--stk-alignment-justify-content:flex-start;--stk-alignment-text-align:start;--stk-alignment-margin-left:0;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-right-tablet{--stk-alignment-justify-content:flex-end;--stk-alignment-text-align:end;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:0;text-align:var(--stk-alignment-text-align,start)}.has-text-align-justify-tablet{--stk-alignment-text-align:justify}.has-text-align-space-between-tablet{--stk-alignment-justify-content:space-between}.has-text-align-space-around-tablet{--stk-alignment-justify-content:space-around}.has-text-align-space-evenly-tablet{--stk-alignment-justify-content:space-evenly}}@media only screen and (max-width:767px){.stk-block-carousel.stk--hide-mobile-arrows>.stk-block-carousel__content-wrapper>*>.stk-block-carousel__buttons,.stk-block-carousel.stk--hide-mobile-dots>.stk-block-carousel__content-wrapper>.stk-block-carousel__dots{display:none}:where(.has-text-align-left-mobile) .stk-block-divider{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}:where(.has-text-align-right-mobile) .stk-block-divider{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}:where(.has-text-align-center-mobile) .stk-block-divider{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-center-mobile{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-right-mobile{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-left-mobile{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}.stk-block.stk-block-feature:is(.is-style-default,.is-style-horizontal)>.stk-container>.stk-inner-blocks.stk-block-content{flex-direction:column-reverse}.stk-block-posts{--stk-columns:1}.stk-block-tab-labels:not(.stk-block-tab-labels--wrap-mobile){overflow-x:auto!important;width:100%}.stk-block-tab-labels:not(.stk-block-tab-labels--wrap-mobile)::-webkit-scrollbar{height:0!important}.stk-block-tab-labels:not(.stk-block-tab-labels--wrap-mobile) .stk-block-tab-labels__wrapper{flex-wrap:nowrap;min-width:-webkit-fill-available;min-width:fill-available;width:max-content}.stk-block-tabs>.stk-inner-blocks{grid-template-columns:1fr}.stk-block-tabs>.stk-inner-blocks>.stk-block-tab-labels:last-child{grid-row:1/2}.stk-block.stk-block-timeline{--content-line:0!important;padding-top:0}.stk-block-timeline>.stk-inner-blocks{align-items:flex-start;grid-template-columns:var(--line-dot-size,16px) 1fr;grid-template-rows:auto 1fr;padding-left:16px}.stk-block-timeline>.stk-inner-blocks:after{inset-inline-start:calc(var(--line-dot-size, 16px)/2 - var(--line-bg-width, 3px)/2 + 16px)}.stk-block-timeline .stk-block-timeline__middle{inset-block-start:8px;inset-inline-start:16px;position:absolute}.stk-block-timeline .stk-block-timeline__content{grid-column:2/3;grid-row:2/3;text-align:start}.stk-block-timeline .stk-block-timeline__date{grid-column:2/3;grid-row:1/2;text-align:start}.stk-block-timeline>.stk-inner-blocks:after{bottom:calc(100% - var(--line-dot-size, 16px)/2 - .5em);top:calc(var(--line-dot-size, 16px)/2 + .5em)}.stk-block-timeline+.stk-block-timeline>.stk-inner-blocks:after{top:-16px}:root{--stk-block-margin-bottom:16px;--stk-container-padding:24px 24px;--stk-container-padding-large:32px 24px;--stk-container-padding-small:8px 24px;--stk-column-margin:8px;--stk-block-background-padding:16px 16px}.stk-block .stk-block:is(.aligncenter,.alignwide),.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align.alignwide,.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align:not(.alignwide):not(.alignfull){width:100%}.stk-column{flex:1 1 100%;max-width:100%}.stk--hide-mobile,.stk--hide-mobile.stk-block{display:none!important}.stk-button-group:is(.stk--collapse-on-mobile) .stk-block:is(.stk-block-button,.stk-block-icon-button),.stk-button-group:is(.stk--collapse-on-tablet) .stk-block:is(.stk-block-button,.stk-block-icon-button){margin-inline-end:var(--stk-alignment-margin-right);margin-inline-start:var(--stk-alignment-margin-left)}.has-text-align-center-mobile{--stk-alignment-padding-left:0;--stk-alignment-justify-content:center;--stk-alignment-text-align:center;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-left-mobile{--stk-alignment-justify-content:flex-start;--stk-alignment-text-align:start;--stk-alignment-margin-left:0;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-right-mobile{--stk-alignment-justify-content:flex-end;--stk-alignment-text-align:end;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:0;text-align:var(--stk-alignment-text-align,start)}.has-text-align-justify-mobile{--stk-alignment-text-align:justify}.has-text-align-space-between-mobile{--stk-alignment-justify-content:space-between}.has-text-align-space-around-mobile{--stk-alignment-justify-content:space-around}.has-text-align-space-evenly-mobile{--stk-alignment-justify-content:space-evenly}.entry-content .stk-block.stk-has-top-separator{padding-top:23vw}.entry-content .stk-block.stk-has-bottom-separator{padding-bottom:23vw}.entry-content .stk-block .stk-separator__wrapper{height:23vw}}#end-resizable-editor-section{display:none} +#start-resizable-editor-section{display:none}@media only screen and (min-width:1024px){:where(.has-text-align-left) .stk-block-divider{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}:where(.has-text-align-right) .stk-block-divider{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}:where(.has-text-align-center) .stk-block-divider{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-center{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-right{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-left{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}.stk-row{flex-wrap:nowrap}.stk--hide-desktop,.stk--hide-desktop.stk-block{display:none!important}}@media only screen and (min-width:768px){:where(body:not(.wp-admin) .stk-block-column:first-child:nth-last-child(2)){flex:1 1 calc(50% - var(--stk-column-gap, 0px)*1/2)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(2):last-child){flex:1 1 calc(50% - var(--stk-column-gap, 0px)*1/2)!important}:where(body:not(.wp-admin) .stk-block-column:first-child:nth-last-child(3)){flex:1 1 calc(33.33333% - var(--stk-column-gap, 0px)*2/3)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(2):nth-last-child(2)){flex:1 1 calc(33.33333% - var(--stk-column-gap, 0px)*2/3)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(3):last-child){flex:1 1 calc(33.33333% - var(--stk-column-gap, 0px)*2/3)!important}:where(body:not(.wp-admin) .stk-block-column:first-child:nth-last-child(4)){flex:1 1 calc(25% - var(--stk-column-gap, 0px)*3/4)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(2):nth-last-child(3)){flex:1 1 calc(25% - var(--stk-column-gap, 0px)*3/4)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(3):nth-last-child(2)){flex:1 1 calc(25% - var(--stk-column-gap, 0px)*3/4)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(4):last-child){flex:1 1 calc(25% - var(--stk-column-gap, 0px)*3/4)!important}:where(body:not(.wp-admin) .stk-block-column:first-child:nth-last-child(5)){flex:1 1 calc(20% - var(--stk-column-gap, 0px)*4/5)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(2):nth-last-child(4)){flex:1 1 calc(20% - var(--stk-column-gap, 0px)*4/5)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(3):nth-last-child(3)){flex:1 1 calc(20% - var(--stk-column-gap, 0px)*4/5)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(4):nth-last-child(2)){flex:1 1 calc(20% - var(--stk-column-gap, 0px)*4/5)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(5):last-child){flex:1 1 calc(20% - var(--stk-column-gap, 0px)*4/5)!important}:where(body:not(.wp-admin) .stk-block-column:first-child:nth-last-child(6)){flex:1 1 calc(16.66667% - var(--stk-column-gap, 0px)*5/6)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(2):nth-last-child(5)){flex:1 1 calc(16.66667% - var(--stk-column-gap, 0px)*5/6)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(3):nth-last-child(4)){flex:1 1 calc(16.66667% - var(--stk-column-gap, 0px)*5/6)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(4):nth-last-child(3)){flex:1 1 calc(16.66667% - var(--stk-column-gap, 0px)*5/6)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(5):nth-last-child(2)){flex:1 1 calc(16.66667% - var(--stk-column-gap, 0px)*5/6)!important}:where(body:not(.wp-admin) .stk-block-column:nth-child(6):last-child){flex:1 1 calc(16.66667% - var(--stk-column-gap, 0px)*5/6)!important}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical{grid-template-columns:auto 1fr auto}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-labels:first-child{grid-column:1/2}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-content:last-child{grid-column:2/4}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-content:first-child{grid-column:1/3}.stk-block-tabs>.stk-inner-blocks.stk-block-tabs--vertical>.stk-block-tab-labels:last-child{grid-column:3/4}.stk-block .stk-block.aligncenter,.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align:not(.alignwide):not(.alignfull){margin-left:auto;margin-right:auto;max-width:var(--stk-block-default-width,var(--stk-block-width-default-detected,900px));width:100%}.stk-block .stk-block.alignwide,.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align.alignwide{margin-left:auto;margin-right:auto;max-width:var(--stk-block-wide-width,var(--stk-block-width-wide-detected,80vw));width:100%}.stk-row.stk-columns-2>.stk-column{flex:1 1 50%;max-width:50%}.stk-row.stk-columns-3>.stk-column{flex:1 1 33.3333333333%;max-width:33.3333333333%}.stk-row.stk-columns-4>.stk-column{flex:1 1 25%;max-width:25%}.stk-row.stk-columns-5>.stk-column{flex:1 1 20%;max-width:20%}.stk-row.stk-columns-6>.stk-column{flex:1 1 16.6666666667%;max-width:16.6666666667%}.stk-row.stk-columns-7>.stk-column{flex:1 1 14.2857142857%;max-width:14.2857142857%}.stk-row.stk-columns-8>.stk-column{flex:1 1 12.5%;max-width:12.5%}.stk-row.stk-columns-9>.stk-column{flex:1 1 11.1111111111%;max-width:11.1111111111%}.stk-row.stk-columns-10>.stk-column{flex:1 1 10%;max-width:10%}}@media only screen and (min-width:768px) and (max-width:1023px){:where(.has-text-align-left-tablet) .stk-block-divider{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}:where(.has-text-align-right-tablet) .stk-block-divider{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}:where(.has-text-align-center-tablet) .stk-block-divider{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk--hide-tablet,.stk--hide-tablet.stk-block{display:none!important}.stk-button-group:is(.stk--collapse-on-tablet) .stk-block:is(.stk-block-button,.stk-block-icon-button){margin-inline-end:var(--stk-alignment-margin-right);margin-inline-start:var(--stk-alignment-margin-left)}}@media only screen and (max-width:1023px){.stk-block-button{min-width:-moz-fit-content;min-width:fit-content}.stk-block.stk-block-divider.has-text-align-center-tablet{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-right-tablet{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-left-tablet{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}.has-text-align-center-tablet{--stk-alignment-padding-left:0;--stk-alignment-justify-content:center;--stk-alignment-text-align:center;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-left-tablet{--stk-alignment-justify-content:flex-start;--stk-alignment-text-align:start;--stk-alignment-margin-left:0;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-right-tablet{--stk-alignment-justify-content:flex-end;--stk-alignment-text-align:end;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:0;text-align:var(--stk-alignment-text-align,start)}.has-text-align-justify-tablet{--stk-alignment-text-align:justify}.has-text-align-space-between-tablet{--stk-alignment-justify-content:space-between}.has-text-align-space-around-tablet{--stk-alignment-justify-content:space-around}.has-text-align-space-evenly-tablet{--stk-alignment-justify-content:space-evenly}.stk-block-timeline.stk-block-timeline__ios-polyfill{--fixed-bg:linear-gradient(to bottom,var(--line-accent-bg-color,#000) 0,var(--line-accent-bg-color-2,#000) var(--line-accent-bg-location,50%))}}@media only screen and (max-width:767px){.entry-content .stk-block.stk-has-top-separator{padding-top:23vw}.entry-content .stk-block.stk-has-bottom-separator{padding-bottom:23vw}.entry-content .stk-block .stk-separator__wrapper{height:23vw}.stk-block-carousel.stk--hide-mobile-arrows>.stk-block-carousel__content-wrapper>*>.stk-block-carousel__buttons,.stk-block-carousel.stk--hide-mobile-dots>.stk-block-carousel__content-wrapper>.stk-block-carousel__dots{display:none}:where(.has-text-align-left-mobile) .stk-block-divider{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}:where(.has-text-align-right-mobile) .stk-block-divider{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}:where(.has-text-align-center-mobile) .stk-block-divider{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-center-mobile{--stk-dots-margin-right:auto;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-right-mobile{--stk-dots-margin-right:0;--stk-dots-margin-left:auto}.stk-block.stk-block-divider.has-text-align-left-mobile{--stk-dots-margin-left:0;--stk-dots-margin-right:auto}.stk-block.stk-block-feature:is(.is-style-default,.is-style-horizontal)>.stk-container>.stk-inner-blocks.stk-block-content{flex-direction:column-reverse}.stk-block-posts{--stk-columns:1}.stk-block-tab-labels:not(.stk-block-tab-labels--wrap-mobile){overflow-x:auto!important;width:100%}.stk-block-tab-labels:not(.stk-block-tab-labels--wrap-mobile)::-webkit-scrollbar{height:0!important}.stk-block-tab-labels:not(.stk-block-tab-labels--wrap-mobile) .stk-block-tab-labels__wrapper{flex-wrap:nowrap;min-width:-webkit-fill-available;min-width:fill-available;width:max-content}.stk-block-tabs>.stk-inner-blocks{grid-template-columns:1fr}.stk-block-tabs>.stk-inner-blocks>.stk-block-tab-labels:last-child{grid-row:1/2}:root{--stk-block-margin-bottom:16px;--stk-container-padding:24px 24px;--stk-container-padding-large:32px 24px;--stk-container-padding-small:8px 24px;--stk-column-margin:8px;--stk-block-background-padding:16px 16px}.stk-block .stk-block:is(.aligncenter,.alignwide),.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align.alignwide,.stk-block:is(.aligncenter,.alignwide,.alignfull)>.stk-content-align:not(.alignwide):not(.alignfull){width:100%}.stk-column{flex:1 1 100%;max-width:100%}.stk--hide-mobile,.stk--hide-mobile.stk-block{display:none!important}.stk-button-group:is(.stk--collapse-on-mobile) .stk-block:is(.stk-block-button,.stk-block-icon-button),.stk-button-group:is(.stk--collapse-on-tablet) .stk-block:is(.stk-block-button,.stk-block-icon-button){margin-inline-end:var(--stk-alignment-margin-right);margin-inline-start:var(--stk-alignment-margin-left)}.has-text-align-center-mobile{--stk-alignment-padding-left:0;--stk-alignment-justify-content:center;--stk-alignment-text-align:center;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-left-mobile{--stk-alignment-justify-content:flex-start;--stk-alignment-text-align:start;--stk-alignment-margin-left:0;--stk-alignment-margin-right:auto;text-align:var(--stk-alignment-text-align,start)}.has-text-align-right-mobile{--stk-alignment-justify-content:flex-end;--stk-alignment-text-align:end;--stk-alignment-margin-left:auto;--stk-alignment-margin-right:0;text-align:var(--stk-alignment-text-align,start)}.has-text-align-justify-mobile{--stk-alignment-text-align:justify}.has-text-align-space-between-mobile{--stk-alignment-justify-content:space-between}.has-text-align-space-around-mobile{--stk-alignment-justify-content:space-around}.has-text-align-space-evenly-mobile{--stk-alignment-justify-content:space-evenly}.stk-block.stk-block-timeline{--content-line:0!important;padding-top:0}.stk-block-timeline>.stk-inner-blocks{align-items:flex-start;grid-template-columns:var(--line-dot-size,16px) 1fr;grid-template-rows:auto 1fr;padding-left:16px}.stk-block-timeline>.stk-inner-blocks:after{inset-inline-start:calc(var(--line-dot-size, 16px)/2 - var(--line-bg-width, 3px)/2 + 16px)}.stk-block-timeline .stk-block-timeline__middle{inset-block-start:8px;inset-inline-start:16px;position:absolute}.stk-block-timeline .stk-block-timeline__content{grid-column:2/3;grid-row:2/3;text-align:start}.stk-block-timeline .stk-block-timeline__date{grid-column:2/3;grid-row:1/2;text-align:start}.stk-block-timeline>.stk-inner-blocks:after{bottom:calc(100% - var(--line-dot-size, 16px)/2 - .5em);top:calc(var(--line-dot-size, 16px)/2 + .5em)}.stk-block-timeline+.stk-block-timeline>.stk-inner-blocks:after{top:-16px}}#end-resizable-editor-section{display:none} STK_RESPONSIVE_CSS; } }