2018-06-28 13:52:45 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2018-06-29 15:20:08 +00:00
|
|
|
import { __ } from '@wordpress/i18n';
|
2021-02-19 13:57:17 +00:00
|
|
|
import { lazy, useState } from '@wordpress/element';
|
|
|
|
import { useDispatch, useSelect } from '@wordpress/data';
|
2020-08-05 22:02:24 +00:00
|
|
|
import { uniqueId, find } from 'lodash';
|
2021-03-05 02:37:18 +00:00
|
|
|
import {
|
|
|
|
Icon,
|
|
|
|
help as helpIcon,
|
|
|
|
inbox as inboxIcon,
|
|
|
|
external,
|
|
|
|
} from '@wordpress/icons';
|
2021-08-24 11:39:48 +00:00
|
|
|
import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
|
2021-02-16 20:01:11 +00:00
|
|
|
import { H, Section } from '@woocommerce/components';
|
2021-03-30 18:44:17 +00:00
|
|
|
import {
|
2021-06-09 13:56:45 +00:00
|
|
|
ONBOARDING_STORE_NAME,
|
2021-03-30 18:44:17 +00:00
|
|
|
OPTIONS_STORE_NAME,
|
|
|
|
useUser,
|
|
|
|
} from '@woocommerce/data';
|
2020-08-05 22:02:24 +00:00
|
|
|
import { getHistory, getNewPath } from '@woocommerce/navigation';
|
2020-12-18 13:17:07 +00:00
|
|
|
import { recordEvent } from '@woocommerce/tracks';
|
2021-06-09 13:56:45 +00:00
|
|
|
import { applyFilters } from '@wordpress/hooks';
|
2021-06-11 13:37:21 +00:00
|
|
|
import { useSlot } from '@woocommerce/experimental';
|
2020-07-14 12:20:51 +00:00
|
|
|
|
2018-06-28 13:52:45 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2018-06-29 15:20:08 +00:00
|
|
|
import './style.scss';
|
2021-06-09 13:56:45 +00:00
|
|
|
import { isNotesPanelVisible } from './unread-indicators';
|
2020-08-24 21:51:41 +00:00
|
|
|
import { isWCAdmin } from '../../dashboard/utils';
|
2020-08-13 02:05:22 +00:00
|
|
|
import { Tabs } from './tabs';
|
|
|
|
import { SetupProgress } from './setup-progress';
|
2020-11-16 13:48:50 +00:00
|
|
|
import { DisplayOptions } from './display-options';
|
2020-12-18 13:17:07 +00:00
|
|
|
import { HighlightTooltip } from './highlight-tooltip';
|
2021-02-16 20:01:11 +00:00
|
|
|
import { Panel } from './panel';
|
2021-06-09 13:56:45 +00:00
|
|
|
import {
|
|
|
|
getLowStockCount as getLowStockProducts,
|
|
|
|
getOrderStatuses,
|
|
|
|
getUnreadOrders,
|
|
|
|
} from '../../homescreen/activity-panel/orders/utils';
|
|
|
|
import { getUnapprovedReviews } from '../../homescreen/activity-panel/reviews/utils';
|
2021-06-11 13:37:21 +00:00
|
|
|
import { ABBREVIATED_NOTIFICATION_SLOT_NAME } from './panels/inbox/abbreviated-notifications-panel';
|
2020-07-14 12:20:51 +00:00
|
|
|
|
|
|
|
const HelpPanel = lazy( () =>
|
|
|
|
import( /* webpackChunkName: "activity-panels-help" */ './panels/help' )
|
|
|
|
);
|
|
|
|
|
2020-04-29 18:01:27 +00:00
|
|
|
const InboxPanel = lazy( () =>
|
2020-10-06 13:13:32 +00:00
|
|
|
import(
|
2021-06-09 13:56:45 +00:00
|
|
|
/* webpackChunkName: "activity-panels-inbox" */ './panels/inbox/inbox-panel'
|
2020-10-06 13:13:32 +00:00
|
|
|
)
|
2020-04-29 18:01:27 +00:00
|
|
|
);
|
2020-11-25 18:51:15 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
export const ActivityPanel = ( { isEmbedded, query, userPreferencesData } ) => {
|
|
|
|
const [ currentTab, setCurrentTab ] = useState( '' );
|
2021-03-25 23:42:01 +00:00
|
|
|
const [ isPanelClosing, setIsPanelClosing ] = useState( false );
|
2021-02-19 13:57:17 +00:00
|
|
|
const [ isPanelOpen, setIsPanelOpen ] = useState( false );
|
|
|
|
const [ isPanelSwitching, setIsPanelSwitching ] = useState( false );
|
2021-06-11 13:37:21 +00:00
|
|
|
const { fills } = useSlot( ABBREVIATED_NOTIFICATION_SLOT_NAME );
|
|
|
|
const hasExtendedNotifications = Boolean( fills?.length );
|
2021-02-19 13:57:17 +00:00
|
|
|
|
2021-03-30 18:44:17 +00:00
|
|
|
const getPreviewSiteBtnTrackData = ( select, getOption ) => {
|
|
|
|
let trackData = {};
|
|
|
|
if ( query.page === 'wc-admin' && query.task === 'appearance' ) {
|
|
|
|
const { getTasksStatus } = select( ONBOARDING_STORE_NAME );
|
|
|
|
const tasksStatus = getTasksStatus();
|
|
|
|
const demoNotice = getOption( 'woocommerce_demo_store_notice' );
|
|
|
|
trackData = {
|
|
|
|
set_notice: demoNotice ? 'Y' : 'N',
|
|
|
|
create_homepage: tasksStatus.hasHomepage === true ? 'Y' : 'N',
|
|
|
|
upload_logo: tasksStatus.themeMods?.custom_logo ? 'Y' : 'N',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
return trackData;
|
|
|
|
};
|
|
|
|
|
2021-06-09 13:56:45 +00:00
|
|
|
function getThingsToDoNextCount(
|
|
|
|
tasks,
|
|
|
|
dismissedTasks,
|
|
|
|
isExtendedTaskListHidden
|
|
|
|
) {
|
|
|
|
if ( ! tasks || isExtendedTaskListHidden ) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return tasks.filter(
|
|
|
|
( task ) =>
|
|
|
|
task.visible &&
|
|
|
|
! task.completed &&
|
|
|
|
! dismissedTasks.includes( task.key )
|
|
|
|
).length;
|
|
|
|
}
|
|
|
|
|
|
|
|
function isAbbreviatedPanelVisible(
|
|
|
|
select,
|
|
|
|
setupTaskListHidden,
|
|
|
|
thingsToDoNextCount
|
|
|
|
) {
|
|
|
|
const orderStatuses = getOrderStatuses( select );
|
|
|
|
|
2021-07-19 06:56:41 +00:00
|
|
|
const isOrdersCardVisible =
|
|
|
|
setupTaskListHidden && isPanelOpen
|
|
|
|
? getUnreadOrders( select, orderStatuses ) > 0
|
|
|
|
: false;
|
|
|
|
const isReviewsCardVisible =
|
|
|
|
setupTaskListHidden && isPanelOpen
|
|
|
|
? getUnapprovedReviews( select )
|
|
|
|
: false;
|
|
|
|
const isLowStockCardVisible =
|
|
|
|
setupTaskListHidden && isPanelOpen
|
|
|
|
? getLowStockProducts( select )
|
|
|
|
: false;
|
2021-06-09 13:56:45 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
thingsToDoNextCount > 0 ||
|
|
|
|
isOrdersCardVisible ||
|
|
|
|
isReviewsCardVisible ||
|
2021-06-11 13:37:21 +00:00
|
|
|
isLowStockCardVisible ||
|
|
|
|
hasExtendedNotifications
|
2021-06-09 13:56:45 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const {
|
|
|
|
hasUnreadNotes,
|
2021-06-09 13:56:45 +00:00
|
|
|
hasAbbreviatedNotifications,
|
|
|
|
thingsToDoNextCount,
|
2021-02-19 13:57:17 +00:00
|
|
|
requestingTaskListOptions,
|
|
|
|
setupTaskListComplete,
|
|
|
|
setupTaskListHidden,
|
|
|
|
trackedCompletedTasks,
|
2021-03-30 18:44:17 +00:00
|
|
|
previewSiteBtnTrackData,
|
2021-02-19 13:57:17 +00:00
|
|
|
} = useSelect( ( select ) => {
|
|
|
|
const { getOption, isResolving } = select( OPTIONS_STORE_NAME );
|
2021-06-09 13:56:45 +00:00
|
|
|
const isSetupTaskListHidden =
|
|
|
|
getOption( 'woocommerce_task_list_hidden' ) === 'yes';
|
|
|
|
const isExtendedTaskListHidden =
|
|
|
|
getOption( 'woocommerce_extended_task_list_hidden' ) === 'yes';
|
|
|
|
const extendedTaskList = applyFilters(
|
|
|
|
'woocommerce_admin_onboarding_task_list',
|
|
|
|
[],
|
|
|
|
query
|
|
|
|
);
|
|
|
|
const dismissedTasks =
|
|
|
|
getOption( 'woocommerce_task_list_dismissed_tasks' ) || [];
|
|
|
|
const thingsToDoCount = getThingsToDoNextCount(
|
|
|
|
extendedTaskList,
|
|
|
|
dismissedTasks,
|
|
|
|
isExtendedTaskListHidden
|
|
|
|
);
|
2020-08-05 22:02:24 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
return {
|
2021-06-09 13:56:45 +00:00
|
|
|
hasUnreadNotes: isNotesPanelVisible( select ),
|
|
|
|
hasAbbreviatedNotifications: isAbbreviatedPanelVisible(
|
|
|
|
select,
|
|
|
|
isSetupTaskListHidden,
|
|
|
|
thingsToDoCount
|
|
|
|
),
|
|
|
|
thingsToDoNextCount: thingsToDoCount,
|
2021-02-19 13:57:17 +00:00
|
|
|
requestingTaskListOptions:
|
|
|
|
isResolving( 'getOption', [
|
|
|
|
'woocommerce_task_list_complete',
|
|
|
|
] ) ||
|
|
|
|
isResolving( 'getOption', [ 'woocommerce_task_list_hidden' ] ),
|
|
|
|
setupTaskListComplete:
|
|
|
|
getOption( 'woocommerce_task_list_complete' ) === 'yes',
|
2021-06-09 13:56:45 +00:00
|
|
|
setupTaskListHidden: isSetupTaskListHidden,
|
2021-02-19 13:57:17 +00:00
|
|
|
trackedCompletedTasks:
|
|
|
|
getOption( 'woocommerce_task_list_tracked_completed_tasks' ) ||
|
|
|
|
[],
|
2021-03-30 18:44:17 +00:00
|
|
|
previewSiteBtnTrackData: getPreviewSiteBtnTrackData(
|
|
|
|
select,
|
|
|
|
getOption
|
|
|
|
),
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
|
|
|
} );
|
|
|
|
const { updateOptions } = useDispatch( OPTIONS_STORE_NAME );
|
|
|
|
const { currentUserCan } = useUser();
|
|
|
|
|
|
|
|
const togglePanel = ( { name: tabName }, isTabOpen ) => {
|
|
|
|
const panelSwitching =
|
|
|
|
tabName !== currentTab &&
|
|
|
|
currentTab !== '' &&
|
|
|
|
isTabOpen &&
|
|
|
|
isPanelOpen;
|
|
|
|
|
2021-03-25 23:42:01 +00:00
|
|
|
if ( isPanelClosing ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
setCurrentTab( tabName );
|
|
|
|
setIsPanelOpen( isTabOpen );
|
|
|
|
setIsPanelSwitching( panelSwitching );
|
|
|
|
};
|
|
|
|
|
|
|
|
const closePanel = () => {
|
2021-03-25 23:42:01 +00:00
|
|
|
setIsPanelClosing( true );
|
2021-02-19 13:57:17 +00:00
|
|
|
setIsPanelOpen( false );
|
|
|
|
};
|
|
|
|
|
|
|
|
const clearPanel = () => {
|
2021-02-25 12:56:00 +00:00
|
|
|
if ( ! isPanelOpen ) {
|
2021-03-25 23:42:01 +00:00
|
|
|
setIsPanelClosing( false );
|
2021-02-25 12:56:00 +00:00
|
|
|
setIsPanelSwitching( false );
|
|
|
|
setCurrentTab( '' );
|
|
|
|
}
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
2019-07-25 01:33:41 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const isHomescreen = () => {
|
|
|
|
return query.page === 'wc-admin' && ! query.path;
|
|
|
|
};
|
|
|
|
|
|
|
|
const isPerformingSetupTask = () => {
|
|
|
|
return (
|
2020-07-14 12:20:51 +00:00
|
|
|
query.task &&
|
|
|
|
! query.path &&
|
|
|
|
( requestingTaskListOptions === true ||
|
2021-01-27 18:40:02 +00:00
|
|
|
( setupTaskListHidden === false &&
|
2021-02-19 13:57:17 +00:00
|
|
|
setupTaskListComplete === false ) )
|
|
|
|
);
|
|
|
|
};
|
2020-10-22 22:13:14 +00:00
|
|
|
|
2021-07-19 06:56:41 +00:00
|
|
|
const redirectToHomeScreen = () => {
|
|
|
|
if ( isWCAdmin( window.location.href ) ) {
|
|
|
|
getHistory().push( getNewPath( {}, '/', {} ) );
|
|
|
|
} else {
|
|
|
|
window.location.href = getAdminLink( 'admin.php?page=wc-admin' );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-10-22 22:13:14 +00:00
|
|
|
// @todo Pull in dynamic unread status/count
|
2021-02-19 13:57:17 +00:00
|
|
|
const getTabs = () => {
|
|
|
|
const inbox = {
|
|
|
|
name: 'inbox',
|
|
|
|
title: __( 'Inbox', 'woocommerce-admin' ),
|
|
|
|
icon: <Icon icon={ inboxIcon } />,
|
2021-06-09 13:56:45 +00:00
|
|
|
unread: hasUnreadNotes || hasAbbreviatedNotifications,
|
2021-02-19 13:57:17 +00:00
|
|
|
visible:
|
|
|
|
( isEmbedded || ! isHomescreen() ) && ! isPerformingSetupTask(),
|
|
|
|
};
|
2021-02-16 20:01:11 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const setup = {
|
|
|
|
name: 'setup',
|
2021-03-09 22:50:37 +00:00
|
|
|
title: __( 'Finish setup', 'woocommerce-admin' ),
|
2021-02-19 13:57:17 +00:00
|
|
|
icon: <SetupProgress />,
|
|
|
|
onClick: () => {
|
|
|
|
const currentLocation = window.location.href;
|
|
|
|
const homescreenLocation = getAdminLink(
|
|
|
|
'admin.php?page=wc-admin'
|
|
|
|
);
|
|
|
|
|
|
|
|
// Don't navigate if we're already on the homescreen, this will cause an infinite loop
|
|
|
|
if ( currentLocation !== homescreenLocation ) {
|
|
|
|
// Ensure that if the user is trying to get to the task list they can see it even if
|
|
|
|
// it was dismissed.
|
|
|
|
if ( setupTaskListHidden === 'no' ) {
|
|
|
|
redirectToHomeScreen();
|
|
|
|
} else {
|
|
|
|
updateOptions( {
|
|
|
|
woocommerce_task_list_hidden: 'no',
|
|
|
|
} ).then( redirectToHomeScreen );
|
|
|
|
}
|
|
|
|
}
|
2021-02-16 20:01:11 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
return null;
|
|
|
|
},
|
|
|
|
visible:
|
|
|
|
currentUserCan( 'manage_woocommerce' ) &&
|
|
|
|
! setupTaskListComplete &&
|
|
|
|
! setupTaskListHidden &&
|
|
|
|
! isPerformingSetupTask() &&
|
|
|
|
( ! isHomescreen() || isEmbedded ),
|
|
|
|
};
|
2020-10-15 19:49:46 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const help = {
|
|
|
|
name: 'help',
|
|
|
|
title: __( 'Help', 'woocommerce-admin' ),
|
|
|
|
icon: <Icon icon={ helpIcon } />,
|
|
|
|
visible:
|
2021-10-14 14:04:17 +00:00
|
|
|
currentUserCan( 'manage_woocommerce' ) &&
|
|
|
|
( ( isHomescreen() && ! isEmbedded ) ||
|
|
|
|
isPerformingSetupTask() ),
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
2020-09-24 21:23:27 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const displayOptions = {
|
|
|
|
component: DisplayOptions,
|
|
|
|
visible:
|
2021-10-14 14:04:17 +00:00
|
|
|
currentUserCan( 'manage_woocommerce' ) &&
|
|
|
|
! isEmbedded &&
|
|
|
|
isHomescreen() &&
|
|
|
|
! isPerformingSetupTask(),
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
2020-11-16 13:48:50 +00:00
|
|
|
|
2021-03-05 02:37:18 +00:00
|
|
|
const previewSite = {
|
|
|
|
name: 'previewSite',
|
|
|
|
title: __( 'Preview site', 'woocommerce-admin' ),
|
|
|
|
icon: <Icon icon={ external } />,
|
|
|
|
visible: query.page === 'wc-admin' && query.task === 'appearance',
|
|
|
|
onClick: () => {
|
2021-08-24 11:39:48 +00:00
|
|
|
window.open( getSetting( 'siteUrl' ) );
|
2021-03-30 18:44:17 +00:00
|
|
|
recordEvent(
|
|
|
|
'wcadmin_tasklist_previewsite',
|
|
|
|
previewSiteBtnTrackData
|
|
|
|
);
|
|
|
|
|
2021-03-05 02:37:18 +00:00
|
|
|
return null;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
return [ inbox, setup, previewSite, displayOptions, help ].filter(
|
2021-02-19 13:57:17 +00:00
|
|
|
( tab ) => tab.visible
|
|
|
|
);
|
|
|
|
};
|
2018-06-28 13:52:45 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const getPanelContent = ( tab ) => {
|
2020-08-05 22:02:24 +00:00
|
|
|
const { task } = query;
|
|
|
|
|
2018-07-06 12:40:05 +00:00
|
|
|
switch ( tab ) {
|
2018-10-12 19:20:48 +00:00
|
|
|
case 'inbox':
|
2021-06-09 13:56:45 +00:00
|
|
|
return (
|
|
|
|
<InboxPanel
|
|
|
|
hasAbbreviatedNotifications={
|
|
|
|
hasAbbreviatedNotifications
|
|
|
|
}
|
|
|
|
thingsToDoNextCount={ thingsToDoNextCount }
|
|
|
|
/>
|
|
|
|
);
|
2020-07-14 12:20:51 +00:00
|
|
|
case 'help':
|
|
|
|
return <HelpPanel taskName={ task } />;
|
2018-06-28 13:52:45 +00:00
|
|
|
default:
|
2018-07-09 15:46:31 +00:00
|
|
|
return null;
|
2018-06-28 13:52:45 +00:00
|
|
|
}
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
2018-07-06 12:40:05 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const closedHelpPanelHighlight = () => {
|
2020-12-18 13:17:07 +00:00
|
|
|
recordEvent( 'help_tooltip_click' );
|
|
|
|
if (
|
|
|
|
userPreferencesData &&
|
|
|
|
userPreferencesData.updateUserPreferences
|
|
|
|
) {
|
|
|
|
userPreferencesData.updateUserPreferences( {
|
|
|
|
help_panel_highlight_shown: 'yes',
|
|
|
|
} );
|
|
|
|
}
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
2020-12-18 13:17:07 +00:00
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
const shouldShowHelpTooltip = () => {
|
2020-12-18 13:17:07 +00:00
|
|
|
const { task } = query;
|
|
|
|
const startedTasks =
|
|
|
|
userPreferencesData &&
|
|
|
|
userPreferencesData.task_list_tracked_started_tasks;
|
|
|
|
const highlightShown =
|
|
|
|
userPreferencesData &&
|
|
|
|
userPreferencesData.help_panel_highlight_shown;
|
|
|
|
if (
|
|
|
|
task &&
|
|
|
|
highlightShown !== 'yes' &&
|
|
|
|
( startedTasks || {} )[ task ] > 1 &&
|
|
|
|
! trackedCompletedTasks.includes( task )
|
|
|
|
) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2021-02-19 13:57:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const tabs = getTabs();
|
|
|
|
const headerId = uniqueId( 'activity-panel-header_' );
|
|
|
|
const showHelpHighlightTooltip = shouldShowHelpTooltip();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<H id={ headerId } className="screen-reader-text">
|
|
|
|
{ __( 'Store Activity', 'woocommerce-admin' ) }
|
|
|
|
</H>
|
|
|
|
<Section
|
|
|
|
component="aside"
|
|
|
|
id="woocommerce-activity-panel"
|
2021-03-09 13:11:49 +00:00
|
|
|
className="woocommerce-layout__activity-panel"
|
2021-02-19 13:57:17 +00:00
|
|
|
aria-labelledby={ headerId }
|
|
|
|
>
|
2021-03-09 13:11:49 +00:00
|
|
|
<Tabs
|
|
|
|
tabs={ tabs }
|
|
|
|
tabOpen={ isPanelOpen }
|
|
|
|
selectedTab={ currentTab }
|
|
|
|
onTabClick={ ( tab, tabOpen ) => {
|
|
|
|
if ( tab.onClick ) {
|
|
|
|
tab.onClick();
|
|
|
|
return;
|
|
|
|
}
|
2021-03-25 23:42:01 +00:00
|
|
|
|
2021-03-09 13:11:49 +00:00
|
|
|
togglePanel( tab, tabOpen );
|
2021-02-19 13:57:17 +00:00
|
|
|
} }
|
2021-03-09 13:11:49 +00:00
|
|
|
/>
|
|
|
|
<Panel
|
|
|
|
currentTab
|
|
|
|
isPanelOpen={ isPanelOpen }
|
|
|
|
isPanelSwitching={ isPanelSwitching }
|
|
|
|
tab={ find( getTabs(), { name: currentTab } ) }
|
|
|
|
content={ getPanelContent( currentTab ) }
|
|
|
|
closePanel={ () => closePanel() }
|
|
|
|
clearPanel={ () => clearPanel() }
|
|
|
|
/>
|
2021-02-19 13:57:17 +00:00
|
|
|
</Section>
|
|
|
|
{ showHelpHighlightTooltip ? (
|
|
|
|
<HighlightTooltip
|
|
|
|
delay={ 1000 }
|
|
|
|
useAnchor={ true }
|
|
|
|
title={ __( "We're here for help", 'woocommerce-admin' ) }
|
|
|
|
content={ __(
|
|
|
|
'If you have any questions, feel free to explore the WooCommerce docs listed here.',
|
|
|
|
'woocommerce-admin'
|
|
|
|
) }
|
|
|
|
closeButtonText={ __( 'Got it', 'woocommerce-admin' ) }
|
|
|
|
id="activity-panel-tab-help"
|
|
|
|
onClose={ () => closedHelpPanelHighlight() }
|
|
|
|
onShow={ () => recordEvent( 'help_tooltip_view' ) }
|
|
|
|
/>
|
|
|
|
) : null }
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
2018-06-28 13:52:45 +00:00
|
|
|
|
2020-07-14 12:20:51 +00:00
|
|
|
ActivityPanel.defaultProps = {
|
|
|
|
getHistory,
|
|
|
|
};
|
|
|
|
|
2021-02-19 13:57:17 +00:00
|
|
|
export default ActivityPanel;
|