@elyra/canvas 13.18.0 → 13.19.0

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.
Files changed (40) hide show
  1. package/dist/{canvas-controller-3167f316.js → canvas-controller-4d841ec9.js} +2 -2
  2. package/dist/{canvas-controller-3167f316.js.map → canvas-controller-4d841ec9.js.map} +1 -1
  3. package/dist/{canvas-controller-b094c53e.js → canvas-controller-792555e4.js} +2 -2
  4. package/dist/{canvas-controller-b094c53e.js.map → canvas-controller-792555e4.js.map} +1 -1
  5. package/dist/{common-canvas-5a9f57c1.js → common-canvas-1ac3023c.js} +2 -2
  6. package/dist/{common-canvas-5a9f57c1.js.map → common-canvas-1ac3023c.js.map} +1 -1
  7. package/dist/{common-canvas-90e4c9bc.js → common-canvas-9febc182.js} +2 -2
  8. package/dist/{common-canvas-90e4c9bc.js.map → common-canvas-9febc182.js.map} +1 -1
  9. package/dist/common-canvas.es.js +1 -1
  10. package/dist/common-canvas.js +1 -1
  11. package/dist/lib/canvas-controller.es.js +1 -1
  12. package/dist/lib/canvas-controller.js +1 -1
  13. package/dist/lib/canvas.es.js +1 -1
  14. package/dist/lib/canvas.js +1 -1
  15. package/dist/styles/common-canvas.min.css +1 -1
  16. package/dist/styles/common-canvas.min.css.map +1 -1
  17. package/locales/command-actions/locales/index.d.ts +18 -0
  18. package/locales/common-canvas/locales/index.d.ts +18 -0
  19. package/locales/common-properties/locales/index.d.ts +18 -0
  20. package/locales/notification-panel/locales/index.d.ts +18 -0
  21. package/locales/palette/locales/index.d.ts +18 -0
  22. package/locales/toolbar/locales/index.d.ts +18 -0
  23. package/package.json +13 -3
  24. package/src/common-canvas/canvas-controller.js +6 -1
  25. package/src/common-canvas/svg-canvas-renderer.js +34 -28
  26. package/src/toolbar/toolbar.scss +1 -2
  27. package/stats.html +1 -1
  28. package/types/common-canvas.ts +2944 -0
  29. package/types/common-properties-controller.ts +466 -0
  30. package/types/common-properties-schema-types/app-data-def-v3.ts +22 -0
  31. package/types/common-properties-schema-types/conditions-v3.ts +323 -0
  32. package/types/common-properties-schema-types/expression-info-v3.ts +172 -0
  33. package/types/common-properties-schema-types/function-list-v3.ts +97 -0
  34. package/types/common-properties-schema-types/operator-v3.ts +192 -0
  35. package/types/common-properties-schema-types/parameter-defs-v3.ts +73 -0
  36. package/types/common-properties-schema-types/uihints-v3.ts +709 -0
  37. package/types/common-properties.ts +416 -0
  38. package/types/index.d.ts +18 -0
  39. package/types/index.test-d.ts +204 -0
  40. package/types/sample-content.tsx +14 -0
