diff --git a/src/blocks/_pro/outer/deprecated/hooks/0.0.1/index.js b/src/blocks/_pro/outer/deprecated/hooks/1.0.13/index.js similarity index 100% rename from src/blocks/_pro/outer/deprecated/hooks/0.0.1/index.js rename to src/blocks/_pro/outer/deprecated/hooks/1.0.13/index.js diff --git a/src/blocks/_pro/outer/deprecated/hooks/index.js b/src/blocks/_pro/outer/deprecated/hooks/index.js index d5378a6d4..8be9c8cdc 100644 --- a/src/blocks/_pro/outer/deprecated/hooks/index.js +++ b/src/blocks/_pro/outer/deprecated/hooks/index.js @@ -2,7 +2,7 @@ import OuterHook1_60_0 from './1.60.0/' import OuterHook1_36_2 from './1.36.2/' import OuterHook1_34_1 from './1.34.1/' import OuterHook1_26_0 from './1.26.0/' -import OuterHook0_0_1 from './0.0.1' +import OuterHook1_0_13 from './1.0.13/' // saveの数分必要 export default [ @@ -17,17 +17,5 @@ export default [ OuterHook1_36_2, // 1.36.2 OuterHook1_34_1, // 1.34.1 OuterHook1_26_0, // 1.26.0 - OuterHook0_0_1, // 1.0.13 - OuterHook0_0_1, // 0.60.0 - OuterHook0_0_1, // 0.37.1 - OuterHook0_0_1, // 0.0.9 - OuterHook0_0_1, // 0.0.8 - OuterHook0_0_1, // 0.0.7 - OuterHook0_0_1, // 0.0.6 - OuterHook0_0_1, // 0.0.5 - OuterHook0_0_1, // 0.0.4 - OuterHook0_0_1, // 0.0.3 - OuterHook0_0_1, // 0.0.2 - OuterHook0_0_1, // 0.0.1 - OuterHook0_0_1, // 0.0.0 + OuterHook1_0_13, // 1.0.13 ]; diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.0/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.0/component.js deleted file mode 100644 index f963f6aa8..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.0/component.js +++ /dev/null @@ -1,179 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentV0 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - anchor, - } = this.props.attributes; - - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.0/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.0/save.js deleted file mode 100644 index 3aa07ad14..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.0/save.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ComponentV0 } from './component'; - -export default function save({ attributes }) { - { - // eslint-disable-next-line no-undef - return ; - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.1/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.1/component.js deleted file mode 100644 index 873a29fe2..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.1/component.js +++ /dev/null @@ -1,181 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentV1 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - anchor, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.1/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.1/save.js deleted file mode 100644 index 521cae377..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.1/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentV1 } from './component'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.2/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.2/component.js deleted file mode 100644 index 39dae4af7..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.2/component.js +++ /dev/null @@ -1,180 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate0 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.2/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.2/save.js deleted file mode 100644 index bbc25adde..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.2/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate0 } from './component'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.3/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.3/component.js deleted file mode 100644 index 708d2aa9c..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.3/component.js +++ /dev/null @@ -1,180 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate1 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.3/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.3/save.js deleted file mode 100644 index 1a7b1c755..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.3/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate1 } from './component'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.4/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.4/component.js deleted file mode 100644 index 201f1d8f8..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.4/component.js +++ /dev/null @@ -1,180 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate2 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.4/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.4/save.js deleted file mode 100644 index 5988bf4b4..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.4/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate2 } from './component'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.5/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.5/component.js deleted file mode 100644 index 048686b6d..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.5/component.js +++ /dev/null @@ -1,181 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate3 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - // eslint-disable-next-line camelcase - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.5/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.5/save.js deleted file mode 100644 index 073aa9956..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.5/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate3 } from './component'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.6/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.6/component.js deleted file mode 100644 index 750fc2248..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.6/component.js +++ /dev/null @@ -1,180 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate4 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.6/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.6/save.js deleted file mode 100644 index 16231af10..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.6/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate4 } from './component'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.7/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.7/component.js deleted file mode 100644 index 264929551..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.7/component.js +++ /dev/null @@ -1,180 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate5 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.7/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.7/save.js deleted file mode 100644 index 312afb02e..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.7/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate5 } from './component.js'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.8/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.8/component.js deleted file mode 100644 index c9b040b15..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.8/component.js +++ /dev/null @@ -1,180 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import { Component } from '@wordpress/element'; - -//hexカラーコード定義をrgbaに変換 -function hex2rgba(hex, alpha) { - // ロングバージョンの場合(例:#FF0000) - let r = hex.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i); - let c = null; - if (r) { - c = r.slice(1, 4).map(function (x) { - return parseInt(x, 16); - }); - } - // ショートバージョンの場合(例:#F00) - r = hex.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i); - if (r) { - c = r.slice(1, 4).map(function (x) { - return 0x11 * parseInt(x, 16); - }); - } - // 該当しない場合は、nullを返す. - if (!c) { - return null; - } - return `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})`; -} - -export class ComponentForTemplate6 extends Component { - render() { - let { - bgColor, - bgImage, - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - opacity, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - } = this.props.attributes; - - const className = this.props.className; - const for_ = this.props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let bgStyle; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //hexからrgbaに変換 - if (bgColor) { - bgColor = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColor = hex2rgba('#fff', opacity); - } - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //背景画像の有り無しでstyleを切り替え - if (bgImage) { - bgStyle = `linear-gradient(${bgColor}, ${bgColor}), url(${bgImage})`; - } else { - bgStyle = `linear-gradient(${bgColor}, ${bgColor})`; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - return ( -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.8/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.8/save.js deleted file mode 100644 index 062e127fb..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.8/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentForTemplate6 } from './component.js'; - -export default function save({ attributes, className }) { - { - return ( - - ); - } -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.9/component.js b/src/blocks/_pro/outer/deprecated/save/0.0.9/component.js deleted file mode 100644 index 4d33d7445..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.9/component.js +++ /dev/null @@ -1,308 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import hex2rgba from '@vkblocks/utils/hex-to-rgba'; - -export const ComponentV2 = (props) => { - let { - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - anchor, - } = props.attributes; - - const { clientId } = props; - const className = props.className; - const for_ = props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - } else { - classPaddingLR = ' vk_outer-paddingLR-none'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - const defaultProps = { - clientId, - anchor, - className, - classWidth, - classPaddingLR, - classPaddingVertical, - classBgPosition, - borderProperty, - borderRadiusProperty, - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType, - containerClass, - elm, - lower_level, - lowerDividerBgColor, - whichSideLower, - }; - - return ( - <> - - - - ); -}; - -const GenerateMediaqueryCss = (props) => { - const { attributes, clientId } = props; - const { - bgImageMobile, - bgImageTablet, - bgImage, - bgColor, - opacity, - } = attributes; - - const mobileViewport = 'max-width: 575.98px'; - const tabletViewport = 'min-width: 576px'; - const pcViewport = 'min-width: 1200px'; - const underPcViewport = 'max-width: 1199.98px'; - - let bgColorWOpacity; - - //hexからrgbaに変換 - if (bgColor) { - bgColorWOpacity = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColorWOpacity = hex2rgba('#fff', opacity); - } - - //moible only - if (bgImageMobile && !bgImageTablet && !bgImage) { - return ( - - ); - } - //tablet only - if (!bgImageMobile && bgImageTablet && !bgImage) { - return ( - - ); - } - //pc only - if (!bgImageMobile && !bgImageTablet && bgImage) { - return ( - - ); - } - //pc -mobile - if (bgImageMobile && !bgImageTablet && bgImage) { - return ( - - ); - } - //pc -tablet - if (!bgImageMobile && bgImageTablet && bgImage) { - return ( - - ); - } - //tablet - mobile - if (bgImageMobile && bgImageTablet && !bgImage) { - return ( - - ); - } - //pc -tablet - mobile - if (bgImageMobile && bgImageTablet && bgImage) { - return ( - - ); - } - //no background image - if (!bgImageMobile && !bgImageTablet && !bgImage) { - return ( - - ); - } -}; - -const OuterBlockInner = (props) => { - const { - clientId, - anchor, - className, - classWidth, - classPaddingLR, - classPaddingVertical, - classBgPosition, - borderProperty, - borderRadiusProperty, - // eslint-disable-next-line camelcase - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType, - containerClass, - elm, - // eslint-disable-next-line camelcase - lower_level, - lowerDividerBgColor, - whichSideLower, - } = props; - - return ( - <> -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- - ); -}; diff --git a/src/blocks/_pro/outer/deprecated/save/0.0.9/save.js b/src/blocks/_pro/outer/deprecated/save/0.0.9/save.js deleted file mode 100644 index 0334f8da1..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.0.9/save.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentV2 } from './component.js'; - -export default function save(props) { - const { attributes, className } = props; - return ( - - ); -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.37.1/component.js b/src/blocks/_pro/outer/deprecated/save/0.37.1/component.js deleted file mode 100644 index fec5e4a4e..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.37.1/component.js +++ /dev/null @@ -1,308 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import hex2rgba from '@vkblocks/utils/hex-to-rgba'; - -// eslint-disable-next-line camelcase -export const OuterBlock0371 = (props) => { - let { - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - anchor, - } = props.attributes; - - const { clientId } = props; - const className = props.className; - const for_ = props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - classPaddingLR = ''; - // eslint-disable-next-line camelcase - if (padding_left_and_right === '0') { - classPaddingLR = ' vk_outer-paddingLR-none'; - // eslint-disable-next-line camelcase - } else if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - // eslint-disable-next-line camelcase - } else if (padding_left_and_right === '2') { - // Fit to content area width - classPaddingLR = ' vk_outer-paddingLR-zero'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - const defaultProps = { - clientId, - anchor, - className, - classWidth, - classPaddingLR, - classPaddingVertical, - classBgPosition, - borderProperty, - borderRadiusProperty, - // eslint-disable-next-line camelcase - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType, - containerClass, - elm, - // eslint-disable-next-line camelcase - lower_level, - lowerDividerBgColor, - whichSideLower, - }; - - return ( -
- - -
- ); -}; - -const GenerateMediaqueryCss = (props) => { - const { attributes, clientId } = props; - const { - bgImageMobile, - bgImageTablet, - bgImage, - bgColor, - opacity, - } = attributes; - - const mobileViewport = 'max-width: 575.98px'; - const tabletViewport = 'min-width: 576px'; - const pcViewport = 'min-width: 1200px'; - const underPcViewport = 'max-width: 1199.98px'; - - let bgColorWOpacity; - - //hexからrgbaに変換 - if (bgColor) { - bgColorWOpacity = hex2rgba(bgColor, opacity); - } else { - //背景色をクリアした時は、白に変更 - bgColorWOpacity = hex2rgba('#fff', opacity); - } - - //moible only - if (bgImageMobile && !bgImageTablet && !bgImage) { - return ( - - ); - } - //tablet only - if (!bgImageMobile && bgImageTablet && !bgImage) { - return ( - - ); - } - //pc only - if (!bgImageMobile && !bgImageTablet && bgImage) { - return ( - - ); - } - //pc -mobile - if (bgImageMobile && !bgImageTablet && bgImage) { - return ( - - ); - } - //pc -tablet - if (!bgImageMobile && bgImageTablet && bgImage) { - return ( - - ); - } - //tablet - mobile - if (bgImageMobile && bgImageTablet && !bgImage) { - return ( - - ); - } - //pc -tablet - mobile - if (bgImageMobile && bgImageTablet && bgImage) { - return ( - - ); - } - //no background image - if (!bgImageMobile && !bgImageTablet && !bgImage) { - return ( - - ); - } -}; - -const OuterBlockInner = (props) => { - const { - // eslint-disable-next-line camelcase - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType, - containerClass, - elm, - // eslint-disable-next-line camelcase - lower_level, - lowerDividerBgColor, - whichSideLower, - } = props; - - return ( - <> -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- - ); -}; diff --git a/src/blocks/_pro/outer/deprecated/save/0.37.1/save.js b/src/blocks/_pro/outer/deprecated/save/0.37.1/save.js deleted file mode 100644 index bffd17880..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.37.1/save.js +++ /dev/null @@ -1,12 +0,0 @@ -import { OuterBlock0371 } from './component'; - -export default function save(props) { - const { attributes } = props; - return ( - - ); -} diff --git a/src/blocks/_pro/outer/deprecated/save/0.60.0/component.js b/src/blocks/_pro/outer/deprecated/save/0.60.0/component.js deleted file mode 100644 index cd672609d..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.60.0/component.js +++ /dev/null @@ -1,193 +0,0 @@ -import { componentDivider } from '../component-divider'; -import { InnerBlocks } from '@wordpress/block-editor'; -import GenerateBgImage from '@vkblocks/utils/GenerateBgImage'; - -export const OuterBlock = (props) => { - let { - bgPosition, - outerWidth, - // eslint-disable-next-line camelcase - padding_left_and_right, - // eslint-disable-next-line camelcase - padding_top_and_bottom, - // eslint-disable-next-line camelcase - upper_level, - // eslint-disable-next-line camelcase - lower_level, - upperDividerBgColor, - lowerDividerBgColor, - dividerType, - borderWidth, - borderStyle, - borderColor, - borderRadius, - anchor, - } = props.attributes; - - const { clientId } = props; - const className = props.className; - const for_ = props.for_; - let classPaddingLR; - let classPaddingVertical; - let classBgPosition; - let classWidth; - let elm; - let containerClass; - let whichSideUpper; - let whichSideLower; - let borderProperty; - let borderRadiusProperty; - - //幅のクラス切り替え - // eslint-disable-next-line prefer-const - classWidth = ` vk_outer-width-${outerWidth}`; - - //classBgPositionのクラス切り替え - if (bgPosition === 'parallax') { - classBgPosition = ' vk_outer-bgPosition-parallax vk-prlx'; - } else if (bgPosition === 'fixed') { - classBgPosition = ' vk_outer-bgPosition-fixed'; - } else if (bgPosition === 'repeat') { - classBgPosition = ' vk_outer-bgPosition-repeat'; - } else { - classBgPosition = ' vk_outer-bgPosition-normal'; - } - - //classPaddingLRのクラス切り替え - classPaddingLR = ''; - // eslint-disable-next-line camelcase - if (padding_left_and_right === '0') { - classPaddingLR = ' vk_outer-paddingLR-none'; - // eslint-disable-next-line camelcase - } else if (padding_left_and_right === '1') { - classPaddingLR = ' vk_outer-paddingLR-use'; - // eslint-disable-next-line camelcase - } else if (padding_left_and_right === '2') { - // Fit to content area width - classPaddingLR = ' vk_outer-paddingLR-zero'; - } - - //classPaddingVerticalのクラス切り替え - // eslint-disable-next-line camelcase - if (padding_top_and_bottom === '1') { - classPaddingVertical = ' vk_outer-paddingVertical-use'; - } else { - classPaddingVertical = ' vk_outer-paddingVertical-none'; - } - - //上側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (upper_level) { - whichSideUpper = 'upper'; - } - - //下側セクションの傾き切り替え - // eslint-disable-next-line camelcase - if (lower_level) { - whichSideLower = 'lower'; - } - - //編集画面とサイト上の切り替え - if (for_ === 'edit') { - elm = ; - } else if ('save') { - elm = ; - containerClass = 'vk_outer_container'; - } - - //borderColorクリア時に白をセットする - if (!borderColor) { - borderColor = '#fff'; - } - - //Dividerエフェクトがない時のみ枠線を追加 - // eslint-disable-next-line camelcase - if (upper_level === 0 && lower_level === 0) { - borderProperty = `${borderWidth}px ${borderStyle} ${borderColor}`; - borderRadiusProperty = `${borderRadius}px`; - } else { - borderProperty = 'none'; - borderRadiusProperty = `0px`; - } - - const defaultProps = { - clientId, - anchor, - className, - classWidth, - classPaddingLR, - classPaddingVertical, - classBgPosition, - borderProperty, - borderRadiusProperty, - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType, - containerClass, - elm, - lower_level, - lowerDividerBgColor, - whichSideLower, - }; - - return ( -
- - -
- ); -}; - -const OuterBlockInner = (props) => { - const { - // eslint-disable-next-line camelcase - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType, - containerClass, - elm, - // eslint-disable-next-line camelcase - lower_level, - lowerDividerBgColor, - whichSideLower, - } = props; - - return ( - <> -
- {componentDivider( - upper_level, - upperDividerBgColor, - whichSideUpper, - dividerType - )} -
{elm}
- {componentDivider( - lower_level, - lowerDividerBgColor, - whichSideLower, - dividerType - )} -
- - ); -}; diff --git a/src/blocks/_pro/outer/deprecated/save/0.60.0/save.js b/src/blocks/_pro/outer/deprecated/save/0.60.0/save.js deleted file mode 100644 index 1149e99f7..000000000 --- a/src/blocks/_pro/outer/deprecated/save/0.60.0/save.js +++ /dev/null @@ -1,12 +0,0 @@ -import { OuterBlock } from './component'; - -export default function save(props) { - const { attributes } = props; - return ( - - ); -} diff --git a/src/blocks/_pro/outer/deprecated/save/index.js b/src/blocks/_pro/outer/deprecated/save/index.js index 2f8fe98b3..c3bcf6f4b 100644 --- a/src/blocks/_pro/outer/deprecated/save/index.js +++ b/src/blocks/_pro/outer/deprecated/save/index.js @@ -1,15 +1,3 @@ -import save000 from './0.0.0/save'; -import save001 from './0.0.1/save'; -import save002 from './0.0.2/save'; -import save003 from './0.0.3/save'; -import save004 from './0.0.4/save'; -import save005 from './0.0.5/save'; -import save006 from './0.0.6/save'; -import save007 from './0.0.7/save'; -import save008 from './0.0.8/save'; -import save009 from './0.0.9/save'; -import save0_37_1 from './0.37.1/save'; -import save0_60_0 from './0.60.0/save'; import save1_0_13 from './1.0.13/save'; import save1_26_0 from './1.26.0/save'; import save1_34_1 from './1.34.1/save'; @@ -237,54 +225,6 @@ const deprecated = [ attributes: blockAttributes3, save: save1_0_13, }, - { - attributes: blockAttributes3, - save: save0_60_0, - }, - { - attributes: blockAttributes3, - save: save0_37_1, - }, - { - attributes: blockAttributes3, - save: save009, - }, - { - attributes: blockAttributes2, - save: save008, - }, - { - attributes: blockAttributes2, - save: save007, - }, - { - attributes: blockAttributes2, - save: save006, - }, - { - attributes: blockAttributes2, - save: save005, - }, - { - attributes: blockAttributes2, - save: save004, - }, - { - attributes: blockAttributes2, - save: save003, - }, - { - attributes: blockAttributes2, - save: save002, - }, - { - attributes: blockAttributes2, - save: save001, - }, - { - attributes: blockAttributes, - save: save000, - }, ]; export default deprecated; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__outer__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__outer__deprecated-0-60-1.html deleted file mode 100644 index e87e48bb4..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__outer__deprecated-0-60-1.html +++ /dev/null @@ -1,13 +0,0 @@ - -
- \ No newline at end of file