@kumologica/sdk 3.0.22 → 3.0.26

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "productName": "Kumologica Designer",
4
4
  "copyright": "Copyright 2020 Kumologica Pty Ltd, All Rights Reserved.",
5
5
  "author": "Kumologica Pty Ltd <contact@kumologica.com>",
6
- "version": "3.0.22",
6
+ "version": "3.0.26",
7
7
  "description": "Kumologica Designer, harnessing Serverless for your cloud integration needs",
8
8
  "main": "src/app/main.js",
9
9
  "files": [
@@ -65,9 +65,9 @@
65
65
  "license": "Proprietary",
66
66
  "dependencies": {
67
67
  "@electron/remote": "^2.0.8",
68
- "@kumologica/builder": "3.0.22",
69
- "@kumologica/devkit": "3.0.22",
70
- "@kumologica/runtime": "3.0.22",
68
+ "@kumologica/builder": "3.0.26",
69
+ "@kumologica/devkit": "3.0.26",
70
+ "@kumologica/runtime": "3.0.26",
71
71
  "adm-zip": "0.4.13",
72
72
  "ajv": "8.10.0",
73
73
  "aws-sdk": "2.513.0",
@@ -25,13 +25,13 @@ let appTemplate = [
25
25
  label: 'Kumologica Designer', //app.name,
26
26
  submenu: [
27
27
  { role: 'about' },
28
- {
28
+ /* {
29
29
  label: 'Check for Updates',
30
30
  click() {
31
31
  ipcMain.emit('menu-check-for-updates');
32
32
  },
33
33
  },
34
- { type: 'separator' },
34
+ */ { type: 'separator' },
35
35
  { role: 'services' },
36
36
  { type: 'separator' },
37
37
  { role: 'hide' },
@@ -117,7 +117,7 @@ let appTemplate = [
117
117
  submenu: [
118
118
  { role: 'reload' },
119
119
  { role: 'forcereload' },
120
- /*{ role: 'toggledevtools' },*/
120
+ // { role: 'toggledevtools' },
121
121
  { type: 'separator' },
122
122
  { role: 'resetzoom' },
123
123
  { role: 'zoomin' },
@@ -19011,8 +19011,13 @@ RED.h = handlers;
19011
19011
  {
19012
19012
  title: 'Cut',
19013
19013
  shortcut: 'Ctrl+X',
19014
- action: async function(elm, d, i) {
19015
- RED.view.select(d.id);
19014
+ action: async function(elm, d, i, ctx) {
19015
+ if (ctx && ctx.nodes) {
19016
+ RED.view.select(ctx.nodes.map(n => n.id));
19017
+ } else {
19018
+ RED.view.select(d.id);
19019
+ }
19020
+
19016
19021
  copySelection();
19017
19022
  deleteSelection();
19018
19023
  }
@@ -19020,8 +19025,12 @@ RED.h = handlers;
19020
19025
  {
19021
19026
  title: 'Copy',
19022
19027
  shortcut: 'Ctrl+C',
19023
- action: async function(elm, d, i) {
19024
- RED.view.select(d.id);
19028
+ action: async function(elm, d, i, ctx) {
19029
+ if (ctx && ctx.nodes) {
19030
+ RED.view.select(ctx.nodes.map(n => n.id));
19031
+ } else {
19032
+ RED.view.select(d.id);
19033
+ }
19025
19034
  copySelection();
19026
19035
  }
19027
19036
  },
@@ -19035,8 +19044,12 @@ RED.h = handlers;
19035
19044
  {
19036
19045
  title: 'Delete',
19037
19046
  shortcut: 'Del',
19038
- action: async function(elm, d, i) {
19039
- RED.view.select(d.id);
19047
+ action: async function(elm, d, i, ctx) {
19048
+ if (ctx && ctx.nodes) {
19049
+ RED.view.select(ctx.nodes.map(n => n.id));
19050
+ } else {
19051
+ RED.view.select(d.id);
19052
+ }
19040
19053
  deleteSelection();
19041
19054
  redraw();
19042
19055
  }
@@ -19044,15 +19057,25 @@ RED.h = handlers;
19044
19057
  { separator: true },
19045
19058
  {
19046
19059
  title: 'Copy Node ID',
19047
- action: async function(elm, d, i) {
19048
- RED.clipboard.copyText(d.id);
19049
- RED.notify(`Node ID [ <b>${d.id}</b> ] copied to clipboard`)
19060
+ action: async function(elm, d, i, ctx) {
19061
+ if (ctx.nodes.length > 1){
19062
+ RED.notify('<strong>Error:</strong> This option requires selecing a single node', 'error');
19063
+ return;
19064
+ } else {
19065
+ RED.clipboard.copyText(d.id);
19066
+ RED.notify(`Node ID [ <b>${d.id}</b> ] copied to clipboard`)
19067
+ }
19050
19068
  }
19051
19069
  },
19052
19070
  {
19053
19071
  title: 'Settings...',
19054
- action: async function(elm, d, i) {
19055
- RED.editor.edit(d);
19072
+ action: async function(elm, d, i, ctx) {
19073
+ if (ctx.nodes.length > 1){
19074
+ RED.notify('<strong>Error:</strong> This options requires selecting a single node', 'error');
19075
+ return;
19076
+ } else {
19077
+ RED.editor.edit(d);
19078
+ }
19056
19079
  }
19057
19080
  }
19058
19081
  ];
@@ -19068,7 +19091,12 @@ RED.h = handlers;
19068
19091
 
19069
19092
 
19070
19093
  let nodeId = d.id.replace('.', '_');
19071
- node.on('contextmenu', d3.contextMenu(nodeId, menu, ()=> { zoomZero() }));
19094
+ node.on('contextmenu', d3.contextMenu(nodeId, menu, ()=> {
19095
+ console.log('[view] before context menu');
19096
+ console.log('[view] selection of nodes:', RED.view.selection());
19097
+ zoomZero()
19098
+ return RED.view.selection();
19099
+ }));
19072
19100
 
19073
19101
  contextMenuLayer
19074
19102
  .append('foreignObject')
@@ -20405,10 +20433,12 @@ RED.h = handlers;
20405
20433
  }
20406
20434
  }
20407
20435
  if (Array.isArray(selection)) {
20436
+ console.log('[view] selection pre=', selection);
20408
20437
  let selectionNodes =
20409
20438
  (selection.length === 0)?
20410
20439
  RED.nodes.filterNodes({ z: 'main.flow'}): RED.nodes.filterNodes({ id: selection });
20411
20440
 
20441
+ console.log('[view] selection nodes=', selectionNodes);
20412
20442
  if (selectionNodes && Array.isArray(selectionNodes)){
20413
20443
  moving_set = [];
20414
20444
  selectionNodes.forEach(sn => {