@@ -46,11 +46,23 @@ define([
4646 'pandas' : { pipName : 'pandas' } ,
4747 'matplotlib' : { pipName : 'matplotlib' } ,
4848 'seaborn' : { pipName : 'seaborn' } ,
49+ 'plotly' : { pipName : 'plotly' } ,
50+ 'wordcloud' : { pipName : 'wordcloud' } ,
4951 'sklearn' : { pipName : 'scikit-learn' } ,
52+ 'scikit-posthocs' : { pipName : 'scikit-posthocs' } ,
5053 'scipy' : { pipName : 'scipy' } ,
51- 'statsmodel' : { pipName : 'statsmodel' } ,
52- 'pinguin' : { pipName : 'pinguin' } ,
53- 'wordcloud' : { pipName : 'wordcloud' } ,
54+ 'statsmodels' : { pipName : 'statsmodels' } ,
55+ 'factor-analyzer' : { pipName : 'factor-analyzer' } ,
56+ 'pingouin' : { pipName : 'pingouin' } ,
57+ 'category_encoders' : { pipName : 'category_encoders' } ,
58+ 'imblearn' : { pipName : 'imblearn' } ,
59+ 'xgboost' : { pipName : 'xgboost' } ,
60+ 'lightgbm' : { pipName : 'lightgbm' } ,
61+ 'catboost' : { pipName : 'catboost' } ,
62+ 'auto-sklearn' : { pipName : 'auto-sklearn' } ,
63+ 'tpot' : { pipName : 'tpot' } ,
64+ 'PyMuPDF' : { pipName : 'PyMuPDF' } ,
65+ 'sweetviz' : { pipName : 'sweetviz' } ,
5466 }
5567 }
5668
@@ -135,6 +147,9 @@ define([
135147 } else if ( menu === 'uninstall' ) {
136148 var pipName = that . packageLib [ key ] . pipName ;
137149 var code = com_util . formatString ( "!pip uninstall -y {0}" , pipName ) ;
150+ if ( vpConfig . extensionType === 'lite' ) {
151+ code = com_util . formatString ( "import piplite\npiplite.uninstall('{0}')" , pipName ) ;
152+ }
138153 // create block and run it
139154 $ ( '#vp_wrapper' ) . trigger ( {
140155 type : 'create_option_page' ,
@@ -146,6 +161,9 @@ define([
146161 } else if ( menu === 'upgrade' ) {
147162 var pipName = that . packageLib [ key ] . pipName ;
148163 var code = com_util . formatString ( "!pip install --upgrade {0}" , pipName ) ;
164+ if ( vpConfig . extensionType === 'lite' ) {
165+ code = com_util . formatString ( "%pip install --upgrade {0}" , pipName ) ;
166+ }
149167 // create block and run it
150168 $ ( '#vp_wrapper' ) . trigger ( {
151169 type : 'create_option_page' ,
@@ -250,11 +268,17 @@ define([
250268 let versionType = $ ( this . wrapSelector ( '.vp-inner-popup-body input[name="ver_select"]:checked' ) ) . val ( ) ;
251269 var pipName = this . packageLib [ this . state . selected ] . pipName ;
252270 var code = com_util . formatString ( "!pip install {0}" , pipName ) ;
271+ if ( vpConfig . extensionType === 'lite' ) {
272+ code = com_util . formatString ( "import piplite\npiplite.install('{0}')" , pipName ) ;
273+ }
253274 if ( versionType === 'specified' ) {
254275 // specified version
255276 let version = $ ( this . wrapSelector ( '.vp-inner-popup-version' ) ) . val ( ) ;
256277 if ( version && version !== '' ) {
257278 code = com_util . formatString ( "!pip install {0}=={1}" , pipName , version ) ;
279+ if ( vpConfig . extensionType === 'lite' ) {
280+ code = com_util . formatString ( "import piplite\npiplite.install('{0}=={1}')" , pipName , version ) ;
281+ }
258282 } else {
259283 $ ( this . wrapSelector ( '.vp-inner-popup-version' ) ) . focus ( ) ;
260284 return false ;
@@ -289,6 +313,15 @@ define([
289313 ...savedData . packageList
290314 } ;
291315
316+ // load package list
317+ that . loadPackageList ( ) ;
318+ } ) . catch ( function ( err ) {
319+ vpLog . display ( VP_LOG_TYPE . ERROR , err ) ;
320+
321+ that . packageLib = {
322+ ...that . packageLibTemplate
323+ } ;
324+
292325 // load package list
293326 that . loadPackageList ( ) ;
294327 } ) ;
@@ -314,12 +347,14 @@ define([
314347 // install
315348 item . appendFormatLine ( '<div class="{0} vp-icon-install" data-menu="{1}" title="{2}"></div>'
316349 , 'vp-pm-item-menu-item' , 'install' , 'Install' ) ;
317- // upgrade
318- item . appendFormatLine ( '<div class="{0} vp-icon-upgrade {1}" data-menu="{2}" title="{3}"></div>'
319- , 'vp-pm-item-menu-item' , ( info . installed === true ?'' :'disabled' ) , 'upgrade' , 'Upgrade' ) ;
320- // uninstall
321- item . appendFormatLine ( '<div class="{0} vp-icon-delete {1}" data-menu="{2}" title="{3}"></div>'
322- , 'vp-pm-item-menu-item' , ( info . installed === true ?'' :'disabled' ) , 'uninstall' , 'Uninstall' ) ;
350+ if ( vpConfig . extensionType !== 'lite' ) {
351+ // upgrade
352+ item . appendFormatLine ( '<div class="{0} vp-icon-upgrade {1}" data-menu="{2}" title="{3}"></div>'
353+ , 'vp-pm-item-menu-item' , ( info . installed === true ?'' :'disabled' ) , 'upgrade' , 'Upgrade' ) ;
354+ // uninstall
355+ item . appendFormatLine ( '<div class="{0} vp-icon-delete {1}" data-menu="{2}" title="{3}"></div>'
356+ , 'vp-pm-item-menu-item' , ( info . installed === true ?'' :'disabled' ) , 'uninstall' , 'Uninstall' ) ;
357+ }
323358 item . appendLine ( '</div>' ) ; // end of vp-pm-item-menu
324359 item . appendLine ( '</div>' ) ; // end of vp-pm-item-header
325360 // delete button
0 commit comments