Skip to content

Commit fd3293f

Browse files
authored
Merge pull request visualpython#34 from visualpython/devops
Devops
2 parents 62451e9 + 4896466 commit fd3293f

File tree

12 files changed

+1401
-27
lines changed

12 files changed

+1401
-27
lines changed

css/common/frameEditor.css

Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
.vp-fe {
2+
position: absolute;
3+
top: 0;
4+
left: 0;
5+
width: 100%;
6+
height: 100%;
7+
8+
z-index: 1200;
9+
10+
background-color: rgba(0,0,0,.4);
11+
}
12+
13+
.vp-fe-button {
14+
width: 45px;
15+
}
16+
17+
.vp-fe-container {
18+
position: relative;
19+
left: 50%;
20+
top: 50%;
21+
transform:translate(-50%, -50%);
22+
23+
min-width: 400px;
24+
min-height: 400px;
25+
width: 95%;
26+
height: 95%;
27+
28+
background-color: white;
29+
}
30+
31+
.vp-fe-title {
32+
height: 30px;
33+
padding: 5px 0px 5px 10px;
34+
35+
background-color: #EEE;
36+
border: 1px solid #ddd;;
37+
display: flex;
38+
flex-direction: row;
39+
position: relative;
40+
41+
font-weight: 700;
42+
}
43+
44+
.vp-fe-close,
45+
.vp-fe-popup-close {
46+
position: fixed;
47+
z-index: 3;
48+
right: 5px;
49+
width: 20px;
50+
height: 20px;
51+
line-height: 20px;
52+
top: 5px;
53+
text-align: center;
54+
}
55+
56+
.vp-fe-body {
57+
width: 100%;
58+
height: calc(100% - 30px);
59+
padding: 10px;
60+
display: grid;
61+
grid-row-gap: 5px;
62+
grid-template-rows: 35px 30px 60% calc(40% - 80px);
63+
}
64+
65+
/* preview code */
66+
.vp-fe-preview {
67+
width: 100%;
68+
height: 35px;
69+
background-image: repeating-linear-gradient( to right, var(--grid-line-color) 0, var(--grid-line-color) 0.25px, transparent 1px, transparent 5px ), repeating-linear-gradient( to bottom, var(--grid-line-color) 0, var(--grid-line-color) 0.25px, transparent 1px, transparent 5px );
70+
background-color: white;
71+
border: 0.25px solid #E4E4E4;
72+
}
73+
.vp-fe-preview textarea {
74+
display: none;
75+
}
76+
77+
.vp-fe-preview .CodeMirror-code .cm-variable {
78+
background-color: rgba(47, 133, 90, 0.2);
79+
}
80+
81+
.vp-fe-preview .CodeMirror-code .cm-string {
82+
background-color: rgba(246, 173, 85, 0.2);
83+
}
84+
85+
.vp-fe-df-box {
86+
/* margin-bottom: 5px; */
87+
}
88+
89+
.vp-fe #vp_feVariable {
90+
width: 125px;
91+
margin-left: 5px;
92+
}
93+
94+
.vp-fe-df-refresh {
95+
cursor: pointer;
96+
}
97+
98+
.vp-fe-menu-box {
99+
position: fixed;
100+
top: 0;
101+
left: 0;
102+
background: #FFFFFF;
103+
z-index: 70;
104+
/* display: grid;
105+
grid-template-columns: repeat(6, 1fr); */
106+
}
107+
108+
.vp-fe-menu-box .vp-fe-menu-item {
109+
height: 25px;
110+
line-height: 25px;
111+
background: #FFFFFF;
112+
border: 0.25px solid #E4E4E4;
113+
box-sizing: border-box;
114+
box-shadow: 1px 1px 2px rgb(0 0 0 / 10%);
115+
border-radius: 2px;
116+
font-size: 11px;
117+
text-align: center;
118+
color: #696969;
119+
cursor: pointer;
120+
-webkit-touch-callout: none;
121+
-webkit-user-select: none;
122+
-khtml-user-select: none;
123+
-moz-user-select: none;
124+
-ms-user-select: none;
125+
user-select: none;
126+
127+
text-overflow: ellipsis;
128+
/* overflow: hidden; */
129+
white-space: nowrap;
130+
padding: 0px 5px;
131+
}
132+
133+
.vp-fe-menu-box .vp-fe-menu-item:hover {
134+
background: #F8F8F8;
135+
}
136+
137+
.vp-fe-menu-sub-box {
138+
display: none;
139+
position: absolute;
140+
left: 100%;
141+
}
142+
143+
.vp-fe-menu-item:hover .vp-fe-menu-sub-box {
144+
display: block;
145+
}
146+
147+
.vp-fe-popup-box {
148+
position: absolute;
149+
left: 50%;
150+
top: 50%;
151+
transform: translate(-50%, -50%);
152+
min-width: 400px;
153+
/* min-height: 150px; */
154+
width: 30%;
155+
height: fit-content;
156+
background-color: white;
157+
z-index: 200;
158+
border: 0.25px solid var(--border-gray-color);
159+
box-shadow: 1px 1px 2px rgb(0 0 0 / 10%);
160+
}
161+
162+
.vp-fe-popup-body {
163+
padding: 10px;
164+
}
165+
166+
.vp-fe-popup-button-box {
167+
float: right;
168+
padding: 5px;
169+
}
170+
171+
.vp-fe-table {
172+
height: 100%;
173+
background: var(--border-gray-color);
174+
overflow: auto;
175+
}
176+
.vp-fe-table table {
177+
border-collapse: separate;
178+
margin-top: 0px;
179+
margin-left: 0px;
180+
}
181+
.vp-fe-table thead th {
182+
position: sticky;
183+
top: 0;
184+
background: #FFFFFF;
185+
border-bottom: 1px solid #000000;
186+
}
187+
188+
.vp-fe-table tbody tr:nth-child(odd) {
189+
background: #F5F5F5;
190+
}
191+
.vp-fe-table tbody tr:nth-child(even) {
192+
background: #FFFFFF;
193+
}
194+
195+
.vp-fe-table th.selected {
196+
/* color: var(--hightlight-color); */
197+
background: #add3fd;
198+
}
199+
200+
.vp-fe-table th:hover {
201+
cursor: pointer;
202+
/* background: var(--light-gray-color); */
203+
/* background: rgba(66, 165, 245, 0.2); */
204+
}
205+
206+
/* row hover */
207+
.vp-fe-table tbody tr:hover {
208+
background-color: rgba(66, 165, 245, 0.2);
209+
}
210+
211+
/* column hover */
212+
/* .vp-fe-table thead th:not(:first-child):hover::after {
213+
background: rgba(66, 165, 245, 0.2);
214+
content: '';
215+
height: 100000px;
216+
left: 0;
217+
position: absolute;
218+
top: -5000px;
219+
width: 100%;
220+
z-index: -1;
221+
} */
222+
223+
.vp-fe-table-more {
224+
margin: 5px;
225+
}
226+
227+
.vp-fe-info {
228+
width: 100%;
229+
height: 100%;
230+
margin: 0px;
231+
}
232+
233+
.vp-fe-info-title {
234+
width: 100%;
235+
height: 20px;
236+
line-height: 20px;
237+
font-weight: bold;
238+
background: #F5F5F5;
239+
}
240+
241+
.vp-fe-info-content {
242+
width: 100%;
243+
height: calc(100% - 20px);
244+
overflow: auto;
245+
}
246+
247+
.vp-fe-info-content pre {
248+
/* width: 300px; */
249+
padding:10px;
250+
white-space: pre-wrap;
251+
overflow: auto;
252+
white-space: pre-wrap; /* CSS3*/
253+
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
254+
white-space: -pre-wrap; /* Opera 4-6 */
255+
white-space: -o-pre-wrap; /* Opera 7 */
256+
word-wrap: break-all; /* Internet Explorer 5.5+ */
257+
}
258+
259+
/** buttons */
260+
.vp-fe-btn-box {
261+
position: absolute;
262+
bottom: 10px;
263+
right: 10px;
264+
}
265+
.vp-fe-btn-apply
266+
, .vp-fe-popup-ok {
267+
width: 80px;
268+
height: 30px;
269+
background: #F37704;
270+
border: 0.25px solid #C4C4C4;
271+
box-sizing: border-box;
272+
border-radius: 2px;
273+
text-align: center;
274+
color: #FFFFFF;
275+
}
276+
.vp-fe-btn-apply:hover
277+
, .vp-fe-popup-ok:hover {
278+
background: var(--hightlight-color);
279+
}
280+
.vp-fe-btn-cancel
281+
, .vp-fe-popup-cancel {
282+
width: 80px;
283+
height: 30px;
284+
background: #E5E5E5;
285+
border: 0.25px solid #C4C4C4;
286+
box-sizing: border-box;
287+
border-radius: 2px;
288+
text-align: center;
289+
color: #696969;
290+
}
291+
.vp-fe-btn-cancel:hover
292+
, .vp-fe-popup-cancel:hover {
293+
background: #ccc;
294+
}

