Update import paths for FunctionsTypes

This commit is contained in:
Simon Larsen 2024-02-27 15:18:22 +00:00
parent 31875081e5
commit 35744b938f
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
45 changed files with 46 additions and 46 deletions

View File

@ -10,7 +10,7 @@ import Navigation from 'CommonUI/src/Utils/Navigation';
import { ACCOUNTS_URL } from 'CommonUI/src/Config';
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
const Logout: FunctionComponent = (): ReactElement => {
const [error, setError] = React.useState<string | null>(null);

View File

@ -22,7 +22,7 @@ import AdminModelAPI from '../../../Utils/ModelAPI';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
const Settings: FunctionComponent = (): ReactElement => {
const [showKeyModal, setShowKeyModal] = useState<boolean>(false);

View File

@ -5,7 +5,7 @@ import IconProp from 'Common/Types/Icon/IconProp';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
interface ActionButtonSchema {
title: string;

View File

@ -31,7 +31,7 @@ import useAsyncEffect from 'use-async-effect';
import API from '../../Utils/API/API';
import ErrorMessage from '../ErrorMessage/ErrorMessage';
import { FormikErrors, FormikProps } from 'formik';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
export type FormProps<T> = FormikProps<T>;
export type FormErrors<T> = FormikErrors<T>;

View File

@ -5,7 +5,7 @@ import ModelAPI, { RequestOptions } from '../../Utils/ModelAPI/ModelAPI';
import API from '../../Utils/API/API';
import IconProp from 'Common/Types/Icon/IconProp';
import HeaderAlert from './HeaderAlert';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps<TBaseModel extends BaseModel> {
icon: IconProp;

View File

@ -3,7 +3,7 @@ import React, { FunctionComponent, ReactElement, Ref } from 'react';
import LogItem from './LogItem';
import LogsFilters, { FilterOption } from './LogsFilters';
import ComponentLoader from '../ComponentLoader/ComponentLoader';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps {
logs: Array<Log>;

View File

@ -6,7 +6,7 @@ import { ButtonStyleType } from '../Button/Button';
import Card from '../Card/Card';
import API from '../../Utils/API/API';
import IconProp from 'Common/Types/Icon/IconProp';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import ConfirmModal from '../Modal/ConfirmModal';
export interface ComponentProps<TBaseModel extends BaseModel> {

View File

@ -17,7 +17,7 @@ import API from '../../Utils/API/API';
import ErrorMessage from '../ErrorMessage/ErrorMessage';
import { useAsyncEffect } from 'use-async-effect';
import User from '../../Utils/User';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps<TBaseModel extends BaseModel> {
modelType: { new (): TBaseModel };

View File

@ -7,7 +7,7 @@ import ModelAPI, {
ListResult,
RequestOptions,
} from '../../Utils/ModelAPI/ModelAPI';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import { LIMIT_PER_PROJECT } from 'Common/Types/Database/LimitMax';
import Select from '../../Utils/BaseDatabase/Select';
import Input from '../Input/Input';

View File

@ -7,7 +7,7 @@ import ComponentLoader from '../ComponentLoader/ComponentLoader';
import ErrorMessage from '../ErrorMessage/ErrorMessage';
import ProgressBar from '../ProgressBar/ProgressBar';
import API from '../../Utils/API/API';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps<TBaseModel extends BaseModel> {
title: string;

View File

@ -9,7 +9,7 @@ import Columns from './Columns';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import Table from '../Table/Table';
import TableColumn from '../Table/Types/Column';
import { JSONObject } from 'Common/Types/JSON';
@ -72,7 +72,7 @@ import AnalyticsBaseModel, {
} from 'Common/AnalyticsModels/BaseModel';
import Sort from '../../Utils/BaseDatabase/Sort';
import { FormProps } from '../Forms/BasicForm';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import { GetReactElementFunction } from '../../Types/Functions';
export enum ShowTableAs {

View File

@ -8,7 +8,7 @@ import { ButtonStyleType } from '../Button/Button';
import IconProp from 'Common/Types/Icon/IconProp';
import ConfirmModal from '../Modal/ConfirmModal';
import { TableColumnMetadata } from 'Common/Types/Database/TableColumn';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps<TBaseModel extends BaseModel> {
modelType: { new (): TBaseModel };

View File

@ -7,7 +7,7 @@ import { BadgeType } from '../Badge/Badge';
import SideMenuItem from './SideMenuItem';
import API from '../../Utils/API/API';
import IconProp from 'Common/Types/Icon/IconProp';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps<TBaseModel extends BaseModel> {
link: Link;

View File

@ -5,7 +5,7 @@ import React, {
useEffect,
useState,
} from 'react';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
import ReactFlow, {
MiniMap,
Controls,

View File

@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';

View File

@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';

View File

@ -30,7 +30,7 @@ import Incident from 'Model/Models/Incident';
import OneUptimeDate from 'Common/Types/Date';
import HeaderModelAlert from 'CommonUI/src/Components/HeaderAlert/HeaderModelAlert';
import HeaderAlert from 'CommonUI/src/Components/HeaderAlert/HeaderAlert';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps {
projects: Array<Project>;

View File

@ -19,7 +19,7 @@ import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
import LocalStorage from 'CommonUI/src/Utils/LocalStorage';
import { JSONValue } from 'Common/Types/JSON';
import { GetReactElementFunction } from 'CommonUI/src/Types/Functions';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps {
projects: Array<Project>;

View File

@ -18,7 +18,7 @@ import Search from 'Common/Types/BaseDatabase/Search';
import InBetween from 'Common/Types/BaseDatabase/InBetween';
import Select from 'CommonUI/src/Utils/BaseDatabase/Select';
import Includes from 'Common/Types/BaseDatabase/Includes';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps {
id: string;

View File

@ -11,7 +11,7 @@ import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble';
import Color from 'Common/Types/Color';
import MonitorGroup from 'Model/Models/MonitorGroup';
import Loader from 'CommonUI/src/Components/Loader/Loader';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps {
monitorGroupId: ObjectID;

View File

@ -8,7 +8,7 @@ import IconProp from 'Common/Types/Icon/IconProp';
import PageMap from '../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import URL from 'Common/Types/API/URL';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
export interface ComponentProps {
show: boolean;

View File

@ -10,7 +10,7 @@ import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import { JSONObject } from 'Common/Types/JSON';
import URL from 'Common/Types/API/URL';
import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal';

View File

@ -11,7 +11,7 @@ import { JSONObject } from 'Common/Types/JSON';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import URL from 'Common/Types/API/URL';
import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal';
import HTTPResponse from 'Common/Types/API/HTTPResponse';

View File

@ -12,7 +12,7 @@ import URL from 'Common/Types/API/URL';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';

View File

@ -12,7 +12,7 @@ import IncidentView from '../../../Components/Incident/Incident';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import Incident from 'Model/Models/Incident';
import OnCallDutyPolicyStatus from 'Common/Types/OnCallDutyPolicy/OnCallDutyPolicyStatus';
import UserElement from '../../../Components/User/User';

View File

@ -15,7 +15,7 @@ import EscalationRule from '../EscalationRule/EscalationRule';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import OnCallDutyPolicyEscalationRule from 'Model/Models/OnCallDutyPolicyEscalationRule';
import ObjectID from 'Common/Types/ObjectID';
import DropdownUtil from 'CommonUI/src/Utils/Dropdown';

View File

@ -14,7 +14,7 @@ import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import { LIMIT_PER_PROJECT } from 'Common/Types/Database/LimitMax';
import SortOrder from 'Common/Types/BaseDatabase/SortOrder';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import { JSONArray, JSONObject } from 'Common/Types/JSON';
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';

View File

@ -16,7 +16,7 @@ import ObjectID from 'Common/Types/ObjectID';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import GlobalEvents from 'CommonUI/src/Utils/GlobalEvents';
import EventName from '../../Utils/EventName';
import Navigation from 'CommonUI/src/Utils/Navigation';

View File

@ -16,7 +16,7 @@ import { JSONObject } from 'Common/Types/JSON';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import ObjectID from 'Common/Types/ObjectID';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';

View File

@ -10,7 +10,7 @@ import Probe from 'Model/Models/Probe';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import { JSONObject } from 'Common/Types/JSON';

View File

@ -22,7 +22,7 @@ import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
const StatusPageDelete: FunctionComponent<PageComponentProps> = (
props: PageComponentProps

View File

@ -33,7 +33,7 @@ import Link from 'CommonUI/src/Components/Link/Link';
import MonitorGroupElement from '../../../Components/MonitorGroup/MonitorGroupElement';
import DropdownUtil from 'CommonUI/src/Utils/Dropdown';
import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
const StatusPageDelete: FunctionComponent<PageComponentProps> = (
props: PageComponentProps

View File

@ -6,7 +6,7 @@ import React, {
useState,
} from 'react';
import PageComponentProps from '../../PageComponentProps';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import DashboardNavigation from '../../../Utils/Navigation';
import ObjectID from 'Common/Types/ObjectID';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';

View File

@ -26,7 +26,7 @@ import ObjectID from 'Common/Types/ObjectID';
import StatusPage from 'Model/Models/StatusPage';
import BadDataException from 'Common/Types/Exception/BadDataException';
import Banner from 'CommonUI/src/Components/Banner/Banner';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
const SSOPage: FunctionComponent<PageComponentProps> = (
props: PageComponentProps

View File

@ -24,7 +24,7 @@ import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import DashboardNavigation from '../../../../../../Utils/Navigation';
import { GanttChartBar } from 'CommonUI/src/Components/GanttChart/Bar/Index';
import { GanttChartRow } from 'CommonUI/src/Components/GanttChart/Row/Index';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
type BarTooltipFunctionProps = {
span: Span;

View File

@ -25,7 +25,7 @@ import DropdownUtil from 'CommonUI/src/Utils/Dropdown';
import {
ErrorFunction,
VoidFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
const Settings: FunctionComponent<PageComponentProps> = (
_props: PageComponentProps

View File

@ -24,7 +24,7 @@ import { GetReactElementFunction } from 'CommonUI/src/Types/Functions';
import {
VoidFunction,
ErrorFunction,
} from 'Common/Types/Functions';
} from 'Common/Types/FunctionsTypes';
const Settings: FunctionComponent<PageComponentProps> = (
_props: PageComponentProps

View File

@ -10,7 +10,7 @@ import Sleep from 'Common/Types/Sleep';
import BadDataException from 'Common/Types/Exception/BadDataException';
import Port from 'Common/Types/Port';
import UnableToReachServer from 'Common/Types/Exception/UnableToReachServer';
import { PromiseRejectErrorFunction } from 'Common/Types/Functions';
import { PromiseRejectErrorFunction } from 'Common/Types/FunctionsTypes';
// TODO - make sure it work for the IPV6
export interface PortMonitorResponse {

View File

@ -3,7 +3,7 @@
import BillingService from 'CommonServer/Services/BillingService';
import Sleep from 'Common/Types/Sleep';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
const main: PromiseVoidFunction = async (): Promise<void> => {
for (let i: number = 0; i < 2000; i++) {

View File

@ -37,7 +37,7 @@ import ObjectID from 'Common/Types/ObjectID';
import Logout from './Pages/Accounts/Logout';
import StatusPageUtil from './Utils/StatusPage';
import UpdateSubscription from './Pages/Subscribe/UpdateSubscription';
import { VoidFunction } from 'Common/Types/Functions';
import { VoidFunction } from 'Common/Types/FunctionsTypes';
const App: () => JSX.Element = () => {
Navigation.setNavigateHook(useNavigate());

View File

@ -7,7 +7,7 @@ import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import StatusPageUtil from '../../Utils/StatusPage';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import Route from 'Common/Types/API/Route';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
const Logout: () => JSX.Element = () => {
const [error, setError] = React.useState<string | null>(null);

View File

@ -54,7 +54,7 @@ import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
import { STATUS_PAGE_API_URL } from '../../Utils/Config';
import Section from '../../Components/Section/Section';
import StatusPageHistoryChartBarColorRule from 'Model/Models/StatusPageHistoryChartBarColorRule';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
const Overview: FunctionComponent<PageComponentProps> = (
props: PageComponentProps

View File

@ -5,7 +5,7 @@ import React, {
useState,
} from 'react';
import Page from '../../Components/Page/Page';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import ModelForm, {
FormType,
ModelField,

View File

@ -5,7 +5,7 @@ import React, {
useState,
} from 'react';
import Page from '../../Components/Page/Page';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
import ModelForm, {
FormType,
ModelField,

View File

@ -27,7 +27,7 @@ import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import SubscriberUtil from 'CommonUI/src/Utils/StatusPage';
import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues';
import Navigation from 'CommonUI/src/Utils/Navigation';
import { PromiseVoidFunction } from 'Common/Types/Functions';
import { PromiseVoidFunction } from 'Common/Types/FunctionsTypes';
const SubscribePage: FunctionComponent<SubscribePageProps> = (
props: SubscribePageProps