mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added an basic implementation of bootstrap-treeview in typescript
This commit is contained in:
parent
e7fa1ebcb8
commit
a8ff18a340
14 changed files with 4050 additions and 13 deletions
44
assets/ts_src/BSTreeViewNode.ts
Normal file
44
assets/ts_src/BSTreeViewNode.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
import BSTreeViewNodeState from "./BSTreeViewNodeState";
|
||||
import BSTreeViewOptions from "./BSTreeViewOptions";
|
||||
|
||||
export default class BSTreeViewNode {
|
||||
text: string;
|
||||
icon: string;
|
||||
image: string;
|
||||
selectedIcon: string;
|
||||
color: string;
|
||||
backColor: string;
|
||||
iconColor: string;
|
||||
iconBackground: string;
|
||||
selectable: boolean;
|
||||
checkable: boolean;
|
||||
state: BSTreeViewNodeState;
|
||||
tags: string[];
|
||||
dataAttr: object;
|
||||
id: string;
|
||||
class: string;
|
||||
hideCheckbox: boolean;
|
||||
nodes: BSTreeViewNode[];
|
||||
tooltip: string;
|
||||
|
||||
lazyLoad: boolean;
|
||||
tagsClass: string;
|
||||
|
||||
|
||||
el: HTMLElement;
|
||||
|
||||
searchResult: boolean;
|
||||
|
||||
|
||||
level: number;
|
||||
index: number;
|
||||
nodeId: string;
|
||||
parentId: string
|
||||
|
||||
constructor(options: BSTreeViewNode|object = null) {
|
||||
if(options) {
|
||||
Object.assign(this, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue