refactor(editor): Add types to ndv event bus (no-changelog) (#10451)

This commit is contained in:
Tomi Turtiainen
2024-08-19 09:03:48 +03:00
committed by GitHub
parent aea82cb744
commit ab9faf109c
2 changed files with 19 additions and 2 deletions

View File

@@ -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',

View File

@@ -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>();