@@ -0,0 +1,192 @@
1
+ /*
2
+ * Copyright 2017-2024 Elyra Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { AppDataDef } from "./app-data-def-v3";
18
+
19
+ /* eslint-disable */
20
+ /**
21
+ * This file was automatically generated by json-schema-to-typescript
22
+ * from https://github.com/elyra-ai/pipeline-schemas/blob/main/common-pipeline/operators/operator-v3-schema.json
23
+ * It has been modified by hand, so run a diff if you need to update it.
24
+ */
25
+
26
+ type basicParameterTypes =
27
+ | 'integer'
28
+ | 'double'
29
+ | 'string'
30
+ | 'date'
31
+ | 'time'
32
+ | 'timestamp'
33
+ | 'custom'
34
+ | 'boolean'
35
+ | 'password';
36
+
37
+ /** https://elyra-ai.github.io/canvas/04.01-parameter-definition/#parameter-definitions */
38
+ type allParameterTypes =
39
+ | `array[${string}]`
40
+ | `map[string, ${string}]`
41
+ | basicParameterTypes
42
+ | string;
43
+
44
+ /**
45
+ * Operator parameters definition
46
+ */
47
+ export type ParameterDefinition = ParameterDefinition1 & {
48
+ /**
49
+ * A unique name for the parameter.
50
+ */
51
+ id?: string;
52
+ /**
53
+ * Indication whether parameter is required or optional
54
+ */
55
+ required?: boolean;
56
+ /**
57
+ * Role of parameter
58
+ */
59
+ role?: 'column' | 'new_column' | 'expression';
60
+ /**
61
+ * Field type. Can be a primitive type (string, integer, double, date, time, timestamp, or custom), an array, or map containing those types(note arrays and maps can contain complex_types)
62
+ */
63
+ type?: allParameterTypes;
64
+ /**
65
+ * List of valid values. Can be used instead of specifying type.
66
+ */
67
+ enum?: unknown[];
68
+ /**
69
+ * default value based on type of parameter
70
+ */
71
+ default?:
72
+ | ParameterRefDefinition
73
+ | (
74
+ | string
75
+ | number
76
+ | boolean
77
+ | unknown[]
78
+ | {
79
+ [k: string]: unknown;
80
+ }
81
+ | null
82
+ );
83
+ [k: string]: unknown;
84
+ };
85
+ export type ParameterDefinition1 = {
86
+ [k: string]: unknown;
87
+ };
88
+
89
+ /**
90
+ * Operator schema for the Watson Data Platform
91
+ */
92
+ export interface WatsonDataPlatformOperatorSchema {
93
+ /**
94
+ * Operator identifier
95
+ */
96
+ id: string;
97
+ /**
98
+ * Refers to the JSON schema used to validate documents of this type
99
+ */
100
+ json_schema?: 'https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json';
101
+ /**
102
+ * operator type
103
+ */
104
+ operator_type:
105
+ | 'model'
106
+ | 'transformer'
107
+ | 'estimator'
108
+ | 'dataReader'
109
+ | 'dataWriter';
110
+ /**
111
+ * List of input ports. If no ports are defined this is a source operator that accepts no data inputs. If the input_ports array is missing a single input port with id 'input_port' is assumed which accepts only a single connection.
112
+ *
113
+ * @minItems 0
114
+ */
115
+ input_ports?: PortDefinition[];
116
+ /**
117
+ * List of output ports. If no ports are defined this is a terminal operator that provides no data outputs. If the output_ports array is missing a single output port named 'output_port' is assumed which accepts multiple connections.
118
+ *
119
+ * @minItems 0
120
+ */
121
+ output_ports?: PortDefinition[];
122
+ /**
123
+ * List of complex types
124
+ */
125
+ complex_types?: ComplexTypeDefinition[];
126
+ /**
127
+ * List of parameters
128
+ */
129
+ parameters: ParameterDefinition[];
130
+ app_data?: AppDataDef;
131
+ [k: string]: unknown;
132
+ }
133
+ /**
134
+ * Operator ports support multiple differentiated connections for either inputs or outputs.
135
+ */
136
+ export interface PortDefinition {
137
+ /**
138
+ * Unique identifier within the node
139
+ */
140
+ id?: string;
141
+ /**
142
+ * Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.
143
+ */
144
+ cardinality?: {
145
+ /**
146
+ * Minimum data sets that are required for this port
147
+ */
148
+ min?: number;
149
+ /**
150
+ * Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.
151
+ */
152
+ max?: number;
153
+ };
154
+ /**
155
+ * List of parameters
156
+ */
157
+ parameters?: ParameterDefinition[];
158
+ /**
159
+ * List of complex types
160
+ */
161
+ complex_types?: ComplexTypeDefinition[];
162
+ [k: string]: unknown;
163
+ }
164
+ /**
165
+ * Structure for parameter refs
166
+ */
167
+ export interface ParameterRefDefinition {
168
+ /**
169
+ * Reference to another parameter.
170
+ */
171
+ parameter_ref: string;
172
+ [k: string]: unknown;
173
+ }
174
+ /**
175
+ * Structure for complex parameters
176
+ */
177
+ export interface ComplexTypeDefinition {
178
+ /**
179
+ * Identifier of complex type, can be referenced in other places.
180
+ */
181
+ id: string;
182
+ /**
183
+ * Used to determine how parameters in the complex_type stored. Valid values are array and object.
184
+ */
185
+ type?: string;
186
+ key_definition?: ParameterDefinition;
187
+ /**
188
+ * List of parameters
189
+ */
190
+ parameters: (ParameterDefinition | ComplexTypeDefinition)[];
191
+ [k: string]: unknown;
192
+ }
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Copyright 2017-2024 Elyra Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /* eslint-disable */
18
+ /**
19
+ * This file was automatically generated by json-schema-to-typescript
20
+ * from https://github.com/elyra-ai/pipeline-schemas/blob/main/common-canvas/parameter-defs/parameter-defs-v3-schema.json
21
+ * It has been modified by hand, so run a diff if you need to update it.
22
+ */
23
+
24
+ import { ConditionsDefinition } from './conditions-v3';
25
+ import {
26
+ ComplexTypeDefinition,
27
+ ParameterDefinition,
28
+ } from './operator-v3';
29
+ import { WDPUIHintsSchema } from './uihints-v3';
30
+
31
+ /**
32
+ * Watson Data Platform Property Definition Schema for the Common Properties editor
33
+ */
34
+ export interface PropertyDefinitionsSchema {
35
+ titleDefinition?: {
36
+ title?: string;
37
+ /**
38
+ * True if the title can be edited. False if the title should be readonly.
39
+ */
40
+ editable?: boolean;
41
+ [k: string]: unknown;
42
+ };
43
+ /**
44
+ * Current parameter set upon input. Keys are parameter names, values are their values.
45
+ */
46
+ current_parameters?: {
47
+ [k: string]: unknown;
48
+ };
49
+ /**
50
+ * Current UI only parameter set upon input. Keys are parameter names, values are their values.
51
+ */
52
+ current_ui_parameters?: {
53
+ [k: string]: unknown;
54
+ };
55
+ parameters?: ParameterDefinition[];
56
+ complex_types?: ComplexTypeDefinition[];
57
+ uihints?: WDPUIHintsSchema;
58
+ conditions?: ConditionsDefinition[];
59
+ dataset_metadata?:
60
+ | {
61
+ [k: string]: unknown;
62
+ }
63
+ | {
64
+ [k: string]: unknown;
65
+ }[];
66
+ /**
67
+ * Map of string resources.
68
+ */
69
+ resources?: {
70
+ [k: string]: unknown;
71
+ };
72
+ [k: string]: unknown;
73
+ }