mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-15 12:23:51 +00:00
chore: upgrade client dependencies
This commit is contained in:
committed by
Carlos Valente
parent
9c5116f197
commit
166160dda9
@@ -232,7 +232,10 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr
|
||||
Runtime data source
|
||||
<Select
|
||||
value={watch(`filters.${index}.field`)}
|
||||
onValueChange={(value) => setValue(`filters.${index}.field`, value, { shouldDirty: true })}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue(`filters.${index}.field`, value, { shouldDirty: true });
|
||||
}}
|
||||
options={fieldList.map(({ value, label }) => ({ value, label }))}
|
||||
aria-label='Event field'
|
||||
/>
|
||||
@@ -242,11 +245,14 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr
|
||||
Matching condition
|
||||
<Select
|
||||
value={watch(`filters.${index}.operator`)}
|
||||
onValueChange={(value) =>
|
||||
setValue(`filters.${index}.operator`, value as 'equals' | 'not_equals' | 'contains', {
|
||||
shouldDirty: true,
|
||||
})
|
||||
}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue(
|
||||
`filters.${index}.operator`,
|
||||
value as 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains',
|
||||
{ shouldDirty: true },
|
||||
);
|
||||
}}
|
||||
options={[
|
||||
{ value: 'equals', label: 'equals' },
|
||||
{ value: 'not_equals', label: 'not equals' },
|
||||
|
||||
@@ -44,8 +44,9 @@ export default function OntimeActionForm({
|
||||
<label>
|
||||
Action
|
||||
<Select
|
||||
onValueChange={(value) => {
|
||||
handleSetAction(value as OntimeActionKey);
|
||||
onValueChange={(value: OntimeActionKey | null) => {
|
||||
if (value === null) return;
|
||||
handleSetAction(value);
|
||||
}}
|
||||
value={watch(`outputs.${index}.action`)}
|
||||
options={[
|
||||
@@ -96,7 +97,8 @@ export default function OntimeActionForm({
|
||||
<label>
|
||||
Visibility
|
||||
<Select
|
||||
onValueChange={(value) => {
|
||||
onValueChange={(value: boolean | 'untouched' | null) => {
|
||||
if (value === null) return;
|
||||
// we need to translate the undefined value to 'untouched'
|
||||
const translatedValue = value === 'untouched' ? undefined : (value as boolean | undefined);
|
||||
setValue(`outputs.${index}.visible`, translatedValue, { shouldDirty: true });
|
||||
@@ -117,7 +119,8 @@ export default function OntimeActionForm({
|
||||
<label>
|
||||
Timer secondary source
|
||||
<Select
|
||||
onValueChange={(value) => {
|
||||
onValueChange={(value: SecondarySource | null) => {
|
||||
if (value === null) return;
|
||||
setValue(`outputs.${index}.secondarySource`, value as SecondarySource, { shouldDirty: true });
|
||||
}}
|
||||
value={watch(`outputs.${index}.secondarySource`)}
|
||||
|
||||
@@ -106,7 +106,10 @@ export default function TriggerForm({
|
||||
Lifecycle trigger
|
||||
<Select
|
||||
value={watch('trigger')}
|
||||
onValueChange={(value) => setValue('trigger', value as TimerLifeCycle, { shouldDirty: true })}
|
||||
onValueChange={(value) => {
|
||||
if (value === null) return;
|
||||
setValue('trigger', value as TimerLifeCycle, { shouldDirty: true });
|
||||
}}
|
||||
options={cycles.map((cycle) => ({ value: cycle.value, label: cycle.label }))}
|
||||
aria-label='Lifecycle trigger'
|
||||
/>
|
||||
@@ -116,7 +119,10 @@ export default function TriggerForm({
|
||||
Automation title
|
||||
<Select
|
||||
value={watch('automationId')}
|
||||
onValueChange={(value) => setValue('automationId', value, { shouldDirty: true })}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue('automationId', value, { shouldDirty: true });
|
||||
}}
|
||||
options={automationSelect}
|
||||
aria-label='Automation title'
|
||||
/>
|
||||
|
||||
+4
-1
@@ -142,7 +142,10 @@ export default function URLPresetForm({ urlPreset, onClose }: URLPresetFormProps
|
||||
options={targetOptions}
|
||||
{...register('target', { required: 'Target is required' })}
|
||||
value={watch('target')}
|
||||
onValueChange={(value) => setValue('target', value, { shouldDirty: true })}
|
||||
onValueChange={(value: OntimeViewPresettable | null) => {
|
||||
if (value === null) return;
|
||||
setValue('target', value, { shouldDirty: true });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
+12
-3
@@ -51,7 +51,10 @@ export default function RundownDefaultSettings() {
|
||||
/>
|
||||
<Select
|
||||
value={defaultTimeStrategy}
|
||||
onValueChange={(value) => setTimeStrategy(value as TimeStrategy)}
|
||||
onValueChange={(value: TimeStrategy | null) => {
|
||||
if (value === null) return;
|
||||
setTimeStrategy(value);
|
||||
}}
|
||||
options={[
|
||||
{ value: TimeStrategy.LockDuration, label: 'Duration' },
|
||||
{ value: TimeStrategy.LockEnd, label: 'End Time' },
|
||||
@@ -73,7 +76,10 @@ export default function RundownDefaultSettings() {
|
||||
<Panel.Field title='Timer type' description='Default type of timer for new events' />
|
||||
<Select
|
||||
value={defaultTimerType}
|
||||
onValueChange={(value) => setDefaultTimerType(value as TimerType)}
|
||||
onValueChange={(value: TimerType | null) => {
|
||||
if (value === null) return;
|
||||
setDefaultTimerType(value);
|
||||
}}
|
||||
options={[
|
||||
{ value: TimerType.CountDown, label: 'Count down' },
|
||||
{ value: TimerType.CountUp, label: 'Count up' },
|
||||
@@ -86,7 +92,10 @@ export default function RundownDefaultSettings() {
|
||||
<Panel.Field title='End Action' description='Default end action for new events' />
|
||||
<Select
|
||||
value={defaultEndAction}
|
||||
onValueChange={(value) => setDefaultEndAction(value as EndAction)}
|
||||
onValueChange={(value: EndAction | null) => {
|
||||
if (value === null) return;
|
||||
setDefaultEndAction(value);
|
||||
}}
|
||||
options={[
|
||||
{ value: EndAction.None, label: 'None' },
|
||||
{ value: EndAction.LoadNext, label: 'Load next' },
|
||||
|
||||
+4
-3
@@ -162,9 +162,10 @@ export default function ImportMapForm({
|
||||
<Select
|
||||
id={importName as string}
|
||||
value={watch(label as keyof NamedImportMap) as string}
|
||||
onValueChange={(value: string) =>
|
||||
setValue(label as keyof NamedImportMap, value, { shouldDirty: true })
|
||||
}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue(label as keyof NamedImportMap, value, { shouldDirty: true });
|
||||
}}
|
||||
options={worksheetNames?.map((name) => ({ value: name, label: name })) || []}
|
||||
/>
|
||||
</td>
|
||||
|
||||
@@ -153,7 +153,10 @@ export default function GeneralSettings() {
|
||||
/>
|
||||
<Select
|
||||
value={watch('timeFormat')}
|
||||
onValueChange={(value) => setValue('timeFormat', value as '12' | '24', { shouldDirty: true })}
|
||||
onValueChange={(value: '12' | '24' | null) => {
|
||||
if (value === null) return;
|
||||
setValue('timeFormat', value, { shouldDirty: true });
|
||||
}}
|
||||
defaultValue='24'
|
||||
options={[
|
||||
{ value: '12', label: '12 hours 11:00:10 PM' },
|
||||
@@ -169,7 +172,10 @@ export default function GeneralSettings() {
|
||||
/>
|
||||
<Select
|
||||
value={watch('language')}
|
||||
onValueChange={(value) => setValue('language', value, { shouldDirty: true })}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue('language', value, { shouldDirty: true });
|
||||
}}
|
||||
disabled={disableInputs}
|
||||
defaultValue='en'
|
||||
options={[
|
||||
|
||||
@@ -75,7 +75,10 @@ export default function QuickStart({ isOpen, onClose }: QuickStartProps) {
|
||||
/>
|
||||
<Select
|
||||
value={watch('settings.timeFormat')}
|
||||
onValueChange={(value: '12' | '24') => setValue('settings.timeFormat', value, { shouldDirty: true })}
|
||||
onValueChange={(value: '12' | '24' | null) => {
|
||||
if (value === null) return;
|
||||
setValue('settings.timeFormat', value, { shouldDirty: true });
|
||||
}}
|
||||
defaultValue='24'
|
||||
options={[
|
||||
{ value: '12', label: '12 hours 11:00:10 PM' },
|
||||
@@ -91,7 +94,10 @@ export default function QuickStart({ isOpen, onClose }: QuickStartProps) {
|
||||
/>
|
||||
<Select
|
||||
value={watch('settings.language')}
|
||||
onValueChange={(value: string) => setValue('settings.language', value, { shouldDirty: true })}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue('settings.language', value, { shouldDirty: true });
|
||||
}}
|
||||
defaultValue='en'
|
||||
options={[
|
||||
{ value: 'en', label: 'English' },
|
||||
|
||||
@@ -71,12 +71,13 @@ function SecondarySourceControl() {
|
||||
{ value: 'aux3', label: 'Aux 3' },
|
||||
{ value: 'secondary', label: 'Secondary message' },
|
||||
]}
|
||||
onValueChange={(value) => {
|
||||
onValueChange={(value: SecondarySource | null) => {
|
||||
if (value === null) return;
|
||||
// we can only update the remote if it is enabled
|
||||
if (secondarySource !== null) {
|
||||
setMessage.timerSecondarySource(value as SecondarySource);
|
||||
setMessage.timerSecondarySource(value);
|
||||
}
|
||||
setValue(value as SecondarySource);
|
||||
setValue(value);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Fragment, useRef, useState } from 'react';
|
||||
import { IoClose } from 'react-icons/io5';
|
||||
import { Dialog } from '@base-ui-components/react/dialog';
|
||||
import { Dialog } from '@base-ui/react/dialog';
|
||||
import { OntimeEvent } from 'ontime-types';
|
||||
|
||||
import Button from '../../../common/components/buttons/Button';
|
||||
|
||||
@@ -102,7 +102,10 @@ function EventEditorTimes({
|
||||
<Editor.Label htmlFor='endAction'>End Action</Editor.Label>
|
||||
<Select
|
||||
value={endAction}
|
||||
onValueChange={(value) => handleSubmit('endAction', value)}
|
||||
onValueChange={(value: EndAction | null) => {
|
||||
if (value === null) return;
|
||||
handleSubmit('endAction', value);
|
||||
}}
|
||||
options={[
|
||||
{ value: EndAction.None, label: 'None' },
|
||||
{ value: EndAction.LoadNext, label: 'Load next event' },
|
||||
@@ -139,7 +142,10 @@ function EventEditorTimes({
|
||||
<Editor.Label htmlFor='timerType'>Timer Type</Editor.Label>
|
||||
<Select
|
||||
value={timerType}
|
||||
onValueChange={(value) => handleSubmit('timerType', value)}
|
||||
onValueChange={(value: TimerType | null) => {
|
||||
if (value === null) return;
|
||||
handleSubmit('timerType', value);
|
||||
}}
|
||||
options={[
|
||||
{ value: TimerType.CountDown, label: 'Count down' },
|
||||
{ value: TimerType.CountUp, label: 'Count up' },
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { memo } from 'react';
|
||||
import { IoAdd } from 'react-icons/io5';
|
||||
import { Toolbar } from '@base-ui-components/react/toolbar';
|
||||
import { Toolbar } from '@base-ui/react/toolbar';
|
||||
import { MaybeString, SupportedEntry } from 'ontime-types';
|
||||
|
||||
import Button from '../../../../common/components/buttons/Button';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { memo } from 'react';
|
||||
import { Toggle } from '@base-ui-components/react/toggle';
|
||||
import { ToggleGroup } from '@base-ui-components/react/toggle-group';
|
||||
import { Toolbar } from '@base-ui-components/react/toolbar';
|
||||
import { Toggle } from '@base-ui/react/toggle';
|
||||
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
||||
import { Toolbar } from '@base-ui/react/toolbar';
|
||||
import { useSessionStorage } from '@mantine/hooks';
|
||||
import { OffsetMode } from 'ontime-types';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { memo } from 'react';
|
||||
import { Toggle } from '@base-ui-components/react/toggle';
|
||||
import { ToggleGroup } from '@base-ui-components/react/toggle-group';
|
||||
import { Toolbar } from '@base-ui-components/react/toolbar';
|
||||
import { Toggle } from '@base-ui/react/toggle';
|
||||
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
||||
import { Toolbar } from '@base-ui/react/toolbar';
|
||||
import { useSessionStorage } from '@mantine/hooks';
|
||||
import { OffsetMode } from 'ontime-types';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { memo, useCallback } from 'react';
|
||||
import { IoTrash } from 'react-icons/io5';
|
||||
import { Toolbar } from '@base-ui-components/react/toolbar';
|
||||
import { Toolbar } from '@base-ui/react/toolbar';
|
||||
import { useDisclosure, useSessionStorage } from '@mantine/hooks';
|
||||
|
||||
import Button from '../../../common/components/buttons/Button';
|
||||
|
||||
@@ -179,7 +179,10 @@ export default function GenerateLinkForm({ hostOptions, pathOptions, presets, is
|
||||
<Select
|
||||
options={hostOptions}
|
||||
value={watch('baseUrl')}
|
||||
onValueChange={(value) => setValue('baseUrl', value)}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === null) return;
|
||||
setValue('baseUrl', value);
|
||||
}}
|
||||
/>
|
||||
</Panel.ListItem>
|
||||
)}
|
||||
@@ -191,7 +194,10 @@ export default function GenerateLinkForm({ hostOptions, pathOptions, presets, is
|
||||
<Select
|
||||
options={pathOptions}
|
||||
value={watch('path')}
|
||||
onValueChange={(value) => setValue('path', value, { shouldDirty: true })}
|
||||
onValueChange={(value: OntimeView | string | null) => {
|
||||
if (value === null) return;
|
||||
setValue('path', value, { shouldDirty: true });
|
||||
}}
|
||||
/>
|
||||
</Panel.ListItem>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user