diff --git a/apps/client/src/common/components/view-params-editor/ParamInput.tsx b/apps/client/src/common/components/view-params-editor/ParamInput.tsx index 9754efb99..0578f0a91 100644 --- a/apps/client/src/common/components/view-params-editor/ParamInput.tsx +++ b/apps/client/src/common/components/view-params-editor/ParamInput.tsx @@ -1,7 +1,7 @@ import { ComponentProps, useEffect, useState } from 'react'; import { useSearchParams } from 'react-router'; -import { isStringBoolean } from '../../../features/viewers/common/viewUtils'; +import { isStringBoolean } from '../../../views/common/viewUtils'; import Checkbox from '../checkbox/Checkbox'; import Input from '../input/input/Input'; import Select, { SelectOption } from '../select/Select'; diff --git a/apps/client/src/features/operator/operator-event/OperatorEvent.tsx b/apps/client/src/features/operator/operator-event/OperatorEvent.tsx index 487005150..30bf6cc2a 100644 --- a/apps/client/src/features/operator/operator-event/OperatorEvent.tsx +++ b/apps/client/src/features/operator/operator-event/OperatorEvent.tsx @@ -5,8 +5,8 @@ import DelayIndicator from '../../../common/components/delay-indicator/DelayIndi import { useLongPress } from '../../../common/hooks/useLongPress'; import { cx, getAccessibleColour } from '../../../common/utils/styleUtils'; import { formatDuration, formatTime, useTimeUntilExpectedStart } from '../../../common/utils/time'; -import RunningTime from '../../viewers/common/running-time/RunningTime'; -import SuperscriptPeriod from '../../viewers/common/superscript-time/SuperscriptPeriod'; +import RunningTime from '../../../views/common/running-time/RunningTime'; +import SuperscriptPeriod from '../../../views/common/superscript-time/SuperscriptPeriod'; import type { EditEvent, Subscribed } from '../operator.types'; import style from './OperatorEvent.module.scss'; diff --git a/apps/client/src/features/operator/operator.options.tsx b/apps/client/src/features/operator/operator.options.tsx index 0561c90f0..cfd49e4c5 100644 --- a/apps/client/src/features/operator/operator.options.tsx +++ b/apps/client/src/features/operator/operator.options.tsx @@ -10,7 +10,7 @@ import { makeOptionsFromCustomFields, } from '../../common/components/view-params-editor/viewParams.utils'; import { PresetContext } from '../../common/context/PresetContext'; -import { isStringBoolean } from '../viewers/common/viewUtils'; +import { isStringBoolean } from '../../views/common/viewUtils'; export const getOperatorOptions = (customFields: CustomFields, timeFormat: string): ViewOption[] => { const fieldOptions = makeOptionsFromCustomFields(customFields, [ diff --git a/apps/client/src/features/operator/operator.utils.ts b/apps/client/src/features/operator/operator.utils.ts index 05056b581..e0b5c8103 100644 --- a/apps/client/src/features/operator/operator.utils.ts +++ b/apps/client/src/features/operator/operator.utils.ts @@ -1,6 +1,6 @@ import { CustomFields, MaybeString, OntimeEvent } from 'ontime-types'; -import { getPropertyValue } from '../viewers/common/viewUtils'; +import { getPropertyValue } from '../../views/common/viewUtils'; import type { Subscribed } from './operator.types'; diff --git a/apps/client/src/features/overview/composite/TimeElements.tsx b/apps/client/src/features/overview/composite/TimeElements.tsx index 19d48e8b7..97948881a 100644 --- a/apps/client/src/features/overview/composite/TimeElements.tsx +++ b/apps/client/src/features/overview/composite/TimeElements.tsx @@ -28,7 +28,7 @@ import { useEntry } from '../../../common/hooks-query/useRundown'; import { getOffsetState, getOffsetText } from '../../../common/utils/offset'; import { cx, enDash, timerPlaceholder } from '../../../common/utils/styleUtils'; import { formatTime } from '../../../common/utils/time'; -import SuperscriptPeriod from '../../viewers/common/superscript-time/SuperscriptPeriod'; +import SuperscriptPeriod from '../../../views/common/superscript-time/SuperscriptPeriod'; import { calculateEndAndDaySpan, formatDueTime } from '../overview.utils'; import { OverUnder, TimeColumn, WrappedInTimeColumn } from './TimeLayout'; diff --git a/apps/client/src/views/backstage/Backstage.tsx b/apps/client/src/views/backstage/Backstage.tsx index 8ad0daf43..b7c38e4f7 100644 --- a/apps/client/src/views/backstage/Backstage.tsx +++ b/apps/client/src/views/backstage/Backstage.tsx @@ -14,10 +14,10 @@ import { useBackstageSocket, useClock } from '../../common/hooks/useSocket'; import { useWindowTitle } from '../../common/hooks/useWindowTitle'; import { cx, timerPlaceholderMin } from '../../common/utils/styleUtils'; import { formatTime, getDefaultFormat } from '../../common/utils/time'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; import { useTranslation } from '../../translation/TranslationProvider'; import Loader from '../common/loader/Loader'; import ScheduleExport from '../common/schedule/ScheduleExport'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; import { getBackstageOptions, useBackstageOptions } from './backstage.options'; import { getCardData, getIsPendingStart, getShowProgressBar, isOvertime } from './backstage.utils'; diff --git a/apps/client/src/views/backstage/backstage.utils.ts b/apps/client/src/views/backstage/backstage.utils.ts index 7e5e5992a..e9d272b11 100644 --- a/apps/client/src/views/backstage/backstage.utils.ts +++ b/apps/client/src/views/backstage/backstage.utils.ts @@ -1,7 +1,7 @@ import { MaybeNumber, OntimeEvent, Playback, TimerPhase } from 'ontime-types'; import { enDash } from '../../common/utils/styleUtils'; -import { getPropertyValue } from '../../features/viewers/common/viewUtils'; +import { getPropertyValue } from '../common/viewUtils'; /** * Whether the current time is in overtime diff --git a/apps/client/src/features/viewers/common/clock-time/ClockTime.tsx b/apps/client/src/views/common/clock-time/ClockTime.tsx similarity index 85% rename from apps/client/src/features/viewers/common/clock-time/ClockTime.tsx rename to apps/client/src/views/common/clock-time/ClockTime.tsx index 4db7e4d99..01ecf72a8 100644 --- a/apps/client/src/features/viewers/common/clock-time/ClockTime.tsx +++ b/apps/client/src/views/common/clock-time/ClockTime.tsx @@ -4,8 +4,8 @@ import { MaybeNumber } from 'ontime-types'; -import { formatTime } from '../../../../common/utils/time'; -import { FORMAT_12, FORMAT_24 } from '../../../../viewerConfig'; +import { formatTime } from '../../../common/utils/time'; +import { FORMAT_12, FORMAT_24 } from '../../../viewerConfig'; import SuperscriptTime from '../superscript-time/SuperscriptTime'; interface ClockTimeProps { diff --git a/apps/client/src/features/viewers/common/running-time/RunningTime.tsx b/apps/client/src/views/common/running-time/RunningTime.tsx similarity index 90% rename from apps/client/src/features/viewers/common/running-time/RunningTime.tsx rename to apps/client/src/views/common/running-time/RunningTime.tsx index dc6bb3aa5..0d296b6c2 100644 --- a/apps/client/src/features/viewers/common/running-time/RunningTime.tsx +++ b/apps/client/src/views/common/running-time/RunningTime.tsx @@ -5,7 +5,7 @@ import { MaybeNumber } from 'ontime-types'; import { removeLeadingZero, removeSeconds } from 'ontime-utils'; -import { formattedTime } from '../../../overview/overview.utils'; +import { formattedTime } from '../../../features/overview/overview.utils'; interface RunningTimeProps { value: MaybeNumber; diff --git a/apps/client/src/views/common/schedule/ScheduleItem.tsx b/apps/client/src/views/common/schedule/ScheduleItem.tsx index 16e190e63..47770d55e 100644 --- a/apps/client/src/views/common/schedule/ScheduleItem.tsx +++ b/apps/client/src/views/common/schedule/ScheduleItem.tsx @@ -5,7 +5,7 @@ import { getOffsetState } from '../../../common/utils/offset'; import { ExtendedEntry } from '../../../common/utils/rundownMetadata'; import { cx } from '../../../common/utils/styleUtils'; import { formatTime, getExpectedTimesFromExtendedEvent } from '../../../common/utils/time'; -import SuperscriptPeriod from '../../../features/viewers/common/superscript-time/SuperscriptPeriod'; +import SuperscriptPeriod from '../superscript-time/SuperscriptPeriod'; import { useScheduleOptions } from './schedule.options'; diff --git a/apps/client/src/views/common/schedule/schedule.options.ts b/apps/client/src/views/common/schedule/schedule.options.ts index 5b7291578..e70557d60 100644 --- a/apps/client/src/views/common/schedule/schedule.options.ts +++ b/apps/client/src/views/common/schedule/schedule.options.ts @@ -4,7 +4,7 @@ import { useSearchParams } from 'react-router'; import { SelectOption } from '../../../common/components/select/Select'; import { OptionTitle } from '../../../common/components/view-params-editor/constants'; import type { ViewOption } from '../../../common/components/view-params-editor/viewParams.types'; -import { isStringBoolean } from '../../../features/viewers/common/viewUtils'; +import { isStringBoolean } from '../viewUtils'; export const getScheduleOptions = (customFieldOptions: SelectOption[]): ViewOption => ({ title: OptionTitle.Schedule, diff --git a/apps/client/src/features/viewers/common/superscript-time/SuperscriptPeriod.tsx b/apps/client/src/views/common/superscript-time/SuperscriptPeriod.tsx similarity index 100% rename from apps/client/src/features/viewers/common/superscript-time/SuperscriptPeriod.tsx rename to apps/client/src/views/common/superscript-time/SuperscriptPeriod.tsx diff --git a/apps/client/src/features/viewers/common/superscript-time/SuperscriptTime.scss b/apps/client/src/views/common/superscript-time/SuperscriptTime.scss similarity index 100% rename from apps/client/src/features/viewers/common/superscript-time/SuperscriptTime.scss rename to apps/client/src/views/common/superscript-time/SuperscriptTime.scss diff --git a/apps/client/src/features/viewers/common/superscript-time/SuperscriptTime.tsx b/apps/client/src/views/common/superscript-time/SuperscriptTime.tsx similarity index 100% rename from apps/client/src/features/viewers/common/superscript-time/SuperscriptTime.tsx rename to apps/client/src/views/common/superscript-time/SuperscriptTime.tsx diff --git a/apps/client/src/features/viewers/common/viewUtils.ts b/apps/client/src/views/common/viewUtils.ts similarity index 95% rename from apps/client/src/features/viewers/common/viewUtils.ts rename to apps/client/src/views/common/viewUtils.ts index 293d63385..9b6015ca6 100644 --- a/apps/client/src/features/viewers/common/viewUtils.ts +++ b/apps/client/src/views/common/viewUtils.ts @@ -1,8 +1,8 @@ import { MaybeNumber, MaybeString, OntimeEvent, TimerState, TimerType } from 'ontime-types'; import { MILLIS_PER_MINUTE, MILLIS_PER_SECOND, millisToString, removeLeadingZero, removeSeconds } from 'ontime-utils'; -import { timerPlaceholder, timerPlaceholderMin } from '../../../common/utils/styleUtils'; -import { formatTime } from '../../../common/utils/time'; +import { timerPlaceholder, timerPlaceholderMin } from '../../common/utils/styleUtils'; +import { formatTime } from '../../common/utils/time'; /** * Gathers all options that affect which timer is displayed and selects the correct data source to display diff --git a/apps/client/src/views/countdown/Countdown.tsx b/apps/client/src/views/countdown/Countdown.tsx index e7d665c90..8e443bd28 100644 --- a/apps/client/src/views/countdown/Countdown.tsx +++ b/apps/client/src/views/countdown/Countdown.tsx @@ -11,9 +11,9 @@ import { useClock } from '../../common/hooks/useSocket'; import { useWindowTitle } from '../../common/hooks/useWindowTitle'; import { ExtendedEntry } from '../../common/utils/rundownMetadata'; import { formatTime, getDefaultFormat } from '../../common/utils/time'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; import { useTranslation } from '../../translation/TranslationProvider'; import Loader from '../common/loader/Loader'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; import { getCountdownOptions, useCountdownOptions } from './countdown.options'; import { getOrderedSubscriptions } from './countdown.utils'; diff --git a/apps/client/src/views/countdown/CountdownSelect.tsx b/apps/client/src/views/countdown/CountdownSelect.tsx index 68bed2d65..28830ac2c 100644 --- a/apps/client/src/views/countdown/CountdownSelect.tsx +++ b/apps/client/src/views/countdown/CountdownSelect.tsx @@ -6,7 +6,7 @@ import { EntryId, PlayableEvent } from 'ontime-types'; import Button from '../../common/components/buttons/Button'; import { ExtendedEntry } from '../../common/utils/rundownMetadata'; import { cx } from '../../common/utils/styleUtils'; -import ClockTime from '../../features/viewers/common/clock-time/ClockTime'; +import ClockTime from '../common/clock-time/ClockTime'; import { makeSubscriptionsUrl } from './countdown.utils'; diff --git a/apps/client/src/views/countdown/CountdownSubscriptions.tsx b/apps/client/src/views/countdown/CountdownSubscriptions.tsx index ba004a304..a53a3b789 100644 --- a/apps/client/src/views/countdown/CountdownSubscriptions.tsx +++ b/apps/client/src/views/countdown/CountdownSubscriptions.tsx @@ -13,9 +13,9 @@ import { ExtendedEntry } from '../../common/utils/rundownMetadata'; import { cx } from '../../common/utils/styleUtils'; import { throttle } from '../../common/utils/throttle'; import FollowButton from '../../features/operator/follow-button/FollowButton'; -import ClockTime from '../../features/viewers/common/clock-time/ClockTime'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; -import { getPropertyValue } from '../../features/viewers/common/viewUtils'; +import ClockTime from '../common/clock-time/ClockTime'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; +import { getPropertyValue } from '../common/viewUtils'; import { useCountdownOptions } from './countdown.options'; import { diff --git a/apps/client/src/views/countdown/SingleEventCountdown.tsx b/apps/client/src/views/countdown/SingleEventCountdown.tsx index cfa48d346..1f29e48d5 100644 --- a/apps/client/src/views/countdown/SingleEventCountdown.tsx +++ b/apps/client/src/views/countdown/SingleEventCountdown.tsx @@ -8,8 +8,8 @@ import { useExpectedStartData } from '../../common/hooks/useSocket'; import useReport from '../../common/hooks-query/useReport'; import { ExtendedEntry } from '../../common/utils/rundownMetadata'; import { cx } from '../../common/utils/styleUtils'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; -import { getPropertyValue } from '../../features/viewers/common/viewUtils'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; +import { getPropertyValue } from '../common/viewUtils'; import { useCountdownOptions } from './countdown.options'; import { useSubscriptionDisplayData } from './countdown.utils'; diff --git a/apps/client/src/views/countdown/countdown.options.ts b/apps/client/src/views/countdown/countdown.options.ts index 1cb11c33e..49d410abb 100644 --- a/apps/client/src/views/countdown/countdown.options.ts +++ b/apps/client/src/views/countdown/countdown.options.ts @@ -7,7 +7,7 @@ import { OptionTitle } from '../../common/components/view-params-editor/constant import { ViewOption } from '../../common/components/view-params-editor/viewParams.types'; import { makeOptionsFromCustomFields } from '../../common/components/view-params-editor/viewParams.utils'; import { PresetContext } from '../../common/context/PresetContext'; -import { isStringBoolean } from '../../features/viewers/common/viewUtils'; +import { isStringBoolean } from '../common/viewUtils'; export const getCountdownOptions = ( timeFormat: string, diff --git a/apps/client/src/views/editor/pip-timer/PipTimer.tsx b/apps/client/src/views/editor/pip-timer/PipTimer.tsx index fb2d22551..20bbd7e8b 100644 --- a/apps/client/src/views/editor/pip-timer/PipTimer.tsx +++ b/apps/client/src/views/editor/pip-timer/PipTimer.tsx @@ -4,7 +4,7 @@ import { FitText } from '../../../common/components/fit-text/FitText'; import MultiPartProgressBar from '../../../common/components/multi-part-progress-bar/MultiPartProgressBar'; import { useTimerSocket } from '../../../common/hooks/useSocket'; import { cx } from '../../../common/utils/styleUtils'; -import { getFormattedTimer, getTimerByType } from '../../../features/viewers/common/viewUtils'; +import { getFormattedTimer, getTimerByType } from '../../common/viewUtils'; import { getEstimatedFontSize, getIsPlaying, diff --git a/apps/client/src/views/studio/StudioClock.tsx b/apps/client/src/views/studio/StudioClock.tsx index 138095bc9..1e2d7e3b9 100644 --- a/apps/client/src/views/studio/StudioClock.tsx +++ b/apps/client/src/views/studio/StudioClock.tsx @@ -4,7 +4,7 @@ import { useIsSmallScreen } from '../../common/hooks/useIsSmallScreen'; import { useStudioClockSocket } from '../../common/hooks/useSocket'; import { cx } from '../../common/utils/styleUtils'; import { formatTime } from '../../common/utils/time'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; import { getLargeClockData } from './studioClock.utils'; diff --git a/apps/client/src/views/studio/studio.options.ts b/apps/client/src/views/studio/studio.options.ts index 89fe5074b..843843834 100644 --- a/apps/client/src/views/studio/studio.options.ts +++ b/apps/client/src/views/studio/studio.options.ts @@ -5,7 +5,7 @@ import { getTimeOption } from '../../common/components/view-params-editor/common import { OptionTitle } from '../../common/components/view-params-editor/constants'; import { ViewOption } from '../../common/components/view-params-editor/viewParams.types'; import { PresetContext } from '../../common/context/PresetContext'; -import { isStringBoolean } from '../../features/viewers/common/viewUtils'; +import { isStringBoolean } from '../common/viewUtils'; export const getStudioOptions = (timeFormat: string): ViewOption[] => [ { title: OptionTitle.ClockOptions, collapsible: true, options: [getTimeOption(timeFormat)] }, diff --git a/apps/client/src/views/timeline/TimelinePage.tsx b/apps/client/src/views/timeline/TimelinePage.tsx index f0d4621d9..e58acaa46 100644 --- a/apps/client/src/views/timeline/TimelinePage.tsx +++ b/apps/client/src/views/timeline/TimelinePage.tsx @@ -7,9 +7,9 @@ import ViewParamsEditor from '../../common/components/view-params-editor/ViewPar import { useClock, useSelectedEventId } from '../../common/hooks/useSocket'; import { useWindowTitle } from '../../common/hooks/useWindowTitle'; import { formatTime, getDefaultFormat } from '../../common/utils/time'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; import { useTranslation } from '../../translation/TranslationProvider'; import Loader from '../common/loader/Loader'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; import Timeline from './Timeline'; import { getTimelineOptions } from './timeline.options'; diff --git a/apps/client/src/views/timeline/timeline.options.ts b/apps/client/src/views/timeline/timeline.options.ts index bb832c738..43740178b 100644 --- a/apps/client/src/views/timeline/timeline.options.ts +++ b/apps/client/src/views/timeline/timeline.options.ts @@ -5,7 +5,7 @@ import { getTimeOption } from '../../common/components/view-params-editor/common import { OptionTitle } from '../../common/components/view-params-editor/constants'; import { ViewOption } from '../../common/components/view-params-editor/viewParams.types'; import { PresetContext } from '../../common/context/PresetContext'; -import { isStringBoolean } from '../../features/viewers/common/viewUtils'; +import { isStringBoolean } from '../common/viewUtils'; export const getTimelineOptions = (timeFormat: string): ViewOption[] => { return [ diff --git a/apps/client/src/views/timer/Timer.tsx b/apps/client/src/views/timer/Timer.tsx index bb4ee1fe4..568c7a18f 100644 --- a/apps/client/src/views/timer/Timer.tsx +++ b/apps/client/src/views/timer/Timer.tsx @@ -11,10 +11,10 @@ import { useTimerSocket } from '../../common/hooks/useSocket'; import { useWindowTitle } from '../../common/hooks/useWindowTitle'; import { cx } from '../../common/utils/styleUtils'; import { formatTime, getDefaultFormat } from '../../common/utils/time'; -import SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime'; -import { getFormattedTimer, getTimerByType } from '../../features/viewers/common/viewUtils'; import { useTranslation } from '../../translation/TranslationProvider'; import Loader from '../common/loader/Loader'; +import SuperscriptTime from '../common/superscript-time/SuperscriptTime'; +import { getFormattedTimer, getTimerByType } from '../common/viewUtils'; import { getTimerColour } from '../utils/presentation.utils'; import { getTimerOptions, useTimerOptions } from './timer.options'; diff --git a/apps/client/src/views/timer/timer.options.ts b/apps/client/src/views/timer/timer.options.ts index e44d311b4..cb0b18fe0 100644 --- a/apps/client/src/views/timer/timer.options.ts +++ b/apps/client/src/views/timer/timer.options.ts @@ -13,7 +13,7 @@ import { OptionTitle } from '../../common/components/view-params-editor/constant import { ViewOption } from '../../common/components/view-params-editor/viewParams.types'; import { makeOptionsFromCustomFields } from '../../common/components/view-params-editor/viewParams.utils'; import { PresetContext } from '../../common/context/PresetContext'; -import { isStringBoolean, makeColourString } from '../../features/viewers/common/viewUtils'; +import { isStringBoolean, makeColourString } from '../common/viewUtils'; // manually match the properties of TimerType excluding the None const timerDisplayOptions: SelectOption[] = [ diff --git a/apps/client/src/views/timer/timer.utils.ts b/apps/client/src/views/timer/timer.utils.ts index b080cc04e..c8adb31ec 100644 --- a/apps/client/src/views/timer/timer.utils.ts +++ b/apps/client/src/views/timer/timer.utils.ts @@ -1,7 +1,7 @@ import { MaybeNumber, MessageState, OntimeEvent, Playback, TimerMessage, TimerPhase, TimerType } from 'ontime-types'; import { isPlaybackActive } from 'ontime-utils'; -import { getFormattedTimer, getPropertyValue } from '../../features/viewers/common/viewUtils'; +import { getFormattedTimer, getPropertyValue } from '../common/viewUtils'; /** * Whether a message should be shown