mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-15 03:53:51 +00:00
Move more components to shlink-web-component when applicable
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useGoBack } from '../../src/utils/helpers/hooks';
|
||||
import type { ShlinkVisitsParams } from '../api-contract';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ReportExporter } from '../utils/services/ReportExporter';
|
||||
import type { DomainVisits as DomainVisitsState, LoadDomainVisits } from './reducers/domainVisits';
|
||||
import type { NormalizedVisit } from './types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useGoBack } from '../../src/utils/helpers/hooks';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ReportExporter } from '../utils/services/ReportExporter';
|
||||
import type { LoadVisits, VisitsInfo } from './reducers/types';
|
||||
import type { NormalizedVisit, VisitsParams } from './types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useGoBack } from '../../src/utils/helpers/hooks';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ReportExporter } from '../utils/services/ReportExporter';
|
||||
import type { LoadOrphanVisits } from './reducers/orphanVisits';
|
||||
import type { VisitsInfo } from './reducers/types';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useLocation, useParams } from 'react-router-dom';
|
||||
import { useGoBack } from '../../src/utils/helpers/hooks';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import type { ShortUrlIdentifier } from '../short-urls/data';
|
||||
import { urlDecodeShortCode } from '../short-urls/helpers';
|
||||
import type { ShortUrlDetail } from '../short-urls/reducers/shortUrlDetail';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import { parseQuery } from '../utils/helpers/query';
|
||||
import type { ReportExporter } from '../utils/services/ReportExporter';
|
||||
import type { LoadShortUrlVisits, ShortUrlVisits as ShortUrlVisitsState } from './reducers/shortUrlVisits';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useGoBack } from '../../src/utils/helpers/hooks';
|
||||
import type { ShlinkVisitsParams } from '../api-contract';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ColorGenerator } from '../utils/services/ColorGenerator';
|
||||
import type { ReportExporter } from '../utils/services/ReportExporter';
|
||||
import type { LoadTagVisits, TagVisits as TagVisitsState } from './reducers/tagVisits';
|
||||
|
||||
@@ -7,15 +7,15 @@ import type { FC, PropsWithChildren } from 'react';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Navigate, Route, Routes, useLocation } from 'react-router-dom';
|
||||
import { Button, Progress, Row } from 'reactstrap';
|
||||
import { ShlinkApiError } from '../../src/api/ShlinkApiError';
|
||||
import { DateRangeSelector } from '../../src/utils/dates/DateRangeSelector';
|
||||
import { ExportBtn } from '../../src/utils/ExportBtn';
|
||||
import type { DateInterval, DateRange } from '../../src/utils/helpers/dateIntervals';
|
||||
import { toDateRange } from '../../src/utils/helpers/dateIntervals';
|
||||
import { prettify } from '../../src/utils/helpers/numbers';
|
||||
import { Message } from '../../src/utils/Message';
|
||||
import { NavPillItem, NavPills } from '../../src/utils/NavPills';
|
||||
import { Result } from '../../src/utils/Result';
|
||||
import { ShlinkApiError } from '../common/ShlinkApiError';
|
||||
import { ExportBtn } from '../utils/components/ExportBtn';
|
||||
import { prettify } from '../utils/helpers/numbers';
|
||||
import { useSetting } from '../utils/settings';
|
||||
import { DoughnutChartCard } from './charts/DoughnutChartCard';
|
||||
import { LineChartCard } from './charts/LineChartCard';
|
||||
|
||||
@@ -4,14 +4,14 @@ import classNames from 'classnames';
|
||||
import { min, splitEvery } from 'ramda';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { SimplePaginator } from '../../src/common/SimplePaginator';
|
||||
import { Time } from '../../src/utils/dates/Time';
|
||||
import { prettify } from '../../src/utils/helpers/numbers';
|
||||
import type { Order } from '../../src/utils/helpers/ordering';
|
||||
import { determineOrderDir, sortList } from '../../src/utils/helpers/ordering';
|
||||
import { SearchField } from '../../src/utils/SearchField';
|
||||
import { TableOrderIcon } from '../../src/utils/table/TableOrderIcon';
|
||||
import type { MediaMatcher } from '../../src/utils/types';
|
||||
import { SimplePaginator } from '../utils/components/SimplePaginator';
|
||||
import { prettify } from '../utils/helpers/numbers';
|
||||
import { TableOrderIcon } from '../utils/table/TableOrderIcon';
|
||||
import type { MediaMatcher } from '../utils/types';
|
||||
import type { NormalizedOrphanVisit, NormalizedVisit } from './types';
|
||||
import './VisitsTable.scss';
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { keys, values } from 'ramda';
|
||||
import type { FC } from 'react';
|
||||
import { memo, useState } from 'react';
|
||||
import { Doughnut } from 'react-chartjs-2';
|
||||
import { renderPieChartLabel } from '../../../src/utils/helpers/charts';
|
||||
import { isDarkThemeEnabled, PRIMARY_DARK_COLOR, PRIMARY_LIGHT_COLOR } from '../../../src/utils/theme';
|
||||
import { renderPieChartLabel } from '../../utils/helpers/charts';
|
||||
import type { Stats } from '../types';
|
||||
import { DoughnutChartLegend } from './DoughnutChartLegend';
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ import { keys, values } from 'ramda';
|
||||
import type { FC, MutableRefObject } from 'react';
|
||||
import { useRef } from 'react';
|
||||
import { Bar, getElementAtEvent } from 'react-chartjs-2';
|
||||
import { pointerOnHover, renderChartLabel } from '../../../src/utils/helpers/charts';
|
||||
import { prettify } from '../../../src/utils/helpers/numbers';
|
||||
import { HIGHLIGHTED_COLOR, HIGHLIGHTED_COLOR_ALPHA, MAIN_COLOR, MAIN_COLOR_ALPHA } from '../../../src/utils/theme';
|
||||
import { pointerOnHover, renderChartLabel } from '../../utils/helpers/charts';
|
||||
import { prettify } from '../../utils/helpers/numbers';
|
||||
import type { Stats } from '../types';
|
||||
import { fillTheGaps } from '../utils';
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ import {
|
||||
DropdownToggle,
|
||||
UncontrolledDropdown,
|
||||
} from 'reactstrap';
|
||||
import { pointerOnHover, renderChartLabel } from '../../../src/utils/helpers/charts';
|
||||
import { STANDARD_DATE_FORMAT } from '../../../src/utils/helpers/date';
|
||||
import { prettify } from '../../../src/utils/helpers/numbers';
|
||||
import { HIGHLIGHTED_COLOR, MAIN_COLOR } from '../../../src/utils/theme';
|
||||
import { ToggleSwitch } from '../../../src/utils/ToggleSwitch';
|
||||
import { rangeOf } from '../../../src/utils/utils';
|
||||
import { rangeOf } from '../../utils/helpers';
|
||||
import { pointerOnHover, renderChartLabel } from '../../utils/helpers/charts';
|
||||
import { useToggle } from '../../utils/helpers/hooks';
|
||||
import { prettify } from '../../utils/helpers/numbers';
|
||||
import type { NormalizedVisit, Stats } from '../types';
|
||||
import { fillTheGaps } from '../utils';
|
||||
import './LineChartCard.scss';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { fromPairs, pipe, reverse, sortBy, splitEvery, toLower, toPairs, type, zipObj } from 'ramda';
|
||||
import type { FC, ReactNode } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { SimplePaginator } from '../../../src/common/SimplePaginator';
|
||||
import { roundTen } from '../../../src/utils/helpers/numbers';
|
||||
import type { Order } from '../../../src/utils/helpers/ordering';
|
||||
import { OrderingDropdown } from '../../../src/utils/OrderingDropdown';
|
||||
import { PaginationDropdown } from '../../../src/utils/PaginationDropdown';
|
||||
import { rangeOf } from '../../../src/utils/utils';
|
||||
import { PaginationDropdown } from '../../utils/components/PaginationDropdown';
|
||||
import { SimplePaginator } from '../../utils/components/SimplePaginator';
|
||||
import { rangeOf } from '../../utils/helpers';
|
||||
import { roundTen } from '../../utils/helpers/numbers';
|
||||
import type { Stats, StatsRow } from '../types';
|
||||
import { ChartCard } from './ChartCard';
|
||||
import type { HorizontalBarChartProps } from './HorizontalBarChart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { DropdownItemProps } from 'reactstrap';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import { DropdownBtn } from '../../../src/utils/DropdownBtn';
|
||||
import { hasValue } from '../../../src/utils/utils';
|
||||
import { hasValue } from '../../utils/helpers';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../types';
|
||||
|
||||
interface VisitsFilterDropdownProps {
|
||||
|
||||
@@ -5,8 +5,8 @@ import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { formatIsoDate } from '../../../src/utils/helpers/date';
|
||||
import type { DateRange } from '../../../src/utils/helpers/dateIntervals';
|
||||
import { datesToDateRange } from '../../../src/utils/helpers/dateIntervals';
|
||||
import type { BooleanString } from '../../../src/utils/utils';
|
||||
import { parseBooleanToString } from '../../../src/utils/utils';
|
||||
import type { BooleanString } from '../../utils/helpers';
|
||||
import { parseBooleanToString } from '../../utils/helpers';
|
||||
import { parseQuery, stringifyQuery } from '../../utils/helpers/query';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../types';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isNil, map } from 'ramda';
|
||||
import { hasValue } from '../../../src/utils/utils';
|
||||
import { hasValue } from '../../utils/helpers';
|
||||
import type { CityStats, NormalizedVisit, Stats, Visit, VisitsStats } from '../types';
|
||||
import { isNormalizedOrphanVisit, isOrphanVisit } from '../types/helpers';
|
||||
import { extractDomain, parseUserAgent } from '../utils';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import bowser from 'bowser';
|
||||
import { zipObj } from 'ramda';
|
||||
import type { Empty } from '../../../src/utils/utils';
|
||||
import { hasValue } from '../../../src/utils/utils';
|
||||
import type { Empty } from '../../utils/helpers';
|
||||
import { hasValue } from '../../utils/helpers';
|
||||
import type { Stats, UserAgent } from '../types';
|
||||
|
||||
const DEFAULT = 'Others';
|
||||
|
||||
Reference in New Issue
Block a user