mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
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:
@@ -142,7 +142,6 @@ import NodeSettings from '@/components/NodeSettings.vue';
|
||||
import NDVDraggablePanels from './NDVDraggablePanels.vue';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import Vue from 'vue';
|
||||
import OutputPanel from './OutputPanel.vue';
|
||||
import InputPanel from './InputPanel.vue';
|
||||
import TriggerPanel from './TriggerPanel.vue';
|
||||
@@ -155,7 +154,7 @@ import {
|
||||
} from '@/constants';
|
||||
import { workflowActivate } from '@/mixins/workflowActivate';
|
||||
import { pinData } from '@/mixins/pinData';
|
||||
import { dataPinningEventBus } from '@/event-bus/data-pinning-event-bus';
|
||||
import { createEventBus, dataPinningEventBus } from '@/event-bus';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useWorkflowsStore } from '@/stores/workflows';
|
||||
import { useNDVStore } from '@/stores/ndv';
|
||||
@@ -198,7 +197,7 @@ export default mixins(
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
settingsEventBus: new Vue(),
|
||||
settingsEventBus: createEventBus(),
|
||||
runInputIndex: -1,
|
||||
runOutputIndex: -1,
|
||||
isLinkingEnabled: true,
|
||||
@@ -212,7 +211,7 @@ export default mixins(
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
dataPinningEventBus.$on(
|
||||
dataPinningEventBus.on(
|
||||
'data-pinning-discovery',
|
||||
({ isTooltipVisible }: { isTooltipVisible: boolean }) => {
|
||||
this.pinDataDiscoveryTooltipVisible = isTooltipVisible;
|
||||
@@ -220,7 +219,7 @@ export default mixins(
|
||||
);
|
||||
},
|
||||
destroyed() {
|
||||
dataPinningEventBus.$off('data-pinning-discovery');
|
||||
dataPinningEventBus.off('data-pinning-discovery');
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useNodeTypesStore, useNDVStore, useUIStore, useWorkflowsStore, useSettingsStore),
|
||||
@@ -596,7 +595,7 @@ export default mixins(
|
||||
}, 1000);
|
||||
},
|
||||
openSettings() {
|
||||
this.settingsEventBus.$emit('openSettings');
|
||||
this.settingsEventBus.emit('openSettings');
|
||||
},
|
||||
valueChanged(parameterData: IUpdateInformation) {
|
||||
this.$emit('valueChanged', parameterData);
|
||||
@@ -622,7 +621,7 @@ export default mixins(
|
||||
const { value } = this.outputPanelEditMode;
|
||||
|
||||
if (!this.isValidPinDataSize(value)) {
|
||||
dataPinningEventBus.$emit('data-pinning-error', {
|
||||
dataPinningEventBus.emit('data-pinning-error', {
|
||||
errorType: 'data-too-large',
|
||||
source: 'on-ndv-close-modal',
|
||||
});
|
||||
@@ -630,7 +629,7 @@ export default mixins(
|
||||
}
|
||||
|
||||
if (!this.isValidPinDataJSON(value)) {
|
||||
dataPinningEventBus.$emit('data-pinning-error', {
|
||||
dataPinningEventBus.emit('data-pinning-error', {
|
||||
errorType: 'invalid-json',
|
||||
source: 'on-ndv-close-modal',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user