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

@@ -14,7 +14,7 @@ import { linterExtension } from './linter';
import { completerExtension } from './completer';
import { CODE_NODE_EDITOR_THEME } from './theme';
import { workflowHelpers } from '@/mixins/workflowHelpers'; // for json field completions
import { codeNodeEditorEventBus } from '@/event-bus/code-node-editor-event-bus';
import { codeNodeEditorEventBus } from '@/event-bus';
import { CODE_NODE_TYPE } from '@/constants';
import { ALL_ITEMS_PLACEHOLDER, EACH_ITEM_PLACEHOLDER } from './constants';
import { mapStores } from 'pinia';
@@ -133,10 +133,10 @@ export default mixins(linterExtension, completerExtension, workflowHelpers).exte
},
},
destroyed() {
codeNodeEditorEventBus.$off('error-line-number', this.highlightLine);
codeNodeEditorEventBus.off('error-line-number', this.highlightLine);
},
mounted() {
codeNodeEditorEventBus.$on('error-line-number', this.highlightLine);
codeNodeEditorEventBus.on('error-line-number', this.highlightLine);
const stateBasedExtensions = [
this.linterCompartment.of(this.linterExtension()),