@@ -22,27 +22,27 @@ define([
22
22
23
23
const importTemplates = {
24
24
'data-analysis' : [
25
- { i0 : 'numpy' , i1 : 'np' , type : 'module' } ,
26
- { i0 : 'pandas' , i1 : 'pd' , type : 'module' } ,
25
+ { i0 : 'numpy' , i1 : 'np' , type : 'module' , checked : 'checked' } ,
26
+ { i0 : 'pandas' , i1 : 'pd' , type : 'module' , checked : 'checked' } ,
27
27
{
28
28
i0 : 'matplotlib.pyplot' , i1 : 'plt' , type : 'module'
29
29
, include : [
30
30
'%matplotlib inline'
31
- ]
31
+ ] , checked : 'checked'
32
32
} ,
33
- { i0 : 'seaborn' , i1 : 'sns' , type : 'module' } ,
33
+ { i0 : 'seaborn' , i1 : 'sns' , type : 'module' , checked : 'checked' } ,
34
34
{
35
35
i0 : 'plotly.express' , i1 : 'px' , type : 'module'
36
36
, include : [
37
37
'from plotly.offline import init_notebook_mode' ,
38
38
'init_notebook_mode(connected=True)'
39
- ] , checked : false
39
+ ] , checked : ''
40
40
} ,
41
- { i0 : 'pyarrow' , i1 : 'pa' , type : 'module' , checked : false } ,
41
+ { i0 : 'pyarrow' , i1 : 'pa' , type : 'module' , checked : '' } ,
42
42
] ,
43
43
'machine-learning' : [
44
- { i0 : 'sklearn.model_selection' , i1 : 'train_test_split' , type : 'function' } ,
45
- { i0 : 'sklearn' , i1 : 'metrics' , type : 'function' }
44
+ { i0 : 'sklearn.model_selection' , i1 : 'train_test_split' , type : 'function' , checked : 'checked' } ,
45
+ { i0 : 'sklearn' , i1 : 'metrics' , type : 'function' , checked : 'checked' }
46
46
]
47
47
}
48
48
@@ -175,9 +175,9 @@ define([
175
175
let that = this ;
176
176
libraries && libraries . forEach ( ( lib , idx ) => {
177
177
if ( lib . type == 'function' ) {
178
- page . appendLine ( that . templateForFunction ( idx , lib . i0 , lib . i1 , lib . checked ) ) ;
178
+ page . appendLine ( that . templateForFunction ( idx , lib . i0 , lib . i1 , lib . checked === 'checked' ) ) ;
179
179
} else {
180
- page . appendLine ( that . templateForModule ( idx , lib . i0 , lib . i1 , lib . checked ) ) ;
180
+ page . appendLine ( that . templateForModule ( idx , lib . i0 , lib . i1 , lib . checked === 'checked' ) ) ;
181
181
}
182
182
} ) ;
183
183
page . appendLine ( '</tbody>' ) ;
@@ -246,7 +246,7 @@ define([
246
246
if ( pacI0 == "" ) {
247
247
continue ;
248
248
}
249
- if ( pacChecked ) {
249
+ if ( pacChecked === true ) {
250
250
if ( sbCode . toString ( ) . trim ( ) . length > 0 ) {
251
251
sbCode . appendLine ( ) ;
252
252
}
@@ -270,7 +270,7 @@ define([
270
270
}
271
271
}
272
272
273
- importMeta . push ( { i0 : pacI0 , i1 : pacI1 , type : pacType , checked : pacChecked } ) ;
273
+ importMeta . push ( { i0 : pacI0 , i1 : pacI1 , type : pacType , checked : ( pacChecked ? 'checked' : '' ) } ) ;
274
274
}
275
275
this . state . importMeta = importMeta ;
276
276
0 commit comments