From e5ce417f17ac1f18e5b080aad50ed35f657cca0d Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 28 Sep 2022 15:45:08 +0530 Subject: [PATCH 01/10] PRESS2-299 add state handler --- .../Themes/ThemeInstallerController.php | 65 ++++++++++++++++++- includes/Services/ThemeInstaller.php | 2 +- .../TaskManagers/ThemeInstallTaskManager.php | 5 ++ .../pages/Steps/DesignStateHandler/index.js | 60 +++++++++++++++++ .../Steps/DesignThemeStyles/Menu/index.js | 10 ++- .../Steps/DesignThemeStyles/Preview/index.js | 3 + src/OnboardingSPA/store/reducer.js | 2 +- src/OnboardingSPA/store/selectors.js | 4 ++ src/OnboardingSPA/utils/api/themes.js | 8 ++- 9 files changed, 151 insertions(+), 8 deletions(-) create mode 100644 src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js diff --git a/includes/RestApi/Themes/ThemeInstallerController.php b/includes/RestApi/Themes/ThemeInstallerController.php index 61b23fba0..462b218f9 100644 --- a/includes/RestApi/Themes/ThemeInstallerController.php +++ b/includes/RestApi/Themes/ThemeInstallerController.php @@ -33,7 +33,7 @@ public function register_routes() { array( 'methods' => \WP_REST_Server::CREATABLE, 'callback' => array( $this, 'initialize' ), - 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), ), ) ); @@ -50,6 +50,20 @@ public function register_routes() { ), ) ); + + + \register_rest_route( + $this->namespace, + $this->rest_base . '/install/status', + array( + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_install_status' ), + 'args' => $this->get_install_status_args(), + // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + ), + ) + ); } /** @@ -78,6 +92,19 @@ public function get_install_theme_args() { ); } + public function get_install_status_args() { + return array( + 'theme' => array( + 'type' => 'string', + 'required' => true, + ), + 'activated' => array( + 'type' => 'boolean', + 'default' => true + ), + ); + } + /** * Queue in the initial list of themes to be installed. * @@ -139,4 +166,38 @@ public static function install( \WP_REST_Request $request ) { return $theme_install_task->execute(); } -} + + public function get_install_status( \WP_REST_Request $request ) { + $theme = $request->get_param( 'theme' ); + $activated = $request->get_param( 'activated' ); + + if ( ThemeInstaller::exists( $theme, $activated ) ) { + return new \WP_REST_Response( + array( + 'status' => $activated ? 'activated' : 'installed' + ), + 200 + ); + } + + $position_in_queue = ThemeInstallTaskManager::status( $theme ); + if ( $position_in_queue ) { + return new \WP_REST_Response( + array( + 'status' => 'installing', + 'estimate' => ( ( $position_in_queue + 1 ) * 30 ) + ), + 200 + ); + } + + return new \WP_REST_Response( + array( + 'status' => 'not_active' + ), + 200 + ); + + + } +} \ No newline at end of file diff --git a/includes/Services/ThemeInstaller.php b/includes/Services/ThemeInstaller.php index 2b520b355..e99ac470a 100644 --- a/includes/Services/ThemeInstaller.php +++ b/includes/Services/ThemeInstaller.php @@ -119,7 +119,7 @@ public static function is_nfd_slug( $theme ) { */ public static function get_theme_stylesheet( $theme, $theme_type ) { $theme_list = Themes::get(); - return $theme_list[ $theme_type ][ $theme ]['stylesheet']; + return isset( $theme_list[ $theme_type ][ $theme ]['stylesheet'] ) ? $theme_list[ $theme_type ][ $theme ]['stylesheet'] : false; } /** diff --git a/includes/TaskManagers/ThemeInstallTaskManager.php b/includes/TaskManagers/ThemeInstallTaskManager.php index 1c6a0bdb1..3b0647cc3 100644 --- a/includes/TaskManagers/ThemeInstallTaskManager.php +++ b/includes/TaskManagers/ThemeInstallTaskManager.php @@ -163,4 +163,9 @@ public static function add_to_queue( ThemeInstallTask $theme_install_task ) { return \update_option( Options::get_option_name( self::$queue_name ), $queue->to_array() ); } + + public static function status( $theme ) { + $themes = \get_option( Options::get_option_name( self::$queue_name ), array() ); + return array_search( $theme, array_column( $themes, 'slug' ) ); + } } diff --git a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js new file mode 100644 index 000000000..83a765137 --- /dev/null +++ b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js @@ -0,0 +1,60 @@ +import { useSelect, useDispatch } from '@wordpress/data'; +import { useEffect, useState } from '@wordpress/element'; +import { StepLoader } from '../../../components/Loaders'; + +import { store as nfdOnboardingStore } from '../../../store'; +import { getThemeStatus } from '../../../utils/api/themes'; + +const DesignStateHandler = ( { children } ) => { + const [ state, setState ] = useState( 'installing' ); + + const { settings } = useSelect(( select ) => { + return { + settings: select(nfdOnboardingStore).getSettings() + }; + }, []); + + const { updateSettings } = useDispatch( nfdOnboardingStore ); + + const checkThemeStatus = async () => { + const themeStatus = await getThemeStatus( 'nfd_slug_yith_wonder' ); + return themeStatus.body.status; + } + + + useEffect(async () => { + if ( settings.themeStatus === 'unknown' ) { + const themeStatus = await checkThemeStatus(); + switch( themeStatus ) { + case 'installing': + setTimeout( () => { + updateSettings( settings ); + }, 30000 ) + break; + default: + settings.themeStatus = themeStatus; + updateSettings( settings ); + } + } + setState( settings.themeStatus ); + }, [settings] ) + + const handleRender = ( children ) => { + switch( state ) { + case 'not_active': + return

Error

+ case 'activated': + return children + default: + return + } + } + + return ( + <> + { handleRender( children ) } + + ); +} + +export default DesignStateHandler; \ No newline at end of file diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js index bd508ce46..e14a73e07 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js @@ -11,6 +11,7 @@ import { useGlobalStylesOutput } from '../../../../utils/global-styles/use-globa import { getPatterns } from '../../../../utils/api/patterns'; import { getGlobalStyles } from '../../../../utils/api/themes'; import { VIEW_DESIGN_THEME_STYLES_MENU } from '../../../../../constants'; +import DesignStateHandler from '../../DesignStateHandler'; const StepDesignThemeStylesMenu = () => { const MAX_PREVIEWS_PER_ROW = 3; @@ -23,7 +24,7 @@ const StepDesignThemeStylesMenu = () => { const navigate = useNavigate(); const isLargeViewport = useViewportMatch( 'medium' ); - const { currentStep, nextStep, currentData, storedPreviewSettings } = + const { currentStep, nextStep, currentData, storedPreviewSettings, settings } = useSelect( ( select ) => { return { currentStep: select( nfdOnboardingStore ).getStepFromPath( @@ -34,6 +35,7 @@ const StepDesignThemeStylesMenu = () => { select( nfdOnboardingStore ).getCurrentOnboardingData(), storedPreviewSettings: select( nfdOnboardingStore ).getPreviewSettings(), + settings: select( nfdOnboardingStore ).getSettings(), }; }, [] ); @@ -65,8 +67,8 @@ const StepDesignThemeStylesMenu = () => { }; useEffect( () => { - if ( ! isLoaded ) getStylesAndPatterns(); - }, [ isLoaded ] ); + if ( ! isLoaded && settings.themeStatus === 'activated' ) getStylesAndPatterns(); + }, [ isLoaded, settings ] ); const handleClick = ( idx ) => { const selectedGlobalStyle = globalStyles[ idx ]; @@ -97,6 +99,7 @@ const StepDesignThemeStylesMenu = () => { }; return ( +
{
+
); }; diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js index 29b418b16..efa26f1d6 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js @@ -14,6 +14,7 @@ import { getPatterns } from '../../../../utils/api/patterns'; import { getGlobalStyles } from '../../../../utils/api/themes'; import { useGlobalStylesOutput } from '../../../../utils/global-styles/use-global-styles-output'; import { conditionalSteps } from '../../../../data/routes/'; +import DesignStateHandler from '../../DesignStateHandler'; const StepDesignThemeStylesPreview = () => { const location = useLocation(); @@ -169,6 +170,7 @@ const StepDesignThemeStylesPreview = () => { }, [ isLoaded ] ); return ( +
{ ) }
+
); }; diff --git a/src/OnboardingSPA/store/reducer.js b/src/OnboardingSPA/store/reducer.js index 3040619a5..1e24397e9 100644 --- a/src/OnboardingSPA/store/reducer.js +++ b/src/OnboardingSPA/store/reducer.js @@ -148,7 +148,7 @@ export function runtime( state = {}, action ) { return state; } -export function settings( state = {}, action ) { +export function settings( state = { themeStatus: 'unknown' }, action ) { switch ( action.type ) { case 'UPDATE_SETTINGS': return { diff --git a/src/OnboardingSPA/store/selectors.js b/src/OnboardingSPA/store/selectors.js index d1245ae6e..ea7e25297 100644 --- a/src/OnboardingSPA/store/selectors.js +++ b/src/OnboardingSPA/store/selectors.js @@ -229,6 +229,10 @@ export function getPreviewSettings( state ) { return state.runtime.previewSettings; } +export function getSettings ( state ) { + return state.settings; +} + export function getStoreInfoSteps( state ) { return state.flow.steps.storeInfoSteps; } diff --git a/src/OnboardingSPA/utils/api/themes.js b/src/OnboardingSPA/utils/api/themes.js index 4b88bb46a..37bf6c329 100644 --- a/src/OnboardingSPA/utils/api/themes.js +++ b/src/OnboardingSPA/utils/api/themes.js @@ -24,4 +24,10 @@ const getGlobalStyles = async () => { ); }; -export { init, getGlobalStyles }; +const getThemeStatus = async ( theme ) => { + return await resolve( + apiFetch( { url: onboardingRestURL( 'themes/install/status' + ( theme ? `&theme=${theme}` : '' ) ) } ) + ) +} + +export { init, getGlobalStyles, getThemeStatus }; From 58c12a0d87209d29e1acf923d48e6048baaaf41a Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 28 Sep 2022 17:59:15 +0530 Subject: [PATCH 02/10] PRESS2-299 handle the three states --- .../Themes/ThemeInstallerController.php | 3 +- .../pages/Steps/DesignStateHandler/index.js | 40 +++++++++++-------- .../Steps/DesignThemeStyles/Menu/index.js | 10 ++--- src/OnboardingSPA/store/actions.js | 7 ++++ src/OnboardingSPA/store/reducer.js | 7 +++- src/OnboardingSPA/store/selectors.js | 4 ++ src/constants.js | 7 ++++ 7 files changed, 54 insertions(+), 24 deletions(-) diff --git a/includes/RestApi/Themes/ThemeInstallerController.php b/includes/RestApi/Themes/ThemeInstallerController.php index 462b218f9..23f601e0b 100644 --- a/includes/RestApi/Themes/ThemeInstallerController.php +++ b/includes/RestApi/Themes/ThemeInstallerController.php @@ -181,7 +181,8 @@ public function get_install_status( \WP_REST_Request $request ) { } $position_in_queue = ThemeInstallTaskManager::status( $theme ); - if ( $position_in_queue ) { + + if ( $position_in_queue !== false) { return new \WP_REST_Response( array( 'status' => 'installing', diff --git a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js index 83a765137..c1d98e46d 100644 --- a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js @@ -4,46 +4,52 @@ import { StepLoader } from '../../../components/Loaders'; import { store as nfdOnboardingStore } from '../../../store'; import { getThemeStatus } from '../../../utils/api/themes'; +import { THEME_STATUS_INIT, THEME_STATUS_INSTALLING, THEME_STATUS_NOT_ACTIVE, THEME_STATUS_ACTIVE, DESIGN_STEPS_THEME, THEME_INSTALL_WAIT_TIMEOUT } from '../../../../constants'; const DesignStateHandler = ( { children } ) => { - const [ state, setState ] = useState( 'installing' ); - const { settings } = useSelect(( select ) => { + const { storedThemeStatus } = useSelect(( select ) => { return { - settings: select(nfdOnboardingStore).getSettings() + storedThemeStatus: select(nfdOnboardingStore).getThemeStatus() }; }, []); - const { updateSettings } = useDispatch( nfdOnboardingStore ); + const { updateThemeStatus } = useDispatch( nfdOnboardingStore ); const checkThemeStatus = async () => { - const themeStatus = await getThemeStatus( 'nfd_slug_yith_wonder' ); + const themeStatus = await getThemeStatus( DESIGN_STEPS_THEME ); return themeStatus.body.status; } + const waitForInstall = () => { + setTimeout( async () => { + const themeStatus = await checkThemeStatus(); + if ( themeStatus !== THEME_STATUS_ACTIVE) { + updateThemeStatus( THEME_STATUS_NOT_ACTIVE ) + } + }, THEME_INSTALL_WAIT_TIMEOUT ) + } + useEffect(async () => { - if ( settings.themeStatus === 'unknown' ) { + if ( storedThemeStatus === THEME_STATUS_INIT ) { const themeStatus = await checkThemeStatus(); switch( themeStatus ) { - case 'installing': - setTimeout( () => { - updateSettings( settings ); - }, 30000 ) + case THEME_STATUS_INSTALLING: + waitForInstall(); break; default: - settings.themeStatus = themeStatus; - updateSettings( settings ); + updateThemeStatus( themeStatus ) } } - setState( settings.themeStatus ); - }, [settings] ) + + }, [storedThemeStatus] ) const handleRender = ( children ) => { - switch( state ) { - case 'not_active': + switch( storedThemeStatus ) { + case THEME_STATUS_NOT_ACTIVE : return

Error

- case 'activated': + case THEME_STATUS_ACTIVE: return children default: return diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js index e14a73e07..61192eab4 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js @@ -10,7 +10,7 @@ import HeadingWithSubHeading from '../../../../components/HeadingWithSubHeading' import { useGlobalStylesOutput } from '../../../../utils/global-styles/use-global-styles-output'; import { getPatterns } from '../../../../utils/api/patterns'; import { getGlobalStyles } from '../../../../utils/api/themes'; -import { VIEW_DESIGN_THEME_STYLES_MENU } from '../../../../../constants'; +import { VIEW_DESIGN_THEME_STYLES_MENU, THEME_STATUS_ACTIVE } from '../../../../../constants'; import DesignStateHandler from '../../DesignStateHandler'; const StepDesignThemeStylesMenu = () => { @@ -24,7 +24,7 @@ const StepDesignThemeStylesMenu = () => { const navigate = useNavigate(); const isLargeViewport = useViewportMatch( 'medium' ); - const { currentStep, nextStep, currentData, storedPreviewSettings, settings } = + const { currentStep, nextStep, currentData, storedPreviewSettings, themeStatus } = useSelect( ( select ) => { return { currentStep: select( nfdOnboardingStore ).getStepFromPath( @@ -35,7 +35,7 @@ const StepDesignThemeStylesMenu = () => { select( nfdOnboardingStore ).getCurrentOnboardingData(), storedPreviewSettings: select( nfdOnboardingStore ).getPreviewSettings(), - settings: select( nfdOnboardingStore ).getSettings(), + themeStatus: select( nfdOnboardingStore ).getThemeStatus(), }; }, [] ); @@ -67,8 +67,8 @@ const StepDesignThemeStylesMenu = () => { }; useEffect( () => { - if ( ! isLoaded && settings.themeStatus === 'activated' ) getStylesAndPatterns(); - }, [ isLoaded, settings ] ); + if ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE ) getStylesAndPatterns(); + }, [ isLoaded, themeStatus ] ); const handleClick = ( idx ) => { const selectedGlobalStyle = globalStyles[ idx ]; diff --git a/src/OnboardingSPA/store/actions.js b/src/OnboardingSPA/store/actions.js index b6bfdd990..6201816f5 100644 --- a/src/OnboardingSPA/store/actions.js +++ b/src/OnboardingSPA/store/actions.js @@ -118,6 +118,13 @@ export function updateSettings( settings ) { }; } +export function updateThemeStatus( themeStatus ) { + return { + type: 'UPDATE_THEME_STATUS', + themeStatus + } +} + export function setIsSidebarOpened( isOpen ) { return { type: 'SET_SIDEBAR_OPENED', diff --git a/src/OnboardingSPA/store/reducer.js b/src/OnboardingSPA/store/reducer.js index 1e24397e9..3ed3c6ccf 100644 --- a/src/OnboardingSPA/store/reducer.js +++ b/src/OnboardingSPA/store/reducer.js @@ -148,13 +148,18 @@ export function runtime( state = {}, action ) { return state; } -export function settings( state = { themeStatus: 'unknown' }, action ) { +export function settings( state = { themeStatus: 'init' }, action ) { switch ( action.type ) { case 'UPDATE_SETTINGS': return { ...state, ...action.settings, }; + case 'UPDATE_THEME_STATUS': + return { + ...state, + themeStatus: action.themeStatus + }; } return state; diff --git a/src/OnboardingSPA/store/selectors.js b/src/OnboardingSPA/store/selectors.js index ea7e25297..7665d9542 100644 --- a/src/OnboardingSPA/store/selectors.js +++ b/src/OnboardingSPA/store/selectors.js @@ -233,6 +233,10 @@ export function getSettings ( state ) { return state.settings; } +export function getThemeStatus ( state ) { + return state.settings.themeStatus; +} + export function getStoreInfoSteps( state ) { return state.flow.steps.storeInfoSteps; } diff --git a/src/constants.js b/src/constants.js index 99ee4b99e..7427f96bb 100644 --- a/src/constants.js +++ b/src/constants.js @@ -30,6 +30,13 @@ export const MAX_RETRIES_SETTINGS_INIT = 2; export const NFD_PLUGINS_QUERY_PARAM = 'nfd_plugins'; export const NFD_THEMES_QUERY_PARAM = 'nfd_themes'; +export const DESIGN_STEPS_THEME = 'nfd_slug_yith_wonder' +export const THEME_STATUS_INIT = 'init'; +export const THEME_STATUS_NOT_ACTIVE = 'not_active'; +export const THEME_STATUS_INSTALLING = 'installing'; +export const THEME_STATUS_ACTIVE = 'activated'; +export const THEME_INSTALL_WAIT_TIMEOUT = 30000 + /** * All views for the component. */ From b3eb177cd7b7bb72441a96b2d08d338017445d14 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 28 Sep 2022 21:17:13 +0530 Subject: [PATCH 03/10] PRESS2-299 load webfonts dynamically --- includes/RestApi/SettingsController.php | 383 ++++++++++++++++++ .../pages/Steps/DesignStateHandler/index.js | 20 +- src/OnboardingSPA/utils/api/settings.js | 8 + src/onboarding.js | 1 + 4 files changed, 409 insertions(+), 3 deletions(-) diff --git a/includes/RestApi/SettingsController.php b/includes/RestApi/SettingsController.php index 2d4fc0a95..b41ced95b 100644 --- a/includes/RestApi/SettingsController.php +++ b/includes/RestApi/SettingsController.php @@ -5,6 +5,7 @@ use NewfoldLabs\WP\Module\Onboarding\Data\Options; use NewfoldLabs\WP\Module\Onboarding\Data\Config; use NewfoldLabs\WP\Module\Onboarding\WP_Config; +use NewfoldLabs\WP\Module\Onboarding\Data\Data; /** * Class SettingsController @@ -81,6 +82,18 @@ public function register_routes() { ), ) ); + + \register_rest_route( + $this->namespace, + $this->rest_base . '/preview', + array( + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_preview_settings' ), + // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + ), + ) + ); } /** @@ -213,4 +226,374 @@ public function initialize() { 201 ); } + + public static function fn_get_webfonts_from_theme_json() { + // Get settings from theme.json. + $settings = \WP_Theme_JSON_Resolver::get_merged_data()->get_settings(); + + // If in the editor, add webfonts defined in variations. + if ( is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { + $variations = \WP_Theme_JSON_Resolver::get_style_variations(); + foreach ( $variations as $variation ) { + // Skip if fontFamilies are not defined in the variation. + if ( empty( $variation['settings']['typography']['fontFamilies'] ) ) { + continue; + } + + // Initialize the array structure. + if ( empty( $settings['typography'] ) ) { + $settings['typography'] = array(); + } + if ( empty( $settings['typography']['fontFamilies'] ) ) { + $settings['typography']['fontFamilies'] = array(); + } + if ( empty( $settings['typography']['fontFamilies']['theme'] ) ) { + $settings['typography']['fontFamilies']['theme'] = array(); + } + + // Combine variations with settings. Remove duplicates. + $settings['typography']['fontFamilies']['theme'] = array_merge( $settings['typography']['fontFamilies']['theme'], $variation['settings']['typography']['fontFamilies']['theme'] ); + $settings['typography']['fontFamilies'] = array_unique( $settings['typography']['fontFamilies'] ); + } + } + + // Bail out early if there are no settings for webfonts. + if ( empty( $settings['typography']['fontFamilies'] ) ) { + return array(); + } + + $webfonts = array(); + + // Look for fontFamilies. + foreach ( $settings['typography']['fontFamilies'] as $font_families ) { + foreach ( $font_families as $font_family ) { + + // Skip if fontFace is not defined. + if ( empty( $font_family['fontFace'] ) ) { + continue; + } + + // Skip if fontFace is not an array of webfonts. + if ( ! is_array( $font_family['fontFace'] ) ) { + continue; + } + + $webfonts = array_merge( $webfonts, $font_family['fontFace'] ); + } + } + + return $webfonts; + } + + static function fn_transform_src_into_uri( array $src ) { + foreach ( $src as $key => $url ) { + // Tweak the URL to be relative to the theme root. + if ( ! str_starts_with( $url, 'file:./' ) ) { + continue; + } + + $src[ $key ] = get_theme_file_uri( str_replace( 'file:./', '', $url ) ); + } + + return $src; + } + + /** + * Converts the font-face properties (i.e. keys) into kebab-case. + * + * @since 6.0.0 + * + * @param array $font_face Font face to convert. + * @return array Font faces with each property in kebab-case format. + */ + static function fn_convert_keys_to_kebab_case( array $font_face ) { + foreach ( $font_face as $property => $value ) { + $kebab_case = _wp_to_kebab_case( $property ); + $font_face[ $kebab_case ] = $value; + if ( $kebab_case !== $property ) { + unset( $font_face[ $property ] ); + } + } + + return $font_face; + } + + /** + * Validates a webfont. + * + * @since 6.0.0 + * + * @param array $webfont The webfont arguments. + * @return array|false The validated webfont arguments, or false if the webfont is invalid. + */ + static function fn_validate_webfont( $webfont ) { + $webfont = wp_parse_args( + $webfont, + array( + 'font-family' => '', + 'font-style' => 'normal', + 'font-weight' => '400', + 'font-display' => 'fallback', + 'src' => array(), + ) + ); + + // Check the font-family. + if ( empty( $webfont['font-family'] ) || ! is_string( $webfont['font-family'] ) ) { + trigger_error( __( 'Webfont font family must be a non-empty string.' ) ); + + return false; + } + + // Check that the `src` property is defined and a valid type. + if ( empty( $webfont['src'] ) || ( ! is_string( $webfont['src'] ) && ! is_array( $webfont['src'] ) ) ) { + trigger_error( __( 'Webfont src must be a non-empty string or an array of strings.' ) ); + + return false; + } + + // Validate the `src` property. + foreach ( (array) $webfont['src'] as $src ) { + if ( ! is_string( $src ) || '' === trim( $src ) ) { + trigger_error( __( 'Each webfont src must be a non-empty string.' ) ); + + return false; + } + } + + // Check the font-weight. + if ( ! is_string( $webfont['font-weight'] ) && ! is_int( $webfont['font-weight'] ) ) { + trigger_error( __( 'Webfont font weight must be a properly formatted string or integer.' ) ); + + return false; + } + + // Check the font-display. + if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'swap' ), true ) ) { + $webfont['font-display'] = 'fallback'; + } + + $valid_props = array( + 'ascend-override', + 'descend-override', + 'font-display', + 'font-family', + 'font-stretch', + 'font-style', + 'font-weight', + 'font-variant', + 'font-feature-settings', + 'font-variation-settings', + 'line-gap-override', + 'size-adjust', + 'src', + 'unicode-range', + ); + + foreach ( $webfont as $prop => $value ) { + if ( ! in_array( $prop, $valid_props, true ) ) { + unset( $webfont[ $prop ] ); + } + } + + return $webfont; + } + + static function fn_register_webfonts() { + $registered_webfonts = array(); + + foreach ( self::fn_get_webfonts_from_theme_json() as $webfont ) { + if ( ! is_array( $webfont ) ) { + continue; + } + + $webfont = self::fn_convert_keys_to_kebab_case( $webfont ); + + $webfont = self::fn_validate_webfont( $webfont ); + + $webfont['src'] = self::fn_transform_src_into_uri( (array) $webfont['src'] ); + + // Skip if not valid. + if ( empty( $webfont ) ) { + continue; + } + + $registered_webfonts[] = $webfont; + } + + return $registered_webfonts; + } + + static function fn_order_src( array $webfont ) { + $src = array(); + $src_ordered = array(); + + foreach ( $webfont['src'] as $url ) { + // Add data URIs first. + if ( str_starts_with( trim( $url ), 'data:' ) ) { + $src_ordered[] = array( + 'url' => $url, + 'format' => 'data', + ); + continue; + } + $format = pathinfo( $url, PATHINFO_EXTENSION ); + $src[ $format ] = $url; + } + + // Add woff2. + if ( ! empty( $src['woff2'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['woff2'] ), + 'format' => 'woff2', + ); + } + + // Add woff. + if ( ! empty( $src['woff'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['woff'] ), + 'format' => 'woff', + ); + } + + // Add ttf. + if ( ! empty( $src['ttf'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['ttf'] ), + 'format' => 'truetype', + ); + } + + // Add eot. + if ( ! empty( $src['eot'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['eot'] ), + 'format' => 'embedded-opentype', + ); + } + + // Add otf. + if ( ! empty( $src['otf'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['otf'] ), + 'format' => 'opentype', + ); + } + $webfont['src'] = $src_ordered; + + return $webfont; + } + + static function fn_compile_src( $font_family, array $value ) { + $src = "local($font_family)"; + + foreach ( $value as $item ) { + + if ( + str_starts_with( $item['url'], site_url() ) || + str_starts_with( $item['url'], home_url() ) + ) { + $item['url'] = wp_make_link_relative( $item['url'] ); + } + + $src .= ( 'data' === $item['format'] ) + ? ", url({$item['url']})" + : ", url('{$item['url']}') format('{$item['format']}')"; + } + + return $src; + } + + /** + * Compiles the font variation settings. + * + * @since 6.0.0 + * + * @param array $font_variation_settings Array of font variation settings. + * @return string The CSS. + */ + static function fn_compile_variations( array $font_variation_settings ) { + $variations = ''; + + foreach ( $font_variation_settings as $key => $value ) { + $variations .= "$key $value"; + } + + return $variations; + } + + static function fn_build_font_face_css( array $webfont ) { + $css = ''; + + // Wrap font-family in quotes if it contains spaces. + if ( + str_contains( $webfont['font-family'], ' ' ) && + ! str_contains( $webfont['font-family'], '"' ) && + ! str_contains( $webfont['font-family'], "'" ) + ) { + $webfont['font-family'] = '"' . $webfont['font-family'] . '"'; + } + + foreach ( $webfont as $key => $value ) { + /* + * Skip "provider", since it's for internal API use, + * and not a valid CSS property. + */ + if ( 'provider' === $key ) { + continue; + } + + // Compile the "src" parameter. + if ( 'src' === $key ) { + $value = self::fn_compile_src( $webfont['font-family'], $value ); + } + + // If font-variation-settings is an array, convert it to a string. + if ( 'font-variation-settings' === $key && is_array( $value ) ) { + $value =self::fn_compile_variations( $value ); + } + + if ( ! empty( $value ) ) { + $css .= "$key:$value;"; + } + } + + return $css; + } + + static function fn_get_css ($registered_webfonts) { + $css = ''; + + foreach ( $registered_webfonts as $webfont ) { + // Order the webfont's `src` items to optimize for browser support. + $webfont = self::fn_order_src( $webfont ); + + // Build the @font-face CSS for this webfont. + $css .= '@font-face{' . self::fn_build_font_face_css( $webfont ) . '}'; + } + + return $css; + } + + function wp_theme_json_webfonts_handler() { + + $styles = self::fn_get_css(self::fn_register_webfonts()); + + // Bail out if there are no styles to enqueue. + if ( '' === $styles ) { + return; + } + + return $styles; + } + + public function get_preview_settings() { + $preview_settings = Data::preview_settings(); + $preview_settings['settings']['__unstableResolvedAssets'] = $this->wp_theme_json_webfonts_handler(); + return new \WP_REST_Response( + $preview_settings, + 200 + ); + } } diff --git a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js index c1d98e46d..6e0c31acb 100644 --- a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js @@ -5,28 +5,39 @@ import { StepLoader } from '../../../components/Loaders'; import { store as nfdOnboardingStore } from '../../../store'; import { getThemeStatus } from '../../../utils/api/themes'; import { THEME_STATUS_INIT, THEME_STATUS_INSTALLING, THEME_STATUS_NOT_ACTIVE, THEME_STATUS_ACTIVE, DESIGN_STEPS_THEME, THEME_INSTALL_WAIT_TIMEOUT } from '../../../../constants'; +import { getPreviewSettings } from '../../../utils/api/settings'; +import { useGlobalStylesOutput } from '../../../utils/global-styles/use-global-styles-output'; const DesignStateHandler = ( { children } ) => { const { storedThemeStatus } = useSelect(( select ) => { return { - storedThemeStatus: select(nfdOnboardingStore).getThemeStatus() + storedThemeStatus: select(nfdOnboardingStore).getThemeStatus(), }; }, []); - const { updateThemeStatus } = useDispatch( nfdOnboardingStore ); + const { updateThemeStatus, updatePreviewSettings } = useDispatch( nfdOnboardingStore ); const checkThemeStatus = async () => { const themeStatus = await getThemeStatus( DESIGN_STEPS_THEME ); return themeStatus.body.status; } + const loadPreviewSettings = async () => { + const previewSettings = await getPreviewSettings(); + console.log(previewSettings.body); + // const settings = useGlobalStylesOutput( previewSettings.body, previewSettings.body ); + updatePreviewSettings( previewSettings.body ) + } + const waitForInstall = () => { setTimeout( async () => { const themeStatus = await checkThemeStatus(); if ( themeStatus !== THEME_STATUS_ACTIVE) { - updateThemeStatus( THEME_STATUS_NOT_ACTIVE ) + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ) } + updateThemeStatus( themeStatus ) + await loadPreviewSettings(); }, THEME_INSTALL_WAIT_TIMEOUT ) } @@ -34,10 +45,13 @@ const DesignStateHandler = ( { children } ) => { useEffect(async () => { if ( storedThemeStatus === THEME_STATUS_INIT ) { const themeStatus = await checkThemeStatus(); + console.log(themeStatus) switch( themeStatus ) { case THEME_STATUS_INSTALLING: waitForInstall(); break; + case THEME_STATUS_ACTIVE: + await loadPreviewSettings(); default: updateThemeStatus( themeStatus ) } diff --git a/src/OnboardingSPA/utils/api/settings.js b/src/OnboardingSPA/utils/api/settings.js index 9c571f752..c0c3a7a79 100644 --- a/src/OnboardingSPA/utils/api/settings.js +++ b/src/OnboardingSPA/utils/api/settings.js @@ -32,3 +32,11 @@ export const initialize = ( retries = 0 ) => { initialize( retries ); } ); }; + +export const getPreviewSettings = async () => { + return await resolve( + apiFetch( { + url: onboardingRestURL( 'settings/preview' ), + } ).then() + ); +} diff --git a/src/onboarding.js b/src/onboarding.js index 8a78591fe..0d0fae789 100644 --- a/src/onboarding.js +++ b/src/onboarding.js @@ -7,6 +7,7 @@ import { registerCoreBlocks } from '@wordpress/block-library'; import initializeNFDOnboarding from './OnboardingSPA'; if ( runtimeDataExists ) { + console.log(window.nfdOnboarding.previewSettings) domReady( () => { initializeNFDOnboarding( NFD_ONBOARDING_ELEMENT_ID, From 20c9f58e0d60862102ef2eb7af2130be07e92fc0 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 28 Sep 2022 21:30:52 +0530 Subject: [PATCH 04/10] PRESS2-299 fix webfonts api --- includes/RestApi/SettingsController.php | 2 +- src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js | 2 -- src/onboarding.js | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/RestApi/SettingsController.php b/includes/RestApi/SettingsController.php index b41ced95b..169f03663 100644 --- a/includes/RestApi/SettingsController.php +++ b/includes/RestApi/SettingsController.php @@ -590,7 +590,7 @@ function wp_theme_json_webfonts_handler() { public function get_preview_settings() { $preview_settings = Data::preview_settings(); - $preview_settings['settings']['__unstableResolvedAssets'] = $this->wp_theme_json_webfonts_handler(); + $preview_settings['settings']['__unstableResolvedAssets']['styles'] .= ''; return new \WP_REST_Response( $preview_settings, 200 diff --git a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js index 6e0c31acb..de0d30d89 100644 --- a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js @@ -25,8 +25,6 @@ const DesignStateHandler = ( { children } ) => { const loadPreviewSettings = async () => { const previewSettings = await getPreviewSettings(); - console.log(previewSettings.body); - // const settings = useGlobalStylesOutput( previewSettings.body, previewSettings.body ); updatePreviewSettings( previewSettings.body ) } diff --git a/src/onboarding.js b/src/onboarding.js index 0d0fae789..8a78591fe 100644 --- a/src/onboarding.js +++ b/src/onboarding.js @@ -7,7 +7,6 @@ import { registerCoreBlocks } from '@wordpress/block-library'; import initializeNFDOnboarding from './OnboardingSPA'; if ( runtimeDataExists ) { - console.log(window.nfdOnboarding.previewSettings) domReady( () => { initializeNFDOnboarding( NFD_ONBOARDING_ELEMENT_ID, From 527e6045f7f5ed5d2ffd49e7594eaf2a7864a256 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 29 Sep 2022 00:02:51 +0530 Subject: [PATCH 05/10] PRESS2-299 add error state --- src/Brands/bluehost/step-error-logo.svg | 1 + src/Brands/hostgator/logo.svg | 2 +- .../DrawerPanel/DesignThemeStylesPreview.js | 15 +-- .../components/ErrorState/Step/index.js | 16 +++ .../ErrorState/Step/stylesheet.scss | 9 ++ .../components/ErrorState/index.js | 1 + .../components/ErrorState/stylesheet.scss | 1 + .../components/StateHandlers/Design/index.js | 96 ++++++++++++++++++ .../components/StateHandlers/index.js | 1 + .../pages/Steps/DesignHomepageMenu/index.js | 41 ++++---- .../pages/Steps/DesignStateHandler/index.js | 78 -------------- .../Steps/DesignThemeStyles/Menu/index.js | 83 ++++++++------- .../Steps/DesignThemeStyles/Preview/index.js | 88 ++++++++-------- src/OnboardingSPA/static/images/content.png | Bin 18653 -> 9354 bytes src/OnboardingSPA/static/images/design.png | Bin 24662 -> 11400 bytes src/OnboardingSPA/static/images/features.png | Bin 31648 -> 12804 bytes src/OnboardingSPA/styles/_branding.scss | 1 + src/OnboardingSPA/styles/_icons.scss | 1 + src/OnboardingSPA/styles/app.scss | 1 + 19 files changed, 253 insertions(+), 182 deletions(-) create mode 100644 src/Brands/bluehost/step-error-logo.svg create mode 100644 src/OnboardingSPA/components/ErrorState/Step/index.js create mode 100644 src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss create mode 100644 src/OnboardingSPA/components/ErrorState/stylesheet.scss create mode 100644 src/OnboardingSPA/components/StateHandlers/Design/index.js create mode 100644 src/OnboardingSPA/components/StateHandlers/index.js delete mode 100644 src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js diff --git a/src/Brands/bluehost/step-error-logo.svg b/src/Brands/bluehost/step-error-logo.svg new file mode 100644 index 000000000..c75f6e6c8 --- /dev/null +++ b/src/Brands/bluehost/step-error-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Brands/hostgator/logo.svg b/src/Brands/hostgator/logo.svg index 1c80087f9..c0cae89a2 100644 --- a/src/Brands/hostgator/logo.svg +++ b/src/Brands/hostgator/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js index b45518683..87b09c876 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js @@ -6,6 +6,7 @@ import { store as nfdOnboardingStore } from '../../../store'; import { getPatterns } from '../../../utils/api/patterns'; import { getGlobalStyles } from '../../../utils/api/themes'; import { useGlobalStylesOutput } from '../../../utils/global-styles/use-global-styles-output'; +import { THEME_STATUS_ACTIVE } from '../../../../constants'; const DesignThemeStylesPreview = () => { const MAX_PREVIEWS_PER_ROW = 3; @@ -14,18 +15,17 @@ const DesignThemeStylesPreview = () => { const [ globalStyles, setGlobalStyles ] = useState(); const [ selectedStyle, setSelectedStyle ] = useState( '' ); - const { currentStep, currentData, storedPreviewSettings } = useSelect( - ( select ) => { + const { currentStep, currentData, storedPreviewSettings, themeStatus } = + useSelect( ( select ) => { return { currentStep: select( nfdOnboardingStore ).getCurrentStep(), currentData: select( nfdOnboardingStore ).getCurrentOnboardingData(), storedPreviewSettings: select( nfdOnboardingStore ).getPreviewSettings(), + themeStatus: select( nfdOnboardingStore ).getThemeStatus(), }; - }, - [] - ); + }, [] ); const { updatePreviewSettings, setCurrentOnboardingData } = useDispatch( nfdOnboardingStore ); @@ -62,8 +62,9 @@ const DesignThemeStylesPreview = () => { }; useEffect( () => { - if ( ! isLoaded ) getStylesAndPatterns(); - }, [ isLoaded ] ); + if ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE ) + getStylesAndPatterns(); + }, [ isLoaded, themeStatus ] ); const handleClick = ( idx ) => { const selectedGlobalStyle = globalStyles[ idx ]; diff --git a/src/OnboardingSPA/components/ErrorState/Step/index.js b/src/OnboardingSPA/components/ErrorState/Step/index.js new file mode 100644 index 000000000..02d4c4be9 --- /dev/null +++ b/src/OnboardingSPA/components/ErrorState/Step/index.js @@ -0,0 +1,16 @@ +import CommonLayout from '../../Layouts/Common'; +import HeadingWithSubHeading from '../../HeadingWithSubHeading'; +import NeedHelpTag from '../../NeedHelpTag'; + +const StepErrorState = ( { title, subtitle, error } ) => { + return ( + + +
+

{ error }

+ +
+ ); +}; + +export default StepErrorState; diff --git a/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss b/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss new file mode 100644 index 000000000..fa4a17742 --- /dev/null +++ b/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss @@ -0,0 +1,9 @@ +.step-error-state { + &__logo { + background-image: var(--nfd-onboarding-step-error-icon); + background-size: contain; + background-repeat: no-repeat; + height: 400px; + width: 500px; + } +} \ No newline at end of file diff --git a/src/OnboardingSPA/components/ErrorState/index.js b/src/OnboardingSPA/components/ErrorState/index.js index e69de29bb..e21af9725 100644 --- a/src/OnboardingSPA/components/ErrorState/index.js +++ b/src/OnboardingSPA/components/ErrorState/index.js @@ -0,0 +1 @@ +export { default as StepErrorState } from './Step'; diff --git a/src/OnboardingSPA/components/ErrorState/stylesheet.scss b/src/OnboardingSPA/components/ErrorState/stylesheet.scss new file mode 100644 index 000000000..21cc8520b --- /dev/null +++ b/src/OnboardingSPA/components/ErrorState/stylesheet.scss @@ -0,0 +1 @@ +@import "./Step/stylesheet"; diff --git a/src/OnboardingSPA/components/StateHandlers/Design/index.js b/src/OnboardingSPA/components/StateHandlers/Design/index.js new file mode 100644 index 000000000..0a5ec91fd --- /dev/null +++ b/src/OnboardingSPA/components/StateHandlers/Design/index.js @@ -0,0 +1,96 @@ +import { useSelect, useDispatch } from '@wordpress/data'; +import { useEffect } from '@wordpress/element'; +import { StepLoader } from '../../Loaders'; + +import { store as nfdOnboardingStore } from '../../../store'; +import { getThemeStatus } from '../../../utils/api/themes'; +import { + THEME_STATUS_INIT, + THEME_STATUS_INSTALLING, + THEME_STATUS_NOT_ACTIVE, + THEME_STATUS_ACTIVE, + DESIGN_STEPS_THEME, + THEME_INSTALL_WAIT_TIMEOUT, +} from '../../../../constants'; +import { getPreviewSettings } from '../../../utils/api/settings'; +import { StepErrorState } from '../../ErrorState'; + +const DesignStateHandler = ( { children } ) => { + const { storedThemeStatus } = useSelect( ( select ) => { + return { + storedThemeStatus: select( nfdOnboardingStore ).getThemeStatus(), + }; + }, [] ); + + const { updateThemeStatus, updatePreviewSettings } = + useDispatch( nfdOnboardingStore ); + + const checkThemeStatus = async () => { + const themeStatus = await getThemeStatus( DESIGN_STEPS_THEME ); + return themeStatus.body.status; + }; + + const loadPreviewSettings = async () => { + const previewSettings = await getPreviewSettings(); + updatePreviewSettings( previewSettings.body ); + }; + + const waitForInstall = () => { + setTimeout( async () => { + const themeStatus = await checkThemeStatus(); + if ( themeStatus !== THEME_STATUS_ACTIVE ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } + updateThemeStatus( themeStatus ); + await loadPreviewSettings(); + }, THEME_INSTALL_WAIT_TIMEOUT ); + }; + + useEffect( async () => { + if ( storedThemeStatus === THEME_STATUS_INIT ) { + const themeStatus = await checkThemeStatus(); + switch ( themeStatus ) { + case THEME_STATUS_INSTALLING: + waitForInstall(); + break; + case THEME_STATUS_ACTIVE: + await loadPreviewSettings(); + break; + default: + updateThemeStatus( themeStatus ); + } + } + }, [ storedThemeStatus ] ); + + const handleRender = () => { + switch ( storedThemeStatus ) { + case THEME_STATUS_NOT_ACTIVE: + return ( + + ); + case THEME_STATUS_ACTIVE: + return children; + default: + return ( + + ); + } + }; + + return <>{ handleRender() }; +}; + +export default DesignStateHandler; diff --git a/src/OnboardingSPA/components/StateHandlers/index.js b/src/OnboardingSPA/components/StateHandlers/index.js new file mode 100644 index 000000000..b18f3eb9a --- /dev/null +++ b/src/OnboardingSPA/components/StateHandlers/index.js @@ -0,0 +1 @@ +export { default as DesignStateHandler } from './Design'; diff --git a/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js b/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js index d1de93405..6fc6b8067 100644 --- a/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js @@ -7,9 +7,13 @@ import { getPatterns } from '../../../utils/api/patterns'; import { getGlobalStyles } from '../../../utils/api/themes'; import { store as nfdOnboardingStore } from '../../../store'; import CommonLayout from '../../../components/Layouts/Common'; -import { VIEW_DESIGN_HOMEPAGE_MENU } from '../../../../constants'; +import { + VIEW_DESIGN_HOMEPAGE_MENU, + THEME_STATUS_ACTIVE, +} from '../../../../constants'; import { LivePreviewSelectableCard } from '../../../components/LivePreview'; import HeadingWithSubHeading from '../../../components/HeadingWithSubHeading'; +import { DesignStateHandler } from '../../../components/StateHandlers'; import { useGlobalStylesOutput } from '../../../utils/global-styles/use-global-styles-output'; const StepDesignHomepageMenu = () => { @@ -41,8 +45,8 @@ const StepDesignHomepageMenu = () => { const isLargeViewport = useViewportMatch( 'medium' ); - const { currentStep, currentData, storedPreviewSettings } = useSelect( - ( select ) => { + const { currentStep, currentData, storedPreviewSettings, themeStatus } = + useSelect( ( select ) => { return { currentStep: select( nfdOnboardingStore ).getStepFromPath( location.pathname @@ -51,10 +55,9 @@ const StepDesignHomepageMenu = () => { select( nfdOnboardingStore ).getCurrentOnboardingData(), storedPreviewSettings: select( nfdOnboardingStore ).getPreviewSettings(), + themeStatus: select( nfdOnboardingStore ).getThemeStatus(), }; - }, - [] - ); + }, [] ); const { setDrawerActiveView, @@ -140,10 +143,10 @@ const StepDesignHomepageMenu = () => { } useEffect( () => { - if ( ! isLoaded ) { + if ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE ) { getHomepagePatternsData(); } - }, [ isLoaded ] ); + }, [ isLoaded, themeStatus ] ); function buildHomepagePreviews() { return homepagePattern?.map( ( homepage, idx ) => { @@ -167,17 +170,19 @@ const StepDesignHomepageMenu = () => { } return ( - -
- -
- { globalStyle && buildHomepagePreviews() } + + +
+ +
+ { globalStyle && buildHomepagePreviews() } +
-
- + + ); }; diff --git a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js b/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js deleted file mode 100644 index de0d30d89..000000000 --- a/src/OnboardingSPA/pages/Steps/DesignStateHandler/index.js +++ /dev/null @@ -1,78 +0,0 @@ -import { useSelect, useDispatch } from '@wordpress/data'; -import { useEffect, useState } from '@wordpress/element'; -import { StepLoader } from '../../../components/Loaders'; - -import { store as nfdOnboardingStore } from '../../../store'; -import { getThemeStatus } from '../../../utils/api/themes'; -import { THEME_STATUS_INIT, THEME_STATUS_INSTALLING, THEME_STATUS_NOT_ACTIVE, THEME_STATUS_ACTIVE, DESIGN_STEPS_THEME, THEME_INSTALL_WAIT_TIMEOUT } from '../../../../constants'; -import { getPreviewSettings } from '../../../utils/api/settings'; -import { useGlobalStylesOutput } from '../../../utils/global-styles/use-global-styles-output'; - -const DesignStateHandler = ( { children } ) => { - - const { storedThemeStatus } = useSelect(( select ) => { - return { - storedThemeStatus: select(nfdOnboardingStore).getThemeStatus(), - }; - }, []); - - const { updateThemeStatus, updatePreviewSettings } = useDispatch( nfdOnboardingStore ); - - const checkThemeStatus = async () => { - const themeStatus = await getThemeStatus( DESIGN_STEPS_THEME ); - return themeStatus.body.status; - } - - const loadPreviewSettings = async () => { - const previewSettings = await getPreviewSettings(); - updatePreviewSettings( previewSettings.body ) - } - - const waitForInstall = () => { - setTimeout( async () => { - const themeStatus = await checkThemeStatus(); - if ( themeStatus !== THEME_STATUS_ACTIVE) { - return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ) - } - updateThemeStatus( themeStatus ) - await loadPreviewSettings(); - }, THEME_INSTALL_WAIT_TIMEOUT ) - } - - - useEffect(async () => { - if ( storedThemeStatus === THEME_STATUS_INIT ) { - const themeStatus = await checkThemeStatus(); - console.log(themeStatus) - switch( themeStatus ) { - case THEME_STATUS_INSTALLING: - waitForInstall(); - break; - case THEME_STATUS_ACTIVE: - await loadPreviewSettings(); - default: - updateThemeStatus( themeStatus ) - } - } - - }, [storedThemeStatus] ) - - const handleRender = ( children ) => { - switch( storedThemeStatus ) { - case THEME_STATUS_NOT_ACTIVE : - return

Error

- case THEME_STATUS_ACTIVE: - return children - default: - return - } - } - - return ( - <> - { handleRender( children ) } - - ); -} - -export default DesignStateHandler; \ No newline at end of file diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js index 61192eab4..f71fa89c0 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js @@ -10,8 +10,11 @@ import HeadingWithSubHeading from '../../../../components/HeadingWithSubHeading' import { useGlobalStylesOutput } from '../../../../utils/global-styles/use-global-styles-output'; import { getPatterns } from '../../../../utils/api/patterns'; import { getGlobalStyles } from '../../../../utils/api/themes'; -import { VIEW_DESIGN_THEME_STYLES_MENU, THEME_STATUS_ACTIVE } from '../../../../../constants'; -import DesignStateHandler from '../../DesignStateHandler'; +import { + VIEW_DESIGN_THEME_STYLES_MENU, + THEME_STATUS_ACTIVE, +} from '../../../../../constants'; +import { DesignStateHandler } from '../../../../components/StateHandlers'; const StepDesignThemeStylesMenu = () => { const MAX_PREVIEWS_PER_ROW = 3; @@ -24,20 +27,25 @@ const StepDesignThemeStylesMenu = () => { const navigate = useNavigate(); const isLargeViewport = useViewportMatch( 'medium' ); - const { currentStep, nextStep, currentData, storedPreviewSettings, themeStatus } = - useSelect( ( select ) => { - return { - currentStep: select( nfdOnboardingStore ).getStepFromPath( - location.pathname - ), - nextStep: select( nfdOnboardingStore ).getNextStep(), - currentData: - select( nfdOnboardingStore ).getCurrentOnboardingData(), - storedPreviewSettings: - select( nfdOnboardingStore ).getPreviewSettings(), - themeStatus: select( nfdOnboardingStore ).getThemeStatus(), - }; - }, [] ); + const { + currentStep, + nextStep, + currentData, + storedPreviewSettings, + themeStatus, + } = useSelect( ( select ) => { + return { + currentStep: select( nfdOnboardingStore ).getStepFromPath( + location.pathname + ), + nextStep: select( nfdOnboardingStore ).getNextStep(), + currentData: + select( nfdOnboardingStore ).getCurrentOnboardingData(), + storedPreviewSettings: + select( nfdOnboardingStore ).getPreviewSettings(), + themeStatus: select( nfdOnboardingStore ).getThemeStatus(), + }; + }, [] ); const { setDrawerActiveView, @@ -67,7 +75,8 @@ const StepDesignThemeStylesMenu = () => { }; useEffect( () => { - if ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE ) getStylesAndPatterns(); + if ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE ) + getStylesAndPatterns(); }, [ isLoaded, themeStatus ] ); const handleClick = ( idx ) => { @@ -99,27 +108,27 @@ const StepDesignThemeStylesMenu = () => { }; return ( - - -
- -
- { globalStyles && - buildPreviews().slice( 0, MAX_PREVIEWS_PER_ROW ) } -
-
- { globalStyles && - buildPreviews().slice( - MAX_PREVIEWS_PER_ROW, - globalStyles.length - ) } + + +
+ +
+ { globalStyles && + buildPreviews().slice( 0, MAX_PREVIEWS_PER_ROW ) } +
+
+ { globalStyles && + buildPreviews().slice( + MAX_PREVIEWS_PER_ROW, + globalStyles.length + ) } +
-
- - + + ); }; diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js index efa26f1d6..7c0a50ba7 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js @@ -8,13 +8,16 @@ import { orderBy, filter } from 'lodash'; import { LivePreview } from '../../../../components/LivePreview'; import CommonLayout from '../../../../components/Layouts/Common'; -import { VIEW_DESIGN_THEME_STYLES_PREVIEW } from '../../../../../constants'; +import { + VIEW_DESIGN_THEME_STYLES_PREVIEW, + THEME_STATUS_ACTIVE, +} from '../../../../../constants'; import { store as nfdOnboardingStore } from '../../../../store'; import { getPatterns } from '../../../../utils/api/patterns'; import { getGlobalStyles } from '../../../../utils/api/themes'; import { useGlobalStylesOutput } from '../../../../utils/global-styles/use-global-styles-output'; import { conditionalSteps } from '../../../../data/routes/'; -import DesignStateHandler from '../../DesignStateHandler'; +import { DesignStateHandler } from '../../../../components/StateHandlers'; const StepDesignThemeStylesPreview = () => { const location = useLocation(); @@ -30,6 +33,7 @@ const StepDesignThemeStylesPreview = () => { routes, designSteps, allSteps, + themeStatus, } = useSelect( ( select ) => { return { currentStep: select( nfdOnboardingStore ).getStepFromPath( @@ -42,6 +46,7 @@ const StepDesignThemeStylesPreview = () => { routes: select( nfdOnboardingStore ).getRoutes(), allSteps: select( nfdOnboardingStore ).getAllSteps(), designSteps: select( nfdOnboardingStore ).getDesignSteps(), + themeStatus: select( nfdOnboardingStore ).getThemeStatus(), }; }, [] ); @@ -166,52 +171,53 @@ const StepDesignThemeStylesPreview = () => { }; useEffect( () => { - if ( ! isLoaded ) getStylesAndPatterns(); - }, [ isLoaded ] ); + if ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE ) + getStylesAndPatterns(); + }, [ isLoaded, themeStatus ] ); return ( - - -
- - - { __( - 'Customize Colors & Fonts?', - 'wp-module-onboarding' - ) } - + + +
+ + { __( - 'Check to customize in the next few steps (or leave empty and use the Site Editor later)', + 'Customize Colors & Fonts?', 'wp-module-onboarding' ) } + + { __( + 'Check to customize in the next few steps (or leave empty and use the Site Editor later)', + 'wp-module-onboarding' + ) } + - -
- } - checked={ customize } - onChange={ () => handleCheckbox( ! customize ) } - /> -
-
-
- - - -
-
-
- { pattern && ( - + } + checked={ customize } + onChange={ () => handleCheckbox( ! customize ) } /> - ) } -
-
-
+
+
+
+ + + +
+
+
+ { pattern && ( + + ) } +
+
+
); }; diff --git a/src/OnboardingSPA/static/images/content.png b/src/OnboardingSPA/static/images/content.png index bcf0a78a3ab19d8d7765946e250e296e08d075f0..28abb6a00ca8c0cc061a77b874fdbb6965579302 100644 GIT binary patch literal 9354 zcmV;5Bz4<~P)697600093P)t-sgTMRd z=jVXG_toL;=jZ1D004l$@aN~}|NsC0{{9^u9rX0{{r&y?{QUm^|L^bb|Nj5~|NZId z>HYuy92^|%?Ckmf|LExG`uh6){{Q~}{q^Ta^wOU$Q>G=NN-rnNk;>gIzW0SGs z{{H*@{maYC=jZ3U+vLB{+ax3;($dnp(cFWBgL-;;|Ni}|s;ctx@?waZOG`^=XlP)L zt)HKt>+9>8yvw}2y#4+A;_vt5R7 z)z#I<$H%gZYcq?fU+|zrV`L%K!iTe0+R#baX>PLS$rQU|(P3 z@b_%E#bHa0OaF}&L4+}+*J z&(AwLIkL{%M@L8f`u2i?f@^DQS65f^{r=73=z&%-Bpem(_W0oL^4{z3@#5C5$kw8^ z#FVeU=*6k!xRg^;Q9vmdqrc1G$gyIFnwFN9=J)&R^!L{8^s&RveWSggvAW!~lD&^- zaY`!Y{{Fty-M-1u>Ce2BskCE~tv7X}idZl+A{5~C_~`EN)#vQdw6;OV~B;q>U-!_wKk&eyBF#ip;ZO^T|~zo}P^s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}roC@{;rLgH;O;tL{OGB72n zZ~VjOMb}I++D&w$af71zmqqYSSdW~N`a1KY( zy)bRBF;Jm4UQo^oPhY&b#4sh&Fd7Tl`F2HH0f75ZaDb4-+9yQll2qGR+%jnx;RSpK zZ?85da#7Cnh;4hM;bJW*sx^*j0(6P`c#=P+a&I$p|4QMS-Qu(MyAp|@v{NXmdl16+(^OBTq)xwurc=aaCE$j}SS zA@ZGKh`6JFvl455VsP5D*yqA7K6&>k$7qpj@VtqXMKe{X_wA(VrPfsaTiX)l~>B5&O?%eS^rh!`<*%b3HJ_ zJ2#W8s;XP*2$SNC17BLo7G#AAIYA)27eiiE&oPW0Wu@Q0u1DOj{dVx}LUl|Tj$?_V zF*%TvvFmvwp}d)T16BJ7|1pWF3?N%aysFFh>6Uw}YfwjLTC+ikU;COfssZ6xs+APx z(=asO?7VN=Q_q9o{Mbi!_BPqEY~vHdwnP?F)FtBpcN?PGljM3ud-idNjp$UD6`V20 z)tmWfn&mf^Nm$mX{VmQ zNunZDXXf1v^yqxFYoA2AUaUGBiRx*RB=utXEGNNFI@_kFR=Lbm?xJ_%`%ue^i}8q` zba_fWh&2l3K8SYUaCXJsxhqCBv#);OY7HM-D10eTzfBuqfM6&&PZ)9 zuc->^o2ylid+4I|^^`NBaO%FhJep5!XD&Q#j*X0nbAjaPv7C7f^kY_$(kIuz|J?sS zk64Sr+LRLh_f6<8Qv4q*_ge?}KdA0+Iq?H)=Ie`i_HZS@(AD91<^f6{P|#+ZKff_+ g3K&k}eHVP)0rx!aRRv;x1Mr`Uf~I_}?EBFF0};klr~m)} diff --git a/src/OnboardingSPA/static/images/features.png b/src/OnboardingSPA/static/images/features.png index 497aa4bf0d688582f1956a989330b92764fe02dc..95fece87950a25e08b81322485603f703b48cc2d 100644 GIT binary patch literal 12804 zcmV+fGW*SmP);M1%9UUF-@9+Qq{{8&@HhQ%4^Yr`t{O<1WgM)+m`ujC` zv+(fo>+9xCogQj zFKoj!Ws4q0XfAEY{r&saE-PSQU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16ws?iDVx~D0%Kl;%xjB! z0Ob}L4{*rX>uE}%&^Vd9U9u^m%kVCn-=WQc9W2yz0gZ+xEo8Ym%b%HQ+_tkPpuIZ; zqrs?S?6w*aN_!GY8$<9)T(J8M#Y8!iU-`UcVfphO- z{g;O9cP5|ZSJYhNN+w&g90G?{ z_=U=Sb8&a~#f87ts4;JfMv1~uF>Mfx(N!!QT2oW@^QYDn*(0M{#IIuR<(?qP{HYl# z53(q2Hh|*KZYp?qVK6|M*-*R=!BR&TjX5?*YIxU4@Ao?_r1PxjFZc^9_p1&IVpia@ zQ4$I3K!plCaI{k58$a9V4w8@g@mNA`pd|2nEbDN`7#*3W2n=+zIJ z+DNipB)mt4Wi8ayseipGlV)uzdsID{u;>j-QxHx7KPse_TM{C`I_u!oYZPnFCz?zfR$=- zMr!7Te7R_=3{Ke-Xys}71+n|GirodyF$$dm8~ZxitU1(B=W)LiRfeBsOC3FLc(f_j zJ8m65Im`LHZDE1tg23j#w1;=BB<_y*4#v8!P1N-@8XMhMFQFx5HCinCc}haHN)ht9 zB|L||svA#Rw%fzB2TI!qS0j`$#%>di06d(uFjjr5kgTx=c92PD`*3^zc3|IcGb_}R zkk-zF?v`=PeYxp6^{bO=i!6+<3r19NDZi~c?#B8R8j&P6MV+{j0wxmqd9ajr;uj#r zXl&RCdgay?U3koxI^GQ`ER28glAk|#YdcC?#HytJf;R)48fgrR4$vmrzrla#udHDwwF>XT{~sqerN00G diff --git a/src/OnboardingSPA/styles/_branding.scss b/src/OnboardingSPA/styles/_branding.scss index 27196c84c..65d97eb8f 100644 --- a/src/OnboardingSPA/styles/_branding.scss +++ b/src/OnboardingSPA/styles/_branding.scss @@ -26,6 +26,7 @@ body { --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary); --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light); --nfd-onboarding-step-loader-icon: url("../../Brands/bluehost/step-loader-logo.svg"); + --nfd-onboarding-step-error-icon: url("../../Brands/bluehost/step-error-logo.svg"); } &.nfd-brand-hostgator { --wp-admin-theme-color: #2e93ee; diff --git a/src/OnboardingSPA/styles/_icons.scss b/src/OnboardingSPA/styles/_icons.scss index 7d3424d40..87d3824d0 100644 --- a/src/OnboardingSPA/styles/_icons.scss +++ b/src/OnboardingSPA/styles/_icons.scss @@ -33,6 +33,7 @@ body { --business-icon: url("../static/icons/business.svg"); --business-white-icon: url("../static/icons/business-white.svg"); + --nfd-onboarding-step-error-icon: url("../../Brands/bluehost/step-error-logo.svg"); /* * Below Icons are commented because they get added to the CSS bundle and diff --git a/src/OnboardingSPA/styles/app.scss b/src/OnboardingSPA/styles/app.scss index e422a3f10..5e9c6b4c2 100644 --- a/src/OnboardingSPA/styles/app.scss +++ b/src/OnboardingSPA/styles/app.scss @@ -33,6 +33,7 @@ @import "../pages/Steps/GetStarted/GetStartedExperience/stylesheet"; @import "../components/Button/NavCardButton/stylesheet"; @import "../pages/Steps/Ecommerce/stylesheet"; +@import "../components/ErrorState/stylesheet"; // CSS for Pages @import "../pages/Steps/BasicInfo/stylesheet.scss"; From 623e7d55d773aa0a8fb9eecb5d31ab7f3c5360b1 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 29 Sep 2022 14:22:52 +0530 Subject: [PATCH 06/10] PRESS2-299 css fixes --- .../components/ErrorState/Step/index.js | 2 +- .../ErrorState/Step/stylesheet.scss | 32 ++++++++++++----- .../HeadingWithSubHeading/stylesheet.scss | 34 +++++++++---------- .../components/Loaders/Step/stylesheet.scss | 19 ++++++++++- .../components/StateHandlers/Design/index.js | 3 +- .../pages/Steps/DesignHomepageMenu/index.js | 8 +++++ .../Steps/DesignThemeStyles/Menu/index.js | 8 +++++ .../Steps/DesignThemeStyles/Preview/index.js | 8 +++++ 8 files changed, 86 insertions(+), 28 deletions(-) diff --git a/src/OnboardingSPA/components/ErrorState/Step/index.js b/src/OnboardingSPA/components/ErrorState/Step/index.js index 02d4c4be9..d97570176 100644 --- a/src/OnboardingSPA/components/ErrorState/Step/index.js +++ b/src/OnboardingSPA/components/ErrorState/Step/index.js @@ -7,7 +7,7 @@ const StepErrorState = ( { title, subtitle, error } ) => {

-

{ error }

+

{ error }

); diff --git a/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss b/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss index fa4a17742..677123a21 100644 --- a/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss +++ b/src/OnboardingSPA/components/ErrorState/Step/stylesheet.scss @@ -1,9 +1,25 @@ .step-error-state { - &__logo { - background-image: var(--nfd-onboarding-step-error-icon); - background-size: contain; - background-repeat: no-repeat; - height: 400px; - width: 500px; - } -} \ No newline at end of file + justify-content: center; + + &__logo { + background-image: var(--nfd-onboarding-step-error-icon); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + width: 50vw; + height: 400px; + + @media (max-width: #{($break-medium)}) { + width: 100vw; + height: 30vh; + } + } + + &__error { + padding: 0; + margin-bottom: 20px; + font-weight: 400; + text-align: center; + font-size: clamp(0.85rem, 3.2vw, 1.7rem); + } +} diff --git a/src/OnboardingSPA/components/HeadingWithSubHeading/stylesheet.scss b/src/OnboardingSPA/components/HeadingWithSubHeading/stylesheet.scss index 677f827bf..daf7f201f 100644 --- a/src/OnboardingSPA/components/HeadingWithSubHeading/stylesheet.scss +++ b/src/OnboardingSPA/components/HeadingWithSubHeading/stylesheet.scss @@ -2,23 +2,23 @@ $black: var(--nfd-onboarding-black); $primary-color: var(--nfd-onboarding-primary); -.nfd-main-heading{ - width: 96%; - margin: 50px 0px 50px; +.nfd-main-heading { + width: 96%; + margin: 50px 0 50px; + line-height: 1; - &__title{ - color: $black; - font-weight: 700; - text-align: center; - color: $primary-color; - margin: 35px !important; - font-size: clamp(1.6rem, 4vw, 3.6rem); - } + &__title { + font-weight: 700; + text-align: center; + color: $primary-color; + margin: 35px !important; + font-size: clamp(1.6rem, 4vw, 3.6rem); + } - &__subtitle{ - color: $black; - font-weight: 400; - text-align: center; - font-size: clamp(0.85rem, 3.2vw, 1.7rem); - } + &__subtitle { + color: $black; + font-weight: 400; + text-align: center; + font-size: clamp(0.85rem, 3.2vw, 1.7rem); + } } diff --git a/src/OnboardingSPA/components/Loaders/Step/stylesheet.scss b/src/OnboardingSPA/components/Loaders/Step/stylesheet.scss index 252a837bc..8d61afd69 100644 --- a/src/OnboardingSPA/components/Loaders/Step/stylesheet.scss +++ b/src/OnboardingSPA/components/Loaders/Step/stylesheet.scss @@ -1,8 +1,25 @@ .step-loader { + justify-content: space-evenly; + + @media (max-width: #{($break-medium)}) { + justify-content: center; + } + &__logo { - width: 256px; + max-width: 256px; height: 256px; + width: 50vw; background-image: var(--nfd-onboarding-step-loader-icon); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + + @media (max-width: #{($break-medium)}) { + max-width: 256px; + max-height: 256px; + height: 30vh; + width: 100vw; + } } } diff --git a/src/OnboardingSPA/components/StateHandlers/Design/index.js b/src/OnboardingSPA/components/StateHandlers/Design/index.js index 0a5ec91fd..91effc545 100644 --- a/src/OnboardingSPA/components/StateHandlers/Design/index.js +++ b/src/OnboardingSPA/components/StateHandlers/Design/index.js @@ -55,7 +55,8 @@ const DesignStateHandler = ( { children } ) => { break; case THEME_STATUS_ACTIVE: await loadPreviewSettings(); - break; + updateThemeStatus( themeStatus ); + break; default: updateThemeStatus( themeStatus ); } diff --git a/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js b/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js index 6fc6b8067..08912e579 100644 --- a/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignHomepageMenu/index.js @@ -10,6 +10,7 @@ import CommonLayout from '../../../components/Layouts/Common'; import { VIEW_DESIGN_HOMEPAGE_MENU, THEME_STATUS_ACTIVE, + THEME_STATUS_NOT_ACTIVE, } from '../../../../constants'; import { LivePreviewSelectableCard } from '../../../components/LivePreview'; import HeadingWithSubHeading from '../../../components/HeadingWithSubHeading'; @@ -66,6 +67,7 @@ const StepDesignHomepageMenu = () => { updatePreviewSettings, setIsDrawerSuppressed, setCurrentOnboardingData, + updateThemeStatus, } = useDispatch( nfdOnboardingStore ); useEffect( () => { @@ -98,7 +100,13 @@ const StepDesignHomepageMenu = () => { async function getHomepagePatternsData() { const homepagePatternData = await getPatterns( currentStep.patternId ); + if ( homepagePatternData?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } const globalStyles = await getGlobalStyles(); + if ( globalStyles?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } let selectedGlobalStyle; if ( currentData.data.theme.variation ) { selectedGlobalStyle = globalStyles.body.filter( diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js index f71fa89c0..3e860235c 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js @@ -13,6 +13,7 @@ import { getGlobalStyles } from '../../../../utils/api/themes'; import { VIEW_DESIGN_THEME_STYLES_MENU, THEME_STATUS_ACTIVE, + THEME_STATUS_NOT_ACTIVE, } from '../../../../../constants'; import { DesignStateHandler } from '../../../../components/StateHandlers'; @@ -54,6 +55,7 @@ const StepDesignThemeStylesMenu = () => { setIsDrawerSuppressed, updatePreviewSettings, setCurrentOnboardingData, + updateThemeStatus, } = useDispatch( nfdOnboardingStore ); useEffect( () => { @@ -67,7 +69,13 @@ const StepDesignThemeStylesMenu = () => { const getStylesAndPatterns = async () => { const pattern = await getPatterns( currentStep.patternId, true ); + if ( pattern?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } const globalStyles = await getGlobalStyles(); + if ( globalStyles?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } setPattern( pattern?.body ); setGlobalStyles( globalStyles?.body ); setSelectedStyle( currentData.data.theme.variation ); diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js index 7c0a50ba7..7fbb7e8db 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js @@ -11,6 +11,7 @@ import CommonLayout from '../../../../components/Layouts/Common'; import { VIEW_DESIGN_THEME_STYLES_PREVIEW, THEME_STATUS_ACTIVE, + THEME_STATUS_NOT_ACTIVE, } from '../../../../../constants'; import { store as nfdOnboardingStore } from '../../../../store'; import { getPatterns } from '../../../../utils/api/patterns'; @@ -60,6 +61,7 @@ const StepDesignThemeStylesPreview = () => { updateDesignSteps, updateAllSteps, setCurrentOnboardingData, + updateThemeStatus, } = useDispatch( nfdOnboardingStore ); useEffect( () => { @@ -74,7 +76,13 @@ const StepDesignThemeStylesPreview = () => { const getStylesAndPatterns = async () => { const pattern = await getPatterns( currentStep.patternId, true ); + if ( pattern?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } const globalStyles = await getGlobalStyles(); + if ( globalStyles?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } let selectedGlobalStyle; if ( currentData.data.theme.variation ) { selectedGlobalStyle = globalStyles.body.filter( From 0b058370c94b0e1a451ee58ebd54ada0e4c71bb2 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 29 Sep 2022 16:44:05 +0530 Subject: [PATCH 07/10] PRESS2-308 add pre commerce loading state handler --- includes/RestApi/PluginsController.php | 60 ++++++++++++ .../Themes/ThemeInstallerController.php | 12 +-- .../TaskManagers/PluginInstallTaskManager.php | 5 + package-lock.json | 14 ++- .../components/StateHandlers/Design/index.js | 11 ++- .../StateHandlers/Ecommerce/index.js | 98 +++++++++++++++++++ .../components/StateHandlers/index.js | 1 + .../Steps/Ecommerce/StepAddress/index.js | 3 + .../Steps/Ecommerce/StepProducts/index.js | 3 + .../pages/Steps/Ecommerce/StepTax/index.js | 3 + src/OnboardingSPA/store/actions.js | 7 ++ src/OnboardingSPA/store/reducer.js | 9 +- src/OnboardingSPA/store/selectors.js | 4 + src/OnboardingSPA/utils/api/plugins.js | 7 ++ src/OnboardingSPA/utils/api/themes.js | 2 +- src/constants.js | 7 ++ 16 files changed, 224 insertions(+), 22 deletions(-) create mode 100644 src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js diff --git a/includes/RestApi/PluginsController.php b/includes/RestApi/PluginsController.php index a0ac35114..b066f2e17 100644 --- a/includes/RestApi/PluginsController.php +++ b/includes/RestApi/PluginsController.php @@ -65,6 +65,19 @@ public function register_routes() { ), ) ); + + \register_rest_route( + $this->namespace, + $this->rest_base . '/status', + array( + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_status' ), + 'args' => $this->get_status_args(), + // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + ), + ) + ); } /** @@ -106,6 +119,19 @@ public function get_install_plugin_args() { ); } + public function get_status_args() { + return array( + 'plugin' => array( + 'type' => 'string', + 'required' => true, + ), + 'activated' => array( + 'type' => 'boolean', + 'default' => true + ), + ); + } + /** * Verify caller has permissions to install plugins. * @@ -182,4 +208,38 @@ public function install( \WP_REST_Request $request ) { return $plugin_install_task->execute(); } + + public function get_status( \WP_REST_Request $request ) { + $plugin = $request->get_param( 'plugin' ); + $activated = $request->get_param( 'activated' ); + + if ( PluginInstaller::exists( $plugin, $activated ) ) { + return new \WP_REST_Response( + array( + 'status' => $activated ? 'activated' : 'installed' + ), + 200 + ); + } + + $position_in_queue = PluginInstallTaskManager::status( $plugin ); + + if ( $position_in_queue !== false) { + return new \WP_REST_Response( + array( + 'status' => 'installing', + 'estimate' => ( ( $position_in_queue + 1 ) * 30 ) + ), + 200 + ); + } + + return new \WP_REST_Response( + array( + 'status' => 'not_active' + ), + 200 + ); + + } } diff --git a/includes/RestApi/Themes/ThemeInstallerController.php b/includes/RestApi/Themes/ThemeInstallerController.php index 23f601e0b..3b928bd0e 100644 --- a/includes/RestApi/Themes/ThemeInstallerController.php +++ b/includes/RestApi/Themes/ThemeInstallerController.php @@ -54,12 +54,12 @@ public function register_routes() { \register_rest_route( $this->namespace, - $this->rest_base . '/install/status', + $this->rest_base . '/status', array( array( 'methods' => \WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_install_status' ), - 'args' => $this->get_install_status_args(), + 'callback' => array( $this, 'get_status' ), + 'args' => $this->get_status_args(), // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), ), ) @@ -92,7 +92,7 @@ public function get_install_theme_args() { ); } - public function get_install_status_args() { + public function get_status_args() { return array( 'theme' => array( 'type' => 'string', @@ -167,7 +167,7 @@ public static function install( \WP_REST_Request $request ) { return $theme_install_task->execute(); } - public function get_install_status( \WP_REST_Request $request ) { + public function get_status( \WP_REST_Request $request ) { $theme = $request->get_param( 'theme' ); $activated = $request->get_param( 'activated' ); @@ -186,7 +186,7 @@ public function get_install_status( \WP_REST_Request $request ) { return new \WP_REST_Response( array( 'status' => 'installing', - 'estimate' => ( ( $position_in_queue + 1 ) * 30 ) + 'estimate' => ( ( $position_in_queue + 1 ) * 10 ) ), 200 ); diff --git a/includes/TaskManagers/PluginInstallTaskManager.php b/includes/TaskManagers/PluginInstallTaskManager.php index 28e1f38ae..c5d4aee40 100644 --- a/includes/TaskManagers/PluginInstallTaskManager.php +++ b/includes/TaskManagers/PluginInstallTaskManager.php @@ -165,4 +165,9 @@ public static function add_to_queue( PluginInstallTask $plugin_install_task ) { return \update_option( Options::get_option_name( self::$queue_name ), $queue->to_array() ); } + + public static function status( $plugin ) { + $plugins = \get_option( Options::get_option_name( self::$queue_name ), array() ); + return array_search( $plugin, array_column( $plugins, 'slug' ) ); + } } diff --git a/package-lock.json b/package-lock.json index 3ceb281ff..084f23df6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3793,14 +3793,6 @@ "webpack-bundle-analyzer": "^4.4.2", "webpack-cli": "^4.9.1", "webpack-dev-server": "^4.4.0" - }, - "dependencies": { - "prettier": { - "version": "npm:wp-prettier@2.2.1-beta-1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", - "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", - "dev": true - } } }, "@wordpress/style-engine": { @@ -11523,6 +11515,12 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "npm:wp-prettier@2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true + }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", diff --git a/src/OnboardingSPA/components/StateHandlers/Design/index.js b/src/OnboardingSPA/components/StateHandlers/Design/index.js index 91effc545..02f4eb8b8 100644 --- a/src/OnboardingSPA/components/StateHandlers/Design/index.js +++ b/src/OnboardingSPA/components/StateHandlers/Design/index.js @@ -1,5 +1,6 @@ import { useSelect, useDispatch } from '@wordpress/data'; import { useEffect } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; import { StepLoader } from '../../Loaders'; import { store as nfdOnboardingStore } from '../../../store'; @@ -68,12 +69,12 @@ const DesignStateHandler = ( { children } ) => { case THEME_STATUS_NOT_ACTIVE: return ( ); @@ -82,9 +83,9 @@ const DesignStateHandler = ( { children } ) => { default: return ( ); diff --git a/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js b/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js new file mode 100644 index 000000000..efa4f7499 --- /dev/null +++ b/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js @@ -0,0 +1,98 @@ +import { useSelect, useDispatch } from '@wordpress/data'; +import { useEffect } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import { StepLoader } from '../../Loaders'; + +import { store as nfdOnboardingStore } from '../../../store'; +import { getPluginStatus } from '../../../utils/api/plugins'; +import { + PLUGIN_STATUS_INIT, + PLUGIN_STATUS_INSTALLING, + PLUGIN_STATUS_NOT_ACTIVE, + PLUGIN_STATUS_ACTIVE, + ECOMMERCE_STEPS_PLUGIN, + PLUGIN_INSTALL_WAIT_TIMEOUT, +} from '../../../../constants'; +import { getPreviewSettings } from '../../../utils/api/settings'; +import { StepErrorState } from '../../ErrorState'; + +const EcommerceStateHandler = ( { children } ) => { + const { storedPluginStatus } = useSelect( ( select ) => { + return { + storedPluginStatus: select( nfdOnboardingStore ).getPluginStatus(), + }; + }, [] ); + + const { updatePluginStatus, updatePreviewSettings } = + useDispatch( nfdOnboardingStore ); + + const checkPluginStatus = async () => { + const pluginStatus = await getPluginStatus( ECOMMERCE_STEPS_PLUGIN ); + return pluginStatus.body.status; + }; + + const loadPreviewSettings = async () => { + const previewSettings = await getPreviewSettings(); + updatePreviewSettings( previewSettings.body ); + }; + + const waitForInstall = () => { + setTimeout( async () => { + const pluginStatus = await checkPluginStatus(); + if ( pluginStatus !== PLUGIN_STATUS_ACTIVE ) { + return updatePluginStatus( PLUGIN_STATUS_NOT_ACTIVE ); + } + updatePluginStatus( pluginStatus ); + await loadPreviewSettings(); + }, PLUGIN_INSTALL_WAIT_TIMEOUT ); + }; + + useEffect( async () => { + if ( storedPluginStatus === PLUGIN_STATUS_INIT ) { + const pluginStatus = await checkPluginStatus(); + switch ( pluginStatus ) { + case PLUGIN_STATUS_INSTALLING: + waitForInstall(); + break; + case PLUGIN_STATUS_ACTIVE: + await loadPreviewSettings(); + updatePluginStatus( pluginStatus ); + break; + default: + updatePluginStatus( pluginStatus ); + } + } + }, [ storedPluginStatus ] ); + + const handleRender = () => { + switch ( storedPluginStatus ) { + case PLUGIN_STATUS_NOT_ACTIVE: + return ( + + ); + case PLUGIN_STATUS_ACTIVE: + return children; + default: + return ( + + ); + } + }; + + return <>{ handleRender() }; +}; + +export default EcommerceStateHandler; diff --git a/src/OnboardingSPA/components/StateHandlers/index.js b/src/OnboardingSPA/components/StateHandlers/index.js index b18f3eb9a..0b2110d52 100644 --- a/src/OnboardingSPA/components/StateHandlers/index.js +++ b/src/OnboardingSPA/components/StateHandlers/index.js @@ -1 +1,2 @@ export { default as DesignStateHandler } from './Design'; +export { default as EcommerceStateHandler } from './Ecommerce'; \ No newline at end of file diff --git a/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js b/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js index 4028a2e0b..d5fa5e624 100644 --- a/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js +++ b/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js @@ -12,6 +12,7 @@ import { store as nfdOnboardingStore } from '../../../../store'; import content from '../content.json'; import countries from '../countries.json'; import { useWPSettings } from '../useWPSettings'; +import { EcommerceStateHandler } from '../../../../components/StateHandlers'; const StepAddress = () => { const isLargeViewport = useViewportMatch( 'medium' ); @@ -107,6 +108,7 @@ const StepAddress = () => { }); } return ( +
@@ -243,6 +245,7 @@ const StepAddress = () => {
+
); }; diff --git a/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js b/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js index e8ec55970..c9d15bf4e 100644 --- a/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js +++ b/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js @@ -9,6 +9,7 @@ import CardHeader from '../../../../components/CardHeader'; import CommonLayout from '../../../../components/Layouts/Common'; import NeedHelpTag from '../../../../components/NeedHelpTag'; import NewfoldLargeCard from '../../../../components/NewfoldLargeCard'; +import { EcommerceStateHandler } from '../../../../components/StateHandlers'; import { store as nfdOnboardingStore } from '../../../../store'; import content from '../content.json'; @@ -58,6 +59,7 @@ const StepProducts = () => { return ( +
@@ -100,6 +102,7 @@ const StepProducts = () => {
+
); }; diff --git a/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js b/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js index 5ddeb6f26..90f6133ae 100644 --- a/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js +++ b/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js @@ -9,6 +9,7 @@ import CardHeader from '../../../../components/CardHeader'; import CommonLayout from '../../../../components/Layouts/Common'; import NeedHelpTag from '../../../../components/NeedHelpTag'; import NewfoldLargeCard from '../../../../components/NewfoldLargeCard'; +import { EcommerceStateHandler } from '../../../../components/StateHandlers'; import { store as nfdOnboardingStore } from '../../../../store'; import content from '../content.json'; import { useWPSettings } from '../useWPSettings'; @@ -74,6 +75,7 @@ const StepTax = () => { }; return ( +
@@ -121,6 +123,7 @@ const StepTax = () => {
+
); }; diff --git a/src/OnboardingSPA/store/actions.js b/src/OnboardingSPA/store/actions.js index 6201816f5..838e2859c 100644 --- a/src/OnboardingSPA/store/actions.js +++ b/src/OnboardingSPA/store/actions.js @@ -125,6 +125,13 @@ export function updateThemeStatus( themeStatus ) { } } +export function updatePluginStatus( pluginStatus ) { + return { + type: 'UPDATE_PLUGIN_STATUS', + pluginStatus + } +} + export function setIsSidebarOpened( isOpen ) { return { type: 'SET_SIDEBAR_OPENED', diff --git a/src/OnboardingSPA/store/reducer.js b/src/OnboardingSPA/store/reducer.js index 3ed3c6ccf..2a68f6627 100644 --- a/src/OnboardingSPA/store/reducer.js +++ b/src/OnboardingSPA/store/reducer.js @@ -1,6 +1,6 @@ import { combineReducers } from '@wordpress/data'; -import { VIEW_NAV_PRIMARY } from '../../constants'; +import { VIEW_NAV_PRIMARY, THEME_STATUS_INIT, PLUGIN_STATUS_INIT } from '../../constants'; import { routes as initialRoutes, @@ -148,7 +148,7 @@ export function runtime( state = {}, action ) { return state; } -export function settings( state = { themeStatus: 'init' }, action ) { +export function settings( state = { themeStatus: THEME_STATUS_INIT, pluginStatus: PLUGIN_STATUS_INIT }, action ) { switch ( action.type ) { case 'UPDATE_SETTINGS': return { @@ -160,6 +160,11 @@ export function settings( state = { themeStatus: 'init' }, action ) { ...state, themeStatus: action.themeStatus }; + case 'UPDATE_PLUGIN_STATUS': + return { + ...state, + pluginStatus: action.pluginStatus + }; } return state; diff --git a/src/OnboardingSPA/store/selectors.js b/src/OnboardingSPA/store/selectors.js index 7665d9542..10cc8853f 100644 --- a/src/OnboardingSPA/store/selectors.js +++ b/src/OnboardingSPA/store/selectors.js @@ -237,6 +237,10 @@ export function getThemeStatus ( state ) { return state.settings.themeStatus; } +export function getPluginStatus ( state ) { + return state.settings.pluginStatus; +} + export function getStoreInfoSteps( state ) { return state.flow.steps.storeInfoSteps; } diff --git a/src/OnboardingSPA/utils/api/plugins.js b/src/OnboardingSPA/utils/api/plugins.js index 398d01125..8785b5885 100644 --- a/src/OnboardingSPA/utils/api/plugins.js +++ b/src/OnboardingSPA/utils/api/plugins.js @@ -2,6 +2,7 @@ import apiFetch from '@wordpress/api-fetch'; import { onboardingRestURL } from './common'; import { getQueryParam } from '../index'; +import { resolve } from './resolve'; import { NFD_PLUGINS_QUERY_PARAM } from '../../../constants'; export const init = () => { @@ -19,3 +20,9 @@ export const init = () => { console.error( error ); } ); }; + +export const getPluginStatus = async ( plugin ) => { + return await resolve( + apiFetch( { url: onboardingRestURL( 'plugins/status' + ( plugin ? `&plugin=${plugin}` : '' ) ) } ) + ) +} diff --git a/src/OnboardingSPA/utils/api/themes.js b/src/OnboardingSPA/utils/api/themes.js index 37bf6c329..d20daa337 100644 --- a/src/OnboardingSPA/utils/api/themes.js +++ b/src/OnboardingSPA/utils/api/themes.js @@ -26,7 +26,7 @@ const getGlobalStyles = async () => { const getThemeStatus = async ( theme ) => { return await resolve( - apiFetch( { url: onboardingRestURL( 'themes/install/status' + ( theme ? `&theme=${theme}` : '' ) ) } ) + apiFetch( { url: onboardingRestURL( 'themes/status' + ( theme ? `&theme=${theme}` : '' ) ) } ) ) } diff --git a/src/constants.js b/src/constants.js index 7427f96bb..32e207148 100644 --- a/src/constants.js +++ b/src/constants.js @@ -37,6 +37,13 @@ export const THEME_STATUS_INSTALLING = 'installing'; export const THEME_STATUS_ACTIVE = 'activated'; export const THEME_INSTALL_WAIT_TIMEOUT = 30000 +export const ECOMMERCE_STEPS_PLUGIN = 'woocommerce' +export const PLUGIN_STATUS_INIT = 'init'; +export const PLUGIN_STATUS_NOT_ACTIVE = 'not_active'; +export const PLUGIN_STATUS_INSTALLING = 'installing'; +export const PLUGIN_STATUS_ACTIVE = 'activated'; +export const PLUGIN_INSTALL_WAIT_TIMEOUT = 30000 + /** * All views for the component. */ From a98e62af365412baa620eeb286a76d77fb5d3be7 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 29 Sep 2022 19:45:16 +0530 Subject: [PATCH 08/10] PRESS2-299 refactor code --- build/0.2.1/onboarding.asset.php | 1 + ...teps_DesignThemeStyles_Preview_index_js.js | 873 ++++++++++++++++++ ..._DesignThemeStyles_Preview_index_js.js.map | 1 + includes/RestApi/PluginsController.php | 100 +- includes/RestApi/SettingsController.php | 401 +------- .../Themes/ThemeInstallerController.php | 108 ++- includes/Services/Webfonts.php | 364 ++++++++ .../TaskManagers/PluginInstallTaskManager.php | 8 +- .../TaskManagers/ThemeInstallTaskManager.php | 8 +- .../DrawerPanel/DesignThemeStylesPreview.js | 22 +- .../components/StateHandlers/Design/index.js | 44 +- .../StateHandlers/Ecommerce/index.js | 81 +- .../components/StateHandlers/index.js | 2 +- .../Steps/DesignThemeStyles/Menu/index.js | 16 +- .../Steps/DesignThemeStyles/Preview/index.js | 24 +- src/OnboardingSPA/store/actions.js | 18 +- src/OnboardingSPA/store/reducer.js | 35 +- src/OnboardingSPA/store/selectors.js | 4 +- src/OnboardingSPA/styles/_branding.scss | 11 +- src/OnboardingSPA/utils/api/plugins.js | 12 +- src/OnboardingSPA/utils/api/settings.js | 2 +- src/OnboardingSPA/utils/api/themes.js | 12 +- src/constants.js | 5 +- 23 files changed, 1557 insertions(+), 595 deletions(-) create mode 100644 build/0.2.1/onboarding.asset.php create mode 100644 build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js create mode 100644 build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map create mode 100644 includes/Services/Webfonts.php diff --git a/build/0.2.1/onboarding.asset.php b/build/0.2.1/onboarding.asset.php new file mode 100644 index 000000000..b14bfe930 --- /dev/null +++ b/build/0.2.1/onboarding.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'e279bcffcf4c0c9af1b7565710e66060'); \ No newline at end of file diff --git a/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js b/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js new file mode 100644 index 000000000..7e1a63adf --- /dev/null +++ b/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js @@ -0,0 +1,873 @@ +"use strict"; +(self["webpackChunknewfold_Onboarding"] = self["webpackChunknewfold_Onboarding"] || []).push([["src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js"],{ + +/***/ "./src/OnboardingSPA/components/ErrorState/Step/index.js": +/*!***************************************************************!*\ + !*** ./src/OnboardingSPA/components/ErrorState/Step/index.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Layouts_Common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Layouts/Common */ "./src/OnboardingSPA/components/Layouts/Common.js"); +/* harmony import */ var _HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../HeadingWithSubHeading */ "./src/OnboardingSPA/components/HeadingWithSubHeading/index.js"); +/* harmony import */ var _NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../NeedHelpTag */ "./src/OnboardingSPA/components/NeedHelpTag/index.js"); + + + + + +const StepErrorState = _ref => { + let { + title, + subtitle, + error + } = _ref; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Layouts_Common__WEBPACK_IMPORTED_MODULE_1__["default"], { + className: "step-error-state", + isVerticallyCentered: true + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__["default"], { + title: title, + subtitle: subtitle + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "step-error-state__logo" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", { + className: "step-error-state__error" + }, error), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__["default"], null)); +}; + +/* harmony default export */ __webpack_exports__["default"] = (StepErrorState); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/ErrorState/index.js": +/*!**********************************************************!*\ + !*** ./src/OnboardingSPA/components/ErrorState/index.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "StepErrorState": function() { return /* reexport safe */ _Step__WEBPACK_IMPORTED_MODULE_0__["default"]; } +/* harmony export */ }); +/* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Step */ "./src/OnboardingSPA/components/ErrorState/Step/index.js"); + + +/***/ }), + +/***/ "./src/OnboardingSPA/components/HeadingWithSubHeading/index.js": +/*!*********************************************************************!*\ + !*** ./src/OnboardingSPA/components/HeadingWithSubHeading/index.js ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * Interface Cards with standard design. + * + * @returns + */ + +const HeadingWithSubHeading = _ref => { + let { + title, + subtitle + } = _ref; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "nfd-main-heading" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", { + className: "nfd-main-heading__title" + }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)(title, "wp-module-onboarding")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", { + className: "nfd-main-heading__subtitle" + }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)(subtitle, "wp-module-onboarding"))); +}; + +/* harmony default export */ __webpack_exports__["default"] = (HeadingWithSubHeading); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/Layouts/Base.js": +/*!******************************************************!*\ + !*** ./src/OnboardingSPA/components/Layouts/Base.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/a11y */ "@wordpress/a11y"); +/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants */ "./src/constants.js"); +/* harmony import */ var _utils_api_events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/api/events */ "./src/OnboardingSPA/utils/api/events.js"); + + + + + + + +/** + * The Base Layout has no prescribed styles, only shared functionality like focus-management and analytics. + * + * @param {object} props + * @returns + */ + +const BaseLayout = _ref => { + let { + className = 'nfd-onboarding-layout__base', + children + } = _ref; + const location = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_5__.useLocation)(); + const mainContainer = document.querySelector('.nfd-onboard-content'); + + const speakRouteTitle = function (location) { + let title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Showing new Onboarding Page'; + // [TODO]: Determine if some routes should not speak the title + (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__.speak)(title, 'assertive'); + }; + + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + mainContainer === null || mainContainer === void 0 ? void 0 : mainContainer.focus({ + preventScroll: true + }); + speakRouteTitle(location, 'Override'); + new _utils_api_events__WEBPACK_IMPORTED_MODULE_4__["default"](`${_constants__WEBPACK_IMPORTED_MODULE_3__.NFD_ONBOARDING_EVENT_PREFIX}-pageview`, { + stepID: location.pathname, + previousStepID: window.nfdOnboarding.previousStepID + }).send(); + window.nfdOnboarding.previousStepID = location.pathname; + }, [location.pathname]); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('nfd-onboarding-layout', className) + }, children); +}; + +/* harmony default export */ __webpack_exports__["default"] = (BaseLayout); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/Layouts/Common.js": +/*!********************************************************!*\ + !*** ./src/OnboardingSPA/components/Layouts/Common.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Base */ "./src/OnboardingSPA/components/Layouts/Base.js"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); + + + + + +/** + * + * @param {*} param0 + * @returns + */ + +const InnerContainer = _ref => { + let { + children + } = _ref; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { + className: "is-contained" + }, children); +}; +/** + * The Common Layout extends the Base Layout and applies structural styles and animations. + * + * @param {object} props + * @returns + */ + + +const CommonLayout = _ref2 => { + let { + className = '', + children, + isBgPrimary = false, + isCentered = false, + isVerticallyCentered = false, + isContained = false, + isPadded = false, + isFadeIn = true + } = _ref2; + const Container = isContained ? InnerContainer : _wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Base__WEBPACK_IMPORTED_MODULE_2__["default"], { + className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('nfd-onboarding-layout__common', className, { + 'is-layout-fade-in': isFadeIn + }, { + 'is-bg-primary': isBgPrimary + }, { + 'is-centered': isCentered + }, { + 'is-vertically-centered': isVerticallyCentered + }, { + 'is-padded': isPadded + }) + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Container, null, children)); +}; + +/* harmony default export */ __webpack_exports__["default"] = (CommonLayout); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/Loaders/ImageUpload/index.js": +/*!*******************************************************************!*\ + !*** ./src/OnboardingSPA/components/Loaders/ImageUpload/index.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); + + +const ImageUploadLoader = () => { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "image-upload-loader--loading-box" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "image-upload-loader--loading-box__loader" + })); +}; + +/* harmony default export */ __webpack_exports__["default"] = (ImageUploadLoader); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/Loaders/Step/index.js": +/*!************************************************************!*\ + !*** ./src/OnboardingSPA/components/Loaders/Step/index.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Layouts_Common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Layouts/Common */ "./src/OnboardingSPA/components/Layouts/Common.js"); +/* harmony import */ var _HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../HeadingWithSubHeading */ "./src/OnboardingSPA/components/HeadingWithSubHeading/index.js"); +/* harmony import */ var _NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../NeedHelpTag */ "./src/OnboardingSPA/components/NeedHelpTag/index.js"); + + + + + +const StepLoader = _ref => { + let { + title, + subtitle + } = _ref; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Layouts_Common__WEBPACK_IMPORTED_MODULE_1__["default"], { + className: "step-loader", + isVerticallyCentered: true + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__["default"], { + title: title, + subtitle: subtitle + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "step-loader__logo-container" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "step-loader__logo" + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__["default"], null)); +}; + +/* harmony default export */ __webpack_exports__["default"] = (StepLoader); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/Loaders/index.js": +/*!*******************************************************!*\ + !*** ./src/OnboardingSPA/components/Loaders/index.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "ImageUploadLoader": function() { return /* reexport safe */ _ImageUpload__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ "StepLoader": function() { return /* reexport safe */ _Step__WEBPACK_IMPORTED_MODULE_0__["default"]; } +/* harmony export */ }); +/* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Step */ "./src/OnboardingSPA/components/Loaders/Step/index.js"); +/* harmony import */ var _ImageUpload__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ImageUpload */ "./src/OnboardingSPA/components/Loaders/ImageUpload/index.js"); + + + +/***/ }), + +/***/ "./src/OnboardingSPA/components/NeedHelpTag/index.js": +/*!***********************************************************!*\ + !*** ./src/OnboardingSPA/components/NeedHelpTag/index.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../store */ "./src/OnboardingSPA/store/index.js"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); + + + + +/** + * Need Help Label and URL rendering component for most of the onboarding steps + * Pass any Label and URL redirect which we want as is to display on the UI + * + * @param content + * @return NeedHelpTag + */ + +const NeedHelpTag = _ref => { + let { + question = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Need Help?', 'wp-module-onboarding'), + urlLabel = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Hire our Experts', 'wp-module-onboarding') + } = _ref; + const hireExpertsUrl = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)(_store__WEBPACK_IMPORTED_MODULE_1__.store).getHireExpertsUrl(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "nfd-card-need-help-tag" + }, question, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { + href: hireExpertsUrl, + target: '_blank' + }, urlLabel)); +}; + +/* harmony default export */ __webpack_exports__["default"] = (NeedHelpTag); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/StateHandlers/Design/index.js": +/*!********************************************************************!*\ + !*** ./src/OnboardingSPA/components/StateHandlers/Design/index.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Loaders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Loaders */ "./src/OnboardingSPA/components/Loaders/index.js"); +/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../store */ "./src/OnboardingSPA/store/index.js"); +/* harmony import */ var _utils_api_themes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/api/themes */ "./src/OnboardingSPA/utils/api/themes.js"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../constants */ "./src/constants.js"); +/* harmony import */ var _utils_api_settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/api/settings */ "./src/OnboardingSPA/utils/api/settings.js"); +/* harmony import */ var _ErrorState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ErrorState */ "./src/OnboardingSPA/components/ErrorState/index.js"); + + + + + + + + + + + +const DesignStateHandler = _ref => { + let { + children + } = _ref; + const { + storedThemeStatus + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { + return { + storedThemeStatus: select(_store__WEBPACK_IMPORTED_MODULE_4__.store).getThemeStatus() + }; + }, []); + const { + updateThemeStatus, + updatePreviewSettings + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_4__.store); + + const checkThemeStatus = async () => { + const themeStatus = await (0,_utils_api_themes__WEBPACK_IMPORTED_MODULE_5__.getThemeStatus)(_constants__WEBPACK_IMPORTED_MODULE_6__.DESIGN_STEPS_THEME); + + if (themeStatus !== null && themeStatus !== void 0 && themeStatus.error) { + return _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_NOT_ACTIVE; + } + + return themeStatus.body.status; + }; + + const loadPreviewSettings = async () => { + const previewSettings = await (0,_utils_api_settings__WEBPACK_IMPORTED_MODULE_7__.getPreviewSettings)(); + + if (previewSettings !== null && previewSettings !== void 0 && previewSettings.body) { + updatePreviewSettings(previewSettings.body); + } + }; + + const waitForInstall = () => { + setTimeout(async () => { + const themeStatus = await checkThemeStatus(); + + if (themeStatus !== _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_ACTIVE) { + return updateThemeStatus(_constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_NOT_ACTIVE); + } + + updateThemeStatus(themeStatus); + await loadPreviewSettings(); + }, _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_INSTALL_WAIT_TIMEOUT); + }; + + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(async () => { + if (storedThemeStatus === _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_INIT) { + const themeStatus = await checkThemeStatus(); + + switch (themeStatus) { + case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_INSTALLING: + waitForInstall(); + break; + + case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_ACTIVE: + await loadPreviewSettings(); + updateThemeStatus(themeStatus); + break; + + default: + updateThemeStatus(themeStatus); + } + } + }, [storedThemeStatus]); + + const handleRender = () => { + switch (storedThemeStatus) { + case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_NOT_ACTIVE: + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ErrorState__WEBPACK_IMPORTED_MODULE_8__.StepErrorState, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preparing your Bluehost design studio', 'wp-module-onboarding'), + subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Hang tight while we show you some of the best WordPress has to offer!', 'wp-module-onboarding'), + error: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Uh-oh, something went wrong. Please contact support.', 'wp-module-onboarding') + }); + + case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_ACTIVE: + return children; + + default: + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Loaders__WEBPACK_IMPORTED_MODULE_3__.StepLoader, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preparing your Bluehost design studio', 'wp-module-onboarding'), + subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Hang tight while we show you some of the best WordPress has to offer!', 'wp-module-onboarding') + }); + } + }; + + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, handleRender()); +}; + +/* harmony default export */ __webpack_exports__["default"] = (DesignStateHandler); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js": +/*!***********************************************************************!*\ + !*** ./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Loaders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Loaders */ "./src/OnboardingSPA/components/Loaders/index.js"); +/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../store */ "./src/OnboardingSPA/store/index.js"); +/* harmony import */ var _utils_api_plugins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/api/plugins */ "./src/OnboardingSPA/utils/api/plugins.js"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../constants */ "./src/constants.js"); +/* harmony import */ var _utils_api_settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/api/settings */ "./src/OnboardingSPA/utils/api/settings.js"); +/* harmony import */ var _ErrorState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ErrorState */ "./src/OnboardingSPA/components/ErrorState/index.js"); + + + + + + + + + + + +const EcommerceStateHandler = _ref => { + let { + children + } = _ref; + const [woocommerceStatus, setWoocommerceStatus] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(_constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_INSTALLING); + const { + storedPluginsStatus + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { + return { + storedPluginsStatus: select(_store__WEBPACK_IMPORTED_MODULE_4__.store).getPluginsStatus() + }; + }, []); + const { + updatePluginsStatus, + updatePreviewSettings + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_4__.store); + + const checkPluginStatus = async () => { + const pluginStatus = await (0,_utils_api_plugins__WEBPACK_IMPORTED_MODULE_5__.getPluginStatus)(_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN); + + if (pluginStatus !== null && pluginStatus !== void 0 && pluginStatus.error) { + return _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE; + } + + return pluginStatus.body.status; + }; + + const loadPreviewSettings = async () => { + const previewSettings = await (0,_utils_api_settings__WEBPACK_IMPORTED_MODULE_7__.getPreviewSettings)(); + + if (previewSettings !== null && previewSettings !== void 0 && previewSettings.body) { + updatePreviewSettings(previewSettings.body); + } + }; + + const waitForInstall = () => { + setTimeout(async () => { + const pluginStatus = await checkPluginStatus(); + + if (pluginStatus !== _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_ACTIVE) { + storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE; + setWoocommerceStatus(_constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE); + return updatePluginsStatus(storedPluginsStatus); + } + + storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = pluginStatus; + setWoocommerceStatus(pluginStatus); + updatePluginsStatus(storedPluginsStatus); + await loadPreviewSettings(); + }, _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_INSTALL_WAIT_TIMEOUT); + }; + + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(async () => { + setWoocommerceStatus(storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN]); + + if (storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] === _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_INIT) { + const pluginStatus = await checkPluginStatus(); + + switch (pluginStatus) { + case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_INSTALLING: + waitForInstall(); + break; + + case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_ACTIVE: + await loadPreviewSettings(); + storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = pluginStatus; + setWoocommerceStatus(pluginStatus); + updatePluginsStatus(storedPluginsStatus); + break; + + default: + storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = pluginStatus; + setWoocommerceStatus(pluginStatus); + updatePluginsStatus(storedPluginsStatus); + } + } + }, [storedPluginsStatus]); + + const handleRender = () => { + switch (woocommerceStatus) { + case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE: + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ErrorState__WEBPACK_IMPORTED_MODULE_8__.StepErrorState, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Making the keys to your Bluehost Online Store', 'wp-module-onboarding'), + subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('We’re installing WooCommerce for you to fill with your amazing products & services!', 'wp-module-onboarding'), + error: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Uh-oh, something went wrong. Please contact support.', 'wp-module-onboarding') + }); + + case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_ACTIVE: + return children; + + default: + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Loaders__WEBPACK_IMPORTED_MODULE_3__.StepLoader, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Making the keys to your Bluehost Online Store', 'wp-module-onboarding'), + subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('We’re installing WooCommerce for you to fill with your amazing products & services!', 'wp-module-onboarding') + }); + } + }; + + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, handleRender()); +}; + +/* harmony default export */ __webpack_exports__["default"] = (EcommerceStateHandler); + +/***/ }), + +/***/ "./src/OnboardingSPA/components/StateHandlers/index.js": +/*!*************************************************************!*\ + !*** ./src/OnboardingSPA/components/StateHandlers/index.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DesignStateHandler": function() { return /* reexport safe */ _Design__WEBPACK_IMPORTED_MODULE_0__["default"]; }, +/* harmony export */ "EcommerceStateHandler": function() { return /* reexport safe */ _Ecommerce__WEBPACK_IMPORTED_MODULE_1__["default"]; } +/* harmony export */ }); +/* harmony import */ var _Design__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Design */ "./src/OnboardingSPA/components/StateHandlers/Design/index.js"); +/* harmony import */ var _Ecommerce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Ecommerce */ "./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js"); + + + +/***/ }), + +/***/ "./src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js": +/*!**************************************************************************!*\ + !*** ./src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js ***! + \**************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ "lodash"); +/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _components_LivePreview__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../components/LivePreview */ "./src/OnboardingSPA/components/LivePreview/index.js"); +/* harmony import */ var _components_Layouts_Common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../components/Layouts/Common */ "./src/OnboardingSPA/components/Layouts/Common.js"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../constants */ "./src/constants.js"); +/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../store */ "./src/OnboardingSPA/store/index.js"); +/* harmony import */ var _utils_api_patterns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../utils/api/patterns */ "./src/OnboardingSPA/utils/api/patterns.js"); +/* harmony import */ var _utils_api_themes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../utils/api/themes */ "./src/OnboardingSPA/utils/api/themes.js"); +/* harmony import */ var _utils_global_styles_use_global_styles_output__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../utils/global-styles/use-global-styles-output */ "./src/OnboardingSPA/utils/global-styles/use-global-styles-output.js"); +/* harmony import */ var _data_routes___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../data/routes/ */ "./src/OnboardingSPA/data/routes/index.js"); +/* harmony import */ var _components_StateHandlers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../components/StateHandlers */ "./src/OnboardingSPA/components/StateHandlers/index.js"); + + + + + + + + + + + + + + + + + + +const StepDesignThemeStylesPreview = () => { + const location = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_15__.useLocation)(); + const [isLoaded, setIsLoaded] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const [pattern, setPattern] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(); + const [customize, setCustomize] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const isLargeViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__.useViewportMatch)('medium'); + const { + currentStep, + currentData, + storedPreviewSettings, + routes, + designSteps, + allSteps, + themeStatus + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { + return { + currentStep: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getStepFromPath(location.pathname), + currentData: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getCurrentOnboardingData(), + storedPreviewSettings: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getPreviewSettings(), + routes: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getRoutes(), + allSteps: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getAllSteps(), + designSteps: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getDesignSteps(), + themeStatus: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getThemeStatus() + }; + }, []); + const { + setDrawerActiveView, + setIsDrawerOpened, + setIsSidebarOpened, + setIsDrawerSuppressed, + updatePreviewSettings, + updateRoutes, + updateDesignSteps, + updateAllSteps, + setCurrentOnboardingData, + updateThemeStatus + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_9__.store); + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + if (isLargeViewport) { + setIsDrawerOpened(true); + } + + setIsSidebarOpened(false); + setIsDrawerSuppressed(false); + setDrawerActiveView(_constants__WEBPACK_IMPORTED_MODULE_8__.VIEW_DESIGN_THEME_STYLES_PREVIEW); + handleCheckbox(currentData.data.customDesign, false); + }, []); + + const getStylesAndPatterns = async () => { + const patternsResponse = await (0,_utils_api_patterns__WEBPACK_IMPORTED_MODULE_10__.getPatterns)(currentStep.patternId, true); + + if (patternsResponse !== null && patternsResponse !== void 0 && patternsResponse.error) { + return updateThemeStatus(_constants__WEBPACK_IMPORTED_MODULE_8__.THEME_STATUS_NOT_ACTIVE); + } + + const globalStylesResponse = await (0,_utils_api_themes__WEBPACK_IMPORTED_MODULE_11__.getGlobalStyles)(); + + if (globalStylesResponse !== null && globalStylesResponse !== void 0 && globalStylesResponse.error) { + return updateThemeStatus(_constants__WEBPACK_IMPORTED_MODULE_8__.THEME_STATUS_NOT_ACTIVE); + } + + let selectedGlobalStyle; + + if (currentData.data.theme.variation) { + selectedGlobalStyle = globalStylesResponse.body.filter(globalStyle => globalStyle.title === currentData.data.theme.variation)[0]; + } else { + selectedGlobalStyle = globalStylesResponse.body[0]; + } + + updatePreviewSettings((0,_utils_global_styles_use_global_styles_output__WEBPACK_IMPORTED_MODULE_12__.useGlobalStylesOutput)(selectedGlobalStyle, storedPreviewSettings)); + setPattern(patternsResponse === null || patternsResponse === void 0 ? void 0 : patternsResponse.body); + setIsLoaded(true); + }; + + const addColorAndTypographyRoutes = () => { + const updates = removeColorAndTypographyRoutes(); + const steps = [_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors, _data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography]; + return { + routes: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.orderBy)(updates.routes.concat(steps), ['priority'], ['asc']), + allSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.orderBy)(updates.allSteps.concat(steps), ['priority'], ['asc']), + designSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.orderBy)(updates.designSteps.concat(steps), ['priority'], ['asc']) + }; + }; + + const removeColorAndTypographyRoutes = () => { + return { + routes: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.filter)(routes, route => !route.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors.path) && !route.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography.path)), + allSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.filter)(allSteps, allStep => !allStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors.path) && !allStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography.path)), + designSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.filter)(designSteps, designStep => !designStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors.path) && !designStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography.path)) + }; + }; + + const handleCheckbox = function (customize) { + let updateOnboardingData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + let updates; + + if (customize) { + updates = addColorAndTypographyRoutes(); + } else { + updates = removeColorAndTypographyRoutes(); + } + + updateRoutes(updates.routes); + updateDesignSteps(updates.designSteps); + updateAllSteps(updates.allSteps); + setCustomize(customize); + + if (updateOnboardingData) { + currentData.data.customDesign = customize; + setCurrentOnboardingData(currentData); + } + }; + + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + if (!isLoaded && themeStatus === _constants__WEBPACK_IMPORTED_MODULE_8__.THEME_STATUS_ACTIVE) getStylesAndPatterns(); + }, [isLoaded, themeStatus]); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_StateHandlers__WEBPACK_IMPORTED_MODULE_14__.DesignStateHandler, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Layouts_Common__WEBPACK_IMPORTED_MODULE_7__["default"], { + className: "theme-styles-preview" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "theme-styles-preview__checkbox" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, { + label: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "theme-styles-preview__checkbox__label" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "theme-styles-preview__checkbox__label__question" + }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Customize Colors & Fonts?', 'wp-module-onboarding'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "theme-styles-preview__checkbox__label__hint" + }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Check to customize in the next few steps (or leave empty and use the Site Editor later)', 'wp-module-onboarding')))), + checked: customize, + onChange: () => handleCheckbox(!customize) + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "theme-styles-preview__title-bar" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "theme-styles-preview__title-bar__browser" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "theme-styles-preview__title-bar__browser__dot" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "theme-styles-preview__title-bar__browser__dot" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "theme-styles-preview__title-bar__browser__dot" + }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "theme-styles-preview__live-preview-container" + }, pattern && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_LivePreview__WEBPACK_IMPORTED_MODULE_6__.LivePreview, { + blockGrammer: pattern, + styling: 'custom', + viewportWidth: 1300 + })))); +}; + +/* harmony default export */ __webpack_exports__["default"] = (StepDesignThemeStylesPreview); + +/***/ }), + +/***/ "./src/OnboardingSPA/utils/api/events.js": +/*!***********************************************!*\ + !*** ./src/OnboardingSPA/utils/api/events.js ***! + \***********************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); +/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common */ "./src/OnboardingSPA/utils/api/common.js"); + + + +class Event { + constructor(eventSlug) { + let eventData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + this.eventSlug = eventSlug; + this.eventData = eventData; + } + + send() { + _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ + url: (0,_common__WEBPACK_IMPORTED_MODULE_1__.onboardingRestURL)('events'), + method: 'POST', + data: { + slug: this.eventSlug, + data: this.eventData + } + }).catch(error => { + console.error(error); + }); + } + +} + +/* harmony default export */ __webpack_exports__["default"] = (Event); + +/***/ }) + +}]); +//# sourceMappingURL=src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map \ No newline at end of file diff --git a/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map b/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map new file mode 100644 index 000000000..95c4fa35b --- /dev/null +++ b/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map @@ -0,0 +1 @@ +{"version":3,"file":"src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;;AAEA,MAAMG,cAAc,GAAG,QAAkC;AAAA,MAAhC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAT;AAAmBC,IAAAA;AAAnB,GAAgC;AACxD,SACC,kEAAC,uDAAD;AAAc,aAAS,EAAC,kBAAxB;AAA2C,wBAAoB;AAA/D,KACC,kEAAC,8DAAD;AAAuB,SAAK,EAAGF,KAA/B;AAAuC,YAAQ,EAAGC;AAAlD,IADD,EAEC;AAAK,aAAS,EAAC;AAAf,IAFD,EAGC;AAAI,aAAS,EAAC;AAAd,KAA0CC,KAA1C,CAHD,EAIC,kEAAC,oDAAD,OAJD,CADD;AAQA,CATD;;AAWA,+DAAeH,cAAf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfA;AAEA;AACA;AACA;AACA;AACA;;AACA,MAAMF,qBAAqB,GAAG,QAAyB;AAAA,MAAxB;AAAEG,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAwB;AAEtD,SACC;AAAK,aAAS,EAAC;AAAf,KACC;AAAI,aAAS,EAAC;AAAd,KAAyCE,mDAAE,CAC1CH,KAD0C,EAE1C,sBAF0C,CAA3C,CADD,EAKC;AAAI,aAAS,EAAC;AAAd,KAA4CG,mDAAE,CAC7CF,QAD6C,EAE7C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iBC,WAAO,EAAGiG,SAjBX;AAkBC,YAAQ,EAAG,MAAMsB,cAAc,CAAE,CAAEtB,SAAJ;AAlBhC,IADD,CADD,EAuBC;AAAK,aAAS,EAAC;AAAf,KACC;AAAK,aAAS,EAAC;AAAf,KACC;AAAM,aAAS,EAAC;AAAhB,IADD,EAEC;AAAM,aAAS,EAAC;AAAhB,IAFD,EAGC;AAAM,aAAS,EAAC;AAAhB,IAHD,CADD,CAvBD,EA8BC;AAAK,aAAS,EAAC;AAAf,KACGF,OAAO,IACR,kEAAC,gEAAD;AACC,gBAAY,EAAGA,OADhB;AAEC,WAAO,EAAG,QAFX;AAGC,iBAAa,EAAG;AAHjB,IAFF,CA9BD,CADD,CADD;AA4CA,CAnND;;AAqNA,+DAAeH,4BAAf;;;;;;;;;;;;;;AC3OA;AAEA;;AAEA,MAAMtF,KAAN,CAAY;AACX2I,EAAAA,WAAW,CAAEC,SAAF,EAA8B;AAAA,QAAjBC,SAAiB,uEAAL,EAAK;AACxC,SAAKD,SAAL,GAAiBA,SAAjB;AACA,SAAKC,SAAL,GAAiBA,SAAjB;AACA;;AAED7H,EAAAA,IAAI,GAAG;AACNyH,IAAAA,2DAAQ,CAAE;AACTK,MAAAA,GAAG,EAAEJ,0DAAiB,CAAE,QAAF,CADb;AAETK,MAAAA,MAAM,EAAE,MAFC;AAGT7B,MAAAA,IAAI,EAAE;AACL8B,QAAAA,IAAI,EAAE,KAAKJ,SADN;AAEL1B,QAAAA,IAAI,EAAE,KAAK2B;AAFN;AAHG,KAAF,CAAR,CAOII,KAPJ,CAOaxJ,KAAF,IAAa;AACvByJ,MAAAA,OAAO,CAACzJ,KAAR,CAAeA,KAAf;AACA,KATD;AAUA;;AAjBU;;AAoBZ,+DAAeO,KAAf","sources":["webpack://newfold.Onboarding/./src/OnboardingSPA/components/ErrorState/Step/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/HeadingWithSubHeading/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Layouts/Base.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Layouts/Common.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Loaders/ImageUpload/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Loaders/Step/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Loaders/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/NeedHelpTag/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/StateHandlers/Design/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/StateHandlers/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/utils/api/events.js"],"sourcesContent":["import CommonLayout from '../../Layouts/Common';\nimport HeadingWithSubHeading from '../../HeadingWithSubHeading';\nimport NeedHelpTag from '../../NeedHelpTag';\n\nconst StepErrorState = ( { title, subtitle, error } ) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t
\n\t\t\t

