@conduction/nextcloud-vue 2.56.0-beta.21 → 2.56.0-beta.22

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.
@@ -37,7 +37,9 @@
37
37
  v-bind="nodeProps"
38
38
  :deletable="!readOnly"
39
39
  @connect="onConnect"
40
- @remove="onNodeRemove">
40
+ @remove="onNodeRemove"
41
+ @activate="onNodeActivate"
42
+ @menu="onNodeMenu">
41
43
  <template #default="slotProps">
42
44
  <!-- @slot node The body of a step, rendered inside the
43
45
  focusable node wrapper. Receives `{ node }` with the
@@ -266,6 +268,8 @@ export default {
266
268
  'canvas-drop',
267
269
 
268
270
  'node-remove',
271
+ 'node-activate',
272
+ 'node-menu',
269
273
 
270
274
  /**
271
275
  * The canvas zoom changed, by any route — a control here, the host's own
@@ -415,6 +419,41 @@ export default {
415
419
  return port === 'in' ? null : port
416
420
  },
417
421
 
422
+ /**
423
+ * Forward Enter or Space on a node: the keyboard double-click.
424
+ *
425
+ * @param {string} id The node id.
426
+ * @return {void}
427
+ */
428
+ onNodeActivate(id) {
429
+ if (this.readOnly === true) {
430
+ return
431
+ }
432
+
433
+ /**
434
+ * @event node-activate Enter or Space on a node. Payload is the id.
435
+ */
436
+ this.$emit('node-activate', id)
437
+ },
438
+
439
+ /**
440
+ * Forward Shift+F10 or the menu key on a node: the keyboard click menu.
441
+ *
442
+ * @param {object} request `{ id, clientX, clientY }`, a point at the node.
443
+ * @return {void}
444
+ */
445
+ onNodeMenu(request) {
446
+ if (this.readOnly === true) {
447
+ return
448
+ }
449
+
450
+ /**
451
+ * @event node-menu Shift+F10 or the menu key on a node. Payload is
452
+ * `{ id, clientX, clientY }`.
453
+ */
454
+ this.$emit('node-menu', request)
455
+ },
456
+
418
457
  /**
419
458
  * Forward a node click.
420
459
  *