@kumologica/sdk 3.0.27-beta8 → 3.1.0-alpha1

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.
@@ -149,7 +149,7 @@ it('Simulate happy path runtime events', async () => {
149
149
  resolve('lib/cmds/test/fixtures/example3-flow.json'),
150
150
  resolve('lib/cmds/test/fixtures/example3-flow.json'),
151
151
  1990,
152
- AppServer.mode.HEADLESS_DEFAULT_EXPRESS,
152
+ AppServer.mode.HEADLESS_KUMOLOGICA,
153
153
  AppServer.logLevel.ERROR,
154
154
  undefined
155
155
  );
@@ -19,7 +19,7 @@ async function runTest(flowFilePath, testcaseSelected, iterative) {
19
19
  projectDir: path.dirname(flowFilePath),
20
20
  flowFilePath: flowFilePath,
21
21
  port: APP_SERVER_PORT,
22
- serverMode: AppServer.mode.HEADLESS_DEFAULT_EXPRESS,
22
+ serverMode: AppServer.mode.HEADLESS_KUMOLOGICA,
23
23
  logLevel: AppServer.logLevel.ERROR,
24
24
  editorApi: undefined,
25
25
  startupEmitter: undefined
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.27-beta8",
6
+ "version": "3.1.0-alpha1",
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.27-beta8",
69
- "@kumologica/devkit": "3.0.27-beta8",
70
- "@kumologica/runtime": "3.0.27-beta8",
68
+ "@kumologica/builder": "3.1.0-alpha1",
69
+ "@kumologica/devkit": "3.1.0-alpha1",
70
+ "@kumologica/runtime": "3.1.0-alpha1",
71
71
  "adm-zip": "0.4.13",
72
72
  "ajv": "8.10.0",
73
73
  "aws-sdk": "2.513.0",
@@ -160,5 +160,8 @@
160
160
  },
161
161
  "engines": {
162
162
  "node": ">=8"
163
+ },
164
+ "kumologica": {
165
+ "dev": false
163
166
  }
164
167
  }
