Skip to content

Commit

Permalink
Merge pull request deriv-com#77 from amina-deriv/amina/remove_eslint_…
Browse files Browse the repository at this point in the history
…changes_of_unrelated_files

Amina/ fix: conflicts
  • Loading branch information
shaheer-deriv authored Oct 10, 2023
2 parents 364b5ce + d460bad commit a57c156
Show file tree
Hide file tree
Showing 46 changed files with 116 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/bot-skeleton/src/scratch/dbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { config } from '../constants/config';
import { api_base } from '../services/api/api-base';
import ApiHelpers from '../services/api/api-helpers';
import Interpreter from '../services/tradeEngine/utils/interpreter';
import { compareXml, observer as globalObserver } from '../utils';
import { compareXml,observer as globalObserver } from '../utils';
import { getSavedWorkspaces, saveWorkspaceToRecent } from '../utils/local-storage';

import main_xml from './xml/main.xml';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from 'react';
import classNames from 'classnames';

import { observer } from '@deriv/stores';

import { useDBotStore } from '../../../stores/useDBotStore';
import LoadModal from '../../load-modal';
import SaveModal from '../dashboard-component/load-bot-preview/save-modal';
import BotBuilderTourHandler from '../dbot-tours/bot-builder-tour';
import QuickStrategy from '../quick-strategy';

import WorkspaceWrapper from './workspace-wrapper';

