refactor(editor): Add types to ndv event bus (no-changelog) (#10451)
This commit is contained in:
@@ -744,7 +744,6 @@ export default defineComponent({
|
||||
if (this.node) {
|
||||
this.historyStore.pushCommandToUndo(new RenameNodeCommand(this.node.name, name));
|
||||
}
|
||||
// @ts-ignore
|
||||
this.valueChanged({
|
||||
value: name,
|
||||
name: 'name',
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
import type { IUpdateInformation } from '@/Interface';
|
||||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
|
||||
export const ndvEventBus = createEventBus();
|
||||
export type Position = 'minLeft' | 'maxRight' | 'initial';
|
||||
|
||||
export type CreateNewCredentialOpts = {
|
||||
type: string;
|
||||
showAuthOptions: boolean;
|
||||
};
|
||||
|
||||
export interface NdvEventBusEvents {
|
||||
/** Command to let the user create a new credential by opening the credentials modal */
|
||||
'credential.createNew': CreateNewCredentialOpts;
|
||||
|
||||
/** Command to set the NDV panels' (input, output, main) positions based on the given value */
|
||||
setPositionByName: Position;
|
||||
|
||||
updateParameterValue: IUpdateInformation;
|
||||
}
|
||||
|
||||
export const ndvEventBus = createEventBus<NdvEventBusEvents>();
|
||||
|
||||
Reference in New Issue
Block a user