Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
893f5ad
Merge pull request #159 from visualpython/release
minjk-bl Aug 5, 2022
a49fa9d
Merge pull request #160 from visualpython/release
minjk-bl Aug 5, 2022
ffd95be
Merge pull request #164 from visualpython/release
minjk-bl Aug 8, 2022
a15a9b9
Update README.md for Colab extension
minjk-bl Sep 5, 2022
66d0c41
Update README.md
visualpython Feb 7, 2023
0d0558c
Update README.md
visualpython Feb 7, 2023
5c773cf
Merge branch 'main' into release
minjk-bl Feb 14, 2023
80b25be
Merge pull request #193 from visualpython/release
minjk-bl Feb 14, 2023
2e591e1
Merge branch 'release' of https://github.com/visualpython/visualpytho…
visualpython Feb 16, 2023
d2bff3a
Merge pull request #194 from visualpython/release
minjk-bl Feb 16, 2023
6d42a79
Merge branch 'release' of https://github.com/visualpython/visualpytho…
visualpython Feb 23, 2023
65c7c78
Merge pull request #197 from visualpython/release
minjk-bl Feb 23, 2023
5b9b8b7
Merge pull request #198 from minjk-bl/devops
minjk-bl Mar 2, 2023
0d0df07
Revert "Devops"
minjk-bl Mar 2, 2023
0c2880b
Merge pull request #199 from visualpython/revert-198-devops
minjk-bl Mar 2, 2023
ad358d0
Merge branch 'release' of https://github.com/visualpython/visualpytho…
visualpython Mar 2, 2023
0e7d735
Merge branch 'release' of https://github.com/visualpython/visualpytho…
visualpython Mar 2, 2023
d768a26
Merge pull request #201 from visualpython/release
minjk-bl Mar 2, 2023
cd39095
Merge branch 'release' of https://github.com/visualpython/visualpytho…
visualpython Mar 15, 2023
3c08142
Merge branch 'main' into release
minjk-bl Mar 15, 2023
d648b1d
Merge pull request #203 from visualpython/release
minjk-bl Mar 15, 2023
54f1b3e
Merge branch 'main' into release
minjk-bl Apr 4, 2023
97976bf
Merge pull request #209 from visualpython/release
minjk-bl Apr 4, 2023
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
6 changes: 0 additions & 6 deletions visualpython/css/component/multiSelector.css
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should be included. This file should be rebased to current base.

Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,4 @@
left: calc(100% - 25px);
bottom: 23px;
cursor: pointer;
}
.vp-cs-del-item {
position: relative;
float: right;
top: 4px;
cursor: pointer;
}
4 changes: 0 additions & 4 deletions visualpython/css/m_ml/modelInfo.css
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should be included. This file should be rebased to current base.

Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.vp-model-select-box {
grid-column-gap: 5px;
align-items: start;
}
.vp-ins-select-title {
font-weight: bold;
color: var(--vp-font-highlight);
Expand Down
4 changes: 2 additions & 2 deletions visualpython/html/component/dataSelector.html
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be rebased to current base

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="vp-inner-popup-close" title="Close data selector"></div>
</div>
<div class="vp-inner-popup-body vp-scrollbar">
<div class="vp-grid-col-p50 mb5">
<div class="vp-grid-col-p50">
<label class="vp-bold">Type</label>
<label class="vp-bold">Data</label>
</div>
Expand All @@ -22,7 +22,7 @@
</div>
<div class="vp-ds-option-box">
<label class="vp-bold">Option Page</label>
<div class="vp-ds-option-inner-box mt5">
<div class="vp-ds-option-inner-box">

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion visualpython/html/m_apps/file.html
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should be included. This file should be rebased to current base.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</td>
</tr>
<tr>
<td><label for="vp_sampleReturn">Allocate to</label></td>
<td><label for="vp_sampleReturn" class="vp-orange-text">Allocate to</label></td>
<td><input type="text" class="vp-input input-single" id="vp_sampleReturn" placeholder="" value="" title=""></td>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions visualpython/js/MainFrame.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be rebased to current base.

Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,10 @@ define([
let parentBlock = null;
let prevBlock = null;
loadStateList.forEach(obj => {
let { file, blockType, menuId, menuState, menuConfig, argIdx, position, afterAction } = obj;
let { blockType, menuId, menuState, menuConfig, argIdx, position, afterAction } = obj;
// get OptionComponent Object
// LAB: relative path needed
let OptionComponent = require('./' + file);
let OptionComponent = require('./' + menuConfig.file);
if (OptionComponent) {
let taskState = menuState.taskState;
let blockState = menuState.blockState;
Expand Down
47 changes: 6 additions & 41 deletions visualpython/js/com/com_Config.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be rebased to current base.

Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ define([
vp_config_version: '1.0.0',
vp_signature: 'VisualPython',
vp_position: {},
vp_section_display: false,
// CHROME: default to display vp
vp_section_display: true,
vp_note_display: false,
vp_menu_width: Config.MENU_MIN_WIDTH,
vp_note_width: Config.BOARD_MIN_WIDTH
Expand Down Expand Up @@ -492,15 +493,15 @@ define([
that._checkMounted().then(function() {
that._readFromColab(configKey).then(function(result) {
let data = result;
if (data == undefined || (data instanceof Object && Object.keys(data).length === 0)) {
if (data == undefined || data == {}) {
resolve(data);
return;
}
if (dataKey == '') {
resolve(data);
return;
}
if (data instanceof Object && Object.keys(data).length > 0) {
if (Object.keys(data).length > 0) {
resolve(data[dataKey]);
return;
}
Expand All @@ -516,15 +517,15 @@ define([
// LAB: use local .visualpython files
that._readFromLab(configKey).then(function(result) {
let data = result;
if (data == undefined || (data instanceof Object && Object.keys(data).length === 0)) {
if (data == undefined || data == {}) {
resolve(data);
return;
}
if (dataKey == '') {
resolve(data);
return;
}
if (data instanceof Object && Object.keys(data).length > 0) {
if (Object.keys(data).length > 0) {
resolve(data[dataKey]);
return;
}
Expand Down Expand Up @@ -786,40 +787,6 @@ define([
return Config.version;
}

checkVersionTimestamp = function() {
let that = this;
// check version timestamp
let nowDate = new Date();
this.getData('version_timestamp', 'vpcfg').then(function(data) {
let doCheckVersion = false;
vpLog.display(VP_LOG_TYPE.DEVELOP, 'Checking its version timestamp... : ' + data);
if (data == undefined || (data instanceof Object && Object.keys(data).length === 0)) {
// no timestamp, check version
doCheckVersion = true;
} else if (data != '') {
let lastCheck = new Date(parseInt(data));
let diffCheck_now = new Date(nowDate.getFullYear(), nowDate.getMonth() + 1, nowDate.getDate());
let diffCheck_last = new Date(lastCheck.getFullYear(), lastCheck.getMonth() + 1, lastCheck.getDate());

let diff = Math.abs(diffCheck_now.getTime() - diffCheck_last.getTime());
diff = Math.ceil(diff / (1000 * 3600 * 24));

if (diff >= 1) {
// if More than 1 day passed, check version
doCheckVersion = true;
}
}

// check version and update version_timestamp
if (doCheckVersion == true) {
that.checkVpVersion(true);
}

}).catch(function(err) {
vpLog.display(VP_LOG_TYPE.ERROR, err);
})
}

checkVpVersion(background=false) {
let that = this;
let nowVersion = this.getVpInstalledVersion();
Expand Down Expand Up @@ -859,8 +826,6 @@ define([
switch (clickedBtnIdx) {
case 0:
// cancel
// update version_timestamp
that.setData({ 'version_timestamp': new Date().getTime() }, 'vpcfg');
break;
case 1:
// update
Expand Down
7 changes: 2 additions & 5 deletions visualpython/js/com/com_generatorV2.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be rebased to current base.

Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,14 @@ define([
package.options && package.options.forEach(function(o, i) {
var obj = JSON.parse(JSON.stringify(o));
let newTag = vp_createTag(pageThis, obj, state);
if (obj.required === true || obj.output === true) {
if (obj.required) {
tblInput.append(newTag);
} else {
tblOption.append(newTag);
}
});

// TODO: userOption
if (package.code.includes('${etc}')) {

}

bindAutoComponentEvent(pageThis);
}
Expand All @@ -169,7 +166,7 @@ define([
let value = state[name];

var requiredFontStyle = required == true? 'vp-orange-text' : '';
var lblTag = $(`<label class="vp-bold">${label}</label>`).attr({
var lblTag = $(`<label>${label}</label>`).attr({
'for': name,
'class': requiredFontStyle,
'title': '(' + name + ')'
Expand Down
128 changes: 56 additions & 72 deletions visualpython/js/com/component/MultiSelector.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be rebased to current base. I think the current commits are not applied to your forked repository.

Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,62 @@ define([
that.bindDraggable();
});

// item indexing
$(this.wrapSelector('.' + APP_SELECT_ITEM)).on('click', function(event) {
var dataIdx = $(this).attr('data-idx');
var idx = $(this).index();
var added = $(this).hasClass('added'); // right side added item?
var selector = '';

// remove selection for select box on the other side
if (added) {
// remove selection for left side
$(that.wrapSelector('.' + APP_SELECT_ITEM + ':not(.added)')).removeClass('selected');
// set selector
selector = '.added';
} else {
// remove selection for right(added) side
$(that.wrapSelector('.' + APP_SELECT_ITEM + '.added')).removeClass('selected');
// set selector
selector = ':not(.added)';
}

if (vpEvent.keyManager.keyCheck.ctrlKey) {
// multi-select
that.pointer = { start: idx, end: -1 };
$(this).toggleClass('selected');
} else if (vpEvent.keyManager.keyCheck.shiftKey) {
// slicing
var startIdx = that.pointer.start;

if (startIdx == -1) {
// no selection
that.pointer = { start: idx, end: -1 };
} else if (startIdx > idx) {
// add selection from idx to startIdx
var tags = $(that.wrapSelector('.' + APP_SELECT_ITEM + selector));
for (var i = idx; i <= startIdx; i++) {
$(tags[i]).addClass('selected');
}
that.pointer = { start: startIdx, end: idx };
} else if (startIdx <= idx) {
// add selection from startIdx to idx
var tags = $(that.wrapSelector('.' + APP_SELECT_ITEM + selector));
for (var i = startIdx; i <= idx; i++) {
$(tags[i]).addClass('selected');
}
that.pointer = { start: startIdx, end: idx };
}
} else {
// single-select
that.pointer = { start: idx, end: -1 };
// un-select others
$(that.wrapSelector('.' + APP_SELECT_ITEM + selector)).removeClass('selected');
// select this
$(this).addClass('selected');
}
});

// item indexing - add all
$(this.wrapSelector('.' + APP_SELECT_ADD_ALL_BTN)).on('click', function(event) {
$(that.wrapSelector('.' + APP_SELECT_BOX + '.left .' + APP_SELECT_ITEM)).appendTo(
Expand Down Expand Up @@ -454,75 +510,6 @@ define([
that._addNewItem(newItemName);
}
});

this._bindItemClickEvent();
}

_bindItemClickEvent() {
let that = this;
// item indexing
$(this.wrapSelector('.' + APP_SELECT_ITEM)).off('click');
$(this.wrapSelector('.' + APP_SELECT_ITEM)).on('click', function(event) {
var dataIdx = $(this).attr('data-idx');
var idx = $(this).index();
var added = $(this).hasClass('added'); // right side added item?
var selector = '';

// remove selection for select box on the other side
if (added) {
// remove selection for left side
$(that.wrapSelector('.' + APP_SELECT_ITEM + ':not(.added)')).removeClass('selected');
// set selector
selector = '.added';
} else {
// remove selection for right(added) side
$(that.wrapSelector('.' + APP_SELECT_ITEM + '.added')).removeClass('selected');
// set selector
selector = ':not(.added)';
}

if (vpEvent.keyManager.keyCheck.ctrlKey) {
// multi-select
that.pointer = { start: idx, end: -1 };
$(this).toggleClass('selected');
} else if (vpEvent.keyManager.keyCheck.shiftKey) {
// slicing
var startIdx = that.pointer.start;

if (startIdx == -1) {
// no selection
that.pointer = { start: idx, end: -1 };
} else if (startIdx > idx) {
// add selection from idx to startIdx
var tags = $(that.wrapSelector('.' + APP_SELECT_ITEM + selector));
for (var i = idx; i <= startIdx; i++) {
$(tags[i]).addClass('selected');
}
that.pointer = { start: startIdx, end: idx };
} else if (startIdx <= idx) {
// add selection from startIdx to idx
var tags = $(that.wrapSelector('.' + APP_SELECT_ITEM + selector));
for (var i = startIdx; i <= idx; i++) {
$(tags[i]).addClass('selected');
}
that.pointer = { start: startIdx, end: idx };
}
} else {
// single-select
that.pointer = { start: idx, end: -1 };
// un-select others
$(that.wrapSelector('.' + APP_SELECT_ITEM + selector)).removeClass('selected');
// select this
$(this).addClass('selected');
}
});

// item deleting (manually added item only)
$(this.wrapSelector('.vp-cs-del-item')).off('click');
$(this.wrapSelector('.vp-cs-del-item')).on('click', function(event) {
$(this).closest('.' + APP_SELECT_ITEM).remove();
that.pointer = { start: -1, end: -1 };
});
}

_addNewItem(newItemName) {
Expand Down Expand Up @@ -564,7 +551,6 @@ define([
let newItemIndex = this.dataList.length;
var targetTag = $(`<div class="${APP_SELECT_ITEM} ${APP_DRAGGABLE} added selected" data-idx="${newItemIndex}" data-name="${newItemName}" data-type="object" data-code="'${newItemName}'" title="${newItemName}: Added manually">
<span>${newItemName}</span>
<div class="vp-cs-del-item vp-icon-close-small" title="Delete this manually added item"></div>
</div>`);
$(targetTag).appendTo(
$(this.wrapSelector('.' + APP_SELECT_BOX + '.right'))
Expand All @@ -574,8 +560,6 @@ define([
$(this.wrapSelector('.' + APP_SELECT_ITEM)).removeClass('selected');
// clear item input
$(this.wrapSelector('.vp-cs-add-item-name')).val('');
// bind click event
this._bindItemClickEvent();
// bind draggable
this.bindDraggable();
}
Expand Down
1 change: 0 additions & 1 deletion visualpython/js/com/component/PopupComponent.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be rebased to current base.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ define([
this.name = name;
this.path = path;
this.category = category;


this.config = {
sizeLevel: 0, // 0: 400x400 / 1: 500x500 / 2: 600x500 / 3: 750x500
Expand Down
Loading