{ error }

\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default StepErrorState;\n","import { __ } from '@wordpress/i18n';\n\n/**\n * Interface Cards with standard design.\n *\n * @returns\n */\nconst HeadingWithSubHeading = ({ title, subtitle }) => {\n\n\treturn (\n\t\t
\n\t\t\t

{__(\n\t\t\t\ttitle,\n\t\t\t\t\"wp-module-onboarding\"\n\t\t\t)}

\n\t\t\t

{__(\n\t\t\t\tsubtitle,\n\t\t\t\t\"wp-module-onboarding\"\n\t\t\t)}

\n\t\t
\n\t);\n};\n\nexport default HeadingWithSubHeading;\n","import classNames from 'classnames';\nimport { speak } from '@wordpress/a11y';\nimport { useEffect } from '@wordpress/element';\nimport { useLocation } from 'react-router-dom';\n\nimport { NFD_ONBOARDING_EVENT_PREFIX } from '../../../constants';\nimport Event from '../../utils/api/events';\n\n/**\n * The Base Layout has no prescribed styles, only shared functionality like focus-management and analytics.\n *\n * @param {object} props\n * @returns\n */\nconst BaseLayout = ({\n\tclassName = 'nfd-onboarding-layout__base',\n\tchildren,\n}) => {\n\tconst location = useLocation();\n\tconst mainContainer = document.querySelector('.nfd-onboard-content');\n\n\tconst speakRouteTitle = (\n\t\tlocation,\n\t\ttitle = 'Showing new Onboarding Page'\n\t) => {\n\t\t// [TODO]: Determine if some routes should not speak the title\n\t\tspeak(title, 'assertive');\n\t};\n\n\tuseEffect(() => {\n\t\tmainContainer?.focus({ preventScroll: true });\n\t\tspeakRouteTitle(location, 'Override');\n new Event(`${NFD_ONBOARDING_EVENT_PREFIX}-pageview`, {\n stepID: location.pathname,\n previousStepID: window.nfdOnboarding.previousStepID\n }).send();\n window.nfdOnboarding.previousStepID = location.pathname\n\t}, [location.pathname]);\n\n\treturn (\n\t\t
\n\t\t\t{children}\n\t\t
\n\t);\n};\n\nexport default BaseLayout;\n","import { Animate } from '@wordpress/components';\nimport BaseLayout from './Base';\nimport { Fragment } from '@wordpress/element';\nimport classNames from 'classnames';\n\n/**\n *\n * @param {*} param0\n * @returns\n */\nconst InnerContainer = ({ children }) => {\n\treturn
{children}
;\n};\n\n/**\n * The Common Layout extends the Base Layout and applies structural styles and animations.\n *\n * @param {object} props\n * @returns\n */\nconst CommonLayout = ({\n\tclassName = '',\n\tchildren,\n\tisBgPrimary = false,\n\tisCentered = false,\n\tisVerticallyCentered = false,\n\tisContained = false,\n\tisPadded = false,\n\tisFadeIn = true,\n}) => {\n\tconst Container = isContained ? InnerContainer : Fragment;\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n\nexport default CommonLayout;\n","const ImageUploadLoader = () => {\n\treturn (\n\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default ImageUploadLoader;\n","import CommonLayout from '../../Layouts/Common';\nimport HeadingWithSubHeading from '../../HeadingWithSubHeading';\nimport NeedHelpTag from '../../NeedHelpTag';\n\nconst StepLoader = ( { title, subtitle } ) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default StepLoader;\n","export { default as StepLoader } from \"./Step\";\nexport { default as ImageUploadLoader } from \"./ImageUpload\";\n","import { store as nfdOnboardingStore } from '../../store';\nimport { select } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Need Help Label and URL rendering component for most of the onboarding steps\n * Pass any Label and URL redirect which we want as is to display on the UI\n *\n * @param content\n * @return NeedHelpTag\n */\n\nconst NeedHelpTag = ( {\n\tquestion = __('Need Help?', 'wp-module-onboarding'),\n\turlLabel = __('Hire our Experts', 'wp-module-onboarding'),\n} ) => {\n\tconst hireExpertsUrl = select( nfdOnboardingStore ).getHireExpertsUrl();\n\treturn (\n\t\t
\n\t\t\t{ question }\n\t\t\t\n\t\t\t\t{ urlLabel }\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default NeedHelpTag;\n","import { useSelect, useDispatch } from '@wordpress/data';\nimport { Fragment, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\nimport { StepLoader } from '../../Loaders';\nimport { store as nfdOnboardingStore } from '../../../store';\nimport { getThemeStatus } from '../../../utils/api/themes';\nimport {\n\tTHEME_STATUS_INIT,\n\tTHEME_STATUS_INSTALLING,\n\tTHEME_STATUS_NOT_ACTIVE,\n\tTHEME_STATUS_ACTIVE,\n\tDESIGN_STEPS_THEME,\n\tTHEME_INSTALL_WAIT_TIMEOUT,\n} from '../../../../constants';\nimport { getPreviewSettings } from '../../../utils/api/settings';\nimport { StepErrorState } from '../../ErrorState';\n\nconst DesignStateHandler = ( { children } ) => {\n\tconst { storedThemeStatus } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tstoredThemeStatus: select( nfdOnboardingStore ).getThemeStatus(),\n\t\t};\n\t}, [] );\n\n\tconst { updateThemeStatus, updatePreviewSettings } =\n\t\tuseDispatch( nfdOnboardingStore );\n\n\tconst checkThemeStatus = async () => {\n\t\tconst themeStatus = await getThemeStatus( DESIGN_STEPS_THEME );\n\t\tif ( themeStatus?.error ) {\n\t\t\treturn THEME_STATUS_NOT_ACTIVE;\n\t\t}\n\t\treturn themeStatus.body.status;\n\t};\n\n\tconst loadPreviewSettings = async () => {\n\t\tconst previewSettings = await getPreviewSettings();\n\t\tif ( previewSettings?.body ) {\n\t\t\tupdatePreviewSettings( previewSettings.body );\n\t\t}\n\t};\n\n\tconst waitForInstall = () => {\n\t\tsetTimeout( async () => {\n\t\t\tconst themeStatus = await checkThemeStatus();\n\t\t\tif ( themeStatus !== THEME_STATUS_ACTIVE ) {\n\t\t\t\treturn updateThemeStatus( THEME_STATUS_NOT_ACTIVE );\n\t\t\t}\n\t\t\tupdateThemeStatus( themeStatus );\n\t\t\tawait loadPreviewSettings();\n\t\t}, THEME_INSTALL_WAIT_TIMEOUT );\n\t};\n\n\tuseEffect( async () => {\n\t\tif ( storedThemeStatus === THEME_STATUS_INIT ) {\n\t\t\tconst themeStatus = await checkThemeStatus();\n\t\t\tswitch ( themeStatus ) {\n\t\t\t\tcase THEME_STATUS_INSTALLING:\n\t\t\t\t\twaitForInstall();\n\t\t\t\t\tbreak;\n\t\t\t\tcase THEME_STATUS_ACTIVE:\n\t\t\t\t\tawait loadPreviewSettings();\n\t\t\t\t\tupdateThemeStatus( themeStatus );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tupdateThemeStatus( themeStatus );\n\t\t\t}\n\t\t}\n\t}, [ storedThemeStatus ] );\n\n\tconst handleRender = () => {\n\t\tswitch ( storedThemeStatus ) {\n\t\t\tcase THEME_STATUS_NOT_ACTIVE:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase THEME_STATUS_ACTIVE:\n\t\t\t\treturn children;\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}\n\t};\n\n\treturn { handleRender() };\n};\n\nexport default DesignStateHandler;\n","import { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\nimport { StepLoader } from '../../Loaders';\nimport { store as nfdOnboardingStore } from '../../../store';\nimport { getPluginStatus } from '../../../utils/api/plugins';\nimport {\n\tPLUGIN_STATUS_INIT,\n\tPLUGIN_STATUS_INSTALLING,\n\tPLUGIN_STATUS_NOT_ACTIVE,\n\tPLUGIN_STATUS_ACTIVE,\n\tECOMMERCE_STEPS_PLUGIN,\n\tPLUGIN_INSTALL_WAIT_TIMEOUT,\n} from '../../../../constants';\nimport { getPreviewSettings } from '../../../utils/api/settings';\nimport { StepErrorState } from '../../ErrorState';\n\nconst EcommerceStateHandler = ( { children } ) => {\n\tconst [ woocommerceStatus, setWoocommerceStatus ] = useState(\n\t\tPLUGIN_STATUS_INSTALLING\n\t);\n\n\tconst { storedPluginsStatus } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tstoredPluginsStatus:\n\t\t\t\tselect( nfdOnboardingStore ).getPluginsStatus(),\n\t\t};\n\t}, [] );\n\n\tconst { updatePluginsStatus, updatePreviewSettings } =\n\t\tuseDispatch( nfdOnboardingStore );\n\n\tconst checkPluginStatus = async () => {\n\t\tconst pluginStatus = await getPluginStatus( ECOMMERCE_STEPS_PLUGIN );\n\t\tif ( pluginStatus?.error ) {\n\t\t\treturn PLUGIN_STATUS_NOT_ACTIVE;\n\t\t}\n\t\treturn pluginStatus.body.status;\n\t};\n\n\tconst loadPreviewSettings = async () => {\n\t\tconst previewSettings = await getPreviewSettings();\n\t\tif ( previewSettings?.body ) {\n\t\t\tupdatePreviewSettings( previewSettings.body );\n\t\t}\n\t};\n\n\tconst waitForInstall = () => {\n\t\tsetTimeout( async () => {\n\t\t\tconst pluginStatus = await checkPluginStatus();\n\t\t\tif ( pluginStatus !== PLUGIN_STATUS_ACTIVE ) {\n\t\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] =\n\t\t\t\t\tPLUGIN_STATUS_NOT_ACTIVE;\n\t\t\t\tsetWoocommerceStatus( PLUGIN_STATUS_NOT_ACTIVE );\n\t\t\t\treturn updatePluginsStatus( storedPluginsStatus );\n\t\t\t}\n\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] = pluginStatus;\n\t\t\tsetWoocommerceStatus( pluginStatus );\n\t\t\tupdatePluginsStatus( storedPluginsStatus );\n\t\t\tawait loadPreviewSettings();\n\t\t}, PLUGIN_INSTALL_WAIT_TIMEOUT );\n\t};\n\n\tuseEffect( async () => {\n\t\tsetWoocommerceStatus( storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] );\n\t\tif (\n\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] === PLUGIN_STATUS_INIT\n\t\t) {\n\t\t\tconst pluginStatus = await checkPluginStatus();\n\t\t\tswitch ( pluginStatus ) {\n\t\t\t\tcase PLUGIN_STATUS_INSTALLING:\n\t\t\t\t\twaitForInstall();\n\t\t\t\t\tbreak;\n\t\t\t\tcase PLUGIN_STATUS_ACTIVE:\n\t\t\t\t\tawait loadPreviewSettings();\n\t\t\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] =\n\t\t\t\t\t\tpluginStatus;\n\t\t\t\t\tsetWoocommerceStatus( pluginStatus );\n\t\t\t\t\tupdatePluginsStatus( storedPluginsStatus );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] =\n\t\t\t\t\t\tpluginStatus;\n\t\t\t\t\tsetWoocommerceStatus( pluginStatus );\n\t\t\t\t\tupdatePluginsStatus( storedPluginsStatus );\n\t\t\t}\n\t\t}\n\t}, [ storedPluginsStatus ] );\n\n\tconst handleRender = () => {\n\t\tswitch ( woocommerceStatus ) {\n\t\t\tcase PLUGIN_STATUS_NOT_ACTIVE:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase PLUGIN_STATUS_ACTIVE:\n\t\t\t\treturn children;\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}\n\t};\n\n\treturn <>{ handleRender() };\n};\n\nexport default EcommerceStateHandler;\n","export { default as DesignStateHandler } from './Design';\nexport { default as EcommerceStateHandler } from './Ecommerce';\n","import { useSelect, useDispatch } from '@wordpress/data';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useLocation } from 'react-router-dom';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { orderBy, filter } from 'lodash';\n\nimport { LivePreview } from '../../../../components/LivePreview';\nimport CommonLayout from '../../../../components/Layouts/Common';\nimport {\n\tVIEW_DESIGN_THEME_STYLES_PREVIEW,\n\tTHEME_STATUS_ACTIVE,\n\tTHEME_STATUS_NOT_ACTIVE,\n} from '../../../../../constants';\nimport { store as nfdOnboardingStore } from '../../../../store';\nimport { getPatterns } from '../../../../utils/api/patterns';\nimport { getGlobalStyles } from '../../../../utils/api/themes';\nimport { useGlobalStylesOutput } from '../../../../utils/global-styles/use-global-styles-output';\nimport { conditionalSteps } from '../../../../data/routes/';\nimport { DesignStateHandler } from '../../../../components/StateHandlers';\n\nconst StepDesignThemeStylesPreview = () => {\n\tconst location = useLocation();\n\tconst [ isLoaded, setIsLoaded ] = useState( false );\n\tconst [ pattern, setPattern ] = useState();\n\tconst [ customize, setCustomize ] = useState( false );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tcurrentStep,\n\t\tcurrentData,\n\t\tstoredPreviewSettings,\n\t\troutes,\n\t\tdesignSteps,\n\t\tallSteps,\n\t\tthemeStatus,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tcurrentStep: select( nfdOnboardingStore ).getStepFromPath(\n\t\t\t\tlocation.pathname\n\t\t\t),\n\t\t\tcurrentData:\n\t\t\t\tselect( nfdOnboardingStore ).getCurrentOnboardingData(),\n\t\t\tstoredPreviewSettings:\n\t\t\t\tselect( nfdOnboardingStore ).getPreviewSettings(),\n\t\t\troutes: select( nfdOnboardingStore ).getRoutes(),\n\t\t\tallSteps: select( nfdOnboardingStore ).getAllSteps(),\n\t\t\tdesignSteps: select( nfdOnboardingStore ).getDesignSteps(),\n\t\t\tthemeStatus: select( nfdOnboardingStore ).getThemeStatus(),\n\t\t};\n\t}, [] );\n\n\tconst {\n\t\tsetDrawerActiveView,\n\t\tsetIsDrawerOpened,\n\t\tsetIsSidebarOpened,\n\t\tsetIsDrawerSuppressed,\n\t\tupdatePreviewSettings,\n\t\tupdateRoutes,\n\t\tupdateDesignSteps,\n\t\tupdateAllSteps,\n\t\tsetCurrentOnboardingData,\n\t\tupdateThemeStatus,\n\t} = useDispatch( nfdOnboardingStore );\n\n\tuseEffect( () => {\n\t\tif ( isLargeViewport ) {\n\t\t\tsetIsDrawerOpened( true );\n\t\t}\n\t\tsetIsSidebarOpened( false );\n\t\tsetIsDrawerSuppressed( false );\n\t\tsetDrawerActiveView( VIEW_DESIGN_THEME_STYLES_PREVIEW );\n\t\thandleCheckbox( currentData.data.customDesign, false );\n\t}, [] );\n\n\tconst getStylesAndPatterns = async () => {\n\t\tconst patternsResponse = await getPatterns(\n\t\t\tcurrentStep.patternId,\n\t\t\ttrue\n\t\t);\n\t\tif ( patternsResponse?.error ) {\n\t\t\treturn updateThemeStatus( THEME_STATUS_NOT_ACTIVE );\n\t\t}\n\t\tconst globalStylesResponse = await getGlobalStyles();\n\t\tif ( globalStylesResponse?.error ) {\n\t\t\treturn updateThemeStatus( THEME_STATUS_NOT_ACTIVE );\n\t\t}\n\t\tlet selectedGlobalStyle;\n\t\tif ( currentData.data.theme.variation ) {\n\t\t\tselectedGlobalStyle = globalStylesResponse.body.filter(\n\t\t\t\t( globalStyle ) =>\n\t\t\t\t\tglobalStyle.title === currentData.data.theme.variation\n\t\t\t)[ 0 ];\n\t\t} else {\n\t\t\tselectedGlobalStyle = globalStylesResponse.body[ 0 ];\n\t\t}\n\t\tupdatePreviewSettings(\n\t\t\tuseGlobalStylesOutput( selectedGlobalStyle, storedPreviewSettings )\n\t\t);\n\t\tsetPattern( patternsResponse?.body );\n\t\tsetIsLoaded( true );\n\t};\n\n\tconst addColorAndTypographyRoutes = () => {\n\t\tconst updates = removeColorAndTypographyRoutes();\n\t\tconst steps = [\n\t\t\tconditionalSteps.designColors,\n\t\t\tconditionalSteps.designTypography,\n\t\t];\n\t\treturn {\n\t\t\troutes: orderBy(\n\t\t\t\tupdates.routes.concat( steps ),\n\t\t\t\t[ 'priority' ],\n\t\t\t\t[ 'asc' ]\n\t\t\t),\n\t\t\tallSteps: orderBy(\n\t\t\t\tupdates.allSteps.concat( steps ),\n\t\t\t\t[ 'priority' ],\n\t\t\t\t[ 'asc' ]\n\t\t\t),\n\t\t\tdesignSteps: orderBy(\n\t\t\t\tupdates.designSteps.concat( steps ),\n\t\t\t\t[ 'priority' ],\n\t\t\t\t[ 'asc' ]\n\t\t\t),\n\t\t};\n\t};\n\n\tconst removeColorAndTypographyRoutes = () => {\n\t\treturn {\n\t\t\troutes: filter(\n\t\t\t\troutes,\n\t\t\t\t( route ) =>\n\t\t\t\t\t! route.path.includes(\n\t\t\t\t\t\tconditionalSteps.designColors.path\n\t\t\t\t\t) &&\n\t\t\t\t\t! route.path.includes(\n\t\t\t\t\t\tconditionalSteps.designTypography.path\n\t\t\t\t\t)\n\t\t\t),\n\t\t\tallSteps: filter(\n\t\t\t\tallSteps,\n\t\t\t\t( allStep ) =>\n\t\t\t\t\t! allStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designColors.path\n\t\t\t\t\t) &&\n\t\t\t\t\t! allStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designTypography.path\n\t\t\t\t\t)\n\t\t\t),\n\t\t\tdesignSteps: filter(\n\t\t\t\tdesignSteps,\n\t\t\t\t( designStep ) =>\n\t\t\t\t\t! designStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designColors.path\n\t\t\t\t\t) &&\n\t\t\t\t\t! designStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designTypography.path\n\t\t\t\t\t)\n\t\t\t),\n\t\t};\n\t};\n\n\tconst handleCheckbox = ( customize, updateOnboardingData = true ) => {\n\t\tlet updates;\n\n\t\tif ( customize ) {\n\t\t\tupdates = addColorAndTypographyRoutes();\n\t\t} else {\n\t\t\tupdates = removeColorAndTypographyRoutes();\n\t\t}\n\n\t\tupdateRoutes( updates.routes );\n\t\tupdateDesignSteps( updates.designSteps );\n\t\tupdateAllSteps( updates.allSteps );\n\t\tsetCustomize( customize );\n\n\t\tif ( updateOnboardingData ) {\n\t\t\tcurrentData.data.customDesign = customize;\n\t\t\tsetCurrentOnboardingData( currentData );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE )\n\t\t\tgetStylesAndPatterns();\n\t}, [ isLoaded, themeStatus ] );\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'Customize Colors & Fonts?',\n\t\t\t\t\t\t\t\t\t\t'wp-module-onboarding'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Check to customize in the next few steps (or leave empty and use the Site Editor later)',\n\t\t\t\t\t\t\t\t\t\t\t'wp-module-onboarding'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ customize }\n\t\t\t\t\t\tonChange={ () => handleCheckbox( ! customize ) }\n\t\t\t\t\t/>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ pattern && (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t);\n};\n\nexport default StepDesignThemeStylesPreview;\n","import apiFetch from '@wordpress/api-fetch';\n\nimport { onboardingRestURL } from './common';\n\nclass Event {\n\tconstructor( eventSlug, eventData = {} ) {\n\t\tthis.eventSlug = eventSlug;\n\t\tthis.eventData = eventData;\n\t}\n\n\tsend() {\n\t\tapiFetch( {\n\t\t\turl: onboardingRestURL( 'events' ),\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tslug: this.eventSlug,\n\t\t\t\tdata: this.eventData,\n\t\t\t},\n\t\t} ).catch( ( error ) => {\n\t\t\tconsole.error( error );\n\t\t} );\n\t}\n}\n\nexport default Event;\n"],"names":["CommonLayout","HeadingWithSubHeading","NeedHelpTag","StepErrorState","title","subtitle","error","__","classNames","speak","useEffect","useLocation","NFD_ONBOARDING_EVENT_PREFIX","Event","BaseLayout","className","children","location","mainContainer","document","querySelector","speakRouteTitle","focus","preventScroll","stepID","pathname","previousStepID","window","nfdOnboarding","send","Animate","Fragment","InnerContainer","isBgPrimary","isCentered","isVerticallyCentered","isContained","isPadded","isFadeIn","Container","ImageUploadLoader","StepLoader","default","store","nfdOnboardingStore","select","question","urlLabel","hireExpertsUrl","getHireExpertsUrl","useSelect","useDispatch","getThemeStatus","THEME_STATUS_INIT","THEME_STATUS_INSTALLING","THEME_STATUS_NOT_ACTIVE","THEME_STATUS_ACTIVE","DESIGN_STEPS_THEME","THEME_INSTALL_WAIT_TIMEOUT","getPreviewSettings","DesignStateHandler","storedThemeStatus","updateThemeStatus","updatePreviewSettings","checkThemeStatus","themeStatus","body","status","loadPreviewSettings","previewSettings","waitForInstall","setTimeout","handleRender","useState","getPluginStatus","PLUGIN_STATUS_INIT","PLUGIN_STATUS_INSTALLING","PLUGIN_STATUS_NOT_ACTIVE","PLUGIN_STATUS_ACTIVE","ECOMMERCE_STEPS_PLUGIN","PLUGIN_INSTALL_WAIT_TIMEOUT","EcommerceStateHandler","woocommerceStatus","setWoocommerceStatus","storedPluginsStatus","getPluginsStatus","updatePluginsStatus","checkPluginStatus","pluginStatus","CheckboxControl","useViewportMatch","orderBy","filter","LivePreview","VIEW_DESIGN_THEME_STYLES_PREVIEW","getPatterns","getGlobalStyles","useGlobalStylesOutput","conditionalSteps","StepDesignThemeStylesPreview","isLoaded","setIsLoaded","pattern","setPattern","customize","setCustomize","isLargeViewport","currentStep","currentData","storedPreviewSettings","routes","designSteps","allSteps","getStepFromPath","getCurrentOnboardingData","getRoutes","getAllSteps","getDesignSteps","setDrawerActiveView","setIsDrawerOpened","setIsSidebarOpened","setIsDrawerSuppressed","updateRoutes","updateDesignSteps","updateAllSteps","setCurrentOnboardingData","handleCheckbox","data","customDesign","getStylesAndPatterns","patternsResponse","patternId","globalStylesResponse","selectedGlobalStyle","theme","variation","globalStyle","addColorAndTypographyRoutes","updates","removeColorAndTypographyRoutes","steps","designColors","designTypography","concat","route","path","includes","allStep","designStep","updateOnboardingData","apiFetch","onboardingRestURL","constructor","eventSlug","eventData","url","method","slug","catch","console"],"sourceRoot":""} \ No newline at end of file diff --git a/includes/RestApi/PluginsController.php b/includes/RestApi/PluginsController.php index b066f2e17..b2a9197f3 100644 --- a/includes/RestApi/PluginsController.php +++ b/includes/RestApi/PluginsController.php @@ -66,15 +66,15 @@ public function register_routes() { ) ); - \register_rest_route( + \register_rest_route( $this->namespace, $this->rest_base . '/status', array( array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_status' ), - 'args' => $this->get_status_args(), - // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + 'methods' => \WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_status' ), + 'args' => $this->get_status_args(), + 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), ), ) ); @@ -119,18 +119,18 @@ public function get_install_plugin_args() { ); } - public function get_status_args() { - return array( - 'plugin' => array( - 'type' => 'string', - 'required' => true, - ), - 'activated' => array( - 'type' => 'boolean', - 'default' => true - ), - ); - } + public function get_status_args() { + return array( + 'plugin' => array( + 'type' => 'string', + 'required' => true, + ), + 'activated' => array( + 'type' => 'boolean', + 'default' => true, + ), + ); + } /** * Verify caller has permissions to install plugins. @@ -209,37 +209,37 @@ public function install( \WP_REST_Request $request ) { return $plugin_install_task->execute(); } - public function get_status( \WP_REST_Request $request ) { - $plugin = $request->get_param( 'plugin' ); - $activated = $request->get_param( 'activated' ); - - if ( PluginInstaller::exists( $plugin, $activated ) ) { - return new \WP_REST_Response( - array( - 'status' => $activated ? 'activated' : 'installed' - ), - 200 - ); - } - - $position_in_queue = PluginInstallTaskManager::status( $plugin ); - - if ( $position_in_queue !== false) { - return new \WP_REST_Response( - array( - 'status' => 'installing', - 'estimate' => ( ( $position_in_queue + 1 ) * 30 ) - ), - 200 - ); - } - - return new \WP_REST_Response( - array( - 'status' => 'not_active' - ), - 200 - ); - - } + public function get_status( \WP_REST_Request $request ) { + $plugin = $request->get_param( 'plugin' ); + $activated = $request->get_param( 'activated' ); + + if ( PluginInstaller::exists( $plugin, $activated ) ) { + return new \WP_REST_Response( + array( + 'status' => $activated ? 'activated' : 'installed', + ), + 200 + ); + } + + $position_in_queue = PluginInstallTaskManager::status( $plugin ); + + if ( $position_in_queue !== false ) { + return new \WP_REST_Response( + array( + 'status' => 'installing', + 'estimate' => ( ( $position_in_queue + 1 ) * 30 ), + ), + 200 + ); + } + + return new \WP_REST_Response( + array( + 'status' => 'inactive', + ), + 200 + ); + + } } diff --git a/includes/RestApi/SettingsController.php b/includes/RestApi/SettingsController.php index 169f03663..71da07ab5 100644 --- a/includes/RestApi/SettingsController.php +++ b/includes/RestApi/SettingsController.php @@ -6,6 +6,7 @@ use NewfoldLabs\WP\Module\Onboarding\Data\Config; use NewfoldLabs\WP\Module\Onboarding\WP_Config; use NewfoldLabs\WP\Module\Onboarding\Data\Data; +use NewfoldLabs\WP\Module\Onboarding\Services\Webfonts; /** * Class SettingsController @@ -83,14 +84,14 @@ public function register_routes() { ) ); - \register_rest_route( + \register_rest_route( $this->namespace, $this->rest_base . '/preview', array( array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_preview_settings' ), - // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + 'methods' => \WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_preview_settings' ), + 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), ), ) ); @@ -190,12 +191,12 @@ public function get_current_settings() { */ public function initialize() { - if ( \get_option( Options::get_option_name( 'settings_initialized' ), false ) ) { - return new \WP_REST_Response( - array(), - 200 - ); - } + if ( \get_option( Options::get_option_name( 'settings_initialized' ), false ) ) { + return new \WP_REST_Response( + array(), + 200 + ); + } // Update wp_options $init_options = Options::get_initialization_options(); @@ -219,7 +220,7 @@ public function initialize() { $wp_config->add_constant( $constant_key, $constant_value ); } - \update_option( Options::get_option_name( 'settings_initialized' ), true ); + \update_option( Options::get_option_name( 'settings_initialized' ), true ); return new \WP_REST_Response( array(), @@ -227,373 +228,17 @@ public function initialize() { ); } - public static function fn_get_webfonts_from_theme_json() { - // Get settings from theme.json. - $settings = \WP_Theme_JSON_Resolver::get_merged_data()->get_settings(); - - // If in the editor, add webfonts defined in variations. - if ( is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { - $variations = \WP_Theme_JSON_Resolver::get_style_variations(); - foreach ( $variations as $variation ) { - // Skip if fontFamilies are not defined in the variation. - if ( empty( $variation['settings']['typography']['fontFamilies'] ) ) { - continue; - } - - // Initialize the array structure. - if ( empty( $settings['typography'] ) ) { - $settings['typography'] = array(); - } - if ( empty( $settings['typography']['fontFamilies'] ) ) { - $settings['typography']['fontFamilies'] = array(); - } - if ( empty( $settings['typography']['fontFamilies']['theme'] ) ) { - $settings['typography']['fontFamilies']['theme'] = array(); - } - - // Combine variations with settings. Remove duplicates. - $settings['typography']['fontFamilies']['theme'] = array_merge( $settings['typography']['fontFamilies']['theme'], $variation['settings']['typography']['fontFamilies']['theme'] ); - $settings['typography']['fontFamilies'] = array_unique( $settings['typography']['fontFamilies'] ); - } - } - - // Bail out early if there are no settings for webfonts. - if ( empty( $settings['typography']['fontFamilies'] ) ) { - return array(); - } - - $webfonts = array(); - - // Look for fontFamilies. - foreach ( $settings['typography']['fontFamilies'] as $font_families ) { - foreach ( $font_families as $font_family ) { - - // Skip if fontFace is not defined. - if ( empty( $font_family['fontFace'] ) ) { - continue; - } - - // Skip if fontFace is not an array of webfonts. - if ( ! is_array( $font_family['fontFace'] ) ) { - continue; - } - - $webfonts = array_merge( $webfonts, $font_family['fontFace'] ); - } - } - - return $webfonts; - } - - static function fn_transform_src_into_uri( array $src ) { - foreach ( $src as $key => $url ) { - // Tweak the URL to be relative to the theme root. - if ( ! str_starts_with( $url, 'file:./' ) ) { - continue; - } - - $src[ $key ] = get_theme_file_uri( str_replace( 'file:./', '', $url ) ); - } - - return $src; - } - - /** - * Converts the font-face properties (i.e. keys) into kebab-case. - * - * @since 6.0.0 - * - * @param array $font_face Font face to convert. - * @return array Font faces with each property in kebab-case format. - */ - static function fn_convert_keys_to_kebab_case( array $font_face ) { - foreach ( $font_face as $property => $value ) { - $kebab_case = _wp_to_kebab_case( $property ); - $font_face[ $kebab_case ] = $value; - if ( $kebab_case !== $property ) { - unset( $font_face[ $property ] ); - } - } - - return $font_face; - } - - /** - * Validates a webfont. - * - * @since 6.0.0 - * - * @param array $webfont The webfont arguments. - * @return array|false The validated webfont arguments, or false if the webfont is invalid. - */ - static function fn_validate_webfont( $webfont ) { - $webfont = wp_parse_args( - $webfont, - array( - 'font-family' => '', - 'font-style' => 'normal', - 'font-weight' => '400', - 'font-display' => 'fallback', - 'src' => array(), - ) - ); - - // Check the font-family. - if ( empty( $webfont['font-family'] ) || ! is_string( $webfont['font-family'] ) ) { - trigger_error( __( 'Webfont font family must be a non-empty string.' ) ); - - return false; - } - - // Check that the `src` property is defined and a valid type. - if ( empty( $webfont['src'] ) || ( ! is_string( $webfont['src'] ) && ! is_array( $webfont['src'] ) ) ) { - trigger_error( __( 'Webfont src must be a non-empty string or an array of strings.' ) ); - - return false; - } - - // Validate the `src` property. - foreach ( (array) $webfont['src'] as $src ) { - if ( ! is_string( $src ) || '' === trim( $src ) ) { - trigger_error( __( 'Each webfont src must be a non-empty string.' ) ); - - return false; - } - } - - // Check the font-weight. - if ( ! is_string( $webfont['font-weight'] ) && ! is_int( $webfont['font-weight'] ) ) { - trigger_error( __( 'Webfont font weight must be a properly formatted string or integer.' ) ); - - return false; - } - - // Check the font-display. - if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'swap' ), true ) ) { - $webfont['font-display'] = 'fallback'; - } - - $valid_props = array( - 'ascend-override', - 'descend-override', - 'font-display', - 'font-family', - 'font-stretch', - 'font-style', - 'font-weight', - 'font-variant', - 'font-feature-settings', - 'font-variation-settings', - 'line-gap-override', - 'size-adjust', - 'src', - 'unicode-range', - ); - - foreach ( $webfont as $prop => $value ) { - if ( ! in_array( $prop, $valid_props, true ) ) { - unset( $webfont[ $prop ] ); - } - } - - return $webfont; - } - - static function fn_register_webfonts() { - $registered_webfonts = array(); - - foreach ( self::fn_get_webfonts_from_theme_json() as $webfont ) { - if ( ! is_array( $webfont ) ) { - continue; - } - - $webfont = self::fn_convert_keys_to_kebab_case( $webfont ); - - $webfont = self::fn_validate_webfont( $webfont ); + public function get_preview_settings() { + $preview_settings = Data::preview_settings(); - $webfont['src'] = self::fn_transform_src_into_uri( (array) $webfont['src'] ); - - // Skip if not valid. - if ( empty( $webfont ) ) { - continue; - } - - $registered_webfonts[] = $webfont; - } - - return $registered_webfonts; - } - - static function fn_order_src( array $webfont ) { - $src = array(); - $src_ordered = array(); - - foreach ( $webfont['src'] as $url ) { - // Add data URIs first. - if ( str_starts_with( trim( $url ), 'data:' ) ) { - $src_ordered[] = array( - 'url' => $url, - 'format' => 'data', - ); - continue; - } - $format = pathinfo( $url, PATHINFO_EXTENSION ); - $src[ $format ] = $url; - } - - // Add woff2. - if ( ! empty( $src['woff2'] ) ) { - $src_ordered[] = array( - 'url' => sanitize_url( $src['woff2'] ), - 'format' => 'woff2', - ); - } - - // Add woff. - if ( ! empty( $src['woff'] ) ) { - $src_ordered[] = array( - 'url' => sanitize_url( $src['woff'] ), - 'format' => 'woff', - ); - } - - // Add ttf. - if ( ! empty( $src['ttf'] ) ) { - $src_ordered[] = array( - 'url' => sanitize_url( $src['ttf'] ), - 'format' => 'truetype', - ); - } - - // Add eot. - if ( ! empty( $src['eot'] ) ) { - $src_ordered[] = array( - 'url' => sanitize_url( $src['eot'] ), - 'format' => 'embedded-opentype', - ); - } - - // Add otf. - if ( ! empty( $src['otf'] ) ) { - $src_ordered[] = array( - 'url' => sanitize_url( $src['otf'] ), - 'format' => 'opentype', - ); - } - $webfont['src'] = $src_ordered; - - return $webfont; - } - - static function fn_compile_src( $font_family, array $value ) { - $src = "local($font_family)"; - - foreach ( $value as $item ) { - - if ( - str_starts_with( $item['url'], site_url() ) || - str_starts_with( $item['url'], home_url() ) - ) { - $item['url'] = wp_make_link_relative( $item['url'] ); - } - - $src .= ( 'data' === $item['format'] ) - ? ", url({$item['url']})" - : ", url('{$item['url']}') format('{$item['format']}')"; - } - - return $src; - } - - /** - * Compiles the font variation settings. - * - * @since 6.0.0 - * - * @param array $font_variation_settings Array of font variation settings. - * @return string The CSS. - */ - static function fn_compile_variations( array $font_variation_settings ) { - $variations = ''; - - foreach ( $font_variation_settings as $key => $value ) { - $variations .= "$key $value"; - } - - return $variations; - } - - static function fn_build_font_face_css( array $webfont ) { - $css = ''; - - // Wrap font-family in quotes if it contains spaces. - if ( - str_contains( $webfont['font-family'], ' ' ) && - ! str_contains( $webfont['font-family'], '"' ) && - ! str_contains( $webfont['font-family'], "'" ) - ) { - $webfont['font-family'] = '"' . $webfont['font-family'] . '"'; - } - - foreach ( $webfont as $key => $value ) { - /* - * Skip "provider", since it's for internal API use, - * and not a valid CSS property. - */ - if ( 'provider' === $key ) { - continue; - } - - // Compile the "src" parameter. - if ( 'src' === $key ) { - $value = self::fn_compile_src( $webfont['font-family'], $value ); - } - - // If font-variation-settings is an array, convert it to a string. - if ( 'font-variation-settings' === $key && is_array( $value ) ) { - $value =self::fn_compile_variations( $value ); - } - - if ( ! empty( $value ) ) { - $css .= "$key:$value;"; - } - } - - return $css; - } - - static function fn_get_css ($registered_webfonts) { - $css = ''; - - foreach ( $registered_webfonts as $webfont ) { - // Order the webfont's `src` items to optimize for browser support. - $webfont = self::fn_order_src( $webfont ); - - // Build the @font-face CSS for this webfont. - $css .= '@font-face{' . self::fn_build_font_face_css( $webfont ) . '}'; - } - - return $css; - } - - function wp_theme_json_webfonts_handler() { - - $styles = self::fn_get_css(self::fn_register_webfonts()); - - // Bail out if there are no styles to enqueue. - if ( '' === $styles ) { - return; - } - - return $styles; - } + $webfonts_css = Webfonts::get_wp_theme_json_webfonts_css(); + if ( $webfonts_css !== false ) { + $preview_settings['settings']['__unstableResolvedAssets']['styles'] .= ''; + } - public function get_preview_settings() { - $preview_settings = Data::preview_settings(); - $preview_settings['settings']['__unstableResolvedAssets']['styles'] .= ''; - return new \WP_REST_Response( - $preview_settings, - 200 - ); - } + return new \WP_REST_Response( + $preview_settings, + 200 + ); + } } diff --git a/includes/RestApi/Themes/ThemeInstallerController.php b/includes/RestApi/Themes/ThemeInstallerController.php index 3b928bd0e..89734e3cb 100644 --- a/includes/RestApi/Themes/ThemeInstallerController.php +++ b/includes/RestApi/Themes/ThemeInstallerController.php @@ -31,9 +31,9 @@ public function register_routes() { $this->rest_base . '/initialize', array( array( - 'methods' => \WP_REST_Server::CREATABLE, - 'callback' => array( $this, 'initialize' ), - // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + 'methods' => \WP_REST_Server::CREATABLE, + 'callback' => array( $this, 'initialize' ), + 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), ), ) ); @@ -51,16 +51,15 @@ public function register_routes() { ) ); - \register_rest_route( $this->namespace, $this->rest_base . '/status', array( array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_status' ), - 'args' => $this->get_status_args(), - // 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), + 'methods' => \WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_status' ), + 'args' => $this->get_status_args(), + 'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ), ), ) ); @@ -92,18 +91,18 @@ public function get_install_theme_args() { ); } - public function get_status_args() { - return array( - 'theme' => array( - 'type' => 'string', - 'required' => true, - ), - 'activated' => array( - 'type' => 'boolean', - 'default' => true - ), - ); - } + public function get_status_args() { + return array( + 'theme' => array( + 'type' => 'string', + 'required' => true, + ), + 'activated' => array( + 'type' => 'boolean', + 'default' => true, + ), + ); + } /** * Queue in the initial list of themes to be installed. @@ -167,38 +166,37 @@ public static function install( \WP_REST_Request $request ) { return $theme_install_task->execute(); } - public function get_status( \WP_REST_Request $request ) { - $theme = $request->get_param( 'theme' ); - $activated = $request->get_param( 'activated' ); - - if ( ThemeInstaller::exists( $theme, $activated ) ) { - return new \WP_REST_Response( - array( - 'status' => $activated ? 'activated' : 'installed' - ), - 200 - ); - } - - $position_in_queue = ThemeInstallTaskManager::status( $theme ); - - if ( $position_in_queue !== false) { - return new \WP_REST_Response( - array( - 'status' => 'installing', - 'estimate' => ( ( $position_in_queue + 1 ) * 10 ) - ), - 200 - ); - } - - return new \WP_REST_Response( - array( - 'status' => 'not_active' - ), - 200 - ); - - - } -} \ No newline at end of file + public function get_status( \WP_REST_Request $request ) { + $theme = $request->get_param( 'theme' ); + $activated = $request->get_param( 'activated' ); + + if ( ThemeInstaller::exists( $theme, $activated ) ) { + return new \WP_REST_Response( + array( + 'status' => $activated ? 'activated' : 'installed', + ), + 200 + ); + } + + $position_in_queue = ThemeInstallTaskManager::status( $theme ); + + if ( $position_in_queue !== false ) { + return new \WP_REST_Response( + array( + 'status' => 'installing', + 'estimate' => ( ( $position_in_queue + 1 ) * 10 ), + ), + 200 + ); + } + + return new \WP_REST_Response( + array( + 'status' => 'inactive', + ), + 200 + ); + + } +} diff --git a/includes/Services/Webfonts.php b/includes/Services/Webfonts.php new file mode 100644 index 000000000..f9f612a8b --- /dev/null +++ b/includes/Services/Webfonts.php @@ -0,0 +1,364 @@ +get_settings(); + + // If in the editor, add webfonts defined in variations. + if ( is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { + $variations = \WP_Theme_JSON_Resolver::get_style_variations(); + foreach ( $variations as $variation ) { + // Skip if fontFamilies are not defined in the variation. + if ( empty( $variation['settings']['typography']['fontFamilies'] ) ) { + continue; + } + + // Initialize the array structure. + if ( empty( $settings['typography'] ) ) { + $settings['typography'] = array(); + } + if ( empty( $settings['typography']['fontFamilies'] ) ) { + $settings['typography']['fontFamilies'] = array(); + } + if ( empty( $settings['typography']['fontFamilies']['theme'] ) ) { + $settings['typography']['fontFamilies']['theme'] = array(); + } + + // Combine variations with settings. Remove duplicates. + $settings['typography']['fontFamilies']['theme'] = array_merge( $settings['typography']['fontFamilies']['theme'], $variation['settings']['typography']['fontFamilies']['theme'] ); + $settings['typography']['fontFamilies'] = array_unique( $settings['typography']['fontFamilies'] ); + } + } + + // Bail out early if there are no settings for webfonts. + if ( empty( $settings['typography']['fontFamilies'] ) ) { + return array(); + } + + $webfonts = array(); + + // Look for fontFamilies. + foreach ( $settings['typography']['fontFamilies'] as $font_families ) { + foreach ( $font_families as $font_family ) { + + // Skip if fontFace is not defined. + if ( empty( $font_family['fontFace'] ) ) { + continue; + } + + // Skip if fontFace is not an array of webfonts. + if ( ! is_array( $font_family['fontFace'] ) ) { + continue; + } + + $webfonts = array_merge( $webfonts, $font_family['fontFace'] ); + } + } + + return $webfonts; + } + + private static function transform_src_into_uri( array $src ) { + foreach ( $src as $key => $url ) { + // Tweak the URL to be relative to the theme root. + if ( ! str_starts_with( $url, 'file:./' ) ) { + continue; + } + + $src[ $key ] = get_theme_file_uri( str_replace( 'file:./', '', $url ) ); + } + + return $src; + } + + /** + * Converts the font-face properties (i.e. keys) into kebab-case. + * + * @since 6.0.0 + * + * @param array $font_face Font face to convert. + * @return array Font faces with each property in kebab-case format. + */ + private static function convert_keys_to_kebab_case( array $font_face ) { + foreach ( $font_face as $property => $value ) { + $kebab_case = _wp_to_kebab_case( $property ); + $font_face[ $kebab_case ] = $value; + if ( $kebab_case !== $property ) { + unset( $font_face[ $property ] ); + } + } + + return $font_face; + } + + /** + * Validates a webfont. + * + * @since 6.0.0 + * + * @param array $webfont The webfont arguments. + * @return array|false The validated webfont arguments, or false if the webfont is invalid. + */ + private static function validate_webfont( $webfont ) { + $webfont = wp_parse_args( + $webfont, + array( + 'font-family' => '', + 'font-style' => 'normal', + 'font-weight' => '400', + 'font-display' => 'fallback', + 'src' => array(), + ) + ); + + // Check the font-family. + if ( empty( $webfont['font-family'] ) || ! is_string( $webfont['font-family'] ) ) { + trigger_error( __( 'Webfont font family must be a non-empty string.' ) ); + + return false; + } + + // Check that the `src` property is defined and a valid type. + if ( empty( $webfont['src'] ) || ( ! is_string( $webfont['src'] ) && ! is_array( $webfont['src'] ) ) ) { + trigger_error( __( 'Webfont src must be a non-empty string or an array of strings.' ) ); + + return false; + } + + // Validate the `src` property. + foreach ( (array) $webfont['src'] as $src ) { + if ( ! is_string( $src ) || '' === trim( $src ) ) { + trigger_error( __( 'Each webfont src must be a non-empty string.' ) ); + + return false; + } + } + + // Check the font-weight. + if ( ! is_string( $webfont['font-weight'] ) && ! is_int( $webfont['font-weight'] ) ) { + trigger_error( __( 'Webfont font weight must be a properly formatted string or integer.' ) ); + + return false; + } + + // Check the font-display. + if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'swap' ), true ) ) { + $webfont['font-display'] = 'fallback'; + } + + $valid_props = array( + 'ascend-override', + 'descend-override', + 'font-display', + 'font-family', + 'font-stretch', + 'font-style', + 'font-weight', + 'font-variant', + 'font-feature-settings', + 'font-variation-settings', + 'line-gap-override', + 'size-adjust', + 'src', + 'unicode-range', + ); + + foreach ( $webfont as $prop => $value ) { + if ( ! in_array( $prop, $valid_props, true ) ) { + unset( $webfont[ $prop ] ); + } + } + + return $webfont; + } + + public static function get_registered_webfonts_from_theme_json() { + $registered_webfonts = array(); + + foreach ( self::get_webfonts_from_theme_json() as $webfont ) { + if ( ! is_array( $webfont ) ) { + continue; + } + + $webfont = self::convert_keys_to_kebab_case( $webfont ); + + $webfont = self::validate_webfont( $webfont ); + + $webfont['src'] = self::transform_src_into_uri( (array) $webfont['src'] ); + + // Skip if not valid. + if ( empty( $webfont ) ) { + continue; + } + + $registered_webfonts[] = $webfont; + } + + return $registered_webfonts; + } + + private static function order_src( array $webfont ) { + $src = array(); + $src_ordered = array(); + + foreach ( $webfont['src'] as $url ) { + // Add data URIs first. + if ( str_starts_with( trim( $url ), 'data:' ) ) { + $src_ordered[] = array( + 'url' => $url, + 'format' => 'data', + ); + continue; + } + $format = pathinfo( $url, PATHINFO_EXTENSION ); + $src[ $format ] = $url; + } + + // Add woff2. + if ( ! empty( $src['woff2'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['woff2'] ), + 'format' => 'woff2', + ); + } + + // Add woff. + if ( ! empty( $src['woff'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['woff'] ), + 'format' => 'woff', + ); + } + + // Add ttf. + if ( ! empty( $src['ttf'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['ttf'] ), + 'format' => 'truetype', + ); + } + + // Add eot. + if ( ! empty( $src['eot'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['eot'] ), + 'format' => 'embedded-opentype', + ); + } + + // Add otf. + if ( ! empty( $src['otf'] ) ) { + $src_ordered[] = array( + 'url' => sanitize_url( $src['otf'] ), + 'format' => 'opentype', + ); + } + $webfont['src'] = $src_ordered; + + return $webfont; + } + + private static function compile_src( $font_family, array $value ) { + $src = "local($font_family)"; + + foreach ( $value as $item ) { + + if ( + str_starts_with( $item['url'], site_url() ) || + str_starts_with( $item['url'], home_url() ) + ) { + $item['url'] = wp_make_link_relative( $item['url'] ); + } + + $src .= ( 'data' === $item['format'] ) + ? ", url({$item['url']})" + : ", url('{$item['url']}') format('{$item['format']}')"; + } + + return $src; + } + + /** + * Compiles the font variation settings. + * + * @since 6.0.0 + * + * @param array $font_variation_settings Array of font variation settings. + * @return string The CSS. + */ + private static function compile_variations( array $font_variation_settings ) { + $variations = ''; + + foreach ( $font_variation_settings as $key => $value ) { + $variations .= "$key $value"; + } + + return $variations; + } + + private static function build_font_face_css( array $webfont ) { + $css = ''; + + // Wrap font-family in quotes if it contains spaces. + if ( + str_contains( $webfont['font-family'], ' ' ) && + ! str_contains( $webfont['font-family'], '"' ) && + ! str_contains( $webfont['font-family'], "'" ) + ) { + $webfont['font-family'] = '"' . $webfont['font-family'] . '"'; + } + + foreach ( $webfont as $key => $value ) { + /* + * Skip "provider", since it's for internal API use, + * and not a valid CSS property. + */ + if ( 'provider' === $key ) { + continue; + } + + // Compile the "src" parameter. + if ( 'src' === $key ) { + $value = self::compile_src( $webfont['font-family'], $value ); + } + + // If font-variation-settings is an array, convert it to a string. + if ( 'font-variation-settings' === $key && is_array( $value ) ) { + $value = self::compile_variations( $value ); + } + + if ( ! empty( $value ) ) { + $css .= "$key:$value;"; + } + } + + return $css; + } + + private static function get_css_from_webfonts( $registered_webfonts ) { + $css = ''; + + foreach ( $registered_webfonts as $webfont ) { + // Order the webfont's `src` items to optimize for browser support. + $webfont = self::order_src( $webfont ); + + // Build the @font-face CSS for this webfont. + $css .= '@font-face{' . self::build_font_face_css( $webfont ) . '}'; + } + + return $css; + } + + public static function get_wp_theme_json_webfonts_css() { + + $styles = self::get_css_from_webfonts( self::get_registered_webfonts_from_theme_json() ); + + if ( '' === $styles ) { + return false; + } + + return $styles; + } +} diff --git a/includes/TaskManagers/PluginInstallTaskManager.php b/includes/TaskManagers/PluginInstallTaskManager.php index c5d4aee40..283c191b6 100644 --- a/includes/TaskManagers/PluginInstallTaskManager.php +++ b/includes/TaskManagers/PluginInstallTaskManager.php @@ -166,8 +166,8 @@ public static function add_to_queue( PluginInstallTask $plugin_install_task ) { return \update_option( Options::get_option_name( self::$queue_name ), $queue->to_array() ); } - public static function status( $plugin ) { - $plugins = \get_option( Options::get_option_name( self::$queue_name ), array() ); - return array_search( $plugin, array_column( $plugins, 'slug' ) ); - } + public static function status( $plugin ) { + $plugins = \get_option( Options::get_option_name( self::$queue_name ), array() ); + return array_search( $plugin, array_column( $plugins, 'slug' ) ); + } } diff --git a/includes/TaskManagers/ThemeInstallTaskManager.php b/includes/TaskManagers/ThemeInstallTaskManager.php index 3b0647cc3..86758ea0d 100644 --- a/includes/TaskManagers/ThemeInstallTaskManager.php +++ b/includes/TaskManagers/ThemeInstallTaskManager.php @@ -164,8 +164,8 @@ public static function add_to_queue( ThemeInstallTask $theme_install_task ) { return \update_option( Options::get_option_name( self::$queue_name ), $queue->to_array() ); } - public static function status( $theme ) { - $themes = \get_option( Options::get_option_name( self::$queue_name ), array() ); - return array_search( $theme, array_column( $themes, 'slug' ) ); - } + public static function status( $theme ) { + $themes = \get_option( Options::get_option_name( self::$queue_name ), array() ); + return array_search( $theme, array_column( $themes, 'slug' ) ); + } } diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js index 87b09c876..c0e5babe6 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js @@ -31,19 +31,22 @@ const DesignThemeStylesPreview = () => { useDispatch( nfdOnboardingStore ); const getStylesAndPatterns = async () => { - const pattern = await getPatterns( currentStep.patternId, true ); - const globalStyles = await getGlobalStyles(); - setPattern( pattern?.body ); - setGlobalStyles( globalStyles?.body ); - let selectedStyle; + const patternResponse = await getPatterns( + currentStep.patternId, + true + ); + const globalStylesResponse = await getGlobalStyles(); + setPattern( patternResponse?.body ); + setGlobalStyles( globalStylesResponse?.body ); + let selectedGlobalStyle; if ( currentData.data.theme.variation ) { - selectedStyle = currentData.data.theme.variation; + selectedGlobalStyle = currentData.data.theme.variation; } else { - selectedStyle = globalStyles.body[ 0 ].title; - currentData.data.theme.variation = selectedStyle; + selectedGlobalStyle = globalStylesResponse.body[ 0 ].title; + currentData.data.theme.variation = selectedGlobalStyle; setCurrentOnboardingData( currentData ); } - setSelectedStyle( selectedStyle ); + setSelectedStyle( selectedGlobalStyle ); if ( document.getElementsByClassName( 'theme-styles-preview--drawer__list__item__title-bar--selected' @@ -80,6 +83,7 @@ const DesignThemeStylesPreview = () => { return globalStyles?.map( ( globalStyle, idx ) => { return ( { const checkThemeStatus = async () => { const themeStatus = await getThemeStatus( DESIGN_STEPS_THEME ); + if ( themeStatus?.error ) { + return THEME_STATUS_NOT_ACTIVE; + } return themeStatus.body.status; }; const loadPreviewSettings = async () => { const previewSettings = await getPreviewSettings(); - updatePreviewSettings( previewSettings.body ); + if ( previewSettings?.body ) { + updatePreviewSettings( previewSettings.body ); + } }; const waitForInstall = () => { @@ -69,13 +74,18 @@ const DesignStateHandler = ( { children } ) => { case THEME_STATUS_NOT_ACTIVE: return ( ); case THEME_STATUS_ACTIVE: @@ -83,16 +93,20 @@ const DesignStateHandler = ( { children } ) => { default: return ( ); } }; - return <>{ handleRender() }; + return { handleRender() }; }; export default DesignStateHandler; diff --git a/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js b/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js index efa4f7499..2dd513591 100644 --- a/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js +++ b/src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js @@ -1,8 +1,8 @@ import { useSelect, useDispatch } from '@wordpress/data'; -import { useEffect } from '@wordpress/element'; +import { useEffect, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { StepLoader } from '../../Loaders'; +import { StepLoader } from '../../Loaders'; import { store as nfdOnboardingStore } from '../../../store'; import { getPluginStatus } from '../../../utils/api/plugins'; import { @@ -17,38 +17,56 @@ import { getPreviewSettings } from '../../../utils/api/settings'; import { StepErrorState } from '../../ErrorState'; const EcommerceStateHandler = ( { children } ) => { - const { storedPluginStatus } = useSelect( ( select ) => { + const [ woocommerceStatus, setWoocommerceStatus ] = useState( + PLUGIN_STATUS_INSTALLING + ); + + const { storedPluginsStatus } = useSelect( ( select ) => { return { - storedPluginStatus: select( nfdOnboardingStore ).getPluginStatus(), + storedPluginsStatus: + select( nfdOnboardingStore ).getPluginsStatus(), }; }, [] ); - const { updatePluginStatus, updatePreviewSettings } = + const { updatePluginsStatus, updatePreviewSettings } = useDispatch( nfdOnboardingStore ); const checkPluginStatus = async () => { const pluginStatus = await getPluginStatus( ECOMMERCE_STEPS_PLUGIN ); + if ( pluginStatus?.error ) { + return PLUGIN_STATUS_NOT_ACTIVE; + } return pluginStatus.body.status; }; const loadPreviewSettings = async () => { const previewSettings = await getPreviewSettings(); - updatePreviewSettings( previewSettings.body ); + if ( previewSettings?.body ) { + updatePreviewSettings( previewSettings.body ); + } }; const waitForInstall = () => { setTimeout( async () => { const pluginStatus = await checkPluginStatus(); if ( pluginStatus !== PLUGIN_STATUS_ACTIVE ) { - return updatePluginStatus( PLUGIN_STATUS_NOT_ACTIVE ); + storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] = + PLUGIN_STATUS_NOT_ACTIVE; + setWoocommerceStatus( PLUGIN_STATUS_NOT_ACTIVE ); + return updatePluginsStatus( storedPluginsStatus ); } - updatePluginStatus( pluginStatus ); + storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] = pluginStatus; + setWoocommerceStatus( pluginStatus ); + updatePluginsStatus( storedPluginsStatus ); await loadPreviewSettings(); }, PLUGIN_INSTALL_WAIT_TIMEOUT ); }; useEffect( async () => { - if ( storedPluginStatus === PLUGIN_STATUS_INIT ) { + setWoocommerceStatus( storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] ); + if ( + storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] === PLUGIN_STATUS_INIT + ) { const pluginStatus = await checkPluginStatus(); switch ( pluginStatus ) { case PLUGIN_STATUS_INSTALLING: @@ -56,26 +74,37 @@ const EcommerceStateHandler = ( { children } ) => { break; case PLUGIN_STATUS_ACTIVE: await loadPreviewSettings(); - updatePluginStatus( pluginStatus ); + storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] = + pluginStatus; + setWoocommerceStatus( pluginStatus ); + updatePluginsStatus( storedPluginsStatus ); break; default: - updatePluginStatus( pluginStatus ); + storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] = + pluginStatus; + setWoocommerceStatus( pluginStatus ); + updatePluginsStatus( storedPluginsStatus ); } } - }, [ storedPluginStatus ] ); + }, [ storedPluginsStatus ] ); const handleRender = () => { - switch ( storedPluginStatus ) { + switch ( woocommerceStatus ) { case PLUGIN_STATUS_NOT_ACTIVE: return ( ); case PLUGIN_STATUS_ACTIVE: @@ -83,10 +112,14 @@ const EcommerceStateHandler = ( { children } ) => { default: return ( ); } diff --git a/src/OnboardingSPA/components/StateHandlers/index.js b/src/OnboardingSPA/components/StateHandlers/index.js index 0b2110d52..d91ae4080 100644 --- a/src/OnboardingSPA/components/StateHandlers/index.js +++ b/src/OnboardingSPA/components/StateHandlers/index.js @@ -1,2 +1,2 @@ export { default as DesignStateHandler } from './Design'; -export { default as EcommerceStateHandler } from './Ecommerce'; \ No newline at end of file +export { default as EcommerceStateHandler } from './Ecommerce'; diff --git a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js index 3e860235c..621514018 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemeStyles/Menu/index.js @@ -68,16 +68,19 @@ const StepDesignThemeStylesMenu = () => { }, [] ); const getStylesAndPatterns = async () => { - const pattern = await getPatterns( currentStep.patternId, true ); - if ( pattern?.error ) { + const patternsResponse = await getPatterns( + currentStep.patternId, + true + ); + if ( patternsResponse?.error ) { return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); } - const globalStyles = await getGlobalStyles(); - if ( globalStyles?.error ) { + const globalStylesResponse = await getGlobalStyles(); + if ( globalStylesResponse?.error ) { return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); } - setPattern( pattern?.body ); - setGlobalStyles( globalStyles?.body ); + setPattern( patternsResponse?.body ); + setGlobalStyles( globalStylesResponse?.body ); setSelectedStyle( currentData.data.theme.variation ); setIsLoaded( true ); }; @@ -102,6 +105,7 @@ const StepDesignThemeStylesMenu = () => { return globalStyles?.map( ( globalStyle, idx ) => { return ( { }, [] ); const getStylesAndPatterns = async () => { - const pattern = await getPatterns( currentStep.patternId, true ); - if ( pattern?.error ) { + const patternsResponse = await getPatterns( + currentStep.patternId, + true + ); + if ( patternsResponse?.error ) { return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); } - const globalStyles = await getGlobalStyles(); - if ( globalStyles?.error ) { + const globalStylesResponse = await getGlobalStyles(); + if ( globalStylesResponse?.error ) { return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); } let selectedGlobalStyle; if ( currentData.data.theme.variation ) { - selectedGlobalStyle = globalStyles.body.filter( + selectedGlobalStyle = globalStylesResponse.body.filter( ( globalStyle ) => globalStyle.title === currentData.data.theme.variation )[ 0 ]; } else { - selectedGlobalStyle = globalStyles.body[ 0 ]; + selectedGlobalStyle = globalStylesResponse.body[ 0 ]; } updatePreviewSettings( useGlobalStylesOutput( selectedGlobalStyle, storedPreviewSettings ) ); - setPattern( pattern?.body ); + setPattern( patternsResponse?.body ); setIsLoaded( true ); }; const addColorAndTypographyRoutes = () => { + const updates = removeColorAndTypographyRoutes(); const steps = [ conditionalSteps.designColors, conditionalSteps.designTypography, ]; return { routes: orderBy( - routes.concat( steps ), + updates.routes.concat( steps ), [ 'priority' ], [ 'asc' ] ), allSteps: orderBy( - allSteps.concat( steps ), + updates.allSteps.concat( steps ), [ 'priority' ], [ 'asc' ] ), designSteps: orderBy( - designSteps.concat( steps ), + updates.designSteps.concat( steps ), [ 'priority' ], [ 'asc' ] ), diff --git a/src/OnboardingSPA/store/actions.js b/src/OnboardingSPA/store/actions.js index 838e2859c..9e6258a6b 100644 --- a/src/OnboardingSPA/store/actions.js +++ b/src/OnboardingSPA/store/actions.js @@ -119,17 +119,17 @@ export function updateSettings( settings ) { } export function updateThemeStatus( themeStatus ) { - return { - type: 'UPDATE_THEME_STATUS', - themeStatus - } + return { + type: 'UPDATE_THEME_STATUS', + themeStatus, + }; } -export function updatePluginStatus( pluginStatus ) { - return { - type: 'UPDATE_PLUGIN_STATUS', - pluginStatus - } +export function updatePluginsStatus( pluginsStatus ) { + return { + type: 'UPDATE_PLUGINS_STATUS', + pluginsStatus, + }; } export function setIsSidebarOpened( isOpen ) { diff --git a/src/OnboardingSPA/store/reducer.js b/src/OnboardingSPA/store/reducer.js index 2a68f6627..128e35f35 100644 --- a/src/OnboardingSPA/store/reducer.js +++ b/src/OnboardingSPA/store/reducer.js @@ -1,6 +1,11 @@ import { combineReducers } from '@wordpress/data'; -import { VIEW_NAV_PRIMARY, THEME_STATUS_INIT, PLUGIN_STATUS_INIT } from '../../constants'; +import { + VIEW_NAV_PRIMARY, + THEME_STATUS_INIT, + PLUGIN_STATUS_INIT, + ECOMMERCE_STEPS_PLUGIN, +} from '../../constants'; import { routes as initialRoutes, @@ -148,23 +153,29 @@ export function runtime( state = {}, action ) { return state; } -export function settings( state = { themeStatus: THEME_STATUS_INIT, pluginStatus: PLUGIN_STATUS_INIT }, action ) { +export function settings( + state = { + themeStatus: THEME_STATUS_INIT, + pluginsStatus: { [ ECOMMERCE_STEPS_PLUGIN ]: PLUGIN_STATUS_INIT }, + }, + action +) { switch ( action.type ) { case 'UPDATE_SETTINGS': return { ...state, ...action.settings, }; - case 'UPDATE_THEME_STATUS': - return { - ...state, - themeStatus: action.themeStatus - }; - case 'UPDATE_PLUGIN_STATUS': - return { - ...state, - pluginStatus: action.pluginStatus - }; + case 'UPDATE_THEME_STATUS': + return { + ...state, + themeStatus: action.themeStatus, + }; + case 'UPDATE_PLUGINS_STATUS': + return { + ...state, + pluginsStatus: action.pluginsStatus, + }; } return state; diff --git a/src/OnboardingSPA/store/selectors.js b/src/OnboardingSPA/store/selectors.js index 10cc8853f..a83d985ac 100644 --- a/src/OnboardingSPA/store/selectors.js +++ b/src/OnboardingSPA/store/selectors.js @@ -237,8 +237,8 @@ export function getThemeStatus ( state ) { return state.settings.themeStatus; } -export function getPluginStatus ( state ) { - return state.settings.pluginStatus; +export function getPluginsStatus ( state ) { + return state.settings.pluginsStatus; } export function getStoreInfoSteps( state ) { diff --git a/src/OnboardingSPA/styles/_branding.scss b/src/OnboardingSPA/styles/_branding.scss index 65d97eb8f..a3d527234 100644 --- a/src/OnboardingSPA/styles/_branding.scss +++ b/src/OnboardingSPA/styles/_branding.scss @@ -1,4 +1,5 @@ body { + &.nfd-brand-bluehost { --wp-admin-theme-color: #3575d3; --wp-admin-theme-color--rgb: 53, 117, 211; @@ -25,9 +26,10 @@ body { --nfd-onboarding-border: 219, 219, 219; --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary); --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light); - --nfd-onboarding-step-loader-icon: url("../../Brands/bluehost/step-loader-logo.svg"); - --nfd-onboarding-step-error-icon: url("../../Brands/bluehost/step-error-logo.svg"); + --nfd-onboarding-step-loader-icon: url("../../Brands/bluehost/step-loader-logo.svg"); + --nfd-onboarding-step-error-icon: url("../../Brands/bluehost/step-error-logo.svg"); } + &.nfd-brand-hostgator { --wp-admin-theme-color: #2e93ee; --wp-admin-theme-color--rgb: 46, 147, 238; @@ -55,6 +57,7 @@ body { --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary); --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light); } + &.nfd-brand-webcom { --wp-admin-theme-color: #4b75fc; --wp-admin-theme-color--rgb: 75, 117, 252; @@ -80,8 +83,6 @@ body { --nfd-onboarding-dark: #000000; --nfd-onboarding-border: 219, 219, 219; --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary-alt); - --nfd-onboarding-drawer-icon-active-fill: var( - --nfd-onboarding-tertiary-alt - ); + --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-tertiary-alt); } } diff --git a/src/OnboardingSPA/utils/api/plugins.js b/src/OnboardingSPA/utils/api/plugins.js index 8785b5885..af7b8b8e8 100644 --- a/src/OnboardingSPA/utils/api/plugins.js +++ b/src/OnboardingSPA/utils/api/plugins.js @@ -22,7 +22,11 @@ export const init = () => { }; export const getPluginStatus = async ( plugin ) => { - return await resolve( - apiFetch( { url: onboardingRestURL( 'plugins/status' + ( plugin ? `&plugin=${plugin}` : '' ) ) } ) - ) -} + return await resolve( + apiFetch( { + url: onboardingRestURL( + 'plugins/status' + ( plugin ? `&plugin=${ plugin }` : '' ) + ), + } ) + ); +}; diff --git a/src/OnboardingSPA/utils/api/settings.js b/src/OnboardingSPA/utils/api/settings.js index c0c3a7a79..831f7e4cf 100644 --- a/src/OnboardingSPA/utils/api/settings.js +++ b/src/OnboardingSPA/utils/api/settings.js @@ -37,6 +37,6 @@ export const getPreviewSettings = async () => { return await resolve( apiFetch( { url: onboardingRestURL( 'settings/preview' ), - } ).then() + } ) ); } diff --git a/src/OnboardingSPA/utils/api/themes.js b/src/OnboardingSPA/utils/api/themes.js index d20daa337..4f21d60c1 100644 --- a/src/OnboardingSPA/utils/api/themes.js +++ b/src/OnboardingSPA/utils/api/themes.js @@ -25,9 +25,13 @@ const getGlobalStyles = async () => { }; const getThemeStatus = async ( theme ) => { - return await resolve( - apiFetch( { url: onboardingRestURL( 'themes/status' + ( theme ? `&theme=${theme}` : '' ) ) } ) - ) -} + return await resolve( + apiFetch( { + url: onboardingRestURL( + 'themes/status' + ( theme ? `&theme=${ theme }` : '' ) + ), + } ) + ); +}; export { init, getGlobalStyles, getThemeStatus }; diff --git a/src/constants.js b/src/constants.js index 32e207148..89a3c7878 100644 --- a/src/constants.js +++ b/src/constants.js @@ -30,16 +30,17 @@ export const MAX_RETRIES_SETTINGS_INIT = 2; export const NFD_PLUGINS_QUERY_PARAM = 'nfd_plugins'; export const NFD_THEMES_QUERY_PARAM = 'nfd_themes'; +// [TODO] Read the theme from flow data once we have the themes step. export const DESIGN_STEPS_THEME = 'nfd_slug_yith_wonder' export const THEME_STATUS_INIT = 'init'; -export const THEME_STATUS_NOT_ACTIVE = 'not_active'; +export const THEME_STATUS_NOT_ACTIVE = 'inactive'; export const THEME_STATUS_INSTALLING = 'installing'; export const THEME_STATUS_ACTIVE = 'activated'; export const THEME_INSTALL_WAIT_TIMEOUT = 30000 export const ECOMMERCE_STEPS_PLUGIN = 'woocommerce' export const PLUGIN_STATUS_INIT = 'init'; -export const PLUGIN_STATUS_NOT_ACTIVE = 'not_active'; +export const PLUGIN_STATUS_NOT_ACTIVE = 'inactive'; export const PLUGIN_STATUS_INSTALLING = 'installing'; export const PLUGIN_STATUS_ACTIVE = 'activated'; export const PLUGIN_INSTALL_WAIT_TIMEOUT = 30000 From fbd30e9999e7d2513a0363be285bc775828458df Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 29 Sep 2022 19:46:12 +0530 Subject: [PATCH 09/10] PRESS2-299 delete build folder --- build/0.2.1/onboarding.asset.php | 1 - ...teps_DesignThemeStyles_Preview_index_js.js | 873 ------------------ ..._DesignThemeStyles_Preview_index_js.js.map | 1 - 3 files changed, 875 deletions(-) delete mode 100644 build/0.2.1/onboarding.asset.php delete mode 100644 build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js delete mode 100644 build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map diff --git a/build/0.2.1/onboarding.asset.php b/build/0.2.1/onboarding.asset.php deleted file mode 100644 index b14bfe930..000000000 --- a/build/0.2.1/onboarding.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'e279bcffcf4c0c9af1b7565710e66060'); \ No newline at end of file diff --git a/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js b/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js deleted file mode 100644 index 7e1a63adf..000000000 --- a/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js +++ /dev/null @@ -1,873 +0,0 @@ -"use strict"; -(self["webpackChunknewfold_Onboarding"] = self["webpackChunknewfold_Onboarding"] || []).push([["src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js"],{ - -/***/ "./src/OnboardingSPA/components/ErrorState/Step/index.js": -/*!***************************************************************!*\ - !*** ./src/OnboardingSPA/components/ErrorState/Step/index.js ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Layouts_Common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Layouts/Common */ "./src/OnboardingSPA/components/Layouts/Common.js"); -/* harmony import */ var _HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../HeadingWithSubHeading */ "./src/OnboardingSPA/components/HeadingWithSubHeading/index.js"); -/* harmony import */ var _NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../NeedHelpTag */ "./src/OnboardingSPA/components/NeedHelpTag/index.js"); - - - - - -const StepErrorState = _ref => { - let { - title, - subtitle, - error - } = _ref; - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Layouts_Common__WEBPACK_IMPORTED_MODULE_1__["default"], { - className: "step-error-state", - isVerticallyCentered: true - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__["default"], { - title: title, - subtitle: subtitle - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "step-error-state__logo" - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", { - className: "step-error-state__error" - }, error), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__["default"], null)); -}; - -/* harmony default export */ __webpack_exports__["default"] = (StepErrorState); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/ErrorState/index.js": -/*!**********************************************************!*\ - !*** ./src/OnboardingSPA/components/ErrorState/index.js ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StepErrorState": function() { return /* reexport safe */ _Step__WEBPACK_IMPORTED_MODULE_0__["default"]; } -/* harmony export */ }); -/* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Step */ "./src/OnboardingSPA/components/ErrorState/Step/index.js"); - - -/***/ }), - -/***/ "./src/OnboardingSPA/components/HeadingWithSubHeading/index.js": -/*!*********************************************************************!*\ - !*** ./src/OnboardingSPA/components/HeadingWithSubHeading/index.js ***! - \*********************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); - - -/** - * Interface Cards with standard design. - * - * @returns - */ - -const HeadingWithSubHeading = _ref => { - let { - title, - subtitle - } = _ref; - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "nfd-main-heading" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", { - className: "nfd-main-heading__title" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)(title, "wp-module-onboarding")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", { - className: "nfd-main-heading__subtitle" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)(subtitle, "wp-module-onboarding"))); -}; - -/* harmony default export */ __webpack_exports__["default"] = (HeadingWithSubHeading); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/Layouts/Base.js": -/*!******************************************************!*\ - !*** ./src/OnboardingSPA/components/Layouts/Base.js ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/a11y */ "@wordpress/a11y"); -/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js"); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants */ "./src/constants.js"); -/* harmony import */ var _utils_api_events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/api/events */ "./src/OnboardingSPA/utils/api/events.js"); - - - - - - - -/** - * The Base Layout has no prescribed styles, only shared functionality like focus-management and analytics. - * - * @param {object} props - * @returns - */ - -const BaseLayout = _ref => { - let { - className = 'nfd-onboarding-layout__base', - children - } = _ref; - const location = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_5__.useLocation)(); - const mainContainer = document.querySelector('.nfd-onboard-content'); - - const speakRouteTitle = function (location) { - let title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Showing new Onboarding Page'; - // [TODO]: Determine if some routes should not speak the title - (0,_wordpress_a11y__WEBPACK_IMPORTED_MODULE_2__.speak)(title, 'assertive'); - }; - - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - mainContainer === null || mainContainer === void 0 ? void 0 : mainContainer.focus({ - preventScroll: true - }); - speakRouteTitle(location, 'Override'); - new _utils_api_events__WEBPACK_IMPORTED_MODULE_4__["default"](`${_constants__WEBPACK_IMPORTED_MODULE_3__.NFD_ONBOARDING_EVENT_PREFIX}-pageview`, { - stepID: location.pathname, - previousStepID: window.nfdOnboarding.previousStepID - }).send(); - window.nfdOnboarding.previousStepID = location.pathname; - }, [location.pathname]); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('nfd-onboarding-layout', className) - }, children); -}; - -/* harmony default export */ __webpack_exports__["default"] = (BaseLayout); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/Layouts/Common.js": -/*!********************************************************!*\ - !*** ./src/OnboardingSPA/components/Layouts/Common.js ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Base */ "./src/OnboardingSPA/components/Layouts/Base.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); - - - - - -/** - * - * @param {*} param0 - * @returns - */ - -const InnerContainer = _ref => { - let { - children - } = _ref; - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { - className: "is-contained" - }, children); -}; -/** - * The Common Layout extends the Base Layout and applies structural styles and animations. - * - * @param {object} props - * @returns - */ - - -const CommonLayout = _ref2 => { - let { - className = '', - children, - isBgPrimary = false, - isCentered = false, - isVerticallyCentered = false, - isContained = false, - isPadded = false, - isFadeIn = true - } = _ref2; - const Container = isContained ? InnerContainer : _wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment; - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Base__WEBPACK_IMPORTED_MODULE_2__["default"], { - className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('nfd-onboarding-layout__common', className, { - 'is-layout-fade-in': isFadeIn - }, { - 'is-bg-primary': isBgPrimary - }, { - 'is-centered': isCentered - }, { - 'is-vertically-centered': isVerticallyCentered - }, { - 'is-padded': isPadded - }) - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Container, null, children)); -}; - -/* harmony default export */ __webpack_exports__["default"] = (CommonLayout); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/Loaders/ImageUpload/index.js": -/*!*******************************************************************!*\ - !*** ./src/OnboardingSPA/components/Loaders/ImageUpload/index.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -const ImageUploadLoader = () => { - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "image-upload-loader--loading-box" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "image-upload-loader--loading-box__loader" - })); -}; - -/* harmony default export */ __webpack_exports__["default"] = (ImageUploadLoader); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/Loaders/Step/index.js": -/*!************************************************************!*\ - !*** ./src/OnboardingSPA/components/Loaders/Step/index.js ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Layouts_Common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Layouts/Common */ "./src/OnboardingSPA/components/Layouts/Common.js"); -/* harmony import */ var _HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../HeadingWithSubHeading */ "./src/OnboardingSPA/components/HeadingWithSubHeading/index.js"); -/* harmony import */ var _NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../NeedHelpTag */ "./src/OnboardingSPA/components/NeedHelpTag/index.js"); - - - - - -const StepLoader = _ref => { - let { - title, - subtitle - } = _ref; - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Layouts_Common__WEBPACK_IMPORTED_MODULE_1__["default"], { - className: "step-loader", - isVerticallyCentered: true - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_HeadingWithSubHeading__WEBPACK_IMPORTED_MODULE_2__["default"], { - title: title, - subtitle: subtitle - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "step-loader__logo-container" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "step-loader__logo" - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_NeedHelpTag__WEBPACK_IMPORTED_MODULE_3__["default"], null)); -}; - -/* harmony default export */ __webpack_exports__["default"] = (StepLoader); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/Loaders/index.js": -/*!*******************************************************!*\ - !*** ./src/OnboardingSPA/components/Loaders/index.js ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ImageUploadLoader": function() { return /* reexport safe */ _ImageUpload__WEBPACK_IMPORTED_MODULE_1__["default"]; }, -/* harmony export */ "StepLoader": function() { return /* reexport safe */ _Step__WEBPACK_IMPORTED_MODULE_0__["default"]; } -/* harmony export */ }); -/* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Step */ "./src/OnboardingSPA/components/Loaders/Step/index.js"); -/* harmony import */ var _ImageUpload__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ImageUpload */ "./src/OnboardingSPA/components/Loaders/ImageUpload/index.js"); - - - -/***/ }), - -/***/ "./src/OnboardingSPA/components/NeedHelpTag/index.js": -/*!***********************************************************!*\ - !*** ./src/OnboardingSPA/components/NeedHelpTag/index.js ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../store */ "./src/OnboardingSPA/store/index.js"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); - - - - -/** - * Need Help Label and URL rendering component for most of the onboarding steps - * Pass any Label and URL redirect which we want as is to display on the UI - * - * @param content - * @return NeedHelpTag - */ - -const NeedHelpTag = _ref => { - let { - question = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Need Help?', 'wp-module-onboarding'), - urlLabel = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Hire our Experts', 'wp-module-onboarding') - } = _ref; - const hireExpertsUrl = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)(_store__WEBPACK_IMPORTED_MODULE_1__.store).getHireExpertsUrl(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "nfd-card-need-help-tag" - }, question, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { - href: hireExpertsUrl, - target: '_blank' - }, urlLabel)); -}; - -/* harmony default export */ __webpack_exports__["default"] = (NeedHelpTag); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/StateHandlers/Design/index.js": -/*!********************************************************************!*\ - !*** ./src/OnboardingSPA/components/StateHandlers/Design/index.js ***! - \********************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _Loaders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Loaders */ "./src/OnboardingSPA/components/Loaders/index.js"); -/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../store */ "./src/OnboardingSPA/store/index.js"); -/* harmony import */ var _utils_api_themes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/api/themes */ "./src/OnboardingSPA/utils/api/themes.js"); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../constants */ "./src/constants.js"); -/* harmony import */ var _utils_api_settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/api/settings */ "./src/OnboardingSPA/utils/api/settings.js"); -/* harmony import */ var _ErrorState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ErrorState */ "./src/OnboardingSPA/components/ErrorState/index.js"); - - - - - - - - - - - -const DesignStateHandler = _ref => { - let { - children - } = _ref; - const { - storedThemeStatus - } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { - return { - storedThemeStatus: select(_store__WEBPACK_IMPORTED_MODULE_4__.store).getThemeStatus() - }; - }, []); - const { - updateThemeStatus, - updatePreviewSettings - } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_4__.store); - - const checkThemeStatus = async () => { - const themeStatus = await (0,_utils_api_themes__WEBPACK_IMPORTED_MODULE_5__.getThemeStatus)(_constants__WEBPACK_IMPORTED_MODULE_6__.DESIGN_STEPS_THEME); - - if (themeStatus !== null && themeStatus !== void 0 && themeStatus.error) { - return _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_NOT_ACTIVE; - } - - return themeStatus.body.status; - }; - - const loadPreviewSettings = async () => { - const previewSettings = await (0,_utils_api_settings__WEBPACK_IMPORTED_MODULE_7__.getPreviewSettings)(); - - if (previewSettings !== null && previewSettings !== void 0 && previewSettings.body) { - updatePreviewSettings(previewSettings.body); - } - }; - - const waitForInstall = () => { - setTimeout(async () => { - const themeStatus = await checkThemeStatus(); - - if (themeStatus !== _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_ACTIVE) { - return updateThemeStatus(_constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_NOT_ACTIVE); - } - - updateThemeStatus(themeStatus); - await loadPreviewSettings(); - }, _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_INSTALL_WAIT_TIMEOUT); - }; - - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(async () => { - if (storedThemeStatus === _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_INIT) { - const themeStatus = await checkThemeStatus(); - - switch (themeStatus) { - case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_INSTALLING: - waitForInstall(); - break; - - case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_ACTIVE: - await loadPreviewSettings(); - updateThemeStatus(themeStatus); - break; - - default: - updateThemeStatus(themeStatus); - } - } - }, [storedThemeStatus]); - - const handleRender = () => { - switch (storedThemeStatus) { - case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_NOT_ACTIVE: - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ErrorState__WEBPACK_IMPORTED_MODULE_8__.StepErrorState, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preparing your Bluehost design studio', 'wp-module-onboarding'), - subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Hang tight while we show you some of the best WordPress has to offer!', 'wp-module-onboarding'), - error: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Uh-oh, something went wrong. Please contact support.', 'wp-module-onboarding') - }); - - case _constants__WEBPACK_IMPORTED_MODULE_6__.THEME_STATUS_ACTIVE: - return children; - - default: - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Loaders__WEBPACK_IMPORTED_MODULE_3__.StepLoader, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Preparing your Bluehost design studio', 'wp-module-onboarding'), - subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Hang tight while we show you some of the best WordPress has to offer!', 'wp-module-onboarding') - }); - } - }; - - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, handleRender()); -}; - -/* harmony default export */ __webpack_exports__["default"] = (DesignStateHandler); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js": -/*!***********************************************************************!*\ - !*** ./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _Loaders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Loaders */ "./src/OnboardingSPA/components/Loaders/index.js"); -/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../store */ "./src/OnboardingSPA/store/index.js"); -/* harmony import */ var _utils_api_plugins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/api/plugins */ "./src/OnboardingSPA/utils/api/plugins.js"); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../constants */ "./src/constants.js"); -/* harmony import */ var _utils_api_settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/api/settings */ "./src/OnboardingSPA/utils/api/settings.js"); -/* harmony import */ var _ErrorState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ErrorState */ "./src/OnboardingSPA/components/ErrorState/index.js"); - - - - - - - - - - - -const EcommerceStateHandler = _ref => { - let { - children - } = _ref; - const [woocommerceStatus, setWoocommerceStatus] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(_constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_INSTALLING); - const { - storedPluginsStatus - } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { - return { - storedPluginsStatus: select(_store__WEBPACK_IMPORTED_MODULE_4__.store).getPluginsStatus() - }; - }, []); - const { - updatePluginsStatus, - updatePreviewSettings - } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_4__.store); - - const checkPluginStatus = async () => { - const pluginStatus = await (0,_utils_api_plugins__WEBPACK_IMPORTED_MODULE_5__.getPluginStatus)(_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN); - - if (pluginStatus !== null && pluginStatus !== void 0 && pluginStatus.error) { - return _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE; - } - - return pluginStatus.body.status; - }; - - const loadPreviewSettings = async () => { - const previewSettings = await (0,_utils_api_settings__WEBPACK_IMPORTED_MODULE_7__.getPreviewSettings)(); - - if (previewSettings !== null && previewSettings !== void 0 && previewSettings.body) { - updatePreviewSettings(previewSettings.body); - } - }; - - const waitForInstall = () => { - setTimeout(async () => { - const pluginStatus = await checkPluginStatus(); - - if (pluginStatus !== _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_ACTIVE) { - storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE; - setWoocommerceStatus(_constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE); - return updatePluginsStatus(storedPluginsStatus); - } - - storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = pluginStatus; - setWoocommerceStatus(pluginStatus); - updatePluginsStatus(storedPluginsStatus); - await loadPreviewSettings(); - }, _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_INSTALL_WAIT_TIMEOUT); - }; - - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(async () => { - setWoocommerceStatus(storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN]); - - if (storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] === _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_INIT) { - const pluginStatus = await checkPluginStatus(); - - switch (pluginStatus) { - case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_INSTALLING: - waitForInstall(); - break; - - case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_ACTIVE: - await loadPreviewSettings(); - storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = pluginStatus; - setWoocommerceStatus(pluginStatus); - updatePluginsStatus(storedPluginsStatus); - break; - - default: - storedPluginsStatus[_constants__WEBPACK_IMPORTED_MODULE_6__.ECOMMERCE_STEPS_PLUGIN] = pluginStatus; - setWoocommerceStatus(pluginStatus); - updatePluginsStatus(storedPluginsStatus); - } - } - }, [storedPluginsStatus]); - - const handleRender = () => { - switch (woocommerceStatus) { - case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_NOT_ACTIVE: - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ErrorState__WEBPACK_IMPORTED_MODULE_8__.StepErrorState, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Making the keys to your Bluehost Online Store', 'wp-module-onboarding'), - subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('We’re installing WooCommerce for you to fill with your amazing products & services!', 'wp-module-onboarding'), - error: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Uh-oh, something went wrong. Please contact support.', 'wp-module-onboarding') - }); - - case _constants__WEBPACK_IMPORTED_MODULE_6__.PLUGIN_STATUS_ACTIVE: - return children; - - default: - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Loaders__WEBPACK_IMPORTED_MODULE_3__.StepLoader, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Making the keys to your Bluehost Online Store', 'wp-module-onboarding'), - subtitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('We’re installing WooCommerce for you to fill with your amazing products & services!', 'wp-module-onboarding') - }); - } - }; - - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, handleRender()); -}; - -/* harmony default export */ __webpack_exports__["default"] = (EcommerceStateHandler); - -/***/ }), - -/***/ "./src/OnboardingSPA/components/StateHandlers/index.js": -/*!*************************************************************!*\ - !*** ./src/OnboardingSPA/components/StateHandlers/index.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "DesignStateHandler": function() { return /* reexport safe */ _Design__WEBPACK_IMPORTED_MODULE_0__["default"]; }, -/* harmony export */ "EcommerceStateHandler": function() { return /* reexport safe */ _Ecommerce__WEBPACK_IMPORTED_MODULE_1__["default"]; } -/* harmony export */ }); -/* harmony import */ var _Design__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Design */ "./src/OnboardingSPA/components/StateHandlers/Design/index.js"); -/* harmony import */ var _Ecommerce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Ecommerce */ "./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js"); - - - -/***/ }), - -/***/ "./src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js": -/*!**************************************************************************!*\ - !*** ./src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js ***! - \**************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _components_LivePreview__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../components/LivePreview */ "./src/OnboardingSPA/components/LivePreview/index.js"); -/* harmony import */ var _components_Layouts_Common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../components/Layouts/Common */ "./src/OnboardingSPA/components/Layouts/Common.js"); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../constants */ "./src/constants.js"); -/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../store */ "./src/OnboardingSPA/store/index.js"); -/* harmony import */ var _utils_api_patterns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../utils/api/patterns */ "./src/OnboardingSPA/utils/api/patterns.js"); -/* harmony import */ var _utils_api_themes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../utils/api/themes */ "./src/OnboardingSPA/utils/api/themes.js"); -/* harmony import */ var _utils_global_styles_use_global_styles_output__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../utils/global-styles/use-global-styles-output */ "./src/OnboardingSPA/utils/global-styles/use-global-styles-output.js"); -/* harmony import */ var _data_routes___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../data/routes/ */ "./src/OnboardingSPA/data/routes/index.js"); -/* harmony import */ var _components_StateHandlers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../components/StateHandlers */ "./src/OnboardingSPA/components/StateHandlers/index.js"); - - - - - - - - - - - - - - - - - - -const StepDesignThemeStylesPreview = () => { - const location = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_15__.useLocation)(); - const [isLoaded, setIsLoaded] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); - const [pattern, setPattern] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(); - const [customize, setCustomize] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); - const isLargeViewport = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__.useViewportMatch)('medium'); - const { - currentStep, - currentData, - storedPreviewSettings, - routes, - designSteps, - allSteps, - themeStatus - } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { - return { - currentStep: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getStepFromPath(location.pathname), - currentData: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getCurrentOnboardingData(), - storedPreviewSettings: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getPreviewSettings(), - routes: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getRoutes(), - allSteps: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getAllSteps(), - designSteps: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getDesignSteps(), - themeStatus: select(_store__WEBPACK_IMPORTED_MODULE_9__.store).getThemeStatus() - }; - }, []); - const { - setDrawerActiveView, - setIsDrawerOpened, - setIsSidebarOpened, - setIsDrawerSuppressed, - updatePreviewSettings, - updateRoutes, - updateDesignSteps, - updateAllSteps, - setCurrentOnboardingData, - updateThemeStatus - } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_9__.store); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - if (isLargeViewport) { - setIsDrawerOpened(true); - } - - setIsSidebarOpened(false); - setIsDrawerSuppressed(false); - setDrawerActiveView(_constants__WEBPACK_IMPORTED_MODULE_8__.VIEW_DESIGN_THEME_STYLES_PREVIEW); - handleCheckbox(currentData.data.customDesign, false); - }, []); - - const getStylesAndPatterns = async () => { - const patternsResponse = await (0,_utils_api_patterns__WEBPACK_IMPORTED_MODULE_10__.getPatterns)(currentStep.patternId, true); - - if (patternsResponse !== null && patternsResponse !== void 0 && patternsResponse.error) { - return updateThemeStatus(_constants__WEBPACK_IMPORTED_MODULE_8__.THEME_STATUS_NOT_ACTIVE); - } - - const globalStylesResponse = await (0,_utils_api_themes__WEBPACK_IMPORTED_MODULE_11__.getGlobalStyles)(); - - if (globalStylesResponse !== null && globalStylesResponse !== void 0 && globalStylesResponse.error) { - return updateThemeStatus(_constants__WEBPACK_IMPORTED_MODULE_8__.THEME_STATUS_NOT_ACTIVE); - } - - let selectedGlobalStyle; - - if (currentData.data.theme.variation) { - selectedGlobalStyle = globalStylesResponse.body.filter(globalStyle => globalStyle.title === currentData.data.theme.variation)[0]; - } else { - selectedGlobalStyle = globalStylesResponse.body[0]; - } - - updatePreviewSettings((0,_utils_global_styles_use_global_styles_output__WEBPACK_IMPORTED_MODULE_12__.useGlobalStylesOutput)(selectedGlobalStyle, storedPreviewSettings)); - setPattern(patternsResponse === null || patternsResponse === void 0 ? void 0 : patternsResponse.body); - setIsLoaded(true); - }; - - const addColorAndTypographyRoutes = () => { - const updates = removeColorAndTypographyRoutes(); - const steps = [_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors, _data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography]; - return { - routes: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.orderBy)(updates.routes.concat(steps), ['priority'], ['asc']), - allSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.orderBy)(updates.allSteps.concat(steps), ['priority'], ['asc']), - designSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.orderBy)(updates.designSteps.concat(steps), ['priority'], ['asc']) - }; - }; - - const removeColorAndTypographyRoutes = () => { - return { - routes: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.filter)(routes, route => !route.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors.path) && !route.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography.path)), - allSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.filter)(allSteps, allStep => !allStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors.path) && !allStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography.path)), - designSteps: (0,lodash__WEBPACK_IMPORTED_MODULE_5__.filter)(designSteps, designStep => !designStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designColors.path) && !designStep.path.includes(_data_routes___WEBPACK_IMPORTED_MODULE_13__.conditionalSteps.designTypography.path)) - }; - }; - - const handleCheckbox = function (customize) { - let updateOnboardingData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - let updates; - - if (customize) { - updates = addColorAndTypographyRoutes(); - } else { - updates = removeColorAndTypographyRoutes(); - } - - updateRoutes(updates.routes); - updateDesignSteps(updates.designSteps); - updateAllSteps(updates.allSteps); - setCustomize(customize); - - if (updateOnboardingData) { - currentData.data.customDesign = customize; - setCurrentOnboardingData(currentData); - } - }; - - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - if (!isLoaded && themeStatus === _constants__WEBPACK_IMPORTED_MODULE_8__.THEME_STATUS_ACTIVE) getStylesAndPatterns(); - }, [isLoaded, themeStatus]); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_StateHandlers__WEBPACK_IMPORTED_MODULE_14__.DesignStateHandler, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Layouts_Common__WEBPACK_IMPORTED_MODULE_7__["default"], { - className: "theme-styles-preview" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "theme-styles-preview__checkbox" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, { - label: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "theme-styles-preview__checkbox__label" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { - className: "theme-styles-preview__checkbox__label__question" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Customize Colors & Fonts?', 'wp-module-onboarding'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { - className: "theme-styles-preview__checkbox__label__hint" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Check to customize in the next few steps (or leave empty and use the Site Editor later)', 'wp-module-onboarding')))), - checked: customize, - onChange: () => handleCheckbox(!customize) - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "theme-styles-preview__title-bar" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "theme-styles-preview__title-bar__browser" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { - className: "theme-styles-preview__title-bar__browser__dot" - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { - className: "theme-styles-preview__title-bar__browser__dot" - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { - className: "theme-styles-preview__title-bar__browser__dot" - }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "theme-styles-preview__live-preview-container" - }, pattern && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_LivePreview__WEBPACK_IMPORTED_MODULE_6__.LivePreview, { - blockGrammer: pattern, - styling: 'custom', - viewportWidth: 1300 - })))); -}; - -/* harmony default export */ __webpack_exports__["default"] = (StepDesignThemeStylesPreview); - -/***/ }), - -/***/ "./src/OnboardingSPA/utils/api/events.js": -/*!***********************************************!*\ - !*** ./src/OnboardingSPA/utils/api/events.js ***! - \***********************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); -/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common */ "./src/OnboardingSPA/utils/api/common.js"); - - - -class Event { - constructor(eventSlug) { - let eventData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - this.eventSlug = eventSlug; - this.eventData = eventData; - } - - send() { - _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ - url: (0,_common__WEBPACK_IMPORTED_MODULE_1__.onboardingRestURL)('events'), - method: 'POST', - data: { - slug: this.eventSlug, - data: this.eventData - } - }).catch(error => { - console.error(error); - }); - } - -} - -/* harmony default export */ __webpack_exports__["default"] = (Event); - -/***/ }) - -}]); -//# sourceMappingURL=src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map \ No newline at end of file diff --git a/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map b/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js.map deleted file mode 100644 index 95c4fa35b..000000000 --- a/build/0.2.1/src_OnboardingSPA_pages_Steps_DesignThemeStyles_Preview_index_js.js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ACR,kEAAC,gEAAD;AACC,gBAAY,EAAGA,OADhB;AAEC,WAAO,EAAG,QAFX;AAGC,iBAAa,EAAG;AAHjB,IAFF,CA9BD,CADD,CADD;AA4CA,CAnND;;AAqNA,+DAAeH,4BAAf;;;;;;;;;;;;;;AC3OA;AAEA;;AAEA,MAAMtF,KAAN,CAAY;AACX2I,EAAAA,WAAW,CAAEC,SAAF,EAA8B;AAAA,QAAjBC,SAAiB,uEAAL,EAAK;AACxC,SAAKD,SAAL,GAAiBA,SAAjB;AACA,SAAKC,SAAL,GAAiBA,SAAjB;AACA;;AAED7H,EAAAA,IAAI,GAAG;AACNyH,IAAAA,2DAAQ,CAAE;AACTK,MAAAA,GAAG,EAAEJ,0DAAiB,CAAE,QAAF,CADb;AAETK,MAAAA,MAAM,EAAE,MAFC;AAGT7B,MAAAA,IAAI,EAAE;AACL8B,QAAAA,IAAI,EAAE,KAAKJ,SADN;AAEL1B,QAAAA,IAAI,EAAE,KAAK2B;AAFN;AAHG,KAAF,CAAR,CAOII,KAPJ,CAOaxJ,KAAF,IAAa;AACvByJ,MAAAA,OAAO,CAACzJ,KAAR,CAAeA,KAAf;AACA,KATD;AAUA;;AAjBU;;AAoBZ,+DAAeO,KAAf","sources":["webpack://newfold.Onboarding/./src/OnboardingSPA/components/ErrorState/Step/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/HeadingWithSubHeading/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Layouts/Base.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Layouts/Common.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Loaders/ImageUpload/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Loaders/Step/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/Loaders/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/NeedHelpTag/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/StateHandlers/Design/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/StateHandlers/Ecommerce/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/components/StateHandlers/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/pages/Steps/DesignThemeStyles/Preview/index.js","webpack://newfold.Onboarding/./src/OnboardingSPA/utils/api/events.js"],"sourcesContent":["import CommonLayout from '../../Layouts/Common';\nimport HeadingWithSubHeading from '../../HeadingWithSubHeading';\nimport NeedHelpTag from '../../NeedHelpTag';\n\nconst StepErrorState = ( { title, subtitle, error } ) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t
\n\t\t\t

