Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
491 changes: 237 additions & 254 deletions bin/visualpy

Large diffs are not rendered by default.

514 changes: 296 additions & 218 deletions bin/visualpy.bat

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions css/common/frameEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@
.vp-fe-preview .CodeMirror-code .cm-string {
background-color: rgba(246, 173, 85, 0.2);
}


.vp-fe-df-box {
display: grid;
grid-template-rows: 30px;
grid-row-gap: 5px;
}
.vp-fe-df-box label {
width: 80px;
font-weight: bold;
}
.vp-fe #vp_feVariable {
width: 153px;
Expand Down Expand Up @@ -355,16 +358,19 @@
.vp-popup-addpage .vp-popup-tab.replace {
height: calc(100% - 50px);
}
.vp-popup-addtype{
.vp-popup-addtype {
width: 153px;
margin-top: 5px;
}
.vp-popup-delete{
.vp-popup-delete {
padding-bottom: 20px;
}
.vp-popup-replace-add{
.vp-popup-replace-add {
margin-top: 30px
}
.vp_popup-apply{
margin-left: 30px;
.vp-popup-apply-column {
width: 153px;
}
.vp-popup-apply-lambda{
margin-top: 5px;
}
3 changes: 1 addition & 2 deletions css/common/subsetEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
background-color: rgba(246, 173, 85, 0.2);
}
.vp-ds-label {
color: #F37704;
font-weight: bold;
margin-left: 20px;
}
Expand Down Expand Up @@ -319,7 +318,7 @@
}
.vp-ds-btn-apply {
position: absolute;
top: 4px;
top: 9px;
right: 15px;
}
.vp-ds-btn-run {
Expand Down
2 changes: 1 addition & 1 deletion src/api/functions/pandasCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _vp_get_columns_list(df):
# value
if type(c).__name__ == 'str':
cInfo['value'] = "'{}'".format(c)
elif type(r).__name__ == 'Timestamp':
elif type(c).__name__ == 'Timestamp':
cInfo['value'] = str(c)
# category - iopub data rate limit issue...
if str(df[c].dtype) == 'object':
Expand Down
16 changes: 8 additions & 8 deletions src/api_block/blockContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,11 @@ define([
*/
BlockContainer.prototype.setFocusedPageType = function(focusedPageType) {
// 추가: FOCUSED_PAGE_TYPE = NULL일 경우 주피터 단축키 활성화 / 아닐 경우 비활성화
if (focusedPageType == FOCUSED_PAGE_TYPE.NULL) {
// Jupyter.notebook.keyboard_manager.enable();
} else {
// Jupyter.notebook.keyboard_manager.disable();
}
// if (focusedPageType == FOCUSED_PAGE_TYPE.NULL) {
// Jupyter.notebook.keyboard_manager.enable();
// } else {
// Jupyter.notebook.keyboard_manager.disable();
// }
this.focusedPageType = focusedPageType;
}
BlockContainer.prototype.getFocusedPageType = function() {
Expand Down Expand Up @@ -664,7 +664,7 @@ define([

this.resetOptionPage();

this.setFocusedPageType(FOCUSED_PAGE_TYPE.EDITOR);
this.setFocusedPageType(FOCUSED_PAGE_TYPE.BOARD);
this.reNewContainerDom();
this.reRenderAllBlock_asc();
}
Expand Down Expand Up @@ -1124,7 +1124,7 @@ define([
if (prevSelectedBlock && prevSelectedBlock.isModified) {
// Ask to save
var apiBlockPackage = this.getImportPackageThis();
apiBlockPackage.openMultiBtnModal_new('Unsaved Changes', 'Save changes before leave?',['Don’t save', 'Save'], [() => {
apiBlockPackage.openMultiBtnModal_new('Unsaved Changes', 'Save changes before leave?',['Don’t save', 'Save'], 2, [() => {
// cancel
// $(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_CANCEL_BUTTON).trigger(STR_CLICK);
blockContainerThis.cancelBlock();
Expand Down Expand Up @@ -2649,7 +2649,7 @@ define([
this.hideOptionPreviewBox();
$(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_PREVIEW_BUTTON).removeClass('enabled');

this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.7');
this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.8');
this.setFocusedPageType(FOCUSED_PAGE_TYPE.BOARD);
$('.vp-apiblock-option-tab-none').css(STR_DISPLAY, STR_BLOCK);
}
Expand Down
4 changes: 2 additions & 2 deletions src/api_block/component/boardMenuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ define([

var saveFilePath = vpCommon.formatString("./{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION);
var apiBlockPackage = blockContainer.getImportPackageThis();
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], [() => {
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
saveNotePageAction_newVersion(vpCommon.formatString("{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION), saveFilePath);

blockContainer.deleteAllBlock();
Expand Down Expand Up @@ -161,7 +161,7 @@ define([

var saveFilePath = $(vpCommon.wrapSelector(vpCommon.formatString("#{0}", vpConst.VP_NOTE_REAL_FILE_PATH))).val();
var apiBlockPackage = blockContainer.getImportPackageThis();
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], [() => {
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
if (saveFilePath == '') {
saveAsNotePage();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/api_block/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
id='vp_apiblock_option_page'>
<div class="vp-apiblock-option-navigator">
<div class="vp-apiblock-option-navigator-label">
<span class="vp-orange-text">Visual Python 1.1.7</span>
<span class="vp-orange-text">Visual Python 1.1.8</span>
</div>
<div class="vp-apiblock-option-new-to-save" title="something modified...">

Expand Down
38 changes: 36 additions & 2 deletions src/api_block/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ define([
// blockContainer.resetOptionPage();
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.NULL);
});

$(vpCommon.wrapSelector(''))

/** Create block buttons page를 클릭했을 때 */
$(vpCommon.wrapSelector(VP_CLASS_PREFIX + VP_CLASS_APIBLOCK_BUTTONS)).click(function(event) {
Expand Down Expand Up @@ -574,7 +576,8 @@ define([
ctrlKey = 17,
cmdKey = 91,
vKey = 86,
cKey = 67;
cKey = 67,
escKey = 27;

$(document).keydown(function(e) {
if (e.keyCode == ctrlKey || e.keyCode == cmdKey) {
Expand All @@ -583,12 +586,43 @@ define([
}).keyup(function(e) {
if (e.keyCode == ctrlKey || e.keyCode == cmdKey) {
ctrlDown = false;
console.log(blockContainer.getFocusedPageType());
}
if (e.keyCode == escKey) {
// close popup on esc
if (blockContainer.getFocusedPageType() != FOCUSED_PAGE_TYPE.NULL) {
blockContainer.appsMenu.close();
}
}
}).click(function(e) {
// click event on jupyter side
if ($('#notebook').has(e.target).length > 0) {
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.NULL);
}
// click event on visual python menu tab & button box
if ($(vpCommon.wrapSelector('.vp-apiblock-tab-header')).has(e.target).length > 0
|| $(vpCommon.wrapSelector('.vp-apiblock-board-button-container')).has(e.target).length > 0) {
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.BUTTONS);
}
// click event on popup menu
if ($(vpCommon.wrapSelector('.vp-ds')).has(e.target).length > 0
|| $(vpCommon.wrapSelector('.vp-fe')).has(e.target).length > 0
|| $(vpCommon.wrapSelector('.vp-pp')).has(e.target).length > 0
|| $(vpCommon.wrapSelector('.vp-ds-btn-box')).has(e.target).length > 0
|| $(vpCommon.wrapSelector('.vp-fe-btn-box')).has(e.target).length > 0
|| $(vpCommon.wrapSelector('.vp-pp-btn-box')).has(e.target).length > 0) {
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.OPTION);
}

// check modified
blockContainer.checkModified();
});

// focus event on codemirror of jupyter side
$(document).on('focus', '#notebook .CodeMirror', function(e){
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.NULL);
});

$(document).change($(vpCommon.wrapSelector('.vp-apiblock-option input')), function() {
// check modified
blockContainer.checkModified();
Expand Down Expand Up @@ -778,7 +812,7 @@ define([
/** File navigation을 open하지 않고 alert창 띄움*/
} else {
var saveFilePath = vpCommon.formatString("./{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION);
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes','No', 'Cancel'], [() => {
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
saveNotePageAction_newVersion(saveFileName, saveFilePath);
openNotePage();

Expand Down
4 changes: 2 additions & 2 deletions src/common/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ define ([
* toolbar btn properties
*/
const TOOLBAR_BTN_INFO = {
HELP: "Visual Python 1.1.7"
HELP: "Visual Python 1.1.8"
// , ICON: "fa-angellist"
, ICON: "vp-main-icon"
, ID: "vpBtnToggle"
Expand Down Expand Up @@ -199,7 +199,7 @@ define ([
/**
* faq page link
*/
const VPNOTE_PAGE_LINK = 'https://visualpython.ai/vpnote';
const VPNOTE_PAGE_LINK = 'https://visualpython.ai/vpnotes';

/**
* header extra menu faq caption
Expand Down
Loading