From 077065ed458b0e346a427b72a8a029ecc97819a2 Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Fri, 6 Jan 2023 14:50:57 +0200 Subject: [PATCH 01/22] fix: sharing icons link to wrong post when used in neve custom layouts --- inc/render/class-sharing-icons-block.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index 1a05f530b..df72a4ca2 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -20,41 +20,51 @@ class Sharing_Icons_Block { * @return array */ public static function get_social_profiles() { + if ( get_post()->post_type === 'neve_custom_layout' ) { + $current_url = home_url( add_query_arg( null, null ) ); + + // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.url_to_postid_url_to_postid + $id_from_url = function_exists( 'wpcom_vip_url_to_postid' ) ? wpcom_vip_url_to_postid( $current_url ) : url_to_postid( $current_url ); + $current_id = $id_from_url > 0 ? $id_from_url : get_the_ID(); + } else { + $current_id = get_the_ID(); + } + $social_attributes = array( 'facebook' => array( 'label' => esc_html__( 'Facebook', 'otter-blocks' ), 'icon' => 'facebook-f', - 'url' => 'https://www.facebook.com/sharer/sharer.php?u=' . esc_url( get_the_permalink() ) . '&title=' . esc_attr( get_the_title() ), + 'url' => 'https://www.facebook.com/sharer/sharer.php?u=' . esc_url( get_the_permalink( $current_id ) ) . '&title=' . esc_attr( get_the_title( $current_id ) ), ), 'twitter' => array( 'label' => esc_html__( 'Twitter', 'otter-blocks' ), 'icon' => 'twitter', - 'url' => 'http://twitter.com/share?url=' . esc_url( get_the_permalink() ) . '&text=' . esc_attr( get_the_title() ), + 'url' => 'http://twitter.com/share?url=' . esc_url( get_the_permalink( $current_id ) ) . '&text=' . esc_attr( get_the_title( $current_id ) ), ), 'linkedin' => array( 'label' => esc_html__( 'Linkedin', 'otter-blocks' ), 'icon' => 'linkedin-in', - 'url' => 'https://www.linkedin.com/shareArticle?mini=true&url=' . esc_url( get_the_permalink() ) . '&title=' . esc_attr( get_the_title() ), + 'url' => 'https://www.linkedin.com/shareArticle?mini=true&url=' . esc_url( get_the_permalink( $current_id ) ) . '&title=' . esc_attr( get_the_title( $current_id ) ), ), 'pinterest' => array( 'label' => esc_html__( 'Pinterest', 'otter-blocks' ), 'icon' => 'pinterest-p', - 'url' => 'https://pinterest.com/pin/create/button/?url=' . esc_url( get_the_permalink() ) . '&description=' . esc_attr( get_the_title() ), + 'url' => 'https://pinterest.com/pin/create/button/?url=' . esc_url( get_the_permalink( $current_id ) ) . '&description=' . esc_attr( get_the_title( $current_id ) ), ), 'tumblr' => array( 'label' => esc_html__( 'Tumblr', 'otter-blocks' ), 'icon' => 'tumblr', - 'url' => 'https://tumblr.com/share/link?url=' . esc_url( get_the_permalink() ) . '&name=' . esc_attr( get_the_title() ), + 'url' => 'https://tumblr.com/share/link?url=' . esc_url( get_the_permalink( $current_id ) ) . '&name=' . esc_attr( get_the_title( $current_id ) ), ), 'reddit' => array( 'label' => esc_html__( 'Reddit', 'otter-blocks' ), 'icon' => 'reddit-alien', - 'url' => 'https://www.reddit.com/submit?url=' . esc_url( get_the_permalink() ), + 'url' => 'https://www.reddit.com/submit?url=' . esc_url( get_the_permalink( $current_id ) ), ), ); From bec916ca8c61e291b1ecad3be0ed9333815bc76a Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Mon, 9 Jan 2023 16:22:51 +0200 Subject: [PATCH 02/22] fix: social share in neve custom layouts --- inc/render/class-sharing-icons-block.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index df72a4ca2..37950ba98 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -20,15 +20,7 @@ class Sharing_Icons_Block { * @return array */ public static function get_social_profiles() { - if ( get_post()->post_type === 'neve_custom_layout' ) { - $current_url = home_url( add_query_arg( null, null ) ); - - // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.url_to_postid_url_to_postid - $id_from_url = function_exists( 'wpcom_vip_url_to_postid' ) ? wpcom_vip_url_to_postid( $current_url ) : url_to_postid( $current_url ); - $current_id = $id_from_url > 0 ? $id_from_url : get_the_ID(); - } else { - $current_id = get_the_ID(); - } + $current_id = get_queried_object_id(); $social_attributes = array( 'facebook' => array( From a5b0d9d98ac00c6e88eee52486623e345de7228d Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Mon, 9 Jan 2023 20:27:41 +0200 Subject: [PATCH 03/22] chore: use smaller dashed underline for dinamic text & add option to not highlight --- inc/class-registration.php | 1 + inc/plugins/class-options-settings.php | 11 +++++++++++ src/blocks/global.d.ts | 1 + src/blocks/plugins/dynamic-content/editor.scss | 5 +++-- src/dashboard/components/pages/Dashboard.js | 10 ++++++++++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/inc/class-registration.php b/inc/class-registration.php index 4ea715581..de1debb4a 100644 --- a/inc/class-registration.php +++ b/inc/class-registration.php @@ -269,6 +269,7 @@ public function enqueue_block_editor_assets() { 'version' => OTTER_BLOCKS_VERSION, 'showBFDeal' => Pro::bf_deal(), 'isRTL' => is_rtl(), + 'highlightDynamicText' => get_option( 'themeisle_blocks_settings_highlight_dynamic', true ) ) ); diff --git a/inc/plugins/class-options-settings.php b/inc/plugins/class-options-settings.php index ecf18558f..0a62b40d1 100644 --- a/inc/plugins/class-options-settings.php +++ b/inc/plugins/class-options-settings.php @@ -90,6 +90,17 @@ public function register_settings() { ) ); + register_setting( + 'themeisle_blocks_settings', + 'themeisle_blocks_settings_highlight_dynamic', + array( + 'type' => 'boolean', + 'description' => __( 'Easily differentiate between dynamic and normal text in the editor.', 'otter-blocks' ), + 'show_in_rest' => true, + 'default' => true, + ) + ); + register_setting( 'themeisle_blocks_settings', 'themeisle_blocks_settings_optimize_animations_css', diff --git a/src/blocks/global.d.ts b/src/blocks/global.d.ts index 337149dbf..676377aff 100644 --- a/src/blocks/global.d.ts +++ b/src/blocks/global.d.ts @@ -36,6 +36,7 @@ declare global { } blocksIDs: string[] isAncestorTypeAvailable: boolean + highlightDynamicText: boolean } otterPro?: Readonly<{ isActive: boolean diff --git a/src/blocks/plugins/dynamic-content/editor.scss b/src/blocks/plugins/dynamic-content/editor.scss index ae91a112c..d38d50f19 100644 --- a/src/blocks/plugins/dynamic-content/editor.scss +++ b/src/blocks/plugins/dynamic-content/editor.scss @@ -46,12 +46,13 @@ o-dynamic-link { .wp-block:not(.is-selected) { o-dynamic[data-preview]:not([data-preview=""]) { text-decoration-line: underline; - text-decoration-style: double; + text-decoration-style: dashed; + text-decoration-thickness: 7%; text-decoration-color: var(--wp-admin-theme-color); span { display: none; } - + &:after { content: attr(data-preview); } diff --git a/src/dashboard/components/pages/Dashboard.js b/src/dashboard/components/pages/Dashboard.js index 531a613ca..296151010 100644 --- a/src/dashboard/components/pages/Dashboard.js +++ b/src/dashboard/components/pages/Dashboard.js @@ -92,6 +92,16 @@ const Dashboard = ({ onChange={ () => updateOption( 'themeisle_blocks_settings_block_conditions', ! Boolean( getOption( 'themeisle_blocks_settings_block_conditions' ) ) ) } /> + + + updateOption( 'themeisle_blocks_settings_highlight_dynamic', ! Boolean( getOption( 'themeisle_blocks_settings_highlight_dynamic' ) ) ) } + /> + Date: Fri, 13 Jan 2023 14:41:21 +0200 Subject: [PATCH 04/22] fix: social share in archive pages & FSE --- inc/render/class-sharing-icons-block.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index 37950ba98..88c2c7645 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -20,43 +20,50 @@ class Sharing_Icons_Block { * @return array */ public static function get_social_profiles() { - $current_id = get_queried_object_id(); + $current_url = home_url( add_query_arg( null, null ) ); + $title = get_the_title( get_queried_object_id() ); + + if ( is_archive() ) { + $title = get_the_archive_title(); + } else if ( is_home() && wp_is_block_theme() ) { + $title = get_bloginfo( 'title' ); + } $social_attributes = array( 'facebook' => array( 'label' => esc_html__( 'Facebook', 'otter-blocks' ), 'icon' => 'facebook-f', - 'url' => 'https://www.facebook.com/sharer/sharer.php?u=' . esc_url( get_the_permalink( $current_id ) ) . '&title=' . esc_attr( get_the_title( $current_id ) ), + 'url' => 'https://www.facebook.com/sharer/sharer.php?u=' . esc_url( $current_url ) . '&title=' . esc_attr( $title ), ), 'twitter' => array( 'label' => esc_html__( 'Twitter', 'otter-blocks' ), 'icon' => 'twitter', - 'url' => 'http://twitter.com/share?url=' . esc_url( get_the_permalink( $current_id ) ) . '&text=' . esc_attr( get_the_title( $current_id ) ), + 'url' => 'http://twitter.com/share?url=' . esc_url( $current_url ) . '&text=' . esc_attr( $title ), ), 'linkedin' => array( 'label' => esc_html__( 'Linkedin', 'otter-blocks' ), 'icon' => 'linkedin-in', - 'url' => 'https://www.linkedin.com/shareArticle?mini=true&url=' . esc_url( get_the_permalink( $current_id ) ) . '&title=' . esc_attr( get_the_title( $current_id ) ), + 'url' => 'https://www.linkedin.com/shareArticle?mini=true&url=' . esc_url( $current_url ) . '&title=' . esc_attr( $title ), ), 'pinterest' => array( 'label' => esc_html__( 'Pinterest', 'otter-blocks' ), 'icon' => 'pinterest-p', - 'url' => 'https://pinterest.com/pin/create/button/?url=' . esc_url( get_the_permalink( $current_id ) ) . '&description=' . esc_attr( get_the_title( $current_id ) ), + 'url' => 'https://pinterest.com/pin/create/button/?url=' . esc_url( $current_url ) . '&description=' . esc_attr( $title ), ), 'tumblr' => array( 'label' => esc_html__( 'Tumblr', 'otter-blocks' ), 'icon' => 'tumblr', - 'url' => 'https://tumblr.com/share/link?url=' . esc_url( get_the_permalink( $current_id ) ) . '&name=' . esc_attr( get_the_title( $current_id ) ), + 'url' => 'https://tumblr.com/share/link?url=' . esc_url( $current_url ) . '&name=' . esc_attr( $title ), ), 'reddit' => array( 'label' => esc_html__( 'Reddit', 'otter-blocks' ), 'icon' => 'reddit-alien', - 'url' => 'https://www.reddit.com/submit?url=' . esc_url( get_the_permalink( $current_id ) ), + 'url' => 'https://www.reddit.com/submit?url=' . esc_url( $current_url ), ), ); From 8ee607660e3ad58a1052d29f06bee2de6c5314c5 Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Sun, 15 Jan 2023 13:16:08 +0200 Subject: [PATCH 05/22] fix: phpcs --- inc/render/class-sharing-icons-block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index 88c2c7645..4c4932e22 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -21,11 +21,11 @@ class Sharing_Icons_Block { */ public static function get_social_profiles() { $current_url = home_url( add_query_arg( null, null ) ); - $title = get_the_title( get_queried_object_id() ); + $title = get_the_title( get_queried_object_id() ); if ( is_archive() ) { $title = get_the_archive_title(); - } else if ( is_home() && wp_is_block_theme() ) { + } elseif ( is_home() && wp_is_block_theme() ) { $title = get_bloginfo( 'title' ); } From 1dcc26090b613f50694983d7a13c831345db861c Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Mon, 16 Jan 2023 10:10:09 +0200 Subject: [PATCH 06/22] chore: hide highlight when block is not selected --- inc/class-registration.php | 2 +- src/blocks/plugins/dynamic-content/editor.scss | 10 ++++++---- src/blocks/plugins/dynamic-content/value/index.js | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/inc/class-registration.php b/inc/class-registration.php index 7e1fd3d4e..2ecd716b3 100644 --- a/inc/class-registration.php +++ b/inc/class-registration.php @@ -271,7 +271,7 @@ public function enqueue_block_editor_assets() { 'version' => OTTER_BLOCKS_VERSION, 'showBFDeal' => Pro::bf_deal(), 'isRTL' => is_rtl(), - 'highlightDynamicText' => get_option( 'themeisle_blocks_settings_highlight_dynamic', true ) + 'highlightDynamicText' => get_option( 'themeisle_blocks_settings_highlight_dynamic', true ), ) ); diff --git a/src/blocks/plugins/dynamic-content/editor.scss b/src/blocks/plugins/dynamic-content/editor.scss index d38d50f19..13307d606 100644 --- a/src/blocks/plugins/dynamic-content/editor.scss +++ b/src/blocks/plugins/dynamic-content/editor.scss @@ -45,10 +45,12 @@ o-dynamic-link { .wp-block:not(.is-selected) { o-dynamic[data-preview]:not([data-preview=""]) { - text-decoration-line: underline; - text-decoration-style: dashed; - text-decoration-thickness: 7%; - text-decoration-color: var(--wp-admin-theme-color); + &:not(.hide-highlight) { + text-decoration-line: underline; + text-decoration-style: dashed; + text-decoration-thickness: 7%; + text-decoration-color: var(--wp-admin-theme-color); + } span { display: none; } diff --git a/src/blocks/plugins/dynamic-content/value/index.js b/src/blocks/plugins/dynamic-content/value/index.js index d5d8d8ead..f0ad9a3b9 100644 --- a/src/blocks/plugins/dynamic-content/value/index.js +++ b/src/blocks/plugins/dynamic-content/value/index.js @@ -61,6 +61,10 @@ const displayData = ( element, value ) => { el.innerHTML = value; value = el.textContent || el.innerText; + if ( ! Boolean( window.themeisleGutenberg.highlightDynamicText ) ) { + element.classList.add( 'hide-highlight' ); + } + element.innerHTML = '' + element.innerHTML + ''; element.dataset.preview = value; }; From e2af9be850374c17b4e758cc1301932286d6fb25 Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Mon, 16 Jan 2023 10:40:07 +0200 Subject: [PATCH 07/22] chore: move toggle --- src/dashboard/components/pages/Dashboard.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/dashboard/components/pages/Dashboard.js b/src/dashboard/components/pages/Dashboard.js index 296151010..8ca2d765d 100644 --- a/src/dashboard/components/pages/Dashboard.js +++ b/src/dashboard/components/pages/Dashboard.js @@ -92,16 +92,6 @@ const Dashboard = ({ onChange={ () => updateOption( 'themeisle_blocks_settings_block_conditions', ! Boolean( getOption( 'themeisle_blocks_settings_block_conditions' ) ) ) } /> - - - updateOption( 'themeisle_blocks_settings_highlight_dynamic', ! Boolean( getOption( 'themeisle_blocks_settings_highlight_dynamic' ) ) ) } - /> - + + updateOption( 'themeisle_blocks_settings_highlight_dynamic', ! Boolean( getOption( 'themeisle_blocks_settings_highlight_dynamic' ) ) ) } + /> + + Date: Mon, 16 Jan 2023 12:44:34 +0200 Subject: [PATCH 08/22] fix: posts block error when the image is an URL --- src/blocks/blocks/posts/components/layout/thumbnail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blocks/blocks/posts/components/layout/thumbnail.js b/src/blocks/blocks/posts/components/layout/thumbnail.js index cc70058fc..993f931fb 100644 --- a/src/blocks/blocks/posts/components/layout/thumbnail.js +++ b/src/blocks/blocks/posts/components/layout/thumbnail.js @@ -24,7 +24,7 @@ const Thumbnail = ({ const image = select( 'core' ).getMedia( id, { context: 'view' }); const featuredImage = image ? - 0 < Object.keys( image.media_details.sizes ).length ? + ( 'string' !== typeof image && 0 < Object.keys( image.media_details.sizes ).length ) ? image.media_details.sizes[size] ? image.media_details.sizes[size].source_url : image.source_url : From 83c9f23564c9181ac79cd3b600a3c884e8714fbc Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Wed, 18 Jan 2023 10:48:01 +0200 Subject: [PATCH 09/22] fix: share home page with query inside --- inc/render/class-sharing-icons-block.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index 4c4932e22..6c8be00e4 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -25,8 +25,6 @@ public static function get_social_profiles() { if ( is_archive() ) { $title = get_the_archive_title(); - } elseif ( is_home() && wp_is_block_theme() ) { - $title = get_bloginfo( 'title' ); } $social_attributes = array( From 0686f6d06949c97c3b3a76eaccaf85b90386a512 Mon Sep 17 00:00:00 2001 From: Soare Robert Daniel Date: Thu, 19 Jan 2023 13:16:46 +0200 Subject: [PATCH 10/22] feat: copy-paste animations --- src/blocks/plugins/copy-paste/adaptors.ts | 16 +++++-- src/blocks/plugins/copy-paste/copy-paste.ts | 5 +- src/blocks/plugins/copy-paste/models.d.ts | 1 + src/blocks/plugins/copy-paste/plugins.ts | 51 +++++++++++++++++++++ src/blocks/plugins/copy-paste/utils.ts | 13 ++++++ 5 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 src/blocks/plugins/copy-paste/plugins.ts diff --git a/src/blocks/plugins/copy-paste/adaptors.ts b/src/blocks/plugins/copy-paste/adaptors.ts index c26f94f59..5dbbf252b 100644 --- a/src/blocks/plugins/copy-paste/adaptors.ts +++ b/src/blocks/plugins/copy-paste/adaptors.ts @@ -5,7 +5,7 @@ import { coreAdaptors } from './core-adaptors'; import { ColumnAttrs } from '../../blocks/section/column/types'; import { ButtonGroupAttrs } from '../../blocks/button-group/group/types'; import { ButtonAttrs } from '../../blocks/button-group/button/types'; -import { addUnit, getInt, makeBox, getSingleValueFromBox } from './utils'; +import { addUnit, getInt, makeBox, getSingleValueFromBox, createBoxFrom } from './utils'; import { IconAttrs } from '../../blocks/font-awesome-icons/types'; import { IconListAttrs } from '../../blocks/icon-list/types'; import { IconListItemAttrs } from '../../blocks/icon-list/item/types'; @@ -480,10 +480,15 @@ export const adaptors = { size: addUnit( attrs?.labelFontSize, 'px' ) }, border: { - width: makeBox( addUnit( attrs?.inputBorderWidth, 'px' ) ), + width: createBoxFrom( attrs?.inputBorderWidth ), radius: { - desktop: makeBox( addUnit( attrs?.inputBorderRadius, 'px' ) ) + desktop: createBoxFrom( attrs?.inputBorderRadius ) } + }, + padding: { + desktop: attrs?.inputPadding, + tablet: attrs?.inputPaddingTablet, + mobile: attrs?.inputPaddingMobile } }, private: { @@ -501,7 +506,10 @@ export const adaptors = { labelFontSize: getInt( s?.font?.size ), inputBorderColor: s?.colors?.border, inputBorderRadius: getInt( s?.border?.radius?.desktop?.top ), - inputBorderWidth: getInt( getSingleValueFromBox( s?.border?.width ) ) + inputBorderWidth: getInt( getSingleValueFromBox( s?.border?.width ) ), + inputPadding: s?.padding?.desktop, + inputPaddingTablet: s?.padding?.tablet, + inputPaddingMobile: s?.padding?.mobile }; } }, diff --git a/src/blocks/plugins/copy-paste/copy-paste.ts b/src/blocks/plugins/copy-paste/copy-paste.ts index f19ecb5dc..f0d0863e2 100644 --- a/src/blocks/plugins/copy-paste/copy-paste.ts +++ b/src/blocks/plugins/copy-paste/copy-paste.ts @@ -3,6 +3,8 @@ import { OtterBlock } from '../../helpers/blocks'; import { compactObject } from '../../helpers/helper-functions'; import { adaptors } from './adaptors'; import { CopyPasteStorage, Storage } from './models'; +import { copyAnimations, pasteAnimations } from './plugins'; + type Adaptors = Record Storage @@ -43,6 +45,7 @@ class CopyPaste { this.storage.shared = copied?.shared; this.storage.core = copied?.core; this.storage.private = copied?.private; + this.storage.animations = copyAnimations( block?.attributes?.className ); this.sync(); success = 'SUCCESS'; @@ -69,7 +72,7 @@ class CopyPaste { }; pasted = ( adaptors as Adaptors )?.[block.name]?.paste( attrs ); - + pasted.className = pasteAnimations( block.attributes?.className, this.storage.animations ); } catch ( e ) { console.error( e ); } finally { diff --git a/src/blocks/plugins/copy-paste/models.d.ts b/src/blocks/plugins/copy-paste/models.d.ts index d41836679..0c4c1ba09 100644 --- a/src/blocks/plugins/copy-paste/models.d.ts +++ b/src/blocks/plugins/copy-paste/models.d.ts @@ -70,4 +70,5 @@ type CopyPasteStorage = { shared?: SharedAttrs core?: SharedCore private?: any + animations?: string[] } diff --git a/src/blocks/plugins/copy-paste/plugins.ts b/src/blocks/plugins/copy-paste/plugins.ts new file mode 100644 index 000000000..b6d8519cc --- /dev/null +++ b/src/blocks/plugins/copy-paste/plugins.ts @@ -0,0 +1,51 @@ +import { uniq } from 'lodash'; +import { animationsList, outAnimation, delayList, speedList } from '../../../animation/data'; + +export const copyAnimations = ( className: string | undefined ) => { + if ( className === undefined || ! className?.includes( 'animated' ) ) { + return undefined; + } + + const allClasses = uniq( className.split( ' ' ) ); + + const animations = [ + 'animated', + ...animationsList.map( x => x.value ), + ...outAnimation, + ...delayList.map( x => x.value ), + ...speedList + ]; + + return allClasses.filter( c => { + return 0 < c.length && animations.some( a => c === a ); + }); +}; + +export const pasteAnimations = ( className: string | undefined, animList: string[] | undefined ) => { + + if ( animList === undefined ) { + return className; + } + + const currentClasses = uniq( ( className ?? '' ).split( ' ' ) ); + + const animations = [ + 'animated', + ...animationsList.map( x => x.value ), + ...outAnimation, + ...delayList.map( x => x.value ), + ...speedList + ]; + + const cleaned = currentClasses + .filter( c => { + return ! animations.some( a => c === a ) && 0 < c.length; + }); + + return uniq([ ...( cleaned ?? []), ...( animList ?? []) ]).join( ' ' ).trim(); +}; + +export default { + copyAnimations, + pasteAnimations +}; diff --git a/src/blocks/plugins/copy-paste/utils.ts b/src/blocks/plugins/copy-paste/utils.ts index 35d878d2f..fda6807b4 100644 --- a/src/blocks/plugins/copy-paste/utils.ts +++ b/src/blocks/plugins/copy-paste/utils.ts @@ -1,4 +1,5 @@ import { color } from '@wordpress/icons/build-types'; +import { isNumber, isString } from 'lodash'; import { BoxType } from '../../helpers/blocks'; /** @@ -184,3 +185,15 @@ export const getColorFromThemeStyles = ( type: 'color' | 'gradient' | 'duotone' const isCSSVar = Boolean( color?.includes( '--wp--preset--' ) ); return isCSSVar ? `var(${color})` : color; }; + +export const createBoxFrom = ( x: string | number | undefined | BoxType ) => { + if ( isNumber( x ) ) { + return makeBox( addUnit( x, 'px' ) ); + } + + if ( isString( x ) ) { + return makeBox( x ); + } + + return x; +}; From 0e0d245087c404207bcc16d0d3286832c7439dd8 Mon Sep 17 00:00:00 2001 From: Soare Robert Daniel Date: Fri, 20 Jan 2023 12:11:10 +0200 Subject: [PATCH 11/22] chore: improve paste between different type blocks --- src/blocks/plugins/copy-paste/copy-paste.ts | 9 +++++++++ src/blocks/plugins/copy-paste/plugins.ts | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/blocks/plugins/copy-paste/copy-paste.ts b/src/blocks/plugins/copy-paste/copy-paste.ts index f0d0863e2..d450d1988 100644 --- a/src/blocks/plugins/copy-paste/copy-paste.ts +++ b/src/blocks/plugins/copy-paste/copy-paste.ts @@ -73,6 +73,15 @@ class CopyPaste { pasted = ( adaptors as Adaptors )?.[block.name]?.paste( attrs ); pasted.className = pasteAnimations( block.attributes?.className, this.storage.animations ); + + if ( block.name !== this.storage.copiedBlock ) { + + /** + * If the blocks are not the same type, copy only the defined values. This will prevent some unwanted override. + */ + pasted = compactObject( pasted ); + } + } catch ( e ) { console.error( e ); } finally { diff --git a/src/blocks/plugins/copy-paste/plugins.ts b/src/blocks/plugins/copy-paste/plugins.ts index b6d8519cc..19d24e6d1 100644 --- a/src/blocks/plugins/copy-paste/plugins.ts +++ b/src/blocks/plugins/copy-paste/plugins.ts @@ -16,9 +16,11 @@ export const copyAnimations = ( className: string | undefined ) => { ...speedList ]; - return allClasses.filter( c => { + const otterAnim = allClasses.filter( c => { return 0 < c.length && animations.some( a => c === a ); }); + + return 0 === otterAnim.length ? undefined : otterAnim; }; export const pasteAnimations = ( className: string | undefined, animList: string[] | undefined ) => { From 47e166c8edb78b4a15183782fda40b217735984a Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Thu, 19 Jan 2023 18:16:44 +0200 Subject: [PATCH 12/22] fix: add context attribute to sharing icons --- inc/render/class-sharing-icons-block.php | 11 +++++++++-- src/blocks/blocks/sharing-icons/block.json | 3 +++ src/blocks/blocks/sharing-icons/edit.js | 21 +++++++++++++++++++++ src/blocks/blocks/sharing-icons/types.d.ts | 1 + 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index 6c8be00e4..3544feb85 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -17,14 +17,21 @@ class Sharing_Icons_Block { /** * Return attributes for social media services. * + * @param string|null $context Context of the sharing icons block. + * * @return array */ - public static function get_social_profiles() { + public static function get_social_profiles( $context = null ) { $current_url = home_url( add_query_arg( null, null ) ); $title = get_the_title( get_queried_object_id() ); if ( is_archive() ) { $title = get_the_archive_title(); + } elseif ( $context === 'query' ) { + $current_url = get_the_permalink(); + $title = get_the_title(); + } elseif ( null === get_queried_object() && is_home() ) { + $title = get_bloginfo( 'name' ); } $social_attributes = array( @@ -89,7 +96,7 @@ private function is_active( $icon ) { * @return mixed|string */ public function render( $attributes ) { - $social_attributes = $this->get_social_profiles(); + $social_attributes = $this->get_social_profiles( isset( $attributes['context'] ) ? $attributes['context'] : null ); $class = ''; diff --git a/src/blocks/blocks/sharing-icons/block.json b/src/blocks/blocks/sharing-icons/block.json index 279763fc7..3b2f3b76d 100644 --- a/src/blocks/blocks/sharing-icons/block.json +++ b/src/blocks/blocks/sharing-icons/block.json @@ -58,6 +58,9 @@ }, "textColor" : { "type": "string" + }, + "context": { + "type": "string" } }, "styles": [ diff --git a/src/blocks/blocks/sharing-icons/edit.js b/src/blocks/blocks/sharing-icons/edit.js index 1b6f42b7c..e11ef57f3 100644 --- a/src/blocks/blocks/sharing-icons/edit.js +++ b/src/blocks/blocks/sharing-icons/edit.js @@ -12,6 +12,8 @@ import { import ServerSideRender from '@wordpress/server-side-render'; +import { useSelect } from '@wordpress/data'; + /** * Internal dependencies */ @@ -38,6 +40,25 @@ const Edit = ({ return () => unsubscribe( attributes.id ); }, [ attributes.id ]); + const { isQueryChild } = useSelect( select => { + const { + getBlock, + getBlockParentsByBlockName + } = select( 'core/block-editor' ); + + const currentBlock = getBlock( clientId ); + + return { + isQueryChild: 0 < getBlockParentsByBlockName( currentBlock?.clientId, 'core/query' ).length + }; + }, []); + + useEffect( () => { + if ( isQueryChild ) { + setAttributes({ context: 'query' }); + } + }, [ isQueryChild ]); + const blockProps = useBlockProps(); return ( diff --git a/src/blocks/blocks/sharing-icons/types.d.ts b/src/blocks/blocks/sharing-icons/types.d.ts index 2f30bdab8..9518bdf55 100644 --- a/src/blocks/blocks/sharing-icons/types.d.ts +++ b/src/blocks/blocks/sharing-icons/types.d.ts @@ -13,6 +13,7 @@ type Attributes = { textDeco: string backgroundColor: string textColor: string + context: string } export type SharingIconsAttrs = Partial From 08ec252fbcb02ba07e5ab6621c989e7d0f1be04c Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Wed, 25 Jan 2023 13:46:59 +0200 Subject: [PATCH 13/22] fix: phpcs --- inc/render/class-sharing-icons-block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/render/class-sharing-icons-block.php b/inc/render/class-sharing-icons-block.php index 3544feb85..a427c7e59 100644 --- a/inc/render/class-sharing-icons-block.php +++ b/inc/render/class-sharing-icons-block.php @@ -27,7 +27,7 @@ public static function get_social_profiles( $context = null ) { if ( is_archive() ) { $title = get_the_archive_title(); - } elseif ( $context === 'query' ) { + } elseif ( 'query' === $context ) { $current_url = get_the_permalink(); $title = get_the_title(); } elseif ( null === get_queried_object() && is_home() ) { From 4b69848d2bac190b92aae6a7ce4f4ec7819a50b1 Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Wed, 25 Jan 2023 13:56:35 +0200 Subject: [PATCH 14/22] fix: check if media_details is empty --- src/blocks/blocks/posts/components/layout/thumbnail.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blocks/blocks/posts/components/layout/thumbnail.js b/src/blocks/blocks/posts/components/layout/thumbnail.js index 993f931fb..4bc2475f5 100644 --- a/src/blocks/blocks/posts/components/layout/thumbnail.js +++ b/src/blocks/blocks/posts/components/layout/thumbnail.js @@ -10,6 +10,8 @@ import { Fragment } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; +import { isEmpty } from 'lodash'; + const Thumbnail = ({ id, link, @@ -24,7 +26,7 @@ const Thumbnail = ({ const image = select( 'core' ).getMedia( id, { context: 'view' }); const featuredImage = image ? - ( 'string' !== typeof image && 0 < Object.keys( image.media_details.sizes ).length ) ? + ( 'string' !== typeof image && ! isEmpty( image.media_details ) && 0 < Object.keys( image.media_details.sizes ).length ) ? image.media_details.sizes[size] ? image.media_details.sizes[size].source_url : image.source_url : From 81dfc97f442a29b988b73782394bda27bd53861d Mon Sep 17 00:00:00 2001 From: Soare Robert Daniel Date: Wed, 25 Jan 2023 14:46:48 +0200 Subject: [PATCH 15/22] chore: remove border as common style --- src/blocks/plugins/copy-paste/core-adaptors.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/blocks/plugins/copy-paste/core-adaptors.ts b/src/blocks/plugins/copy-paste/core-adaptors.ts index 9dac0435f..ad9c548d5 100644 --- a/src/blocks/plugins/copy-paste/core-adaptors.ts +++ b/src/blocks/plugins/copy-paste/core-adaptors.ts @@ -1,4 +1,4 @@ -import { isObjectLike, merge, pick } from 'lodash'; +import { merge, pick } from 'lodash'; import { BoxType } from '../../helpers/blocks'; import { getChoice } from '../../helpers/helper-functions'; import { Storage } from './models'; @@ -52,13 +52,14 @@ const commonExtractor = ( attrs: any ): Storage => { }, margin: { desktop: attrs?.style?.spacing?.margin - }, - border: { - width: makeBox( attrs?.style?.border?.width ), - radius: { - desktop: ! isObjectLike( attrs?.style?.border?.radius ) ? makeBox( attrs?.style?.border?.radius ) : radiusExtract( attrs?.style?.border?.radius ) - } } + + // border: { + // width: makeBox( attrs?.style?.border?.width ), + // radius: { + // desktop: ! isObjectLike( attrs?.style?.border?.radius ) ? makeBox( attrs?.style?.border?.radius ) : radiusExtract( attrs?.style?.border?.radius ) + // } + // } }, core: { textColor: attrs?.textColor, From 879ac0f5b7ea11508f91b766d29e57c73ed8a233 Mon Sep 17 00:00:00 2001 From: arinaturcu Date: Sun, 29 Jan 2023 16:19:32 +0200 Subject: [PATCH 16/22] fix: change icons rules from snake case to camel case --- src/blocks/helpers/icons.js | 110 ++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/src/blocks/helpers/icons.js b/src/blocks/helpers/icons.js index 7feacec35..728cde01c 100644 --- a/src/blocks/helpers/icons.js +++ b/src/blocks/helpers/icons.js @@ -67,7 +67,7 @@ export const otterIconColored = ({ className }) => { export const accordionIcon = () => { return ( - + ); }; @@ -76,7 +76,7 @@ export const accordionItemIcon = () => { return ( - + ); }; @@ -85,8 +85,8 @@ export const headingIcon = () => { return ( - - + + ); }; @@ -94,9 +94,9 @@ export const headingIcon = () => { export const buttonsIcon = () => { return ( - - - + + + ); }; @@ -104,8 +104,8 @@ export const buttonsIcon = () => { export const buttonIcon = () => { return ( - - + + ); }; @@ -113,10 +113,10 @@ export const buttonIcon = () => { export const circleIcon = () => { return ( - - + + - + ); }; @@ -124,7 +124,7 @@ export const circleIcon = () => { export const countdownIcon = () => { return ( - + ); @@ -133,8 +133,8 @@ export const countdownIcon = () => { export const flipIcon = () => { return ( - - + + ); }; @@ -142,7 +142,7 @@ export const flipIcon = () => { export const faIcon = () => { return ( - + ); @@ -151,8 +151,8 @@ export const faIcon = () => { export const formIcon = () => { return ( - - + + ); }; @@ -160,7 +160,7 @@ export const formIcon = () => { export const formFieldIcon = () => { return ( - + ); @@ -169,7 +169,7 @@ export const formFieldIcon = () => { export const googleMapIcon = () => { return ( - + ); }; @@ -177,7 +177,7 @@ export const googleMapIcon = () => { export const iconListIcon = () => { return ( - + ); }; @@ -185,11 +185,11 @@ export const iconListIcon = () => { export const iconListItemIcon = () => { return ( - + - + - + ); }; @@ -197,9 +197,9 @@ export const iconListItemIcon = () => { export const mapIcon = () => { return ( - - - + + + ); }; @@ -207,8 +207,8 @@ export const mapIcon = () => { export const lottieIcon = () => { return ( - - + + ); }; @@ -216,9 +216,9 @@ export const lottieIcon = () => { export const popupIcon = () => { return ( - - - + + + ); }; @@ -226,7 +226,7 @@ export const popupIcon = () => { export const postsIcon = () => { return ( - + ); }; @@ -234,8 +234,8 @@ export const postsIcon = () => { export const progressIcon = () => { return ( - - + + ); }; @@ -243,8 +243,8 @@ export const progressIcon = () => { export const reviewIcon = () => { return ( - - + + ); @@ -253,8 +253,8 @@ export const reviewIcon = () => { export const columnsIcon = () => { return ( - - + + ); }; @@ -262,9 +262,9 @@ export const columnsIcon = () => { export const columnIcon = () => { return ( - + - + ); }; @@ -272,8 +272,8 @@ export const columnIcon = () => { export const sharingIcon = () => { return ( - - + + ); }; @@ -281,8 +281,8 @@ export const sharingIcon = () => { export const sliderIcon = () => { return ( - - + + ); }; @@ -290,9 +290,9 @@ export const sliderIcon = () => { export const tabsIcon = () => { return ( - - - + + + ); }; @@ -300,7 +300,7 @@ export const tabsIcon = () => { export const tabsItemIcon = () => { return ( - + ); }; @@ -308,7 +308,7 @@ export const tabsItemIcon = () => { export const masonryIcon = () => { return ( - + ); }; @@ -316,7 +316,7 @@ export const masonryIcon = () => { export const searchIcon = () => { return ( - + ); }; @@ -325,7 +325,7 @@ export const cartIcon = () => { return ( - + ); }; @@ -333,9 +333,9 @@ export const cartIcon = () => { export const businessHoursIcon = () => { return ( - - - + + + ); From c9411a21ccd0dce628386e4259545c2ea9619684 Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Tue, 31 Jan 2023 01:12:00 +0530 Subject: [PATCH 17/22] Fix Navigation conflict with Animation --- src/animation/editor.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/animation/editor.scss b/src/animation/editor.scss index dfbc35273..bca00861d 100644 --- a/src/animation/editor.scss +++ b/src/animation/editor.scss @@ -120,6 +120,11 @@ .hidden-animated { visibility: hidden; } + + .animated .wp-block-navigation, + .animated.wp-block-navigation { + animation-fill-mode: none; + } } @media ( max-width: 782px ) { From 930f46cdd21359524b70c868b5b60d08469e6305 Mon Sep 17 00:00:00 2001 From: Soare Robert Daniel Date: Wed, 1 Feb 2023 17:04:19 +0200 Subject: [PATCH 18/22] fix: add null check condiftion when trying to get a CSS var value --- src/blocks/helpers/helper-functions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/blocks/helpers/helper-functions.js b/src/blocks/helpers/helper-functions.js index 0373a2445..a928f24bb 100644 --- a/src/blocks/helpers/helper-functions.js +++ b/src/blocks/helpers/helper-functions.js @@ -311,6 +311,10 @@ export const isColorDark = color => { value = hex2rgba( value ); } + if ( ! Boolean( value ) ) { + return false; + } + // Extract the red, green, and blue values const [ r, g, b ] = value.match( /\d+/g ).map( Number ); From f6671bcbbce5eb62050e71aef4175122a59f9e9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 23:00:50 +0000 Subject: [PATCH 19/22] chore(deps): bump codeinwp/themeisle-sdk from 3.2.32 to 3.2.34 Bumps [codeinwp/themeisle-sdk](https://github.com/Codeinwp/themeisle-sdk) from 3.2.32 to 3.2.34. - [Release notes](https://github.com/Codeinwp/themeisle-sdk/releases) - [Changelog](https://github.com/Codeinwp/themeisle-sdk/blob/master/CHANGELOG.md) - [Commits](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.32...v3.2.34) --- updated-dependencies: - dependency-name: codeinwp/themeisle-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 3443da60b..0e698aa3e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7c0fc78d754aadd6d4f452a6d17fc1d7", + "content-hash": "6534682eac1f8ac8063f575e036146bf", "packages": [ { "name": "codeinwp/themeisle-sdk", - "version": "3.2.32", + "version": "3.2.34", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "76c09a05d01b83f620db230146e264bdb9a38af6" + "reference": "f8d3a16d65a77d4f31dbfa1ffcb5ca3ac5c9979b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/76c09a05d01b83f620db230146e264bdb9a38af6", - "reference": "76c09a05d01b83f620db230146e264bdb9a38af6", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/f8d3a16d65a77d4f31dbfa1ffcb5ca3ac5c9979b", + "reference": "f8d3a16d65a77d4f31dbfa1ffcb5ca3ac5c9979b", "shasum": "" }, "require-dev": { @@ -42,9 +42,9 @@ ], "support": { "issues": "https://github.com/Codeinwp/themeisle-sdk/issues", - "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.32" + "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.34" }, - "time": "2022-11-30T20:49:33+00:00" + "time": "2023-01-31T08:26:01+00:00" }, { "name": "masterminds/html5", From 8dec5f27dc5fd16799d835331a1c3c6b71982b5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 23:07:11 +0000 Subject: [PATCH 20/22] chore(deps-dev): bump @wordpress/element from 4.18.0 to 5.3.0 Bumps [@wordpress/element](https://github.com/WordPress/gutenberg/tree/HEAD/packages/element) from 4.18.0 to 5.3.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/element/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/element@5.3.0/packages/element) --- updated-dependencies: - dependency-name: "@wordpress/element" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 213 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 206 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index b784cb087..afa9fc959 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4465,6 +4465,24 @@ "@types/wordpress__keycodes": "*", "@wordpress/element": "^4.0.0", "react-autosize-textarea": "^7.1.0" + }, + "dependencies": { + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } + } } }, "@types/wordpress__blocks": { @@ -4561,6 +4579,24 @@ "@wordpress/element": "^4.1.0", "downshift": "^6.0.15", "re-resizable": "^6.4.0" + }, + "dependencies": { + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } + } } }, "@types/wordpress__data": { @@ -5133,6 +5169,24 @@ "@wordpress/warning": "^2.15.0", "browserslist": "^4.17.6", "core-js": "^3.19.1" + }, + "dependencies": { + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } + } } }, "@wordpress/base-styles": { @@ -5234,6 +5288,22 @@ } } } + }, + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } } } }, @@ -5432,6 +5502,22 @@ } } } + }, + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } } } }, @@ -5453,6 +5539,24 @@ "clipboard": "^2.0.8", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" + }, + "dependencies": { + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } + } } }, "@wordpress/data": { @@ -5514,6 +5618,22 @@ } } } + }, + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } } } }, @@ -5584,18 +5704,78 @@ } }, "@wordpress/element": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.18.0.tgz", - "integrity": "sha512-+3gA4RTD/EDj1h2y/qikh+h0uCUxhShfM7QoDngKOBNSTZHqc0W2p6IMEe+AMdrmu8tyZboTJW/eONjUHE4n7g==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.3.0.tgz", + "integrity": "sha512-sgBrPm9suYx9sAtMLnfqgJem54Vew+BvVRpQoKQjpoXAKklGKSr52xOERek2TZQuZl/hMCCdvScrLIIW96UNAw==", + "dev": true, "requires": { "@babel/runtime": "^7.16.0", - "@types/react": "^17.0.37", - "@types/react-dom": "^17.0.11", - "@wordpress/escape-html": "^2.20.0", + "@types/react": "^18.0.21", + "@types/react-dom": "^18.0.6", + "@wordpress/escape-html": "^2.26.0", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "dependencies": { + "@types/react": { + "version": "18.0.27", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.27.tgz", + "integrity": "sha512-3vtRKHgVxu3Jp9t718R9BuzoD4NcQ8YJ5XRzsSKxNDiDonD2MXIT1TmSkenxuCycZJoQT5d2vE8LwWJxBC1gmA==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-dom": { + "version": "18.0.10", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.10.tgz", + "integrity": "sha512-E42GW/JA4Qv15wQdqJq8DL4JhNpB3prJgjgapN3qJT9K2zO5IIAQh4VXvCEDupoqAwnz0cY4RlXeC/ajX5SFHg==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, + "@wordpress/escape-html": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.26.0.tgz", + "integrity": "sha512-uWumpNH4hnmeepTw9K3gC5LmoZECom5L1P6HuZXYXyld8eU5L9p/JdvAPOwLmjffHyJO3hiB2JqYd+nKElbtrw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.16.0" + } + }, + "react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, + "react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + } + }, + "scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0" + } + } } }, "@wordpress/env": { @@ -5839,6 +6019,23 @@ "@babel/runtime": "^7.16.0", "@wordpress/element": "^4.18.0", "@wordpress/primitives": "^3.18.0" + }, + "dependencies": { + "@wordpress/element": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-4.20.0.tgz", + "integrity": "sha512-Ou7EoGtGe4FUL6fKALINXJLKoSfyWTBJzkJfN2HzSgM1wira9EuWahl8MQN0HAUaWeOoDqMKPvnglfS+kC8JLA==", + "requires": { + "@babel/runtime": "^7.16.0", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "@wordpress/escape-html": "^2.22.0", + "change-case": "^4.1.2", + "is-plain-object": "^5.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } + } } }, "@wordpress/is-shallow-equal": { diff --git a/package.json b/package.json index b7b65f8ed..ff4554e71 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@wordpress/data": "^7.4.0", "@wordpress/dom-ready": "^3.20.0", "@wordpress/e2e-test-utils": "^8.0.0", - "@wordpress/element": "^4.18.0", + "@wordpress/element": "^5.3.0", "@wordpress/env": "^5.5.0", "@wordpress/scripts": "^22.5.0", "conventional-changelog-simple-preset": "^1.0.20", From fa3a422b37cdaeb5cd24dc28d02a29ebf6f8c689 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 23:20:50 +0000 Subject: [PATCH 21/22] chore(deps-dev): bump @wordpress/dom-ready from 3.20.0 to 3.26.0 Bumps [@wordpress/dom-ready](https://github.com/WordPress/gutenberg/tree/HEAD/packages/dom-ready) from 3.20.0 to 3.26.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/dom-ready/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/dom-ready@3.26.0/packages/dom-ready) --- updated-dependencies: - dependency-name: "@wordpress/dom-ready" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b784cb087..f56686ba1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5560,9 +5560,9 @@ } }, "@wordpress/dom-ready": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.20.0.tgz", - "integrity": "sha512-UVnm2QGZNgtvHycAknQxToQw5jLno+cYJKxk9oIgI6QOm6mx1PErjg08b5iGlLTGRUW+K+w7HhHR7WdON244ZA==", + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.26.0.tgz", + "integrity": "sha512-ku51n9qjSjT33wi1NB0KRVZBa9KHpN9VrC4mMgEBsjtJGJeEMeaH2SJq556TcQPjEPl6OGGGmmA0qSCuRxNKoA==", "dev": true, "requires": { "@babel/runtime": "^7.16.0" diff --git a/package.json b/package.json index b7b65f8ed..4fed92c99 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@wordpress/components": "^21.3.0", "@wordpress/compose": "^5.14.0", "@wordpress/data": "^7.4.0", - "@wordpress/dom-ready": "^3.20.0", + "@wordpress/dom-ready": "^3.26.0", "@wordpress/e2e-test-utils": "^8.0.0", "@wordpress/element": "^4.18.0", "@wordpress/env": "^5.5.0", From 862df2da6eebe8d08e17a25cc58b8b891ef85f5f Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Mon, 6 Feb 2023 17:39:57 +0530 Subject: [PATCH 22/22] Add FAQs --- readme.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/readme.txt b/readme.txt index 558de3249..dfa1ff8d1 100644 --- a/readme.txt +++ b/readme.txt @@ -205,6 +205,28 @@ You can check Otter documentation [here](https://docs.themeisle.com/article/1478 4. Google Map Block 5. Section Block +== Frequently Asked Questions == + += Is Otter Blocks free? = + +Otter comes in both free and premium versions. The [premium version](https://themeisle.com/plugins/otter-blocks/upgrade/) offers a wider variety of blocks and multiple options to customise them, [compared to the free version](https://docs.themeisle.com/article/1487-whats-the-difference-between-otter-free-and-otter-neve-pro). + += What page builder is compatible with Otter? = + +Otter provides blocks for Gutenberg, the default WordPress editor and page builder. + += Can I use Otter with any WordPress theme? = + +Sure, Otter is compatible with any WordPress theme. + += Where can I get help? = + +If you encounter any difficulties or if you have questions about Otter, you can create a ticket on our [support forum](https://wordpress.org/support/plugin/otter-blocks/). Also, feel free to check our [documentation](https://docs.themeisle.com/article/1478-otter-blocks-documentation) to find out more about the features within the plugin and how to use it to its full potential. + += What are the Patterns and how can I use them? = + +The Patterns have been designed to make it easier for you to build your site using predefined blocks that can be then customised according to your needs. You can take a look at our [dedicated documentation](https://docs.themeisle.com/article/1785-block-patterns-otter-features-library) to find out all you need to know about the Patterns. + == Changelog == ##### [Version 2.2.1](https://github.com/Codeinwp/otter-blocks/compare/v2.2.0...v2.2.1) (2023-01-30)