refactor: apply param structure

This commit is contained in:
Carlos Valente
2025-01-24 22:03:52 +01:00
committed by Carlos Valente
parent 4503d1e411
commit bb1e9072fd
14 changed files with 629 additions and 499 deletions
@@ -38,3 +38,14 @@ export const showLeadingZeros: ParamField = {
type: 'boolean',
defaultValue: false,
};
export enum OptionTitle {
ClockOptions = 'Clock Options',
TimerOptions = 'Timer Options',
DataSources = 'Data sources',
ElementVisibility = 'Element visibility',
BehaviourOptions = 'View behaviour',
StyleOverride = 'View style override',
Animation = 'View animation',
Schedule = 'Schedule options',
}
@@ -1,3 +1,5 @@
import { OptionTitle } from './constants';
type BaseField = {
id: string;
title: string;
@@ -26,7 +28,7 @@ export type ParamField = BaseField &
(OptionsField | MultiOptionsField | StringField | NumberField | BooleanField | ColourField | PersistedField);
export type ViewOption = {
title: string;
title: OptionTitle;
options: ParamField[];
collapsible?: boolean;
};