treeselectjs 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/treeselectjs.d.ts +4 -1
- package/dist/treeselectjs.mjs +284 -279
- package/dist/treeselectjs.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ A multi-select js component with nested options.
|
|
|
9
9
|
- Typescript support
|
|
10
10
|
|
|
11
11
|
Build data:
|
|
12
|
-
- treeselectjs.mjs
|
|
13
|
-
- treeselectjs.umd.js 40.
|
|
12
|
+
- treeselectjs.mjs 50.04 kB │ gzip: 11.33 kB
|
|
13
|
+
- treeselectjs.umd.js 40.61 kB │ gzip: 10.35 kB
|
|
14
14
|
- treeselectjs.css 6.41 kB │ gzip: 1.27 kB
|
|
15
15
|
|
|
16
16
|
**Live Demo:** https://dipson88.github.io/treeselectjs/
|
|
@@ -30,8 +30,8 @@ import Treeselect from 'treeselectjs'
|
|
|
30
30
|
|
|
31
31
|
Import treeselectjs (UMD)
|
|
32
32
|
```
|
|
33
|
-
<script src="https://cdn.jsdelivr.net/npm/treeselectjs@0.9.
|
|
34
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/treeselectjs@0.9.
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/treeselectjs@0.9.2/dist/treeselectjs.umd.js"></script>
|
|
34
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/treeselectjs@0.9.2/dist/treeselectjs.css" />
|
|
35
35
|
...
|
|
36
36
|
<script>
|
|
37
37
|
...
|
|
@@ -123,6 +123,7 @@ Name | Type (default) | Description
|
|
|
123
123
|
**options** | Array[Object] ([]) | It is an array of objects ```{name: String, value: String, disabled?: Boolean, htmlAttr?: object, children: [] }```, where children are the same array of objects. Do not use duplicated `value` field. But you can use duplicated names. [Read more](#option-description).
|
|
124
124
|
**disabled** | Boolean (false) | List will be disabled.
|
|
125
125
|
**id** | String ('') | id attribute for the accessibility.
|
|
126
|
+
**ariaLabel** | String ('') | ariaLabel attribute for the accessibility.
|
|
126
127
|
**isSingleSelect** | Boolean (false) | Converts multi-select to the single value select. Checkboxes will be removed. You should pass only one id instead of array of values. Also you can set **showTags** to false. It helps to show treeselect as a dropdown.
|
|
127
128
|
**isGroupedValue** | Boolean (false) | Return groups if they selected instead of separate ids. Treeselect returns only leaves ids by default.
|
|
128
129
|
**isIndependentNodes** | Boolean (false) | All nodes in treeselect work as an independent entity. Check/uncheck action ignore children/parent updates workflow. Disabled nodes ignore children/parent workflow as well.
|
package/dist/treeselectjs.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare interface ITreeselect {
|
|
|
30
30
|
emptyText: string;
|
|
31
31
|
staticList: boolean;
|
|
32
32
|
id: string;
|
|
33
|
+
ariaLabel: string;
|
|
33
34
|
isSingleSelect: boolean;
|
|
34
35
|
showCount: boolean;
|
|
35
36
|
disabledBranchNode: boolean;
|
|
@@ -74,6 +75,7 @@ export declare interface ITreeselectParams {
|
|
|
74
75
|
emptyText?: string;
|
|
75
76
|
staticList?: boolean;
|
|
76
77
|
id?: string;
|
|
78
|
+
ariaLabel?: string;
|
|
77
79
|
isSingleSelect?: boolean;
|
|
78
80
|
showCount?: boolean;
|
|
79
81
|
disabledBranchNode?: boolean;
|
|
@@ -117,6 +119,7 @@ declare class Treeselect implements ITreeselect {
|
|
|
117
119
|
emptyText: string;
|
|
118
120
|
staticList: boolean;
|
|
119
121
|
id: string;
|
|
122
|
+
ariaLabel: string;
|
|
120
123
|
isSingleSelect: boolean;
|
|
121
124
|
showCount: boolean;
|
|
122
125
|
disabledBranchNode: boolean;
|
|
@@ -136,7 +139,7 @@ declare class Treeselect implements ITreeselect {
|
|
|
136
139
|
isListOpened: boolean;
|
|
137
140
|
selectedName: string;
|
|
138
141
|
srcElement: HTMLElement | null;
|
|
139
|
-
constructor({ parentHtmlContainer, value, options, openLevel, appendToBody, alwaysOpen, showTags, tagsCountText, clearable, searchable, placeholder, grouped, isGroupedValue, listSlotHtmlComponent, disabled, emptyText, staticList, id, isSingleSelect, showCount, disabledBranchNode, direction, expandSelected, saveScrollPosition, isIndependentNodes, iconElements, inputCallback, openCallback, closeCallback, nameChangeCallback, searchCallback }: ITreeselectParams);
|
|
142
|
+
constructor({ parentHtmlContainer, value, options, openLevel, appendToBody, alwaysOpen, showTags, tagsCountText, clearable, searchable, placeholder, grouped, isGroupedValue, listSlotHtmlComponent, disabled, emptyText, staticList, id, ariaLabel, isSingleSelect, showCount, disabledBranchNode, direction, expandSelected, saveScrollPosition, isIndependentNodes, iconElements, inputCallback, openCallback, closeCallback, nameChangeCallback, searchCallback }: ITreeselectParams);
|
|
140
143
|
mount(): void;
|
|
141
144
|
updateValue(newValue: ValueInputType): void;
|
|
142
145
|
destroy(): void;
|