Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/editor-ui/src/components/NodeSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
20 changes: 19 additions & 1 deletion packages/editor-ui/src/event-bus/ndv.ts
Original file line number Diff line number Diff line change
@@ -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>();
Loading