diff --git a/react/features/base/audio-only/actions.ts b/react/features/base/audio-only/actions.ts index e7021abb3..0ddfcdc0a 100644 --- a/react/features/base/audio-only/actions.ts +++ b/react/features/base/audio-only/actions.ts @@ -3,8 +3,8 @@ import type { Dispatch } from 'redux'; // @ts-ignore import UIEvents from '../../../../service/UI/UIEvents'; -// @ts-ignore -import { createAudioOnlyChangedEvent, sendAnalytics } from '../../analytics'; +import { createAudioOnlyChangedEvent } from '../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../analytics/functions'; import { SET_AUDIO_ONLY } from './actionTypes'; import logger from './logger'; diff --git a/react/features/conference/components/native/carmode/EndMeetingButton.tsx b/react/features/conference/components/native/carmode/EndMeetingButton.tsx index addf605f1..6b81c507b 100644 --- a/react/features/conference/components/native/carmode/EndMeetingButton.tsx +++ b/react/features/conference/components/native/carmode/EndMeetingButton.tsx @@ -2,8 +2,8 @@ import React, { useCallback } from 'react'; import { useDispatch } from 'react-redux'; -// @ts-ignore -import { createToolbarEvent, sendAnalytics } from '../../../../analytics'; +import { createToolbarEvent } from '../../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../../analytics/functions'; // @ts-ignore import { appNavigate } from '../../../../app/actions'; import Button from '../../../../base/ui/components/native/Button'; diff --git a/react/features/conference/components/native/carmode/MicrophoneButton.tsx b/react/features/conference/components/native/carmode/MicrophoneButton.tsx index dbc4486c2..cfeb7ae0d 100644 --- a/react/features/conference/components/native/carmode/MicrophoneButton.tsx +++ b/react/features/conference/components/native/carmode/MicrophoneButton.tsx @@ -5,11 +5,10 @@ import { useDispatch, useSelector } from 'react-redux'; import { createShortcutEvent, - sendAnalytics, ACTION_SHORTCUT_PRESSED as PRESSED, ACTION_SHORTCUT_RELEASED as RELEASED - // @ts-ignore -} from '../../../../analytics'; +} from '../../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../../analytics/functions'; import { IState } from '../../../../app/types'; // @ts-ignore import { getFeatureFlag, AUDIO_MUTE_BUTTON_ENABLED } from '../../../../base/flags'; diff --git a/react/features/e2ee/components/E2EESection.tsx b/react/features/e2ee/components/E2EESection.tsx index 03ef3e4d0..7bfcea2c5 100644 --- a/react/features/e2ee/components/E2EESection.tsx +++ b/react/features/e2ee/components/E2EESection.tsx @@ -3,8 +3,8 @@ import React, { Component } from 'react'; import { WithTranslation } from 'react-i18next'; import type { Dispatch } from 'redux'; -// @ts-ignore -import { createE2EEEvent, sendAnalytics } from '../../analytics'; +import { createE2EEEvent } from '../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../analytics/functions'; import { IState } from '../../app/types'; import { translate } from '../../base/i18n/functions'; import { connect } from '../../base/redux/functions'; diff --git a/react/features/filmstrip/components/web/Filmstrip.tsx b/react/features/filmstrip/components/web/Filmstrip.tsx index 9dd2d99d0..09b8c3b6c 100644 --- a/react/features/filmstrip/components/web/Filmstrip.tsx +++ b/react/features/filmstrip/components/web/Filmstrip.tsx @@ -7,12 +7,8 @@ import { WithTranslation } from 'react-i18next'; import { FixedSizeList, FixedSizeGrid } from 'react-window'; import type { Dispatch } from 'redux'; -import { - createShortcutEvent, - createToolbarEvent, - sendAnalytics - // @ts-ignore -} from '../../../analytics'; +import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState } from '../../../app/types'; // @ts-ignore import { getSourceNameSignalingFeatureFlag, getToolbarButtons } from '../../../base/config'; @@ -797,6 +793,7 @@ class Filmstrip extends PureComponent { _onShortcutToggleFilmstrip() { sendAnalytics(createShortcutEvent( 'toggle.filmstrip', + ACTION_SHORTCUT_TRIGGERED, { enable: this.props._mainFilmstripVisible })); diff --git a/react/features/filmstrip/components/web/Thumbnail.tsx b/react/features/filmstrip/components/web/Thumbnail.tsx index 5686bc4af..939c7e6e8 100644 --- a/react/features/filmstrip/components/web/Thumbnail.tsx +++ b/react/features/filmstrip/components/web/Thumbnail.tsx @@ -4,8 +4,8 @@ import clsx from 'clsx'; import debounce from 'lodash/debounce'; import React, { Component } from 'react'; -// @ts-ignore -import { createScreenSharingIssueEvent, sendAnalytics } from '../../../analytics'; +import { createScreenSharingIssueEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState } from '../../../app/types'; // @ts-ignore import { Avatar } from '../../../base/avatar'; diff --git a/react/features/gifs/components/web/GifsMenu.tsx b/react/features/gifs/components/web/GifsMenu.tsx index 108860d58..9be656c3e 100644 --- a/react/features/gifs/components/web/GifsMenu.tsx +++ b/react/features/gifs/components/web/GifsMenu.tsx @@ -7,8 +7,8 @@ import React, { useCallback, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { batch, useDispatch, useSelector } from 'react-redux'; -// @ts-ignore -import { createGifSentEvent, sendAnalytics } from '../../../analytics'; +import { createGifSentEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState } from '../../../app/types'; // @ts-ignore import InputField from '../../../base/premeeting/components/web/InputField'; diff --git a/react/features/participants-pane/components/breakout-rooms/components/native/LeaveBreakoutRoomButton.tsx b/react/features/participants-pane/components/breakout-rooms/components/native/LeaveBreakoutRoomButton.tsx index e51ed4068..c6376ce58 100644 --- a/react/features/participants-pane/components/breakout-rooms/components/native/LeaveBreakoutRoomButton.tsx +++ b/react/features/participants-pane/components/breakout-rooms/components/native/LeaveBreakoutRoomButton.tsx @@ -2,8 +2,8 @@ import React, { useCallback } from 'react'; import { useDispatch } from 'react-redux'; -// @ts-ignore -import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics'; +import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../../../analytics/functions'; import Button from '../../../../../base/ui/components/native/Button'; import { BUTTON_TYPES } from '../../../../../base/ui/constants'; // @ts-ignore diff --git a/react/features/participants-pane/components/breakout-rooms/components/web/JoinQuickActionButton.tsx b/react/features/participants-pane/components/breakout-rooms/components/web/JoinQuickActionButton.tsx index 733b3e3c7..e8f4e4293 100644 --- a/react/features/participants-pane/components/breakout-rooms/components/web/JoinQuickActionButton.tsx +++ b/react/features/participants-pane/components/breakout-rooms/components/web/JoinQuickActionButton.tsx @@ -4,8 +4,8 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// @ts-ignore -import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics'; +import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../../../analytics/functions'; import Button from '../../../../../base/ui/components/web/Button'; import { Theme } from '../../../../../base/ui/types'; // @ts-ignore diff --git a/react/features/participants-pane/components/breakout-rooms/components/web/LeaveButton.tsx b/react/features/participants-pane/components/breakout-rooms/components/web/LeaveButton.tsx index 990cc2ebf..d29de321f 100644 --- a/react/features/participants-pane/components/breakout-rooms/components/web/LeaveButton.tsx +++ b/react/features/participants-pane/components/breakout-rooms/components/web/LeaveButton.tsx @@ -3,8 +3,8 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// @ts-ignore -import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics'; +import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../../../analytics/functions'; import Button from '../../../../../base/ui/components/web/Button'; import { BUTTON_TYPES } from '../../../../../base/ui/constants'; // @ts-ignore diff --git a/react/features/participants-pane/components/web/InviteButton.tsx b/react/features/participants-pane/components/web/InviteButton.tsx index ffb978ec1..bdec6dd5c 100644 --- a/react/features/participants-pane/components/web/InviteButton.tsx +++ b/react/features/participants-pane/components/web/InviteButton.tsx @@ -3,8 +3,8 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// @ts-ignore -import { createToolbarEvent, sendAnalytics } from '../../../analytics'; +import { createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IconInviteMore } from '../../../base/icons/svg'; import Button from '../../../base/ui/components/web/Button'; import { BUTTON_TYPES } from '../../../base/ui/constants'; diff --git a/react/features/polls/components/AbstractPollAnswer.tsx b/react/features/polls/components/AbstractPollAnswer.tsx index e7c60adef..e9fe5beca 100644 --- a/react/features/polls/components/AbstractPollAnswer.tsx +++ b/react/features/polls/components/AbstractPollAnswer.tsx @@ -3,8 +3,8 @@ import React, { ComponentType, useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch, useSelector } from 'react-redux'; -// @ts-ignore -import { sendAnalytics, createPollEvent } from '../../analytics'; +import { createPollEvent } from '../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../analytics/functions'; import { IState } from '../../app/types'; import { getLocalParticipant, getParticipantById } from '../../base/participants/functions'; import { useBoundSelector } from '../../base/util/hooks'; diff --git a/react/features/reactions/components/web/ReactionsMenu.tsx b/react/features/reactions/components/web/ReactionsMenu.tsx index 9ecb43f79..625b24a7f 100644 --- a/react/features/reactions/components/web/ReactionsMenu.tsx +++ b/react/features/reactions/components/web/ReactionsMenu.tsx @@ -5,12 +5,8 @@ import React, { Component } from 'react'; import { WithTranslation } from 'react-i18next'; import { bindActionCreators } from 'redux'; -import { - createReactionMenuEvent, - createToolbarEvent, - sendAnalytics - // @ts-ignore -} from '../../../analytics'; +import { createReactionMenuEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState, IStore } from '../../../app/types'; import { isMobileBrowser } from '../../../base/environment/utils'; import { translate } from '../../../base/i18n/functions'; diff --git a/react/features/reactions/middleware.ts b/react/features/reactions/middleware.ts index a472077ae..cf74abf9c 100644 --- a/react/features/reactions/middleware.ts +++ b/react/features/reactions/middleware.ts @@ -1,8 +1,8 @@ /* eslint-disable lines-around-comment */ import { batch } from 'react-redux'; -// @ts-ignore -import { createReactionSoundsDisabledEvent, sendAnalytics } from '../analytics'; +import { createReactionSoundsDisabledEvent } from '../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../analytics/functions'; import { IStore } from '../app/types'; import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes'; import { diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx index d95fb43c9..4353e4fa7 100644 --- a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx +++ b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx @@ -2,11 +2,8 @@ import { Component } from 'react'; import { WithTranslation } from 'react-i18next'; -import { - createRecordingDialogEvent, - sendAnalytics - // @ts-ignore -} from '../../../analytics'; +import { createRecordingDialogEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState } from '../../../app/types'; // @ts-ignore import { ColorSchemeRegistry } from '../../../base/color-scheme'; diff --git a/react/features/rtcstats/RTCStats.ts b/react/features/rtcstats/RTCStats.ts index dc1e752c8..86902f455 100644 --- a/react/features/rtcstats/RTCStats.ts +++ b/react/features/rtcstats/RTCStats.ts @@ -5,8 +5,8 @@ import rtcstatsInit from '@jitsi/rtcstats/rtcstats'; // @ts-ignore import traceInit from '@jitsi/rtcstats/trace-ws'; -// @ts-ignore -import { createRTCStatsTraceCloseEvent, sendAnalytics } from '../analytics'; +import { createRTCStatsTraceCloseEvent } from '../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../analytics/functions'; import logger from './logger'; import { diff --git a/react/features/rtcstats/functions.ts b/react/features/rtcstats/functions.ts index 3b5dd4d3c..45f48ba59 100644 --- a/react/features/rtcstats/functions.ts +++ b/react/features/rtcstats/functions.ts @@ -2,8 +2,7 @@ // @ts-ignore import { jitsiLocalStorage } from '@jitsi/js-utils'; -// @ts-ignore -import { getAmplitudeIdentity } from '../analytics'; +import { getAmplitudeIdentity } from '../analytics/functions'; import { getConferenceOptions, getAnalyticsRoomName diff --git a/react/features/settings/components/web/ProfileTab.tsx b/react/features/settings/components/web/ProfileTab.tsx index ce77ca0da..63d9de547 100644 --- a/react/features/settings/components/web/ProfileTab.tsx +++ b/react/features/settings/components/web/ProfileTab.tsx @@ -4,11 +4,8 @@ import { WithTranslation } from 'react-i18next'; // @ts-ignore import UIEvents from '../../../../../service/UI/UIEvents'; -import { - sendAnalytics, - createProfilePanelButtonEvent - // @ts-ignore -} from '../../../analytics'; +import { createProfilePanelButtonEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; // @ts-ignore import { AbstractDialogTab } from '../../../base/dialog'; // @ts-ignore diff --git a/react/features/toolbox/components/native/HangupMenu.tsx b/react/features/toolbox/components/native/HangupMenu.tsx index 7ce68aa64..43b096661 100644 --- a/react/features/toolbox/components/native/HangupMenu.tsx +++ b/react/features/toolbox/components/native/HangupMenu.tsx @@ -3,8 +3,8 @@ import React, { useCallback } from 'react'; import { View } from 'react-native'; import { useDispatch, useSelector } from 'react-redux'; -// @ts-ignore -import { createBreakoutRoomsEvent, createToolbarEvent, sendAnalytics } from '../../../analytics'; +import { createBreakoutRoomsEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; // @ts-ignore import { appNavigate } from '../../../app/actions'; // @ts-ignore diff --git a/react/features/toolbox/components/web/HangupMenuButton.tsx b/react/features/toolbox/components/web/HangupMenuButton.tsx index 3794a7efd..a137e5629 100644 --- a/react/features/toolbox/components/web/HangupMenuButton.tsx +++ b/react/features/toolbox/components/web/HangupMenuButton.tsx @@ -3,8 +3,8 @@ import InlineDialog from '@atlaskit/inline-dialog'; import React, { Component } from 'react'; import { WithTranslation } from 'react-i18next'; -// @ts-ignore -import { createToolbarEvent, sendAnalytics } from '../../../analytics'; +import { createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { translate } from '../../../base/i18n/functions'; import HangupToggleButton from './HangupToggleButton'; diff --git a/react/features/toolbox/components/web/LeaveConferenceButton.tsx b/react/features/toolbox/components/web/LeaveConferenceButton.tsx index 4172de4cf..2b3701c9a 100644 --- a/react/features/toolbox/components/web/LeaveConferenceButton.tsx +++ b/react/features/toolbox/components/web/LeaveConferenceButton.tsx @@ -3,8 +3,8 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// @ts-ignore -import { createToolbarEvent, sendAnalytics } from '../../../analytics'; +import { createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; // @ts-ignore import { leaveConference } from '../../../base/conference/actions'; import Button from '../../../base/ui/components/web/Button'; diff --git a/react/features/toolbox/components/web/OverflowMenuButton.tsx b/react/features/toolbox/components/web/OverflowMenuButton.tsx index 50a9e44aa..c4dea74df 100644 --- a/react/features/toolbox/components/web/OverflowMenuButton.tsx +++ b/react/features/toolbox/components/web/OverflowMenuButton.tsx @@ -4,8 +4,8 @@ import { withStyles } from '@material-ui/styles'; import React, { Component, ReactElement } from 'react'; import { WithTranslation } from 'react-i18next'; -// @ts-ignore -import { createToolbarEvent, sendAnalytics } from '../../../analytics'; +import { createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState } from '../../../app/types'; import { translate } from '../../../base/i18n/functions'; import { connect } from '../../../base/redux/functions'; diff --git a/react/features/toolbox/components/web/Toolbox.tsx b/react/features/toolbox/components/web/Toolbox.tsx index 362f5f20b..c5d0c7521 100644 --- a/react/features/toolbox/components/web/Toolbox.tsx +++ b/react/features/toolbox/components/web/Toolbox.tsx @@ -6,13 +6,8 @@ import { batch } from 'react-redux'; // @ts-ignore import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut'; -import { - ACTION_SHORTCUT_TRIGGERED, - createShortcutEvent, - createToolbarEvent, - sendAnalytics - // @ts-ignore -} from '../../../analytics'; +import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../../analytics/functions'; import { IState } from '../../../app/types'; import ContextMenu from '../../../base/components/context-menu/ContextMenu'; import ContextMenuItemGroup from '../../../base/components/context-menu/ContextMenuItemGroup'; @@ -1092,6 +1087,7 @@ class Toolbox extends Component { _onShortcutToggleChat() { sendAnalytics(createShortcutEvent( 'toggle.chat', + ACTION_SHORTCUT_TRIGGERED, { enable: !this.props._chatOpen })); @@ -1116,6 +1112,7 @@ class Toolbox extends Component { _onShortcutToggleParticipantsPane() { sendAnalytics(createShortcutEvent( 'toggle.participants-pane', + ACTION_SHORTCUT_TRIGGERED, { enable: !this.props._participantsPaneOpen })); @@ -1145,6 +1142,7 @@ class Toolbox extends Component { _onShortcutToggleTileView() { sendAnalytics(createShortcutEvent( 'toggle.tileview', + ACTION_SHORTCUT_TRIGGERED, { enable: !this.props._tileViewEnabled })); @@ -1162,6 +1160,7 @@ class Toolbox extends Component { _onShortcutToggleFullScreen() { sendAnalytics(createShortcutEvent( 'toggle.fullscreen', + ACTION_SHORTCUT_TRIGGERED, { enable: !this.props._fullScreen })); @@ -1307,7 +1306,6 @@ class Toolbox extends Component { _onToolbarToggleScreenshare() { sendAnalytics(createToolbarEvent( 'toggle.screen.sharing', - ACTION_SHORTCUT_TRIGGERED, { enable: !this.props._screenSharing })); this._closeOverflowMenuIfOpen(); diff --git a/react/features/video-quality/components/VideoQualitySlider.web.tsx b/react/features/video-quality/components/VideoQualitySlider.web.tsx index 6dc783b4f..e69eb10f4 100644 --- a/react/features/video-quality/components/VideoQualitySlider.web.tsx +++ b/react/features/video-quality/components/VideoQualitySlider.web.tsx @@ -5,8 +5,8 @@ import React, { Component } from 'react'; import { WithTranslation } from 'react-i18next'; import type { Dispatch } from 'redux'; -// @ts-ignore -import { createToolbarEvent, sendAnalytics } from '../../analytics'; +import { createToolbarEvent } from '../../analytics/AnalyticsEvents'; +import { sendAnalytics } from '../../analytics/functions'; import { IState } from '../../app/types'; // @ts-ignore import { setAudioOnly } from '../../base/audio-only';