@knime/scripting-editor 0.0.34 → 0.0.36

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.
@@ -1,12 +1,28 @@
1
1
  export type InputOutputModel = {
2
2
  name: string;
3
+ /**
4
+ * Code alias for inserting the entire I/O-Object
5
+ */
3
6
  codeAlias?: string;
7
+ /**
8
+ * Template string for inserting one or multiple columns of the I/O-Object
9
+ */
10
+ subItemCodeAliasTemplate?: string;
11
+ /**
12
+ * If an import is required to use this I/O-Object, this import string will be pasted
13
+ * at the beginning of the script if it is not present
14
+ */
15
+ requiredImport?: string;
16
+ /**
17
+ * Whether multi selection of subItems is supported or not
18
+ */
19
+ multiSelection?: boolean;
4
20
  subItems?: {
5
21
  name: string;
6
22
  type: string;
7
- codeAlias?: string;
8
23
  }[];
9
24
  };
25
+ export declare const INPUT_OUTPUT_DRAG_EVENT_ID = "input_output_drag_event";
10
26
  declare const _default: import("vue").DefineComponent<{
11
27
  inputOutputItem: {
12
28
  type: import("vue").PropType<InputOutputModel>;
@@ -1,2 +1,6 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ "drop-event-handler-created": (dropEventHandler: Function) => void;
3
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
4
+ "onDrop-event-handler-created"?: ((dropEventHandler: Function) => any) | undefined;
5
+ }, {}, {}>;
2
6
  export default _default;
@@ -59,6 +59,7 @@ declare const _default: import("vue").DefineComponent<{
59
59
  label: string;
60
60
  }[];
61
61
  bottomPaneActiveTab: import("vue").Ref<string>;
62
+ dropEventHandler: Function | null;
62
63
  }, {
63
64
  usedMainPaneSize(): number;
64
65
  usedHorizontalCodeEditorPaneSize(): number;
@@ -81,6 +82,7 @@ declare const _default: import("vue").DefineComponent<{
81
82
  event: Event;
82
83
  item: SettingsMenuItem;
83
84
  }): void;
85
+ onDropEventHandlerCreated(dropEventHandler: Function): void;
84
86
  onConsoleCreated(handler: ConsoleHandler): void;
85
87
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("monaco-created" | "menu-item-clicked" | "save-settings")[], "monaco-created" | "menu-item-clicked" | "save-settings", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
86
88
  title: {
@@ -0,0 +1,9 @@
1
+ export declare const createDragGhost: ({ width, elements, numSelectedItems, font, }: {
2
+ width: string;
3
+ elements: {
4
+ text: string;
5
+ }[];
6
+ numSelectedItems: number;
7
+ font?: string | undefined;
8
+ }) => HTMLDivElement;
9
+ export declare const removeDragGhost: () => void;
@@ -1,4 +1,4 @@
1
- import { editor as monaco } from "monaco-editor";
1
+ import { editor as monaco, type IDisposable } from "monaco-editor";
2
2
  export declare class EditorService {
3
3
  editor?: monaco.IStandaloneCodeEditor;
4
4
  editorModel?: monaco.ITextModel;
@@ -23,4 +23,5 @@ export declare class EditorService {
23
23
  */
24
24
  setScript(newScript: string): void;
25
25
  pasteToEditor(textToPaste: string): void;
26
+ setOnDidChangeContentListener(callback: Function): IDisposable | null;
26
27
  }
@@ -1,4 +1,4 @@
1
- import { editor as monaco } from "monaco-editor";
1
+ import { editor as monaco, type IDisposable } from "monaco-editor";
2
2
  import type { ConsoleText } from "./components/OutputConsole.vue";
3
3
  import type { InputOutputModel } from "./components/InputOutputItem.vue";
4
4
  export type NodeSettings = {
@@ -30,6 +30,7 @@ declare class ScriptingService {
30
30
  configureLanguageServer(settings: any): Promise<void>;
31
31
  setScript(newScript: string): void;
32
32
  pasteToEditor(textToPaste: string): void;
33
+ setOnDidChangeContentListener(callback: Function): IDisposable | null;
33
34
  supportsCodeAssistant(): Promise<boolean>;
34
35
  inputsAvailable(): Promise<boolean>;
35
36
  getFlowVariableInputs(): Promise<InputOutputModel>;
@@ -1,3 +1,4 @@
1
+ import type { InputOutputModel } from "./components/InputOutputItem.vue";
1
2
  export interface Message {
2
3
  role: "reply" | "request";
3
4
  content: string;
@@ -12,3 +13,24 @@ export type PromptResponseStore = {
12
13
  export declare const usePromptResponseStore: () => PromptResponseStore;
13
14
  export declare const clearPromptResponseStore: () => void;
14
15
  export declare const showDisclaimer: import("vue").Ref<boolean>;
16
+ /**
17
+ * Stores the current selection of input/output items
18
+ */
19
+ export interface InputOutputSelectionStore {
20
+ selectedItem?: InputOutputModel;
21
+ selectedIndices?: Set<number>;
22
+ /**
23
+ *
24
+ * @param item The InputOutputModel that was clicked on
25
+ * @param rangeSelectKeyPressed Whether to do a range selection
26
+ * @param multiSelectKeyPressed Whether to do a multi selection
27
+ * @param index The index of the subitem that was clicked on, undefined if collapser header is clicked
28
+ * @returns
29
+ */
30
+ handleSelection: (item: InputOutputModel, rangeSelectKeyPressed: boolean, multiSelectKeyPressed: boolean, index?: number) => void;
31
+ clearSelection: () => void;
32
+ }
33
+ /**
34
+ * @returns the store that is used to store the current selection for drag/drop of input/output objects into the code editor
35
+ */
36
+ export declare const useInputOutputSelectionStore: () => InputOutputSelectionStore;