css/common/subsetEditor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@
331331
overflow: auto;
332332
}
333333
.vp-ds-data-view-box table {
334-
width: 100%;
334+
/* width: 100%; */
335335
height: 100%;
336336
}
337337
.vp-ds-data-error-box {

css/component/common.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
supported by Chrome, Edge, Opera and Firefox */
2323
}
2424

25+
.vp-button:hover {
26+
background: #F8F8F8;
27+
}
28+
2529
.vp-button.cancel {
2630
background: #E5E5E5;
2731
}

css/pandas/commonPandas.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@
100100
width: 116px;
101101
}
102102

103+
#vp-wrapper .vp-textarea {
104+
border: 0.25px solid var(--border-gray-color);
105+
width: 100%;
106+
height: 100px;
107+
margin: 0px;
108+
}
109+
103110
/* 공통 스타일 */
104111
.w100 { width: 100%; }
105112
.w90 { width: 90%; }

data/libraries.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,11 +1221,16 @@
12211221
<desc>데이터를 차트로 표현하는 함수</desc>
12221222
<file>pandas/plot.js</file>
12231223
</item>
1224+
<item id="pd_frameEditor" type="function" level="1" name="Frame Editor" tag="FRAME EDITOR">
1225+
<path>visualpython - pandas - subset</path>
1226+
<desc>frame editor</desc>
1227+
<file>pandas/frameEditor.js</file>
1228+
</item>
12241229
<item id="pd_subset" type="function" level="1" name="Subset" tag="SUBSET">
12251230
<path>visualpython - pandas - subset</path>
12261231
<desc>subset dataframe</desc>
12271232
<file>pandas/subset.js</file>
1228-
</item>
1233+
</item>
12291234
<!-- Input/output -->
12301235
<item id="pd_inputOutput" type="package" level="1" name="Input/output" tag="파일 불러오기, 저장, FILE INPUT OUTPUT">
12311236
<path>visualpython - pandas - input output</path>

src/common/component/vpVarSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ define([
137137
// render variable list
138138
that.loadVariableList(varList);
139139
} catch (ex) {
140-
console.log(ex);
140+
// console.log(ex);
141141
}
142142
});
143143
}

src/common/vpCommon.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,22 @@ define([
129129
return str;
130130
}
131131

132+
/**
133+
* Convert to string format if not numeric
134+
* @param {*} code
135+
* @returns
136+
*/
137+
var convertToStr = function(code) {
138+
if (!$.isNumeric(code)) {
139+
if (code.includes("'")) {
140+
code = `"${code}"`;
141+
} else {
142+
code = `'${code}'`;
143+
}
144+
}
145+
return code;
146+
}
147+
132148
/**
133149
* check duplicate variable name
134150
* @param {string} varName
@@ -338,5 +354,6 @@ define([
338354
// 추가
339355
, kernelExecute: kernelExecute
340356
, cellExecute: cellExecute
357+
, convertToStr: convertToStr
341358
};
342359
});

0 commit comments

Comments
 (0)