2023-10-02 08:33:43 -07:00
|
|
|
import type { Plugin } from 'vue';
|
|
|
|
import { N8nPlusEndpointHandler } from '@/plugins/jsplumb/N8nPlusEndpointType';
|
|
|
|
import * as N8nPlusEndpointRenderer from '@/plugins/jsplumb/N8nPlusEndpointRenderer';
|
|
|
|
import { N8nConnector } from '@/plugins/connectors/N8nCustomConnector';
|
|
|
|
import * as N8nAddInputEndpointRenderer from '@/plugins/jsplumb/N8nAddInputEndpointRenderer';
|
|
|
|
import { N8nAddInputEndpointHandler } from '@/plugins/jsplumb/N8nAddInputEndpointType';
|
2024-06-10 06:23:06 -07:00
|
|
|
import type { AbstractConnector } from '@jsplumb/core';
|
2023-10-02 08:33:43 -07:00
|
|
|
import { Connectors, EndpointFactory } from '@jsplumb/core';
|
2024-06-10 06:23:06 -07:00
|
|
|
import type { Constructable } from '@jsplumb/util';
|
2023-10-02 08:33:43 -07:00
|
|
|
|
2024-06-10 06:23:06 -07:00
|
|
|
export const JsPlumbPlugin: Plugin = {
|
2023-10-02 08:33:43 -07:00
|
|
|
install: () => {
|
2024-06-10 06:23:06 -07:00
|
|
|
Connectors.register(N8nConnector.type, N8nConnector as Constructable<AbstractConnector>);
|
2023-10-02 08:33:43 -07:00
|
|
|
|
|
|
|
N8nPlusEndpointRenderer.register();
|
|
|
|
EndpointFactory.registerHandler(N8nPlusEndpointHandler);
|
|
|
|
|
|
|
|
N8nAddInputEndpointRenderer.register();
|
|
|
|
EndpointFactory.registerHandler(N8nAddInputEndpointHandler);
|
|
|
|
},
|
|
|
|
};
|