const BotBuilder = observer(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';

import { isMobile } from '@deriv/shared';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import UserGuide from '../user-guide';

jest.mock('@deriv/components', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from 'react';
import classNames from 'classnames';

import { DesktopWrapper, MobileWrapper, Text } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { observer } from '@deriv/stores';
import { localize } from '@deriv/translations';

import { useDBotStore } from 'Stores/useDBotStore';

import OnboardTourHandler from '../dbot-tours/onboarding-tour';

import Local from './load-bot-preview/local';
import Cards from './cards';
import InfoPanel from './info-panel';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';
import classNames from 'classnames';

import { DesktopWrapper, Icon, MobileWrapper, Modal, Text } from '@deriv/components';
import { observer, useStore } from '@deriv/stores';

import { DBOT_TABS } from 'Constants/bot-contents';
import { useDBotStore } from 'Stores/useDBotStore';

import { SIDEBAR_INTRO } from './constants';

const InfoPanel = observer(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import React from 'react';
import classnames from 'classnames';

import { timeSince } from '@deriv/bot-skeleton';
import { save_types } from '@deriv/bot-skeleton/src/constants/save-type';
import { DesktopWrapper, Icon, MobileWrapper, Text } from '@deriv/components';
import { isDesktop, isMobile } from '@deriv/shared';
import { observer } from '@deriv/stores';

import { DBOT_TABS } from 'Constants/bot-contents';
import { waitForDomElement } from 'Utils/dom-observer';
import { useDBotStore } from 'Stores/useDBotStore';
import { waitForDomElement } from 'Utils/dom-observer';

import { useComponentVisibility } from '../../hooks/useComponentVisibility';

import { CONTEXT_MENU_MOBILE, MENU_DESKTOP, STRATEGY } from './constants';

import './index.scss';

type TRecentWorkspace = {
Expand Down
4 changes: 4 additions & 0 deletions packages/bot-web-ui/src/components/dashboard/dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect } from 'react';
import classNames from 'classnames';

import { updateWorkspaceName } from '@deriv/bot-skeleton';
import dbot from '@deriv/bot-skeleton/src/scratch/dbot';
import { initTrashCan } from '@deriv/bot-skeleton/src/scratch/hooks/trashcan';
Expand All @@ -8,10 +9,13 @@ import { DesktopWrapper, Dialog, MobileWrapper, Tabs } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { observer, useStore } from '@deriv/stores';
import { localize } from '@deriv/translations';

import Chart from 'Components/chart';
import { DBOT_TABS, TAB_IDS } from 'Constants/bot-contents';
import { useDBotStore } from 'Stores/useDBotStore';

import RunPanel from '../run-panel';

import RunStrategy from './dashboard-component/run-strategy';
import { tour_list } from './dbot-tours/utils';
import DashboardComponent from './dashboard-component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React from 'react';

import { observer } from '@deriv/stores';
import { getSetting } from 'Utils/settings';

import { useDBotStore } from 'Stores/useDBotStore';
import { getSetting } from 'Utils/settings';

import ReactJoyrideWrapper from '../common/react-joyride-wrapper';
import TourEndDialog from '../common/tour-end-dialog';
import TourStartDialog from '../common/tour-start-dialog';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';

import { ProgressBarTracker } from '@deriv/components';
import { observer } from '@deriv/stores';
import { localize } from '@deriv/translations';
import { getSetting } from 'Utils/settings';

import { useDBotStore } from 'Stores/useDBotStore';
import { getSetting } from 'Utils/settings';

import Accordion from '../common/accordion';
import TourButton from '../common/tour-button';
import TourStartDialog from '../common/tour-start-dialog';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { observer } from 'mobx-react';

import { isMobile } from '@deriv/shared';

import BotBuilderTourDesktop from './bot-builder-tour-desktop';
import BotBuilderTourMobile from './bot-builder-tour-mobile';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';

import { fireEvent, render, screen, waitFor } from '@testing-library/react';

import Accordion from '../accordion';

const mocked_props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';

import { mockStore, StoreProvider } from '@deriv/stores';
// eslint-disable-next-line import/no-extraneous-dependencies
import { render, screen } from '@testing-library/react';
import { mock_ws } from 'Utils/mock';

import { DBotStoreProvider, mockDBotStore } from 'Stores/useDBotStore';
import { mock_ws } from 'Utils/mock';

import ReactJoyrideWrapper from '../react-joyride-wrapper';

jest.mock('@deriv/bot-skeleton/src/scratch/blockly', () => jest.fn());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';

import { fireEvent, render, screen } from '@testing-library/react';

import TourButton from '../tour-button';

const mocked_props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import classNames from 'classnames';

import { Icon, Text } from '@deriv/components';
import { localize } from '@deriv/translations';

import { TStepMobile } from '../config';

type TAccordion = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React from 'react';

import { Dialog, Text } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { observer } from '@deriv/stores';
import { Localize, localize } from '@deriv/translations';

import { useDBotStore } from '../../../../stores/useDBotStore';

const TourEndDialog = observer(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';

import { Dialog, Text } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { observer } from '@deriv/stores';
import { Localize, localize } from '@deriv/translations';

import { DBOT_TABS } from 'Constants/bot-contents';

import { useDBotStore } from '../../../../stores/useDBotStore';
import { bot_builder_tour_header, onboarding_tour_header, tourDialogAction, tourDialogInfo } from '../config';
import { setTourSettings, tour_list } from '../utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';

import { getUUID } from '@deriv/bot-skeleton/src/services/tradeEngine/utils/helpers';
import { Text } from '@deriv/components';
import { observer } from '@deriv/stores';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';

import { mockStore, StoreProvider } from '@deriv/stores';
import { render, screen } from '@testing-library/react';
import { mock_ws } from 'Utils/mock';

import RootStore from 'Stores/root-store';
import { DBotStoreProvider, mockDBotStore } from 'Stores/useDBotStore';
import { mock_ws } from 'Utils/mock';

import OnboardingTourMobile from '../../onboarding-tour/onboarding-tour-mobile';
import { DBOT_ONBOARDING_MOBILE } from '../index';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { getImageLocation } from '../../../../public-path';
import React from 'react';

import { Icon, Text } from '@deriv/components';
import { getUrlBase, isMobile } from '@deriv/shared';
import { Localize, localize } from '@deriv/translations';

import { getImageLocation } from '../../../../public-path';
import TourSteps from '../common/tour-steps';

const is_mobile = isMobile();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { observer } from 'mobx-react';

import { isMobile } from '@deriv/shared';

import OnboardingTourDesktop from './onboarding-tour-desktop';
import OnboardingTourMobile from './onboarding-tour-mobile';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React from 'react';

import { observer } from '@deriv/stores';
import { getSetting } from 'Utils/settings';

import { useDBotStore } from 'Stores/useDBotStore';
import { getSetting } from 'Utils/settings';

import ReactJoyrideWrapper from '../common/react-joyride-wrapper';
import TourStartDialog from '../common/tour-start-dialog';
import { DBOT_ONBOARDING } from '../config';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import classNames from 'classnames';

import { Icon, ProgressBarTracker, Text } from '@deriv/components';
import { observer } from '@deriv/stores';
import { localize } from '@deriv/translations';
import { getSetting } from 'Utils/settings';

import { useDBotStore } from 'Stores/useDBotStore';
import { getSetting } from 'Utils/settings';

import TourButton from '../common/tour-button';
import { DBOT_ONBOARDING_MOBILE, TMobileTourConfig } from '../config';

Expand Down
3 changes: 3 additions & 0 deletions packages/bot-web-ui/src/components/load-modal/local.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import classNames from 'classnames';

import { Button, Icon } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { observer } from '@deriv/stores';
import { Localize, localize } from '@deriv/translations';

import { useDBotStore } from 'Stores/useDBotStore';

import LocalFooter from './local-footer';
import WorkspaceControl from './workspace-control';

Expand Down
2 changes: 2 additions & 0 deletions packages/bot-web-ui/src/components/run-panel/run-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React from 'react';
import classNames from 'classnames';

import { Button, Drawer, Modal, Money, Tabs, Text, ThemedScrollbars } from '@deriv/components';
import { observer, useStore } from '@deriv/stores';
import { Localize, localize } from '@deriv/translations';

import Journal from 'Components/journal';
import SelfExclusion from 'Components/self-exclusion';
import Summary from 'Components/summary';
Expand Down
3 changes: 3 additions & 0 deletions packages/bot-web-ui/src/components/summary/summary-card.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React from 'react';
import classNames from 'classnames';

import { ContractCard, Text } from '@deriv/components';
import { getCardLabels, isMobile } from '@deriv/shared';
import { observer, useStore } from '@deriv/stores';
import { localize } from '@deriv/translations';

import ContractCardLoader from 'Components/contract-card-loading';
import { getContractTypeDisplay } from 'Constants/contract';
import { useDBotStore } from 'Stores/useDBotStore';

import { TSummaryCardProps } from './summary-card.types';

const SummaryCard = observer(({ contract_info, is_contract_loading }: TSummaryCardProps) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from 'react';

import { MobileFullPageModal } from '@deriv/components';
import { observer, useStore } from '@deriv/stores';
import { localize } from '@deriv/translations';

import { StatisticsSummary } from 'Components/run-panel/run-panel';
import { transaction_elements } from 'Constants/transactions';
import { useDBotStore } from 'Stores/useDBotStore';

import MobileTransactionCards from './mobile-transaction-card';
import { TRunPanelStore, TTransactionStore } from './transaction-details.types';

import './transaction-details-mobile.scss';

const TransactionDetailsMobile = observer(() => {
Expand Down
1 change: 1 addition & 0 deletions packages/bot-web-ui/src/constants/contract.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { getTotalProfit } from '@deriv/shared';
import { localize } from '@deriv/translations';

import { getBuyPrice } from 'Utils/multiplier';

export const getSupportedContracts = is_high_low => ({
Expand Down
4 changes: 4 additions & 0 deletions packages/bot-web-ui/src/stores/dashboard-store.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { action, computed, makeObservable, observable, reaction } from 'mobx';

import { setColors } from '@deriv/bot-skeleton';
import { isMobile } from '@deriv/shared';

import { clearInjectionDiv } from 'Constants/load-modal';

import { setTourSettings, tour_type, TTourType } from '../components/dashboard/dbot-tours/utils';

import RootStore from './root-store';

export interface IDashboardStore {
Expand Down
1 change: 1 addition & 0 deletions packages/bot-web-ui/src/stores/download-store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { action, makeObservable } from 'mobx';

import { log_types } from '@deriv/bot-skeleton';
import { localize } from '@deriv/translations';

Expand Down
2 changes: 2 additions & 0 deletions packages/bot-web-ui/src/stores/journal-store.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { action, computed, makeObservable, observable, reaction, when } from 'mobx';

import { log_types, message_types } from '@deriv/bot-skeleton';
import { config } from '@deriv/bot-skeleton/src/constants/config';
import { formatDate } from '@deriv/shared';
import { localize } from '@deriv/translations';

import { isCustomJournalMessage } from '../utils/journal-notifications';
import { getStoredItemsByKey, getStoredItemsByUser, setStoredItemsByKey } from '../utils/session-storage';
import { getSetting, storeSetting } from '../utils/settings';
Expand Down
2 changes: 2 additions & 0 deletions packages/bot-web-ui/src/stores/summary-card-store.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { action, computed, makeObservable, observable, reaction } from 'mobx';

import { getIndicativePrice, isEqualObject, isMultiplierContract, Validator } from '@deriv/shared';

import { getValidationRules } from 'Constants/contract';
import { contract_stages } from 'Constants/contract-stage';
import { getContractUpdateConfig } from 'Utils/multiplier';
Expand Down
2 changes: 1 addition & 1 deletion packages/p2p/src/pages/buy-sell/buy-sell-row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useHistory } from 'react-router-dom';
import classNames from 'classnames';
import PropTypes from 'prop-types';

import { Button, Icon, Table, Text } from '@deriv/components';
import { Button, Icon,Table, Text } from '@deriv/components';
import { useExchangeRate } from '@deriv/hooks';
import { isMobile, routes } from '@deriv/shared';
import { observer, useStore } from '@deriv/stores';
Expand Down
4 changes: 2 additions & 2 deletions packages/p2p/src/stores/general-store.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { action, computed, makeObservable, observable, reaction } from 'mobx';
import { action, computed, makeObservable,observable, reaction } from 'mobx';

import { isEmptyObject, isMobile, routes, toMoment } from '@deriv/shared';

import { Localize, localize } from 'Components/i18next';
import { Localize,localize } from 'Components/i18next';
import { api_error_codes } from 'Constants/api-error-codes';
import { buy_sell } from 'Constants/buy-sell';
import { order_list } from 'Constants/order-list';
Expand Down
Loading

0 comments on commit a57c156

Please sign in to comment.