1.3.0 • Published 2 years ago

thesaurus-tree v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

thesaurus-tree

Visualization of thesaurus

NPM JavaScript Style Guide

Install

npm install --save thesaurus-tree

Usage

import React, { Component } from 'react'

import ThesaurusTree from 'thesaurus-tree'

class Example extends Component {
  render() {
    return (
      <ThesaurusTree
        concept_id={id}
        getOneRequest={getOneRequest}
        getPartRequest={getPartRequest}
        putRequest={putRequest}
      />)
  }
}

Props

PropsDescriptionIs required?TypeDefaultProps
concept_idThe main concept that is the basis for the tree+int-
getOneRequestFunction that sends a request to the server to get one concept+(concept_id) => IOneConcept-
getPartRequestFunction that sends a request to the server to get part of thesaurus+(concept_id) => IPart-
putRequestFunction that sends a request to the server for editing one concept+(concept_id, IOneConcept) => void-
isAdminFlag for adding admin capabilities (editing)-booleanfalse
orientationOrientation of tree-"vertical" or "horizontal""vertical"
 interface IOneConcept {
  ruName: string,
  enName: string,
  author: string,
  description: string,
  confirmed: boolean
}

interface IPart {
  name: string;
  attributes?: Record<string, string | number | boolean>;
  children?: IPart[];
}

License

MIT © Barashek-1507

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago