From 0ece7137d15d0abaac95889ce96fb512658c7d10 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Fri, 4 Nov 2022 21:11:24 -0700 Subject: [PATCH 01/25] chore: Jorge's sitebuilder work --- packages/sitebuilder/mix-manifest.json | 3 +- packages/sitebuilder/package.json | 9 +- packages/sitebuilder/sitebuilder.d.ts | 52 +++++++ packages/sitebuilder/src/SiteBuilder.tsx | 27 ++-- .../src/contexts/GoLiveProvider.tsx | 84 +++++------ .../src/contexts/WizardProvider.tsx | 3 +- packages/sitebuilder/src/hooks/index.ts | 2 + .../src/hooks/useCreatePurchaseFlow.ts | 50 +++++++ .../sitebuilder/src/hooks/useFindDomain.ts | 120 ++++++++++++++++ packages/sitebuilder/src/hooks/useGoLive.ts | 4 +- packages/sitebuilder/src/utils/index.ts | 1 + .../src/utils/parseDomainListItem.ts | 49 +++++++ .../ScreenWrapper.tsx | 2 +- .../src/wizards/go-live/GoLiveWizard.tsx | 57 +++++--- .../src/wizards/go-live/data/constants.ts | 24 +++- .../src/wizards/go-live/data/go-live-data.tsx | 47 +++++- .../go-live/screens/ClaimYourDomain.tsx | 59 ++++++++ .../go-live/screens/ConnectWithNexcess.tsx | 80 +++++++++++ .../wizards/go-live/screens/FindDomain.tsx | 135 ++++++++++++++++++ .../src/wizards/go-live/screens/Start.tsx | 133 +++++------------ .../src/wizards/go-live/screens/index.ts | 3 + 21 files changed, 756 insertions(+), 188 deletions(-) create mode 100644 packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts create mode 100644 packages/sitebuilder/src/hooks/useFindDomain.ts create mode 100644 packages/sitebuilder/src/utils/parseDomainListItem.ts create mode 100644 packages/sitebuilder/src/wizards/go-live/screens/ClaimYourDomain.tsx create mode 100644 packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx create mode 100644 packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx diff --git a/packages/sitebuilder/mix-manifest.json b/packages/sitebuilder/mix-manifest.json index 5bd9df0e..5ef47994 100644 --- a/packages/sitebuilder/mix-manifest.json +++ b/packages/sitebuilder/mix-manifest.json @@ -31,5 +31,6 @@ "/dist/assets/images/setup-modal-warning.png": "/dist/assets/images/setup-modal-warning.png", "/dist/assets/images/site-domain-cart.png": "/dist/assets/images/site-domain-cart.png", "/dist/assets/images/site-domain-checkmark.png": "/dist/assets/images/site-domain-checkmark.png", - "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png" + "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png", + "/dist/assets/images/tada-icon.png": "/dist/assets/images/tada-icon.png" } diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index 87cf9b0a..e415151b 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -22,17 +22,18 @@ "author": "", "dependencies": { "@moderntribe/wme-ui": "workspace:*", - "@moderntribe/wme-utils": "workspace:*" + "@moderntribe/wme-utils": "workspace:*", + "@tanstack/react-query": "^4.14.3" }, "peerDependencies": { - "@wordpress/element": "^4.12.0", - "@wordpress/html-entities": "^3.14.0", - "@wordpress/i18n": "^4.14.0", "@emotion/react": "^11.9.3", "@emotion/styled": "^11.9.3", "@mui/icons-material": "^5.8.4", "@mui/material": "^5.9.2", "@mui/utils": "^5.9.1", + "@wordpress/element": "^4.12.0", + "@wordpress/html-entities": "^3.14.0", + "@wordpress/i18n": "^4.14.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.4.2" diff --git a/packages/sitebuilder/sitebuilder.d.ts b/packages/sitebuilder/sitebuilder.d.ts index d44d7503..31dce08b 100644 --- a/packages/sitebuilder/sitebuilder.d.ts +++ b/packages/sitebuilder/sitebuilder.d.ts @@ -118,6 +118,58 @@ declare global { disable?: boolean; hidePagination?: boolean; } + export interface Domain { + domain: string + is_available: boolean + package: { + id: number + identity: string + metadata: DomainMetadata + addons: DomainAddon[] + auto_renew: boolean + bandwidth: number + billing_type: string + environment_type: string + is_wildcard: boolean + label: string + name: string + orderable_terms: DomainOrderableTerms + term_fees: DomainTermFees + tld: DomainTld + trial_period: number + type: string + } + pricing: any[] + tld: DomainTld + } + interface DomainAddon { + id: number + identity: string + metadata: DomainMetadata + description: string + monthly_fee: string + name: string + term_fees: DomainTermFees + type: string + } + interface DomainTermFees { + [key: string]: string + } + + interface DomainOrderableTerms { + [key: string]: string + } + + interface DomainTld { + id: number + identity: string + metadata: DomainMetadata + } + + interface DomainMetadata { + scope: string + uri: string + } interface Window { ppcp_onboarding_productionCallback: (authCode: string, sharedId: string) => void; diff --git a/packages/sitebuilder/src/SiteBuilder.tsx b/packages/sitebuilder/src/SiteBuilder.tsx index 0753abc2..1bac228a 100644 --- a/packages/sitebuilder/src/SiteBuilder.tsx +++ b/packages/sitebuilder/src/SiteBuilder.tsx @@ -2,27 +2,34 @@ import React, { lazy } from 'react'; import { ThemeProvider, createTheme } from '@mui/material'; import { theme as WME_THEME } from '@moderntribe/wme-ui'; import { HashRouter, Routes, Route, Navigate } from 'react-router-dom'; +import { + QueryClient, + QueryClientProvider +} from '@tanstack/react-query'; import SiteBuilderProvider from '@sb/contexts/SiteBuilderProvider'; import WizardProvider from '@sb/contexts/WizardProvider'; import WizardWrapper from '@sb/wizards/WizardWrapper'; import Loadable from '@sb/components/Loadable'; import { SB_THEME } from '@sb/constants'; -const SetupScreen = Loadable(lazy(() => import('@sb/setup/SetupScreen'))); +const SetupScreen: (props: any) => JSX.Element = Loadable(lazy(() => import('@sb/setup/SetupScreen'))); const siteBuilderTheme = createTheme(WME_THEME, SB_THEME); +const queryClient = new QueryClient(); const SiteBuilder = () => ( - - - - } /> - } /> - } /> - - - + + + + + } /> + } /> + } /> + + + + ); diff --git a/packages/sitebuilder/src/contexts/GoLiveProvider.tsx b/packages/sitebuilder/src/contexts/GoLiveProvider.tsx index ceba5d67..a52c5be5 100644 --- a/packages/sitebuilder/src/contexts/GoLiveProvider.tsx +++ b/packages/sitebuilder/src/contexts/GoLiveProvider.tsx @@ -15,7 +15,7 @@ export interface GoLiveProviderContextInterface { setIsLoading: (loading: boolean) => void; getHasDomainNextText: (hasDomain: string) => void; setHasDomain: (hasDomain: string) => void; - setShowGetDomain: (show: boolean) => void; + setShowPurchaseNavigation: (show: boolean) => void; } export interface DomainVerficationSuccessInterface { @@ -72,6 +72,7 @@ export const GoLiveContext = createContext { const [goLiveState, setGoLiveState] = useState(GoLiveData()); + const { selectedDomains } = goLiveState; const goLiveNonce = GO_LIVE_PROPS.ajax?.nonce || ''; const goLiveAction = GO_LIVE_PROPS.ajax?.action || ''; @@ -80,6 +81,7 @@ const GoLiveProvider = ({ children }: { children: React.ReactNode }) => { const navigate = useNavigate(); const [searchParams, setSearchParams] = useSearchParams(); + const purchaseNavigation = searchParams.get('purchase') === 'true'; const activeStep = searchParams.get('step') ? Number(searchParams.get('step')) @@ -94,46 +96,35 @@ const GoLiveProvider = ({ children }: { children: React.ReactNode }) => { }, [retryVerfication]); useEffect(() => { - if (activeStep === 3) { - if (! capturedDomain) { - navigate('/wizard/go-live'); - } - - if ( - goLiveState.verificationStatus && ! ( - goLiveState.verificationStatus === 'connected' || - goLiveState.verificationStatus === 'advanced' - ) - ) { - navigate('/wizard/go-live'); - } - - if (goLiveState.verificationStatus === 'error') { - navigate('/wizard/go-live?step=2'); + if (activeStep === 2) { + if (purchaseNavigation) { + if (selectedDomains.length === 0) { + searchParams.set('step', '1'); + setSearchParams(searchParams); + } } } - - if (activeStep === 1 && goLiveState.hasDomain !== null) { - const { steps, hasDomain, showGetDomain } = goLiveState; - - steps[ 0 ].nextText = continueStr; - steps[ 0 ].hideBack = true; - - if (hasDomain === 'no') { - steps[ 0 ].nextText = showGetDomain ? haveDomain : getDomain; - } - - if (hasDomain === 'no' && showGetDomain) { - steps[ 0 ].disableNext = true; - steps[ 0 ].hideBack = false; + if (activeStep === 3) { + if (! purchaseNavigation) { + if (! capturedDomain) { + navigate('/wizard/go-live'); + } + + if ( + goLiveState.verificationStatus && ! ( + goLiveState.verificationStatus === 'connected' || + goLiveState.verificationStatus === 'advanced' + ) + ) { + navigate('/wizard/go-live'); + } + + if (goLiveState.verificationStatus === 'error') { + navigate('/wizard/go-live?step=2'); + } } - - setGoLiveState({ - ...goLiveState, - steps - }); } - }, [activeStep, goLiveState.showGetDomain]); + }, [activeStep, purchaseNavigation]); const submitGoLiveForm = () => { const { steps, showLogoutButton } = goLiveState; @@ -312,7 +303,7 @@ const GoLiveProvider = ({ children }: { children: React.ReactNode }) => { const getHasDomainNextText = (hasDomain:string) => { switch (hasDomain) { case 'yes': - return goLiveState.showGetDomain ? haveDomain : continueStr; + return haveDomain; case 'no': return getDomain; default: @@ -331,14 +322,13 @@ const GoLiveProvider = ({ children }: { children: React.ReactNode }) => { }); }; - const setShowGetDomain = (show:boolean) => { - const { steps } = goLiveState; - steps[ 0 ].nextText = haveDomain; - setGoLiveState({ - ...goLiveState, - showGetDomain: show, - steps - }); + const setShowPurchaseNavigation = (show: boolean) => { + if (show) { + searchParams.set('purchase', 'true'); + } else { + searchParams.delete('purchase'); + } + setSearchParams(searchParams); }; return ( @@ -349,7 +339,7 @@ const GoLiveProvider = ({ children }: { children: React.ReactNode }) => { submitDomainVerification, setIsLoading, setHasDomain, - setShowGetDomain, + setShowPurchaseNavigation, handleDomainVerificationRequest, getHasDomainNextText } }> diff --git a/packages/sitebuilder/src/contexts/WizardProvider.tsx b/packages/sitebuilder/src/contexts/WizardProvider.tsx index 6891e37b..31e305e2 100644 --- a/packages/sitebuilder/src/contexts/WizardProvider.tsx +++ b/packages/sitebuilder/src/contexts/WizardProvider.tsx @@ -83,7 +83,8 @@ const WizardProvider = ({ children }: { children: React.ReactNode }) => { if (typeof targetStep !== 'number') { return; } - setSearchParams({ step: String(targetStep) }); + searchParams.set('step', String(targetStep)); + setSearchParams(searchParams); }; const goToNextStep = () => { diff --git a/packages/sitebuilder/src/hooks/index.ts b/packages/sitebuilder/src/hooks/index.ts index 7ae025e8..90e26d07 100644 --- a/packages/sitebuilder/src/hooks/index.ts +++ b/packages/sitebuilder/src/hooks/index.ts @@ -1,3 +1,5 @@ +export * from './useCreatePurchaseFlow'; +export * from './useFindDomain'; export * from './useFirstTimeConfiguration'; export * from './useLookAndFeel'; export * from './useGoLive'; diff --git a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts new file mode 100644 index 00000000..9f35b61b --- /dev/null +++ b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts @@ -0,0 +1,50 @@ +import { useMutation } from '@tanstack/react-query'; +import { handleActionRequest } from '@moderntribe/wme-utils'; +import { GO_LIVE_PROPS } from '@sb/constants'; + +export interface Response { + action: string + data: any + callback_url: string + return_url: any + uuid: string + site_id: number + outcome: Outcome +} + +export interface Outcome { + status: string + details: Details +} + +export interface Details { + id: number + identity: string + scope: string + purchased_domain: string +} + +async function createPurchaseFlow(domains: { domainName: string, packageId: number}[]) { + const goLiveNonce = GO_LIVE_PROPS.ajax?.nonce || ''; + const goLiveAction = GO_LIVE_PROPS.ajax?.action || ''; + const response: any = await handleActionRequest({ + _wpnonce: goLiveNonce, + action: goLiveAction, + sub_action: 'create-purchase-flow', + domains: domains.map(({ domainName, packageId }) => ({ domain_name: domainName, package_id: packageId })), + }); + return response as Response; +} + +export function useCreatePurchaseFlow() { + const mutation = useMutation( + createPurchaseFlow, + { + onSuccess: (data) => { + window.location.href = data.callback_url; + }, + } + ); + + return mutation; +} diff --git a/packages/sitebuilder/src/hooks/useFindDomain.ts b/packages/sitebuilder/src/hooks/useFindDomain.ts new file mode 100644 index 00000000..63a7d32e --- /dev/null +++ b/packages/sitebuilder/src/hooks/useFindDomain.ts @@ -0,0 +1,120 @@ +import * as React from 'react'; +import { useQuery, UseQueryResult } from '@tanstack/react-query'; +import { handleActionRequest } from '@moderntribe/wme-utils'; +import { GO_LIVE_PROPS } from '@sb/constants'; +import { GoLiveStringData } from '@sb/wizards/go-live/data/constants'; + +import { useGoLive } from './useGoLive'; + +type UseFindDomainProps = { + maxSelectedDomains: number; +} + +type UseFindDomain = UseQueryResult & { + search: string + setSearch: (search: string) => void + selectedDomains: Domain[] + toggleSelectedDomain: (domain: Domain) => void +} + +type Response = { + domain: Domain + alternatives: Domain[] +} +type Error = { + code?: string + message?: string +} + +export function useFindDomain(props?: UseFindDomainProps): UseFindDomain { + const { + goLiveState: { selectedDomains, searchDomain: search }, + setGoLiveState, + } = useGoLive(); + const { maxSelectedDomains = 1 } = props || {}; + const { goLiveProviderText: { checkout } } = GoLiveStringData; + + const query = useQuery(['domains', search], async () => { + const goLiveNonce = GO_LIVE_PROPS.ajax?.nonce || ''; + const goLiveAction = GO_LIVE_PROPS.ajax?.action || ''; + const response: any = await handleActionRequest({ + _wpnonce: goLiveNonce, + action: goLiveAction, + sub_action: 'search-domains', + domain: search + }); + return response as Response; + }, { + select: (data) => { + if (! data) { + return []; + } + return [ + data.domain, + ...data.alternatives, + ].filter((_) => _); + }, + enabled: !! search, + keepPreviousData: true, + refetchOnWindowFocus: false, + }); + + function toggleSelectedDomain(domain: Domain) { + const selected = selectedDomains.find((_) => _.domain === domain.domain); + setGoLiveState((prevGoLiveState) => { + const { selectedDomains: prev } = prevGoLiveState; + const newSelected = selected ? prev.filter((_) => _.domain !== domain.domain) : [domain, ...prev]; + return { + ...prevGoLiveState, + selectedDomains: newSelected.slice(0, maxSelectedDomains), + }; + }); + } + React.useEffect(() => { + setGoLiveState((prevGoLiveState) => { + const { stepsAlternative } = prevGoLiveState; + if (selectedDomains.length) { + stepsAlternative[ 0 ].nextText = `${ checkout } (${ selectedDomains.length })`; + stepsAlternative[ 0 ].disableNext = false; + } else { + stepsAlternative[ 0 ].nextText = checkout; + stepsAlternative[ 0 ].disableNext = true; + } + return { + ...prevGoLiveState, + stepsAlternative, + }; + }); + }, [selectedDomains.length]); + + function emptySelectedDomains() { + setGoLiveState((prevGoLiveState) => { + const { stepsAlternative } = prevGoLiveState; + stepsAlternative[ 0 ].nextText = checkout; + stepsAlternative[ 0 ].disableNext = true; + return { + ...prevGoLiveState, + stepsAlternative, + selectedDomains: [], + }; + }); + } + + function setSearch(newSearch: string) { + setGoLiveState((prevGoLiceState) => { + return { + ...prevGoLiceState, + searchDomain: newSearch, + }; + }); + emptySelectedDomains(); + } + + return { + ...query, + search, + setSearch, + selectedDomains, + toggleSelectedDomain, + }; +} diff --git a/packages/sitebuilder/src/hooks/useGoLive.ts b/packages/sitebuilder/src/hooks/useGoLive.ts index aaf19799..1e13989d 100644 --- a/packages/sitebuilder/src/hooks/useGoLive.ts +++ b/packages/sitebuilder/src/hooks/useGoLive.ts @@ -9,7 +9,7 @@ export function useGoLive() { submitDomainVerification, setIsLoading, setHasDomain, - setShowGetDomain, + setShowPurchaseNavigation, handleDomainVerificationRequest, getHasDomainNextText } = useContext(GoLiveContext) as GoLiveProviderContextInterface; @@ -20,7 +20,7 @@ export function useGoLive() { submitDomainVerification, setIsLoading, setHasDomain, - setShowGetDomain, + setShowPurchaseNavigation, handleDomainVerificationRequest, getHasDomainNextText }; diff --git a/packages/sitebuilder/src/utils/index.ts b/packages/sitebuilder/src/utils/index.ts index 2bb2020f..93f0c358 100644 --- a/packages/sitebuilder/src/utils/index.ts +++ b/packages/sitebuilder/src/utils/index.ts @@ -4,3 +4,4 @@ export * from './generateNewPassword'; export * from './getWizardCloseArgs'; export * from './uploadImage'; export * from './handleTelemetryRequest'; +export * from './parseDomainListItem'; diff --git a/packages/sitebuilder/src/utils/parseDomainListItem.ts b/packages/sitebuilder/src/utils/parseDomainListItem.ts new file mode 100644 index 00000000..505624f5 --- /dev/null +++ b/packages/sitebuilder/src/utils/parseDomainListItem.ts @@ -0,0 +1,49 @@ +import { sprintf } from '@wordpress/i18n'; +import { GoLiveStringData } from '@sb/wizards/go-live/data/constants'; + +type DomainListItem = { + name: string, + disabled: boolean, + price?: string, + chipLabel: string, + chipColor: 'success' | undefined, + selected: boolean, +} + +function getPrice(price: string, isAvailable: boolean) { + if (! isAvailable) { + return undefined; + } + return sprintf('%1$s %2$s', + price, + GoLiveStringData.domainItems.perYear + ); +} + +function getChipLabel(isAvailable: boolean, isSelected: boolean) { + if (! isAvailable) { + return GoLiveStringData.domainItems.taken; + } + if (isSelected) { + return GoLiveStringData.domainItems.selected; + } + return GoLiveStringData.domainItems.available; +} + +function getChipColor(isAvailable: boolean, isSelected: boolean): 'success' | undefined { + if (! isAvailable || isSelected) { + return undefined; + } + return 'success'; +} + +export function parseDomainListItem(domain: Domain, selected: boolean): DomainListItem { + return ({ + name: domain.domain, + disabled: ! domain.is_available, + price: getPrice(domain.package.term_fees[ '12' ], domain.is_available), + chipLabel: getChipLabel(domain.is_available, selected), + chipColor: getChipColor(domain.is_available, selected), + selected, + }); +} diff --git a/packages/sitebuilder/src/wizards/first-time-configuration/ScreenWrapper.tsx b/packages/sitebuilder/src/wizards/first-time-configuration/ScreenWrapper.tsx index 6fdc5889..1e95bbf6 100644 --- a/packages/sitebuilder/src/wizards/first-time-configuration/ScreenWrapper.tsx +++ b/packages/sitebuilder/src/wizards/first-time-configuration/ScreenWrapper.tsx @@ -1,7 +1,7 @@ import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; -const ScreenWrapper = styled(Box, { +const ScreenWrapper: any = styled(Box, { name: 'FtcWrapper', slot: 'Root', })(() => ({ diff --git a/packages/sitebuilder/src/wizards/go-live/GoLiveWizard.tsx b/packages/sitebuilder/src/wizards/go-live/GoLiveWizard.tsx index 7a9a856b..7e93d9b9 100644 --- a/packages/sitebuilder/src/wizards/go-live/GoLiveWizard.tsx +++ b/packages/sitebuilder/src/wizards/go-live/GoLiveWizard.tsx @@ -3,40 +3,41 @@ import { WizardFooter } from '@moderntribe/wme-ui'; import { useTheme } from '@mui/material'; import { __ } from '@wordpress/i18n'; import { useSearchParams } from 'react-router-dom'; -import { useWizard, useGoLive } from '@sb/hooks'; -import { NEXCESS_DOMAIN_REGISTRATION_URL } from '@sb/constants'; +import { useWizard, useGoLive, useCreatePurchaseFlow } from '@sb/hooks'; import { SkipVerificationWarning } from '@go-live/screens'; import WizardCloseWarning from '@sb/wizards/WizardCloseWarning'; const GoLiveWizard = () => { - const { wizardState: { showCloseWarning }, goToNextStep, goToPreviousStep, goToStep } = useWizard(); - const { goLiveState: { steps, hasDomain, lastStep, showGetDomain, showLogoutButton, verificationStatus }, goLiveState, setShowGetDomain, setGoLiveState, submitGoLiveForm } = useGoLive(); + const { wizardState: { showCloseWarning }, goToNextStep, goToPreviousStep, goToStep, closeAll } = useWizard(); + const { goLiveState: { steps: stepsOriginal, stepsAlternative, selectedDomains, hasDomain, lastStep, showLogoutButton, verificationStatus }, setShowPurchaseNavigation, submitGoLiveForm, setGoLiveState } = useGoLive(); const [showVerificationWarning, setShowVerificationWarning] = useState(false); const theme = useTheme(); + const createPurchaseFlow = useCreatePurchaseFlow(); const [searchParams] = useSearchParams(); const activeStep = searchParams.get('step') ? Number(searchParams.get('step')) : 1; + const purchaseNavigation = searchParams.get('purchase') === 'true'; const stepIndex = activeStep >= 1 ? activeStep - 1 : 0; const handleNext = () => { if (activeStep === 1) { - if (hasDomain === 'no' && NEXCESS_DOMAIN_REGISTRATION_URL && ! showGetDomain) { - setShowGetDomain(true); - return false; + if (hasDomain === 'no' && ! purchaseNavigation) { + return setShowPurchaseNavigation(true); } - setGoLiveState({ - ...goLiveState, - hasDomain: 'yes', - showGetDomain: false, - }); - goToNextStep(); } - if (activeStep === 2 && verificationStatus === 'advanced') { - setShowVerificationWarning(true); - return false; + if (activeStep === 2) { + if (verificationStatus === 'advanced') { + return setShowVerificationWarning(true); + } + if (purchaseNavigation) { + return createPurchaseFlow.mutate(selectedDomains.map((domain) => ({ + domainName: domain.domain, + packageId: domain.package.id + }))); + } } - goToNextStep(); + return goToNextStep(); }; const handleSkipVerificationWarningClose = () => { @@ -49,19 +50,31 @@ const GoLiveWizard = () => { }; const handleBack = () => { - if (hasDomain === 'no' && showGetDomain) { - setShowGetDomain(false); - return; + if (activeStep === 1) { + if (purchaseNavigation) { + setGoLiveState((prevState) => ({ + ...prevState, + selectedDomains: [], + searchDomain: '', + })); + setShowPurchaseNavigation(false); + } } goToPreviousStep(); }; const handleSave = () => { if (activeStep === lastStep) { - submitGoLiveForm(); + if (purchaseNavigation) { + closeAll(); + } else { + submitGoLiveForm(); + } } }; + const steps = purchaseNavigation ? stepsAlternative : stepsOriginal; + return ( <> { @@ -97,6 +110,8 @@ const GoLiveWizard = () => { backText={ __('Back', 'nexcess-mapps') } skipText={ __('Skip', 'nexcess-mapps') } nextText={ steps[ stepIndex ].nextText || __('Next', 'nexcess-mapps') } + loadingText={ steps[ stepIndex ].loadingText || __('Loading', 'nexcess-mapps') } + isLoading={ createPurchaseFlow.isLoading } /> { showCloseWarning && } diff --git a/packages/sitebuilder/src/wizards/go-live/data/constants.ts b/packages/sitebuilder/src/wizards/go-live/data/constants.ts index 6f8664e1..63d57736 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/constants.ts +++ b/packages/sitebuilder/src/wizards/go-live/data/constants.ts @@ -4,23 +4,25 @@ export const GoLiveStringData = { goLiveProviderText: { getDomain: __('Get My Domain', 'nexcess-mapps'), haveDomain: __('I\'ve Got My Domain', 'nexcess-mapps'), + checkout: __('Checkout', 'nexcess-mapps'), continueStr: __('Continue', 'nexcess-mapps'), errorMessage: __('There was an error while updating your site\'s domain.', 'nexcess-mapps'), errorMessageVerification: __('There was an error while verifying your site\'s domain.', 'nexcess-mapps'), - errorNotPointed: __('This domain is not pointing to your website.', 'nexcess-mapps'), // TODO: change wording to use product name + errorNotPointed: __('This domain is not pointing to your SiteBuilder website.', 'nexcess-mapps'), // TODO: change SiteBuilder to right product name errorNotRegistered: __('This domain is not registered.', 'nexcess-mapps'), errorGeneral: __('We\'re unable to connect your domain.', 'nexcess-mapps'), }, start: { screenTitle1: __('Set your site domain', 'nexcess-mapps'), - screenTitle2: __('Own your perfect domain with Nexcess.', 'nexcess-mapps'), + screenTitle2: __('Find the perfect domain.', 'nexcess-mapps'), screenDescription1: __('Let\'s get your site set up with the perfect domain. If you don\'t already have one, don\'t worry - we can help you out.', 'nexcess-mapps'), - screenDescription2: __('Nexcess helps you find, create and own your perfect domain. It\'s so easy, even we could do it. Once you\'ve got your domain, come back here and select "I\'ve Got My Domain".', 'nexcess-mapps'), + screenDescription2: __('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam efficitur augue eget condimentum dapibus. Duis ullamcorper turpis sit amet sapien hendrerit consequat in eget massa.', 'nexcess-mapps'), // TODO: Replace lorem ipsum with real text actionLabel: __('Have you purchased your custom domain?', 'nexcess-mapps'), actionTitle1: __('Yes! I have my own custom domain.', 'nexcess-mapps'), actionTitle2: __('No, I need one!', 'nexcess-mapps'), actionContent1: __('If you have your own domain already then you\'re ready to connect and go live.', 'nexcess-mapps'), - actionContent2: __('Nexcess will help you find and own your perfect domain name.', 'nexcess-mapps') + actionContent2: __('Nexcess will help you find and own your perfect domain name.', 'nexcess-mapps'), + defaultError: __('Something went wrong, please try again', 'nexcess-mapps') }, verifyDomain: { screenTitle: __('Verify your domain', 'nexcess-mapps'), @@ -37,6 +39,14 @@ export const GoLiveStringData = { loginUrlLabelText: __('Copy Your New Login URL', 'nexcess-mapps'), loginUrlHelperText: __('Copy and save this URL. Once your domain is connected you\'ll need it to login.', 'nexcess-mapps') }, + connectWithNexcess: { + screenTitle: __('Good choice! We’ll need to connect to your Nexcess account.', 'nexcess-mapps'), + screenDescription: __('We\'ll make sure your chosen domain is managed by your Nexcess account. Once connected, we\'ll navigate you back here to complete the process.', 'nexcess-mapps'), + }, + claimYourDomain: { + screenTitle: __('is all yours!', 'nexcess-mapps'), + screenDescription: __('While a new domain is often ready for use within an hour, it can take up to 8 hours to completely process.', 'nexcess-mapps'), + }, errorDomainGeneral: { accountContent: __('It looks like we\'re having trouble connecting your domain.', 'nexcess-mapps'), accountCta: __('Contact Support', 'nexcess-mapps') @@ -74,5 +84,11 @@ export const GoLiveStringData = { message2: __('If anything does go wrong, please reach out to support and we\'ll get you up and running!', 'nexcess-mapps'), continueButton: __('Continue without verification', 'nexcess-mapps'), nevermind: __('Do not skip verification', 'nexcess-mapps') + }, + domainItems: { + perYear: __('/ year', 'nexcess-mapps'), + taken: __('Taken', 'nexcess-mapps'), + selected: __('Selected', 'nexcess-mapps'), + available: __('Available', 'nexcess-mapps'), } }; diff --git a/packages/sitebuilder/src/wizards/go-live/data/go-live-data.tsx b/packages/sitebuilder/src/wizards/go-live/data/go-live-data.tsx index 6bec983c..3fbf8d90 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/go-live-data.tsx +++ b/packages/sitebuilder/src/wizards/go-live/data/go-live-data.tsx @@ -1,20 +1,22 @@ import React from 'react'; import { __ } from '@wordpress/i18n'; import { GO_LIVE_PROPS } from '@sb/constants'; -import { Start, VerifyDomain, UpdateSiteUrl } from '../screens'; +import { Start, VerifyDomain, UpdateSiteUrl, ConnectWithNexcess, FindDomain, ClaimYourDomain } from '../screens'; export interface GoLiveInterface { isLoading: boolean; verifyingUrl: string; lastStep: number; hasDomain: string | null; + selectedDomains: Domain[]; + searchDomain: string; skipDnsVerification: boolean; verificationStatus: string; verificationErrorType: boolean | string; verificationMessage: string; - showGetDomain: boolean; showLogoutButton: boolean; steps: Array; + stepsAlternative: Array; } const localData: GoLiveInterface = { @@ -22,11 +24,12 @@ const localData: GoLiveInterface = { verifyingUrl: '', lastStep: 3, hasDomain: null, + selectedDomains: [], + searchDomain: '', skipDnsVerification: false, verificationStatus: 'default', verificationErrorType: false, verificationMessage: '', - showGetDomain: false, showLogoutButton: false, steps: [ { @@ -66,6 +69,44 @@ const localData: GoLiveInterface = { disableNext: false, }, ], + stepsAlternative: [ + { + id: 0, + label: __('Start', 'nexcess-mapps'), + hideBack: false, + hideSkip: true, + nextText: __('Checkout', 'nexcess-mapps'), + loadingText: __('Saving', 'nexcess-mapps'), + backText: __('Back', 'nexcess-mapps'), + disable: true, + disableNext: true, + screen: , + }, + { + id: 1, + label: __('Connect with Nexcess', 'nexcess-mapps'), + hideBack: false, + hideSkip: true, + nextText: __('Connect Your Nexcess Account', 'nexcess-mapps'), + loadingText: __('Connecting…', 'nexcess-mapps'), + backText: __('Back', 'nexcess-mapps'), + screen: , + disable: true, + disableNext: false, + }, + { + id: 2, + label: __('Claim Your Domain', 'nexcess-mapps'), + hideBack: false, + hideSkip: true, + nextText: __('Save & Exit', 'nexcess-mapps'), + loadingText: __('Processing', 'nexcess-mapps'), + backText: __('Back', 'nexcess-mapps'), + screen: , + disable: true, + disableNext: false, + }, + ] }; const goLiveScreenData = (): GoLiveInterface => { diff --git a/packages/sitebuilder/src/wizards/go-live/screens/ClaimYourDomain.tsx b/packages/sitebuilder/src/wizards/go-live/screens/ClaimYourDomain.tsx new file mode 100644 index 00000000..526e80cc --- /dev/null +++ b/packages/sitebuilder/src/wizards/go-live/screens/ClaimYourDomain.tsx @@ -0,0 +1,59 @@ +import React from 'react'; +import { + Box, + Typography +} from '@mui/material'; +import { __, sprintf } from '@wordpress/i18n'; +import { useSearchParams } from 'react-router-dom'; +import { IMAGE_DIR } from '@sb/constants'; +import { GoLiveStringData } from '../data/constants'; + +const ClaimYourDomain = () => { + const { + claimYourDomain: { + screenTitle, + screenDescription, + } + } = GoLiveStringData; + const [searchParams] = useSearchParams(); + + // TODO: Make it works with more than one domain. + const domain = searchParams.get('domain') || __('The domain', 'nexcess-mapps'); + const title = sprintf('%1$s %2$s', + domain, + screenTitle + ); + return ( + + + + { title } + + + { screenDescription } + + + ); +}; + +export default ClaimYourDomain; diff --git a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx new file mode 100644 index 00000000..60c9932d --- /dev/null +++ b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx @@ -0,0 +1,80 @@ +import React from 'react'; +import { + Box, + List, + ThemeProvider, + createTheme +} from '@mui/material'; +import { ListItemCheckout, WizardSectionTitle } from '@moderntribe/wme-ui'; + +import { useGoLive } from '@sb/hooks'; +import { parseDomainListItem } from '@sb/utils/parseDomainListItem'; +import { GoLiveStringData } from '../data/constants'; + +const ConnectWithNexcess = () => { + const { + connectWithNexcess: { + screenTitle, + screenDescription + } + } = GoLiveStringData; + + const { + goLiveState, + } = useGoLive(); + + const { + selectedDomains, + } = goLiveState; + + return ( + + + createTheme({ + ...theme, + palette: { + ...theme.palette, + primary: { + ...theme.palette.primary, + dark: '#0033B8', + }, + }, + }) + } + > + + { selectedDomains.map((domain, index) => { + const domainListItem = parseDomainListItem(domain, true); + return ( + + + { index < selectedDomains.length - 1 && ( + + + ) } + + + ); + }) } + + + + + + ); +}; + +export default ConnectWithNexcess; diff --git a/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx b/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx new file mode 100644 index 00000000..e25001ed --- /dev/null +++ b/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx @@ -0,0 +1,135 @@ +import React from 'react'; +import { Box, Divider, InputAdornment, List, ThemeProvider, createTheme } from '@mui/material'; +import { ListItemCheckout, TextInput, WizardSectionTitle } from '@moderntribe/wme-ui'; +import { Search } from '@mui/icons-material'; +import { IMAGE_DIR } from '@sb/constants'; +import { useFindDomain } from '@sb/hooks'; +import { GoLiveStringData } from '@sb/wizards/go-live/data/constants'; +import { parseDomainListItem } from '@sb/utils/parseDomainListItem'; + +import { + ErrorStatusMessage +} from './partials'; + +const loadingSx = { + '@keyframes fadeIn': { + from: { + opacity: 0.25, + } + }, + '@keyframes rotate': { + from: { + transform: 'rotate(0deg)', + }, + to: { + transform: 'rotate(359deg)', + }, + }, + animation: 'rotate 1s infinite linear', +}; + +const FindDomain = () => { + const { start: { + screenTitle2: title, + screenDescription2: description, + defaultError + } } = GoLiveStringData; + + const { search, setSearch, data: domains = [], selectedDomains, toggleSelectedDomain, isFetching, isError, error } = useFindDomain(); + const [internalSearch, setInternalSearch] = React.useState(search); + + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + setSearch(internalSearch); + }; + + return ( + + + + + + { isFetching ? : } + + } + value={ internalSearch } + onChange={ (event) => setInternalSearch(event.target.value) } + /> + + + + createTheme({ + ...theme, + palette: { + ...theme.palette, + primary: { + ...theme.palette.primary, + dark: '#0033B8', + }, + }, + }) + } + > + + + { domains.map((domain, index) => { + const selected = selectedDomains.some((_) => _.domain === domain.domain); + const domainListItem = parseDomainListItem(domain, selected); + return ( + + toggleSelectedDomain(domain) } /> + { index < domains.length - 1 && ( + + + + ) } + + ); + }) } + { + isFetching && ( + + ) + } + + + { isError && } + + ); +}; + +export default FindDomain; diff --git a/packages/sitebuilder/src/wizards/go-live/screens/Start.tsx b/packages/sitebuilder/src/wizards/go-live/screens/Start.tsx index b6bfd9fe..9a664bbc 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/Start.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/Start.tsx @@ -1,9 +1,8 @@ import React from 'react'; import { Box, Link, Typography, useTheme } from '@mui/material'; import { CardSelectGroup, CardSelectItem, WizardSectionTitle } from '@moderntribe/wme-ui'; -import { OpenInNew } from '@mui/icons-material'; import { __ } from '@wordpress/i18n'; -import { IMAGE_DIR, NEXCESS_DOMAIN_REGISTRATION_URL } from '@sb/constants'; +import { IMAGE_DIR } from '@sb/constants'; import { useGoLive } from '@sb/hooks'; import { GoLiveStringData } from '../data/constants'; @@ -26,12 +25,10 @@ const PoweredByNexcessFooter = () => { }; const Start = () => { - const { goLiveState: { hasDomain, showGetDomain }, setHasDomain } = useGoLive(); + const { goLiveState: { hasDomain }, setHasDomain } = useGoLive(); const { start: { - screenTitle1, - screenTitle2, - screenDescription1, - screenDescription2, + screenTitle1: title, + screenDescription1: description, actionLabel, actionTitle1, actionTitle2, @@ -39,8 +36,9 @@ const Start = () => { actionContent2 } } = GoLiveStringData; - const title = showGetDomain ? screenTitle2 : screenTitle1; - const description = showGetDomain ? screenDescription2 : screenDescription1; + const handleDomainPurchased = (event: React.MouseEvent, value:string) => { + setHasDomain(value); + }; const cardSx = { '& .WmeCardSelectItem-root': { @@ -49,94 +47,41 @@ const Start = () => { } }; - const registerSx = { - display: 'flex', - alignItems: 'center', - fontWeight: 500, - cursor: 'pointer', - '& .MuiSvgIcon-root': { - fontSize: '1.25rem', - marginLeft: '8px', - } - }; - - const handleDomainPurchased = (event: React.MouseEvent, value:string) => { - setHasDomain(value); - }; - - const handleRegisterDomainClick = () => { - setHasDomain('yes'); - - if (NEXCESS_DOMAIN_REGISTRATION_URL) { - window.open(NEXCESS_DOMAIN_REGISTRATION_URL, '_blank'); - } - }; - return ( - { showGetDomain - ? <> - + + + { actionLabel } + + + - - { __('Register A Domain With Nexcess', 'nexcess-mapps') } - - - - : <> - } /> - - { actionLabel } - - - - } - /> - - - } + ); }; diff --git a/packages/sitebuilder/src/wizards/go-live/screens/index.ts b/packages/sitebuilder/src/wizards/go-live/screens/index.ts index 7dbad3d7..14b0f34c 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/index.ts +++ b/packages/sitebuilder/src/wizards/go-live/screens/index.ts @@ -1,3 +1,6 @@ +export { default as ClaimYourDomain } from './ClaimYourDomain'; +export { default as ConnectWithNexcess } from './ConnectWithNexcess'; +export { default as FindDomain } from './FindDomain'; export { default as Start } from './Start'; export { default as VerifyDomain } from './VerifyDomain'; export { default as UpdateSiteUrl } from './UpdateSiteUrl'; From abe4fff21084b1b0b43be1c1a50ba610f1381e1b Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Fri, 4 Nov 2022 21:11:55 -0700 Subject: [PATCH 02/25] chore: Jorge's storebuilder work --- packages/storebuilder/mix-manifest.json | 7 +------ packages/storebuilder/src/contexts/WizardProvider.tsx | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/storebuilder/mix-manifest.json b/packages/storebuilder/mix-manifest.json index b1486766..7e15621f 100644 --- a/packages/storebuilder/mix-manifest.json +++ b/packages/storebuilder/mix-manifest.json @@ -1,6 +1,5 @@ { "/dist/index.js": "/dist/index.js", - "/dist/assets/ftcComplete.png": "/dist/assets/ftcComplete.png", "/dist/assets/images/flat-rate-icon.png": "/dist/assets/images/flat-rate-icon.png", "/dist/assets/images/ftc-complete.png": "/dist/assets/images/ftc-complete.png", "/dist/assets/images/ftc-product-count-1-10.svg": "/dist/assets/images/ftc-product-count-1-10.svg", @@ -24,9 +23,5 @@ "/dist/assets/images/setup-shipping-poster.png": "/dist/assets/images/setup-shipping-poster.png", "/dist/assets/images/stripe-logo.png": "/dist/assets/images/stripe-logo.png", "/dist/assets/images/usps-icon-full.png": "/dist/assets/images/usps-icon-full.png", - "/dist/assets/images/usps-icon.png": "/dist/assets/images/usps-icon.png", - "/dist/assets/images.d.ts": "/dist/assets/images.d.ts", - "/dist/assets/images.d.ts.map": "/dist/assets/images.d.ts.map", - "/dist/assets/images.ts": "/dist/assets/images.ts", - "/dist/assets/index.d.ts": "/dist/assets/index.d.ts" + "/dist/assets/images/usps-icon.png": "/dist/assets/images/usps-icon.png" } diff --git a/packages/storebuilder/src/contexts/WizardProvider.tsx b/packages/storebuilder/src/contexts/WizardProvider.tsx index ea7e66f4..ef0ac0a6 100644 --- a/packages/storebuilder/src/contexts/WizardProvider.tsx +++ b/packages/storebuilder/src/contexts/WizardProvider.tsx @@ -97,7 +97,8 @@ const WizardProvider = ({ children }: { children: React.ReactNode }) => { if (typeof targetStep !== 'number') { return; } - setSearchParams({ step: String(targetStep) }); + searchParams.set('step', String(targetStep)); + setSearchParams(searchParams); }; const goToNextStep = () => { From 0f17877e9213226978e25420669ec8ae7caa715e Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Fri, 4 Nov 2022 21:12:23 -0700 Subject: [PATCH 03/25] chore: Jorge's wme-ui work --- .../list-item-checkout/list-item-checkout.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/wme-ui/src/components/list-item-checkout/list-item-checkout.tsx b/packages/wme-ui/src/components/list-item-checkout/list-item-checkout.tsx index 7fe2760d..4a462b3c 100644 --- a/packages/wme-ui/src/components/list-item-checkout/list-item-checkout.tsx +++ b/packages/wme-ui/src/components/list-item-checkout/list-item-checkout.tsx @@ -34,6 +34,7 @@ const StyledListItemCheckout = styled(MuiListItem, { margin: 0, display: 'flex', gap: theme.spacing(2), + paddingRight: theme.spacing(1), '& .MuiButton-text.WmeButton-root': { fontWeight: '600', color: theme.palette.text.disabled, @@ -48,6 +49,7 @@ const PrimaryText = styled(Typography, { fontWeight: 600, color: selected ? theme.palette.primary.dark : theme.palette.text.primary, flexGrow: 1, + fontSize: '0.88rem', })); const SecondaryText = styled(Typography, { @@ -57,6 +59,7 @@ const SecondaryText = styled(Typography, { display: 'block', fontWeight: 600, color: theme.palette.text.primary, + fontSize: '0.88rem', })); const StyledListItemCheckoutContentInner = styled(Box, { @@ -76,6 +79,13 @@ const StyledCheckCircleIcon = styled(CheckCircleIcon, { color: theme.palette.primary.dark, })); +const StyledChip = styled(Chip, { + name: 'WmeListItemCheckout', + slot: 'Chip', +})(({ theme }) => ({ + marginRight: theme.spacing(2), +})); + const ListItemCheckout: React.FC = (props) => { const { name, @@ -87,6 +97,7 @@ const ListItemCheckout: React.FC = (props) => { icon = , iconDisabled = , iconSelected = , + onClick, ...rest } = props; @@ -100,7 +111,7 @@ const ListItemCheckout: React.FC = (props) => { + {iconToRender} )} @@ -109,7 +120,7 @@ const ListItemCheckout: React.FC = (props) => { {name} {price} - {chipLabel && } + {chipLabel && } ); From 448ec6287ee5bfdf6dde3401a8ff2c6749627294 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Fri, 4 Nov 2022 21:12:59 -0700 Subject: [PATCH 04/25] chore: pnpm-lock commit --- pnpm-lock.yaml | 55 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 494aa12a..571681cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -97,6 +97,7 @@ importers: '@mui/icons-material': ^5.8.4 '@mui/material': ^5.9.2 '@mui/utils': ^5.9.1 + '@tanstack/react-query': ^4.14.3 '@types/jquery': ^3.5.14 '@types/node': ^18.7.16 '@types/react': ^18.0.17 @@ -129,6 +130,7 @@ importers: '@mui/icons-material': 5.10.3_dtruv572645qlhu5xokhjjhjka '@mui/material': 5.10.4_vbxcdxy3bftsefaguotlgalomu '@mui/utils': 5.10.3_react@18.2.0 + '@tanstack/react-query': 4.14.3_react@18.2.0 '@wordpress/element': 4.14.0 '@wordpress/html-entities': 3.16.0 '@wordpress/i18n': 4.16.0 @@ -6515,6 +6517,27 @@ packages: resolution: {integrity: sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw==} dev: false + /@tanstack/query-core/4.14.3: + resolution: {integrity: sha512-1OrxZk5jSKAjTIDgH/OHa6GfVpgGDVbCVf3KHQjXLFdutK4PSSXQIyX7I1HvBR3mYKyvFPo6yXKNG7QrkwUj9g==} + dev: false + + /@tanstack/react-query/4.14.3_react@18.2.0: + resolution: {integrity: sha512-PP7DEFsOMl/JaGQr1B4IeGN3lqHrC5EpG+AgG03OlVIOQMtXNhb0N66Nt1pdrladvzYsKD20L3O3550rBzgLtg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + dependencies: + '@tanstack/query-core': 4.14.3 + react: 18.2.0 + use-sync-external-store: 1.2.0_react@18.2.0 + dev: false + /@testing-library/dom/8.17.1: resolution: {integrity: sha512-KnH2MnJUzmFNPW6RIKfd+zf2Wue8mEKX0M3cpX6aKl5ZXrJM1/c/Pc8c2xDNYQCnJO48Sm5ITbMXgqTr3h4jxQ==} engines: {node: '>=12'} @@ -7411,7 +7434,6 @@ packages: dependencies: webpack: 5.74.0_webpack-cli@4.10.0 webpack-cli: 4.10.0_webpack@5.74.0 - dev: true /@webpack-cli/info/1.5.0_webpack-cli@4.10.0: resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} @@ -7420,7 +7442,6 @@ packages: dependencies: envinfo: 7.8.1 webpack-cli: 4.10.0_webpack@5.74.0 - dev: true /@webpack-cli/serve/1.7.0_webpack-cli@4.10.0: resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} @@ -7432,7 +7453,6 @@ packages: optional: true dependencies: webpack-cli: 4.10.0_webpack@5.74.0 - dev: true /@wordpress/babel-plugin-import-jsx-pragma/3.2.0_@babel+core@7.19.0: resolution: {integrity: sha512-XK3Sdpi9MWoy5qPHnRroY/ypX0VtT5yI5809u5As1P/3k4vlXNw8USH4lJ+rkurAOVqqN5mFlf2XAL9AkpfXyg==} @@ -8131,7 +8151,7 @@ packages: loader-utils: 2.0.2 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /babel-plugin-add-react-displayname/0.0.5: resolution: {integrity: sha512-LY3+Y0XVDYcShHHorshrDbt4KFWL4bSeniCtl4SYZbask+Syngk1uMPCeN9+nSiZo6zX5s0RTq/J9Pnaaf/KHw==} @@ -9373,7 +9393,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 3.1.1 semver: 7.3.7 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /css-loader/6.7.1_webpack@5.74.0: resolution: {integrity: sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw==} @@ -10044,7 +10064,6 @@ packages: resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} engines: {node: '>=4'} hasBin: true - dev: true /errno/0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} @@ -11309,7 +11328,6 @@ packages: /fastest-levenshtein/1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} - dev: true /fastq/1.13.0: resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} @@ -11357,7 +11375,7 @@ packages: dependencies: loader-utils: 2.0.2 schema-utils: 3.1.1 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /file-system-cache/1.1.0: resolution: {integrity: sha512-IzF5MBq+5CR0jXx5RxPe4BICl/oEhBSXKaL9fLhAXrIfIUS77Hr4vzrYyqYMHN6uTt+BOqi3fDCTjjEBCjERKw==} @@ -15883,7 +15901,7 @@ packages: klona: 2.0.5 postcss: 8.4.16 semver: 7.3.7 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /postcss-logical/5.0.4_postcss@8.4.16: resolution: {integrity: sha512-RHXxplCeLh9VjinvMrZONq7im4wjWGlRJAqmAVLXyZaXwfDWP73/oq4NdIp+OZwhQUMj0zjqDfM5Fj7qby+B4g==} @@ -17181,7 +17199,6 @@ packages: engines: {node: '>= 0.10'} dependencies: resolve: 1.22.1 - dev: true /recursive-readdir/2.2.2: resolution: {integrity: sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==} @@ -18288,7 +18305,7 @@ packages: dependencies: loader-utils: 2.0.2 schema-utils: 3.1.1 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /style-loader/3.3.1_webpack@5.74.0: resolution: {integrity: sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==} @@ -18555,7 +18572,7 @@ packages: schema-utils: 3.1.1 serialize-javascript: 6.0.0 terser: 5.15.0 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /terser/4.8.1: resolution: {integrity: sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==} @@ -19198,6 +19215,14 @@ packages: serialize-query-params: 1.3.6_query-string@7.1.1 dev: false + /use-sync-external-store/1.2.0_react@18.2.0: + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.2.0 + dev: false + /use/3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} engines: {node: '>=0.10.0'} @@ -19429,7 +19454,6 @@ packages: rechoir: 0.7.1 webpack: 5.74.0_webpack-cli@4.10.0 webpack-merge: 5.8.0 - dev: true /webpack-dev-middleware/3.7.3_webpack@4.46.0: resolution: {integrity: sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==} @@ -19469,7 +19493,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.0.0 - webpack: 5.74.0 + webpack: 5.74.0_webpack-cli@4.10.0 /webpack-dev-server/4.11.0_5v66e2inugklgvlh4huuavolfq: resolution: {integrity: sha512-L5S4Q2zT57SK7tazgzjMiSMBdsw+rGYIX27MgPgx7LDhWO0lViPrHKoLS7jo5In06PWYAhlYu3PbyoC6yAThbw==} @@ -19605,7 +19629,6 @@ packages: dependencies: clone-deep: 4.0.1 wildcard: 2.0.0 - dev: true /webpack-notifier/1.15.0: resolution: {integrity: sha512-N2V8UMgRB5komdXQRavBsRpw0hPhJq2/SWNOGuhrXpIgRhcMexzkGQysUyGStHLV5hkUlgpRiF7IUXoBqyMmzQ==} @@ -19763,7 +19786,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: true /webpackbar/5.0.2_webpack@5.74.0: resolution: {integrity: sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==} @@ -19869,7 +19891,6 @@ packages: /wildcard/2.0.0: resolution: {integrity: sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==} - dev: true /word-wrap/1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} From aca6e11b5c4048e494cf76259bd995d63f6cad9d Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Sat, 5 Nov 2022 14:52:01 -0700 Subject: [PATCH 05/25] chore: Update package version to 1.6.0-alpha.4 --- packages/sitebuilder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index e415151b..360489a4 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.5.0", + "version": "1.6.0-alpha.4", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From 2837a28a339a814b23a4060e456550c81104d53a Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Sun, 6 Nov 2022 06:56:50 -0800 Subject: [PATCH 06/25] chore: Fix text regression --- packages/sitebuilder/mix-manifest.json | 3 +-- packages/sitebuilder/src/wizards/go-live/data/constants.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/sitebuilder/mix-manifest.json b/packages/sitebuilder/mix-manifest.json index 5ef47994..5bd9df0e 100644 --- a/packages/sitebuilder/mix-manifest.json +++ b/packages/sitebuilder/mix-manifest.json @@ -31,6 +31,5 @@ "/dist/assets/images/setup-modal-warning.png": "/dist/assets/images/setup-modal-warning.png", "/dist/assets/images/site-domain-cart.png": "/dist/assets/images/site-domain-cart.png", "/dist/assets/images/site-domain-checkmark.png": "/dist/assets/images/site-domain-checkmark.png", - "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png", - "/dist/assets/images/tada-icon.png": "/dist/assets/images/tada-icon.png" + "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png" } diff --git a/packages/sitebuilder/src/wizards/go-live/data/constants.ts b/packages/sitebuilder/src/wizards/go-live/data/constants.ts index 63d57736..5d1b00a2 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/constants.ts +++ b/packages/sitebuilder/src/wizards/go-live/data/constants.ts @@ -8,7 +8,7 @@ export const GoLiveStringData = { continueStr: __('Continue', 'nexcess-mapps'), errorMessage: __('There was an error while updating your site\'s domain.', 'nexcess-mapps'), errorMessageVerification: __('There was an error while verifying your site\'s domain.', 'nexcess-mapps'), - errorNotPointed: __('This domain is not pointing to your SiteBuilder website.', 'nexcess-mapps'), // TODO: change SiteBuilder to right product name + errorNotPointed: __('This domain is not pointing to your website.', 'nexcess-mapps'), // TODO: change wording to use product name errorNotRegistered: __('This domain is not registered.', 'nexcess-mapps'), errorGeneral: __('We\'re unable to connect your domain.', 'nexcess-mapps'), }, From b66d02e6ca5e6ebb959f19712ae96f49f935642b Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Sun, 6 Nov 2022 07:02:04 -0800 Subject: [PATCH 07/25] chore: Increment alpha package version --- packages/sitebuilder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index 360489a4..b6119ec4 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.6.0-alpha.4", + "version": "1.6.0-alpha.5", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From cc7b0d32f1eb664db309f2af74e1abd72324c277 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 14:33:35 -0800 Subject: [PATCH 08/25] chore: Replace lorem ipsum --- packages/sitebuilder/src/wizards/go-live/data/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/src/wizards/go-live/data/constants.ts b/packages/sitebuilder/src/wizards/go-live/data/constants.ts index 5d1b00a2..bffe4cc4 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/constants.ts +++ b/packages/sitebuilder/src/wizards/go-live/data/constants.ts @@ -16,7 +16,7 @@ export const GoLiveStringData = { screenTitle1: __('Set your site domain', 'nexcess-mapps'), screenTitle2: __('Find the perfect domain.', 'nexcess-mapps'), screenDescription1: __('Let\'s get your site set up with the perfect domain. If you don\'t already have one, don\'t worry - we can help you out.', 'nexcess-mapps'), - screenDescription2: __('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam efficitur augue eget condimentum dapibus. Duis ullamcorper turpis sit amet sapien hendrerit consequat in eget massa.', 'nexcess-mapps'), // TODO: Replace lorem ipsum with real text + screenDescription2: __('Enter the domain name you want your store to have, and we\'ll see if it\'s available. If it isn\'t, we\'ll make suggestions about ones that are.', 'nexcess-mapps'), actionLabel: __('Have you purchased your custom domain?', 'nexcess-mapps'), actionTitle1: __('Yes! I have my own custom domain.', 'nexcess-mapps'), actionTitle2: __('No, I need one!', 'nexcess-mapps'), From 6a3986b4e7d872a42330dd25602e630599245bda Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 14:34:54 -0800 Subject: [PATCH 09/25] chore: Makes search icon clickable on FindDomain screen --- .../src/wizards/go-live/screens/FindDomain.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx b/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx index e25001ed..5ab60f3c 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Box, Divider, InputAdornment, List, ThemeProvider, createTheme } from '@mui/material'; +import { Box, Divider, IconButton, InputAdornment, List, ThemeProvider, createTheme } from '@mui/material'; import { ListItemCheckout, TextInput, WizardSectionTitle } from '@moderntribe/wme-ui'; import { Search } from '@mui/icons-material'; import { IMAGE_DIR } from '@sb/constants'; @@ -73,7 +73,13 @@ const FindDomain = () => { } } endAdornment={ - { isFetching ? : } + { isFetching ? ( + + ) : ( + + + + ) } } value={ internalSearch } From 44a4dd1a9a87e528536928145bc3a5746d0e7f87 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 16:25:29 -0800 Subject: [PATCH 10/25] chore: Add styles to make ListItemCheckout button from appearing clickable --- .../src/wizards/go-live/screens/ConnectWithNexcess.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx index 60c9932d..27954fe3 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx @@ -51,6 +51,15 @@ const ConnectWithNexcess = () => { { index < selectedDomains.length - 1 && ( From 529b3fbbeed882cd6cd168baab16a5bfa42ef2db Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 16:27:47 -0800 Subject: [PATCH 11/25] chore: Update placeholder text --- packages/storebuilder/src/wizards/store-setup/data/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/storebuilder/src/wizards/store-setup/data/constants.ts b/packages/storebuilder/src/wizards/store-setup/data/constants.ts index eb6b12d1..b0cdd3db 100644 --- a/packages/storebuilder/src/wizards/store-setup/data/constants.ts +++ b/packages/storebuilder/src/wizards/store-setup/data/constants.ts @@ -28,7 +28,7 @@ export const StoreSetupStringData = { complete: { title: __('Nice work! Let\'s keep going.', 'nexcess-mapps'), copy: __( - 'Nam erat felis, consectetur et velit non, fermentum vulputate sapien. Morbi rhoncus a metus et.', + 'Next up: Add products and set up your payment method.' 'nexcess-mapps' ), }, From 45c110b53e93f03b69ca72799c04a5010458a2bc Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 17:10:48 -0800 Subject: [PATCH 12/25] fix: Remove old StoreBuilder styles from theme object --- packages/sitebuilder/src/constants/theme.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/sitebuilder/src/constants/theme.ts b/packages/sitebuilder/src/constants/theme.ts index eaacef15..5ed63da9 100644 --- a/packages/sitebuilder/src/constants/theme.ts +++ b/packages/sitebuilder/src/constants/theme.ts @@ -48,12 +48,6 @@ declare module '@mui/material/styles/createPalette' { let theme = { palette: { - primary: { - main: '#303F9F', - dark: '#2A3353', - grey: '#949494', - white: '#FFF', - }, text: { primary: '#2A3353', secondary: '#2A3353', From fc0a28bac0bc6c525e97b49e29d038d6aab4ed19 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 17:11:19 -0800 Subject: [PATCH 13/25] chore: Increment alpha version --- packages/sitebuilder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index b6119ec4..53d861b4 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.6.0-alpha.5", + "version": "1.6.0-alpha.6", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From 7e6aeee9b18939b13cb1ae7d7e77215e6f97bf7a Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Mon, 7 Nov 2022 17:12:51 -0800 Subject: [PATCH 14/25] chore: Commit mix-manifest.json change --- packages/sitebuilder/mix-manifest.json | 48 +++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/packages/sitebuilder/mix-manifest.json b/packages/sitebuilder/mix-manifest.json index 5bd9df0e..ccb4aa9e 100644 --- a/packages/sitebuilder/mix-manifest.json +++ b/packages/sitebuilder/mix-manifest.json @@ -1,5 +1,23 @@ { "/dist/index.js": "/dist/index.js", + "/dist/assets/antic.jpg": "/dist/assets/antic.jpg", + "/dist/assets/check.svg": "/dist/assets/check.svg", + "/dist/assets/eyes-emoji.png": "/dist/assets/eyes-emoji.png", + "/dist/assets/fonts/antic.jpg": "/dist/assets/fonts/antic.jpg", + "/dist/assets/fonts/gilda.jpg": "/dist/assets/fonts/gilda.jpg", + "/dist/assets/fonts/index.d.ts": "/dist/assets/fonts/index.d.ts", + "/dist/assets/fonts/josefin.jpg": "/dist/assets/fonts/josefin.jpg", + "/dist/assets/fonts/libre.jpg": "/dist/assets/fonts/libre.jpg", + "/dist/assets/fonts/lora.jpg": "/dist/assets/fonts/lora.jpg", + "/dist/assets/fonts/montserrat.jpg": "/dist/assets/fonts/montserrat.jpg", + "/dist/assets/fonts/nunito.jpg": "/dist/assets/fonts/nunito.jpg", + "/dist/assets/fonts/oswald.jpg": "/dist/assets/fonts/oswald.jpg", + "/dist/assets/fonts/playfair.jpg": "/dist/assets/fonts/playfair.jpg", + "/dist/assets/fonts/proza.jpg": "/dist/assets/fonts/proza.jpg", + "/dist/assets/fonts/rubik.jpg": "/dist/assets/fonts/rubik.jpg", + "/dist/assets/fonts/worksans.jpg": "/dist/assets/fonts/worksans.jpg", + "/dist/assets/ftc-design-preview.png": "/dist/assets/ftc-design-preview.png", + "/dist/assets/gilda.jpg": "/dist/assets/gilda.jpg", "/dist/assets/images/check.svg": "/dist/assets/images/check.svg", "/dist/assets/images/eyes-emoji.png": "/dist/assets/images/eyes-emoji.png", "/dist/assets/images/fonts/antic.jpg": "/dist/assets/images/fonts/antic.jpg", @@ -31,5 +49,33 @@ "/dist/assets/images/setup-modal-warning.png": "/dist/assets/images/setup-modal-warning.png", "/dist/assets/images/site-domain-cart.png": "/dist/assets/images/site-domain-cart.png", "/dist/assets/images/site-domain-checkmark.png": "/dist/assets/images/site-domain-checkmark.png", - "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png" + "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png", + "/dist/assets/images/tada-icon.png": "/dist/assets/images/tada-icon.png", + "/dist/assets/index.d.ts": "/dist/assets/index.d.ts", + "/dist/assets/josefin.jpg": "/dist/assets/josefin.jpg", + "/dist/assets/kadence-icon.svg": "/dist/assets/kadence-icon.svg", + "/dist/assets/libre.jpg": "/dist/assets/libre.jpg", + "/dist/assets/loading-icon.svg": "/dist/assets/loading-icon.svg", + "/dist/assets/lora.jpg": "/dist/assets/lora.jpg", + "/dist/assets/montserrat.jpg": "/dist/assets/montserrat.jpg", + "/dist/assets/nexcess-logo.png": "/dist/assets/nexcess-logo.png", + "/dist/assets/nunito.jpg": "/dist/assets/nunito.jpg", + "/dist/assets/oswald.jpg": "/dist/assets/oswald.jpg", + "/dist/assets/palette.png": "/dist/assets/palette.png", + "/dist/assets/party-emoji.png": "/dist/assets/party-emoji.png", + "/dist/assets/playfair.jpg": "/dist/assets/playfair.jpg", + "/dist/assets/proza.jpg": "/dist/assets/proza.jpg", + "/dist/assets/rocket-icon.png": "/dist/assets/rocket-icon.png", + "/dist/assets/rubik.jpg": "/dist/assets/rubik.jpg", + "/dist/assets/setup-background.png": "/dist/assets/setup-background.png", + "/dist/assets/setup-icon-design.png": "/dist/assets/setup-icon-design.png", + "/dist/assets/setup-icon-launch.png": "/dist/assets/setup-icon-launch.png", + "/dist/assets/setup-icon-palette.png": "/dist/assets/setup-icon-palette.png", + "/dist/assets/setup-icon-setup.png": "/dist/assets/setup-icon-setup.png", + "/dist/assets/setup-modal-warning.png": "/dist/assets/setup-modal-warning.png", + "/dist/assets/site-domain-cart.png": "/dist/assets/site-domain-cart.png", + "/dist/assets/site-domain-checkmark.png": "/dist/assets/site-domain-checkmark.png", + "/dist/assets/store-setup-end-card.png": "/dist/assets/store-setup-end-card.png", + "/dist/assets/tada-icon.png": "/dist/assets/tada-icon.png", + "/dist/assets/worksans.jpg": "/dist/assets/worksans.jpg" } From f6cdce5f60c785a115b4c04645313adb04447fff Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Tue, 8 Nov 2022 11:33:19 -0800 Subject: [PATCH 15/25] fix: Update redirect to use nexcess domain and UUID value --- packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts index 9f35b61b..923b844e 100644 --- a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts +++ b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts @@ -41,7 +41,7 @@ export function useCreatePurchaseFlow() { createPurchaseFlow, { onSuccess: (data) => { - window.location.href = data.callback_url; + window.location.href = `https://my.nexcess.net/external/login?id=${ data.uuid }&theme=storebuilder`; }, } ); From c0529eb74afc52b18b0500a30bab8e08e797b022 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Tue, 8 Nov 2022 11:34:30 -0800 Subject: [PATCH 16/25] chore: Increment alpha package --- packages/sitebuilder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index 53d861b4..1ee3369d 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.6.0-alpha.6", + "version": "1.6.0-alpha.7", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From f80eae69290837bbb464a0950703ee17ef8d65f9 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Tue, 8 Nov 2022 11:38:24 -0800 Subject: [PATCH 17/25] chore: Fixes indenting --- packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts index 923b844e..6fcc80a5 100644 --- a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts +++ b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts @@ -41,7 +41,7 @@ export function useCreatePurchaseFlow() { createPurchaseFlow, { onSuccess: (data) => { - window.location.href = `https://my.nexcess.net/external/login?id=${ data.uuid }&theme=storebuilder`; + window.location.href = `https://my.nexcess.net/external/login?id=${ data.uuid }&theme=storebuilder`; }, } ); From 92f74a52169bbc318e3854995bae20eb096d35f0 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Tue, 8 Nov 2022 14:54:03 -0800 Subject: [PATCH 18/25] chore: Increment alpha version --- packages/sitebuilder/mix-manifest.json | 48 +------------------------- packages/sitebuilder/package.json | 2 +- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/packages/sitebuilder/mix-manifest.json b/packages/sitebuilder/mix-manifest.json index ccb4aa9e..5bd9df0e 100644 --- a/packages/sitebuilder/mix-manifest.json +++ b/packages/sitebuilder/mix-manifest.json @@ -1,23 +1,5 @@ { "/dist/index.js": "/dist/index.js", - "/dist/assets/antic.jpg": "/dist/assets/antic.jpg", - "/dist/assets/check.svg": "/dist/assets/check.svg", - "/dist/assets/eyes-emoji.png": "/dist/assets/eyes-emoji.png", - "/dist/assets/fonts/antic.jpg": "/dist/assets/fonts/antic.jpg", - "/dist/assets/fonts/gilda.jpg": "/dist/assets/fonts/gilda.jpg", - "/dist/assets/fonts/index.d.ts": "/dist/assets/fonts/index.d.ts", - "/dist/assets/fonts/josefin.jpg": "/dist/assets/fonts/josefin.jpg", - "/dist/assets/fonts/libre.jpg": "/dist/assets/fonts/libre.jpg", - "/dist/assets/fonts/lora.jpg": "/dist/assets/fonts/lora.jpg", - "/dist/assets/fonts/montserrat.jpg": "/dist/assets/fonts/montserrat.jpg", - "/dist/assets/fonts/nunito.jpg": "/dist/assets/fonts/nunito.jpg", - "/dist/assets/fonts/oswald.jpg": "/dist/assets/fonts/oswald.jpg", - "/dist/assets/fonts/playfair.jpg": "/dist/assets/fonts/playfair.jpg", - "/dist/assets/fonts/proza.jpg": "/dist/assets/fonts/proza.jpg", - "/dist/assets/fonts/rubik.jpg": "/dist/assets/fonts/rubik.jpg", - "/dist/assets/fonts/worksans.jpg": "/dist/assets/fonts/worksans.jpg", - "/dist/assets/ftc-design-preview.png": "/dist/assets/ftc-design-preview.png", - "/dist/assets/gilda.jpg": "/dist/assets/gilda.jpg", "/dist/assets/images/check.svg": "/dist/assets/images/check.svg", "/dist/assets/images/eyes-emoji.png": "/dist/assets/images/eyes-emoji.png", "/dist/assets/images/fonts/antic.jpg": "/dist/assets/images/fonts/antic.jpg", @@ -49,33 +31,5 @@ "/dist/assets/images/setup-modal-warning.png": "/dist/assets/images/setup-modal-warning.png", "/dist/assets/images/site-domain-cart.png": "/dist/assets/images/site-domain-cart.png", "/dist/assets/images/site-domain-checkmark.png": "/dist/assets/images/site-domain-checkmark.png", - "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png", - "/dist/assets/images/tada-icon.png": "/dist/assets/images/tada-icon.png", - "/dist/assets/index.d.ts": "/dist/assets/index.d.ts", - "/dist/assets/josefin.jpg": "/dist/assets/josefin.jpg", - "/dist/assets/kadence-icon.svg": "/dist/assets/kadence-icon.svg", - "/dist/assets/libre.jpg": "/dist/assets/libre.jpg", - "/dist/assets/loading-icon.svg": "/dist/assets/loading-icon.svg", - "/dist/assets/lora.jpg": "/dist/assets/lora.jpg", - "/dist/assets/montserrat.jpg": "/dist/assets/montserrat.jpg", - "/dist/assets/nexcess-logo.png": "/dist/assets/nexcess-logo.png", - "/dist/assets/nunito.jpg": "/dist/assets/nunito.jpg", - "/dist/assets/oswald.jpg": "/dist/assets/oswald.jpg", - "/dist/assets/palette.png": "/dist/assets/palette.png", - "/dist/assets/party-emoji.png": "/dist/assets/party-emoji.png", - "/dist/assets/playfair.jpg": "/dist/assets/playfair.jpg", - "/dist/assets/proza.jpg": "/dist/assets/proza.jpg", - "/dist/assets/rocket-icon.png": "/dist/assets/rocket-icon.png", - "/dist/assets/rubik.jpg": "/dist/assets/rubik.jpg", - "/dist/assets/setup-background.png": "/dist/assets/setup-background.png", - "/dist/assets/setup-icon-design.png": "/dist/assets/setup-icon-design.png", - "/dist/assets/setup-icon-launch.png": "/dist/assets/setup-icon-launch.png", - "/dist/assets/setup-icon-palette.png": "/dist/assets/setup-icon-palette.png", - "/dist/assets/setup-icon-setup.png": "/dist/assets/setup-icon-setup.png", - "/dist/assets/setup-modal-warning.png": "/dist/assets/setup-modal-warning.png", - "/dist/assets/site-domain-cart.png": "/dist/assets/site-domain-cart.png", - "/dist/assets/site-domain-checkmark.png": "/dist/assets/site-domain-checkmark.png", - "/dist/assets/store-setup-end-card.png": "/dist/assets/store-setup-end-card.png", - "/dist/assets/tada-icon.png": "/dist/assets/tada-icon.png", - "/dist/assets/worksans.jpg": "/dist/assets/worksans.jpg" + "/dist/assets/images/store-setup-end-card.png": "/dist/assets/images/store-setup-end-card.png" } diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index 1ee3369d..2c375229 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.6.0-alpha.7", + "version": "1.6.0-alpha.8", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From 730eae575ea1753d10dc8fd4b462e63ccfea9729 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 08:00:24 -0800 Subject: [PATCH 19/25] chore: Leverage new pruchaseFlowUrl property --- packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts index 6fcc80a5..5d55209d 100644 --- a/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts +++ b/packages/sitebuilder/src/hooks/useCreatePurchaseFlow.ts @@ -37,11 +37,12 @@ async function createPurchaseFlow(domains: { domainName: string, packageId: numb } export function useCreatePurchaseFlow() { + const goLivePurchaseFlowUrl = GO_LIVE_PROPS?.purchaseFlowUrl || ''; const mutation = useMutation( createPurchaseFlow, { onSuccess: (data) => { - window.location.href = `https://my.nexcess.net/external/login?id=${ data.uuid }&theme=storebuilder`; + window.location.href = goLivePurchaseFlowUrl.replace('UUID', data.uuid); }, } ); From 3b316bd8a33775d1f94a07116a9291b880055a55 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 08:04:59 -0800 Subject: [PATCH 20/25] chore: Increment alpha version --- packages/sitebuilder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index 2c375229..07abb482 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.6.0-alpha.8", + "version": "1.6.0-alpha.9", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From 279d4b83f28a38730f5851930c8c403a6e5bf23b Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 10:39:53 -0800 Subject: [PATCH 21/25] chore: Add new content to VerifyDomain screen --- .../src/wizards/go-live/data/constants.ts | 1 + .../src/wizards/go-live/screens/VerifyDomain.tsx | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/sitebuilder/src/wizards/go-live/data/constants.ts b/packages/sitebuilder/src/wizards/go-live/data/constants.ts index bffe4cc4..b048202d 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/constants.ts +++ b/packages/sitebuilder/src/wizards/go-live/data/constants.ts @@ -27,6 +27,7 @@ export const GoLiveStringData = { verifyDomain: { screenTitle: __('Verify your domain', 'nexcess-mapps'), screenDescription: __('We\'ll verify your domain and get it ready to use. This can take a while, but don\'t worry - we\'ll walk you through it.', 'nexcess-mapps'), + screenNotice: __('If you\'re using a subdomain (ex: store.example.com), please stop here and reach out to support at', 'nexcess-mapps'), goLiveLabelText: __('Enter the domain you want to connect', 'nexcess-mapps'), goLivePlaceholderText: __('yourdomain.com', 'nexcess-mapps'), errorDomainFormat: __('The domain entered does not appear to be a valid format.', 'nexcess-mapps'), diff --git a/packages/sitebuilder/src/wizards/go-live/screens/VerifyDomain.tsx b/packages/sitebuilder/src/wizards/go-live/screens/VerifyDomain.tsx index 6965d9e4..e53dae60 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/VerifyDomain.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/VerifyDomain.tsx @@ -1,11 +1,14 @@ import React, { useState, useEffect } from 'react'; +import { __ } from '@wordpress/i18n'; import { Box, FormControl, FormLabel, IconButton, TextField, - InputAdornment + InputAdornment, + Link, + FormHelperText } from '@mui/material'; import { ArrowForward, @@ -46,6 +49,7 @@ const VerifyDomain = () => { verifyDomain: { screenTitle, screenDescription, + screenNotice, goLiveLabelText, goLivePlaceholderText, errorDomainFormat @@ -127,7 +131,7 @@ const VerifyDomain = () => { component="form" onSubmit={ handleSubmit } > - + { goLiveLabelText } { } - { + + { `${ screenNotice } ` } + { __('storebuilder@nexcess.net', 'nexcess-mapps') }. + + { { (verificationStatus === 'error' && ! validDomain) && } { (verificationStatus === 'connected' && validDomain) && } From 7d7722efdf4aead28fd9a612535789ea87069de6 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 10:40:22 -0800 Subject: [PATCH 22/25] chore: Fix indentations --- .../go-live/screens/ConnectWithNexcess.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx index 27954fe3..d2cbeba8 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx @@ -51,15 +51,15 @@ const ConnectWithNexcess = () => { { index < selectedDomains.length - 1 && ( From 858bab0887885fa7a8f971686bb334d372944e6d Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 10:41:24 -0800 Subject: [PATCH 23/25] chore: Increment alpha package --- packages/sitebuilder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitebuilder/package.json b/packages/sitebuilder/package.json index 07abb482..481d1b6c 100644 --- a/packages/sitebuilder/package.json +++ b/packages/sitebuilder/package.json @@ -1,6 +1,6 @@ { "name": "@moderntribe/sitebuilder", - "version": "1.6.0-alpha.9", + "version": "1.6.0-alpha.10", "description": "SiteBuilder foundation", "main": "dist/index.js", "files": [ From 32904788f8a5861337cff6447abdbee6fbecf1fa Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 13:14:41 -0800 Subject: [PATCH 24/25] fix: Adds support for non 12 month terms --- .../src/utils/parseDomainListItem.ts | 21 ++++++++++++++----- .../src/wizards/go-live/data/constants.ts | 1 - .../go-live/screens/ConnectWithNexcess.tsx | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/sitebuilder/src/utils/parseDomainListItem.ts b/packages/sitebuilder/src/utils/parseDomainListItem.ts index 505624f5..9d56c62a 100644 --- a/packages/sitebuilder/src/utils/parseDomainListItem.ts +++ b/packages/sitebuilder/src/utils/parseDomainListItem.ts @@ -1,4 +1,4 @@ -import { sprintf } from '@wordpress/i18n'; +import { sprintf, _n } from '@wordpress/i18n'; import { GoLiveStringData } from '@sb/wizards/go-live/data/constants'; type DomainListItem = { @@ -10,13 +10,24 @@ type DomainListItem = { selected: boolean, } -function getPrice(price: string, isAvailable: boolean) { +function getPrice(termFees: DomainTermFees, isAvailable: boolean) { if (! isAvailable) { return undefined; } - return sprintf('%1$s %2$s', + + // Get the terms available for this domain. + const terms = Object.keys(termFees); + const shortestTerm = Math.min(...terms.map((term) => Number(term))); + const termToYear = shortestTerm / 12; + const price = termFees[ shortestTerm ]; + + // eslint-disable-next-line @wordpress/i18n-translator-comments + const perYear = _n('year', 'years', termToYear, 'nexcess-mapps'); + + return sprintf('%1$s / %2$s %3$s', price, - GoLiveStringData.domainItems.perYear + termToYear, + perYear ); } @@ -41,7 +52,7 @@ export function parseDomainListItem(domain: Domain, selected: boolean): DomainLi return ({ name: domain.domain, disabled: ! domain.is_available, - price: getPrice(domain.package.term_fees[ '12' ], domain.is_available), + price: getPrice(domain.package.term_fees, domain.is_available), chipLabel: getChipLabel(domain.is_available, selected), chipColor: getChipColor(domain.is_available, selected), selected, diff --git a/packages/sitebuilder/src/wizards/go-live/data/constants.ts b/packages/sitebuilder/src/wizards/go-live/data/constants.ts index b048202d..064a57a4 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/constants.ts +++ b/packages/sitebuilder/src/wizards/go-live/data/constants.ts @@ -87,7 +87,6 @@ export const GoLiveStringData = { nevermind: __('Do not skip verification', 'nexcess-mapps') }, domainItems: { - perYear: __('/ year', 'nexcess-mapps'), taken: __('Taken', 'nexcess-mapps'), selected: __('Selected', 'nexcess-mapps'), available: __('Available', 'nexcess-mapps'), diff --git a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx index d2cbeba8..3ec096d9 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/ConnectWithNexcess.tsx @@ -58,7 +58,7 @@ const ConnectWithNexcess = () => { }, '& .MuiTouchRipple-root': { display: 'none', - }, + }, } } } /> { index < selectedDomains.length - 1 && ( From 9707d138f247eea8d2ce3cb97c8aa531dea3c1d3 Mon Sep 17 00:00:00 2001 From: Mark Furrow Date: Wed, 9 Nov 2022 13:37:07 -0800 Subject: [PATCH 25/25] chore: Lint fixes --- .../src/wizards/go-live/data/constants.ts | 10 +++++----- .../src/wizards/go-live/screens/FindDomain.tsx | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/sitebuilder/src/wizards/go-live/data/constants.ts b/packages/sitebuilder/src/wizards/go-live/data/constants.ts index 064a57a4..eb0811ce 100644 --- a/packages/sitebuilder/src/wizards/go-live/data/constants.ts +++ b/packages/sitebuilder/src/wizards/go-live/data/constants.ts @@ -10,7 +10,7 @@ export const GoLiveStringData = { errorMessageVerification: __('There was an error while verifying your site\'s domain.', 'nexcess-mapps'), errorNotPointed: __('This domain is not pointing to your website.', 'nexcess-mapps'), // TODO: change wording to use product name errorNotRegistered: __('This domain is not registered.', 'nexcess-mapps'), - errorGeneral: __('We\'re unable to connect your domain.', 'nexcess-mapps'), + errorGeneral: __('We\'re unable to connect your domain.', 'nexcess-mapps') }, start: { screenTitle1: __('Set your site domain', 'nexcess-mapps'), @@ -30,7 +30,7 @@ export const GoLiveStringData = { screenNotice: __('If you\'re using a subdomain (ex: store.example.com), please stop here and reach out to support at', 'nexcess-mapps'), goLiveLabelText: __('Enter the domain you want to connect', 'nexcess-mapps'), goLivePlaceholderText: __('yourdomain.com', 'nexcess-mapps'), - errorDomainFormat: __('The domain entered does not appear to be a valid format.', 'nexcess-mapps'), + errorDomainFormat: __('The domain entered does not appear to be a valid format.', 'nexcess-mapps') }, updateSiteUrl: { screenTitle: __('You\'re ready to go live with', 'nexcess-mapps'), @@ -46,7 +46,7 @@ export const GoLiveStringData = { }, claimYourDomain: { screenTitle: __('is all yours!', 'nexcess-mapps'), - screenDescription: __('While a new domain is often ready for use within an hour, it can take up to 8 hours to completely process.', 'nexcess-mapps'), + screenDescription: __('While a new domain is often ready for use within an hour, it can take up to 8 hours to completely process.', 'nexcess-mapps') }, errorDomainGeneral: { accountContent: __('It looks like we\'re having trouble connecting your domain.', 'nexcess-mapps'), @@ -72,7 +72,7 @@ export const GoLiveStringData = { advancedLabelPart2: __('Skip verification', 'nexcess-mapps'), advancedContentPart1: __('By default, we check that the appropriate DNS records are set before changing your domain. If you\'re behind a proxy or are using another more advanced DNS technique, you may wish to skip this validation.', 'nexcess-mapps'), advancedContentPart2: __('Your site may become inaccessible if its DNS records are invalid, so please double-check your DNS configuration before continuing.', 'nexcess-mapps'), - advancedContentPart3: __('If anything does go wrong, please reach out to support and we\'ll get you up and running!', 'nexcess-mapps'), + advancedContentPart3: __('If anything does go wrong, please reach out to support and we\'ll get you up and running!', 'nexcess-mapps') }, successDomainConnected: { statusSuccessPart1: __('Your domain is ready to connect!', 'nexcess-mapps'), @@ -89,6 +89,6 @@ export const GoLiveStringData = { domainItems: { taken: __('Taken', 'nexcess-mapps'), selected: __('Selected', 'nexcess-mapps'), - available: __('Available', 'nexcess-mapps'), + available: __('Available', 'nexcess-mapps') } }; diff --git a/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx b/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx index 5ab60f3c..5a269d0f 100644 --- a/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx +++ b/packages/sitebuilder/src/wizards/go-live/screens/FindDomain.tsx @@ -74,12 +74,12 @@ const FindDomain = () => { endAdornment={ { isFetching ? ( - - ) : ( - - - - ) } + + ) : ( + + + + ) } } value={ internalSearch }