@knime/hub-features 2.1.1 → 2.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @knime/hub-features
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a10caa6: Add `applyAndExecuteNodeConfigKeyboard` analytics event — a keyboard-shortcut variant of `applyAndExecuteNodeConfig` (same `node_executed` event with `interaction.type` set to `shortcut` instead of `click`).
8
+
9
+ ## 2.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - fd37cd4: adjust casing for event payload properties
14
+
3
15
  ## 2.1.1
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/hub-features",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Vue components & composables for shared hub features",
5
5
  "repository": {
6
6
  "type": "git",
@@ -959,6 +959,30 @@ export const applyAndExecuteNodeConfig = <T extends DefaultContext>(ctx: T) => (
959
959
  return event;
960
960
  };
961
961
 
962
+ /**
963
+ * Fired when the user triggers Apply and Execute in the node configuration panel via keyboard shortcut
964
+ */
965
+ export const applyAndExecuteNodeConfigKeyboard = <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"applyAndExecuteNodeConfigKeyboard">): AnalyticsEvent => {
966
+ const staticData = {
967
+ ...toSnakeCaseDeep(ctx),
968
+ unique_event_id: crypto.randomUUID(),
969
+ timestamp: new Date().toISOString(),
970
+ event_name: "node_executed",
971
+ event_source: "editor",
972
+ event_display_name: "Node executed",
973
+ interaction: {
974
+ location: "node_configuration",
975
+ specification: "apply_and_execute",
976
+ trigger: "user",
977
+ type: "shortcut",
978
+ },
979
+ } satisfies SchemaStaticFields & GeneratedStaticFields;
980
+
981
+ const event = { id: staticData.event_name, data: { ...staticData, payload: { ...toSnakeCaseDeep(eventData as Record<string, any>) } } };
982
+
983
+ return event;
984
+ };
985
+
962
986
  /**
963
987
  * Fired when the user clicks Execute in the node configuration panel
964
988
  */
@@ -629,6 +629,18 @@ export interface AnalyticsEventSchema {
629
629
  };
630
630
  payload: NodeExecutionPayload;
631
631
  };
632
+ applyAndExecuteNodeConfigKeyboard: {
633
+ event_name: "node_executed";
634
+ event_source: "editor";
635
+ event_display_name: "Node executed";
636
+ interaction: {
637
+ location: "node_configuration";
638
+ specification?: "apply_and_execute";
639
+ trigger: InteractionTrigger & "user";
640
+ type: InteractionType & "shortcut";
641
+ };
642
+ payload: NodeExecutionPayload;
643
+ };
632
644
  executeNodeConfig: {
633
645
  event_name: "node_executed";
634
646
  event_source: "editor";
@@ -1181,11 +1193,11 @@ export interface HintIdPayload {
1181
1193
  hintId: string;
1182
1194
  }
1183
1195
  export interface NodeExecutionPayload {
1184
- nodes_executed: {
1196
+ nodesExecuted: {
1185
1197
  nodeType: "node" | "component" | "metanode";
1186
1198
  nodeFactoryId?: string;
1187
1199
  }[];
1188
- total_executed_nodes: number;
1200
+ totalExecutedNodes: number;
1189
1201
  }
1190
1202
  export interface ConfigurationCompletedPayload {
1191
1203
  nodeFactoryId?: string;
@@ -16,6 +16,7 @@
16
16
  "additionalProperties": false,
17
17
  "required": [
18
18
  "applyAndExecuteNodeConfig",
19
+ "applyAndExecuteNodeConfigKeyboard",
19
20
  "executeNodeConfig",
20
21
  "kaiPromptedQA",
21
22
  "kaiPromptedBuild",
@@ -3364,6 +3365,70 @@
3364
3365
  }
3365
3366
  }
3366
3367
  },
3368
+ "applyAndExecuteNodeConfigKeyboard": {
3369
+ "type": "object",
3370
+ "additionalProperties": false,
3371
+ "$comment": "Fired when the user triggers Apply and Execute in the node configuration panel via keyboard shortcut",
3372
+ "required": [
3373
+ "event_name",
3374
+ "event_source",
3375
+ "event_display_name",
3376
+ "interaction",
3377
+ "payload"
3378
+ ],
3379
+ "properties": {
3380
+ "event_name": {
3381
+ "type": "string",
3382
+ "const": "node_executed"
3383
+ },
3384
+ "event_source": {
3385
+ "type": "string",
3386
+ "const": "editor"
3387
+ },
3388
+ "event_display_name": {
3389
+ "type": "string",
3390
+ "const": "Node executed"
3391
+ },
3392
+ "interaction": {
3393
+ "type": "object",
3394
+ "additionalProperties": false,
3395
+ "required": ["location", "trigger", "type"],
3396
+ "properties": {
3397
+ "location": {
3398
+ "type": "string",
3399
+ "const": "node_configuration"
3400
+ },
3401
+ "specification": {
3402
+ "type": "string",
3403
+ "const": "apply_and_execute"
3404
+ },
3405
+ "trigger": {
3406
+ "allOf": [
3407
+ {
3408
+ "$ref": "#/definitions/InteractionTrigger"
3409
+ },
3410
+ {
3411
+ "const": "user"
3412
+ }
3413
+ ]
3414
+ },
3415
+ "type": {
3416
+ "allOf": [
3417
+ {
3418
+ "$ref": "#/definitions/InteractionType"
3419
+ },
3420
+ {
3421
+ "const": "shortcut"
3422
+ }
3423
+ ]
3424
+ }
3425
+ }
3426
+ },
3427
+ "payload": {
3428
+ "$ref": "#/definitions/NodeExecutionPayload"
3429
+ }
3430
+ }
3431
+ },
3367
3432
  "executeNodeConfig": {
3368
3433
  "type": "object",
3369
3434
  "additionalProperties": false,
@@ -6340,9 +6405,9 @@
6340
6405
  "NodeExecutionPayload": {
6341
6406
  "type": "object",
6342
6407
  "additionalProperties": false,
6343
- "required": ["nodes_executed", "total_executed_nodes"],
6408
+ "required": ["nodesExecuted", "totalExecutedNodes"],
6344
6409
  "properties": {
6345
- "nodes_executed": {
6410
+ "nodesExecuted": {
6346
6411
  "type": "array",
6347
6412
  "items": {
6348
6413
  "type": "object",
@@ -6359,7 +6424,7 @@
6359
6424
  }
6360
6425
  }
6361
6426
  },
6362
- "total_executed_nodes": {
6427
+ "totalExecutedNodes": {
6363
6428
  "type": "number"
6364
6429
  }
6365
6430
  }