refactor(editor): Add types to ndv event bus (no-changelog) (#10451)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions

This commit is contained in:
Tomi Turtiainen 2024-08-19 09:03:48 +03:00 committed by GitHub
parent aea82cb744
commit ab9faf109c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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>();