@@ -739,46 +739,116 @@ define([
739739 // const WHILE_OPERATOR_ARG4 = ['none', '==' ,'!=', '<', '>', '>=', '<=', 'and', 'or', 'in','not in'];
740740 // const WHILE_OPERATOR_ARG6 = ['==' ,'!=', '<', '>', '>=', '<=', 'and', 'or', 'in','not in'];
741741
742+ /**
743+ * APPS menu configurations
744+ *
745+ * key: {
746+ * label: displayed name
747+ * tooltip: used as tooltip (optional; default is same as label)
748+ * file: file/module path
749+ * icon: icon path
750+ * color: 1~4 / 0 as preparing(WIP)(optional; default is 0)
751+ * config: (optional)
752+ * {
753+ * title: popup title
754+ * width: popup size width(px, %)
755+ * height: popup size height(px, %)
756+ * }
757+ * }
758+ */
742759 const APPS_CONFIG = {
743760 'import' : {
761+ label : 'Import' ,
744762 file : '/nbextensions/visualpython/src/file_io/import.js' ,
763+ icon : '/nbextensions/visualpython/resource/apps/apps_import.svg' ,
764+ color : 1 ,
745765 config : { title : 'Import' , width : '500px' }
746766 } ,
747- 'markdown' : {
748- file : '/nbextensions/visualpython/src/markdown/markdown.js' ,
749- config : { title : 'Markdown' }
767+ 'file' : {
768+ label : 'File' ,
769+ file : '/nbextensions/visualpython/src/file_io/fileio.js' ,
770+ icon : '/nbextensions/visualpython/resource/apps/apps_file.svg' ,
771+ color : 1 ,
772+ config : { title : 'File' , width : '500px' }
773+ } ,
774+ 'variable' : {
775+ label : 'Variable' ,
776+ file : '/nbextensions/visualpython/src/file_io/variables.js' ,
777+ icon : '/nbextensions/visualpython/resource/apps/apps_variable.svg' ,
778+ color : 1 ,
779+ config : { title : 'Variables' }
750780 } ,
751781 'snippets' : {
782+ label : 'Snippets' ,
752783 file : '/nbextensions/visualpython/src/file_io/udf.js' ,
784+ icon : '/nbextensions/visualpython/resource/apps/apps_snippets.svg' ,
785+ color : 1 ,
753786 config : { title : 'Snippets' }
754787 } ,
755- 'variable' : {
756- file : '/nbextensions/visualpython/src/file_io/variables.js' ,
757- config : { title : 'Variables' }
788+ 'frame' : {
789+ label : 'Frame' ,
790+ file : 'nbextensions/visualpython/src/common/vpFrameEditor' ,
791+ icon : '/nbextensions/visualpython/resource/apps/apps_frame.svg' ,
792+ color : 2 ,
758793 } ,
759- 'file' : {
760- file : '/nbextensions/visualpython/src/file_io/fileio.js' ,
761- config : { title : 'File' , width : '500px' }
794+ 'subset' : {
795+ label : 'Subset' ,
796+ file : 'nbextensions/visualpython/src/common/vpSubsetEditor' ,
797+ icon : '/nbextensions/visualpython/resource/apps/apps_subset.svg' ,
798+ color : 2 ,
762799 } ,
763800 'instance' : {
801+ label : 'Instance' ,
764802 file : '/nbextensions/visualpython/src/file_io/instance.js' ,
803+ icon : '/nbextensions/visualpython/resource/apps/apps_instance.svg' ,
804+ color : 2 ,
765805 config : { title : 'Instance' , width : '500px' , height : '500px' }
766806 } ,
767- 'subset' : {
768- file : 'nbextensions/visualpython/src/common/vpSubsetEditor' ,
807+ 'groupby' : {
808+ label : 'Groupby' ,
809+ file : 'nbextensions/visualpython/src/common/vpGroupby' ,
810+ icon : '/nbextensions/visualpython/resource/apps/apps_groupby.svg' ,
811+ color : 2 ,
769812 } ,
770- 'frame' : {
771- file : 'nbextensions/visualpython/src/common/vpFrameEditor'
813+ 'merge' : {
814+ label : 'Merge' ,
815+ file : 'nbextensions/visualpython/src/common/vpMerge' ,
816+ icon : '/nbextensions/visualpython/resource/apps/apps_merge.svg' ,
817+ color : 3 ,
818+ } ,
819+ 'reshape' : {
820+ label : 'Reshape' ,
821+ tooltip : 'Pivot & Melt' ,
822+ file : 'nbextensions/visualpython/src/common/vpReshape' ,
823+ icon : '/nbextensions/visualpython/resource/apps/apps_reshape.svg' ,
824+ color : 3 ,
772825 } ,
773826 'chart' : {
827+ label : 'Chart' ,
774828 file : '/nbextensions/visualpython/src/matplotlib/plot.js' ,
829+ icon : '/nbextensions/visualpython/resource/apps/apps_chart.svg' ,
830+ color : 3 ,
775831 config : { title : 'Chart' , width : '600px' }
776832 } ,
777- 'profiling' : {
778- file : 'nbextensions/visualpython/src/common/vpProfiling'
833+ 'markdown' : {
834+ label : 'Markdown' ,
835+ file : '/nbextensions/visualpython/src/markdown/markdown.js' ,
836+ icon : '/nbextensions/visualpython/resource/apps/apps_markdown.svg' ,
837+ color : 3 ,
838+ config : { title : 'Markdown' }
779839 } ,
780840 'pdf' : {
781- file : 'nbextensions/visualpython/src/common/vpPDF'
841+ label : 'PDF' ,
842+ file : 'nbextensions/visualpython/src/common/vpPDF' ,
843+ icon : '/nbextensions/visualpython/resource/apps/apps_pymupdf.svg' ,
844+ color : 4 ,
845+ } ,
846+ 'profiling' : {
847+ label : 'Profiling' ,
848+ tooltip : 'Pandas Profiling' ,
849+ file : 'nbextensions/visualpython/src/common/vpProfiling' ,
850+ icon : '/nbextensions/visualpython/resource/apps/apps_profiling.svg' ,
851+ color : 4 ,
782852 }
783853 }
784854
0 commit comments