import type { Snippet } from "svelte"; export declare const updateProperty: (path: string, value: string | number | boolean | object | string[], component: UIComponent & { properties: Partial; }, onPropertyChange: (updates: Partial<{ properties?: string | object; name?: string; access?: string; eventHandler?: IUIComponentHandler; }>) => void) => void; export declare const updateComponent: (component: UIComponent, updates: Partial<{ name: string; access: "full" | "viewOnly" | "hidden"; properties: Partial; eventHandler: IUIComponentHandler; }>) => { access: "full" | "viewOnly" | "hidden" | undefined; name: string | undefined; properties: IAccordionProps | IButtonProps | IColorPickerProps | IDividerProps | IFileAttachProps | IGraphProps | IInputProps | IJoystickProps | IMapProps | IPeriodChartProps | IProgressBarProps | ISelectProps | ISliderProps | ISwitchProps | ITableProps | ITabsProps | ITextFieldProps | IWidgetProps; eventHandler: IUIComponentHandler | undefined; id: string; type: "Accordion" | "Button" | "ColorPicker" | "Divider" | "FileAttach" | "Graph" | "Input" | "Joystick" | "Map" | "PeriodChart" | "ProgressBar" | "Select" | "Slider" | "Switch" | "Table" | "Tabs" | "TextField" | "VideoViewer" | "Widget"; position: Required; parentId: string; }; export interface UIComponent { id: string; name?: string; access?: "full" | "viewOnly" | "hidden"; type: "Accordion" | "Button" | "ColorPicker" | "Divider" | "FileAttach" | "Graph" | "Input" | "Joystick" | "Map" | "PeriodChart" | "ProgressBar" | "Select" | "Slider" | "Switch" | "Table" | "Tabs" | "TextField" | "VideoViewer" | "Widget"; properties: IAccordionProps | IButtonProps | IColorPickerProps | IDividerProps | IFileAttachProps | IGraphProps | IInputProps | IJoystickProps | IMapProps | IPeriodChartProps | IProgressBarProps | ISelectProps | ISliderProps | ISwitchProps | ITableProps | ITabsProps | ITextFieldProps | IWidgetProps; position: Required; parentId: string; eventHandler?: IUIComponentHandler; } export interface Position { row?: number; col?: number; width?: number; height?: number; } export interface IUIComponentHandler { Header?: string; Argument?: string; Value?: string; Variables?: string[]; } export interface IReceivingDataObject { Name?: string; Timestamp?: string; Value?: number | string | boolean; Info?: string; } export interface IAccordionProps { id?: string; isOpen?: boolean; wrapperClass?: string; size?: { height?: number; width?: number; }; label?: { name?: string; class?: string; icon?: ConstructorOfATypedSvelteComponent | string | null; }; children?: Snippet; image?: string; } export interface IButtonProps { id?: string; wrapperClass?: string; componentClass?: string; disabled?: boolean; content?: { name?: string; info?: { text: string; side: "top" | "bottom" | "left" | "right"; }; icon?: ConstructorOfATypedSvelteComponent | string | null; }; keyBind?: { showHint?: boolean; key?: string; ctrlKey?: boolean; shiftKey?: boolean; altKey?: boolean; metaKey?: boolean; }; onClick?: () => void; } export interface ICarouselProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; scrollValue?: number; children?: Snippet; } export interface IColorPickerProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; value?: number[]; readonly?: boolean; onChange?: (value: number[]) => void; } export interface IDividerProps { id?: string; wrapperClass?: string; type?: "line" | "empty"; width?: number; color?: string; anchor?: "top" | "center" | "bottom"; } export interface IFileAttachProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; type?: "file" | "image"; accept?: string; imageSize?: { height?: string; width?: string; fitMode?: "cover" | "contain"; form?: "square" | "circle"; }; disabled?: boolean; currentImage?: string | null; onChange?: (event: Event, file: File | null) => void; } export interface IGraphDataObject { name: string; value: number; } export interface IGraphHistoryPoint { value: number; timestamp: number; } export interface IGraphHistorySeries { name: string; points: IGraphHistoryPoint[]; } export interface IGraphProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; streamingData?: { data: IGraphDataObject[] | null; }; isTest?: boolean; refreshRate?: number; historyData?: IGraphHistorySeries[]; } export interface IPeriodChartLevel { name: string; variable?: string; data: number[]; labels?: string[]; } export interface IPeriodChartProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; levels?: IPeriodChartLevel[]; unit?: string; onLevelChange?: (index: number, level: IPeriodChartLevel) => void; } export interface IInputProps { id?: string; type?: "text" | "password" | "number" | "text-area" | "bitMode"; wrapperClass?: string; label?: { name?: string; class?: string; }; componentClass?: string; disabled?: boolean; readonly?: boolean; value?: string | number; range?: { start: number; end: number; }; maxlength?: number; textareaRows?: number; placeholder?: string; isValid?: boolean; number?: { minNum?: number; maxNum?: number; step?: number; }; help?: { info?: string; copyButton?: boolean; regExp?: string | RegExp; autocomplete?: "on" | "off" | "given-name" | "family-name" | "nickname" | "username" | "new-password" | "current-password" | "organization-title" | "country-name" | "address-level1" | "address-level2" | "street-address" | "postal-code" | "email" | "tel" | null; }; onUpdate?: (value: string | number) => void; } export interface IJoystickProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; value?: number[]; readonly?: boolean; axes?: { name: string; minNum?: number; maxNum?: number; }[]; buttonIcon?: ConstructorOfATypedSvelteComponent | string; onUpdate?: (value: number[]) => void; } export interface IDeviceGNSS { NavLat: number; NavLon: number; NavAlt: number; DevName: string; DevSN: string; NavHeading: number; NavSatUse: number; } export interface IMapProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; data: IDeviceGNSS | null; markerIcon?: ConstructorOfATypedSvelteComponent | string; trackEnabled?: boolean; trackLength?: number; } export interface IProgressBarProps { id?: string; items?: { name?: string; class?: string; }[]; value?: IReceivingDataObject[]; number?: { minNum?: number; maxNum?: number; units?: string; }; type?: "horizontal" | "vertical"; wrapperClass?: string; } export interface ISelectProps { id?: string; wrapperClass?: string; disabled?: boolean; label?: { name?: string; class?: string; }; type?: "select" | "buttons" | "input"; multiSelect?: boolean; listHeight?: string; value?: IOption | IOption[] | null; options?: IOption[]; bitMode?: boolean; range?: { start: number; end: number; }; onUpdate?: (value: IOption | IOption[]) => void; } export interface IOption { id: string; value?: T; name?: string; class?: string; disabled?: boolean; } export interface ISliderProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; value?: number | [number, number]; type?: "single" | "range"; number?: { minNum: number; maxNum: number; step: number; }; disabled?: boolean; onUpdate?: (value: number | [number, number]) => void; } export interface ISwitchProps { id?: string; height?: string; wrapperClass?: string; disabled?: boolean; label?: { name?: string; class?: string; captionLeft?: string; captionRight?: string; }; hiddenInfo?: string; options?: IOption[]; bitMode?: boolean; type?: "horizontal" | "vertical" | "checkbox"; value?: number; onChange?: (value: number) => void; } export interface ITableText { key: keyof T; sortable?: boolean; truncated?: boolean; tooltip?: boolean; formatting?: (text: string) => string; copy?: boolean; modal?: boolean; class?: string; } export interface ITableSelect { key: keyof T; keyCol: string; onChange?: () => void; } export interface ITableButton { name?: string | ((row: T) => string); icon?: ConstructorOfATypedSvelteComponent | string; class?: string | ((row: T) => string); eventHandler?: IUIComponentHandler; onClick?: (row: T) => void; } export interface ITableProgressBar { key: keyof T; minNum?: number; maxNum?: number; units?: string; } export interface ITableImage { src?: string | ((row: T) => string); alt?: string; class?: string; width?: string; height?: string; defaultIcon?: ConstructorOfATypedSvelteComponent | string; } export type ITableContent = { type: "text"; data: ITableText; } | { type: "select"; data: ITableSelect; } | { type: "button"; data: ITableButton | ((row: T) => ITableButton); } | { type: "progressBar"; data: ITableProgressBar; } | { type: "image"; data: ITableImage; }; export interface ITableHeader { label?: { name?: string; class?: string; }; width?: string; align?: "left" | "center" | "right"; disableSelect?: boolean; content?: ITableContent[] | ((row: T) => ITableContent[]); } export interface ITableProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; header?: ITableHeader[]; body: T[] | T | null; footer?: string; dataBuffer?: { stashData?: boolean; bufferSize?: number; visibleRows?: number; clearButton?: boolean; clearClass?: string; logger?: boolean; }; outline?: boolean; cursor?: string | null; loader?: () => boolean; autoscroll?: boolean; getData?: () => void; onClick?: (eventHandler: IUIComponentHandler) => void; } export interface ITabsProps { id?: string; wrapperClass?: string; size?: { height?: number; width?: number; }; activeTab?: number; items: { name?: string; icon?: ConstructorOfATypedSvelteComponent | string; class?: string; children?: Snippet; onClick?: () => {}; disabled?: boolean; }[]; children?: Snippet<[any]>; apiArray?: UIComponent[]; Components?: Snippet<[component: UIComponent, fixedHeight: boolean]>; } export interface ITextFieldProps { id?: string; wrapperClass?: string; background?: boolean; underline?: boolean; content?: { name?: string; class?: string; size?: "small" | "base" | "large" | "huge" | "massive"; }; } export interface IVideoViewerProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; showSelect?: boolean; source?: "camera" | "remote"; streamKey?: string; frame?: Uint8Array | Blob | null; status?: "connecting" | "live" | "offline" | "error"; } export interface IWidgetProps { id?: string; wrapperClass?: string; label?: { name?: string; class?: string; }; value?: number; readonly?: boolean; settings?: { label?: string; class?: string; type?: "input" | "switch" | "slider"; number?: { minNum?: number; maxNum?: number; step?: number; units?: string; }; switch?: { captionLeft?: string; captionRight?: string; }; }; icons?: { array: string[]; cycling?: boolean; class?: string; }; onUpdate?: (value: number) => void; }