feat(editor): add readonly state for nodes (#4299)

* fix(editor): add types to Node.vue component props

* fix(editor): some cleanup in NodeView

* fix(editor): fix some boolean usage

* feat(editor): check foreign credentials

* fix(editor): passing readOnly to inputs

* fix(editor): add types to component and solve property mutation

* fix(editor): add types to component and solve property mutation

* fix(editor): component property type

* fix(editor): component property type

* fix(editor): default prop values

* fix(editor): fix FixedCollectionParameter.vue
This commit is contained in:
Csaba Tuncsik
2022-10-24 20:17:25 +02:00
committed by GitHub
parent 1f4eaeb3ae
commit 408bd96815
23 changed files with 369 additions and 219 deletions

View File

@@ -1,3 +1,14 @@
import {
jsPlumbInstance,
DragOptions,
DropOptions,
ElementGroupRef,
Endpoint,
EndpointOptions,
EndpointRectangle,
EndpointRectangleOptions,
EndpointSpec,
} from "jsplumb";
import {
GenericValue,
IConnections,
@@ -104,24 +115,40 @@ declare module 'jsplumb' {
}
// EndpointOptions from jsplumb seems incomplete and wrong so we define an own one
export interface IEndpointOptions {
anchor?: any; // tslint:disable-line:no-any
createEndpoint?: boolean;
dragAllowedWhenFull?: boolean;
dropOptions?: any; // tslint:disable-line:no-any
dragProxy?: any; // tslint:disable-line:no-any
endpoint?: string;
endpointStyle?: object;
endpointHoverStyle?: object;
isSource?: boolean;
isTarget?: boolean;
maxConnections?: number;
overlays?: any; // tslint:disable-line:no-any
parameters?: any; // tslint:disable-line:no-any
uuid?: string;
enabled?: boolean;
cssClass?: string;
}
export type IEndpointOptions = Omit<EndpointOptions, 'endpoint' | 'dragProxy'> & {
endpointStyle: EndpointStyle
endpointHoverStyle: EndpointStyle
endpoint?: EndpointSpec | string
dragAllowedWhenFull?: boolean
dropOptions?: DropOptions & {
tolerance: string
};
dragProxy?: string | string[] | EndpointSpec | [ EndpointRectangle, EndpointRectangleOptions & { strokeWidth: number } ]
};
export type EndpointStyle = {
width?: number
height?: number
fill?: string
stroke?: string
outlineStroke?:string
lineWidth?: number
hover?: boolean
showOutputLabel?: boolean
size?: string
hoverMessage?: string
};
export type IDragOptions = DragOptions & {
grid: [number, number]
filter: string
};
export type IJsPlumbInstance = Omit<jsPlumbInstance, 'addEndpoint' | 'draggable'> & {
clearDragSelection: () => void
addEndpoint(el: ElementGroupRef, params?: IEndpointOptions, referenceParams?: IEndpointOptions): Endpoint | Endpoint[]
draggable(el: {}, options?: IDragOptions): IJsPlumbInstance
};
export interface IUpdateInformation {
name: string;
@@ -908,6 +935,7 @@ export interface ICredentialMap {
export interface ICredentialsState {
credentialTypes: ICredentialTypeMap;
credentials: ICredentialMap;
foreignCredentials?: ICredentialMap;
}
export interface ITagsState {