1.5.25 • Published 13 days ago

flat-tree-builder v1.5.25

Weekly downloads
-
License
-
Repository
-
Last release
13 days ago

Classifier

Only for es module, only for Postgres ltree data

Testing

npm i
npm t

Integration

Download

npm i flat-tree-builder

html

  • Create an element on the page where the element will be embedded, assign an id to the element

js

  • Import the Classifier class from classifier.js
  • Create an instance of the Classifier class, where the first parameter is the item id and the second parameter is the object with the parameters

css

  • Connect the classifier.css file
  • Connect bootstrap

Params object

  • getUrl: url for get
  • postClassifierUrl: url for post
  • delUrl: url for delete, default: postClassifierUrl
  • selectedIds: array of id's to be drawn initially
  • search: if the classifier is used for searching, type: Boolean, default: false
  • test: run with test data, type: Boolean, default: false
  • draggable: ability to drag and drop list items, type: Boolean, default: false
  • isRootSelectable: ability to select a root classifier, type: Boolean, default: true

Example

<link
        rel="stylesheet"
        href="./node_modules/bootstrap/dist/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="./node_modules/flat-tree-builder/classifier.css"/>

<div id="test"></div>
import Classifier from "flat-tree-builder";

const classifier = new Classifier("#test", {
    test: true,
    search: true,
});

API

  • toggleManual(id) - open or close the classifier with the passed id
  • fillModalForm(text) - fill the field in the modal window with text from the parameters
  • clickModalBtn() - simulates clicking the send button in a modal window
  • getModalFormValue() - gets a string from a form in a modal window
  • findById(id) - returns html element bound to id
1.5.25

13 days ago

1.5.24

14 days ago

1.5.21

29 days ago

1.5.23

28 days ago

1.5.22

28 days ago

1.5.20

1 month ago

1.5.19

3 months ago

1.5.18

4 months ago

1.5.16

5 months ago

1.5.17

5 months ago

1.5.15

5 months ago

1.5.14

5 months ago

1.5.13

5 months ago

1.5.12

5 months ago

1.5.11

5 months ago

1.5.10

5 months ago

1.5.9

5 months ago

1.5.8

5 months ago

1.5.7

5 months ago

1.5.5

5 months ago

1.5.4

5 months ago

1.5.3

5 months ago

1.5.2

5 months ago

1.5.1

5 months ago

1.5.0

6 months ago

1.4.6

6 months ago

1.4.5

6 months ago

1.4.4

6 months ago

1.4.3

6 months ago

1.4.2

6 months ago

1.4.1

6 months ago

1.4.0

6 months ago

1.3.0

6 months ago

1.2.11

6 months ago

1.2.10

6 months ago

1.2.9

6 months ago

1.2.8

6 months ago

1.2.7

6 months ago

1.2.6

6 months ago

1.2.4

6 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.11

6 months ago

1.1.10

6 months ago

1.1.9

6 months ago

1.1.8

6 months ago

1.1.7

6 months ago

1.1.6

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

7 months ago