mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-22 03:31:58 +00:00
Ordered imports alphabetically
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import type { CommonVisitsProps } from './types/CommonVisitsProps';
|
||||
import type { ShlinkVisitsParams } from '../api/types';
|
||||
import type { DomainVisits as DomainVisitsState, LoadDomainVisits } from './reducers/domainVisits';
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import { toApiParams } from './types/helpers';
|
||||
import type { DomainVisits as DomainVisitsState, LoadDomainVisits } from './reducers/domainVisits';
|
||||
import type { NormalizedVisit } from './types';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
import type { CommonVisitsProps } from './types/CommonVisitsProps';
|
||||
import { toApiParams } from './types/helpers';
|
||||
import { VisitsHeader } from './VisitsHeader';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
|
||||
export interface DomainVisitsProps extends CommonVisitsProps {
|
||||
getDomainVisits: (params: LoadDomainVisits) => void;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
import type { LoadVisits, VisitsInfo } from './reducers/types';
|
||||
import type { NormalizedVisit, VisitsParams } from './types';
|
||||
import type { CommonVisitsProps } from './types/CommonVisitsProps';
|
||||
import { toApiParams } from './types/helpers';
|
||||
import { VisitsHeader } from './VisitsHeader';
|
||||
import type { LoadVisits, VisitsInfo } from './reducers/types';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
|
||||
export interface NonOrphanVisitsProps extends CommonVisitsProps {
|
||||
getNonOrphanVisits: (params: LoadVisits) => void;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
import type { LoadOrphanVisits } from './reducers/orphanVisits';
|
||||
import type { VisitsInfo } from './reducers/types';
|
||||
import type { NormalizedVisit, VisitsParams } from './types';
|
||||
import type { CommonVisitsProps } from './types/CommonVisitsProps';
|
||||
import { toApiParams } from './types/helpers';
|
||||
import { VisitsHeader } from './VisitsHeader';
|
||||
import type { VisitsInfo } from './reducers/types';
|
||||
import type { LoadOrphanVisits } from './reducers/orphanVisits';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
|
||||
export interface OrphanVisitsProps extends CommonVisitsProps {
|
||||
getOrphanVisits: (params: LoadOrphanVisits) => void;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useLocation, useParams } from 'react-router-dom';
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { parseQuery } from '../utils/helpers/query';
|
||||
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 type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { parseQuery } from '../utils/helpers/query';
|
||||
import type { LoadShortUrlVisits, ShortUrlVisits as ShortUrlVisitsState } from './reducers/shortUrlVisits';
|
||||
import { ShortUrlVisitsHeader } from './ShortUrlVisitsHeader';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
import type { NormalizedVisit, VisitsParams } from './types';
|
||||
import type { CommonVisitsProps } from './types/CommonVisitsProps';
|
||||
import { toApiParams } from './types/helpers';
|
||||
import { urlDecodeShortCode } from '../short-urls/helpers';
|
||||
import type { ShortUrlIdentifier } from '../short-urls/data';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
|
||||
export interface ShortUrlVisitsProps extends CommonVisitsProps {
|
||||
getShortUrlVisits: (params: LoadShortUrlVisits) => void;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { ExternalLink } from 'react-external-link';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import type { ShortUrlDetail } from '../short-urls/reducers/shortUrlDetail';
|
||||
import { Time } from '../utils/dates/Time';
|
||||
import type { ShortUrlVisits } from './reducers/shortUrlVisits';
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import type { ColorGenerator } from '../utils/services/ColorGenerator';
|
||||
import type { ShlinkVisitsParams } from '../api/types';
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
|
||||
import { Topics } from '../mercure/helpers/Topics';
|
||||
import { useGoBack } from '../utils/helpers/hooks';
|
||||
import type { ReportExporter } from '../common/services/ReportExporter';
|
||||
import type { ColorGenerator } from '../utils/services/ColorGenerator';
|
||||
import type { LoadTagVisits, TagVisits as TagVisitsState } from './reducers/tagVisits';
|
||||
import { TagVisitsHeader } from './TagVisitsHeader';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
import type { NormalizedVisit } from './types';
|
||||
import type { CommonVisitsProps } from './types/CommonVisitsProps';
|
||||
import { toApiParams } from './types/helpers';
|
||||
import { VisitsStats } from './VisitsStats';
|
||||
|
||||
export interface TagVisitsProps extends CommonVisitsProps {
|
||||
getTagVisits: (params: LoadTagVisits) => void;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Tag } from '../tags/helpers/Tag';
|
||||
import type { ColorGenerator } from '../utils/services/ColorGenerator';
|
||||
import { VisitsHeader } from './VisitsHeader';
|
||||
import type { TagVisits } from './reducers/tagVisits';
|
||||
import { VisitsHeader } from './VisitsHeader';
|
||||
import './ShortUrlVisitsHeader.scss';
|
||||
|
||||
interface TagVisitsHeaderProps {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Button, Card } from 'reactstrap';
|
||||
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
|
||||
import { ShortUrlVisitsCount } from '../short-urls/helpers/ShortUrlVisitsCount';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
||||
import { Button, Card } from 'reactstrap';
|
||||
import type { ShortUrl } from '../short-urls/data';
|
||||
import { ShortUrlVisitsCount } from '../short-urls/helpers/ShortUrlVisitsCount';
|
||||
import type { Visit } from './types';
|
||||
|
||||
type VisitsHeaderProps = PropsWithChildren<{
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
import type { IconDefinition } from '@fortawesome/fontawesome-common-types';
|
||||
import { faCalendarAlt, faChartPie, faList, faMapMarkedAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import classNames from 'classnames';
|
||||
import { isEmpty, pipe, propEq, values } from 'ramda';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { useState, useEffect, useMemo, useRef } 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 { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faCalendarAlt, faMapMarkedAlt, faList, faChartPie } from '@fortawesome/free-solid-svg-icons';
|
||||
import type { IconDefinition } from '@fortawesome/fontawesome-common-types';
|
||||
import { Route, Routes, Navigate, useLocation } from 'react-router-dom';
|
||||
import classNames from 'classnames';
|
||||
import { DateRangeSelector } from '../utils/dates/DateRangeSelector';
|
||||
import { Message } from '../utils/Message';
|
||||
import { Result } from '../utils/Result';
|
||||
import { ShlinkApiError } from '../api/ShlinkApiError';
|
||||
import type { Settings } from '../settings/reducers/settings';
|
||||
import { prettify } from '../utils/helpers/numbers';
|
||||
import { NavPillItem, NavPills } from '../utils/NavPills';
|
||||
import { DateRangeSelector } from '../utils/dates/DateRangeSelector';
|
||||
import { ExportBtn } from '../utils/ExportBtn';
|
||||
import { LineChartCard } from './charts/LineChartCard';
|
||||
import { VisitsTable } from './VisitsTable';
|
||||
import type { NormalizedOrphanVisit, NormalizedVisit, VisitsParams } from './types';
|
||||
import { OpenMapModalBtn } from './helpers/OpenMapModalBtn';
|
||||
import { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';
|
||||
import { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';
|
||||
import type { HighlightableProps } from './types/helpers';
|
||||
import { highlightedVisitsToStats } from './types/helpers';
|
||||
import { DoughnutChartCard } from './charts/DoughnutChartCard';
|
||||
import { SortableBarChartCard } from './charts/SortableBarChartCard';
|
||||
import type { VisitsInfo } from './reducers/types';
|
||||
import { useVisitsQuery } from './helpers/hooks';
|
||||
import type { DateInterval, DateRange } from '../utils/helpers/dateIntervals';
|
||||
import { toDateRange } from '../utils/helpers/dateIntervals';
|
||||
import { prettify } from '../utils/helpers/numbers';
|
||||
import { Message } from '../utils/Message';
|
||||
import { NavPillItem, NavPills } from '../utils/NavPills';
|
||||
import { Result } from '../utils/Result';
|
||||
import { DoughnutChartCard } from './charts/DoughnutChartCard';
|
||||
import { LineChartCard } from './charts/LineChartCard';
|
||||
import { SortableBarChartCard } from './charts/SortableBarChartCard';
|
||||
import { useVisitsQuery } from './helpers/hooks';
|
||||
import { OpenMapModalBtn } from './helpers/OpenMapModalBtn';
|
||||
import { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';
|
||||
import type { VisitsInfo } from './reducers/types';
|
||||
import { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';
|
||||
import type { NormalizedOrphanVisit, NormalizedVisit, VisitsParams } from './types';
|
||||
import type { HighlightableProps } from './types/helpers';
|
||||
import { highlightedVisitsToStats } from './types/helpers';
|
||||
import { VisitsTable } from './VisitsTable';
|
||||
|
||||
export type VisitsStatsProps = PropsWithChildren<{
|
||||
getVisits: (params: VisitsParams, doIntervalFallback?: boolean) => void;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { useEffect, useMemo, useState, useRef } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { min, splitEvery } from 'ramda';
|
||||
import { faCheck as checkIcon, faRobot as botIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import classNames from 'classnames';
|
||||
import { min, splitEvery } from 'ramda';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { SimplePaginator } from '../common/SimplePaginator';
|
||||
import { SearchField } from '../utils/SearchField';
|
||||
import { Time } from '../utils/dates/Time';
|
||||
import { prettify } from '../utils/helpers/numbers';
|
||||
import type { Order } from '../utils/helpers/ordering';
|
||||
import { determineOrderDir, sortList } from '../utils/helpers/ordering';
|
||||
import { prettify } from '../utils/helpers/numbers';
|
||||
import { Time } from '../utils/dates/Time';
|
||||
import { SearchField } from '../utils/SearchField';
|
||||
import { TableOrderIcon } from '../utils/table/TableOrderIcon';
|
||||
import type { MediaMatcher } from '../utils/types';
|
||||
import type { NormalizedOrphanVisit, NormalizedVisit } from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Card, CardHeader, CardBody, CardFooter } from 'reactstrap';
|
||||
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
||||
import { Card, CardBody, CardFooter, CardHeader } from 'reactstrap';
|
||||
import './ChartCard.scss';
|
||||
|
||||
type ChartCardProps = PropsWithChildren<{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { FC } from 'react';
|
||||
import { useState, memo } from 'react';
|
||||
import type { Chart, ChartData, ChartDataset, ChartOptions } from 'chart.js';
|
||||
import { keys, values } from 'ramda';
|
||||
import type { FC } from 'react';
|
||||
import { memo, useState } from 'react';
|
||||
import { Doughnut } from 'react-chartjs-2';
|
||||
import { renderPieChartLabel } from '../../utils/helpers/charts';
|
||||
import { isDarkThemeEnabled, PRIMARY_DARK_COLOR, PRIMARY_LIGHT_COLOR } from '../../utils/theme';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { FC } from 'react';
|
||||
import type { Stats } from '../types';
|
||||
import { DoughnutChart } from './DoughnutChart';
|
||||
import { ChartCard } from './ChartCard';
|
||||
import { DoughnutChart } from './DoughnutChart';
|
||||
|
||||
interface DoughnutChartCardProps {
|
||||
title: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { FC } from 'react';
|
||||
import type { Chart } from 'chart.js';
|
||||
import type { FC } from 'react';
|
||||
import './DoughnutChartLegend.scss';
|
||||
|
||||
interface DoughnutChartLegendProps {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { FC, MutableRefObject } from 'react';
|
||||
import { useRef } from 'react';
|
||||
import type { ChartData, ChartDataset, ChartOptions, InteractionItem } from 'chart.js';
|
||||
import { keys, values } from 'ramda';
|
||||
import type { FC, MutableRefObject } from 'react';
|
||||
import { useRef } from 'react';
|
||||
import { Bar, getElementAtEvent } from 'react-chartjs-2';
|
||||
import { fillTheGaps } from '../../utils/helpers/visits';
|
||||
import { pointerOnHover, renderChartLabel } from '../../utils/helpers/charts';
|
||||
import { prettify } from '../../utils/helpers/numbers';
|
||||
import type { Stats } from '../types';
|
||||
import { fillTheGaps } from '../../utils/helpers/visits';
|
||||
import { HIGHLIGHTED_COLOR, HIGHLIGHTED_COLOR_ALPHA, MAIN_COLOR, MAIN_COLOR_ALPHA } from '../../utils/theme';
|
||||
import type { Stats } from '../types';
|
||||
|
||||
export interface HorizontalBarChartProps {
|
||||
stats: Stats;
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
import type { MutableRefObject } from 'react';
|
||||
import { useState, useMemo, useRef } from 'react';
|
||||
import {
|
||||
Card,
|
||||
CardHeader,
|
||||
CardBody,
|
||||
UncontrolledDropdown,
|
||||
DropdownToggle,
|
||||
DropdownMenu,
|
||||
DropdownItem,
|
||||
} from 'reactstrap';
|
||||
import { getElementAtEvent, Line } from 'react-chartjs-2';
|
||||
import { always, cond, countBy, reverse } from 'ramda';
|
||||
import type { ChartData, ChartDataset, ChartOptions, InteractionItem } from 'chart.js';
|
||||
import {
|
||||
add,
|
||||
differenceInDays,
|
||||
differenceInHours,
|
||||
differenceInMonths,
|
||||
differenceInWeeks,
|
||||
parseISO,
|
||||
format,
|
||||
startOfISOWeek,
|
||||
endOfISOWeek,
|
||||
format,
|
||||
parseISO,
|
||||
startOfISOWeek,
|
||||
} from 'date-fns';
|
||||
import type { ChartData, ChartDataset, ChartOptions, InteractionItem } from 'chart.js';
|
||||
import type { NormalizedVisit, Stats } from '../types';
|
||||
import { fillTheGaps } from '../../utils/helpers/visits';
|
||||
import { useToggle } from '../../utils/helpers/hooks';
|
||||
import { rangeOf } from '../../utils/utils';
|
||||
import { ToggleSwitch } from '../../utils/ToggleSwitch';
|
||||
import { prettify } from '../../utils/helpers/numbers';
|
||||
import { always, cond, countBy, reverse } from 'ramda';
|
||||
import type { MutableRefObject } from 'react';
|
||||
import { useMemo, useRef, useState } from 'react';
|
||||
import { getElementAtEvent, Line } from 'react-chartjs-2';
|
||||
import {
|
||||
Card,
|
||||
CardBody,
|
||||
CardHeader,
|
||||
DropdownItem,
|
||||
DropdownMenu,
|
||||
DropdownToggle,
|
||||
UncontrolledDropdown,
|
||||
} from 'reactstrap';
|
||||
import { pointerOnHover, renderChartLabel } from '../../utils/helpers/charts';
|
||||
import { HIGHLIGHTED_COLOR, MAIN_COLOR } from '../../utils/theme';
|
||||
import { STANDARD_DATE_FORMAT } from '../../utils/helpers/date';
|
||||
import { useToggle } from '../../utils/helpers/hooks';
|
||||
import { prettify } from '../../utils/helpers/numbers';
|
||||
import { fillTheGaps } from '../../utils/helpers/visits';
|
||||
import { HIGHLIGHTED_COLOR, MAIN_COLOR } from '../../utils/theme';
|
||||
import { ToggleSwitch } from '../../utils/ToggleSwitch';
|
||||
import { rangeOf } from '../../utils/utils';
|
||||
import type { NormalizedVisit, Stats } from '../types';
|
||||
import './LineChartCard.scss';
|
||||
|
||||
interface LineChartCardProps {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { fromPairs, pipe, reverse, sortBy, splitEvery, toLower, toPairs, type, zipObj } from 'ramda';
|
||||
import type { FC, ReactNode } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { fromPairs, pipe, reverse, sortBy, splitEvery, toLower, toPairs, type, zipObj } from 'ramda';
|
||||
import { rangeOf } from '../../utils/utils';
|
||||
import type { Order } from '../../utils/helpers/ordering';
|
||||
import { SimplePaginator } from '../../common/SimplePaginator';
|
||||
import { roundTen } from '../../utils/helpers/numbers';
|
||||
import type { Order } from '../../utils/helpers/ordering';
|
||||
import { OrderingDropdown } from '../../utils/OrderingDropdown';
|
||||
import { PaginationDropdown } from '../../utils/PaginationDropdown';
|
||||
import { rangeOf } from '../../utils/utils';
|
||||
import type { Stats, StatsRow } from '../types';
|
||||
import { ChartCard } from './ChartCard';
|
||||
import type { HorizontalBarChartProps } from './HorizontalBarChart';
|
||||
import { HorizontalBarChart } from './HorizontalBarChart';
|
||||
import { ChartCard } from './ChartCard';
|
||||
|
||||
interface SortableBarChartCardProps extends Omit<HorizontalBarChartProps, 'max'> {
|
||||
title: Function | string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { FC } from 'react';
|
||||
import { Modal, ModalBody } from 'reactstrap';
|
||||
import type { MapContainerProps } from 'react-leaflet';
|
||||
import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet';
|
||||
import { prop } from 'ramda';
|
||||
import type { FC } from 'react';
|
||||
import type { MapContainerProps } from 'react-leaflet';
|
||||
import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet';
|
||||
import { Modal, ModalBody } from 'reactstrap';
|
||||
import type { CityStats } from '../types';
|
||||
import './MapModal.scss';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faMapMarkedAlt as mapIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { useState } from 'react';
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, UncontrolledTooltip } from 'reactstrap';
|
||||
import { useDomId, useToggle } from '../../utils/helpers/hooks';
|
||||
import type { CityStats } from '../types';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { DropdownItemProps } from 'reactstrap';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../types';
|
||||
import { DropdownBtn } from '../../utils/DropdownBtn';
|
||||
import { hasValue } from '../../utils/utils';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../types';
|
||||
|
||||
interface VisitsFilterDropdownProps {
|
||||
onChange: (filters: VisitsFilter) => void;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { DeepPartial } from '@reduxjs/toolkit';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useMemo } from 'react';
|
||||
import { isEmpty, isNil, mergeDeepRight, pipe } from 'ramda';
|
||||
import { useMemo } from 'react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { formatIsoDate } from '../../utils/helpers/date';
|
||||
import type { DateRange } from '../../utils/helpers/dateIntervals';
|
||||
import { datesToDateRange } from '../../utils/helpers/dateIntervals';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../types';
|
||||
import { parseQuery, stringifyQuery } from '../../utils/helpers/query';
|
||||
import { formatIsoDate } from '../../utils/helpers/date';
|
||||
import type { BooleanString } from '../../utils/utils';
|
||||
import { parseBooleanToString } from '../../utils/utils';
|
||||
import type { OrphanVisitType, VisitsFilter } from '../types';
|
||||
|
||||
interface VisitsQuery {
|
||||
startDate?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { flatten, prop, range, splitEvery } from 'ramda';
|
||||
import { createAction, createSlice } from '@reduxjs/toolkit';
|
||||
import { flatten, prop, range, splitEvery } from 'ramda';
|
||||
import type { ShlinkPaginator, ShlinkVisits, ShlinkVisitsParams } from '../../api/types';
|
||||
import type { CreateVisit, Visit } from '../types';
|
||||
import { parseApiError } from '../../api/utils';
|
||||
import type { ShlinkState } from '../../container/types';
|
||||
import type { DateInterval } from '../../utils/helpers/dateIntervals';
|
||||
import { dateToMatchingInterval } from '../../utils/helpers/dateIntervals';
|
||||
import type { LoadVisits, VisitsInfo, VisitsLoaded } from './types';
|
||||
import { createAsyncThunk } from '../../utils/helpers/redux';
|
||||
import type { ShlinkState } from '../../container/types';
|
||||
import { parseApiError } from '../../api/utils';
|
||||
import type { CreateVisit, Visit } from '../types';
|
||||
import type { LoadVisits, VisitsInfo, VisitsLoaded } from './types';
|
||||
import { createNewVisits } from './visitCreation';
|
||||
|
||||
const ITEMS_PER_PAGE = 5000;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import { domainMatches } from '../../short-urls/helpers';
|
||||
import { isBetween } from '../../utils/helpers/date';
|
||||
import { createVisitsAsyncThunk, createVisitsReducer, lastVisitLoaderForLoader } from './common';
|
||||
import { domainMatches } from '../../short-urls/helpers';
|
||||
import type { LoadVisits, VisitsInfo } from './types';
|
||||
|
||||
const REDUCER_PREFIX = 'shlink/domainVisits';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { OrphanVisit, OrphanVisitType } from '../types';
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import { isOrphanVisit } from '../types/helpers';
|
||||
import { isBetween } from '../../utils/helpers/date';
|
||||
import type { OrphanVisit, OrphanVisitType } from '../types';
|
||||
import { isOrphanVisit } from '../types/helpers';
|
||||
import { createVisitsAsyncThunk, createVisitsReducer, lastVisitLoaderForLoader } from './common';
|
||||
import type { LoadVisits, VisitsInfo } from './types';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { shortUrlMatches } from '../../short-urls/helpers';
|
||||
import type { ShortUrlIdentifier } from '../../short-urls/data';
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import type { ShortUrlIdentifier } from '../../short-urls/data';
|
||||
import { shortUrlMatches } from '../../short-urls/helpers';
|
||||
import { isBetween } from '../../utils/helpers/date';
|
||||
import { createVisitsAsyncThunk, createVisitsReducer, lastVisitLoaderForLoader } from './common';
|
||||
import type { LoadVisits, VisitsInfo } from './types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ShlinkVisitsParams } from '../../../api/types';
|
||||
import type { DateInterval } from '../../../utils/helpers/dateIntervals';
|
||||
import type { ProblemDetailsError } from '../../../api/types/errors';
|
||||
import type { DateInterval } from '../../../utils/helpers/dateIntervals';
|
||||
import type { Visit } from '../../types';
|
||||
|
||||
export interface VisitsInfo {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import type { ShlinkVisitsOverview } from '../../api/types';
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import type { ShlinkVisitsOverview } from '../../api/types';
|
||||
import { createAsyncThunk } from '../../utils/helpers/redux';
|
||||
import { groupNewVisitsByType } from '../types/helpers';
|
||||
import { createNewVisits } from './visitCreation';
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import type Bottle from 'bottlejs';
|
||||
import { prop } from 'ramda';
|
||||
import type { ConnectDecorator } from '../../container/types';
|
||||
import { DomainVisits } from '../DomainVisits';
|
||||
import { MapModal } from '../helpers/MapModal';
|
||||
import { createNewVisits } from '../reducers/visitCreation';
|
||||
import { ShortUrlVisits } from '../ShortUrlVisits';
|
||||
import { TagVisits } from '../TagVisits';
|
||||
import { OrphanVisits } from '../OrphanVisits';
|
||||
import { NonOrphanVisits } from '../NonOrphanVisits';
|
||||
import { OrphanVisits } from '../OrphanVisits';
|
||||
import { domainVisitsReducerCreator, getDomainVisits } from '../reducers/domainVisits';
|
||||
import { getNonOrphanVisits, nonOrphanVisitsReducerCreator } from '../reducers/nonOrphanVisits';
|
||||
import { getOrphanVisits, orphanVisitsReducerCreator } from '../reducers/orphanVisits';
|
||||
import { getShortUrlVisits, shortUrlVisitsReducerCreator } from '../reducers/shortUrlVisits';
|
||||
import { getTagVisits, tagVisitsReducerCreator } from '../reducers/tagVisits';
|
||||
import { getDomainVisits, domainVisitsReducerCreator } from '../reducers/domainVisits';
|
||||
import { getOrphanVisits, orphanVisitsReducerCreator } from '../reducers/orphanVisits';
|
||||
import { getNonOrphanVisits, nonOrphanVisitsReducerCreator } from '../reducers/nonOrphanVisits';
|
||||
import type { ConnectDecorator } from '../../container/types';
|
||||
import { createNewVisits } from '../reducers/visitCreation';
|
||||
import { loadVisitsOverview, visitsOverviewReducerCreator } from '../reducers/visitsOverview';
|
||||
import { ShortUrlVisits } from '../ShortUrlVisits';
|
||||
import { TagVisits } from '../TagVisits';
|
||||
import * as visitsParser from './VisitsParser';
|
||||
import { DomainVisits } from '../DomainVisits';
|
||||
|
||||
const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
|
||||
// Components
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { countBy, groupBy, pipe, prop } from 'ramda';
|
||||
import { formatIsoDate } from '../../utils/helpers/date';
|
||||
import type { ShlinkVisitsParams } from '../../api/types';
|
||||
import { formatIsoDate } from '../../utils/helpers/date';
|
||||
import type { CreateVisit, NormalizedOrphanVisit, NormalizedVisit, OrphanVisit, Stats, Visit, VisitsParams } from './index';
|
||||
|
||||
export const isOrphanVisit = (visit: Visit): visit is OrphanVisit => (visit as OrphanVisit).visitedUrl !== undefined;
|
||||
|
||||
Reference in New Issue
Block a user