From 5c33f2c892dbcd4122d715c0c8d764b5ece945bc Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 16:49:11 -0300 Subject: [PATCH 01/22] Remove backwards compatibility check not needed anymore --- assets/shared/data/store-helpers.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/assets/shared/data/store-helpers.js b/assets/shared/data/store-helpers.js index ec496a9caa..2a039c8239 100644 --- a/assets/shared/data/store-helpers.js +++ b/assets/shared/data/store-helpers.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { createReduxStore, register, registerStore } from '@wordpress/data'; +import { createReduxStore, register } from '@wordpress/data'; /** * Compose an action creator with the given start, success and error actions. @@ -59,11 +59,7 @@ export const createReducerFromActionMap = ( reducers, defaultState ) => { * @return {string|Object} Store key. */ export const createStore = ( name, settings ) => { - if ( createReduxStore ) { - const store = createReduxStore( name, settings ); - register( store ); - return store; - } - registerStore( name, settings ); - return name; + const store = createReduxStore( name, settings ); + register( store ); + return store; }; From e8f123a3cdf59acb3ee2aaac86515d4b5ce535e1 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 16:52:22 -0300 Subject: [PATCH 02/22] Keep Sensei stores in a global variable to avoid registering it multiple times --- assets/shared/data/store-helpers.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/assets/shared/data/store-helpers.js b/assets/shared/data/store-helpers.js index 2a039c8239..13f02e4f4b 100644 --- a/assets/shared/data/store-helpers.js +++ b/assets/shared/data/store-helpers.js @@ -3,6 +3,9 @@ */ import { createReduxStore, register } from '@wordpress/data'; +window.senseiStores = window.senseiStores || []; +const { senseiStores } = window; + /** * Compose an action creator with the given start, success and error actions. * @@ -59,7 +62,12 @@ export const createReducerFromActionMap = ( reducers, defaultState ) => { * @return {string|Object} Store key. */ export const createStore = ( name, settings ) => { + if ( senseiStores[ name ] ) { + return senseiStores[ name ]; + } + const store = createReduxStore( name, settings ); register( store ); + senseiStores[ name ] = store; return store; }; From 0737caf05c8a52693dec65c8efaa9cf108f1f9ea Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 16:57:34 -0300 Subject: [PATCH 03/22] Update stores to avoid multiple registration --- .../status-preview/status-store.js | 11 ++++++----- assets/extensions/store.js | 17 ++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/assets/blocks/course-outline/status-preview/status-store.js b/assets/blocks/course-outline/status-preview/status-store.js index e094942b12..807207e22a 100644 --- a/assets/blocks/course-outline/status-preview/status-store.js +++ b/assets/blocks/course-outline/status-preview/status-store.js @@ -1,14 +1,17 @@ /** * WordPress dependencies */ -import { select as selectData, registerStore } from '@wordpress/data'; +import { select as selectData } from '@wordpress/data'; /** * Internal dependencies */ import { Status } from './index'; import { select, controls } from '@wordpress/data-controls'; -import { createReducerFromActionMap } from '../../../shared/data/store-helpers'; +import { + createStore, + createReducerFromActionMap, +} from '../../../shared/data/store-helpers'; const DEFAULT_STATE = { completedLessons: [], @@ -311,9 +314,7 @@ const reducers = { DEFAULT: ( action, state ) => state, }; -export const COURSE_STATUS_STORE = 'sensei/course-status'; - -registerStore( COURSE_STATUS_STORE, { +export const COURSE_STATUS_STORE = createStore( 'sensei/course-status', { reducer: createReducerFromActionMap( reducers, DEFAULT_STATE ), actions, selectors, diff --git a/assets/extensions/store.js b/assets/extensions/store.js index 61267eb2c9..4394eee865 100644 --- a/assets/extensions/store.js +++ b/assets/extensions/store.js @@ -6,20 +6,17 @@ import { keyBy, merge, isEqual } from 'lodash'; /** * WordPress dependencies */ -import { - createReduxStore, - register, - select, - dispatch, - createRegistrySelector, -} from '@wordpress/data'; +import { select, dispatch, createRegistrySelector } from '@wordpress/data'; import { controls, apiFetch } from '@wordpress/data-controls'; import { __, sprintf } from '@wordpress/i18n'; /** * Internal dependencies */ -import { createReducerFromActionMap } from '../shared/data/store-helpers'; +import { + createStore, + createReducerFromActionMap, +} from '../shared/data/store-helpers'; import { logEvent } from '../shared/helpers/log-event'; import '../shared/data/api-fetch-preloaded-once'; @@ -357,12 +354,10 @@ const reducer = { DEFAULT: ( action, state ) => state, }; -export const EXTENSIONS_STORE = createReduxStore( 'sensei/extensions', { +export const EXTENSIONS_STORE = createStore( 'sensei/extensions', { reducer: createReducerFromActionMap( reducer, DEFAULT_STATE ), actions, selectors, resolvers, controls, } ); - -register( EXTENSIONS_STORE ); From d6d7de7fc1c6c07b370c4f4792b2b5142ae8315c Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 17:14:37 -0300 Subject: [PATCH 04/22] Add a comment to explain why using a global variable --- assets/shared/data/store-helpers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/shared/data/store-helpers.js b/assets/shared/data/store-helpers.js index 13f02e4f4b..063317294d 100644 --- a/assets/shared/data/store-helpers.js +++ b/assets/shared/data/store-helpers.js @@ -3,6 +3,8 @@ */ import { createReduxStore, register } from '@wordpress/data'; +// We register the store in the global scope to avoid registering it multiple times. +// The reason to be in the global scope is that some times we have different built files using the same source. window.senseiStores = window.senseiStores || []; const { senseiStores } = window; From c40364babd5491f437ddd836de9cfc44ec148746 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 18:36:42 -0300 Subject: [PATCH 05/22] Update deprecated code on block toggling control --- assets/js/admin/blocks-toggling-control.js | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/assets/js/admin/blocks-toggling-control.js b/assets/js/admin/blocks-toggling-control.js index 83df13213a..2af009abbf 100644 --- a/assets/js/admin/blocks-toggling-control.js +++ b/assets/js/admin/blocks-toggling-control.js @@ -3,6 +3,9 @@ */ import { select, dispatch } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; +import { store as blockEditorStore } from '@wordpress/block-editor'; +import { store as editPostStore } from '@wordpress/edit-post'; +import { store as editorStore } from '@wordpress/editor'; /** * Internal dependencies @@ -39,9 +42,19 @@ const metaboxReplacements = { }; // WordPress data. -const blockEditorSelector = select( 'core/block-editor' ); -const editPostSelector = select( 'core/edit-post' ); -const editPostDispatcher = dispatch( 'core/edit-post' ); +const blockEditorSelector = select( blockEditorStore ); +const editorSelector = select( editorStore ); +const editorDispatcher = dispatch( editorStore ); +const editPostSelector = select( editPostStore ); +const editPostDispatcher = dispatch( editPostStore ); + +const isEditorPanelEnabled = editorSelector.isEditorPanelEnabled + ? editorSelector.isEditorPanelEnabled + : editPostSelector.isEditorPanelEnabled; + +const toggleEditorPanelEnabled = editorDispatcher.toggleEditorPanelEnabled + ? editorDispatcher.toggleEditorPanelEnabled + : editPostDispatcher.toggleEditorPanelEnabled; /** * Start blocks toggling control. @@ -86,11 +99,8 @@ export const startBlocksTogglingControl = ( postType ) => { Object.entries( metaboxReplacements[ postType ] ).forEach( ( [ metaboxName, blockDeps ] ) => { const enable = ! hasSomeBlocks( blockDeps ); - if ( - enable !== - editPostSelector.isEditorPanelEnabled( metaboxName ) - ) { - editPostDispatcher.toggleEditorPanelEnabled( metaboxName ); + if ( enable !== isEditorPanelEnabled( metaboxName ) ) { + toggleEditorPanelEnabled( metaboxName ); } } ); @@ -99,7 +109,7 @@ export const startBlocksTogglingControl = ( postType ) => { document .querySelectorAll( '#module_course_mb input' ) .forEach( ( input ) => { - input.disabled = ! editPostSelector.isEditorPanelEnabled( + input.disabled = ! isEditorPanelEnabled( 'meta-box-module_course_mb' ); } ); @@ -108,7 +118,7 @@ export const startBlocksTogglingControl = ( postType ) => { document .querySelectorAll( '#lesson-info input, #lesson-info select' ) .forEach( ( input ) => { - input.disabled = ! editPostSelector.isEditorPanelEnabled( + input.disabled = ! isEditorPanelEnabled( 'meta-box-lesson-info' ); } ); From b140f2f02078598e8de75e3c59f667b62d12ff41 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 19:10:44 -0300 Subject: [PATCH 06/22] Update tour store registration to avoid duplicate registrations --- assets/admin/tour/data/store.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/assets/admin/tour/data/store.js b/assets/admin/tour/data/store.js index b1793e38ab..351a2b809c 100644 --- a/assets/admin/tour/data/store.js +++ b/assets/admin/tour/data/store.js @@ -1,15 +1,16 @@ /** * WordPress dependencies */ -import { createReduxStore, register } from '@wordpress/data'; -/** - * Internal dependencies - */ -import { createReducerFromActionMap } from '../../../shared/data/store-helpers'; import { controls } from '@wordpress/data-controls'; import apiFetch from '@wordpress/api-fetch'; -export const SENSEI_TOUR_STORE = 'sensei/tour'; +/** + * Internal dependencies + */ +import { + createReducerFromActionMap, + createStore, +} from '../../../shared/data/store-helpers'; export const DEFAULT_STATE = { showTour: true, @@ -80,11 +81,9 @@ export const reducers = { DEFAULT: ( action, state ) => state, }; -export const store = createReduxStore( SENSEI_TOUR_STORE, { +export const SENSEI_TOUR_STORE = createStore( 'sensei/tour', { reducer: createReducerFromActionMap( reducers, DEFAULT_STATE ), actions, selectors, controls, } ); - -register( store ); From 5548965a6c997d68afa5efab18007ed64ae31b65 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Mon, 29 Jul 2024 19:18:50 -0300 Subject: [PATCH 07/22] Fix deprecated dependencies moved from @wordpress/edit-post to @wordpress/editor --- .../course-pre-publish-panel.js | 7 +++- .../quiz/question-block/single-question.js | 13 +++++-- .../blocks/quiz/quiz-block/quiz-validation.js | 13 +++++-- .../admin/course-settings-plugin-sidebar.js | 36 ++++++++++++++++--- 4 files changed, 60 insertions(+), 9 deletions(-) diff --git a/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js b/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js index 1face149d0..796f3673bd 100644 --- a/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js +++ b/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js @@ -3,7 +3,8 @@ */ import { __ } from '@wordpress/i18n'; import { useEntityProp } from '@wordpress/core-data'; -import { PluginPrePublishPanel } from '@wordpress/edit-post'; +import { PluginPrePublishPanel as DeprecatedPluginPrePublishPanel } from '@wordpress/edit-post'; +import { PluginPrePublishPanel } from '@wordpress/editor'; import { ToggleControl } from '@wordpress/components'; /** @@ -11,6 +12,10 @@ import { ToggleControl } from '@wordpress/components'; */ import SenseiIcon from '../../icons/logo-tree.svg'; +if ( ! PluginPrePublishPanel ) { + PluginPrePublishPanel = DeprecatedPluginPrePublishPanel; +} + /** * Course pre-publish panel. */ diff --git a/assets/blocks/quiz/question-block/single-question.js b/assets/blocks/quiz/question-block/single-question.js index 57cfb6b0cb..d39c0fb4f2 100644 --- a/assets/blocks/quiz/question-block/single-question.js +++ b/assets/blocks/quiz/question-block/single-question.js @@ -5,15 +5,24 @@ import { Notice } from '@wordpress/components'; import { useCallback } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { - PluginPostStatusInfo, - PluginPrePublishPanel, + PluginPostStatusInfo as DeprecatedPluginPostStatusInfo, + PluginPrePublishPanel as DeprecatedPluginPrePublishPanel, } from '@wordpress/edit-post'; +import { PluginPostStatusInfo, PluginPrePublishPanel } from '@wordpress/editor'; /** * Internal dependencies */ import { Effect, usePostSavingEffect } from '../../../shared/helpers/blocks'; +if ( ! PluginPostStatusInfo ) { + PluginPostStatusInfo = DeprecatedPluginPostStatusInfo; +} + +if ( ! PluginPrePublishPanel ) { + PluginPrePublishPanel = DeprecatedPluginPrePublishPanel; +} + /** * Additional controls for a question block in the single question editor. * diff --git a/assets/blocks/quiz/quiz-block/quiz-validation.js b/assets/blocks/quiz/quiz-block/quiz-validation.js index 9d077ba0a1..1126b0c814 100644 --- a/assets/blocks/quiz/quiz-block/quiz-validation.js +++ b/assets/blocks/quiz/quiz-block/quiz-validation.js @@ -4,9 +4,10 @@ import { Notice } from '@wordpress/components'; import { useDispatch, useSelect } from '@wordpress/data'; import { - PluginPostStatusInfo, - PluginPrePublishPanel, + PluginPostStatusInfo as DeprecatedPluginPostStatusInfo, + PluginPrePublishPanel as DeprecatedPluginPrePublishPanel, } from '@wordpress/edit-post'; +import { PluginPostStatusInfo, PluginPrePublishPanel } from '@wordpress/editor'; import { useCallback } from '@wordpress/element'; import { __, _n, sprintf } from '@wordpress/i18n'; @@ -16,6 +17,14 @@ import { __, _n, sprintf } from '@wordpress/i18n'; import { BLOCK_META_STORE } from '../../../shared/blocks/block-metadata'; import { Effect, usePostSavingEffect } from '../../../shared/helpers/blocks'; +if ( ! PluginPostStatusInfo ) { + PluginPostStatusInfo = DeprecatedPluginPostStatusInfo; +} + +if ( ! PluginPrePublishPanel ) { + PluginPrePublishPanel = DeprecatedPluginPrePublishPanel; +} + /** * Notice about incomplete questions in the quiz. * diff --git a/assets/js/admin/course-settings-plugin-sidebar.js b/assets/js/admin/course-settings-plugin-sidebar.js index b64b5c9805..e438cd77f6 100644 --- a/assets/js/admin/course-settings-plugin-sidebar.js +++ b/assets/js/admin/course-settings-plugin-sidebar.js @@ -3,10 +3,17 @@ */ import { applyFilters } from '@wordpress/hooks'; import { + store as editPostStore, + PluginDocumentSettingPanel as DeprecatedPluginDocumentSettingPanel, + PluginSidebar as DeprecatedPluginSidebar, + PluginSidebarMoreMenuItem as DeprecatedPluginSidebarMoreMenuItem, +} from '@wordpress/edit-post'; +import { + store as editorStore, PluginDocumentSettingPanel, PluginSidebar, PluginSidebarMoreMenuItem, -} from '@wordpress/edit-post'; +} from '@wordpress/editor'; import { __ } from '@wordpress/i18n'; import { dispatch, useSelect } from '@wordpress/data'; import { Slot } from '@wordpress/components'; @@ -21,6 +28,18 @@ import CourseVideoSidebar from './course-video-sidebar'; import CourseGeneralSidebar from './course-general-sidebar'; import SenseiIcon from '../../icons/logo-tree.svg'; +if ( ! PluginDocumentSettingPanel ) { + PluginDocumentSettingPanel = DeprecatedPluginDocumentSettingPanel; +} + +if ( ! PluginSidebar ) { + PluginSidebar = DeprecatedPluginSidebar; +} + +if ( ! PluginSidebarMoreMenuItem ) { + PluginSidebarMoreMenuItem = DeprecatedPluginSidebarMoreMenuItem; +} + export const pluginSidebarHandle = 'sensei-lms-course-settings-sidebar'; export const pluginDocumentHandle = 'sensei-lms-document-settings-sidebar'; @@ -73,17 +92,26 @@ export const CourseSidebar = () => { export const SenseiSettingsDocumentSidebar = () => { const isSenseiEditorPanelOpen = useSelect( ( select ) => { - return select( 'core/edit-post' ).isEditorPanelOpened( + const isEditorPanelOpened = select( editorStore ).isEditorPanelOpened + ? select( editorStore ).isEditorPanelOpened + : select( editPostStore ).isEditorPanelOpened; + + return isEditorPanelOpened( `${ pluginDocumentHandle }/${ pluginDocumentHandle }` ); } ); if ( isSenseiEditorPanelOpen ) { + const toggleEditorPanelOpened = dispatch( editorStore ) + .toggleEditorPanelOpened + ? dispatch( editorStore ).toggleEditorPanelOpened + : dispatch( editPostStore ).toggleEditorPanelOpened; + // when 'Course Settings' is clicked, isSenseiEditorPanelOpen returns true, so we open the 'Course Settings' // plugin sidebar and then close the 'Sensei Settings' panel which sets isSenseiEditorPanelOpen back to false. - dispatch( 'core/edit-post' ).openGeneralSidebar( + dispatch( editPostStore ).openGeneralSidebar( `${ pluginSidebarHandle }/${ pluginSidebarHandle }` ); - dispatch( 'core/edit-post' ).toggleEditorPanelOpened( + toggleEditorPanelOpened( `${ pluginDocumentHandle }/${ pluginDocumentHandle }` ); } From e1b45aac9180798cae43616c119476e5359d383c Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Tue, 30 Jul 2024 15:04:43 -0300 Subject: [PATCH 08/22] Fix deprecated component on the edit lesson button --- .../lesson-block/lesson-edit-toolbar.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js b/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js index 9fc5442536..7f46a2074b 100644 --- a/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js +++ b/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js @@ -1,7 +1,12 @@ /** * WordPress dependencies */ -import { Button, Spinner, Toolbar, ToolbarItem } from '@wordpress/components'; +import { + Button, + Spinner, + ToolbarGroup, + ToolbarItem, +} from '@wordpress/components'; import { useDispatch, useSelect } from '@wordpress/data'; import { store as editPostStore } from '@wordpress/edit-post'; import { store as editorStore } from '@wordpress/editor'; @@ -75,7 +80,11 @@ const LessonEditToolbar = ( { lessonId, lessonTitle } ) => { toolbarItem = savingPostIndicator; } - return { toolbarItem }; + return ( + + { toolbarItem } + + ); }; export default LessonEditToolbar; From b9797b6cc4e2d14eac8fb39456994484017fd2ec Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Tue, 30 Jul 2024 15:17:24 -0300 Subject: [PATCH 09/22] Fix selectBlock store --- assets/admin/tour/course-tour/steps.js | 2 +- assets/admin/tour/lesson-tour/steps.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/assets/admin/tour/course-tour/steps.js b/assets/admin/tour/course-tour/steps.js index bc8b567a29..9fa75237f2 100644 --- a/assets/admin/tour/course-tour/steps.js +++ b/assets/admin/tour/course-tour/steps.js @@ -48,7 +48,7 @@ function focusOnCourseOutlineBlock() { if ( ! courseOutlineBlock ) { return; } - dispatch( editorStore ).selectBlock( courseOutlineBlock.clientId ); + dispatch( blockEditorStore ).selectBlock( courseOutlineBlock.clientId ); } async function ensureLessonBlocksIsInEditor() { diff --git a/assets/admin/tour/lesson-tour/steps.js b/assets/admin/tour/lesson-tour/steps.js index 516d649f30..989271986e 100644 --- a/assets/admin/tour/lesson-tour/steps.js +++ b/assets/admin/tour/lesson-tour/steps.js @@ -8,7 +8,6 @@ import { ExternalLink } from '@wordpress/components'; import { select, dispatch } from '@wordpress/data'; import { store as blockEditorStore } from '@wordpress/block-editor'; import { store as editPostStore } from '@wordpress/edit-post'; -import { store as editorStore } from '@wordpress/editor'; /** * Internal dependencies @@ -59,7 +58,7 @@ export const focusOnQuizBlock = () => { if ( ! quizBlock ) { return; } - dispatch( editorStore ).selectBlock( quizBlock.clientId ); + dispatch( blockEditorStore ).selectBlock( quizBlock.clientId ); }; export const focusOnQuestionBlock = () => { @@ -67,7 +66,7 @@ export const focusOnQuestionBlock = () => { if ( ! questionBlock ) { return; } - dispatch( editorStore ).selectBlock( questionBlock.clientId ); + dispatch( blockEditorStore ).selectBlock( questionBlock.clientId ); }; export const focusOnBooleanQuestionBlock = () => { @@ -75,7 +74,7 @@ export const focusOnBooleanQuestionBlock = () => { if ( ! questionBlock ) { return; } - dispatch( editorStore ).selectBlock( questionBlock.clientId ); + dispatch( blockEditorStore ).selectBlock( questionBlock.clientId ); }; export const ensureBooleanQuestionIsInEditor = () => { From 37e3ccf3d0a34d92e88542df05b84132219afeec Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Tue, 30 Jul 2024 15:54:11 -0300 Subject: [PATCH 10/22] Avoid temporary Gutenberg warning --- assets/blocks/course-outline/lesson-block/lesson-settings.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/blocks/course-outline/lesson-block/lesson-settings.js b/assets/blocks/course-outline/lesson-block/lesson-settings.js index 51da048122..43b9c9d1ee 100644 --- a/assets/blocks/course-outline/lesson-block/lesson-settings.js +++ b/assets/blocks/course-outline/lesson-block/lesson-settings.js @@ -51,6 +51,7 @@ const LessonSettings = ( { ) } { From 86c638e477177469cc41a36b3ddd16837b74d9da Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Tue, 30 Jul 2024 15:58:29 -0300 Subject: [PATCH 11/22] Update experimental prop to the new one --- assets/admin/editor-wizard/patterns-list.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/admin/editor-wizard/patterns-list.js b/assets/admin/editor-wizard/patterns-list.js index 6cc9449805..45b1ef22dc 100644 --- a/assets/admin/editor-wizard/patterns-list.js +++ b/assets/admin/editor-wizard/patterns-list.js @@ -137,7 +137,9 @@ const PatternsList = ( { onChoose } ) => { >
Date: Tue, 30 Jul 2024 17:12:03 -0300 Subject: [PATCH 12/22] Update removing deprecated method --- assets/course-theme/blocks/register-template-blocks.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/assets/course-theme/blocks/register-template-blocks.js b/assets/course-theme/blocks/register-template-blocks.js index 2e85e931fd..81ea5761ba 100644 --- a/assets/course-theme/blocks/register-template-blocks.js +++ b/assets/course-theme/blocks/register-template-blocks.js @@ -36,8 +36,6 @@ export function registerTemplateBlocks( blocks ) { return; } - const isTemplate = - 'lesson' === postType && editPost.isEditingTemplate(); - toggleBlockRegistration( isTemplate ); + toggleBlockRegistration( false ); } ); } From 9741eac6a56259dd0c8e4ed8f3de0b3ccc4ab746 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Tue, 30 Jul 2024 17:36:39 -0300 Subject: [PATCH 13/22] Use edit link as a toolbar item --- .../lesson-block/lesson-edit-toolbar.js | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js b/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js index 7f46a2074b..7049c3cfe2 100644 --- a/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js +++ b/assets/blocks/course-outline/lesson-block/lesson-edit-toolbar.js @@ -7,6 +7,7 @@ import { ToolbarGroup, ToolbarItem, } from '@wordpress/components'; +import { forwardRef } from '@wordpress/element'; import { useDispatch, useSelect } from '@wordpress/data'; import { store as editPostStore } from '@wordpress/edit-post'; import { store as editorStore } from '@wordpress/editor'; @@ -24,14 +25,19 @@ const getLessonURL = ( lessonId ) => `post.php?post=${ lessonId }&action=edit`; * * @param {Object} props Component props. * @param {number} props.lessonId The lesson ID. + * @param {Object} forwardedRef The forwarded ref. */ -export const EditLessonLink = ( { lessonId } ) => ( - - { __( 'Edit lesson', 'sensei-lms' ) } - +export const EditLessonLink = forwardRef( + ( { lessonId, ...props }, forwardedRef ) => ( + + { __( 'Edit lesson', 'sensei-lms' ) } + + ) ); /** @@ -75,7 +81,9 @@ const LessonEditToolbar = ( { lessonId, lessonTitle } ) => { let toolbarItem = savePostLink; if ( lessonId ) { - toolbarItem = ; + toolbarItem = ( + + ); } else if ( isSavingPost || isSavingStructure || isSavingMetaBoxes ) { toolbarItem = savingPostIndicator; } From 84d589f80cfab2952fd98f8278cdb29a159e86af Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Tue, 30 Jul 2024 20:10:41 -0300 Subject: [PATCH 14/22] Use ToolbarDropdownMenu instead --- .../toolbar-dropdown/index.js | 91 +++++++++---------- 1 file changed, 41 insertions(+), 50 deletions(-) diff --git a/assets/blocks/editor-components/toolbar-dropdown/index.js b/assets/blocks/editor-components/toolbar-dropdown/index.js index 39de0d01cf..063f7c96da 100644 --- a/assets/blocks/editor-components/toolbar-dropdown/index.js +++ b/assets/blocks/editor-components/toolbar-dropdown/index.js @@ -7,11 +7,9 @@ import classnames from 'classnames'; * WordPress dependencies */ import { - Button, - Dropdown, MenuGroup, MenuItem, - NavigableMenu, + ToolbarDropdownMenu, } from '@wordpress/components'; import { check } from '@wordpress/icons'; @@ -48,10 +46,10 @@ const ToolbarDropdown = ( { const selectedOption = options.find( ( option ) => value === option.value ); return ( - ( -
diff --git a/assets/blocks/quiz/question-block/question-grade-toolbar.js b/assets/blocks/quiz/question-block/question-grade-toolbar.js index 539130b6a2..f50be7517f 100644 --- a/assets/blocks/quiz/question-block/question-grade-toolbar.js +++ b/assets/blocks/quiz/question-block/question-grade-toolbar.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { ToolbarGroup } from '@wordpress/components'; +import { ToolbarGroup, ToolbarItem } from '@wordpress/components'; /** * Internal dependencies */ @@ -18,7 +18,11 @@ export const QuestionGradeToolbar = ( { value, onChange } ) => { return ( <> - + ); diff --git a/assets/blocks/quiz/question-block/question-type-toolbar.js b/assets/blocks/quiz/question-block/question-type-toolbar.js index fab4f10f3e..09d9e42c85 100644 --- a/assets/blocks/quiz/question-block/question-type-toolbar.js +++ b/assets/blocks/quiz/question-block/question-type-toolbar.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { Toolbar } from '@wordpress/components'; +import { ToolbarGroup } from '@wordpress/components'; import { applyFilters } from '@wordpress/hooks'; import { __ } from '@wordpress/i18n'; @@ -20,7 +20,7 @@ import ToolbarDropdown from '../../editor-components/toolbar-dropdown'; */ export const QuestionTypeToolbar = ( { value, onSelect, options } ) => { return ( - + { return props; } } /> - + ); }; From 7b26d2c6810c3f2bf9470005498181f314b884af Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Wed, 31 Jul 2024 15:16:42 -0300 Subject: [PATCH 17/22] Update approach for using correct version of component --- .../course-pre-publish-panel.js | 7 +++---- .../quiz/question-block/single-question.js | 16 ++++++++-------- assets/blocks/quiz/quiz-block/quiz-validation.js | 16 ++++++++-------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js b/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js index 796f3673bd..f5efcd01b4 100644 --- a/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js +++ b/assets/admin/course-pre-publish-panel/course-pre-publish-panel.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { useEntityProp } from '@wordpress/core-data'; import { PluginPrePublishPanel as DeprecatedPluginPrePublishPanel } from '@wordpress/edit-post'; -import { PluginPrePublishPanel } from '@wordpress/editor'; +import { PluginPrePublishPanel as NewPluginPrePublishPanel } from '@wordpress/editor'; import { ToggleControl } from '@wordpress/components'; /** @@ -12,9 +12,8 @@ import { ToggleControl } from '@wordpress/components'; */ import SenseiIcon from '../../icons/logo-tree.svg'; -if ( ! PluginPrePublishPanel ) { - PluginPrePublishPanel = DeprecatedPluginPrePublishPanel; -} +const PluginPrePublishPanel = + NewPluginPrePublishPanel || DeprecatedPluginPrePublishPanel; /** * Course pre-publish panel. diff --git a/assets/blocks/quiz/question-block/single-question.js b/assets/blocks/quiz/question-block/single-question.js index d39c0fb4f2..4cdc155157 100644 --- a/assets/blocks/quiz/question-block/single-question.js +++ b/assets/blocks/quiz/question-block/single-question.js @@ -8,20 +8,20 @@ import { PluginPostStatusInfo as DeprecatedPluginPostStatusInfo, PluginPrePublishPanel as DeprecatedPluginPrePublishPanel, } from '@wordpress/edit-post'; -import { PluginPostStatusInfo, PluginPrePublishPanel } from '@wordpress/editor'; +import { + PluginPostStatusInfo as NewPluginPostStatusInfo, + PluginPrePublishPanel as NewPluginPrePublishPanel, +} from '@wordpress/editor'; /** * Internal dependencies */ import { Effect, usePostSavingEffect } from '../../../shared/helpers/blocks'; -if ( ! PluginPostStatusInfo ) { - PluginPostStatusInfo = DeprecatedPluginPostStatusInfo; -} - -if ( ! PluginPrePublishPanel ) { - PluginPrePublishPanel = DeprecatedPluginPrePublishPanel; -} +const PluginPostStatusInfo = + NewPluginPostStatusInfo || DeprecatedPluginPostStatusInfo; +const PluginPrePublishPanel = + NewPluginPrePublishPanel || DeprecatedPluginPrePublishPanel; /** * Additional controls for a question block in the single question editor. diff --git a/assets/blocks/quiz/quiz-block/quiz-validation.js b/assets/blocks/quiz/quiz-block/quiz-validation.js index 1126b0c814..102e7d9d70 100644 --- a/assets/blocks/quiz/quiz-block/quiz-validation.js +++ b/assets/blocks/quiz/quiz-block/quiz-validation.js @@ -7,7 +7,10 @@ import { PluginPostStatusInfo as DeprecatedPluginPostStatusInfo, PluginPrePublishPanel as DeprecatedPluginPrePublishPanel, } from '@wordpress/edit-post'; -import { PluginPostStatusInfo, PluginPrePublishPanel } from '@wordpress/editor'; +import { + PluginPostStatusInfo as NewPluginPostStatusInfo, + PluginPrePublishPanel as NewPluginPrePublishPanel, +} from '@wordpress/editor'; import { useCallback } from '@wordpress/element'; import { __, _n, sprintf } from '@wordpress/i18n'; @@ -17,13 +20,10 @@ import { __, _n, sprintf } from '@wordpress/i18n'; import { BLOCK_META_STORE } from '../../../shared/blocks/block-metadata'; import { Effect, usePostSavingEffect } from '../../../shared/helpers/blocks'; -if ( ! PluginPostStatusInfo ) { - PluginPostStatusInfo = DeprecatedPluginPostStatusInfo; -} - -if ( ! PluginPrePublishPanel ) { - PluginPrePublishPanel = DeprecatedPluginPrePublishPanel; -} +const PluginPostStatusInfo = + NewPluginPostStatusInfo || DeprecatedPluginPostStatusInfo; +const PluginPrePublishPanel = + NewPluginPrePublishPanel || DeprecatedPluginPrePublishPanel; /** * Notice about incomplete questions in the quiz. From 3fdc54e93db1856a88c78e1b1a74010e11420163 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Wed, 31 Jul 2024 15:17:43 -0300 Subject: [PATCH 18/22] Fix indentation --- assets/blocks/featured-video/block.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/blocks/featured-video/block.json b/assets/blocks/featured-video/block.json index 7a82565562..04e5600533 100644 --- a/assets/blocks/featured-video/block.json +++ b/assets/blocks/featured-video/block.json @@ -2,10 +2,10 @@ "name": "sensei-lms/featured-video", "title": "Featured Video", "description": "Add a featured video to your lesson to highlight the video and make use of our video templates.", - "icon": "format-video", + "icon": "format-video", "category": "sensei-lms", "textdomain": "sensei-lms", "supports": { - "multiple": false + "multiple": false } } From 8bd30ce81df47546b402f0fc058603b4fbb5da7c Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Wed, 31 Jul 2024 15:24:10 -0300 Subject: [PATCH 19/22] Add apiVersion to fix depracation issue --- assets/blocks/course-progress-block/block.json | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/blocks/course-progress-block/block.json b/assets/blocks/course-progress-block/block.json index 4d35c3ed74..8041b8ddf8 100644 --- a/assets/blocks/course-progress-block/block.json +++ b/assets/blocks/course-progress-block/block.json @@ -1,4 +1,5 @@ { + "apiVersion": 2, "name": "sensei-lms/course-progress", "title": "Course Progress", "description": "Display the user's progress in the course. This block is only displayed if the user is enrolled.", From 69a541d13dd5068640a55707f11e949832935562 Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Wed, 31 Jul 2024 17:14:51 -0300 Subject: [PATCH 20/22] Avoid unnecessary renders --- .../blocks/quiz/quiz-block/quiz-validation.js | 67 +++++++++++++------ assets/shared/blocks/block-metadata.js | 22 ++++-- 2 files changed, 62 insertions(+), 27 deletions(-) diff --git a/assets/blocks/quiz/quiz-block/quiz-validation.js b/assets/blocks/quiz/quiz-block/quiz-validation.js index 102e7d9d70..80dd43862d 100644 --- a/assets/blocks/quiz/quiz-block/quiz-validation.js +++ b/assets/blocks/quiz/quiz-block/quiz-validation.js @@ -11,8 +11,9 @@ import { PluginPostStatusInfo as NewPluginPostStatusInfo, PluginPrePublishPanel as NewPluginPrePublishPanel, } from '@wordpress/editor'; -import { useCallback } from '@wordpress/element'; +import { useCallback, useMemo } from '@wordpress/element'; import { __, _n, sprintf } from '@wordpress/i18n'; +import { store as blockEditorStore } from '@wordpress/block-editor'; /** * Internal dependencies @@ -25,6 +26,49 @@ const PluginPostStatusInfo = const PluginPrePublishPanel = NewPluginPrePublishPanel || DeprecatedPluginPrePublishPanel; +/** + * Get incomplete questions for a quiz. + * + * @param {string} clientId + * @return {Object[]} Incomplete questions. + */ +const useIncompleteQuestions = ( clientId ) => { + const { questionBlocks } = useSelect( + ( select ) => ( { + questionBlocks: select( blockEditorStore ).getBlocks( clientId ), + } ), + [ clientId ] + ); + + const blockIds = useMemo( + () => questionBlocks.map( ( block ) => block.clientId ), + [ questionBlocks ] + ); + + const { errors } = useSelect( + ( select ) => ( { + errors: select( BLOCK_META_STORE ).getMultipleBlockMeta( + blockIds, + 'validationErrors' + ), + } ), + [ clientId, blockIds ] + ); + + const incompleteQuestions = useMemo( + () => + questionBlocks + .map( ( block ) => ( { + ...block, + errors: errors[ block.clientId ], + } ) ) + .filter( ( q ) => q.errors?.length ), + [ questionBlocks, errors ] + ); + + return incompleteQuestions; +}; + /** * Notice about incomplete questions in the quiz. * @@ -70,24 +114,7 @@ const IncompleteQuestionsNotice = ( { count, onClick } ) => ( * @param {Function} props.setMeta */ const QuizValidationResult = ( { clientId, setMeta } ) => { - const incompleteQuestions = useSelect( - ( select ) => { - const questionBlocks = select( 'core/block-editor' ).getBlocks( - clientId - ); - const errors = select( BLOCK_META_STORE ).getMultipleBlockMeta( - questionBlocks.map( ( block ) => block.clientId ), - 'validationErrors' - ); - return questionBlocks - .map( ( block ) => ( { - ...block, - errors: errors[ block.clientId ], - } ) ) - .filter( ( q ) => q.errors?.length ); - }, - [ clientId ] - ); + const incompleteQuestions = useIncompleteQuestions( clientId ); const toggleValidationErrors = useCallback( ( on = true ) => { @@ -96,7 +123,7 @@ const QuizValidationResult = ( { clientId, setMeta } ) => { [ setMeta ] ); - const { selectBlock } = useDispatch( 'core/block-editor' ); + const { selectBlock } = useDispatch( blockEditorStore ); const selectFirstIncompleteQuestionBlock = () => { if ( ! incompleteQuestions.length ) return; toggleValidationErrors( true ); diff --git a/assets/shared/blocks/block-metadata.js b/assets/shared/blocks/block-metadata.js index 33f485f862..c9c9e5bc74 100644 --- a/assets/shared/blocks/block-metadata.js +++ b/assets/shared/blocks/block-metadata.js @@ -2,7 +2,12 @@ * WordPress dependencies */ import { createHigherOrderComponent } from '@wordpress/compose'; -import { dispatch, useDispatch, useSelect } from '@wordpress/data'; +import { + dispatch, + useDispatch, + useSelect, + createSelector, +} from '@wordpress/data'; import { createContext, useCallback, @@ -76,12 +81,15 @@ const store = { * @param {string} [key] Only return metadata for the given key. * @return {Object} Blocks metadata, indexed by block ID. */ - getMultipleBlockMeta: ( state, clientIds = [], key = null ) => { - const blocks = clientIds?.length - ? pick( state, clientIds ) - : { ...state }; - return key ? mapValues( blocks, key ) : blocks; - }, + getMultipleBlockMeta: createSelector( + ( state, clientIds = [], key = null ) => { + const blocks = clientIds?.length + ? pick( state, clientIds ) + : state; + return key ? mapValues( blocks, key ) : blocks; + }, + ( state ) => [ state ] + ), }, }; From db0060fd3f884ff3e1683b6d020a4dc67f7d197e Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Wed, 31 Jul 2024 17:41:59 -0300 Subject: [PATCH 21/22] Install rememo until it's available in our supported WP versions --- assets/shared/blocks/block-metadata.js | 18 +- package-lock.json | 226 ++++++++++++++++++------- package.json | 3 +- 3 files changed, 175 insertions(+), 72 deletions(-) diff --git a/assets/shared/blocks/block-metadata.js b/assets/shared/blocks/block-metadata.js index c9c9e5bc74..6e023b646a 100644 --- a/assets/shared/blocks/block-metadata.js +++ b/assets/shared/blocks/block-metadata.js @@ -1,23 +1,21 @@ +/** + * External dependencies + */ +import { pick, mapValues } from 'lodash'; +import createSelector from 'rememo'; + /** * WordPress dependencies */ import { createHigherOrderComponent } from '@wordpress/compose'; -import { - dispatch, - useDispatch, - useSelect, - createSelector, -} from '@wordpress/data'; +import { dispatch, useDispatch, useSelect } from '@wordpress/data'; import { createContext, useCallback, useContext, useMemo, } from '@wordpress/element'; -/** - * External dependencies - */ -import { pick, mapValues } from 'lodash'; + /** * Internal dependencies */ diff --git a/package-lock.json b/package-lock.json index c366f0ed87..b89d00c6e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,6 +42,7 @@ "memize": "1.1.0", "qrcode.react": "3.1.0", "react-animate-height": "2.0.23", + "rememo": "4.0.2", "terser-webpack-plugin": "5.3.1", "uuid": "7.0.3", "whatwg-fetch": "3.6.2" @@ -1891,11 +1892,6 @@ "react-with-styles": "^3.0.0 || ^4.0.0" } }, - "node_modules/@automattic/tour-kit/node_modules/rememo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", - "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" - }, "node_modules/@automattic/tour-kit/node_modules/style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", @@ -9820,9 +9816,9 @@ } }, "node_modules/@wordpress/block-editor/node_modules/@wordpress/blocks/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/block-editor/node_modules/@wordpress/components": { "version": "19.12.0", @@ -9975,9 +9971,9 @@ } }, "node_modules/@wordpress/block-editor/node_modules/@wordpress/keyboard-shortcuts/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/block-editor/node_modules/@wordpress/primitives": { "version": "3.8.0", @@ -10017,9 +10013,9 @@ } }, "node_modules/@wordpress/block-editor/node_modules/@wordpress/rich-text/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/block-editor/node_modules/framer-motion": { "version": "6.3.11", @@ -10118,6 +10114,11 @@ "react-with-styles": "^3.0.0 || ^4.0.0" } }, + "node_modules/@wordpress/block-editor/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/block-editor/node_modules/style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", @@ -10338,6 +10339,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/block-library/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/block-library/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -10428,6 +10434,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/blocks/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/blocks/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -10508,6 +10519,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/components/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/components/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -10635,6 +10651,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/core-data/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/core-data/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -11112,6 +11133,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/edit-post/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/edit-post/node_modules/uuid": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", @@ -11283,9 +11309,9 @@ } }, "node_modules/@wordpress/editor/node_modules/@wordpress/blocks/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/editor/node_modules/@wordpress/components": { "version": "19.12.0", @@ -11421,9 +11447,9 @@ } }, "node_modules/@wordpress/editor/node_modules/@wordpress/core-data/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/editor/node_modules/@wordpress/data": { "version": "6.10.0", @@ -11484,9 +11510,9 @@ } }, "node_modules/@wordpress/editor/node_modules/@wordpress/keyboard-shortcuts/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/editor/node_modules/@wordpress/media-utils": { "version": "3.6.0", @@ -11646,9 +11672,9 @@ } }, "node_modules/@wordpress/editor/node_modules/@wordpress/reusable-blocks/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/editor/node_modules/@wordpress/rich-text": { "version": "5.8.0", @@ -11675,9 +11701,9 @@ } }, "node_modules/@wordpress/editor/node_modules/@wordpress/rich-text/node_modules/rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/@wordpress/editor/node_modules/@wordpress/server-side-render": { "version": "3.8.0", @@ -11814,6 +11840,11 @@ "react-with-styles": "^3.0.0 || ^4.0.0" } }, + "node_modules/@wordpress/editor/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/editor/node_modules/style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", @@ -12753,6 +12784,11 @@ "redux": "^4.1.0" } }, + "node_modules/@wordpress/keyboard-shortcuts/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/keycodes": { "version": "3.51.0", "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.51.0.tgz", @@ -13206,6 +13242,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/reusable-blocks/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/reusable-blocks/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -13262,6 +13303,11 @@ "redux": "^4.1.0" } }, + "node_modules/@wordpress/rich-text/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/scripts": { "version": "22.4.2", "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-22.4.2.tgz", @@ -15772,6 +15818,11 @@ "node": ">=12" } }, + "node_modules/@wordpress/server-side-render/node_modules/rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "node_modules/@wordpress/server-side-render/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -36668,8 +36719,9 @@ } }, "node_modules/rememo": { - "version": "3.0.0", - "license": "MIT" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "node_modules/remove-accents": { "version": "0.4.4", @@ -42983,11 +43035,6 @@ "global-cache": "^1.2.1" } }, - "rememo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", - "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" - }, "style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", @@ -48736,9 +48783,9 @@ }, "dependencies": { "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -48864,9 +48911,9 @@ }, "dependencies": { "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -48899,9 +48946,9 @@ }, "dependencies": { "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -48980,6 +49027,11 @@ "global-cache": "^1.2.1" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", @@ -49180,6 +49232,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -49254,6 +49311,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -49321,6 +49383,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -49429,6 +49496,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -49830,6 +49902,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", @@ -49980,9 +50057,9 @@ }, "dependencies": { "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -50097,9 +50174,9 @@ } }, "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -50147,9 +50224,9 @@ }, "dependencies": { "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -50281,9 +50358,9 @@ } }, "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -50306,9 +50383,9 @@ }, "dependencies": { "rememo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.0.tgz", - "integrity": "sha512-6BAfg1Dqg6UteZBEH9k6EHHersM86/EcBOMtJV+h+xEn1GC3H+gAgJWpexWYAamAxD0qXNmIt50iS/zuZKnQag==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" } } }, @@ -50417,6 +50494,11 @@ "global-cache": "^1.2.1" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "style-value-types": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", @@ -51134,6 +51216,11 @@ "turbo-combine-reducers": "^1.0.2", "use-memo-one": "^1.1.1" } + }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" } } }, @@ -51503,6 +51590,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -51548,6 +51640,11 @@ "turbo-combine-reducers": "^1.0.2", "use-memo-one": "^1.1.1" } + }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" } } }, @@ -53312,6 +53409,11 @@ "@wordpress/primitives": "^2.2.0" } }, + "rememo": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-3.0.0.tgz", + "integrity": "sha512-eWtut/7pqMRnSccbexb647iPjN7ir6Tmf4RG92ZVlykFEkHqGYy9tWnpHH3I+FS+WQ6lQ1i1iDgarYzGKgTcRQ==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -68316,7 +68418,9 @@ } }, "rememo": { - "version": "3.0.0" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rememo/-/rememo-4.0.2.tgz", + "integrity": "sha512-NVfSP9NstE3QPNs/TnegQY0vnJnstKQSpcrsI2kBTB3dB2PkdfKdTa+abbjMIDqpc63fE5LfjLgfMst0ULMFxQ==" }, "remove-accents": { "version": "0.4.4", diff --git a/package.json b/package.json index 228b9b93f6..fe0578677f 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "memize": "1.1.0", "qrcode.react": "3.1.0", "react-animate-height": "2.0.23", + "rememo": "4.0.2", "terser-webpack-plugin": "5.3.1", "uuid": "7.0.3", "whatwg-fetch": "3.6.2" @@ -176,4 +177,4 @@ "woorelease": { "wp_org_slug": "sensei-lms" } -} \ No newline at end of file +} From f38ab70416c1d87bdd4229bb6124cc33cd8d23fc Mon Sep 17 00:00:00 2001 From: Renatho De Carli Rosa Date: Fri, 2 Aug 2024 14:25:35 -0300 Subject: [PATCH 22/22] Fix Course Actions block deprecation --- assets/blocks/course-actions-block/course-status-toolbar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/blocks/course-actions-block/course-status-toolbar.js b/assets/blocks/course-actions-block/course-status-toolbar.js index 1ef444265a..17d60ad026 100644 --- a/assets/blocks/course-actions-block/course-status-toolbar.js +++ b/assets/blocks/course-actions-block/course-status-toolbar.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { Toolbar } from '@wordpress/components'; +import { ToolbarGroup } from '@wordpress/components'; import { useContext } from '@wordpress/element'; /** @@ -41,14 +41,14 @@ const CourseStatusToolbar = ( { : setCourseStatus; return ( - + - + ); };