Move stuff belonging to the component to shlink-web-component

This commit is contained in:
Alejandro Celaya 2023-07-16 08:47:10 +02:00
parent cbbb679dfc
commit d82c0dc75e
204 changed files with 568 additions and 563 deletions

View file

@ -1,6 +1,6 @@
import { isEmpty, isNil, reject } from 'ramda';
import type { HttpClient } from '../../common/services/HttpClient';
import type { ShortUrl, ShortUrlData } from '../../short-urls/data';
import type { ShortUrl, ShortUrlData } from '../../shlink-web-component/short-urls/data';
import { orderToString } from '../../utils/helpers/ordering';
import { stringifyQuery } from '../../utils/helpers/query';
import type { OptionalString } from '../../utils/utils';

View file

@ -1,7 +1,7 @@
import type { ShortUrl, ShortUrlMeta } from '../../short-urls/data';
import type { ShortUrl, ShortUrlMeta } from '../../shlink-web-component/short-urls/data';
import type { Visit } from '../../shlink-web-component/visits/types';
import type { Order } from '../../utils/helpers/ordering';
import type { OptionalString } from '../../utils/utils';
import type { Visit } from '../../visits/types';
export interface ShlinkShortUrlsResponse {
data: ShortUrl[];

View file

@ -1,7 +1,7 @@
import type { ExportableShortUrl } from '../../short-urls/data';
import type { ExportableShortUrl } from '../../shlink-web-component/short-urls/data';
import type { NormalizedVisit } from '../../shlink-web-component/visits/types';
import type { JsonToCsv } from '../../utils/helpers/csvjson';
import { saveCsv } from '../../utils/helpers/files';
import type { NormalizedVisit } from '../../visits/types';
export class ReportExporter {
public constructor(private readonly window: Window, private readonly jsonToCsv: JsonToCsv) {}

View file

@ -5,14 +5,14 @@ import { connect as reduxConnect } from 'react-redux';
import { provideServices as provideApiServices } from '../api/services/provideServices';
import { provideServices as provideAppServices } from '../app/services/provideServices';
import { provideServices as provideCommonServices } from '../common/services/provideServices';
import { provideServices as provideDomainsServices } from '../domains/services/provideServices';
import { provideServices as provideMercureServices } from '../mercure/services/provideServices';
import { provideServices as provideServersServices } from '../servers/services/provideServices';
import { provideServices as provideSettingsServices } from '../settings/services/provideServices';
import { provideServices as provideShortUrlsServices } from '../short-urls/services/provideServices';
import { provideServices as provideTagsServices } from '../tags/services/provideServices';
import { provideServices as provideDomainsServices } from '../shlink-web-component/domains/services/provideServices';
import { provideServices as provideShortUrlsServices } from '../shlink-web-component/short-urls/services/provideServices';
import { provideServices as provideTagsServices } from '../shlink-web-component/tags/services/provideServices';
import { provideServices as provideVisitsServices } from '../shlink-web-component/visits/services/provideServices';
import { provideServices as provideUtilsServices } from '../utils/services/provideServices';
import { provideServices as provideVisitsServices } from '../visits/services/provideServices';
import type { ConnectDecorator } from './types';
type LazyActionMap = Record<string, Function>;

View file

@ -1,21 +1,21 @@
import type { Sidebar } from '../common/reducers/sidebar';
import type { DomainsList } from '../domains/reducers/domainsList';
import type { MercureInfo } from '../mercure/reducers/mercureInfo';
import type { SelectedServer, ServersMap } from '../servers/data';
import type { Settings } from '../settings/reducers/settings';
import type { ShortUrlCreation } from '../short-urls/reducers/shortUrlCreation';
import type { ShortUrlDeletion } from '../short-urls/reducers/shortUrlDeletion';
import type { ShortUrlDetail } from '../short-urls/reducers/shortUrlDetail';
import type { ShortUrlEdition } from '../short-urls/reducers/shortUrlEdition';
import type { ShortUrlsList } from '../short-urls/reducers/shortUrlsList';
import type { TagDeletion } from '../tags/reducers/tagDelete';
import type { TagEdition } from '../tags/reducers/tagEdit';
import type { TagsList } from '../tags/reducers/tagsList';
import type { DomainVisits } from '../visits/reducers/domainVisits';
import type { ShortUrlVisits } from '../visits/reducers/shortUrlVisits';
import type { TagVisits } from '../visits/reducers/tagVisits';
import type { VisitsInfo } from '../visits/reducers/types';
import type { VisitsOverview } from '../visits/reducers/visitsOverview';
import type { DomainsList } from '../shlink-web-component/domains/reducers/domainsList';
import type { ShortUrlCreation } from '../shlink-web-component/short-urls/reducers/shortUrlCreation';
import type { ShortUrlDeletion } from '../shlink-web-component/short-urls/reducers/shortUrlDeletion';
import type { ShortUrlDetail } from '../shlink-web-component/short-urls/reducers/shortUrlDetail';
import type { ShortUrlEdition } from '../shlink-web-component/short-urls/reducers/shortUrlEdition';
import type { ShortUrlsList } from '../shlink-web-component/short-urls/reducers/shortUrlsList';
import type { TagDeletion } from '../shlink-web-component/tags/reducers/tagDelete';
import type { TagEdition } from '../shlink-web-component/tags/reducers/tagEdit';
import type { TagsList } from '../shlink-web-component/tags/reducers/tagsList';
import type { DomainVisits } from '../shlink-web-component/visits/reducers/domainVisits';
import type { ShortUrlVisits } from '../shlink-web-component/visits/reducers/shortUrlVisits';
import type { TagVisits } from '../shlink-web-component/visits/reducers/tagVisits';
import type { VisitsInfo } from '../shlink-web-component/visits/reducers/types';
import type { VisitsOverview } from '../shlink-web-component/visits/reducers/visitsOverview';
export interface ShlinkState {
servers: ServersMap;

View file

@ -2,7 +2,7 @@ import { pipe } from 'ramda';
import type { FC } from 'react';
import { useEffect } from 'react';
import { useParams } from 'react-router-dom';
import type { CreateVisit } from '../../visits/types';
import type { CreateVisit } from '../../shlink-web-component/visits/types';
import type { MercureInfo } from '../reducers/mercureInfo';
import { bindToMercureTopic } from './index';

View file

@ -7,8 +7,17 @@ import { serversReducer } from '../servers/reducers/servers';
import { settingsReducer } from '../settings/reducers/settings';
export const initReducers = (container: IContainer) => combineReducers<ShlinkState>({
// Main shlink-web-client reducers
appUpdated: appUpdatesReducer,
servers: serversReducer,
selectedServer: container.selectedServerReducer,
settings: settingsReducer,
sidebar: sidebarReducer,
// TBD
mercureInfo: container.mercureInfoReducer,
// Nested shlink-web-component reducers
shortUrlsList: container.shortUrlsListReducer,
shortUrlCreation: container.shortUrlCreationReducer,
shortUrlDeletion: container.shortUrlDeletionReducer,
@ -22,10 +31,6 @@ export const initReducers = (container: IContainer) => combineReducers<ShlinkSta
tagsList: container.tagsListReducer,
tagDelete: container.tagDeleteReducer,
tagEdit: container.tagEditReducer,
mercureInfo: container.mercureInfoReducer,
settings: settingsReducer,
domainsList: container.domainsListReducer,
visitsOverview: container.visitsOverviewReducer,
appUpdated: appUpdatesReducer,
sidebar: sidebarReducer,
});

View file

@ -1,6 +1,6 @@
import type { FC } from 'react';
import type { PartialVisitsSummary } from '../../shlink-web-component/visits/reducers/visitsOverview';
import { prettify } from '../../utils/helpers/numbers';
import type { PartialVisitsSummary } from '../../visits/reducers/visitsOverview';
import type { HighlightCardProps } from './HighlightCard';
import { HighlightCard } from './HighlightCard';

View file

@ -1,6 +1,7 @@
import type Bottle from 'bottlejs';
import { prop } from 'ramda';
import type { ConnectDecorator } from '../../container/types';
import { Overview } from '../../shlink-web-component/overview/Overview';
import { CreateServer } from '../CreateServer';
import { DeleteServerButton } from '../DeleteServerButton';
import { DeleteServerModal } from '../DeleteServerModal';
@ -11,7 +12,6 @@ import { withoutSelectedServer } from '../helpers/withoutSelectedServer';
import { ManageServers } from '../ManageServers';
import { ManageServersRow } from '../ManageServersRow';
import { ManageServersRowDropdown } from '../ManageServersRowDropdown';
import { Overview } from '../Overview';
import { fetchServers } from '../reducers/remoteServers';
import {
resetSelectedServer,

View file

@ -1,5 +1,5 @@
import type { FC } from 'react';
import { SHORT_URLS_ORDERABLE_FIELDS } from '../short-urls/data';
import { SHORT_URLS_ORDERABLE_FIELDS } from '../shlink-web-component/short-urls/data';
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
import { OrderingDropdown } from '../utils/OrderingDropdown';
import { SimpleCard } from '../utils/SimpleCard';

View file

@ -1,5 +1,5 @@
import type { FC } from 'react';
import { TAGS_ORDERABLE_FIELDS } from '../tags/data/TagsListChildrenProps';
import { TAGS_ORDERABLE_FIELDS } from '../shlink-web-component/tags/data/TagsListChildrenProps';
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
import { OrderingDropdown } from '../utils/OrderingDropdown';
import { SimpleCard } from '../utils/SimpleCard';

View file

@ -1,8 +1,8 @@
import type { PayloadAction, PrepareAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import { mergeDeepRight } from 'ramda';
import type { ShortUrlsOrder } from '../../short-urls/data';
import type { TagsOrder } from '../../tags/data/TagsListChildrenProps';
import type { ShortUrlsOrder } from '../../shlink-web-component/short-urls/data';
import type { TagsOrder } from '../../shlink-web-component/tags/data/TagsListChildrenProps';
import type { DateInterval } from '../../utils/helpers/dateIntervals';
import type { Theme } from '../../utils/theme';

View file

@ -3,9 +3,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { useEffect } from 'react';
import { UncontrolledTooltip } from 'reactstrap';
import type { ShlinkDomainRedirects } from '../api/types';
import type { SelectedServer } from '../servers/data';
import type { OptionalString } from '../utils/utils';
import type { ShlinkDomainRedirects } from '../../api/types';
import type { SelectedServer } from '../../servers/data';
import type { OptionalString } from '../../utils/utils';
import type { Domain } from './data';
import { DomainDropdown } from './helpers/DomainDropdown';
import { DomainStatusIcon } from './helpers/DomainStatusIcon';

View file

@ -1,5 +1,5 @@
@import '../utils/base';
@import '../utils/mixins/vertical-align';
@import '../../utils/base';
@import '../../utils/mixins/vertical-align';
.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn,
.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn:hover,

View file

@ -4,8 +4,8 @@ import { isEmpty, pipe } from 'ramda';
import { useEffect } from 'react';
import type { InputProps } from 'reactstrap';
import { Button, DropdownItem, Input, InputGroup, UncontrolledTooltip } from 'reactstrap';
import { DropdownBtn } from '../utils/DropdownBtn';
import { useToggle } from '../utils/helpers/hooks';
import { DropdownBtn } from '../../utils/DropdownBtn';
import { useToggle } from '../../utils/helpers/hooks';
import type { DomainsList } from './reducers/domainsList';
import './DomainSelector.scss';

View file

@ -1,11 +1,11 @@
import type { FC } from 'react';
import { useEffect } from 'react';
import { ShlinkApiError } from '../api/ShlinkApiError';
import type { SelectedServer } from '../servers/data';
import { Message } from '../utils/Message';
import { Result } from '../utils/Result';
import { SearchField } from '../utils/SearchField';
import { SimpleCard } from '../utils/SimpleCard';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import type { SelectedServer } from '../../servers/data';
import { Message } from '../../utils/Message';
import { Result } from '../../utils/Result';
import { SearchField } from '../../utils/SearchField';
import { SimpleCard } from '../../utils/SimpleCard';
import { DomainRow } from './DomainRow';
import type { EditDomainRedirects } from './reducers/domainRedirects';
import type { DomainsList } from './reducers/domainsList';

View file

@ -1,4 +1,4 @@
import type { ShlinkDomain } from '../../api/types';
import type { ShlinkDomain } from '../../../api/types';
export type DomainStatus = 'validating' | 'valid' | 'invalid';

View file

@ -3,11 +3,11 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { DropdownItem } from 'reactstrap';
import type { SelectedServer } from '../../servers/data';
import { getServerId } from '../../servers/data';
import { useFeature } from '../../utils/helpers/features';
import { useToggle } from '../../utils/helpers/hooks';
import { RowDropdownBtn } from '../../utils/RowDropdownBtn';
import type { SelectedServer } from '../../../servers/data';
import { getServerId } from '../../../servers/data';
import { useFeature } from '../../../utils/helpers/features';
import { useToggle } from '../../../utils/helpers/hooks';
import { RowDropdownBtn } from '../../../utils/RowDropdownBtn';
import { DEFAULT_DOMAIN } from '../../visits/reducers/domainVisits';
import type { Domain } from '../data';
import type { EditDomainRedirects } from '../reducers/domainRedirects';

View file

@ -8,8 +8,8 @@ import type { FC } from 'react';
import { useEffect, useState } from 'react';
import { ExternalLink } from 'react-external-link';
import { UncontrolledTooltip } from 'reactstrap';
import { useElementRef } from '../../utils/helpers/hooks';
import type { MediaMatcher } from '../../utils/types';
import { useElementRef } from '../../../utils/helpers/hooks';
import type { MediaMatcher } from '../../../utils/types';
import type { DomainStatus } from '../data';
interface DomainStatusIconProps {

View file

@ -1,11 +1,11 @@
import type { FC } from 'react';
import { useState } from 'react';
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import type { ShlinkDomain } from '../../api/types';
import type { InputFormGroupProps } from '../../utils/forms/InputFormGroup';
import { InputFormGroup } from '../../utils/forms/InputFormGroup';
import { InfoTooltip } from '../../utils/InfoTooltip';
import { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/utils';
import type { ShlinkDomain } from '../../../api/types';
import type { InputFormGroupProps } from '../../../utils/forms/InputFormGroup';
import { InputFormGroup } from '../../../utils/forms/InputFormGroup';
import { InfoTooltip } from '../../../utils/InfoTooltip';
import { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../../utils/utils';
import type { EditDomainRedirects } from '../reducers/domainRedirects';
interface EditDomainRedirectsModalProps {

View file

@ -1,6 +1,6 @@
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ShlinkDomainRedirects } from '../../api/types';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ShlinkDomainRedirects } from '../../../api/types';
import { createAsyncThunk } from '../../../utils/helpers/redux';
const EDIT_DOMAIN_REDIRECTS = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS';

View file

@ -1,12 +1,12 @@
import type { AsyncThunk, SliceCaseReducers } from '@reduxjs/toolkit';
import { createAction, createSlice } from '@reduxjs/toolkit';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ShlinkDomainRedirects } from '../../api/types';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { hasServerData } from '../../servers/data';
import { createAsyncThunk } from '../../utils/helpers/redux';
import { replaceAuthorityFromUri } from '../../utils/helpers/uri';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ShlinkDomainRedirects } from '../../../api/types';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { hasServerData } from '../../../servers/data';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import { replaceAuthorityFromUri } from '../../../utils/helpers/uri';
import type { Domain, DomainStatus } from '../data';
import type { EditDomainRedirects } from './domainRedirects';

View file

@ -1,6 +1,6 @@
import type Bottle from 'bottlejs';
import { prop } from 'ramda';
import type { ConnectDecorator } from '../../container/types';
import type { ConnectDecorator } from '../../../container/types';
import { DomainSelector } from '../DomainSelector';
import { ManageDomains } from '../ManageDomains';
import { editDomainRedirects } from '../reducers/domainRedirects';

View file

@ -2,22 +2,22 @@ import type { FC } from 'react';
import { useEffect } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import { Card, CardBody, CardHeader, Row } from 'reactstrap';
import type { ShlinkShortUrlsListParams } from '../api/types';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { Topics } from '../mercure/helpers/Topics';
import type { Settings } from '../settings/reducers/settings';
import type { ShlinkShortUrlsListParams } from '../../api/types';
import { boundToMercureHub } from '../../mercure/helpers/boundToMercureHub';
import { Topics } from '../../mercure/helpers/Topics';
import type { SelectedServer } from '../../servers/data';
import { getServerId } from '../../servers/data';
import { HighlightCard } from '../../servers/helpers/HighlightCard';
import { VisitsHighlightCard } from '../../servers/helpers/VisitsHighlightCard';
import type { Settings } from '../../settings/reducers/settings';
import { useFeature } from '../../utils/helpers/features';
import { prettify } from '../../utils/helpers/numbers';
import type { CreateShortUrlProps } from '../short-urls/CreateShortUrl';
import type { ShortUrlsList as ShortUrlsListState } from '../short-urls/reducers/shortUrlsList';
import { ITEMS_IN_OVERVIEW_PAGE } from '../short-urls/reducers/shortUrlsList';
import type { ShortUrlsTableType } from '../short-urls/ShortUrlsTable';
import type { TagsList } from '../tags/reducers/tagsList';
import { useFeature } from '../utils/helpers/features';
import { prettify } from '../utils/helpers/numbers';
import type { VisitsOverview } from '../visits/reducers/visitsOverview';
import type { SelectedServer } from './data';
import { getServerId } from './data';
import { HighlightCard } from './helpers/HighlightCard';
import { VisitsHighlightCard } from './helpers/VisitsHighlightCard';
interface OverviewConnectProps {
shortUrlsList: ShortUrlsListState;

View file

@ -1,7 +1,7 @@
import type { FC } from 'react';
import { useMemo } from 'react';
import type { SelectedServer } from '../servers/data';
import type { Settings, ShortUrlCreationSettings } from '../settings/reducers/settings';
import type { SelectedServer } from '../../servers/data';
import type { Settings, ShortUrlCreationSettings } from '../../settings/reducers/settings';
import type { ShortUrlData } from './data';
import type { CreateShortUrlResultProps } from './helpers/CreateShortUrlResult';
import type { ShortUrlCreation } from './reducers/shortUrlCreation';

View file

@ -5,13 +5,13 @@ import { useEffect, useMemo } from 'react';
import { ExternalLink } from 'react-external-link';
import { useLocation, useParams } from 'react-router-dom';
import { Button, Card } from 'reactstrap';
import { ShlinkApiError } from '../api/ShlinkApiError';
import type { SelectedServer } from '../servers/data';
import type { Settings } from '../settings/reducers/settings';
import { useGoBack } from '../utils/helpers/hooks';
import { parseQuery } from '../utils/helpers/query';
import { Message } from '../utils/Message';
import { Result } from '../utils/Result';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import type { SelectedServer } from '../../servers/data';
import type { Settings } from '../../settings/reducers/settings';
import { useGoBack } from '../../utils/helpers/hooks';
import { parseQuery } from '../../utils/helpers/query';
import { Message } from '../../utils/Message';
import { Result } from '../../utils/Result';
import type { ShortUrlIdentifier } from './data';
import { shortUrlDataFromShortUrl, urlDecodeShortCode } from './helpers';
import type { ShortUrlDetail } from './reducers/shortUrlDetail';

View file

@ -1,14 +1,14 @@
import { Link } from 'react-router-dom';
import { Pagination, PaginationItem, PaginationLink } from 'reactstrap';
import type { ShlinkPaginator } from '../api/types';
import type { ShlinkPaginator } from '../../api/types';
import type {
NumberOrEllipsis } from '../utils/helpers/pagination';
NumberOrEllipsis } from '../../utils/helpers/pagination';
import {
keyForPage,
pageIsEllipsis,
prettifyPageNumber,
progressivePagination,
} from '../utils/helpers/pagination';
} from '../../utils/helpers/pagination';
interface PaginatorProps {
paginator?: ShlinkPaginator;

View file

@ -1,4 +1,4 @@
@import '../utils/base';
@import '../../utils/base';
.short-url-form p:last-child {
margin-bottom: 0;

View file

@ -8,17 +8,17 @@ import type { ChangeEvent, FC } from 'react';
import { useEffect, useState } from 'react';
import { Button, FormGroup, Input, Row } from 'reactstrap';
import type { InputType } from 'reactstrap/types/lib/Input';
import type { SelectedServer } from '../../servers/data';
import { Checkbox } from '../../utils/Checkbox';
import type { DateTimeInputProps } from '../../utils/dates/DateTimeInput';
import { DateTimeInput } from '../../utils/dates/DateTimeInput';
import { formatIsoDate } from '../../utils/helpers/date';
import { useFeature } from '../../utils/helpers/features';
import { IconInput } from '../../utils/IconInput';
import { SimpleCard } from '../../utils/SimpleCard';
import { handleEventPreventingDefault, hasValue } from '../../utils/utils';
import type { DomainSelectorProps } from '../domains/DomainSelector';
import type { SelectedServer } from '../servers/data';
import type { TagsSelectorProps } from '../tags/helpers/TagsSelector';
import { Checkbox } from '../utils/Checkbox';
import type { DateTimeInputProps } from '../utils/dates/DateTimeInput';
import { DateTimeInput } from '../utils/dates/DateTimeInput';
import { formatIsoDate } from '../utils/helpers/date';
import { useFeature } from '../utils/helpers/features';
import { IconInput } from '../utils/IconInput';
import { SimpleCard } from '../utils/SimpleCard';
import { handleEventPreventingDefault, hasValue } from '../utils/utils';
import type { DeviceLongUrls, ShortUrlData } from './data';
import { ShortUrlFormCheckboxGroup } from './helpers/ShortUrlFormCheckboxGroup';
import { UseExistingIfFoundInfoIcon } from './UseExistingIfFoundInfoIcon';

View file

@ -4,17 +4,17 @@ import classNames from 'classnames';
import { isEmpty, pipe } from 'ramda';
import type { FC } from 'react';
import { Button, InputGroup, Row, UncontrolledTooltip } from 'reactstrap';
import type { SelectedServer } from '../servers/data';
import type { Settings } from '../settings/reducers/settings';
import type { SelectedServer } from '../../servers/data';
import type { Settings } from '../../settings/reducers/settings';
import { DateRangeSelector } from '../../utils/dates/DateRangeSelector';
import { formatIsoDate } from '../../utils/helpers/date';
import type { DateRange } from '../../utils/helpers/dateIntervals';
import { datesToDateRange } from '../../utils/helpers/dateIntervals';
import { useFeature } from '../../utils/helpers/features';
import type { OrderDir } from '../../utils/helpers/ordering';
import { OrderingDropdown } from '../../utils/OrderingDropdown';
import { SearchField } from '../../utils/SearchField';
import type { TagsSelectorProps } from '../tags/helpers/TagsSelector';
import { DateRangeSelector } from '../utils/dates/DateRangeSelector';
import { formatIsoDate } from '../utils/helpers/date';
import type { DateRange } from '../utils/helpers/dateIntervals';
import { datesToDateRange } from '../utils/helpers/dateIntervals';
import { useFeature } from '../utils/helpers/features';
import type { OrderDir } from '../utils/helpers/ordering';
import { OrderingDropdown } from '../utils/OrderingDropdown';
import { SearchField } from '../utils/SearchField';
import type { ShortUrlsOrder, ShortUrlsOrderableFields } from './data';
import { SHORT_URLS_ORDERABLE_FIELDS } from './data';
import type { ExportShortUrlsBtnProps } from './helpers/ExportShortUrlsBtn';

View file

@ -2,17 +2,17 @@ import { pipe } from 'ramda';
import { useEffect, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { Card } from 'reactstrap';
import type { ShlinkShortUrlsListParams, ShlinkShortUrlsOrder } from '../api/types';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { Topics } from '../mercure/helpers/Topics';
import type { SelectedServer } from '../servers/data';
import { getServerId } from '../servers/data';
import type { Settings } from '../settings/reducers/settings';
import { DEFAULT_SHORT_URLS_ORDERING } from '../settings/reducers/settings';
import { useFeature } from '../utils/helpers/features';
import type { OrderDir } from '../utils/helpers/ordering';
import { determineOrderDir } from '../utils/helpers/ordering';
import { TableOrderIcon } from '../utils/table/TableOrderIcon';
import type { ShlinkShortUrlsListParams, ShlinkShortUrlsOrder } from '../../api/types';
import { boundToMercureHub } from '../../mercure/helpers/boundToMercureHub';
import { Topics } from '../../mercure/helpers/Topics';
import type { SelectedServer } from '../../servers/data';
import { getServerId } from '../../servers/data';
import type { Settings } from '../../settings/reducers/settings';
import { DEFAULT_SHORT_URLS_ORDERING } from '../../settings/reducers/settings';
import { useFeature } from '../../utils/helpers/features';
import type { OrderDir } from '../../utils/helpers/ordering';
import { determineOrderDir } from '../../utils/helpers/ordering';
import { TableOrderIcon } from '../../utils/table/TableOrderIcon';
import type { ShortUrlsOrder, ShortUrlsOrderableFields } from './data';
import { useShortUrlsQuery } from './helpers/hooks';
import { Paginator } from './Paginator';

View file

@ -1,7 +1,7 @@
import classNames from 'classnames';
import { isEmpty } from 'ramda';
import type { ReactNode } from 'react';
import type { SelectedServer } from '../servers/data';
import type { SelectedServer } from '../../servers/data';
import type { ShortUrlsOrderableFields } from './data';
import type { ShortUrlsRowType } from './helpers/ShortUrlsRow';
import type { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';

View file

@ -1,7 +1,7 @@
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Modal, ModalBody, ModalHeader } from 'reactstrap';
import { useToggle } from '../utils/helpers/hooks';
import { useToggle } from '../../utils/helpers/hooks';
import './UseExistingIfFoundInfoIcon.scss';
const InfoModal = ({ isOpen, toggle }: { isOpen: boolean; toggle: () => void }) => (

View file

@ -1,6 +1,6 @@
import type { ShlinkVisitsSummary } from '../../api/types';
import type { Order } from '../../utils/helpers/ordering';
import type { Nullable, OptionalString } from '../../utils/utils';
import type { ShlinkVisitsSummary } from '../../../api/types';
import type { Order } from '../../../utils/helpers/ordering';
import type { Nullable, OptionalString } from '../../../utils/utils';
export interface DeviceLongUrls {
android?: OptionalString;

View file

@ -4,9 +4,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useEffect } from 'react';
import CopyToClipboard from 'react-copy-to-clipboard';
import { Tooltip } from 'reactstrap';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import type { TimeoutToggle } from '../../utils/helpers/hooks';
import { Result } from '../../utils/Result';
import { ShlinkApiError } from '../../../api/ShlinkApiError';
import type { TimeoutToggle } from '../../../utils/helpers/hooks';
import { Result } from '../../../utils/Result';
import type { ShortUrlCreation } from '../reducers/shortUrlCreation';
import './CreateShortUrlResult.scss';

View file

@ -1,10 +1,10 @@
import { pipe } from 'ramda';
import { useEffect, useState } from 'react';
import { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import { isInvalidDeletionError } from '../../api/utils';
import { Result } from '../../utils/Result';
import { handleEventPreventingDefault } from '../../utils/utils';
import { ShlinkApiError } from '../../../api/ShlinkApiError';
import { isInvalidDeletionError } from '../../../api/utils';
import { Result } from '../../../utils/Result';
import { handleEventPreventingDefault } from '../../../utils/utils';
import type { ShortUrlIdentifier, ShortUrlModalProps } from '../data';
import type { ShortUrlDeletion } from '../reducers/shortUrlDeletion';

View file

@ -1,11 +1,11 @@
import type { FC } from 'react';
import { useCallback } from 'react';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ReportExporter } from '../../common/services/ReportExporter';
import type { SelectedServer } from '../../servers/data';
import { isServerWithId } from '../../servers/data';
import { ExportBtn } from '../../utils/ExportBtn';
import { useToggle } from '../../utils/helpers/hooks';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ReportExporter } from '../../../common/services/ReportExporter';
import type { SelectedServer } from '../../../servers/data';
import { isServerWithId } from '../../../servers/data';
import { ExportBtn } from '../../../utils/ExportBtn';
import { useToggle } from '../../../utils/helpers/hooks';
import type { ShortUrl } from '../data';
import { useShortUrlsQuery } from './hooks';

View file

@ -3,12 +3,12 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useMemo, useState } from 'react';
import { ExternalLink } from 'react-external-link';
import { Button, FormGroup, Modal, ModalBody, ModalHeader, Row } from 'reactstrap';
import type { ImageDownloader } from '../../common/services/ImageDownloader';
import type { SelectedServer } from '../../servers/data';
import { CopyToClipboardIcon } from '../../utils/CopyToClipboardIcon';
import { useFeature } from '../../utils/helpers/features';
import type { QrCodeFormat, QrErrorCorrection } from '../../utils/helpers/qrCodes';
import { buildQrCodeUrl } from '../../utils/helpers/qrCodes';
import type { ImageDownloader } from '../../../common/services/ImageDownloader';
import type { SelectedServer } from '../../../servers/data';
import { CopyToClipboardIcon } from '../../../utils/CopyToClipboardIcon';
import { useFeature } from '../../../utils/helpers/features';
import type { QrCodeFormat, QrErrorCorrection } from '../../../utils/helpers/qrCodes';
import { buildQrCodeUrl } from '../../../utils/helpers/qrCodes';
import type { ShortUrlModalProps } from '../data';
import { QrErrorCorrectionDropdown } from './qr-codes/QrErrorCorrectionDropdown';
import { QrFormatDropdown } from './qr-codes/QrFormatDropdown';

View file

@ -1,7 +1,7 @@
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import type { SelectedServer, ServerWithId } from '../../servers/data';
import { isServerWithId } from '../../servers/data';
import type { SelectedServer, ServerWithId } from '../../../servers/data';
import { isServerWithId } from '../../../servers/data';
import type { ShortUrl } from '../data';
import { urlEncodeShortCode } from './index';

View file

@ -1,6 +1,6 @@
import type { ChangeEvent, FC, PropsWithChildren } from 'react';
import { Checkbox } from '../../utils/Checkbox';
import { InfoTooltip } from '../../utils/InfoTooltip';
import { Checkbox } from '../../../utils/Checkbox';
import { InfoTooltip } from '../../../utils/InfoTooltip';
type ShortUrlFormCheckboxGroupProps = PropsWithChildren<{
checked?: boolean;

View file

@ -4,8 +4,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { isBefore } from 'date-fns';
import type { FC, ReactNode } from 'react';
import { UncontrolledTooltip } from 'reactstrap';
import { formatHumanFriendly, now, parseISO } from '../../utils/helpers/date';
import { useElementRef } from '../../utils/helpers/hooks';
import { formatHumanFriendly, now, parseISO } from '../../../utils/helpers/date';
import { useElementRef } from '../../../utils/helpers/hooks';
import type { ShortUrl } from '../data';
interface ShortUrlStatusProps {

View file

@ -2,10 +2,10 @@ import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import { UncontrolledTooltip } from 'reactstrap';
import type { SelectedServer } from '../../servers/data';
import { formatHumanFriendly, parseISO } from '../../utils/helpers/date';
import { useElementRef } from '../../utils/helpers/hooks';
import { prettify } from '../../utils/helpers/numbers';
import type { SelectedServer } from '../../../servers/data';
import { formatHumanFriendly, parseISO } from '../../../utils/helpers/date';
import { useElementRef } from '../../../utils/helpers/hooks';
import { prettify } from '../../../utils/helpers/numbers';
import type { ShortUrl } from '../data';
import { ShortUrlDetailLink } from './ShortUrlDetailLink';
import './ShortUrlVisitsCount.scss';

View file

@ -1,6 +1,6 @@
import { DropdownItem } from 'reactstrap';
import { DropdownBtn } from '../../utils/DropdownBtn';
import { hasValue } from '../../utils/utils';
import { DropdownBtn } from '../../../utils/DropdownBtn';
import { hasValue } from '../../../utils/utils';
import type { ShortUrlsFilter } from '../data';
interface ShortUrlsFilterDropdownProps {

View file

@ -1,6 +1,6 @@
@import '../../utils/base';
@import '../../utils/mixins/text-ellipsis';
@import '../../utils/mixins/vertical-align';
@import '../../../utils/base';
@import '../../../utils/mixins/text-ellipsis';
@import '../../../utils/mixins/vertical-align';
.short-urls-row__cell.short-urls-row__cell {
vertical-align: middle !important;

View file

@ -1,12 +1,12 @@
import type { FC } from 'react';
import { useEffect, useRef } from 'react';
import { ExternalLink } from 'react-external-link';
import type { SelectedServer } from '../../servers/data';
import type { Settings } from '../../settings/reducers/settings';
import { CopyToClipboardIcon } from '../../utils/CopyToClipboardIcon';
import { Time } from '../../utils/dates/Time';
import type { TimeoutToggle } from '../../utils/helpers/hooks';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { SelectedServer } from '../../../servers/data';
import type { Settings } from '../../../settings/reducers/settings';
import { CopyToClipboardIcon } from '../../../utils/CopyToClipboardIcon';
import { Time } from '../../../utils/dates/Time';
import type { TimeoutToggle } from '../../../utils/helpers/hooks';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
import type { ShortUrl } from '../data';
import { useShortUrlsQuery } from './hooks';
import type { ShortUrlsRowMenuType } from './ShortUrlsRowMenu';

View file

@ -7,9 +7,9 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
import type { SelectedServer } from '../../servers/data';
import { useToggle } from '../../utils/helpers/hooks';
import { RowDropdownBtn } from '../../utils/RowDropdownBtn';
import type { SelectedServer } from '../../../servers/data';
import { useToggle } from '../../../utils/helpers/hooks';
import { RowDropdownBtn } from '../../../utils/RowDropdownBtn';
import type { ShortUrl, ShortUrlModalProps } from '../data';
import { ShortUrlDetailLink } from './ShortUrlDetailLink';

View file

@ -1,7 +1,7 @@
import { isEmpty } from 'ramda';
import type { FC } from 'react';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
import { Tag } from '../../tags/helpers/Tag';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
interface TagsProps {
tags: string[];

View file

@ -1,11 +1,11 @@
import { isEmpty, pipe } from 'ramda';
import { useMemo } from 'react';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
import type { TagsFilteringMode } from '../../api/types';
import { orderToString, stringToOrder } from '../../utils/helpers/ordering';
import { parseQuery, stringifyQuery } from '../../utils/helpers/query';
import type { BooleanString } from '../../utils/utils';
import { parseOptionalBooleanToString } from '../../utils/utils';
import type { TagsFilteringMode } from '../../../api/types';
import { orderToString, stringToOrder } from '../../../utils/helpers/ordering';
import { parseQuery, stringifyQuery } from '../../../utils/helpers/query';
import type { BooleanString } from '../../../utils/utils';
import { parseOptionalBooleanToString } from '../../../utils/utils';
import type { ShortUrlsOrder, ShortUrlsOrderableFields } from '../data';
interface ShortUrlsQueryCommon {

View file

@ -1,6 +1,6 @@
import { isNil } from 'ramda';
import type { ShortUrlCreationSettings } from '../../settings/reducers/settings';
import type { OptionalString } from '../../utils/utils';
import type { ShortUrlCreationSettings } from '../../../settings/reducers/settings';
import type { OptionalString } from '../../../utils/utils';
import { DEFAULT_DOMAIN } from '../../visits/reducers/domainVisits';
import type { ShortUrl, ShortUrlData } from '../data';

View file

@ -1,7 +1,7 @@
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
import { DropdownBtn } from '../../../utils/DropdownBtn';
import type { QrErrorCorrection } from '../../../utils/helpers/qrCodes';
import { DropdownBtn } from '../../../../utils/DropdownBtn';
import type { QrErrorCorrection } from '../../../../utils/helpers/qrCodes';
interface QrErrorCorrectionDropdownProps {
errorCorrection: QrErrorCorrection;

View file

@ -1,7 +1,7 @@
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
import { DropdownBtn } from '../../../utils/DropdownBtn';
import type { QrCodeFormat } from '../../../utils/helpers/qrCodes';
import { DropdownBtn } from '../../../../utils/DropdownBtn';
import type { QrCodeFormat } from '../../../../utils/helpers/qrCodes';
interface QrFormatDropdownProps {
format: QrCodeFormat;

View file

@ -1,9 +1,9 @@
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import type { ShortUrl, ShortUrlData } from '../data';
const REDUCER_PREFIX = 'shlink/shortUrlCreation';

View file

@ -1,8 +1,8 @@
import { createAction, createSlice } from '@reduxjs/toolkit';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import type { ShortUrl, ShortUrlIdentifier } from '../data';
const REDUCER_PREFIX = 'shlink/shortUrlDeletion';

View file

@ -1,9 +1,9 @@
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import type { ShortUrl, ShortUrlIdentifier } from '../data';
import { shortUrlMatches } from '../helpers';

View file

@ -1,9 +1,9 @@
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import type { EditShortUrlData, ShortUrl, ShortUrlIdentifier } from '../data';
const REDUCER_PREFIX = 'shlink/shortUrlEdition';

View file

@ -1,8 +1,8 @@
import { createSlice } from '@reduxjs/toolkit';
import { assocPath, last, pipe, reject } from 'ramda';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ShlinkShortUrlsListParams, ShlinkShortUrlsResponse } from '../../api/types';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ShlinkShortUrlsListParams, ShlinkShortUrlsResponse } from '../../../api/types';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import { createNewVisits } from '../../visits/reducers/visitCreation';
import type { ShortUrl } from '../data';
import { shortUrlMatches } from '../helpers';

View file

@ -1,6 +1,6 @@
import type Bottle from 'bottlejs';
import { prop } from 'ramda';
import type { ConnectDecorator } from '../../container/types';
import type { ConnectDecorator } from '../../../container/types';
import { CreateShortUrl } from '../CreateShortUrl';
import { EditShortUrl } from '../EditShortUrl';
import { CreateShortUrlResult } from '../helpers/CreateShortUrlResult';

View file

@ -2,16 +2,16 @@ import { pipe } from 'ramda';
import type { FC } from 'react';
import { useEffect, useState } from 'react';
import { Row } from 'reactstrap';
import { ShlinkApiError } from '../api/ShlinkApiError';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { Topics } from '../mercure/helpers/Topics';
import type { SelectedServer } from '../servers/data';
import type { Settings } from '../settings/reducers/settings';
import { determineOrderDir, sortList } from '../utils/helpers/ordering';
import { Message } from '../utils/Message';
import { OrderingDropdown } from '../utils/OrderingDropdown';
import { Result } from '../utils/Result';
import { SearchField } from '../utils/SearchField';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import { boundToMercureHub } from '../../mercure/helpers/boundToMercureHub';
import { Topics } from '../../mercure/helpers/Topics';
import type { SelectedServer } from '../../servers/data';
import type { Settings } from '../../settings/reducers/settings';
import { determineOrderDir, sortList } from '../../utils/helpers/ordering';
import { Message } from '../../utils/Message';
import { OrderingDropdown } from '../../utils/OrderingDropdown';
import { Result } from '../../utils/Result';
import { SearchField } from '../../utils/SearchField';
import type { SimplifiedTag } from './data';
import type { TagsOrder, TagsOrderableFields } from './data/TagsListChildrenProps';
import { TAGS_ORDERABLE_FIELDS } from './data/TagsListChildrenProps';

View file

@ -1,5 +1,5 @@
@import '../utils/base';
@import '../utils/mixins/sticky-cell';
@import '../../utils/base';
@import '../../utils/mixins/sticky-cell';
.tags-table__header-cell.tags-table__header-cell {
@include sticky-cell(false);

View file

@ -2,11 +2,11 @@ import { splitEvery } from 'ramda';
import type { FC } from 'react';
import { useEffect, useRef } from 'react';
import { useLocation } from 'react-router-dom';
import { SimplePaginator } from '../common/SimplePaginator';
import { useQueryState } from '../utils/helpers/hooks';
import { parseQuery } from '../utils/helpers/query';
import { SimpleCard } from '../utils/SimpleCard';
import { TableOrderIcon } from '../utils/table/TableOrderIcon';
import { SimplePaginator } from '../../common/SimplePaginator';
import { useQueryState } from '../../utils/helpers/hooks';
import { parseQuery } from '../../utils/helpers/query';
import { SimpleCard } from '../../utils/SimpleCard';
import { TableOrderIcon } from '../../utils/table/TableOrderIcon';
import type { TagsListChildrenProps, TagsOrder, TagsOrderableFields } from './data/TagsListChildrenProps';
import type { TagsTableRowProps } from './TagsTableRow';
import './TagsTable.scss';

View file

@ -3,12 +3,12 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { DropdownItem } from 'reactstrap';
import type { SelectedServer } from '../servers/data';
import { getServerId } from '../servers/data';
import { useToggle } from '../utils/helpers/hooks';
import { prettify } from '../utils/helpers/numbers';
import { RowDropdownBtn } from '../utils/RowDropdownBtn';
import type { ColorGenerator } from '../utils/services/ColorGenerator';
import type { SelectedServer } from '../../servers/data';
import { getServerId } from '../../servers/data';
import { useToggle } from '../../utils/helpers/hooks';
import { prettify } from '../../utils/helpers/numbers';
import { RowDropdownBtn } from '../../utils/RowDropdownBtn';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { SimplifiedTag, TagModalProps } from './data';
import { TagBullet } from './helpers/TagBullet';

View file

@ -1,5 +1,5 @@
import type { SelectedServer } from '../../servers/data';
import type { Order } from '../../utils/helpers/ordering';
import type { SelectedServer } from '../../../servers/data';
import type { Order } from '../../../utils/helpers/ordering';
import type { SimplifiedTag } from './index';
export const TAGS_ORDERABLE_FIELDS = {

View file

@ -1,4 +1,4 @@
import type { ShlinkTagsStats } from '../../api/types';
import type { ShlinkTagsStats } from '../../../api/types';
export type TagStats = Omit<ShlinkTagsStats, 'tag'>;

View file

@ -1,6 +1,6 @@
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import { Result } from '../../utils/Result';
import { ShlinkApiError } from '../../../api/ShlinkApiError';
import { Result } from '../../../utils/Result';
import type { TagModalProps } from '../data';
import type { TagDeletion } from '../reducers/tagDelete';

View file

@ -4,11 +4,11 @@ import { pipe } from 'ramda';
import { useState } from 'react';
import { HexColorPicker } from 'react-colorful';
import { Button, Input, InputGroup, Modal, ModalBody, ModalFooter, ModalHeader, Popover } from 'reactstrap';
import { ShlinkApiError } from '../../api/ShlinkApiError';
import { useToggle } from '../../utils/helpers/hooks';
import { Result } from '../../utils/Result';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import { handleEventPreventingDefault } from '../../utils/utils';
import { ShlinkApiError } from '../../../api/ShlinkApiError';
import { useToggle } from '../../../utils/helpers/hooks';
import { Result } from '../../../utils/Result';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
import { handleEventPreventingDefault } from '../../../utils/utils';
import type { TagModalProps } from '../data';
import type { EditTag, TagEdition } from '../reducers/tagEdit';
import './EditTagModal.scss';

View file

@ -1,6 +1,6 @@
import classNames from 'classnames';
import type { FC, MouseEventHandler, PropsWithChildren } from 'react';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
import './Tag.scss';
type TagProps = PropsWithChildren<{

View file

@ -1,4 +1,4 @@
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
import './TagBullet.scss';
interface TagBulletProps {

View file

@ -1,8 +1,8 @@
import { useEffect } from 'react';
import type { SuggestionComponentProps, TagComponentProps } from 'react-tag-autocomplete';
import ReactTags from 'react-tag-autocomplete';
import type { Settings } from '../../settings/reducers/settings';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { Settings } from '../../../settings/reducers/settings';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
import type { TagsList } from '../reducers/tagsList';
import { Tag } from './Tag';
import { TagBullet } from './TagBullet';

View file

@ -1,8 +1,8 @@
import { createAction, createSlice } from '@reduxjs/toolkit';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { createAsyncThunk } from '../../../utils/helpers/redux';
const REDUCER_PREFIX = 'shlink/tagDelete';

View file

@ -1,11 +1,11 @@
import type { PayloadAction } from '@reduxjs/toolkit';
import { createAction, createSlice } from '@reduxjs/toolkit';
import { pick } from 'ramda';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import { createAsyncThunk } from '../../utils/helpers/redux';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import type { ColorGenerator } from '../../../utils/services/ColorGenerator';
const REDUCER_PREFIX = 'shlink/tagEdit';

View file

@ -1,12 +1,12 @@
import { createAction, createSlice } from '@reduxjs/toolkit';
import { isEmpty, reject } from 'ramda';
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
import type { ShlinkTags } from '../../api/types';
import type { ProblemDetailsError } from '../../api/types/errors';
import { parseApiError } from '../../api/utils';
import type { ShlinkApiClientBuilder } from '../../../api/services/ShlinkApiClientBuilder';
import type { ShlinkTags } from '../../../api/types';
import type { ProblemDetailsError } from '../../../api/types/errors';
import { parseApiError } from '../../../api/utils';
import { supportedFeatures } from '../../../utils/helpers/features';
import { createAsyncThunk } from '../../../utils/helpers/redux';
import type { createShortUrl } from '../../short-urls/reducers/shortUrlCreation';
import { supportedFeatures } from '../../utils/helpers/features';
import { createAsyncThunk } from '../../utils/helpers/redux';
import { createNewVisits } from '../../visits/reducers/visitCreation';
import type { CreateVisit } from '../../visits/types';
import type { TagStats } from '../data';

View file

@ -1,7 +1,7 @@
import type { IContainer } from 'bottlejs';
import type Bottle from 'bottlejs';
import { prop } from 'ramda';
import type { ConnectDecorator } from '../../container/types';
import type { ConnectDecorator } from '../../../container/types';
import { DeleteTagConfirmModal } from '../helpers/DeleteTagConfirmModal';
import { EditTagModal } from '../helpers/EditTagModal';
import { TagsSelector } from '../helpers/TagsSelector';

View file

@ -1,9 +1,9 @@
import { useParams } from 'react-router-dom';
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 { 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 { DomainVisits as DomainVisitsState, LoadDomainVisits } from './reducers/domainVisits';
import type { NormalizedVisit } from './types';
import type { CommonVisitsProps } from './types/CommonVisitsProps';

View file

@ -1,7 +1,7 @@
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 { boundToMercureHub } from '../../mercure/helpers/boundToMercureHub';
import { Topics } from '../../mercure/helpers/Topics';
import { useGoBack } from '../../utils/helpers/hooks';
import type { LoadVisits, VisitsInfo } from './reducers/types';
import type { NormalizedVisit, VisitsParams } from './types';
import type { CommonVisitsProps } from './types/CommonVisitsProps';

View file

@ -1,7 +1,7 @@
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 { boundToMercureHub } from '../../mercure/helpers/boundToMercureHub';
import { Topics } from '../../mercure/helpers/Topics';
import { useGoBack } from '../../utils/helpers/hooks';
import type { LoadOrphanVisits } from './reducers/orphanVisits';
import type { VisitsInfo } from './reducers/types';
import type { NormalizedVisit, VisitsParams } from './types';

View file

@ -1,13 +1,13 @@
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 { Topics } from '../mercure/helpers/Topics';
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 { parseQuery } from '../../utils/helpers/query';
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 { LoadShortUrlVisits, ShortUrlVisits as ShortUrlVisitsState } from './reducers/shortUrlVisits';
import { ShortUrlVisitsHeader } from './ShortUrlVisitsHeader';
import type { NormalizedVisit, VisitsParams } from './types';

View file

@ -1,7 +1,7 @@
import { ExternalLink } from 'react-external-link';
import { UncontrolledTooltip } from 'reactstrap';
import { Time } from '../../utils/dates/Time';
import type { ShortUrlDetail } from '../short-urls/reducers/shortUrlDetail';
import { Time } from '../utils/dates/Time';
import type { ShortUrlVisits } from './reducers/shortUrlVisits';
import { VisitsHeader } from './VisitsHeader';
import './ShortUrlVisitsHeader.scss';

View file

@ -1,10 +1,10 @@
import { useParams } from 'react-router-dom';
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 { 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 { ColorGenerator } from '../../utils/services/ColorGenerator';
import type { LoadTagVisits, TagVisits as TagVisitsState } from './reducers/tagVisits';
import { TagVisitsHeader } from './TagVisitsHeader';
import type { NormalizedVisit } from './types';

View file

@ -1,5 +1,5 @@
import type { ColorGenerator } from '../../utils/services/ColorGenerator';
import { Tag } from '../tags/helpers/Tag';
import type { ColorGenerator } from '../utils/services/ColorGenerator';
import type { TagVisits } from './reducers/tagVisits';
import { VisitsHeader } from './VisitsHeader';
import './ShortUrlVisitsHeader.scss';

View file

@ -7,16 +7,16 @@ 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 '../api/ShlinkApiError';
import type { Settings } from '../settings/reducers/settings';
import { DateRangeSelector } from '../utils/dates/DateRangeSelector';
import { ExportBtn } from '../utils/ExportBtn';
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 { ShlinkApiError } from '../../api/ShlinkApiError';
import type { Settings } from '../../settings/reducers/settings';
import { DateRangeSelector } from '../../utils/dates/DateRangeSelector';
import { ExportBtn } from '../../utils/ExportBtn';
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';

View file

@ -1,5 +1,5 @@
@import '../utils/base';
@import '../utils/mixins/sticky-cell';
@import '../../utils/base';
@import '../../utils/mixins/sticky-cell';
.visits-table {
margin: 1.5rem 0 0;

View file

@ -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 '../common/SimplePaginator';
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 { SearchField } from '../utils/SearchField';
import { TableOrderIcon } from '../utils/table/TableOrderIcon';
import type { MediaMatcher } from '../utils/types';
import { SimplePaginator } from '../../common/SimplePaginator';
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 { SearchField } from '../../utils/SearchField';
import { TableOrderIcon } from '../../utils/table/TableOrderIcon';
import type { MediaMatcher } from '../../utils/types';
import type { NormalizedOrphanVisit, NormalizedVisit } from './types';
import './VisitsTable.scss';

View file

@ -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 '../../utils/helpers/charts';
import { isDarkThemeEnabled, PRIMARY_DARK_COLOR, PRIMARY_LIGHT_COLOR } from '../../utils/theme';
import { renderPieChartLabel } from '../../../utils/helpers/charts';
import { isDarkThemeEnabled, PRIMARY_DARK_COLOR, PRIMARY_LIGHT_COLOR } from '../../../utils/theme';
import type { Stats } from '../types';
import { DoughnutChartLegend } from './DoughnutChartLegend';

View file

@ -1,4 +1,4 @@
@import '../../utils/base';
@import '../../../utils/base';
.doughnut-chart-legend {
list-style-type: none;

View file

@ -3,11 +3,11 @@ 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 '../../utils/helpers/charts';
import { prettify } from '../../utils/helpers/numbers';
import { fillTheGaps } from '../../utils/helpers/visits';
import { HIGHLIGHTED_COLOR, HIGHLIGHTED_COLOR_ALPHA, MAIN_COLOR, MAIN_COLOR_ALPHA } from '../../utils/theme';
import { pointerOnHover, renderChartLabel } from '../../../utils/helpers/charts';
import { prettify } from '../../../utils/helpers/numbers';
import { HIGHLIGHTED_COLOR, HIGHLIGHTED_COLOR_ALPHA, MAIN_COLOR, MAIN_COLOR_ALPHA } from '../../../utils/theme';
import type { Stats } from '../types';
import { fillTheGaps } from '../utils';
export interface HorizontalBarChartProps {
stats: Stats;

Some files were not shown because too many files have changed in this diff Show more