mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
frontend: updating addNotification type hints
This commit is contained in:
parent
3d42366ada
commit
7dcec88c9a
@ -119,7 +119,7 @@ interface ImageComponentProps {
|
|||||||
parentPath: string;
|
parentPath: string;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
docString: string;
|
docString: string;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
// Define your component specific props here
|
// Define your component specific props here
|
||||||
value: string;
|
value: string;
|
||||||
format: string;
|
format: string;
|
||||||
|
@ -10,7 +10,7 @@ interface AsyncMethodProps {
|
|||||||
value: Record<string, string>;
|
value: Record<string, string>;
|
||||||
docString?: string;
|
docString?: string;
|
||||||
hideOutput?: boolean;
|
hideOutput?: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
||||||
|
@ -10,7 +10,7 @@ interface ButtonComponentProps {
|
|||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
docString: string;
|
docString: string;
|
||||||
mapping?: [string, string]; // Enforce a tuple of two strings
|
mapping?: [string, string]; // Enforce a tuple of two strings
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
||||||
|
@ -10,7 +10,7 @@ interface ColouredEnumComponentProps {
|
|||||||
docString?: string;
|
docString?: string;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
enumDict: Record<string, string>;
|
enumDict: Record<string, string>;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentProps) => {
|
export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentProps) => {
|
||||||
|
@ -8,7 +8,7 @@ type DataServiceProps = {
|
|||||||
props: DataServiceJSON;
|
props: DataServiceJSON;
|
||||||
parentPath?: string;
|
parentPath?: string;
|
||||||
isInstantUpdate: boolean;
|
isInstantUpdate: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DataServiceJSON = Record<string, Attribute>;
|
export type DataServiceJSON = Record<string, Attribute>;
|
||||||
|
@ -9,7 +9,7 @@ interface EnumComponentProps {
|
|||||||
value: string;
|
value: string;
|
||||||
docString?: string;
|
docString?: string;
|
||||||
enumDict: Record<string, string>;
|
enumDict: Record<string, string>;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
||||||
|
@ -40,7 +40,7 @@ type GenericComponentProps = {
|
|||||||
name: string;
|
name: string;
|
||||||
parentPath: string;
|
parentPath: string;
|
||||||
isInstantUpdate: boolean;
|
isInstantUpdate: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GenericComponent = React.memo(
|
export const GenericComponent = React.memo(
|
||||||
|
@ -10,7 +10,7 @@ interface ImageComponentProps {
|
|||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
docString: string;
|
docString: string;
|
||||||
format: string;
|
format: string;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ImageComponent = React.memo((props: ImageComponentProps) => {
|
export const ImageComponent = React.memo((props: ImageComponentProps) => {
|
||||||
|
@ -8,7 +8,7 @@ interface ListComponentProps {
|
|||||||
value: Attribute[];
|
value: Attribute[];
|
||||||
docString: string;
|
docString: string;
|
||||||
isInstantUpdate: boolean;
|
isInstantUpdate: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ListComponent = React.memo((props: ListComponentProps) => {
|
export const ListComponent = React.memo((props: ListComponentProps) => {
|
||||||
|
@ -9,7 +9,7 @@ interface MethodProps {
|
|||||||
parameters: Record<string, string>;
|
parameters: Record<string, string>;
|
||||||
docString?: string;
|
docString?: string;
|
||||||
hideOutput?: boolean;
|
hideOutput?: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MethodComponent = React.memo((props: MethodProps) => {
|
export const MethodComponent = React.memo((props: MethodProps) => {
|
||||||
|
@ -22,7 +22,7 @@ interface NumberComponentProps {
|
|||||||
value: number,
|
value: number,
|
||||||
callback?: (ack: unknown) => void
|
callback?: (ack: unknown) => void
|
||||||
) => void;
|
) => void;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: highlight the digit that is being changed by setting both selectionStart and
|
// TODO: highlight the digit that is being changed by setting both selectionStart and
|
||||||
|
@ -15,7 +15,7 @@ interface SliderComponentProps {
|
|||||||
docString: string;
|
docString: string;
|
||||||
stepSize: number;
|
stepSize: number;
|
||||||
isInstantUpdate: boolean;
|
isInstantUpdate: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SliderComponent = React.memo((props: SliderComponentProps) => {
|
export const SliderComponent = React.memo((props: SliderComponentProps) => {
|
||||||
|
@ -13,7 +13,7 @@ interface StringComponentProps {
|
|||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
docString: string;
|
docString: string;
|
||||||
isInstantUpdate: boolean;
|
isInstantUpdate: boolean;
|
||||||
addNotification: (string) => void;
|
addNotification: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const StringComponent = React.memo((props: StringComponentProps) => {
|
export const StringComponent = React.memo((props: StringComponentProps) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user