@knime/scripting-editor 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/knime-scripting-editor.js +7430 -29
- package/dist/lib/main.d.ts +5 -1
- package/dist/src/components/CodeEditor.vue.d.ts +24 -1
- package/dist/src/components/CodeEditorControlBar.vue.d.ts +11 -0
- package/dist/src/components/FooterBar.vue.d.ts +5 -0
- package/dist/src/components/HeaderBar.vue.d.ts +30 -0
- package/dist/src/components/ScriptingEditor.vue.d.ts +121 -0
- package/dist/src/scripting-service.d.ts +28 -0
- package/package.json +9 -3
package/dist/lib/main.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import ScriptingEditor from "../src/components/ScriptingEditor.vue";
|
|
1
2
|
import CodeEditor from "../src/components/CodeEditor.vue";
|
|
2
|
-
|
|
3
|
+
import { getScriptingService } from "../src/scripting-service";
|
|
4
|
+
import type { NodeSettings, ScriptingServiceType } from "../src/scripting-service";
|
|
5
|
+
export { ScriptingEditor, CodeEditor, getScriptingService };
|
|
6
|
+
export type { NodeSettings, ScriptingServiceType };
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
language: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: null;
|
|
5
|
+
};
|
|
6
|
+
fileName: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "monaco-created"[], "monaco-created", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
language: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: null;
|
|
14
|
+
};
|
|
15
|
+
fileName: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}>> & {
|
|
20
|
+
"onMonaco-created"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
language: string;
|
|
23
|
+
fileName: string;
|
|
24
|
+
}, {}>;
|
|
2
25
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
2
|
+
controls?(_: {
|
|
3
|
+
class: string;
|
|
4
|
+
}): any;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scriptingEditorCancelled" | "scriptingEditorOkayed")[], "scriptingEditorCancelled" | "scriptingEditorOkayed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
2
|
+
onScriptingEditorCancelled?: ((...args: any[]) => any) | undefined;
|
|
3
|
+
onScriptingEditorOkayed?: ((...args: any[]) => any) | undefined;
|
|
4
|
+
}, {}, {}>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PropType } from "vue";
|
|
2
|
+
import type { MenuItem } from "webapps-common/ui/components/MenuItems.vue";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
title: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
menuItems: {
|
|
9
|
+
type: PropType<MenuItem[]>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}, unknown, unknown, {
|
|
13
|
+
hasMenu(): boolean;
|
|
14
|
+
}, {
|
|
15
|
+
menuItemClicked(event: Event, item: any): void;
|
|
16
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "menu-item-click"[], "menu-item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
title: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: null;
|
|
20
|
+
};
|
|
21
|
+
menuItems: {
|
|
22
|
+
type: PropType<MenuItem[]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & {
|
|
26
|
+
"onMenu-item-click"?: ((...args: any[]) => any) | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
title: string;
|
|
29
|
+
}, {}>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import { editor } from './monaco-editor';
|
|
3
|
+
import type { MenuItem } from "webapps-common/ui/components/MenuItems.vue";
|
|
4
|
+
type PaneSizes = {
|
|
5
|
+
[key in "left" | "right" | "bottom"]: number;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<{
|
|
8
|
+
title: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: null;
|
|
11
|
+
};
|
|
12
|
+
language: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
fileName: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: null;
|
|
19
|
+
};
|
|
20
|
+
rightPaneLayout: {
|
|
21
|
+
type: PropType<"fixed" | "relative">;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
menuItems: {
|
|
25
|
+
type: {
|
|
26
|
+
(arrayLength: number): MenuItem[];
|
|
27
|
+
(...items: MenuItem[]): MenuItem[];
|
|
28
|
+
new (arrayLength: number): MenuItem[];
|
|
29
|
+
new (...items: MenuItem[]): MenuItem[];
|
|
30
|
+
isArray(arg: any): arg is any[];
|
|
31
|
+
readonly prototype: any[];
|
|
32
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
33
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
34
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
35
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
36
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
37
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
38
|
+
};
|
|
39
|
+
default: never[];
|
|
40
|
+
};
|
|
41
|
+
showControlBar: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
}, unknown, {
|
|
46
|
+
currentPaneSizes: PaneSizes;
|
|
47
|
+
initialPaneSizes: PaneSizes;
|
|
48
|
+
previousPaneSizes: PaneSizes;
|
|
49
|
+
commonMenuItems: MenuItem[];
|
|
50
|
+
editorModel: editor.ITextModel | null;
|
|
51
|
+
}, {
|
|
52
|
+
usedMainPaneSize(): number;
|
|
53
|
+
usedHorizontalCodeEditorPaneSize(): number;
|
|
54
|
+
usedVerticalCodeEditorPaneSize(): number;
|
|
55
|
+
isLeftPaneCollapsed(): boolean;
|
|
56
|
+
isRightPaneCollapsed(): boolean;
|
|
57
|
+
isBottomPaneCollapsed(): boolean;
|
|
58
|
+
}, {
|
|
59
|
+
collapsePane(pane: keyof PaneSizes): void;
|
|
60
|
+
resizePane(size: number, pane: keyof PaneSizes, updatePreviousPaneSize?: boolean): void;
|
|
61
|
+
updatePreviousPaneSize(pane: keyof PaneSizes): void;
|
|
62
|
+
updateRightPane(size: number): void;
|
|
63
|
+
onMonacoCreated({ editor, editorModel, }: {
|
|
64
|
+
editor: editor.IStandaloneCodeEditor;
|
|
65
|
+
editorModel: editor.ITextModel;
|
|
66
|
+
}): void;
|
|
67
|
+
saveSettings(): void;
|
|
68
|
+
onMenuItemClicked(args: {
|
|
69
|
+
event: Event;
|
|
70
|
+
item: any;
|
|
71
|
+
}): void;
|
|
72
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("monaco-created" | "menu-item-clicked")[], "monaco-created" | "menu-item-clicked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
73
|
+
title: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: null;
|
|
76
|
+
};
|
|
77
|
+
language: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: null;
|
|
80
|
+
};
|
|
81
|
+
fileName: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: null;
|
|
84
|
+
};
|
|
85
|
+
rightPaneLayout: {
|
|
86
|
+
type: PropType<"fixed" | "relative">;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
menuItems: {
|
|
90
|
+
type: {
|
|
91
|
+
(arrayLength: number): MenuItem[];
|
|
92
|
+
(...items: MenuItem[]): MenuItem[];
|
|
93
|
+
new (arrayLength: number): MenuItem[];
|
|
94
|
+
new (...items: MenuItem[]): MenuItem[];
|
|
95
|
+
isArray(arg: any): arg is any[];
|
|
96
|
+
readonly prototype: any[];
|
|
97
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
98
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
99
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
100
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
101
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
102
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
103
|
+
};
|
|
104
|
+
default: never[];
|
|
105
|
+
};
|
|
106
|
+
showControlBar: {
|
|
107
|
+
type: BooleanConstructor;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
}>> & {
|
|
111
|
+
"onMonaco-created"?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
"onMenu-item-clicked"?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
language: string;
|
|
115
|
+
fileName: string;
|
|
116
|
+
title: string;
|
|
117
|
+
menuItems: MenuItem[];
|
|
118
|
+
rightPaneLayout: "fixed" | "relative";
|
|
119
|
+
showControlBar: boolean;
|
|
120
|
+
}, {}>;
|
|
121
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ConsoleText = {
|
|
2
|
+
text: string;
|
|
3
|
+
stderr: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type NodeSettings = {
|
|
6
|
+
script: string;
|
|
7
|
+
};
|
|
8
|
+
declare class ScriptingService {
|
|
9
|
+
private _knimeService;
|
|
10
|
+
private _jsonDataService;
|
|
11
|
+
private _dialogService;
|
|
12
|
+
private _settings;
|
|
13
|
+
private _eventHandlers;
|
|
14
|
+
private _runEventPoller;
|
|
15
|
+
constructor();
|
|
16
|
+
private eventPoller;
|
|
17
|
+
stopEventPoller(): void;
|
|
18
|
+
sendToService(methodName: string, options?: any[]): Promise<any>;
|
|
19
|
+
getInitialSettings(): Promise<NodeSettings>;
|
|
20
|
+
getFlowVariableSettings(): Promise<any>;
|
|
21
|
+
saveSettings(settings: NodeSettings): Promise<void>;
|
|
22
|
+
registerEventHandler(type: string, handler: (args: any) => void): void;
|
|
23
|
+
registerLanguageServerEventHandler(handler: (message: string) => void): void;
|
|
24
|
+
registerConsoleEventHandler(handler: (text: ConsoleText) => void): void;
|
|
25
|
+
}
|
|
26
|
+
export type ScriptingServiceType = Pick<ScriptingService, keyof ScriptingService>;
|
|
27
|
+
declare const getScriptingService: (mock?: ScriptingServiceType) => ScriptingServiceType;
|
|
28
|
+
export { getScriptingService };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/scripting-editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"description": "Shared Scripting Editor components for KNIME",
|
|
6
6
|
"author": "KNIME AG, Zurich, Switzerland",
|
|
7
7
|
"license": "See the file license.txt",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "run-p type-check build-only",
|
|
10
10
|
"build-only": "vite build",
|
|
11
|
-
"build-watch": "vite build --watch",
|
|
11
|
+
"build-watch": "vite build --minify=false --watch",
|
|
12
12
|
"test:unit": "vitest",
|
|
13
13
|
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
|
14
14
|
"format": "prettier --cache --write .",
|
|
@@ -24,8 +24,12 @@
|
|
|
24
24
|
"prepare": "cd .. && husky install ./org.knime.scripting.editor.js/.husky"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@knime/ui-extension-service": "0.15.0",
|
|
28
|
+
"eslint-import-resolver-typescript": "3.5.5",
|
|
27
29
|
"monaco-editor": "0.40.0",
|
|
30
|
+
"monaco-languageclient": "4.0.3",
|
|
28
31
|
"pinia": "2.1.4",
|
|
32
|
+
"splitpanes": "3.1.5",
|
|
29
33
|
"vue": "3.x",
|
|
30
34
|
"webapps-common": "file:webapps-common"
|
|
31
35
|
},
|
|
@@ -35,6 +39,7 @@
|
|
|
35
39
|
"@tsconfig/node18": "18.2.0",
|
|
36
40
|
"@types/jsdom": "21.1.1",
|
|
37
41
|
"@types/node": "18.17.0",
|
|
42
|
+
"@types/splitpanes": "2.2.1",
|
|
38
43
|
"@vitejs/plugin-vue": "4.2.3",
|
|
39
44
|
"@vitejs/plugin-vue-jsx": "3.0.1",
|
|
40
45
|
"@vitest/coverage-v8": "0.33.0",
|
|
@@ -53,8 +58,9 @@
|
|
|
53
58
|
"vite": "4.4.6",
|
|
54
59
|
"vite-plugin-css-injected-by-js": "3.2.1",
|
|
55
60
|
"vite-plugin-dts": "3.4.0",
|
|
61
|
+
"vite-svg-loader": "4.0.0",
|
|
56
62
|
"vitest": "0.33.0",
|
|
57
|
-
"vue-tsc": "1.8.
|
|
63
|
+
"vue-tsc": "1.8.8"
|
|
58
64
|
},
|
|
59
65
|
"peerDependencies": {
|
|
60
66
|
"vue": "3.x"
|