Create src folder for shlink-web-component

This commit is contained in:
Alejandro Celaya 2023-08-02 08:23:48 +02:00
parent b7d57a53f2
commit c48facc863
294 changed files with 347 additions and 347 deletions

View file

@ -4,7 +4,7 @@ import classNames from 'classnames';
import type { FC, ReactNode } from 'react';
import { useEffect } from 'react';
import { Navigate, Route, Routes, useLocation } from 'react-router-dom';
import { useToggle } from '../shlink-frontend-kit/src';
import { useToggle } from '../../shlink-frontend-kit/src';
import { AsideMenu } from './common/AsideMenu';
import { useFeature } from './utils/features';
import { useSwipeable } from './utils/helpers/hooks';

View file

@ -1,4 +1,4 @@
import type { Order } from '../../shlink-frontend-kit/src';
import type { Order } from '../../../shlink-frontend-kit/src';
import type { ShortUrl, ShortUrlMeta } from '../short-urls/data';
import type { Visit } from '../visits/types';

View file

@ -1,5 +1,5 @@
@import '../../src/utils/base';
@import '../../src/utils/mixins/vertical-align';
@import '../../../src/utils/base';
@import '../../../src/utils/mixins/vertical-align';
.aside-menu {
width: $asideMenuWidth;

View file

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

View file

@ -4,7 +4,7 @@ import { isEmpty, pipe } from 'ramda';
import { useEffect } from 'react';
import type { InputProps } from 'reactstrap';
import { Button, DropdownItem, Input, InputGroup, UncontrolledTooltip } from 'reactstrap';
import { DropdownBtn, useToggle } from '../../shlink-frontend-kit/src';
import { DropdownBtn, useToggle } from '../../../shlink-frontend-kit/src';
import type { DomainsList } from './reducers/domainsList';
import './DomainSelector.scss';

View file

@ -1,6 +1,6 @@
import type { FC } from 'react';
import { useEffect } from 'react';
import { Message, Result, SearchField, SimpleCard } from '../../shlink-frontend-kit/src';
import { Message, Result, SearchField, SimpleCard } from '../../../shlink-frontend-kit/src';
import { ShlinkApiError } from '../common/ShlinkApiError';
import { DomainRow } from './DomainRow';
import type { EditDomainRedirects } from './reducers/domainRedirects';

View file

@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { DropdownItem } from 'reactstrap';
import { RowDropdownBtn, useToggle } from '../../../shlink-frontend-kit/src';
import { RowDropdownBtn, useToggle } from '../../../../shlink-frontend-kit/src';
import { useFeature } from '../../utils/features';
import { useRoutesPrefix } from '../../utils/routesPrefix';
import { DEFAULT_DOMAIN } from '../../visits/reducers/domainVisits';

View file

@ -8,7 +8,7 @@ import type { FC } from 'react';
import { useEffect, useState } from 'react';
import { ExternalLink } from 'react-external-link';
import { UncontrolledTooltip } from 'reactstrap';
import { useElementRef } from '../../../shlink-frontend-kit/src';
import { useElementRef } from '../../../../shlink-frontend-kit/src';
import type { MediaMatcher } from '../../utils/types';
import type { DomainStatus } from '../data';

View file

@ -1,8 +1,8 @@
import type { FC } from 'react';
import { useState } from 'react';
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import type { InputFormGroupProps } from '../../../shlink-frontend-kit/src';
import { InputFormGroup } from '../../../shlink-frontend-kit/src';
import type { InputFormGroupProps } from '../../../../shlink-frontend-kit/src';
import { InputFormGroup } from '../../../../shlink-frontend-kit/src';
import type { ShlinkDomain } from '../../api-contract';
import { InfoTooltip } from '../../utils/components/InfoTooltip';
import { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/helpers';

View file

@ -1,4 +1,4 @@
@import '../../../src/utils/base';
@import '../../../../src/utils/base';
.highlight-card.highlight-card {
text-align: center;

View file

@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC, PropsWithChildren, ReactNode } from 'react';
import { Link } from 'react-router-dom';
import { Card, CardText, CardTitle, UncontrolledTooltip } from 'reactstrap';
import { useElementRef } from '../../../shlink-frontend-kit/src';
import { useElementRef } from '../../../../shlink-frontend-kit/src';
import './HighlightCard.scss';
export type HighlightCardProps = PropsWithChildren<{

View file

@ -5,7 +5,7 @@ import { useEffect, useMemo } from 'react';
import { ExternalLink } from 'react-external-link';
import { useLocation, useParams } from 'react-router-dom';
import { Button, Card } from 'reactstrap';
import { Message, Result } from '../../shlink-frontend-kit/src';
import { Message, Result } from '../../../shlink-frontend-kit/src';
import { ShlinkApiError } from '../common/ShlinkApiError';
import { useGoBack } from '../utils/helpers/hooks';
import { parseQuery } from '../utils/helpers/query';

View file

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

View file

@ -8,7 +8,7 @@ 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 { Checkbox, SimpleCard } from '../../shlink-frontend-kit/src';
import { Checkbox, SimpleCard } from '../../../shlink-frontend-kit/src';
import type { DomainSelectorProps } from '../domains/DomainSelector';
import type { TagsSelectorProps } from '../tags/helpers/TagsSelector';
import { IconInput } from '../utils/components/IconInput';

View file

@ -4,8 +4,8 @@ import classNames from 'classnames';
import { isEmpty, pipe } from 'ramda';
import type { FC } from 'react';
import { Button, InputGroup, Row, UncontrolledTooltip } from 'reactstrap';
import type { OrderDir } from '../../shlink-frontend-kit/src';
import { OrderingDropdown, SearchField } from '../../shlink-frontend-kit/src';
import type { OrderDir } from '../../../shlink-frontend-kit/src';
import { OrderingDropdown, SearchField } from '../../../shlink-frontend-kit/src';
import type { TagsSelectorProps } from '../tags/helpers/TagsSelector';
import { DateRangeSelector } from '../utils/dates/DateRangeSelector';
import { formatIsoDate } from '../utils/dates/helpers/date';

View file

@ -2,9 +2,9 @@ import { pipe } from 'ramda';
import { useEffect, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { Card } from 'reactstrap';
import type { OrderDir } from '../../shlink-frontend-kit/src';
import { determineOrderDir } from '../../shlink-frontend-kit/src';
import { DEFAULT_SHORT_URLS_ORDERING } from '../../src/settings/reducers/settings';
import type { OrderDir } from '../../../shlink-frontend-kit/src';
import { determineOrderDir } from '../../../shlink-frontend-kit/src';
import { DEFAULT_SHORT_URLS_ORDERING } from '../../../src/settings/reducers/settings';
import type { ShlinkShortUrlsListParams, ShlinkShortUrlsOrder } from '../api-contract';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { Topics } from '../mercure/helpers/Topics';

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 '../../shlink-frontend-kit/src';
import { useToggle } from '../../../shlink-frontend-kit/src';
import './UseExistingIfFoundInfoIcon.scss';
const InfoModal = ({ isOpen, toggle }: { isOpen: boolean; toggle: () => void }) => (

View file

@ -1,4 +1,4 @@
import type { Order } from '../../../shlink-frontend-kit/src';
import type { Order } from '../../../../shlink-frontend-kit/src';
import type { ShlinkVisitsSummary } from '../../api-contract';
import type { Nullable, OptionalString } from '../../utils/helpers';

View file

@ -4,7 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useEffect } from 'react';
import CopyToClipboard from 'react-copy-to-clipboard';
import { Tooltip } from 'reactstrap';
import { Result } from '../../../shlink-frontend-kit/src';
import { Result } from '../../../../shlink-frontend-kit/src';
import { ShlinkApiError } from '../../common/ShlinkApiError';
import type { TimeoutToggle } from '../../utils/helpers/hooks';
import type { ShortUrlCreation } from '../reducers/shortUrlCreation';

View file

@ -1,7 +1,7 @@
import { pipe } from 'ramda';
import { useEffect, useState } from 'react';
import { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import { Result } from '../../../shlink-frontend-kit/src';
import { Result } from '../../../../shlink-frontend-kit/src';
import { isInvalidDeletionError } from '../../api-contract/utils';
import { ShlinkApiError } from '../../common/ShlinkApiError';
import { handleEventPreventingDefault } from '../../utils/helpers';

View file

@ -1,6 +1,6 @@
import type { FC } from 'react';
import { useCallback } from 'react';
import { useToggle } from '../../../shlink-frontend-kit/src';
import { useToggle } from '../../../../shlink-frontend-kit/src';
import type { ShlinkApiClient } from '../../api-contract';
import { ExportBtn } from '../../utils/components/ExportBtn';
import type { ReportExporter } from '../../utils/services/ReportExporter';

View file

@ -1,5 +1,5 @@
import type { ChangeEvent, FC, PropsWithChildren } from 'react';
import { Checkbox } from '../../../shlink-frontend-kit/src';
import { Checkbox } from '../../../../shlink-frontend-kit/src';
import { InfoTooltip } from '../../utils/components/InfoTooltip';
type ShortUrlFormCheckboxGroupProps = PropsWithChildren<{

View file

@ -4,7 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { isBefore } from 'date-fns';
import type { FC, ReactNode } from 'react';
import { UncontrolledTooltip } from 'reactstrap';
import { useElementRef } from '../../../shlink-frontend-kit/src';
import { useElementRef } from '../../../../shlink-frontend-kit/src';
import { formatHumanFriendly, now, parseISO } from '../../utils/dates/helpers/date';
import type { ShortUrl } from '../data';

View file

@ -2,7 +2,7 @@ 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 { useElementRef } from '../../../shlink-frontend-kit/src';
import { useElementRef } from '../../../../shlink-frontend-kit/src';
import { formatHumanFriendly, parseISO } from '../../utils/dates/helpers/date';
import { prettify } from '../../utils/helpers/numbers';
import type { ShortUrl } from '../data';

View file

@ -1,5 +1,5 @@
import { DropdownItem } from 'reactstrap';
import { DropdownBtn } from '../../../shlink-frontend-kit/src';
import { DropdownBtn } from '../../../../shlink-frontend-kit/src';
import { hasValue } from '../../utils/helpers';
import type { ShortUrlsFilter } from '../data';

View file

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

View file

@ -1,7 +1,7 @@
import type { FC } from 'react';
import { useEffect, useRef } from 'react';
import { ExternalLink } from 'react-external-link';
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
import type { TimeoutToggle } from '../../../../src/utils/helpers/hooks';
import { CopyToClipboardIcon } from '../../utils/components/CopyToClipboardIcon';
import { Time } from '../../utils/dates/Time';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';

View file

@ -7,7 +7,7 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
import { RowDropdownBtn, useToggle } from '../../../shlink-frontend-kit/src';
import { RowDropdownBtn, useToggle } from '../../../../shlink-frontend-kit/src';
import type { ShortUrl, ShortUrlModalProps } from '../data';
import { ShortUrlDetailLink } from './ShortUrlDetailLink';

View file

@ -1,7 +1,7 @@
import { isEmpty, pipe } from 'ramda';
import { useCallback, useMemo } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { orderToString, stringToOrder } from '../../../shlink-frontend-kit/src';
import { orderToString, stringToOrder } from '../../../../shlink-frontend-kit/src';
import type { TagsFilteringMode } from '../../api-contract';
import type { BooleanString } from '../../utils/helpers';
import { parseOptionalBooleanToString } from '../../utils/helpers';

View file

@ -1,6 +1,6 @@
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
import { DropdownBtn } from '../../../../shlink-frontend-kit/src';
import { DropdownBtn } from '../../../../../shlink-frontend-kit/src';
import type { QrErrorCorrection } from '../../../utils/helpers/qrCodes';
interface QrErrorCorrectionDropdownProps {

View file

@ -1,6 +1,6 @@
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
import { DropdownBtn } from '../../../../shlink-frontend-kit/src';
import { DropdownBtn } from '../../../../../shlink-frontend-kit/src';
import type { QrCodeFormat } from '../../../utils/helpers/qrCodes';
interface QrFormatDropdownProps {

View file

@ -2,7 +2,7 @@ import { pipe } from 'ramda';
import type { FC } from 'react';
import { useEffect, useState } from 'react';
import { Row } from 'reactstrap';
import { determineOrderDir, Message, OrderingDropdown, Result, SearchField, sortList } from '../../shlink-frontend-kit/src';
import { determineOrderDir, Message, OrderingDropdown, Result, SearchField, sortList } from '../../../shlink-frontend-kit/src';
import { ShlinkApiError } from '../common/ShlinkApiError';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { Topics } from '../mercure/helpers/Topics';

View file

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

View file

@ -2,7 +2,7 @@ import { splitEvery } from 'ramda';
import type { FC } from 'react';
import { useEffect, useRef } from 'react';
import { useLocation } from 'react-router-dom';
import { SimpleCard } from '../../shlink-frontend-kit/src';
import { SimpleCard } from '../../../shlink-frontend-kit/src';
import { SimplePaginator } from '../utils/components/SimplePaginator';
import { useQueryState } from '../utils/helpers/hooks';
import { parseQuery } from '../utils/helpers/query';

View file

@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { DropdownItem } from 'reactstrap';
import { RowDropdownBtn, useToggle } from '../../shlink-frontend-kit/src';
import { RowDropdownBtn, useToggle } from '../../../shlink-frontend-kit/src';
import { prettify } from '../utils/helpers/numbers';
import { useRoutesPrefix } from '../utils/routesPrefix';
import type { ColorGenerator } from '../utils/services/ColorGenerator';

View file

@ -1,4 +1,4 @@
import type { Order } from '../../../shlink-frontend-kit/src';
import type { Order } from '../../../../shlink-frontend-kit/src';
import type { SimplifiedTag } from './index';
export const TAGS_ORDERABLE_FIELDS = {

View file

@ -1,5 +1,5 @@
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import { Result } from '../../../shlink-frontend-kit/src';
import { Result } from '../../../../shlink-frontend-kit/src';
import { ShlinkApiError } from '../../common/ShlinkApiError';
import type { TagModalProps } from '../data';
import type { TagDeletion } from '../reducers/tagDelete';

View file

@ -4,7 +4,7 @@ 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 { Result, useToggle } from '../../../shlink-frontend-kit/src';
import { Result, useToggle } from '../../../../shlink-frontend-kit/src';
import { ShlinkApiError } from '../../common/ShlinkApiError';
import { handleEventPreventingDefault } from '../../utils/helpers';
import type { ColorGenerator } from '../../utils/services/ColorGenerator';

View file

@ -1,5 +1,5 @@
@import '../../../src/utils/mixins/vertical-align';
@import '../../../src/utils/base';
@import '../../../../src/utils/mixins/vertical-align';
@import '../../../../src/utils/base';
.icon-input-container {
position: relative;

View file

@ -4,7 +4,7 @@ import classNames from 'classnames';
import type { FC } from 'react';
import type { InputProps } from 'reactstrap';
import { Input } from 'reactstrap';
import { useElementRef } from '../../../shlink-frontend-kit/src';
import { useElementRef } from '../../../../shlink-frontend-kit/src';
import './IconInput.scss';
type IconInputProps = InputProps & {

View file

@ -3,7 +3,7 @@ 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 '../../../shlink-frontend-kit/src';
import { useElementRef } from '../../../../shlink-frontend-kit/src';
export type InfoTooltipProps = PropsWithChildren<{
className?: string;

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