@knime/scripting-editor 0.0.67 → 0.0.69

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.
@@ -22,13 +22,14 @@ const l = {
22
22
  ]
23
23
  }
24
24
  ]
25
- }, c = 100, a = 2e3, r = (e, ...i) => {
25
+ }, a = 100, c = 2e3, r = (e, ...i) => {
26
26
  typeof consola > "u" ? console.log(e, ...i) : consola.log(e, ...i);
27
27
  }, u = (e, ...i) => {
28
28
  typeof consola > "u" ? console.error(e, ...i) : consola.error(e, ...i);
29
- }, g = [
29
+ }, p = [
30
30
  {
31
31
  name: "Input table 1",
32
+ portType: "table",
32
33
  subItems: [
33
34
  {
34
35
  name: "Column 1",
@@ -44,12 +45,14 @@ const l = {
44
45
  }
45
46
  ]
46
47
  }
47
- ], d = [
48
+ ], g = [
48
49
  {
49
- name: "Output table 1"
50
+ name: "Output table 1",
51
+ portType: "table"
50
52
  }
51
- ], p = {
53
+ ], d = {
52
54
  name: "Flow Variables",
55
+ portType: "flowVariable",
53
56
  subItems: [
54
57
  {
55
58
  name: "flowVar1",
@@ -69,7 +72,7 @@ const l = {
69
72
  getHubId: () => Promise.resolve("My Mocked KNIME Hub"),
70
73
  isLoggedIn: () => Promise.resolve(!0),
71
74
  suggestCode: async () => {
72
- await o(a);
75
+ await o(c);
73
76
  const t = i.get("codeSuggestion");
74
77
  return typeof t < "u" && t({
75
78
  status: "SUCCESS",
@@ -80,7 +83,7 @@ const l = {
80
83
  };
81
84
  return {
82
85
  async sendToService(t, n) {
83
- return r(`Called scriptingService.sendToService("${t}")`, n), await o(c), e.sendToServiceMockResponses && t in e.sendToServiceMockResponses ? e.sendToServiceMockResponses[t](n) : t in s ? s[t](n) : (u(
86
+ return r(`Called scriptingService.sendToService("${t}")`, n), await o(a), e.sendToServiceMockResponses && t in e.sendToServiceMockResponses ? e.sendToServiceMockResponses[t](n) : t in s ? s[t](n) : (u(
84
87
  `${t} not implemented in sendToServiceMockResponses.
85
88
  Returning undefined.`
86
89
  ), Promise.resolve());
@@ -97,14 +100,14 @@ const l = {
97
100
  return r("Called scriptingService.inputsAvailable"), Promise.resolve(e.inputsAvailable ?? !0);
98
101
  },
99
102
  getInputObjects() {
100
- return r("Called scriptingService.getInputObjects"), Promise.resolve(e.inputObjects ?? g);
103
+ return r("Called scriptingService.getInputObjects"), Promise.resolve(e.inputObjects ?? p);
101
104
  },
102
105
  getOutputObjects() {
103
- return r("Called scriptingService.getOutputObjects"), Promise.resolve(e.outputObjects ?? d);
106
+ return r("Called scriptingService.getOutputObjects"), Promise.resolve(e.outputObjects ?? g);
104
107
  },
105
108
  getFlowVariableInputs() {
106
109
  return r("Called scriptingService.getFlowVariableInputs"), Promise.resolve(
107
- e.flowVariableInputs ?? p
110
+ e.flowVariableInputs ?? d
108
111
  );
109
112
  },
110
113
  getPortConfigs() {
@@ -133,8 +136,8 @@ const l = {
133
136
  };
134
137
  };
135
138
  export {
136
- p as DEFAULT_FLOW_VARIABLE_INPUTS,
137
- g as DEFAULT_INPUT_OBJECTS,
138
- d as DEFAULT_OUTPUT_OBJECTS,
139
+ d as DEFAULT_FLOW_VARIABLE_INPUTS,
140
+ p as DEFAULT_INPUT_OBJECTS,
141
+ g as DEFAULT_OUTPUT_OBJECTS,
139
142
  S as createScriptingServiceMock
140
143
  };
@@ -14,6 +14,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
14
14
  type: StringConstructor;
15
15
  default: null;
16
16
  };
17
+ showButtonText: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
17
21
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
22
  currentPaneSizes: {
19
23
  type: PropType<PaneSizes>;
@@ -27,9 +31,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
27
31
  type: StringConstructor;
28
32
  default: null;
29
33
  };
34
+ showButtonText: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
30
38
  }>>, {
31
39
  language: string;
32
40
  currentPaneSizes: PaneSizes;
41
+ showButtonText: boolean;
33
42
  }, {}>, {
34
43
  controls?(_: {}): any;
35
44
  }>;
@@ -1,5 +1,13 @@
1
1
  export type InputOutputModel = {
2
2
  name: string;
3
+ /**
4
+ * Represents the type of the item, e.g. input table, flow variable, port object...
5
+ */
6
+ portType?: "table" | "flowVariable" | "object" | "view";
7
+ /**
8
+ * Color of the port icon
9
+ */
10
+ portIconColor?: string;
3
11
  /**
4
12
  * Code alias for inserting the entire I/O-Object
5
13
  */
@@ -3,7 +3,7 @@ import { NodeSettings } from '../scripting-service';
3
3
  import { MenuItem } from 'webapps-common/ui/components/MenuItems.vue';
4
4
 
5
5
  interface Props {
6
- title: string;
6
+ title?: string | null;
7
7
  language: string;
8
8
  fileName?: string | null;
9
9
  rightPaneLayout?: "fixed" | "relative";
@@ -12,8 +12,10 @@ interface Props {
12
12
  initialPaneSizes?: PaneSizes;
13
13
  rightPaneMinimumWidthInPixel?: number;
14
14
  toSettings?: (settings: NodeSettings) => NodeSettings;
15
+ showOutputTable?: boolean;
15
16
  }
16
17
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
18
+ title: null;
17
19
  fileName: null;
18
20
  rightPaneLayout: string;
19
21
  menuItems: () => never[];
@@ -25,10 +27,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
25
27
  };
26
28
  rightPaneMinimumWidthInPixel: () => 0;
27
29
  toSettings: (settings: NodeSettings) => NodeSettings;
30
+ showOutputTable: boolean;
28
31
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
32
  "input-output-item-insertion": (...args: any[]) => void;
30
33
  "menu-item-clicked": (...args: any[]) => void;
31
34
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
35
+ title: null;
32
36
  fileName: null;
33
37
  rightPaneLayout: string;
34
38
  menuItems: () => never[];
@@ -40,10 +44,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
40
44
  };
41
45
  rightPaneMinimumWidthInPixel: () => 0;
42
46
  toSettings: (settings: NodeSettings) => NodeSettings;
47
+ showOutputTable: boolean;
43
48
  }>>> & {
44
49
  "onInput-output-item-insertion"?: ((...args: any[]) => any) | undefined;
45
50
  "onMenu-item-clicked"?: ((...args: any[]) => any) | undefined;
46
51
  }, {
52
+ title: string | null;
47
53
  menuItems: MenuItem<any, any>[];
48
54
  showControlBar: boolean;
49
55
  fileName: string | null;
@@ -51,11 +57,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
51
57
  rightPaneLayout: "fixed" | "relative";
52
58
  initialPaneSizes: PaneSizes;
53
59
  rightPaneMinimumWidthInPixel: number;
60
+ showOutputTable: boolean;
54
61
  }, {}>, {
55
62
  "settings-title"?(_: {}): any;
56
63
  "settings-content"?(_: {}): any;
57
64
  editor?(_: {}): any;
58
- "code-editor-controls"?(_: {}): any;
65
+ "code-editor-controls"?(_: {
66
+ showButtonText: boolean;
67
+ }): any;
59
68
  "right-pane"?(_: {}): any;
60
69
  "console-status"?(_: {}): any;
61
70
  }>;
@@ -1,4 +1,6 @@
1
- export declare const MIN_WIDTH_FOR_DISPLAYING_PANES = 300;
1
+ export declare const MIN_WIDTH_FOR_DISPLAYING_PANES = 400;
2
+ export declare const MIN_WIDTH_FOR_DISPLAYING_LEFT_PANE = 700;
3
+ export declare const MIN_WIDTH_FOR_SHOWING_BUTTON_TEXT = 400;
2
4
  export type PaneSizes = {
3
5
  [key in "left" | "right" | "bottom"]: number;
4
6
  };
@@ -5,7 +5,9 @@ type ContainerParams = {
5
5
  /** The HTML element to mount the editor to. */
6
6
  container: Ref<HTMLDivElement | undefined>;
7
7
  };
8
- export type UseCodeEditorParams = ContainerParams & ({
8
+ export type UseCodeEditorParams = ContainerParams & {
9
+ hideOverviewRulerLanes?: boolean;
10
+ } & ({
9
11
  language: string;
10
12
  fileName: string;
11
13
  } | {
@@ -1,23 +1,9 @@
1
1
  import { NodeSettings, ScriptingServiceType } from './scripting-service';
2
2
  import { InputOutputModel } from './components/InputOutputItem.vue';
3
3
 
4
- export declare const DEFAULT_INPUT_OBJECTS: {
5
- name: string;
6
- subItems: {
7
- name: string;
8
- type: string;
9
- }[];
10
- }[];
11
- export declare const DEFAULT_OUTPUT_OBJECTS: {
12
- name: string;
13
- }[];
14
- export declare const DEFAULT_FLOW_VARIABLE_INPUTS: {
15
- name: string;
16
- subItems: {
17
- name: string;
18
- type: string;
19
- }[];
20
- };
4
+ export declare const DEFAULT_INPUT_OBJECTS: InputOutputModel[];
5
+ export declare const DEFAULT_OUTPUT_OBJECTS: InputOutputModel[];
6
+ export declare const DEFAULT_FLOW_VARIABLE_INPUTS: InputOutputModel;
21
7
  export type ScriptingServiceMockOptions = {
22
8
  sendToServiceMockResponses?: Record<string, (options?: any[]) => Promise<any>>;
23
9
  initialSettings?: NodeSettings;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knime/scripting-editor",
3
3
  "type": "module",
4
- "version": "0.0.67",
4
+ "version": "0.0.69",
5
5
  "description": "Shared Scripting Editor components for KNIME",
6
6
  "author": "KNIME AG, Zurich, Switzerland",
7
7
  "license": "See the file license.txt",