npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fx-surv-percentage-calculator

v1.0.25

Published

Display surv completion percentage

Downloads

39

Readme

Package to display surv completion percentual

Build Status Code Climate

JSON structure and rules description

Textarea Rule Markup

questions -> rule?
   input -> description_input <- required_question? min_length?

Dropdown Rule Markup

dropdown-> min_required? rule?
  checkbox -> description_input <- required_question? min_length?

Available Rules

  • Default Rule - The default rule is 0 or 100% percent - Distribute weigth in each other - section qty
  • Dropdown Rule - In dropdown rule the percentage is granular
  • RowTemplate Rule - In row template the percentage calculus is granular
  • Upload Rule - In upload template rule the percentage calculus is granular

Textarea Template (Default Template)

{
    "parent": {
        "col": "col-md-12",
        "label": "<span class=\"icon\"><i class=\"fa fa-globe\"></i></span><span class=\"primary-blue\">Preencha este campo caso entenda que existem outros fatores, não mencionados anteriormente, que devem ser incluídos:</span>",
        "rule": "defaultRule"
    },
    "input":[
        {"col": "col-md-8", "label": "", "type": "textarea", "model": "other_situation", "required_question": true, "min_length": 100}
    ]
}

Textarea Template (Default Template) Full - Sample

{
     "parent": {
         "col": "col-md-12",
         "force_label": true,
         "label": "<h2>Descrição Da empresa e Performance Recente</h2> <p>Apresentar resumidamente a sua empresa incluindo informações como: </p>",
         "rule": "defaultRule"
     },
     "input":[
         {"col": "col-md-8", "label": "<span class=\"primary-blue\"> O histórico da empresa e um resumo de suas atividades e produtos/serviços.</span>", "type": "textarea", "model": "company_description",
             "example": {"title": "Exemplo de como responder", "content": "Fundada em 1990 na cidade de São Paulo/SP, a Empresa Exemplo atua desde sua origem na fabricação de móveis para escritório. Atualmente, a empresa conta com 2 fábricas com área construída de 20.000 m², bem como 5 lojas próprias nas regiões Sul e Sudeste, suas regiões de maior atuação."}},
     ]
 }

Row Template

{
     "parent": {
         "col": "col-md-12",
         "label": "<h3>Clientes</h3><p>Quanto os seus 8 maiores clientes representaram do total das receitas da empresa no último ano?</p>",
          "type": "row_template",
          "btn_title": "cliente",
          "min_rows": 2,
          "min_required": 8,
          "rule": "rowTemplateRule"
      },
      "input":[
         {"col": "col-md-4", "label": "Cliente", "type": "text", "model": "customer_abc_$index.customer", "required_question": true},
         {"col": "col-md-3", "label": "Valor", "type": "number", "decimal": 2, "right_info": "%", "model": "customer_abc_$index.value", "required_question": true}
     ]
 }

Dropdown Template

 {
     "parent": {
         "col": "col-md-8",
         "label": "<span class=\"icon\"><i class=\"fa fa-line-chart\"></i></span><span class=\"primary-blue\">Receitas, Crescimento e Oportunidades</span>",
         "placeholder": "Favor escolha NO MÁXIMO 2 FATORES que melhor represente sua empresa.",
         "type": "dropdown",
         "rule": "dropdownRule",
         "min_required": 4
     },
     "input":[
         {
           "label": "Que as suas receitas não são tão afetadas pela atividade econômica.",
           "type": "checkbox",
           "model": "revenue_situation.economic_activity",
           "description_input": {
             "label": "",
             "type": "textarea",
             "model": "revenue_situation.economic_activity_explanation",
             "ng-if": "vm.$1.revenue_situation.economic_activity",
             "required_question": true,
             "min_length": 200
             }
           }
     ]
 }

Upload Template

{
     "parent": {
         "col": "col-md-8",
         "label": "",
         "type": "upload_list",
         "rule": "uploadRule"
     },
     "input":[
         {
           "label": "Apresentação Institucional da Empresa",
           "type": "upload", "model": "documents.company_presentation",
           "option": [
             {"label":"Documento enviado","value":true},
             {"label":"Fazer upload","value":false}
           ],
           "id_document_type": "35",
           "required_question": true
         }
     ]
 }

Response

[
  {"area": "Dados Iniciais", "percentage": 25},
  {"area": "Análise Quantitativa", "percentage": 25},
  {"area": "Análise Qualitativa", "percentage": 0},
  {"area": "Documentos", "percentage": 0}
]

Observations

To see entries data structure, please read the tests