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 🙏

© 2025 – Pkg Stats / Ryan Hefner

eafit-tree-view

v0.0.5

Published

El componente de eafit-tree-view, es una vista de árbol que permite una representación jerárquica de información, compuesto por un nodo o rama que contiene subcarpetas que a su vez contienen archivos, desarrollado en vue.js.

Readme

Introdución

El componente de eafit-tree-view, es una vista de árbol que permite una representación jerárquica de información, compuesto por un nodo o rama que contiene subcarpetas que a su vez contienen archivos, desarrollado en vue.js.

Este treeview cuenta con las siguientes especificaciones:

  1. Solo permite la creación de un nodo o rama principal.
  2. Mediante un menú contextual y usando de clic derecho sobre el nodo puede adicionar subcarpetas o eliminar toda la rama y mediante doble clic observar su contenido.
  3. Las subcarpetas al igual que los nodos contiene un menú contextual (clic derecho) en el cual puede agregar un archivo o eliminar la subcarpeta y observar su contenido con doble clic.
  4. Los archivos se pueden eliminar o modificar su contenido mediante menú contextual (clic derecho) y ver su contenido con doble clic.

A medida que elimina, crea o modifica los elementos estos cambios se van almacenando en el local store en formato JSON.

Formato del arbol json almacenado:

[
   {
      "id":1,                      // identificador del nodo
      "name":"Root",               // nombre del nodo
      "subFolders":[               //Subfolder asociados 
         {
            "id":"1_1",             //identificador del subfolder (1 digito indica el id del nodo al cual esta asociado,2 digito identifica al folder)   
            "name":"Subfolder",    // nombre del folder 
            "files":[               //archivos asociados al subfolder
               {
                  "id":"1_1_1",     // identificador del archivo  (1 digito indica el id del nodo al cual esta asociado,2 digito indica el id del subfolder al cual esta asociado, 3 digito identificador del archivo)
                  "name":"File",    //nombre del archivo 
                  "text":""         //contenido del archivo 
               }
            ]
         }
      ]
   }
]

Instalación

NPM

NPM es el método de instalación recomendado para usar eafit-tree-view.

npm install eafit-tree-view

Uso

Sobre el componente donde usara TreeView importe las siguiente librerias:

Componente:

<script>
...
import "eafit-tree-view";
...
</script>

Estilos:

<style [scope]>
...
@import url("../../node_modules/eafit-tree-view/dist/tree-view.css");
...
</style>

Configuracion

Adiccionar carpetas dentro de carpetas

Por defecto el componente no permite la creacion de carpetas dentro de carpetas, para tener control sobre esto, debe configurar el componente así:

...
<TreeView allowSubFoldersIntoSubFoldersAddition="[true/false]" />
...

Tambien puede vincular dinamicamente esta configuración:

...
<TreeView v-bind:allowSubFoldersIntoSubFoldersAddition="myDinamicValue" />
...

Configurar los estilos

Puede sobreescribir los estilos presentados a continuación para configurar el aspecto de los diferentes niveles del tree view, es un aspecto de personalización que le permitirá adaptar el componente a los estilos que maneja su contenedor:

.subFolderStyle {
  background-color: #41a4fc;
}
.nodeStyle {
  background-color: #959595;
}
.fileStyle {
  background-color: beige;
}

Ejemplo de uso de TreeView en un componente Vue

<template>
  <div class="hello">
    <div style="width:500px;margin-left:auto;margin-right:auto;">
      <TreeView />
    </div>
  </div>
</template>

<script>
import "eafit-tree-view";
export default {
  name: "HelloWorld"
};
</script>

<style>
</style>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
@import url("../../node_modules/eafit-tree-view/dist/tree-view.css");
</style>

Ejemplo de implementación

Alt text

Ejemplo JSON generado

[
   {
      "id":1,
      "name":"Root",
      "subFolders":[
         {
            "id":"1_1",
            "name":"Subfolder",
            "files":[
               {
                  "id":"1_1_1",
                  "name":"File1",
                  "text":"TODO LO QUE SE PUEDE IMAGINAR ES REAL\n"
               },
               {
                  "id":"1_1_2",
                  "name":"File2",
                  "text":"¿Hasta qué punto lo que imaginamos es menos real que lo que percibimos a través de los sentidos?\n"
               }
            ]
         }
      ]
   }
]