# @binar/tree-view-component

> Its Tree View Component

Latest version **1.0.25** (published 2020-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @binar/tree-view-component
pnpm add @binar/tree-view-component
yarn add @binar/tree-view-component
bun add @binar/tree-view-component
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.25 |
| Published | 2020-12-28 |
| First published | 2020-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Binar |
| Maintainers | binar |
| Keywords | TreeView, Tree, webcomponent, litelement, polymer |

## Links

- npm: https://www.npmjs.com/package/@binar/tree-view-component
- Repository: https://github.com/binar1/tree-web-component
- Homepage: https://github.com/binar1/tree-web-component#readme
- Issues: https://github.com/binar1/tree-web-component/issues
- npm.io page: https://npm.io/package/@binar/tree-view-component

## Dependencies (1)

- [lit-element](https://npm.io/package/lit-element.md) ^2.2.0

## Recent versions

- 1.0.25 (latest) — 2020-12-28
- 1.0.24 — 2020-12-28
- 1.0.23 — 2020-12-28
- 1.0.22 — 2020-12-28
- 1.0.21 — 2020-12-28
- 1.0.20 — 2020-12-28
- 1.0.19 — 2020-12-28
- 1.0.18 — 2020-12-28

## README

# tree-view


![alt text](./test/image/Display.png)     
Web component for TreeView implemented with LitElement.

## Installation

```shell
npm i @binar/tree-view-component
```

Then, import tree-view into your element:

```javascript
import 'tree-view-component/tree-view.js';
```

or in an html file:

```html
<script type="module" src="/path/to/tree-view.js"></script>
OR 

 <script
    type="module"
    src="https://unpkg.com/@binar/tree-view-component"
    ></script>
```

## Usage

In your LitElement class:

```javascript
static get styles() {
  return css`
    :host {
      display: block;
    }
  `;
}
static get properties() {
  return {};
}

constructor() {
  super();
}

render() {
  return html`
    <tree-view id="chart" key="id" value="1" ></tree-view>
  `;
}

```

## JS

```js
  var TreeData={
      categories: {
        label: "Categories",
        id:"1",
        children: {
          "patient": {
            label: "Patients",
            id:"2",
            children: {
              "patient:janeDoe": {
                label: "Jane Doe",
                icon: "Woman.png",
                id:"3",
                children: {
                  "jd:plans": {
                    label: "Plans",
                    id:"4",
                    children: {
                      "plan:JDHI1": {
                        label: "Health Insurance JDHI1",
                        icon: "Plan.png",
                        id:"5"
                      },
                      "plan:JDDI1": {
                        label: "Dental Insurance JDDI1",
                        icon: "Plan.png",
                        id:"6"
                      },
                      "plan:JDVI1": {
                        label: "Vision Insurance JDVI1",
                        icon: "Plan.png",
                        id:"7"
                      },
                    },
                  },
                },
              },
              "person:briannen": {
                label: "Briannen Storm",
                icon: "Woman.png",
                id:"8",
                children: {
                  "bs:plans": {
                    label: "Plans",
                    id:"9",
                    children: {
                      "plan:BSHI1": {
                        label: "Health Insurance BSHI1",
                        id:"10",
                        icon: "Plan.png",
                      },
                      "plan:BSDI1": {
                        label: "Dental Insurance BSDI1",
                        id:"11",
                        icon: "Plan.png",
                      },
                      "plan:BSVI1": {
                        label: "Vision Insurance BSVI1",
                        icon: "Plan.png",
                        id:"12",
                      },
                      "plan:BSVI1": {
                        label: "Vision Insurance BSVI1",
                        icon: "Plan.png",
                        id:"13",
                      },
                      "plan:BSVI1": {
                        label: "Vision Insurance BSVI1",
                        icon: "Plan.png",
                        id:"14",
                      },
                    },
                  },
                },
              },
              "person": {
                label: "Thomas Key",
                icon: "Man.png",
                id:"15",
                children: {
                  "group:KTplans": {
                    label: "Plans",
                    id:"16",
                    children: {
                      "plan:TKHI1": {
                        label: "Health Insurance HI2",
                        icon: "Plan.png",
                        id:"17",
                      },
                      "plan:TKDI1": {
                        label: "Dental Insurance DI2",
                        icon: "Plan.png",
                        id:"18",
                      },
                      "plan:TKVI1": {
                        label: "Vision Insurance VI2",
                        icon: "Plan.png",
                        id:"19",
                      },
                    },
                  },
                },
              },
            },
          },
        },
      }
  }
  window.onload = function (e) {
  let temp= document.getElementById('chart');
    temp.setAttribute('data',JSON.stringify(TreeData))
    console.log(temp);
  };

```

Here Icon Came from :``https://s3-us-west-2.amazonaws.com/s.cdpn.io/620300/``

| properties           | Default value |
| --------------------- | ------------- |
| data                  | []
| key                   | ""          |
| value                 | ""           |


#Events
| Events                | Default value |
| --------------------- | ------------- |
| item-selected         | (param)=>{}

---
_Source: https://npm.io/package/@binar/tree-view-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
