mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Refactor nodeHelpers mixin to composable (#7810)
- Convert `nodeHelpers` mixin into composable and fix types - Replace usage of the mixin with the new composable - Add missing store imports in components that were dependent on opaque imports from nodeHelpers mixin - Refactor the `CollectionParameter` component to the modern script setup syntax Github issue / Community forum post (link here to close automatically): --------- Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -25,16 +25,22 @@ import type { IBinaryData, IRunData } from 'n8n-workflow';
|
||||
|
||||
import BinaryDataDisplayEmbed from '@/components/BinaryDataDisplayEmbed.vue';
|
||||
|
||||
import { nodeHelpers } from '@/mixins/nodeHelpers';
|
||||
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'BinaryDataDisplay',
|
||||
mixins: [nodeHelpers],
|
||||
|
||||
components: {
|
||||
BinaryDataDisplayEmbed,
|
||||
},
|
||||
setup() {
|
||||
const nodeHelpers = useNodeHelpers();
|
||||
|
||||
return {
|
||||
nodeHelpers,
|
||||
};
|
||||
},
|
||||
props: [
|
||||
'displayData', // IBinaryData
|
||||
'windowVisible', // boolean
|
||||
@@ -42,7 +48,7 @@ export default defineComponent({
|
||||
computed: {
|
||||
...mapStores(useWorkflowsStore),
|
||||
binaryData(): IBinaryData | null {
|
||||
const binaryData = this.getBinaryData(
|
||||
const binaryData = this.nodeHelpers.getBinaryData(
|
||||
this.workflowRunData,
|
||||
this.displayData.node,
|
||||
this.displayData.runIndex,
|
||||
|
||||
Reference in New Issue
Block a user