diff --git a/apps/client/package.json b/apps/client/package.json index aadc5ed14..566c32e1f 100644 --- a/apps/client/package.json +++ b/apps/client/package.json @@ -1,6 +1,6 @@ { "name": "ontime-ui", - "version": "2.0.0-beta", + "version": "2.0.0", "private": true, "dependencies": { "@chakra-ui/react": "^2.5.5", diff --git a/apps/client/src/common/components/buttons/TooltipActionBtn.tsx b/apps/client/src/common/components/buttons/TooltipActionBtn.tsx index 6a954d504..2fcc65f8f 100644 --- a/apps/client/src/common/components/buttons/TooltipActionBtn.tsx +++ b/apps/client/src/common/components/buttons/TooltipActionBtn.tsx @@ -2,7 +2,7 @@ import { MouseEvent } from 'react'; import { IconButton, IconButtonProps, Tooltip } from '@chakra-ui/react'; interface TooltipActionBtnProps extends IconButtonProps { - clickHandler: (event?: MouseEvent) => void; + clickHandler: (event?: MouseEvent) => void | Promise; tooltip: string; openDelay?: number; } diff --git a/apps/client/src/common/components/edit-form-drawer/EditFormInput.tsx b/apps/client/src/common/components/edit-form-drawer/EditFormInput.tsx index 6c2380921..6918c9fdd 100644 --- a/apps/client/src/common/components/edit-form-drawer/EditFormInput.tsx +++ b/apps/client/src/common/components/edit-form-drawer/EditFormInput.tsx @@ -1,7 +1,7 @@ import { useSearchParams } from 'react-router-dom'; import { Input, Select, Switch } from '@chakra-ui/react'; -import { isStringBoolean } from '../../../common/utils/viewUtils'; +import { isStringBoolean } from '../../utils/viewUtils'; import { ParamField } from './types'; diff --git a/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx b/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx index 0fb8bf8fc..5cbb1e595 100644 --- a/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx +++ b/apps/client/src/common/components/error-boundary/ErrorBoundary.jsx @@ -1,5 +1,6 @@ /* eslint-disable react/destructuring-assignment */ import React from 'react'; +// skipcq: JS-C1003 - sentry does not expose itself as an ES Module. import * as Sentry from '@sentry/react'; import style from './ErrorBoundary.module.scss'; diff --git a/apps/client/src/common/components/input/time-input/TimeInput.tsx b/apps/client/src/common/components/input/time-input/TimeInput.tsx index 0be50bdc0..4f50659d7 100644 --- a/apps/client/src/common/components/input/time-input/TimeInput.tsx +++ b/apps/client/src/common/components/input/time-input/TimeInput.tsx @@ -11,6 +11,7 @@ import { TimeEntryField } from '../../../utils/timesManager'; import style from './TimeInput.module.scss'; interface TimeInputProps { + id?: TimeEntryField; name: TimeEntryField; submitHandler: (field: TimeEntryField, value: number) => void; time?: number; @@ -36,7 +37,7 @@ function ButtonTooltip(name: TimeEntryField, warning?: string) { } export default function TimeInput(props: TimeInputProps) { - const { name, submitHandler, time = 0, delay = 0, placeholder, validationHandler, previousEnd = 0, warning } = props; + const { id, name, submitHandler, time = 0, delay = 0, placeholder, validationHandler, previousEnd = 0, warning } = props; const { emitError } = useEmitLog(); const inputRef = useRef(null); const [value, setValue] = useState(''); @@ -189,6 +190,7 @@ export default function TimeInput(props: TimeInputProps) { { const onKeyDown = useCallback( (event: KeyboardEvent) => { const targetKeyPressed = event.key === targetKey && !event.repeat; - if (targetKeyPressed && isDisabled === false) { + if (targetKeyPressed && !isDisabled) { event.preventDefault(); callback(); } diff --git a/apps/client/src/features/editors/Editor.tsx b/apps/client/src/features/editors/Editor.tsx index fe5aaf01d..b195d7d6b 100644 --- a/apps/client/src/features/editors/Editor.tsx +++ b/apps/client/src/features/editors/Editor.tsx @@ -9,11 +9,11 @@ import UploadModal from '../modals/upload-modal/UploadModal'; import styles from './Editor.module.scss'; -const Rundown = lazy(() => import('../../features/rundown/RundownExport')); -const TimerControl = lazy(() => import('../../features/control/playback/TimerControlExport')); -const MessageControl = lazy(() => import('../../features/control/message/MessageControlExport')); -const Info = lazy(() => import('../../features/info/InfoExport')); -const EventEditor = lazy(() => import('../../features/event-editor/EventEditorExport')); +const Rundown = lazy(() => import('../rundown/RundownExport')); +const TimerControl = lazy(() => import('../control/playback/TimerControlExport')); +const MessageControl = lazy(() => import('../control/message/MessageControlExport')); +const Info = lazy(() => import('../info/InfoExport')); +const EventEditor = lazy(() => import('../event-editor/EventEditorExport')); const IntegrationModal = lazy(() => import('../modals/integration-modal/IntegrationModal')); const SettingsModal = lazy(() => import('../modals/settings-modal/SettingsModal')); diff --git a/apps/client/src/features/event-editor/composite/CountedTextArea.tsx b/apps/client/src/features/event-editor/composite/CountedTextArea.tsx index 935b304f9..5fb0a5528 100644 --- a/apps/client/src/features/event-editor/composite/CountedTextArea.tsx +++ b/apps/client/src/features/event-editor/composite/CountedTextArea.tsx @@ -24,10 +24,11 @@ export default function CountedTextArea(props: CountedTextAreaProps) { return (
- + {`${value.length} characters`}