@kumologica/sdk 3.0.27-beta8 → 3.0.27-beta9
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 +4 -4
- package/src/app/main-process/menu.js +1 -1
- package/src/app/ui/editor-client/public/red/red.js +78 -120
- package/src/app/ui/editor-client/public/red/red.min.js +1 -1
- package/src/app/ui/editor-client/public/red/style.min.css +1 -1
- package/src/app/ui/editor-client/src/js/ui/common/tabs.js +16 -1
- package/src/app/ui/editor-client/src/js/ui/editor.js +4 -4
- package/src/app/ui/editor-client/src/js/ui/sidebar.js +41 -111
- package/src/app/ui/editor-client/src/js/ui/tab-git.js +14 -1
- package/src/app/ui/editor-client/src/js/ui/tray.js +2 -2
- package/src/app/ui/editor-client/src/js/ui/view.js +1 -1
- package/src/app/ui/editor-client/src/sass/editor.scss +10 -3
- package/src/app/ui/editor-client/src/sass/sidebar.scss +9 -9
- package/src/app/ui/editor-client/src/sass/tabs.scss +1 -1
- package/src/app/ui/editor-client/src/sass/workspace.scss +1 -1
- package/src/app/ui/editor-client/templates/index.mst +2 -1
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-
|
|
6
|
+
"version": "3.0.27-beta9",
|
|
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-
|
|
69
|
-
"@kumologica/devkit": "3.0.27-
|
|
70
|
-
"@kumologica/runtime": "3.0.27-
|
|
68
|
+
"@kumologica/builder": "3.0.27-beta9",
|
|
69
|
+
"@kumologica/devkit": "3.0.27-beta9",
|
|
70
|
+
"@kumologica/runtime": "3.0.27-beta9",
|
|
71
71
|
"adm-zip": "0.4.13",
|
|
72
72
|
"ajv": "8.10.0",
|
|
73
73
|
"aws-sdk": "2.513.0",
|
|
@@ -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,
|
|
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
|
-
|
|
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
|
-
|
|
20975
|
-
|
|
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
|
-
|
|
20981
|
-
|
|
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
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
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
|
-
|
|
21041
|
-
|
|
21042
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
21224
|
-
|
|
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}`,
|
|
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('_')) {
|