@@ -11,7 +11,7 @@ const { AppServer } = require('../lib/runtime-loader');
11
11
  async function allocatePort(port) {
12
12
  let inUse = await tcpPortUsed.check(port);
13
13
  if (inUse){
14
- let newPort = ++port;
14
+ let newPort = port + 1;
15
15
  console.log(`> Port: ${port} in use. Trying with port: ${newPort}...`);
16
16
  return await allocatePort(newPort);
17
17
  } else{
@@ -68,7 +68,7 @@ class EditorManagerClass {
68
68
  this.appServer = new AppServer(
69
69
  flowFilePath, // full path of the flow.json file
70
70
  this.getPort(), // port
71
- AppServer.mode.HEADFUL_DEFAULT_EXPRESS,
71
+ AppServer.mode.KUMOLOGICA_DESIGNER,
72
72
  undefined, //loglevel
73
73
  editorApi,
74
74
  startupEmitter);
@@ -77,7 +77,7 @@ class EditorManagerClass {
77
77
  projectDir: this.currentUserProjectDir,
78
78
  flowFilePath: flowFilePath,
79
79
  port: this.getPort(),
80
- serverMode: AppServer.mode.HEADFUL_DEFAULT_EXPRESS,
80
+ serverMode: AppServer.mode.KUMOLOGICA_DESIGNER,
81
81
  logLevel: undefined,
82
82
  editorApi: editorApi,
83
83
  startupEmitter: startupEmitter
@@ -18,7 +18,7 @@ let dockTemplate = [
18
18
  ];
19
19
 
20
20
 
21
- let appTemplate = [
21
+ let productionTemplate = [
22
22
  ...(isMac
23
23
  ? [
24
24
  {
@@ -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' },
@@ -210,7 +210,208 @@ let appTemplate = [
210
210
  },
211
211
  ];
212
212
 
213
- const appMenu = Menu.buildFromTemplate(appTemplate);
213
+ let devTemplate = [
214
+ ...(isMac
215
+ ? [
216
+ {
217
+ label: 'Kumologica Designer', //app.name,
218
+ submenu: [
219
+ { role: 'about' },
220
+ /* {
221
+ label: 'Check for Updates',
222
+ click() {
223
+ ipcMain.emit('menu-check-for-updates');
224
+ },
225
+ },
226
+ */ { type: 'separator' },
227
+ { role: 'services' },
228
+ { type: 'separator' },
229
+ { role: 'hide' },
230
+ { role: 'hideothers' },
231
+ { role: 'unhide' },
232
+ { type: 'separator' },
233
+ { role: 'quit' },
234
+ ],
235
+ },
236
+ ]
237
+ : []),
238
+ {
239
+ label: 'File',
240
+ submenu: [
241
+ {
242
+ label: 'New Project',
243
+ accelerator: 'CmdOrCtrl+N',
244
+ click() {
245
+ ipcMain.emit('show-newProject-modal');
246
+ },
247
+ },
248
+ {
249
+ label: 'Open Project',
250
+ accelerator: 'CmdOrCtrl+O',
251
+ click() {
252
+ ipcMain.emit('show-openProject-dialog');
253
+ },
254
+ },
255
+ { type: 'separator' },
256
+ {
257
+ label: 'Open Recent',
258
+ role: 'recentdocuments',
259
+ submenu: [
260
+ {
261
+ label: 'Clear Recent',
262
+ role: 'clearrecentdocuments',
263
+ },
264
+ ],
265
+ },
266
+ { type: 'separator' },
267
+ {
268
+ label: 'Import Flow',
269
+ accelerator: 'CmdOrCtrl+i',
270
+ click() {
271
+ ipcMain.emit('core:show-import-dialog');
272
+ },
273
+ },
274
+ {
275
+ label: 'Export Flow',
276
+ accelerator: 'CmdOrCtrl+e',
277
+ click() {
278
+ ipcMain.emit('core:show-export-dialog');
279
+ },
280
+ },
281
+ ],
282
+ },
283
+ {
284
+ label: 'Edit',
285
+ submenu: [
286
+ { label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:' },
287
+ { label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:' },
288
+ { type: 'separator' },
289
+ { label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:' },
290
+ { label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:' },
291
+ { label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:' },
292
+ {
293
+ label: 'Select All',
294
+ accelerator: 'CmdOrCtrl+A',
295
+ selector: 'selectAll:',
296
+ },
297
+ { type: 'separator' },
298
+ {
299
+ label: 'Find Node...',
300
+ accelerator: 'CmdOrCtrl+F',
301
+ click() {
302
+ ipcMain.emit('core:search');
303
+ },
304
+ },
305
+ ],
306
+ },
307
+ {
308
+ label: 'View',
309
+ submenu: [
310
+ { role: 'reload' },
311
+ { role: 'forcereload' },
312
+ { role: 'toggledevtools' },
313
+ { type: 'separator' },
314
+ { role: 'resetzoom' },
315
+ { role: 'zoomin' },
316
+ { role: 'zoomout' },
317
+ { type: 'separator' },
318
+ {
319
+ label: 'Main Workspace',
320
+ accelerator: 'CmdOrCtrl+1',
321
+ click() {
322
+ ipcMain.emit('core:view-main-workspace');
323
+ },
324
+ },
325
+ { label: 'Test Workspace',
326
+ accelerator: 'CmdOrCtrl+2',
327
+ click() {
328
+ ipcMain.emit('core:view-test-workspace');
329
+ },
330
+ },
331
+ { label: 'Settings',
332
+ accelerator: 'CmdOrCtrl+,',
333
+ click() {
334
+ ipcMain.emit('core:view-settings');
335
+ },
336
+ },
337
+ { type: 'separator' },
338
+ {
339
+ label: 'Toggle Palette',
340
+ accelerator: 'CmdOrCtrl+p',
341
+ click() {
342
+ ipcMain.emit('core:toggle-palette');
343
+ },
344
+ },
345
+ { label: 'Toggle Terminal',
346
+ accelerator: 'CmdOrCtrl+t',
347
+ click() {
348
+ ipcMain.emit('core:toggle-terminal');
349
+ },
350
+ },
351
+ { role: 'togglefullscreen' },
352
+ ],
353
+ },
354
+ {
355
+ role: 'window',
356
+ submenu: [{ role: 'minimize' }, { role: 'close' }],
357
+ },
358
+ {
359
+ role: 'help',
360
+ submenu: [
361
+ {
362
+ label: 'Documentation',
363
+ click() {
364
+ ipcMain.emit('menu-help-documentation');
365
+ },
366
+ },
367
+ {
368
+ label: 'Training Videos',
369
+ click() {
370
+ ipcMain.emit('menu-help-training-videos');
371
+ },
372
+ },
373
+ {
374
+ label: 'Release Notes',
375
+ click() {
376
+ ipcMain.emit('menu-help-release-notes');
377
+ },
378
+ },
379
+ { type: 'separator' },
380
+ {
381
+ label: 'Join our Discord',
382
+ click() {
383
+ ipcMain.emit('menu-help-join-discord');
384
+ },
385
+ },
386
+ {
387
+ label: 'Contact us',
388
+ click() {
389
+ ipcMain.emit('kumologica-contact-us');
390
+ },
391
+ },
392
+ // { type: 'separator' },
393
+ // {
394
+ // label: 'Open Log File',
395
+ // click: function () {
396
+ // electron.shell.openItem(
397
+ // os.homedir() + '/Library/Logs/electron-express/log.log'
398
+ // );
399
+ // },
400
+ // },
401
+ ],
402
+ },
403
+ ];
404
+
405
+ let templateSelected = productionTemplate;
406
+
407
+ try {
408
+ let pkgJson = require('../../../package.json');
409
+ templateSelected = pkgJson['kumologica']['dev'] === true? devTemplate: productionTemplate;
410
+ } catch(e){
411
+ // ignore the error
412
+ }
413
+
414
+ const appMenu = Menu.buildFromTemplate(templateSelected);
214
415
  const dockMenu = Menu.buildFromTemplate(dockTemplate);
215
416
 
216
417
  module.exports = {
@@ -9060,11 +9060,26 @@ RED.panels = (function() {
9060
9060
  }
9061
9061
  }
9062
9062
 
9063
+ function getTabsMaxWidthAvailable() {
9064
+ const workspaceWidth = $('#main-container').width();
9065
+
9066
+ const paletteWidth = $('#palette').is(':hidden')? 0 : $('#palette').width();
9067
+ const sidebarWidth = $('#sidebar').is(':hidden')? 0 : $('#sidebar').width();
9068
+ const sidebarShortcuts = $('#sidebar-shortcuts').width();
9069
+ const occupied = paletteWidth + sidebarWidth + sidebarShortcuts;
9070
+
9071
+ return workspaceWidth - occupied;
9072
+ }
9073
+
9063
9074
  function updateTabWidths() {
9064
9075
  if (options.vertical) {
9065
9076
  return;
9066
9077
  }
9067
9078
  var tabs = ul.find('li.red-ui-tab');
9079
+
9080
+ // Update the width of the tabs container
9081
+ $('#workspace').find('.red-ui-tabs').width(getTabsMaxWidthAvailable());
9082
+
9068
9083
  var width = wrapper.width();
9069
9084
  var tabCount = tabs.size();
9070
9085
  var tabWidth;
@@ -9094,7 +9109,7 @@ RED.panels = (function() {
9094
9109
  currentTabWidth = (100 * tabWidth) / width + '%';
9095
9110
  currentActiveTabWidth = currentTabWidth + '%';
9096
9111
  if (options.scrollable) {
9097
- tabWidth = Math.max(tabWidth, 60);
9112
+ tabWidth = Math.max(tabWidth, 150); // minimum width for the tab
9098
9113
  currentTabWidth = tabWidth + 'px';
9099
9114
  currentActiveTabWidth = 0;
9100
9115
  var listWidth = Math.max(
@@ -17144,7 +17159,7 @@ RED.h = handlers;
17144
17159
  RED.editor.edit(selection);
17145
17160
  }else{
17146
17161
  // User has clicked on the canvas or link
17147
- // console.log('[view] Selection has not changed. Ignore');
17162
+ console.log('[view] Selection has not changed. Ignore');
17148
17163
  // Just close the sidebar
17149
17164
  RED.editor.resetEditor();
17150
17165
  }
@@ -20863,7 +20878,6 @@ RED.view.tools = (function() {
20863
20878
  var sidebar_tabs = RED.tabs.create({
20864
20879
  id: 'sidebar-tabs',
20865
20880
  onchange: function (tab) {
20866
- // console.log('[sidebar] - onChange | tab=', tab);
20867
20881
  $('#editor-stack').hide();
20868
20882
  $('#sidebar-content').children().hide();
20869
20883
  $('#sidebar-footer').children().hide();
@@ -20971,89 +20985,38 @@ RED.view.tools = (function() {
20971
20985
  RED.menu.removeItem('menu-item-view-menu-' + id);
20972
20986
  }
20973
20987
 
20974
- var sidebarSeparator = {};
20975
- sidebarSeparator.dragging = false;
20988
+ // Dragable sidebar logic
20989
+ let sidebarDragging = false;
20990
+ let sidebarWidthP0 = null;
20991
+ let delta = 0;
20976
20992
 
20977
20993
  $('#sidebar-separator').draggable({
20978
20994
  axis: 'x',
20979
20995
  start: function (event, ui) {
20980
- if (!startingPointSeparator){
20981
- startingPointSeparator = ui.position.left;
20982
- }
20983
- sidebarSeparator.closing = false;
20984
- sidebarSeparator.opening = false;
20985
- var winWidth = $(window).width();
20986
- sidebarSeparator.start = ui.position.left;
20987
- sidebarSeparator.workspaceWidth = $('#workspace').width();
20988
- sidebarSeparator.workspaceRight = parseInt($('#workspace').css('right'));
20989
- sidebarSeparator.dragging = true;
20990
-
20991
- if (!RED.menu.isSelected('menu-item-sidebar')) {
20992
- sidebarSeparator.opening = true;
20993
- var newChartRight = 7;
20994
- $('#sidebar').addClass('closing');
20995
- $('#workspace').css('right', newChartRight);
20996
- $('#editor-stack').css('right', newChartRight + 1);
20997
- $('#sidebar').width(0);
20998
-
20999
- RED.menu.setSelected('menu-item-sidebar', true);
21000
- RED.events.emit('sidebar:resize');
21001
- }
21002
- sidebarSeparator.width = $('#sidebar').width();
21003
- // console.log('Sidebar start point=', sidebarSeparator.start);
20996
+ sidebarDragging = true;
20997
+ sidebarWidthP0 = $('#sidebar').width();
20998
+ delta = 0;
21004
20999
  },
21005
21000
  drag: function (event, ui) {
21006
- let d = ui.position.left - sidebarSeparator.start;
21007
- // sidebar should be original + the distance
21008
- // sidebarSeparator.width = sidebarSeparator.width - d ;
21009
- // newSidebarWidth = sidebarSeparator.width + 50;
21010
- // console.log(ui.position.left);
21011
- // console.log(`distance: ${d} -> new right for worspace: ${sidebarSeparator.workspaceRight - d}`);
21012
-
21013
- // if (sidebarSeparator.opening) {
21014
- // newSidebarWidth -= 3;
21015
- // }
21016
-
21017
- const MIN_SIDEBAR_WIDTH = 435;
21018
- let desiredSidebarWidth = sidebarSeparator.width - d;
21019
- let desiredWorkspaceRight = sidebarSeparator.workspaceRight - d;
21020
-
21021
- if (desiredSidebarWidth > 435){
21022
- // console.log(`Recalibrating sidebar width!!`)
21023
- $('#sidebar').width(desiredSidebarWidth);
21024
- $('#workspace').css('right', desiredWorkspaceRight);
21025
- } else{
21026
- // console.log('STOP THIS NOW!!!! IT IS TOO NARROW!!!');
21027
- $('#sidebar').width(433);
21028
- let sidebarWidth= $('#sidebar').width();
21029
- $('#workspace').css('right', 491);
21030
- // console.log('Window width=',$(window).width());
21031
- // let sidebarFinalPoint = $(window).width() - MIN_SIDEBAR_WIDTH - 50;
21032
- // console.log(`Sidebar final point: ${startingPointSeparator}`);
21033
- ui.position.left = startingPointSeparator; //$(window).width() - MIN_SIDEBAR_WIDTH - 50; // 11:width separator, 50: size icons
21034
- // console.log(`sidebar width after dragging end is: ${ sidebarWidth }`)
21035
- $('#sidebar').removeAttr('width');
21001
+ let d = ui.position.left;
21002
+ delta = sidebarWidthP0 - d;
21003
+ $('#sidebar').width(delta);
21004
+ if ($('#sidebar').width() > maxWidthSidebar()){
21005
+ $('#sidebar').width(maxWidthSidebar());
21036
21006
  }
21007
+ event.stopImmediatePropagation();
21037
21008
  RED.events.emit('sidebar:resize');
21038
21009
  },
21039
21010
  stop: function (event, ui) {
21040
- sidebarSeparator.dragging = false;
21041
- if (sidebarSeparator.closing) {
21042
- // console.log('sidebar-> stop: closing...')
21043
- $('#sidebar').removeClass('closing');
21044
- RED.menu.setSelected('menu-item-sidebar', false);
21045
- if ($('#sidebar').width() < 435) {
21046
- $('#sidebar').width(435);
21047
- $('#workspace').css('right', 491);
21048
- // $('#editor-stack').css('right', 188);
21049
- }
21050
- }
21051
- //$('#sidebar-separator').css('left', 'auto');
21052
- //$('#sidebar-separator').css('right', $('#sidebar').width() + 2 + 'px');
21011
+ setTimeout(function() {
21012
+ sidebarDragging = false;
21013
+ },1000);
21053
21014
  RED.events.emit('sidebar:resize');
21054
21015
  },
21055
21016
  });
21056
21017
 
21018
+
21019
+
21057
21020
  var sidebarControls = $(
21058
21021
  '<div class="sidebar-control-right"><i class="fa fa-chevron-right"</div>'
21059
21022
  ).appendTo($('#sidebar-separator'));
@@ -21061,37 +21024,19 @@ RED.view.tools = (function() {
21061
21024
  sidebarControls.hide();
21062
21025
  RED.menu.toggleSelected('menu-item-sidebar');
21063
21026
  });
21064
- $('#sidebar-separator').on('mouseenter', function () {
21065
- if (!sidebarSeparator.dragging) {
21066
- if (RED.menu.isSelected('menu-item-sidebar')) {
21067
- sidebarControls
21068
- .find('i')
21069
- .addClass('fa-chevron-right')
21070
- .removeClass('fa-chevron-left');
21071
- } else {
21072
- sidebarControls
21073
- .find('i')
21074
- .removeClass('fa-chevron-right')
21075
- .addClass('fa-chevron-left');
21076
- }
21077
- sidebarControls.toggle('slide', { direction: 'right' }, 200);
21078
- }
21079
- });
21080
- $('#sidebar-separator').on('mouseleave', function () {
21081
- if (!sidebarSeparator.dragging) {
21082
- sidebarControls.hide();
21083
- }
21084
- });
21085
21027
 
21086
- function maximizeSidebar(){
21028
+ function maxWidthSidebar() {
21087
21029
  const totalWidth = $('#main-container').width();
21088
21030
  const shortcutsWidth = 50;
21089
21031
  const paletteWidth = $('#palette').width();
21090
21032
  const sidebarSeparatorWidth = $('#sidebar-separator').width()
21091
21033
 
21092
- const targetWidth = totalWidth - shortcutsWidth - paletteWidth - sidebarSeparatorWidth;
21034
+ return totalWidth - shortcutsWidth - paletteWidth - sidebarSeparatorWidth;
21035
+ }
21036
+
21037
+ function maximizeSidebar(){
21038
+ const targetWidth = maxWidthSidebar();
21093
21039
  $('#sidebar').width(targetWidth);
21094
- $('#sidebar-separator').css('left', paletteWidth);
21095
21040
 
21096
21041
  // Hack: Make sure the workspace if reset before maximizing the sidebar. This is because when dragging the sidebar the workspace width is also modified
21097
21042
  $('#workspace').css('right', 491);
@@ -21102,7 +21047,7 @@ RED.view.tools = (function() {
21102
21047
  const offsetWidth = 435;
21103
21048
 
21104
21049
  $('#sidebar').width(offsetWidth);
21105
- $('#sidebar-separator').css('left', '');
21050
+ // $('#sidebar-separator').css('left', '');
21106
21051
  RED.events.emit('sidebar:resize');
21107
21052
  }
21108
21053
 
@@ -21111,7 +21056,6 @@ RED.view.tools = (function() {
21111
21056
  }
21112
21057
 
21113
21058
  function toggleSidebar(state) {
21114
- // console.log(`[sidebar] toggling the sidebar to: ${state} ...`);
21115
21059
  let checkIfscrollWorkspaceRequired = false;
21116
21060
  if (!state) {
21117
21061
  // Hide the sidebar and sidebar-separator
@@ -21143,11 +21087,13 @@ RED.view.tools = (function() {
21143
21087
  // `);
21144
21088
  if (nodeSelectedPosX - initialScrollLeft + safeDistNodeSidebar > sidebarPosLeftX ){
21145
21089
  let targetScrollLeft = nodeSelectedPosX - sidebarPosLeftX + safeDistNodeSidebar;
21146
- // console.log(`[sidebar] TargetScrollLeft: (${targetScrollLeft})...`);
21147
21090
  $('#chart').animate( { scrollLeft: targetScrollLeft})
21148
21091
  }
21149
21092
  }
21150
-
21093
+ }
21094
+
21095
+ function isSidebarDragging() {
21096
+ return sidebarDragging;
21151
21097
  }
21152
21098
 
21153
21099
  function showSidebar(id) {
@@ -21177,12 +21123,11 @@ RED.view.tools = (function() {
21177
21123
  });
21178
21124
 
21179
21125
  //hide the sidebar-separator
21180
- $('#sidebar-separator').hide();
21126
+ // $('#sidebar-separator').hide();
21181
21127
 
21182
21128
  }
21183
21129
 
21184
21130
  function selectTab(index){
21185
- // console.log('[sidebar] selectTab clicked with index=', index);
21186
21131
  let selectedTab = $('#sidebar-shortcuts').find('.sidebar-shortcuts-icons').children()[index];
21187
21132
  // Click only if has not been selected
21188
21133
  // console.log('[sidebar] selectedTab.hasClass(selected)=', selectedTab.hasClass('selected'));
@@ -21205,14 +21150,9 @@ RED.view.tools = (function() {
21205
21150
  toggleSidebar(true);
21206
21151
 
21207
21152
  //show the sidebar-separator
21208
- let sidebarSeparator = $('#sidebar-separator');
21209
- sidebarSeparator.show();
21210
-
21211
- // resize the workspace to adjust to the left of the sidebar separator
21212
- let sidebarSepatorToRight = sidebarSeparator.position().left;
21213
- let mainContainerWidth = $('#main-container').width();
21214
- let targetRightPosToWorkspace = mainContainerWidth - sidebarSepatorToRight - 1;
21215
- $('#workspace').css('right', targetRightPosToWorkspace);
21153
+ // let sidebarSeparator = $('#sidebar-separator');
21154
+ // sidebarSeparator.show();
21155
+
21216
21156
  // Select internally the tab
21217
21157
  if (e && e.hasOwnProperty('selectIndex')){
21218
21158
  selectTab(e.selectIndex);
@@ -21220,8 +21160,12 @@ RED.view.tools = (function() {
21220
21160
  });
21221
21161
 
21222
21162
  RED.actions.add('core:hide-sidebar', function(){
21223
- toggleSidebar(false);
21224
- deselectAll();
21163
+ if (!sidebarDragging){
21164
+ toggleSidebar(false);
21165
+ deselectAll();
21166
+ }else {
21167
+ console.log('[sidebar] Ignoring hide-sidebar as dragging is still enabled')
21168
+ }
21225
21169
  });
21226
21170
 
21227
21171
  // RED.popover.tooltip(
@@ -21266,7 +21210,8 @@ RED.view.tools = (function() {
21266
21210
  restore: restoreSidebar,
21267
21211
  deselectAll: deselectAll,
21268
21212
  selectTab: selectTab,
21269
- isSidebarVisible: isSidebarVisible
21213
+ isSidebarVisible: isSidebarVisible,
21214
+ isDragging: isSidebarDragging,
21270
21215
  };
21271
21216
  })();
21272
21217
  ;RED.sidebar.info = (function () {
@@ -26323,7 +26268,20 @@ RED.sidebar.nodeinfo = (function(){
26323
26268
  const result = await git.push('origin', currentBranch);
26324
26269
  RED.notify(`Changes pushed successfully`, 'success', undefined, 800);
26325
26270
  } catch(e) {
26326
- RED.notify(`<strong>Error</strong>: ${e.message}`, 'error');
26271
+ let notification = RED.notify(`<strong>Error</strong>: ${e.message}`, {
26272
+ type: 'error',
26273
+ modal: true,
26274
+ fixed: true,
26275
+ buttons: [
26276
+ {
26277
+ text: "Cancel",
26278
+ click: function() {
26279
+ notification.close();
26280
+ }
26281
+ }
26282
+ ]
26283
+ });
26284
+
26327
26285
  } finally {
26328
26286
  resetPushButton();
26329
26287
  checkGitStatus();
@@ -30692,7 +30650,6 @@ RED.editor = (function () {
30692
30650
  }
30693
30651
 
30694
30652
  function resetEditor(){
30695
- // console.log('[editor] reset the editor')
30696
30653
  editStack.pop();
30697
30654
  RED.sidebar.nodeinfo.emptyTab();
30698
30655
  RED.actions.invoke('core:hide-sidebar');
@@ -30990,8 +30947,11 @@ RED.editor = (function () {
30990
30947
  }
30991
30948
 
30992
30949
  function showEditDialog(node) {
30950
+ if (RED.sidebar.isDragging()){
30951
+ return;
30952
+ }
30953
+
30993
30954
  let editing_node;
30994
- // console.log('[editor] showEditDialog. Node=', node);
30995
30955
  if (Object.keys(node).length === 0 && node.constructor === Object){
30996
30956
  resetEditor();
30997
30957
  return;
@@ -32170,8 +32130,6 @@ RED.editor = (function () {
32170
32130
  }
32171
32131
  if (options.mode === 'ace/mode/markdown') {
32172
32132
  $(el).addClass('node-text-editor-container-toolbar');
32173
- console.log('[editor] options', options);
32174
-
32175
32133
  if (options.toolbar === false ){
32176
32134
  // do not show the toolbar
32177
32135
  } else {
@@ -33820,7 +33778,7 @@ RED.eventLog = (function() {
33820
33778
 
33821
33779
  function resize() {}
33822
33780
  function showTray(options) {
33823
- console.log('[tray] showTray. options=', options);
33781
+ // console.log('[tray] showTray. options=', options);
33824
33782
 
33825
33783
  $('#editor-stack').empty();
33826
33784
 
@@ -34133,7 +34091,7 @@ RED.eventLog = (function() {
34133
34091
 
34134
34092
 
34135
34093
  if (stack.length === 0) {
34136
- console.log('[tray] Emiting event: (editor:open) ...')
34094
+ // console.log('[tray] Emiting event: (editor:open) ...')
34137
34095
  RED.events.emit('editor:open');
34138
34096
  showTray(options);
34139
34097
  } else if (stack.length > 0 && options.title.startsWith('_')) {