mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 22:31:52 +00:00
Ordered imports alphabetically
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { ChangeEvent, FC, PropsWithChildren } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { identity } from 'ramda';
|
||||
import type { ChangeEvent, FC, PropsWithChildren } from 'react';
|
||||
import { useDomId } from './helpers/hooks';
|
||||
|
||||
export type BooleanControlProps = PropsWithChildren<{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { FC } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faCopy as copyIcon } from '@fortawesome/free-regular-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { FC } from 'react';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import './CopyToClipboardIcon.scss';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { faEllipsisV as menuIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { ButtonDropdown, DropdownMenu, DropdownToggle } from 'reactstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faEllipsisV as menuIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import './DropdownBtnMenu.scss';
|
||||
|
||||
export type DropdownBtnMenuProps = PropsWithChildren<{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { faFileCsv } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { FC } from 'react';
|
||||
import type { ButtonProps } from 'reactstrap';
|
||||
import { Button } from 'reactstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faFileCsv } from '@fortawesome/free-solid-svg-icons';
|
||||
import { prettify } from './helpers/numbers';
|
||||
|
||||
interface ExportBtnProps extends Omit<ButtonProps, 'outline' | 'color' | 'disabled'> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { Placement } from '@popperjs/core';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { useElementRef } from './helpers/hooks';
|
||||
|
||||
export type InfoTooltipProps = PropsWithChildren<{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { Card, Row } from 'reactstrap';
|
||||
import classNames from 'classnames';
|
||||
import { faCircleNotch as preloader } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import classNames from 'classnames';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { Card, Row } from 'reactstrap';
|
||||
|
||||
type MessageType = 'default' | 'error';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { Children, isValidElement } from 'react';
|
||||
import { Card, Nav, NavLink } from 'reactstrap';
|
||||
import { NavLink as RouterNavLink } from 'react-router-dom';
|
||||
import { Card, Nav, NavLink } from 'reactstrap';
|
||||
import './NavPills.scss';
|
||||
|
||||
type NavPillsProps = PropsWithChildren<{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
||||
import { toPairs } from 'ramda';
|
||||
import { faSortAmountDown as sortDescIcon, faSortAmountUp as sortAscIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faSortAmountUp as sortAscIcon, faSortAmountDown as sortDescIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import classNames from 'classnames';
|
||||
import { toPairs } from 'ramda';
|
||||
import { DropdownItem, DropdownMenu, DropdownToggle, UncontrolledDropdown } from 'reactstrap';
|
||||
import type { Order, OrderDir } from './helpers/ordering';
|
||||
import { determineOrderDir } from './helpers/ordering';
|
||||
import './OrderingDropdown.scss';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import classNames from 'classnames';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { Row } from 'reactstrap';
|
||||
import classNames from 'classnames';
|
||||
import { SimpleCard } from './SimpleCard';
|
||||
|
||||
export type ResultType = 'success' | 'error' | 'warning';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faSearch as searchIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import classNames from 'classnames';
|
||||
import { useState } from 'react';
|
||||
import './SearchField.scss';
|
||||
|
||||
const DEFAULT_SEARCH_INTERVAL = 500;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import type { CardProps } from 'reactstrap';
|
||||
import { Card, CardBody, CardHeader } from 'reactstrap';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
interface SimpleCardProps extends Omit<CardProps, 'title'> {
|
||||
title?: ReactNode;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useRef } from 'react';
|
||||
import { faCalendarAlt as calendarIcon } from '@fortawesome/free-regular-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import classNames from 'classnames';
|
||||
import { isNil } from 'ramda';
|
||||
import { useRef } from 'react';
|
||||
import type { ReactDatePickerProps } from 'react-datepicker';
|
||||
import DatePicker from 'react-datepicker';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faCalendarAlt as calendarIcon } from '@fortawesome/free-regular-svg-icons';
|
||||
import classNames from 'classnames';
|
||||
import { STANDARD_DATE_FORMAT } from '../helpers/date';
|
||||
import './DateInput.scss';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import type { FC } from 'react';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import type { DateInterval } from '../helpers/dateIntervals';
|
||||
import { DATE_INTERVALS, rangeOrIntervalToString } from '../helpers/dateIntervals';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { endOfDay } from 'date-fns';
|
||||
import { DateInput } from './DateInput';
|
||||
import type { DateRange } from '../helpers/dateIntervals';
|
||||
import { DateInput } from './DateInput';
|
||||
|
||||
interface DateRangeRowProps extends DateRange {
|
||||
onStartDateChange: (date: Date | null) => void;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { useState } from 'react';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import { DropdownBtn } from '../DropdownBtn';
|
||||
import { useEffectExceptFirstTime } from '../helpers/hooks';
|
||||
import type {
|
||||
DateInterval,
|
||||
DateRange } from '../helpers/dateIntervals';
|
||||
import {
|
||||
rangeOrIntervalToString,
|
||||
ALL,
|
||||
dateRangeIsEmpty,
|
||||
intervalToDateRange,
|
||||
rangeIsInterval,
|
||||
dateRangeIsEmpty,
|
||||
ALL,
|
||||
rangeOrIntervalToString,
|
||||
} from '../helpers/dateIntervals';
|
||||
import { DateRangeRow } from './DateRangeRow';
|
||||
import { useEffectExceptFirstTime } from '../helpers/hooks';
|
||||
import { DateIntervalDropdownItems } from './DateIntervalDropdownItems';
|
||||
import { DateRangeRow } from './DateRangeRow';
|
||||
|
||||
export interface DateRangeSelectorProps {
|
||||
initialDateRange?: DateInterval | DateRange;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ReactDatePickerProps } from 'react-datepicker';
|
||||
import type { FC } from 'react';
|
||||
import { DateInput } from './DateInput';
|
||||
import type { ReactDatePickerProps } from 'react-datepicker';
|
||||
import { STANDARD_DATE_AND_TIME_FORMAT } from '../helpers/date';
|
||||
import { DateInput } from './DateInput';
|
||||
|
||||
export type DateTimeInputProps = Omit<ReactDatePickerProps, 'showTimeSelect' | 'dateFormat' | 'timeIntervals'>;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { parseISO, format as formatDate, getUnixTime, formatDistance } from 'date-fns';
|
||||
import { format as formatDate, formatDistance, getUnixTime, parseISO } from 'date-fns';
|
||||
import { isDateObject, now, STANDARD_DATE_AND_TIME_FORMAT } from '../helpers/date';
|
||||
|
||||
export interface TimeProps {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import type { InputType } from 'reactstrap/types/lib/Input';
|
||||
import { LabeledFormGroup } from './LabeledFormGroup';
|
||||
import { useDomId } from '../helpers/hooks';
|
||||
import { LabeledFormGroup } from './LabeledFormGroup';
|
||||
|
||||
export type InputFormGroupProps = PropsWithChildren<{
|
||||
value: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import csv from 'csvtojson';
|
||||
import { Parser } from '@json2csv/plainjs';
|
||||
import csv from 'csvtojson';
|
||||
|
||||
export const csvToJson = <T>(csvContent: string) => new Promise<T[]>((resolve) => {
|
||||
csv().fromString(csvContent).then(resolve);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { subDays, startOfDay, endOfDay } from 'date-fns';
|
||||
import { endOfDay, startOfDay, subDays } from 'date-fns';
|
||||
import { cond, filter, isEmpty, T } from 'ramda';
|
||||
import { equals } from '../utils';
|
||||
import type { DateOrString } from './date';
|
||||
import { dateOrNull, formatInternational, isBeforeOrEqual, now, parseISO } from './date';
|
||||
import { equals } from '../utils';
|
||||
|
||||
export interface DateRange {
|
||||
startDate?: Date | null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { DependencyList, EffectCallback } from 'react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useSwipeable as useReactSwipeable } from 'react-swipeable';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useSwipeable as useReactSwipeable } from 'react-swipeable';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { parseQuery, stringifyQuery } from './query';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import L from 'leaflet';
|
||||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
|
||||
import marker from 'leaflet/dist/images/marker-icon.png';
|
||||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
|
||||
import markerShadow from 'leaflet/dist/images/marker-shadow.png';
|
||||
|
||||
export const fixLeafletIcons = () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import bowser from 'bowser';
|
||||
import { zipObj } from 'ramda';
|
||||
import type { Stats, UserAgent } from '../../visits/types';
|
||||
import type { Empty } from '../utils';
|
||||
import { hasValue } from '../utils';
|
||||
import type { Stats, UserAgent } from '../../visits/types';
|
||||
|
||||
const DEFAULT = 'Others';
|
||||
const BROWSERS_WHITELIST = [
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type Bottle from 'bottlejs';
|
||||
import { useTimeoutToggle } from '../helpers/hooks';
|
||||
import { LocalStorage } from './LocalStorage';
|
||||
import { ColorGenerator } from './ColorGenerator';
|
||||
import { csvToJson, jsonToCsv } from '../helpers/csvjson';
|
||||
import { useTimeoutToggle } from '../helpers/hooks';
|
||||
import { ColorGenerator } from './ColorGenerator';
|
||||
import { LocalStorage } from './LocalStorage';
|
||||
|
||||
const provideServices = (bottle: Bottle) => {
|
||||
bottle.constant('localStorage', window.localStorage);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faCaretDown as caretDownIcon, faCaretUp as caretUpIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import type { Order } from '../helpers/ordering';
|
||||
|
||||
interface TableOrderIconProps<T> {
|
||||
|
||||
Reference in New Issue
Block a user