feat: Replace new Vue() with custom event bus (no-changelog) (#5780)

* refactor: replace new Vue() with custom event bus (no-changelog)

* fix: export types from design system main

* fix: update component types

* fix: update form inputs event bus
This commit is contained in:
Alex Grozav
2023-04-06 16:32:45 +03:00
committed by GitHub
parent 89c12fc1a7
commit 5651a52364
67 changed files with 347 additions and 210 deletions

View File

@@ -51,7 +51,7 @@ import mixins from 'vue-typed-mixins';
import { EnterpriseEditionFeature } from '@/constants';
import { showMessage } from '@/mixins/showMessage';
import { useLogStreamingStore } from '../../stores/logStreamingStore';
import Vue from 'vue';
import Vue, { PropType } from 'vue';
import { mapStores } from 'pinia';
import {
deepCopy,
@@ -59,6 +59,7 @@ import {
MessageEventBusDestinationOptions,
} from 'n8n-workflow';
import { BaseTextKey } from '../../plugins/i18n';
import { EventBus } from '@/event-bus';
export const DESTINATION_LIST_ITEM_ACTIONS = {
OPEN: 'open',
@@ -75,7 +76,7 @@ export default mixins(showMessage).extend({
components: {},
props: {
eventBus: {
type: Vue,
type: Object as PropType<EventBus>,
},
destination: {
type: Object,
@@ -91,7 +92,7 @@ export default mixins(showMessage).extend({
deepCopy(defaultMessageEventBusDestinationOptions),
this.destination,
);
this.eventBus.$on('destinationWasSaved', () => {
this.eventBus.on('destinationWasSaved', () => {
const updatedDestination = this.logStreamingStore.getDestination(this.destination.id);
if (updatedDestination) {
this.nodeParameters = Object.assign(