<commit_before>## No upload progress bar
fileInput1 <-
function (inputId, label, multiple = FALSE, accept = NULL)
{
  inputTag <- tags$input(id = inputId, name = inputId, type = "file")
  if (multiple)
    inputTag$attribs$multiple <- "multiple"
  if (length(accept) > 0)
    inputTag$attribs$accept <- paste(accept, collapse = ",")
  tagList(tags$label(label), inputTag)
}


shinyUI(navbarPage(
  id='mainNavBar',
  title="shinyData (Beta)",

  tabPanel(title='Project',

           div(selectInput('sampleProj',
                                list(actionButton('openSampleProj', 'Open', styleclass="primary", size="small"), 'Sample Project:'),
                                choices=list.files('samples')),
               class = "pull-right"),
           br(),

           downloadButton('downloadProject', 'Save Project to File'),

           tags$hr(),

           fileInput1('loadProject', 'Import Project from File', accept=c('.sData')),
           radioButtons('loadProjectAction', '',
                        choices=c('Replace existing work'='replace',
                                  'Merge with existing work'='merge'),
                        selected='replace', inline=FALSE),

           tags$hr(),
           includeMarkdown('md/about.md')
  ),



  tabPanel(title="Data",

           sidebarLayout(
             sidebarPanel(

               selectInput(inputId="datList", label="", choices=NULL),

               tags$hr(),

               fileInput1('file', 'Add Text File',
                         accept=c('text/csv',
                                  'text/comma-separated-values,text/plain',
                                  '.csv'))


             ),
             mainPanel(
               textInput('datName', 'Data Source Name'),

               tags$hr(),

               selectizeInput(inputId="measures", label="Measures",
                              choices=NULL, multiple=TRUE,
                              options=list(
                                placeholder = '',
                                plugins = I("['remove_button']"))),

               tags$hr(),

               selectizeInput(inputId="fieldsList", label="Fields Details",
                              choices=NULL),
               textInput('fieldName', 'Field Name'),

               tags$hr(),

               h4('Preview'),
               dataTableOutput('datPreview')



               )
             )
           ),

  tabPanel(title='Visualize',

           sidebarLayout(
             sidebarPanel(
               fluidRow(
                 column(6, selectInput(inputId='sheetList', label='', choices=NULL, selected='')),
                 column(6, fluidRow(
                   actionButton(inputId='addSheet', label='Add Sheet', styleclass="primary", size="small"),
                   actionButton(inputId='deleteSheet', label='Delete Sheet', styleclass="danger", size="small")
                 ))
               ),
               fluidRow(
                 column(6, selectInput(inputId='layerList', label='', choices=NULL, selected='')),
                 column(6, fluidRow(
                   actionButton(inputId='addLayer', label='Add Overlay', styleclass="primary", size="small"),
                   actionButton(inputId='bringToTop', label='Bring to Top', styleclass="primary", size="small"),
                   conditionalPanel('input.layerList!="Plot"',
                                    actionButton(inputId='deleteLayer', label='Delete Overlay', styleclass="danger", size="small")
                                    )
                   ))
                 ),

               tabsetPanel(
                 tabPanel('Type',
                          fluidRow(
                            column(6,
                                   selectInput(inputId='markList', label='Mark Type',
                                               choices=GeomChoices, selected='bar'),
                                   selectInput(inputId='layerPositionType', label='Positioning',
                                               choices=c('Stack'='stack','Dodge'='dodge','Fill'='fill',
                                                         'Identity'='identity','Jitter'='jitter'),
                                               selected='stack'),
                                   fluidRow(
                                     column(6,
                                            textInput('layerPositionWidth', label='Width')
                                            ),
                                     column(6,
                                            textInput('layerPositionHeight', label='Height')
                                            )
                                     )
                            ),
                            column(6,
                                   selectInput(inputId='statTypeList', label='Stat',
                                               choices=StatChoices, selected='identity'),
                                   conditionalPanel('input.statTypeList=="summary"',
                                                    selectizeInput(inputId='yFunList', label='Summarize Y with',
                                                                   choices=YFunChoices,
                                                                   selected='sum', multiple=FALSE,
                                                                   options = list(create = TRUE)))
                            )
                          ),
                          br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br()
                          ),
                 tabPanel('Mapping',

                          fluidRow(
                            column(6,
                                   selectInput(inputId='aesList', label='',
                                               choices=NULL)
                                   ),
                            column(6,
                                   conditionalPanel('input.layerList != "Plot" ||
                                                    (input.aesList!="aesX" && input.aesList!="aesY")',
                                                    radioButtons('aesMapOrSet', '', choices=c('Map to variable'='map',
                                                                                              'Set to fixed value'='set'),
                                                                 selected='map')
                                                    )

                                   )
                            ),

                          uiOutput('mapOrSetUI'),
                          conditionalPanel('(input.aesList=="aesColor" || input.aesList=="aesBorderColor") &&
                                           input.aesMapOrSet=="set"',
                                           jscolorInput('aesValueColor')),

                          br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br()
                        ),
                 tabPanel('Filters',
                          selectizeInput(inputId='filterField', label='Field',
                                         choices=NULL, multiple=FALSE),
                          br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br()
                  ),

                 tabPanel('Customize',
                          navlistPanel(id='customizeItem1', well=FALSE,
                                       tabPanel('Plot Title', value='plot.title',
                                                textInput('plotTitle', '')
                                       ),
                                       tabPanel('X Axis Title', value='axis.title.x',
                                                textInput('plotXlab', '')
                                       ),
                                       tabPanel('Y Axis Title', value='axis.title.y',
                                                textInput('plotYlab', '')
                                       )
                          ),
                          fluidRow(
                            column(6,
                                   shinyTree('customizeItem')
                                   ),
                            column(6,
                                   conditionalPanel('output.ggElementType!="unit" && output.ggElementType!="character" && output.ggElementType!=""',
                                                    checkboxInput('elementBlank', 'Hide Element', value=FALSE)),
                                   conditionalPanel('output.ggElementType=="element_text"',
                                                    selectInput('textFamily','Font Family', choices=FontFamilyChoices),
                                                    selectInput('textFace', 'Font Face', choices=FontFaceChoices),
                                                    strong('Font Color'), br(),
                                                    jscolorInput('textColor'), br(),
                                                    numericInput('textSize', 'Font Size (pts)', value=NULL, step=0.1),
                                                    numericInput('textHjust', 'Horizontal Adjustment', value=NULL, step=0.1),
                                                    numericInput('textVjust', 'Vertical Adjustment', value=NULL, step=0.1),
                                                    numericInput('textAngle', 'Angle (in [0,360])', value=NULL, step=1),
                                                    numericInput('textLineheight', 'Text Line Height', value=NULL, step=0.1)
                                   ),
                                   conditionalPanel('output.ggElementType=="element_rect"',
                                                    strong('Border Color'), br(),
                                                    jscolorInput('rectColor'), br(),
                                                    strong('Fill'), br(),
                                                    jscolorInput('rectFill'), br(),<commit_msg>Minor layout change on Customize tab<commit_after>## No upload progress bar
fileInput1 <-
function (inputId, label, multiple = FALSE, accept = NULL)
{
  inputTag <- tags$input(id = inputId, name = inputId, type = "file")
  if (multiple)
    inputTag$attribs$multiple <- "multiple"
  if (length(accept) > 0)
    inputTag$attribs$accept <- paste(accept, collapse = ",")
  tagList(tags$label(label), inputTag)
}


shinyUI(navbarPage(
  id='mainNavBar',
  title="shinyData (Beta)",

  tabPanel(title='Project',

           div(selectInput('sampleProj',
                                list(actionButton('openSampleProj', 'Open', styleclass="primary", size="small"), 'Sample Project:'),
                                choices=list.files('samples')),
               class = "pull-right"),
           br(),

           downloadButton('downloadProject', 'Save Project to File'),

           tags$hr(),

           fileInput1('loadProject', 'Import Project from File', accept=c('.sData')),
           radioButtons('loadProjectAction', '',
                        choices=c('Replace existing work'='replace',
                                  'Merge with existing work'='merge'),
                        selected='replace', inline=FALSE),

           tags$hr(),
           includeMarkdown('md/about.md')
  ),



  tabPanel(title="Data",

           sidebarLayout(
             sidebarPanel(

               selectInput(inputId="datList", label="", choices=NULL),

               tags$hr(),

               fileInput1('file', 'Add Text File',
                         accept=c('text/csv',
                                  'text/comma-separated-values,text/plain',
                                  '.csv'))


             ),
             mainPanel(
               textInput('datName', 'Data Source Name'),

               tags$hr(),

               selectizeInput(inputId="measures", label="Measures",
                              choices=NULL, multiple=TRUE,
                              options=list(
                                placeholder = '',
                                plugins = I("['remove_button']"))),

               tags$hr(),

               selectizeInput(inputId="fieldsList", label="Fields Details",
                              choices=NULL),
               textInput('fieldName', 'Field Name'),

               tags$hr(),

               h4('Preview'),
               dataTableOutput('datPreview')



               )
             )
           ),

  tabPanel(title='Visualize',

           sidebarLayout(
             sidebarPanel(
               fluidRow(
                 column(6, selectInput(inputId='sheetList', label='', choices=NULL, selected='')),
                 column(6, fluidRow(
                   actionButton(inputId='addSheet', label='Add Sheet', styleclass="primary", size="small"),
                   actionButton(inputId='deleteSheet', label='Delete Sheet', styleclass="danger", size="small")
                 ))
               ),
               fluidRow(
                 column(6, selectInput(inputId='layerList', label='', choices=NULL, selected='')),
                 column(6, fluidRow(
                   actionButton(inputId='addLayer', label='Add Overlay', styleclass="primary", size="small"),
                   actionButton(inputId='bringToTop', label='Bring to Top', styleclass="primary", size="small"),
                   conditionalPanel('input.layerList!="Plot"',
                                    actionButton(inputId='deleteLayer', label='Delete Overlay', styleclass="danger", size="small")
                                    )
                   ))
                 ),

               tabsetPanel(
                 tabPanel('Type',
                          fluidRow(
                            column(6,
                                   selectInput(inputId='markList', label='Mark Type',
                                               choices=GeomChoices, selected='bar'),
                                   selectInput(inputId='layerPositionType', label='Positioning',
                                               choices=c('Stack'='stack','Dodge'='dodge','Fill'='fill',
                                                         'Identity'='identity','Jitter'='jitter'),
                                               selected='stack'),
                                   fluidRow(
                                     column(6,
                                            textInput('layerPositionWidth', label='Width')
                                            ),
                                     column(6,
                                            textInput('layerPositionHeight', label='Height')
                                            )
                                     )
                            ),
                            column(6,
                                   selectInput(inputId='statTypeList', label='Stat',
                                               choices=StatChoices, selected='identity'),
                                   conditionalPanel('input.statTypeList=="summary"',
                                                    selectizeInput(inputId='yFunList', label='Summarize Y with',
                                                                   choices=YFunChoices,
                                                                   selected='sum', multiple=FALSE,
                                                                   options = list(create = TRUE)))
                            )
                          ),
                          br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br()
                          ),
                 tabPanel('Mapping',

                          fluidRow(
                            column(6,
                                   selectInput(inputId='aesList', label='',
                                               choices=NULL)
                                   ),
                            column(6,
                                   conditionalPanel('input.layerList != "Plot" ||
                                                    (input.aesList!="aesX" && input.aesList!="aesY")',
                                                    radioButtons('aesMapOrSet', '', choices=c('Map to variable'='map',
                                                                                              'Set to fixed value'='set'),
                                                                 selected='map')
                                                    )

                                   )
                            ),

                          uiOutput('mapOrSetUI'),
                          conditionalPanel('(input.aesList=="aesColor" || input.aesList=="aesBorderColor") &&
                                           input.aesMapOrSet=="set"',
                                           jscolorInput('aesValueColor')),

                          br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br()
                        ),
                 tabPanel('Filters',
                          selectizeInput(inputId='filterField', label='Field',
                                         choices=NULL, multiple=FALSE),
                          br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br(), br()
                  ),

                 tabPanel('Customize',
                          textInput('plotTitle', 'Plot Title'),
                          fluidRow(
                            column(6,
                                   textInput('plotXlab', 'X Axis Title')
                            ),
                            column(6,
                                   textInput('plotYlab', 'Y Axis Title')
                            )),
                          h4('Formatting'),
                          fluidRow(
                            column(6,
                                   shinyTree('customizeItem')
                                   ),
                            column(6,
                                   conditionalPanel('output.ggElementType!="unit" && output.ggElementType!="character" && output.ggElementType!=""',
                                                    checkboxInput('elementBlank', 'Hide Element', value=FALSE)),
                                   conditionalPanel('output.ggElementType=="element_text"',
                                                    selectInput('textFamily','Font Family', choices=FontFamilyChoices),
                                                    selectInput('textFace', 'Font Face', choices=FontFaceChoices),
                                                    strong('Font Color'), br(),
                                                    jscolorInput('textColor'), br(),
                                                    numericInput('textSize', 'Font Size (pts)', value=NULL, step=0.1),
                                                    numericInput('textHjust', 'Horizontal Adjustment', value=NULL, step=0.1),
                                                    numericInput('textVjust', 'Vertical Adjustment', value=NULL, step=0.1),
                                                    numericInput('textAngle', 'Angle (in [0,360])', value=NULL, step=1),
                                                    numericInput('textLineheight', 'Text Line Height', value=NULL, step=0.1)
                                   ),
                                   conditionalPanel('output.ggElementType=="element_rect"',
                                                    strong('Border Color'), br(),
                                                    jscolorInput('rectColor'), br(),
                                                    strong('Fill'), br(),
                                                    jscolorInput('rectFill'), br(),
{'fraction_non_alphanumeric': 0.11607808076292654, 'fraction_numerical': 0.0031788605771618733, 'mean_word_length': 0.9492690483105819, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 212, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '733030', 'n_tokens_mistral': 4074, 'n_tokens_neox': 3816, 'n_words': 705}