chore: rename time-to-end to count-to-end

This commit is contained in:
Carlos Valente
2024-12-18 19:43:12 +01:00
committed by Carlos Valente
parent c9ef2465f8
commit 2f2c26ed00
30 changed files with 115 additions and 122 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ export const useMessagePreview = () => {
showExternalMessage: state.message.timer.secondarySource === 'external' && Boolean(state.message.external), showExternalMessage: state.message.timer.secondarySource === 'external' && Boolean(state.message.external),
showTimerMessage: state.message.timer.visible && Boolean(state.message.timer.text), showTimerMessage: state.message.timer.visible && Boolean(state.message.timer.text),
timerType: state.eventNow?.timerType ?? null, timerType: state.eventNow?.timerType ?? null,
isTimeToEnd: state.eventNow?.isTimeToEnd ?? false, countToEnd: state.eventNow?.countToEnd ?? false,
}); });
return useRuntimeStore(featureSelector); return useRuntimeStore(featureSelector);
@@ -15,5 +15,5 @@ export type ViewExtendedTimer = {
clock: number; clock: number;
timerType: TimerType; timerType: TimerType;
isTimeToEnd: boolean; countToEnd: boolean;
}; };
@@ -17,7 +17,7 @@ export const cloneEvent = (event: OntimeEvent): ClonedEvent => {
timeEnd: event.timeEnd, timeEnd: event.timeEnd,
timerType: event.timerType, timerType: event.timerType,
timeStrategy: event.timeStrategy, timeStrategy: event.timeStrategy,
isTimeToEnd: event.isTimeToEnd, countToEnd: event.countToEnd,
linkStart: event.linkStart, linkStart: event.linkStart,
endAction: event.endAction, endAction: event.endAction,
isPublic: event.isPublic, isPublic: event.isPublic,
@@ -11,7 +11,7 @@ export const namedImportMap = {
Duration: 'duration', Duration: 'duration',
Cue: 'cue', Cue: 'cue',
Title: 'title', Title: 'title',
'Time to end': 'time to end', 'Count to end': 'count to end',
'Is Public': 'public', 'Is Public': 'public',
Skip: 'skip', Skip: 'skip',
Note: 'notes', Note: 'notes',
@@ -48,7 +48,7 @@ export function convertToImportMap(namedImportMap: NamedImportMap): ImportMap {
duration: namedImportMap.Duration, duration: namedImportMap.Duration,
cue: namedImportMap.Cue, cue: namedImportMap.Cue,
title: namedImportMap.Title, title: namedImportMap.Title,
isTimeToEnd: namedImportMap['Time to end'], countToEnd: namedImportMap['Count to end'],
isPublic: namedImportMap['Is Public'], isPublic: namedImportMap['Is Public'],
skip: namedImportMap.Skip, skip: namedImportMap.Skip,
note: namedImportMap.Note, note: namedImportMap.Note,
@@ -40,7 +40,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
<th>Duration</th> <th>Duration</th>
<th>Warning Time</th> <th>Warning Time</th>
<th>Danger Time</th> <th>Danger Time</th>
<th>Is Time to End</th> <th>Count to end</th>
<th>Is Public</th> <th>Is Public</th>
<th>Skip</th> <th>Skip</th>
<th>Colour</th> <th>Colour</th>
@@ -72,7 +72,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
} }
eventIndex += 1; eventIndex += 1;
const colour = event.colour ? getAccessibleColour(event.colour) : {}; const colour = event.colour ? getAccessibleColour(event.colour) : {};
const isTimeToEnd = booleanToText(event.isTimeToEnd); const countToEnd = booleanToText(event.countToEnd);
const isPublic = booleanToText(event.isPublic); const isPublic = booleanToText(event.isPublic);
const skip = booleanToText(event.skip); const skip = booleanToText(event.skip);
@@ -95,7 +95,7 @@ export default function PreviewRundown(props: PreviewRundownProps) {
<td>{millisToString(event.duration)}</td> <td>{millisToString(event.duration)}</td>
<td>{millisToString(event.timeWarning)}</td> <td>{millisToString(event.timeWarning)}</td>
<td>{millisToString(event.timeDanger)}</td> <td>{millisToString(event.timeDanger)}</td>
<td className={style.center}>{isTimeToEnd && <Tag>{isTimeToEnd}</Tag>}</td> <td className={style.center}>{countToEnd && <Tag>{countToEnd}</Tag>}</td>
<td className={style.center}>{isPublic && <Tag>{isPublic}</Tag>}</td> <td className={style.center}>{isPublic && <Tag>{isPublic}</Tag>}</td>
<td>{skip && <Tag>{skip}</Tag>}</td> <td>{skip && <Tag>{skip}</Tag>}</td>
<td style={{ ...colour }}>{event.colour}</td> <td style={{ ...colour }}>{event.colour}</td>
@@ -16,7 +16,7 @@ import { Corner } from '../../editors/editor-utils/EditorUtils';
import style from './MessageControl.module.scss'; import style from './MessageControl.module.scss';
export default function TimerPreview() { export default function TimerPreview() {
const { blink, blackout, isTimeToEnd, phase, showAuxTimer, showExternalMessage, showTimerMessage, timerType } = const { blink, blackout, countToEnd, phase, showAuxTimer, showExternalMessage, showTimerMessage, timerType } =
useMessagePreview(); useMessagePreview();
const { data } = useViewSettings(); const { data } = useViewSettings();
@@ -28,7 +28,7 @@ export default function TimerPreview() {
if (phase === TimerPhase.Pending) return 'Standby to start'; if (phase === TimerPhase.Pending) return 'Standby to start';
if (phase === TimerPhase.Overtime && data.endMessage) return 'Custom end message'; if (phase === TimerPhase.Overtime && data.endMessage) return 'Custom end message';
if (timerType === TimerType.Clock) return 'Clock'; if (timerType === TimerType.Clock) return 'Clock';
if (isTimeToEnd) return 'Target event scheduled end'; if (countToEnd) return 'Count to End';
return 'Timer'; return 'Timer';
})(); })();
@@ -77,12 +77,8 @@ export default function TimerPreview() {
<Tooltip label='Time type: None' openDelay={tooltipDelayMid} shouldWrapChildren> <Tooltip label='Time type: None' openDelay={tooltipDelayMid} shouldWrapChildren>
<IoBan className={style.statusIcon} data-active={timerType === TimerType.None} /> <IoBan className={style.statusIcon} data-active={timerType === TimerType.None} />
</Tooltip> </Tooltip>
<Tooltip <Tooltip label={countToEnd ? 'Count to end' : 'Count duration'} openDelay={tooltipDelayMid} shouldWrapChildren>
label={isTimeToEnd ? 'Count to schedule' : 'Count from start'} <IoFlag className={style.statusIcon} data-active={countToEnd} />
openDelay={tooltipDelayMid}
shouldWrapChildren
>
<IoFlag className={style.statusIcon} data-active={isTimeToEnd} />
</Tooltip> </Tooltip>
</div> </div>
</div> </div>
@@ -158,7 +158,7 @@ export default function RundownEntry(props: RundownEntryProps) {
duration={data.duration} duration={data.duration}
timeStrategy={data.timeStrategy} timeStrategy={data.timeStrategy}
linkStart={data.linkStart} linkStart={data.linkStart}
isTimeToEnd={data.isTimeToEnd} countToEnd={data.countToEnd}
isPublic={data.isPublic} isPublic={data.isPublic}
endAction={data.endAction} endAction={data.endAction}
timerType={data.timerType} timerType={data.timerType}
@@ -31,7 +31,7 @@ interface EventBlockProps {
duration: number; duration: number;
timeStrategy: TimeStrategy; timeStrategy: TimeStrategy;
linkStart: MaybeString; linkStart: MaybeString;
isTimeToEnd: boolean; countToEnd: boolean;
eventIndex: number; eventIndex: number;
isPublic: boolean; isPublic: boolean;
endAction: EndAction; endAction: EndAction;
@@ -69,7 +69,7 @@ export default function EventBlock(props: EventBlockProps) {
duration, duration,
timeStrategy, timeStrategy,
linkStart, linkStart,
isTimeToEnd, countToEnd,
isPublic = true, isPublic = true,
eventIndex, eventIndex,
endAction, endAction,
@@ -288,7 +288,7 @@ export default function EventBlock(props: EventBlockProps) {
timeEnd={timeEnd} timeEnd={timeEnd}
duration={duration} duration={duration}
linkStart={linkStart} linkStart={linkStart}
isTimeToEnd={isTimeToEnd} countToEnd={countToEnd}
timeStrategy={timeStrategy} timeStrategy={timeStrategy}
eventId={eventId} eventId={eventId}
eventIndex={eventIndex} eventIndex={eventIndex}
@@ -29,7 +29,7 @@ interface EventBlockInnerProps {
duration: number; duration: number;
timeStrategy: TimeStrategy; timeStrategy: TimeStrategy;
linkStart: MaybeString; linkStart: MaybeString;
isTimeToEnd: boolean; countToEnd: boolean;
eventIndex: number; eventIndex: number;
isPublic: boolean; isPublic: boolean;
endAction: EndAction; endAction: EndAction;
@@ -52,7 +52,7 @@ function EventBlockInner(props: EventBlockInnerProps) {
duration, duration,
timeStrategy, timeStrategy,
linkStart, linkStart,
isTimeToEnd, countToEnd,
isPublic = true, isPublic = true,
endAction, endAction,
timerType, timerType,
@@ -93,7 +93,7 @@ function EventBlockInner(props: EventBlockInnerProps) {
delay={delay} delay={delay}
timeStrategy={timeStrategy} timeStrategy={timeStrategy}
linkStart={linkStart} linkStart={linkStart}
isTimeToEnd={isTimeToEnd} countToEnd={countToEnd}
/> />
</div> </div>
<div className={style.titleSection}> <div className={style.titleSection}>
@@ -124,9 +124,9 @@ function EventBlockInner(props: EventBlockInnerProps) {
<EndActionIcon action={endAction} className={style.statusIcon} /> <EndActionIcon action={endAction} className={style.statusIcon} />
</span> </span>
</Tooltip> </Tooltip>
<Tooltip label={`${isTimeToEnd ? 'Time to End' : 'Count from start'}`} openDelay={tooltipDelayMid}> <Tooltip label={`${countToEnd ? 'Count to End' : 'Count duration'}`} openDelay={tooltipDelayMid}>
<span> <span>
<IoFlag className={`${style.statusIcon} ${isTimeToEnd ? style.active : style.disabled}`} /> <IoFlag className={`${style.statusIcon} ${countToEnd ? style.active : style.disabled}`} />
</span> </span>
</Tooltip> </Tooltip>
<Tooltip label={`${isPublic ? 'Event is public' : 'Event is private'}`} openDelay={tooltipDelayMid}> <Tooltip label={`${isPublic ? 'Event is public' : 'Event is private'}`} openDelay={tooltipDelayMid}>
@@ -61,7 +61,7 @@ export default function EventEditor(props: EventEditorProps) {
duration={event.duration} duration={event.duration}
timeStrategy={event.timeStrategy} timeStrategy={event.timeStrategy}
linkStart={event.linkStart} linkStart={event.linkStart}
isTimeToEnd={event.isTimeToEnd} countToEnd={event.countToEnd}
delay={event.delay ?? 0} delay={event.delay ?? 0}
isPublic={event.isPublic} isPublic={event.isPublic}
endAction={event.endAction} endAction={event.endAction}
@@ -18,7 +18,7 @@ interface EventEditorTimesProps {
duration: number; duration: number;
timeStrategy: TimeStrategy; timeStrategy: TimeStrategy;
linkStart: MaybeString; linkStart: MaybeString;
isTimeToEnd: boolean; countToEnd: boolean;
delay: number; delay: number;
isPublic: boolean; isPublic: boolean;
endAction: EndAction; endAction: EndAction;
@@ -27,7 +27,7 @@ interface EventEditorTimesProps {
timeDanger: number; timeDanger: number;
} }
type HandledActions = 'isTimeToEnd' | 'timerType' | 'endAction' | 'isPublic' | 'timeWarning' | 'timeDanger'; type HandledActions = 'countToEnd' | 'timerType' | 'endAction' | 'isPublic' | 'timeWarning' | 'timeDanger';
function EventEditorTimes(props: EventEditorTimesProps) { function EventEditorTimes(props: EventEditorTimesProps) {
const { const {
@@ -37,7 +37,7 @@ function EventEditorTimes(props: EventEditorTimesProps) {
duration, duration,
timeStrategy, timeStrategy,
linkStart, linkStart,
isTimeToEnd, countToEnd,
delay, delay,
isPublic, isPublic,
endAction, endAction,
@@ -53,8 +53,8 @@ function EventEditorTimes(props: EventEditorTimesProps) {
return; return;
} }
if (field === 'isTimeToEnd') { if (field === 'countToEnd') {
updateEvent({ id: eventId, isTimeToEnd: !(value as boolean) }); updateEvent({ id: eventId, countToEnd: !(value as boolean) });
return; return;
} }
@@ -91,13 +91,12 @@ function EventEditorTimes(props: EventEditorTimesProps) {
timeStrategy={timeStrategy} timeStrategy={timeStrategy}
linkStart={linkStart} linkStart={linkStart}
delay={delay} delay={delay}
isTimeToEnd={isTimeToEnd} countToEnd={countToEnd}
/> />
</div> </div>
<div className={style.delayLabel}>{delayLabel}</div> <div className={style.delayLabel}>{delayLabel}</div>
</div> </div>
<Editor.Title>Event behaviour</Editor.Title>
<div className={style.splitTwo}> <div className={style.splitTwo}>
<div> <div>
<Editor.Label htmlFor='endAction'>End Action</Editor.Label> <Editor.Label htmlFor='endAction'>End Action</Editor.Label>
@@ -116,22 +115,21 @@ function EventEditorTimes(props: EventEditorTimesProps) {
</Select> </Select>
</div> </div>
<div> <div>
<Editor.Label htmlFor='timeToEnd'>Target Event Scheduled End</Editor.Label> <Editor.Label htmlFor='countToEnd'>Count to End</Editor.Label>
<Editor.Label className={style.switchLabel}> <Editor.Label className={style.switchLabel}>
<Switch <Switch
id='timeToEnd' id='countToEnd'
size='md' size='md'
isChecked={isTimeToEnd} isChecked={countToEnd}
onChange={() => handleSubmit('isTimeToEnd', isTimeToEnd)} onChange={() => handleSubmit('countToEnd', countToEnd)}
variant='ontime' variant='ontime'
/> />
{isTimeToEnd ? 'On' : 'Off'} {countToEnd ? 'On' : 'Off'}
</Editor.Label> </Editor.Label>
</div> </div>
</div> </div>
</div> </div>
<div className={style.column}> <div className={style.column}>
<Editor.Title>Display options</Editor.Title>
<div className={style.splitTwo}> <div className={style.splitTwo}>
<div> <div>
<Editor.Label htmlFor='timerType'>Timer Type</Editor.Label> <Editor.Label htmlFor='timerType'>Timer Type</Editor.Label>
@@ -29,7 +29,6 @@ const EventEditorTitles = (props: EventEditorTitlesProps) => {
return ( return (
<div className={style.column}> <div className={style.column}>
<Editor.Title>Event data</Editor.Title>
<div className={style.splitTwo}> <div className={style.splitTwo}>
<div> <div>
<Editor.Label htmlFor='eventId'>Event ID (read only)</Editor.Label> <Editor.Label htmlFor='eventId'>Event ID (read only)</Editor.Label>
@@ -16,7 +16,7 @@ import style from './TimeInputFlow.module.scss';
interface EventBlockTimerProps { interface EventBlockTimerProps {
eventId: string; eventId: string;
isTimeToEnd: boolean; countToEnd: boolean;
timeStart: number; timeStart: number;
timeEnd: number; timeEnd: number;
duration: number; duration: number;
@@ -26,7 +26,7 @@ interface EventBlockTimerProps {
} }
function TimeInputFlow(props: EventBlockTimerProps) { function TimeInputFlow(props: EventBlockTimerProps) {
const { eventId, isTimeToEnd, timeStart, timeEnd, duration, timeStrategy, linkStart, delay } = props; const { eventId, countToEnd, timeStart, timeEnd, duration, timeStrategy, linkStart, delay } = props;
const { updateEvent, updateTimer } = useEventAction(); const { updateEvent, updateTimer } = useEventAction();
// In sync with EventEditorTimes // In sync with EventEditorTimes
@@ -47,8 +47,8 @@ function TimeInputFlow(props: EventBlockTimerProps) {
warnings.push('Over midnight'); warnings.push('Over midnight');
} }
if (isTimeToEnd) { if (countToEnd) {
warnings.push('Target event scheduled end'); warnings.push('Count to End');
} }
const hasDelay = delay !== 0; const hasDelay = delay !== 0;
@@ -82,7 +82,7 @@ const withData = <P extends WithDataProps>(Component: ComponentType<P>) => {
...timer, ...timer,
clock, clock,
timerType: eventNow?.timerType ?? TimerType.CountDown, timerType: eventNow?.timerType ?? TimerType.CountDown,
isTimeToEnd: eventNow?.isTimeToEnd ?? false, countToEnd: eventNow?.countToEnd ?? false,
}; };
return ( return (
@@ -5,14 +5,14 @@ import type { ViewExtendedTimer } from '../../../common/models/TimeManager.type'
import { timerPlaceholder, timerPlaceholderMin } from '../../../common/utils/styleUtils'; import { timerPlaceholder, timerPlaceholderMin } from '../../../common/utils/styleUtils';
import { formatTime } from '../../../common/utils/time'; import { formatTime } from '../../../common/utils/time';
type TimerTypeParams = Pick<ViewExtendedTimer, 'isTimeToEnd' | 'timerType' | 'current' | 'elapsed' | 'clock'>; type TimerTypeParams = Pick<ViewExtendedTimer, 'countToEnd' | 'timerType' | 'current' | 'elapsed' | 'clock'>;
export function getTimerByType(freezeEnd: boolean, timerObject?: TimerTypeParams): number | null { export function getTimerByType(freezeEnd: boolean, timerObject?: TimerTypeParams): number | null {
if (!timerObject) { if (!timerObject) {
return null; return null;
} }
if (timerObject.isTimeToEnd) { if (timerObject.countToEnd) {
if (timerObject.current === null) { if (timerObject.current === null) {
return null; return null;
} }
@@ -124,7 +124,7 @@ export default function MinimalTimer(props: MinimalTimerProps) {
const isPlaying = time.playback !== Playback.Pause; const isPlaying = time.playback !== Playback.Pause;
const shouldShowModifiers = time.timerType === TimerType.CountDown || time.isTimeToEnd; const shouldShowModifiers = time.timerType === TimerType.CountDown || time.countToEnd;
const finished = time.phase === TimerPhase.Overtime; const finished = time.phase === TimerPhase.Overtime;
const showEndMessage = shouldShowModifiers && finished && viewSettings.endMessage && !hideEndMessage; const showEndMessage = shouldShowModifiers && finished && viewSettings.endMessage && !hideEndMessage;
const showFinished = const showFinished =
@@ -118,7 +118,7 @@ export default function Timer(props: TimerProps) {
const finished = time.phase === TimerPhase.Overtime; const finished = time.phase === TimerPhase.Overtime;
const totalTime = (time.duration ?? 0) + (time.addedTime ?? 0); const totalTime = (time.duration ?? 0) + (time.addedTime ?? 0);
const shouldShowModifiers = time.timerType === TimerType.CountDown || time.isTimeToEnd; const shouldShowModifiers = time.timerType === TimerType.CountDown || time.countToEnd;
const showEndMessage = shouldShowModifiers && finished && viewSettings.endMessage; const showEndMessage = shouldShowModifiers && finished && viewSettings.endMessage;
const showProgress = const showProgress =
eventNow !== null && eventNow !== null &&
+14 -14
View File
@@ -10,7 +10,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.01', note: 'SF1.01',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 36000000, timeStart: 36000000,
@@ -35,7 +35,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.02', note: 'SF1.02',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 37500000, timeStart: 37500000,
@@ -60,7 +60,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.03', note: 'SF1.03',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 39000000, timeStart: 39000000,
@@ -85,7 +85,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.04', note: 'SF1.04',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 40500000, timeStart: 40500000,
@@ -110,7 +110,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.05', note: 'SF1.05',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 42000000, timeStart: 42000000,
@@ -140,7 +140,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.06', note: 'SF1.06',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 47100000, timeStart: 47100000,
@@ -165,7 +165,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.07', note: 'SF1.07',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 48600000, timeStart: 48600000,
@@ -190,7 +190,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.08', note: 'SF1.08',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 50100000, timeStart: 50100000,
@@ -215,7 +215,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.09', note: 'SF1.09',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 51600000, timeStart: 51600000,
@@ -240,7 +240,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.10', note: 'SF1.10',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 53100000, timeStart: 53100000,
@@ -270,7 +270,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.11', note: 'SF1.11',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 56100000, timeStart: 56100000,
@@ -295,7 +295,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.12', note: 'SF1.12',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 57600000, timeStart: 57600000,
@@ -320,7 +320,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.13', note: 'SF1.13',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 59100000, timeStart: 59100000,
@@ -345,7 +345,7 @@ export const demoDb: DatabaseModel = {
note: 'SF1.14', note: 'SF1.14',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
linkStart: null, linkStart: null,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
timeStart: 60600000, timeStart: 60600000,
+1 -1
View File
@@ -15,7 +15,7 @@ export const event: Omit<OntimeEvent, 'id' | 'delay' | 'cue'> = {
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
timeStrategy: TimeStrategy.LockDuration, timeStrategy: TimeStrategy.LockDuration,
linkStart: null, linkStart: null,
isTimeToEnd: false, countToEnd: false,
timeStart: 0, timeStart: 0,
timeEnd: 0, timeEnd: 0,
duration: 0, duration: 0,
@@ -175,7 +175,7 @@ describe('getExpectedFinish()', () => {
const state = { const state = {
eventNow: { eventNow: {
timeEnd: 30, timeEnd: 30,
isTimeToEnd: true, countToEnd: true,
}, },
timer: { timer: {
addedTime: 10, addedTime: 10,
@@ -195,7 +195,7 @@ describe('getExpectedFinish()', () => {
const state = { const state = {
eventNow: { eventNow: {
timeEnd: 600000, // 00:10:00 timeEnd: 600000, // 00:10:00
isTimeToEnd: true, countToEnd: true,
}, },
timer: { timer: {
addedTime: 0, addedTime: 0,
@@ -346,12 +346,12 @@ describe('getCurrent()', () => {
expect(current).toBe(35); expect(current).toBe(35);
}); });
describe('on timers of type time-to-end', () => { describe('on timers of type count-to-end', () => {
it('current time is the time to end even if it hasnt started, this is weird, but by design', () => { it('current time is the time to end even if it hasnt started, this is weird, but by design', () => {
const state = { const state = {
eventNow: { eventNow: {
timeEnd: 100, timeEnd: 100,
isTimeToEnd: true, countToEnd: true,
}, },
clock: 30, clock: 30,
timer: { timer: {
@@ -376,7 +376,7 @@ describe('getCurrent()', () => {
const state = { const state = {
eventNow: { eventNow: {
timeEnd: 100, timeEnd: 100,
isTimeToEnd: true, countToEnd: true,
}, },
clock: 30, clock: 30,
timer: { timer: {
@@ -401,7 +401,7 @@ describe('getCurrent()', () => {
const state = { const state = {
eventNow: { eventNow: {
timeEnd: 100, timeEnd: 100,
isTimeToEnd: true, countToEnd: true,
}, },
clock: 30, clock: 30,
timer: { timer: {
@@ -427,7 +427,7 @@ describe('getCurrent()', () => {
eventNow: { eventNow: {
timeStart: 79200000, // 22:00:00 timeStart: 79200000, // 22:00:00
timeEnd: 600000, // 00:10:00 timeEnd: 600000, // 00:10:00
isTimeToEnd: true, countToEnd: true,
}, },
clock: 79500000, // 22:05:00 clock: 79500000, // 22:05:00
timer: { timer: {
@@ -456,7 +456,7 @@ describe('getCurrent()', () => {
timeStart: 77400000, // 21:30:00 timeStart: 77400000, // 21:30:00
timeEnd: 81000000, // 22:30:00 timeEnd: 81000000, // 22:30:00
duration: 3600000, // 01:00:00 duration: 3600000, // 01:00:00
isTimeToEnd: true, countToEnd: true,
}, },
timer: { timer: {
addedTime: 0, addedTime: 0,
@@ -910,7 +910,7 @@ describe('getRuntimeOffset()', () => {
linkStart: null, linkStart: null,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: true, countToEnd: true,
isPublic: true, isPublic: true,
skip: false, skip: false,
note: '', note: '',
@@ -963,7 +963,7 @@ describe('getRuntimeOffset()', () => {
linkStart: null, linkStart: null,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: true, countToEnd: true,
isPublic: true, isPublic: true,
skip: false, skip: false,
note: '', note: '',
@@ -1014,7 +1014,7 @@ describe('getRuntimeOffset()', () => {
linkStart: null, linkStart: null,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: true, countToEnd: true,
}, },
runtime: { runtime: {
selectedEventIndex: 0, selectedEventIndex: 0,
@@ -565,7 +565,7 @@ describe('calculateRuntimeDelays', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 600000, timeStart: 600000,
@@ -592,7 +592,7 @@ describe('calculateRuntimeDelays', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 1200000, timeStart: 1200000,
@@ -619,7 +619,7 @@ describe('calculateRuntimeDelays', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 600000, timeStart: 600000,
@@ -646,7 +646,7 @@ describe('calculateRuntimeDelays', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 1200000, timeStart: 1200000,
@@ -682,7 +682,7 @@ describe('getDelayAt()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 600000, timeStart: 600000,
@@ -710,7 +710,7 @@ describe('getDelayAt()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 1200000, timeStart: 1200000,
@@ -738,7 +738,7 @@ describe('getDelayAt()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 600000, timeStart: 600000,
@@ -766,7 +766,7 @@ describe('getDelayAt()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 1200000, timeStart: 1200000,
@@ -820,7 +820,7 @@ describe('calculateRuntimeDelaysFrom()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 600000, timeStart: 600000,
@@ -848,7 +848,7 @@ describe('calculateRuntimeDelaysFrom()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 1200000, timeStart: 1200000,
@@ -876,7 +876,7 @@ describe('calculateRuntimeDelaysFrom()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 600000, timeStart: 600000,
@@ -904,7 +904,7 @@ describe('calculateRuntimeDelaysFrom()', () => {
note: '', note: '',
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
timeStart: 1200000, timeStart: 1200000,
@@ -31,7 +31,7 @@ describe('cellRequestFromEvent()', () => {
linkStart: null, linkStart: null,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
duration: 10800000, duration: 10800000,
isPublic: false, isPublic: false,
skip: false, skip: false,
@@ -74,7 +74,7 @@ describe('cellRequestFromEvent()', () => {
timeEnd: 57600000, timeEnd: 57600000,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
duration: 10800000, duration: 10800000,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
@@ -121,7 +121,7 @@ describe('cellRequestFromEvent()', () => {
timeEnd: 57600000, timeEnd: 57600000,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
duration: 10800000, duration: 10800000,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
@@ -167,7 +167,7 @@ describe('cellRequestFromEvent()', () => {
timeEnd: 57600000, timeEnd: 57600000,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
duration: 10800000, duration: 10800000,
@@ -199,7 +199,7 @@ describe('cellRequestFromEvent()', () => {
timeEnd: 57600000, timeEnd: 57600000,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
duration: 10800000, duration: 10800000,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
@@ -232,7 +232,7 @@ describe('cellRequestFromEvent()', () => {
timeEnd: 57600000, timeEnd: 57600000,
endAction: EndAction.None, endAction: EndAction.None,
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
duration: 10800000, duration: 10800000,
timeStrategy: TimeStrategy.LockEnd, timeStrategy: TimeStrategy.LockEnd,
linkStart: null, linkStart: null,
+6 -6
View File
@@ -19,7 +19,7 @@ export function getExpectedFinish(state: RuntimeState): MaybeNumber {
return null; return null;
} }
const { isTimeToEnd, timeEnd } = state.eventNow; const { countToEnd, timeEnd } = state.eventNow;
const { pausedAt } = state._timer; const { pausedAt } = state._timer;
const { clock } = state; const { clock } = state;
@@ -33,7 +33,7 @@ export function getExpectedFinish(state: RuntimeState): MaybeNumber {
const pausedTime = pausedAt != null ? clock - pausedAt : 0; const pausedTime = pausedAt != null ? clock - pausedAt : 0;
if (isTimeToEnd) { if (countToEnd) {
return timeEnd + addedTime + pausedTime; return timeEnd + addedTime + pausedTime;
} }
@@ -62,11 +62,11 @@ export function getCurrent(state: RuntimeState): number {
} }
} }
const { startedAt, duration, addedTime } = state.timer; const { startedAt, duration, addedTime } = state.timer;
const { isTimeToEnd, timeStart, timeEnd } = state.eventNow; const { countToEnd, timeStart, timeEnd } = state.eventNow;
const { pausedAt } = state._timer; const { pausedAt } = state._timer;
const { clock } = state; const { clock } = state;
if (isTimeToEnd) { if (countToEnd) {
const isEventOverMidnight = timeStart > timeEnd; const isEventOverMidnight = timeStart > timeEnd;
const correctDay = isEventOverMidnight ? dayInMs : 0; const correctDay = isEventOverMidnight ? dayInMs : 0;
return correctDay - clock + timeEnd + addedTime; return correctDay - clock + timeEnd + addedTime;
@@ -131,7 +131,7 @@ export function getRuntimeOffset(state: RuntimeState): number {
} }
const { clock } = state; const { clock } = state;
const { isTimeToEnd, timeStart } = state.eventNow; const { countToEnd, timeStart } = state.eventNow;
const { addedTime, current, startedAt } = state.timer; const { addedTime, current, startedAt } = state.timer;
// if we havent started, but the timer is armed // if we havent started, but the timer is armed
@@ -142,7 +142,7 @@ export function getRuntimeOffset(state: RuntimeState): number {
const overtime = Math.min(current, 0); const overtime = Math.min(current, 0);
// in time-to-end, offset is overtime // in time-to-end, offset is overtime
if (isTimeToEnd) { if (countToEnd) {
return overtime; return overtime;
} }
@@ -471,7 +471,7 @@ describe('test event validator', () => {
note: expect.any(String), note: expect.any(String),
timeStart: expect.any(Number), timeStart: expect.any(Number),
timeEnd: expect.any(Number), timeEnd: expect.any(Number),
isTimeToEnd: expect.any(Boolean), countToEnd: expect.any(Boolean),
isPublic: expect.any(Boolean), isPublic: expect.any(Boolean),
skip: expect.any(Boolean), skip: expect.any(Boolean),
revision: expect.any(Number), revision: expect.any(Number),
@@ -775,7 +775,7 @@ describe('getCustomFieldData()', () => {
duration: 'duration', duration: 'duration',
cue: 'cue', cue: 'cue',
title: 'title', title: 'title',
isTimeToEnd: 'time to end', countToEnd: 'count to end',
isPublic: 'public', isPublic: 'public',
skip: 'skip', skip: 'skip',
note: 'notes', note: 'notes',
@@ -826,7 +826,7 @@ describe('getCustomFieldData()', () => {
duration: 'duration', duration: 'duration',
cue: 'cue', cue: 'cue',
title: 'title', title: 'title',
isTimeToEnd: 'time to end', countToEnd: 'count to end',
isPublic: 'public', isPublic: 'public',
skip: 'skip', skip: 'skip',
note: 'notes', note: 'notes',
@@ -886,7 +886,7 @@ describe('parseExcel()', () => {
'Title', 'Title',
'End Action', 'End Action',
'Timer type', 'Timer type',
'Time to end', 'Count to end',
'Public', 'Public',
'Skip', 'Skip',
'Notes', 'Notes',
@@ -909,7 +909,7 @@ describe('parseExcel()', () => {
'Guest Welcome', 'Guest Welcome',
'', '',
'', '',
'x', // <-- time to end 'x', // <-- count to end
'x', // <-- public 'x', // <-- public
'', '',
'Ballyhoo', 'Ballyhoo',
@@ -932,7 +932,7 @@ describe('parseExcel()', () => {
'A song from the hearth', 'A song from the hearth',
'load-next', 'load-next',
'clock', 'clock',
'x', // <-- time to end 'x', // <-- count to end
'', // <-- public '', // <-- public
'x', 'x',
'Rainbow chase', 'Rainbow chase',
@@ -977,7 +977,7 @@ describe('parseExcel()', () => {
timerType: 'count-down', timerType: 'count-down',
endAction: 'none', endAction: 'none',
isPublic: true, isPublic: true,
isTimeToEnd: true, countToEnd: true,
skip: false, skip: false,
note: 'Ballyhoo', note: 'Ballyhoo',
custom: { custom: {
@@ -1001,7 +1001,7 @@ describe('parseExcel()', () => {
timeEnd: 30600000, timeEnd: 30600000,
title: 'A song from the hearth', title: 'A song from the hearth',
timerType: 'clock', timerType: 'clock',
isTimeToEnd: true, countToEnd: true,
endAction: 'load-next', endAction: 'load-next',
isPublic: false, isPublic: false,
skip: true, skip: true,
@@ -532,7 +532,7 @@ describe('parseRundown() migrations', () => {
expect(result.rundown[0]).toMatchObject({ expect(result.rundown[0]).toMatchObject({
id: '1', id: '1',
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: true, countToEnd: true,
}); });
}); });
@@ -542,7 +542,7 @@ describe('parseRundown() migrations', () => {
expect(result.rundown[0]).toMatchObject({ expect(result.rundown[0]).toMatchObject({
id: '1', id: '1',
timerType: TimerType.CountDown, timerType: TimerType.CountDown,
isTimeToEnd: false, countToEnd: false,
}); });
}); });
}); });
+7 -7
View File
@@ -110,7 +110,7 @@ export const parseExcel = (
// options: booleans // options: booleans
let isPublicIndex: number | null = null; let isPublicIndex: number | null = null;
let skipIndex: number | null = null; let skipIndex: number | null = null;
let isTimeToEndIndex: number | null = null; let countToEndIndex: number | null = null;
let linkStartIndex: number | null = null; let linkStartIndex: number | null = null;
@@ -160,9 +160,9 @@ export const parseExcel = (
titleIndex = col; titleIndex = col;
rundownMetadata['title'] = { row, col }; rundownMetadata['title'] = { row, col };
}, },
[importMap.isTimeToEnd]: (row: number, col: number) => { [importMap.countToEnd]: (row: number, col: number) => {
isTimeToEndIndex = col; countToEndIndex = col;
rundownMetadata['isTimeToEnd'] = { row, col }; rundownMetadata['countToEnd'] = { row, col };
}, },
[importMap.isPublic]: (row: number, col: number) => { [importMap.isPublic]: (row: number, col: number) => {
isPublicIndex = col; isPublicIndex = col;
@@ -231,8 +231,8 @@ export const parseExcel = (
event.duration = parseExcelDate(column); event.duration = parseExcelDate(column);
} else if (j === cueIndex) { } else if (j === cueIndex) {
event.cue = makeString(column, ''); event.cue = makeString(column, '');
} else if (j === isTimeToEndIndex) { } else if (j === countToEndIndex) {
event.isTimeToEnd = parseBooleanString(column); event.countToEnd = parseBooleanString(column);
} else if (j === isPublicIndex) { } else if (j === isPublicIndex) {
event.isPublic = parseBooleanString(column); event.isPublic = parseBooleanString(column);
} else if (j === skipIndex) { } else if (j === skipIndex) {
@@ -379,7 +379,7 @@ export function createPatch(originalEvent: OntimeEvent, patchEvent: Partial<Onti
linkStart: validateLinkStart(patchEvent.linkStart), linkStart: validateLinkStart(patchEvent.linkStart),
endAction: validateEndAction(patchEvent.endAction, originalEvent.endAction), endAction: validateEndAction(patchEvent.endAction, originalEvent.endAction),
timerType: validateTimerType(patchEvent.timerType, originalEvent.timerType), timerType: validateTimerType(patchEvent.timerType, originalEvent.timerType),
isTimeToEnd: typeof patchEvent.isTimeToEnd === 'boolean' ? patchEvent.isTimeToEnd : originalEvent.isTimeToEnd, countToEnd: typeof patchEvent.countToEnd === 'boolean' ? patchEvent.countToEnd : originalEvent.countToEnd,
isPublic: typeof patchEvent.isPublic === 'boolean' ? patchEvent.isPublic : originalEvent.isPublic, isPublic: typeof patchEvent.isPublic === 'boolean' ? patchEvent.isPublic : originalEvent.isPublic,
skip: typeof patchEvent.skip === 'boolean' ? patchEvent.skip : originalEvent.skip, skip: typeof patchEvent.skip === 'boolean' ? patchEvent.skip : originalEvent.skip,
note: makeString(patchEvent.note, originalEvent.note), note: makeString(patchEvent.note, originalEvent.note),
+2 -2
View File
@@ -349,13 +349,13 @@ export function sanitiseCustomFields(data: object): CustomFields {
} }
/** /**
* Time to end was moved from a TimerType to a standalone boolean * Time to end was moved from a TimerType to a standalone boolean named count to end
* Released as part of v3.10.0 * Released as part of v3.10.0
*/ */
function migrateTimeToEnd(event: any): OntimeEvent { function migrateTimeToEnd(event: any): OntimeEvent {
if (event.timerType === 'time-to-end') { if (event.timerType === 'time-to-end') {
event.timerType = TimerType.CountDown; event.timerType = TimerType.CountDown;
event.isTimeToEnd = true; event.countToEnd = true;
} }
return event; return event;
} }
@@ -28,7 +28,7 @@ export type OntimeEvent = OntimeBaseEvent & {
note: string; note: string;
endAction: EndAction; endAction: EndAction;
timerType: TimerType; timerType: TimerType;
isTimeToEnd: boolean; countToEnd: boolean;
linkStart: MaybeString; // ID of event to link to linkStart: MaybeString; // ID of event to link to
timeStrategy: TimeStrategy; timeStrategy: TimeStrategy;
timeStart: number; timeStart: number;
@@ -11,7 +11,7 @@ describe('isImportMap()', () => {
duration: 'duration', duration: 'duration',
cue: 'cue', cue: 'cue',
title: 'title', title: 'title',
isTimeToEnd: 'time to end', countToEnd: 'count to end',
isPublic: 'public', isPublic: 'public',
skip: 'skip', skip: 'skip',
note: 'notes', note: 'notes',
@@ -35,7 +35,7 @@ describe('isImportMap()', () => {
duration: 'duration', duration: 'duration',
cue: 'cue', cue: 'cue',
title: 'title', title: 'title',
isTimeToEnd: 'time to end', countToEnd: 'count to end',
isPublic: 'public', isPublic: 'public',
skip: 'skip', skip: 'skip',
note: 'notes', note: 'notes',
@@ -11,7 +11,7 @@ export const defaultImportMap = {
duration: 'duration', duration: 'duration',
cue: 'cue', cue: 'cue',
title: 'title', title: 'title',
isTimeToEnd: 'time to end', countToEnd: 'count to end',
isPublic: 'public', isPublic: 'public',
skip: 'skip', skip: 'skip',
note: 'notes', note: 'notes',