{ error }

\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default StepErrorState;\n","import { __ } from '@wordpress/i18n';\n\n/**\n * Interface Cards with standard design.\n *\n * @returns\n */\nconst HeadingWithSubHeading = ({ title, subtitle }) => {\n\n\treturn (\n\t\t
\n\t\t\t

{__(\n\t\t\t\ttitle,\n\t\t\t\t\"wp-module-onboarding\"\n\t\t\t)}

\n\t\t\t

{__(\n\t\t\t\tsubtitle,\n\t\t\t\t\"wp-module-onboarding\"\n\t\t\t)}

\n\t\t
\n\t);\n};\n\nexport default HeadingWithSubHeading;\n","import classNames from 'classnames';\nimport { speak } from '@wordpress/a11y';\nimport { useEffect } from '@wordpress/element';\nimport { useLocation } from 'react-router-dom';\n\nimport { NFD_ONBOARDING_EVENT_PREFIX } from '../../../constants';\nimport Event from '../../utils/api/events';\n\n/**\n * The Base Layout has no prescribed styles, only shared functionality like focus-management and analytics.\n *\n * @param {object} props\n * @returns\n */\nconst BaseLayout = ({\n\tclassName = 'nfd-onboarding-layout__base',\n\tchildren,\n}) => {\n\tconst location = useLocation();\n\tconst mainContainer = document.querySelector('.nfd-onboard-content');\n\n\tconst speakRouteTitle = (\n\t\tlocation,\n\t\ttitle = 'Showing new Onboarding Page'\n\t) => {\n\t\t// [TODO]: Determine if some routes should not speak the title\n\t\tspeak(title, 'assertive');\n\t};\n\n\tuseEffect(() => {\n\t\tmainContainer?.focus({ preventScroll: true });\n\t\tspeakRouteTitle(location, 'Override');\n new Event(`${NFD_ONBOARDING_EVENT_PREFIX}-pageview`, {\n stepID: location.pathname,\n previousStepID: window.nfdOnboarding.previousStepID\n }).send();\n window.nfdOnboarding.previousStepID = location.pathname\n\t}, [location.pathname]);\n\n\treturn (\n\t\t
\n\t\t\t{children}\n\t\t
\n\t);\n};\n\nexport default BaseLayout;\n","import { Animate } from '@wordpress/components';\nimport BaseLayout from './Base';\nimport { Fragment } from '@wordpress/element';\nimport classNames from 'classnames';\n\n/**\n *\n * @param {*} param0\n * @returns\n */\nconst InnerContainer = ({ children }) => {\n\treturn
{children}
;\n};\n\n/**\n * The Common Layout extends the Base Layout and applies structural styles and animations.\n *\n * @param {object} props\n * @returns\n */\nconst CommonLayout = ({\n\tclassName = '',\n\tchildren,\n\tisBgPrimary = false,\n\tisCentered = false,\n\tisVerticallyCentered = false,\n\tisContained = false,\n\tisPadded = false,\n\tisFadeIn = true,\n}) => {\n\tconst Container = isContained ? InnerContainer : Fragment;\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n\nexport default CommonLayout;\n","const ImageUploadLoader = () => {\n\treturn (\n\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default ImageUploadLoader;\n","import CommonLayout from '../../Layouts/Common';\nimport HeadingWithSubHeading from '../../HeadingWithSubHeading';\nimport NeedHelpTag from '../../NeedHelpTag';\n\nconst StepLoader = ( { title, subtitle } ) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default StepLoader;\n","export { default as StepLoader } from \"./Step\";\nexport { default as ImageUploadLoader } from \"./ImageUpload\";\n","import { store as nfdOnboardingStore } from '../../store';\nimport { select } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Need Help Label and URL rendering component for most of the onboarding steps\n * Pass any Label and URL redirect which we want as is to display on the UI\n *\n * @param content\n * @return NeedHelpTag\n */\n\nconst NeedHelpTag = ( {\n\tquestion = __('Need Help?', 'wp-module-onboarding'),\n\turlLabel = __('Hire our Experts', 'wp-module-onboarding'),\n} ) => {\n\tconst hireExpertsUrl = select( nfdOnboardingStore ).getHireExpertsUrl();\n\treturn (\n\t\t
\n\t\t\t{ question }\n\t\t\t\n\t\t\t\t{ urlLabel }\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default NeedHelpTag;\n","import { useSelect, useDispatch } from '@wordpress/data';\nimport { Fragment, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\nimport { StepLoader } from '../../Loaders';\nimport { store as nfdOnboardingStore } from '../../../store';\nimport { getThemeStatus } from '../../../utils/api/themes';\nimport {\n\tTHEME_STATUS_INIT,\n\tTHEME_STATUS_INSTALLING,\n\tTHEME_STATUS_NOT_ACTIVE,\n\tTHEME_STATUS_ACTIVE,\n\tDESIGN_STEPS_THEME,\n\tTHEME_INSTALL_WAIT_TIMEOUT,\n} from '../../../../constants';\nimport { getPreviewSettings } from '../../../utils/api/settings';\nimport { StepErrorState } from '../../ErrorState';\n\nconst DesignStateHandler = ( { children } ) => {\n\tconst { storedThemeStatus } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tstoredThemeStatus: select( nfdOnboardingStore ).getThemeStatus(),\n\t\t};\n\t}, [] );\n\n\tconst { updateThemeStatus, updatePreviewSettings } =\n\t\tuseDispatch( nfdOnboardingStore );\n\n\tconst checkThemeStatus = async () => {\n\t\tconst themeStatus = await getThemeStatus( DESIGN_STEPS_THEME );\n\t\tif ( themeStatus?.error ) {\n\t\t\treturn THEME_STATUS_NOT_ACTIVE;\n\t\t}\n\t\treturn themeStatus.body.status;\n\t};\n\n\tconst loadPreviewSettings = async () => {\n\t\tconst previewSettings = await getPreviewSettings();\n\t\tif ( previewSettings?.body ) {\n\t\t\tupdatePreviewSettings( previewSettings.body );\n\t\t}\n\t};\n\n\tconst waitForInstall = () => {\n\t\tsetTimeout( async () => {\n\t\t\tconst themeStatus = await checkThemeStatus();\n\t\t\tif ( themeStatus !== THEME_STATUS_ACTIVE ) {\n\t\t\t\treturn updateThemeStatus( THEME_STATUS_NOT_ACTIVE );\n\t\t\t}\n\t\t\tupdateThemeStatus( themeStatus );\n\t\t\tawait loadPreviewSettings();\n\t\t}, THEME_INSTALL_WAIT_TIMEOUT );\n\t};\n\n\tuseEffect( async () => {\n\t\tif ( storedThemeStatus === THEME_STATUS_INIT ) {\n\t\t\tconst themeStatus = await checkThemeStatus();\n\t\t\tswitch ( themeStatus ) {\n\t\t\t\tcase THEME_STATUS_INSTALLING:\n\t\t\t\t\twaitForInstall();\n\t\t\t\t\tbreak;\n\t\t\t\tcase THEME_STATUS_ACTIVE:\n\t\t\t\t\tawait loadPreviewSettings();\n\t\t\t\t\tupdateThemeStatus( themeStatus );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tupdateThemeStatus( themeStatus );\n\t\t\t}\n\t\t}\n\t}, [ storedThemeStatus ] );\n\n\tconst handleRender = () => {\n\t\tswitch ( storedThemeStatus ) {\n\t\t\tcase THEME_STATUS_NOT_ACTIVE:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase THEME_STATUS_ACTIVE:\n\t\t\t\treturn children;\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}\n\t};\n\n\treturn { handleRender() };\n};\n\nexport default DesignStateHandler;\n","import { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\nimport { StepLoader } from '../../Loaders';\nimport { store as nfdOnboardingStore } from '../../../store';\nimport { getPluginStatus } from '../../../utils/api/plugins';\nimport {\n\tPLUGIN_STATUS_INIT,\n\tPLUGIN_STATUS_INSTALLING,\n\tPLUGIN_STATUS_NOT_ACTIVE,\n\tPLUGIN_STATUS_ACTIVE,\n\tECOMMERCE_STEPS_PLUGIN,\n\tPLUGIN_INSTALL_WAIT_TIMEOUT,\n} from '../../../../constants';\nimport { getPreviewSettings } from '../../../utils/api/settings';\nimport { StepErrorState } from '../../ErrorState';\n\nconst EcommerceStateHandler = ( { children } ) => {\n\tconst [ woocommerceStatus, setWoocommerceStatus ] = useState(\n\t\tPLUGIN_STATUS_INSTALLING\n\t);\n\n\tconst { storedPluginsStatus } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tstoredPluginsStatus:\n\t\t\t\tselect( nfdOnboardingStore ).getPluginsStatus(),\n\t\t};\n\t}, [] );\n\n\tconst { updatePluginsStatus, updatePreviewSettings } =\n\t\tuseDispatch( nfdOnboardingStore );\n\n\tconst checkPluginStatus = async () => {\n\t\tconst pluginStatus = await getPluginStatus( ECOMMERCE_STEPS_PLUGIN );\n\t\tif ( pluginStatus?.error ) {\n\t\t\treturn PLUGIN_STATUS_NOT_ACTIVE;\n\t\t}\n\t\treturn pluginStatus.body.status;\n\t};\n\n\tconst loadPreviewSettings = async () => {\n\t\tconst previewSettings = await getPreviewSettings();\n\t\tif ( previewSettings?.body ) {\n\t\t\tupdatePreviewSettings( previewSettings.body );\n\t\t}\n\t};\n\n\tconst waitForInstall = () => {\n\t\tsetTimeout( async () => {\n\t\t\tconst pluginStatus = await checkPluginStatus();\n\t\t\tif ( pluginStatus !== PLUGIN_STATUS_ACTIVE ) {\n\t\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] =\n\t\t\t\t\tPLUGIN_STATUS_NOT_ACTIVE;\n\t\t\t\tsetWoocommerceStatus( PLUGIN_STATUS_NOT_ACTIVE );\n\t\t\t\treturn updatePluginsStatus( storedPluginsStatus );\n\t\t\t}\n\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] = pluginStatus;\n\t\t\tsetWoocommerceStatus( pluginStatus );\n\t\t\tupdatePluginsStatus( storedPluginsStatus );\n\t\t\tawait loadPreviewSettings();\n\t\t}, PLUGIN_INSTALL_WAIT_TIMEOUT );\n\t};\n\n\tuseEffect( async () => {\n\t\tsetWoocommerceStatus( storedPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] );\n\t\tif (\n\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] === PLUGIN_STATUS_INIT\n\t\t) {\n\t\t\tconst pluginStatus = await checkPluginStatus();\n\t\t\tswitch ( pluginStatus ) {\n\t\t\t\tcase PLUGIN_STATUS_INSTALLING:\n\t\t\t\t\twaitForInstall();\n\t\t\t\t\tbreak;\n\t\t\t\tcase PLUGIN_STATUS_ACTIVE:\n\t\t\t\t\tawait loadPreviewSettings();\n\t\t\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] =\n\t\t\t\t\t\tpluginStatus;\n\t\t\t\t\tsetWoocommerceStatus( pluginStatus );\n\t\t\t\t\tupdatePluginsStatus( storedPluginsStatus );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstoredPluginsStatus[ ECOMMERCE_STEPS_PLUGIN ] =\n\t\t\t\t\t\tpluginStatus;\n\t\t\t\t\tsetWoocommerceStatus( pluginStatus );\n\t\t\t\t\tupdatePluginsStatus( storedPluginsStatus );\n\t\t\t}\n\t\t}\n\t}, [ storedPluginsStatus ] );\n\n\tconst handleRender = () => {\n\t\tswitch ( woocommerceStatus ) {\n\t\t\tcase PLUGIN_STATUS_NOT_ACTIVE:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase PLUGIN_STATUS_ACTIVE:\n\t\t\t\treturn children;\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t}\n\t};\n\n\treturn <>{ handleRender() };\n};\n\nexport default EcommerceStateHandler;\n","export { default as DesignStateHandler } from './Design';\nexport { default as EcommerceStateHandler } from './Ecommerce';\n","import { useSelect, useDispatch } from '@wordpress/data';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useLocation } from 'react-router-dom';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { orderBy, filter } from 'lodash';\n\nimport { LivePreview } from '../../../../components/LivePreview';\nimport CommonLayout from '../../../../components/Layouts/Common';\nimport {\n\tVIEW_DESIGN_THEME_STYLES_PREVIEW,\n\tTHEME_STATUS_ACTIVE,\n\tTHEME_STATUS_NOT_ACTIVE,\n} from '../../../../../constants';\nimport { store as nfdOnboardingStore } from '../../../../store';\nimport { getPatterns } from '../../../../utils/api/patterns';\nimport { getGlobalStyles } from '../../../../utils/api/themes';\nimport { useGlobalStylesOutput } from '../../../../utils/global-styles/use-global-styles-output';\nimport { conditionalSteps } from '../../../../data/routes/';\nimport { DesignStateHandler } from '../../../../components/StateHandlers';\n\nconst StepDesignThemeStylesPreview = () => {\n\tconst location = useLocation();\n\tconst [ isLoaded, setIsLoaded ] = useState( false );\n\tconst [ pattern, setPattern ] = useState();\n\tconst [ customize, setCustomize ] = useState( false );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tcurrentStep,\n\t\tcurrentData,\n\t\tstoredPreviewSettings,\n\t\troutes,\n\t\tdesignSteps,\n\t\tallSteps,\n\t\tthemeStatus,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tcurrentStep: select( nfdOnboardingStore ).getStepFromPath(\n\t\t\t\tlocation.pathname\n\t\t\t),\n\t\t\tcurrentData:\n\t\t\t\tselect( nfdOnboardingStore ).getCurrentOnboardingData(),\n\t\t\tstoredPreviewSettings:\n\t\t\t\tselect( nfdOnboardingStore ).getPreviewSettings(),\n\t\t\troutes: select( nfdOnboardingStore ).getRoutes(),\n\t\t\tallSteps: select( nfdOnboardingStore ).getAllSteps(),\n\t\t\tdesignSteps: select( nfdOnboardingStore ).getDesignSteps(),\n\t\t\tthemeStatus: select( nfdOnboardingStore ).getThemeStatus(),\n\t\t};\n\t}, [] );\n\n\tconst {\n\t\tsetDrawerActiveView,\n\t\tsetIsDrawerOpened,\n\t\tsetIsSidebarOpened,\n\t\tsetIsDrawerSuppressed,\n\t\tupdatePreviewSettings,\n\t\tupdateRoutes,\n\t\tupdateDesignSteps,\n\t\tupdateAllSteps,\n\t\tsetCurrentOnboardingData,\n\t\tupdateThemeStatus,\n\t} = useDispatch( nfdOnboardingStore );\n\n\tuseEffect( () => {\n\t\tif ( isLargeViewport ) {\n\t\t\tsetIsDrawerOpened( true );\n\t\t}\n\t\tsetIsSidebarOpened( false );\n\t\tsetIsDrawerSuppressed( false );\n\t\tsetDrawerActiveView( VIEW_DESIGN_THEME_STYLES_PREVIEW );\n\t\thandleCheckbox( currentData.data.customDesign, false );\n\t}, [] );\n\n\tconst getStylesAndPatterns = async () => {\n\t\tconst patternsResponse = await getPatterns(\n\t\t\tcurrentStep.patternId,\n\t\t\ttrue\n\t\t);\n\t\tif ( patternsResponse?.error ) {\n\t\t\treturn updateThemeStatus( THEME_STATUS_NOT_ACTIVE );\n\t\t}\n\t\tconst globalStylesResponse = await getGlobalStyles();\n\t\tif ( globalStylesResponse?.error ) {\n\t\t\treturn updateThemeStatus( THEME_STATUS_NOT_ACTIVE );\n\t\t}\n\t\tlet selectedGlobalStyle;\n\t\tif ( currentData.data.theme.variation ) {\n\t\t\tselectedGlobalStyle = globalStylesResponse.body.filter(\n\t\t\t\t( globalStyle ) =>\n\t\t\t\t\tglobalStyle.title === currentData.data.theme.variation\n\t\t\t)[ 0 ];\n\t\t} else {\n\t\t\tselectedGlobalStyle = globalStylesResponse.body[ 0 ];\n\t\t}\n\t\tupdatePreviewSettings(\n\t\t\tuseGlobalStylesOutput( selectedGlobalStyle, storedPreviewSettings )\n\t\t);\n\t\tsetPattern( patternsResponse?.body );\n\t\tsetIsLoaded( true );\n\t};\n\n\tconst addColorAndTypographyRoutes = () => {\n\t\tconst updates = removeColorAndTypographyRoutes();\n\t\tconst steps = [\n\t\t\tconditionalSteps.designColors,\n\t\t\tconditionalSteps.designTypography,\n\t\t];\n\t\treturn {\n\t\t\troutes: orderBy(\n\t\t\t\tupdates.routes.concat( steps ),\n\t\t\t\t[ 'priority' ],\n\t\t\t\t[ 'asc' ]\n\t\t\t),\n\t\t\tallSteps: orderBy(\n\t\t\t\tupdates.allSteps.concat( steps ),\n\t\t\t\t[ 'priority' ],\n\t\t\t\t[ 'asc' ]\n\t\t\t),\n\t\t\tdesignSteps: orderBy(\n\t\t\t\tupdates.designSteps.concat( steps ),\n\t\t\t\t[ 'priority' ],\n\t\t\t\t[ 'asc' ]\n\t\t\t),\n\t\t};\n\t};\n\n\tconst removeColorAndTypographyRoutes = () => {\n\t\treturn {\n\t\t\troutes: filter(\n\t\t\t\troutes,\n\t\t\t\t( route ) =>\n\t\t\t\t\t! route.path.includes(\n\t\t\t\t\t\tconditionalSteps.designColors.path\n\t\t\t\t\t) &&\n\t\t\t\t\t! route.path.includes(\n\t\t\t\t\t\tconditionalSteps.designTypography.path\n\t\t\t\t\t)\n\t\t\t),\n\t\t\tallSteps: filter(\n\t\t\t\tallSteps,\n\t\t\t\t( allStep ) =>\n\t\t\t\t\t! allStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designColors.path\n\t\t\t\t\t) &&\n\t\t\t\t\t! allStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designTypography.path\n\t\t\t\t\t)\n\t\t\t),\n\t\t\tdesignSteps: filter(\n\t\t\t\tdesignSteps,\n\t\t\t\t( designStep ) =>\n\t\t\t\t\t! designStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designColors.path\n\t\t\t\t\t) &&\n\t\t\t\t\t! designStep.path.includes(\n\t\t\t\t\t\tconditionalSteps.designTypography.path\n\t\t\t\t\t)\n\t\t\t),\n\t\t};\n\t};\n\n\tconst handleCheckbox = ( customize, updateOnboardingData = true ) => {\n\t\tlet updates;\n\n\t\tif ( customize ) {\n\t\t\tupdates = addColorAndTypographyRoutes();\n\t\t} else {\n\t\t\tupdates = removeColorAndTypographyRoutes();\n\t\t}\n\n\t\tupdateRoutes( updates.routes );\n\t\tupdateDesignSteps( updates.designSteps );\n\t\tupdateAllSteps( updates.allSteps );\n\t\tsetCustomize( customize );\n\n\t\tif ( updateOnboardingData ) {\n\t\t\tcurrentData.data.customDesign = customize;\n\t\t\tsetCurrentOnboardingData( currentData );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! isLoaded && themeStatus === THEME_STATUS_ACTIVE )\n\t\t\tgetStylesAndPatterns();\n\t}, [ isLoaded, themeStatus ] );\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'Customize Colors & Fonts?',\n\t\t\t\t\t\t\t\t\t\t'wp-module-onboarding'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Check to customize in the next few steps (or leave empty and use the Site Editor later)',\n\t\t\t\t\t\t\t\t\t\t\t'wp-module-onboarding'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ customize }\n\t\t\t\t\t\tonChange={ () => handleCheckbox( ! customize ) }\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ pattern && (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default StepDesignThemeStylesPreview;\n","import apiFetch from '@wordpress/api-fetch';\n\nimport { onboardingRestURL } from './common';\n\nclass Event {\n\tconstructor( eventSlug, eventData = {} ) {\n\t\tthis.eventSlug = eventSlug;\n\t\tthis.eventData = eventData;\n\t}\n\n\tsend() {\n\t\tapiFetch( {\n\t\t\turl: onboardingRestURL( 'events' ),\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tslug: this.eventSlug,\n\t\t\t\tdata: this.eventData,\n\t\t\t},\n\t\t} ).catch( ( error ) => {\n\t\t\tconsole.error( error );\n\t\t} );\n\t}\n}\n\nexport default Event;\n"],"names":["CommonLayout","HeadingWithSubHeading","NeedHelpTag","StepErrorState","title","subtitle","error","__","classNames","speak","useEffect","useLocation","NFD_ONBOARDING_EVENT_PREFIX","Event","BaseLayout","className","children","location","mainContainer","document","querySelector","speakRouteTitle","focus","preventScroll","stepID","pathname","previousStepID","window","nfdOnboarding","send","Animate","Fragment","InnerContainer","isBgPrimary","isCentered","isVerticallyCentered","isContained","isPadded","isFadeIn","Container","ImageUploadLoader","StepLoader","default","store","nfdOnboardingStore","select","question","urlLabel","hireExpertsUrl","getHireExpertsUrl","useSelect","useDispatch","getThemeStatus","THEME_STATUS_INIT","THEME_STATUS_INSTALLING","THEME_STATUS_NOT_ACTIVE","THEME_STATUS_ACTIVE","DESIGN_STEPS_THEME","THEME_INSTALL_WAIT_TIMEOUT","getPreviewSettings","DesignStateHandler","storedThemeStatus","updateThemeStatus","updatePreviewSettings","checkThemeStatus","themeStatus","body","status","loadPreviewSettings","previewSettings","waitForInstall","setTimeout","handleRender","useState","getPluginStatus","PLUGIN_STATUS_INIT","PLUGIN_STATUS_INSTALLING","PLUGIN_STATUS_NOT_ACTIVE","PLUGIN_STATUS_ACTIVE","ECOMMERCE_STEPS_PLUGIN","PLUGIN_INSTALL_WAIT_TIMEOUT","EcommerceStateHandler","woocommerceStatus","setWoocommerceStatus","storedPluginsStatus","getPluginsStatus","updatePluginsStatus","checkPluginStatus","pluginStatus","CheckboxControl","useViewportMatch","orderBy","filter","LivePreview","VIEW_DESIGN_THEME_STYLES_PREVIEW","getPatterns","getGlobalStyles","useGlobalStylesOutput","conditionalSteps","StepDesignThemeStylesPreview","isLoaded","setIsLoaded","pattern","setPattern","customize","setCustomize","isLargeViewport","currentStep","currentData","storedPreviewSettings","routes","designSteps","allSteps","getStepFromPath","getCurrentOnboardingData","getRoutes","getAllSteps","getDesignSteps","setDrawerActiveView","setIsDrawerOpened","setIsSidebarOpened","setIsDrawerSuppressed","updateRoutes","updateDesignSteps","updateAllSteps","setCurrentOnboardingData","handleCheckbox","data","customDesign","getStylesAndPatterns","patternsResponse","patternId","globalStylesResponse","selectedGlobalStyle","theme","variation","globalStyle","addColorAndTypographyRoutes","updates","removeColorAndTypographyRoutes","steps","designColors","designTypography","concat","route","path","includes","allStep","designStep","updateOnboardingData","apiFetch","onboardingRestURL","constructor","eventSlug","eventData","url","method","slug","catch","console"],"sourceRoot":""} \ No newline at end of file From de2e88bd41ef40816a09d18e276d0bcfea2a8c5c Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Mon, 3 Oct 2022 14:41:57 +0530 Subject: [PATCH 10/10] add defensive checks for the preview drawer --- .../DrawerPanel/DesignThemeStylesPreview.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js index c0e5babe6..fe817eec7 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js @@ -6,7 +6,10 @@ import { store as nfdOnboardingStore } from '../../../store'; import { getPatterns } from '../../../utils/api/patterns'; import { getGlobalStyles } from '../../../utils/api/themes'; import { useGlobalStylesOutput } from '../../../utils/global-styles/use-global-styles-output'; -import { THEME_STATUS_ACTIVE } from '../../../../constants'; +import { + THEME_STATUS_ACTIVE, + THEME_STATUS_NOT_ACTIVE, +} from '../../../../constants'; const DesignThemeStylesPreview = () => { const MAX_PREVIEWS_PER_ROW = 3; @@ -27,15 +30,24 @@ const DesignThemeStylesPreview = () => { }; }, [] ); - const { updatePreviewSettings, setCurrentOnboardingData } = - useDispatch( nfdOnboardingStore ); + const { + updatePreviewSettings, + setCurrentOnboardingData, + updateThemeStatus, + } = useDispatch( nfdOnboardingStore ); const getStylesAndPatterns = async () => { const patternResponse = await getPatterns( currentStep.patternId, true ); + if ( patternResponse?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } const globalStylesResponse = await getGlobalStyles(); + if ( globalStylesResponse?.error ) { + return updateThemeStatus( THEME_STATUS_NOT_ACTIVE ); + } setPattern( patternResponse?.body ); setGlobalStyles( globalStylesResponse?.body ); let selectedGlobalStyle;