reneco-hierarchized-picker 0.2.6-beta.3 → 0.3.0
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/dist/cjs/reneco-hierarchized-picker.cjs.entry.js +15 -1
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +28 -14
- package/dist/custom-elements/index.js +15 -1
- package/dist/esm/reneco-hierarchized-picker.entry.js +15 -1
- package/dist/types/components/hierarchized-picker/hierarchized-picker.d.ts +43 -0
- package/dist/types/components.d.ts +54 -0
- package/package.json +3 -2
- package/readme.md +0 -69
|
@@ -17843,6 +17843,9 @@ const HierarchizedPickerComponent = class {
|
|
|
17843
17843
|
this.hasFocus = undefined;
|
|
17844
17844
|
this.errorToLog = '';
|
|
17845
17845
|
}
|
|
17846
|
+
/**
|
|
17847
|
+
* This method returns the current component's value
|
|
17848
|
+
*/
|
|
17846
17849
|
getValue() {
|
|
17847
17850
|
var _a, _b, _c, _d;
|
|
17848
17851
|
if (!this.theOptions.output) {
|
|
@@ -17938,9 +17941,15 @@ const HierarchizedPickerComponent = class {
|
|
|
17938
17941
|
return !isEqual;
|
|
17939
17942
|
}
|
|
17940
17943
|
}
|
|
17944
|
+
/**
|
|
17945
|
+
* This method replaces the current component's options with the ones passed to the method
|
|
17946
|
+
*/
|
|
17941
17947
|
async setOptions(newOptions) {
|
|
17942
17948
|
this.setNewOption(newOptions);
|
|
17943
17949
|
}
|
|
17950
|
+
/**
|
|
17951
|
+
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
17952
|
+
*/
|
|
17944
17953
|
async filterTree(searchedValue) {
|
|
17945
17954
|
this.search(searchedValue);
|
|
17946
17955
|
}
|
|
@@ -19161,7 +19170,9 @@ const HierarchizedPickerComponent = class {
|
|
|
19161
19170
|
collapseAllNodes() {
|
|
19162
19171
|
document.querySelectorAll('#tree-area-' + this.componentID + ' .treejs-node').forEach((item) => item.classList.add('treejs-node__close'));
|
|
19163
19172
|
}
|
|
19164
|
-
|
|
19173
|
+
/**
|
|
19174
|
+
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
19175
|
+
*/
|
|
19165
19176
|
async showSelectedNodes(addDelay = false) {
|
|
19166
19177
|
if (this.theOptions.multiple) {
|
|
19167
19178
|
console.warn("You are not allowed to scroll to selected nodes in multiple mode");
|
|
@@ -19505,6 +19516,9 @@ const HierarchizedPickerComponent = class {
|
|
|
19505
19516
|
this.displayPickerError('Error(s) when loading tree default value(s)!');
|
|
19506
19517
|
}
|
|
19507
19518
|
}
|
|
19519
|
+
/**
|
|
19520
|
+
* This method clears the component from any selected value(s)
|
|
19521
|
+
*/
|
|
19508
19522
|
async clearPicker() {
|
|
19509
19523
|
let oldValue = await this.getValue();
|
|
19510
19524
|
// Multiple picker : uncheck element
|
|
@@ -63,6 +63,9 @@ export class HierarchizedPickerComponent {
|
|
|
63
63
|
this.hasFocus = undefined;
|
|
64
64
|
this.errorToLog = '';
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* This method returns the current component's value
|
|
68
|
+
*/
|
|
66
69
|
getValue() {
|
|
67
70
|
var _a, _b, _c, _d;
|
|
68
71
|
if (!this.theOptions.output) {
|
|
@@ -158,9 +161,15 @@ export class HierarchizedPickerComponent {
|
|
|
158
161
|
return !isEqual;
|
|
159
162
|
}
|
|
160
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* This method replaces the current component's options with the ones passed to the method
|
|
166
|
+
*/
|
|
161
167
|
async setOptions(newOptions) {
|
|
162
168
|
this.setNewOption(newOptions);
|
|
163
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
172
|
+
*/
|
|
164
173
|
async filterTree(searchedValue) {
|
|
165
174
|
this.search(searchedValue);
|
|
166
175
|
}
|
|
@@ -1384,7 +1393,9 @@ export class HierarchizedPickerComponent {
|
|
|
1384
1393
|
collapseAllNodes() {
|
|
1385
1394
|
document.querySelectorAll('#tree-area-' + this.componentID + ' .treejs-node').forEach((item) => item.classList.add('treejs-node__close'));
|
|
1386
1395
|
}
|
|
1387
|
-
|
|
1396
|
+
/**
|
|
1397
|
+
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
1398
|
+
*/
|
|
1388
1399
|
async showSelectedNodes(addDelay = false) {
|
|
1389
1400
|
if (this.theOptions.multiple) {
|
|
1390
1401
|
console.warn("You are not allowed to scroll to selected nodes in multiple mode");
|
|
@@ -1728,6 +1739,9 @@ export class HierarchizedPickerComponent {
|
|
|
1728
1739
|
this.displayPickerError('Error(s) when loading tree default value(s)!');
|
|
1729
1740
|
}
|
|
1730
1741
|
}
|
|
1742
|
+
/**
|
|
1743
|
+
* This method clears the component from any selected value(s)
|
|
1744
|
+
*/
|
|
1731
1745
|
async clearPicker() {
|
|
1732
1746
|
let oldValue = await this.getValue();
|
|
1733
1747
|
// Multiple picker : uncheck element
|
|
@@ -1840,7 +1854,7 @@ export class HierarchizedPickerComponent {
|
|
|
1840
1854
|
"optional": false,
|
|
1841
1855
|
"docs": {
|
|
1842
1856
|
"tags": [],
|
|
1843
|
-
"text": ""
|
|
1857
|
+
"text": "The component's options as described in the IConf interface"
|
|
1844
1858
|
}
|
|
1845
1859
|
},
|
|
1846
1860
|
"valueChangeCallback": {
|
|
@@ -1859,7 +1873,7 @@ export class HierarchizedPickerComponent {
|
|
|
1859
1873
|
"optional": false,
|
|
1860
1874
|
"docs": {
|
|
1861
1875
|
"tags": [],
|
|
1862
|
-
"text": ""
|
|
1876
|
+
"text": "The callback Function called when the value change of the component is triggered"
|
|
1863
1877
|
}
|
|
1864
1878
|
},
|
|
1865
1879
|
"disabled": {
|
|
@@ -1874,7 +1888,7 @@ export class HierarchizedPickerComponent {
|
|
|
1874
1888
|
"optional": false,
|
|
1875
1889
|
"docs": {
|
|
1876
1890
|
"tags": [],
|
|
1877
|
-
"text": ""
|
|
1891
|
+
"text": "The disabled property allow the component to be locked when set at true as any standard HTML component would be"
|
|
1878
1892
|
},
|
|
1879
1893
|
"attribute": "disabled",
|
|
1880
1894
|
"reflect": false
|
|
@@ -1891,7 +1905,7 @@ export class HierarchizedPickerComponent {
|
|
|
1891
1905
|
"optional": false,
|
|
1892
1906
|
"docs": {
|
|
1893
1907
|
"tags": [],
|
|
1894
|
-
"text": ""
|
|
1908
|
+
"text": "When set, this property allows the replacement of the [options] property of the component with the set value as the method [setOptions] would\r\nThis property exists as an alternative for react context in which we can't directly call the component's method [setOptions]"
|
|
1895
1909
|
},
|
|
1896
1910
|
"attribute": "newoptions",
|
|
1897
1911
|
"reflect": false
|
|
@@ -1908,7 +1922,7 @@ export class HierarchizedPickerComponent {
|
|
|
1908
1922
|
"optional": false,
|
|
1909
1923
|
"docs": {
|
|
1910
1924
|
"tags": [],
|
|
1911
|
-
"text": ""
|
|
1925
|
+
"text": "When set, this property triggers a search of the set value inside the tree as the method [filterTree] would\r\nThis property exists as an alternative for react context in which we can't directly call the component's method [filterTree]"
|
|
1912
1926
|
},
|
|
1913
1927
|
"attribute": "newfilter",
|
|
1914
1928
|
"reflect": false
|
|
@@ -1938,7 +1952,7 @@ export class HierarchizedPickerComponent {
|
|
|
1938
1952
|
"composed": true,
|
|
1939
1953
|
"docs": {
|
|
1940
1954
|
"tags": [],
|
|
1941
|
-
"text": ""
|
|
1955
|
+
"text": "This event is emitted when the component's value is modified, providing the new value of the component"
|
|
1942
1956
|
},
|
|
1943
1957
|
"complexType": {
|
|
1944
1958
|
"original": "any",
|
|
@@ -1953,7 +1967,7 @@ export class HierarchizedPickerComponent {
|
|
|
1953
1967
|
"composed": true,
|
|
1954
1968
|
"docs": {
|
|
1955
1969
|
"tags": [],
|
|
1956
|
-
"text": ""
|
|
1970
|
+
"text": "This event can only be emitted when the component is in tree mode and the drag and drop feature enabled\r\nIt will fire when a node is dropped inside of the tree and provides the node after, before or in which the node is dropped along with it's ID"
|
|
1957
1971
|
},
|
|
1958
1972
|
"complexType": {
|
|
1959
1973
|
"original": "any",
|
|
@@ -1968,7 +1982,7 @@ export class HierarchizedPickerComponent {
|
|
|
1968
1982
|
"composed": true,
|
|
1969
1983
|
"docs": {
|
|
1970
1984
|
"tags": [],
|
|
1971
|
-
"text": ""
|
|
1985
|
+
"text": "This event can only be emitted when the component is in tree mode and the menu item context is set\r\nIt will fire when the user clicks in the menu item, providing the item which has been clicked in the menu along with the focused node's ID"
|
|
1972
1986
|
},
|
|
1973
1987
|
"complexType": {
|
|
1974
1988
|
"original": "any",
|
|
@@ -1991,7 +2005,7 @@ export class HierarchizedPickerComponent {
|
|
|
1991
2005
|
"return": "Promise<any>"
|
|
1992
2006
|
},
|
|
1993
2007
|
"docs": {
|
|
1994
|
-
"text": "",
|
|
2008
|
+
"text": "This method returns the current component's value",
|
|
1995
2009
|
"tags": []
|
|
1996
2010
|
}
|
|
1997
2011
|
},
|
|
@@ -2014,7 +2028,7 @@ export class HierarchizedPickerComponent {
|
|
|
2014
2028
|
"return": "Promise<void>"
|
|
2015
2029
|
},
|
|
2016
2030
|
"docs": {
|
|
2017
|
-
"text": "",
|
|
2031
|
+
"text": "This method replaces the current component's options with the ones passed to the method",
|
|
2018
2032
|
"tags": []
|
|
2019
2033
|
}
|
|
2020
2034
|
},
|
|
@@ -2033,7 +2047,7 @@ export class HierarchizedPickerComponent {
|
|
|
2033
2047
|
"return": "Promise<void>"
|
|
2034
2048
|
},
|
|
2035
2049
|
"docs": {
|
|
2036
|
-
"text": "",
|
|
2050
|
+
"text": "This method triggers a search inside of the tree based on the value passed to the method and displays the result",
|
|
2037
2051
|
"tags": []
|
|
2038
2052
|
}
|
|
2039
2053
|
},
|
|
@@ -2055,7 +2069,7 @@ export class HierarchizedPickerComponent {
|
|
|
2055
2069
|
"return": "Promise<void>"
|
|
2056
2070
|
},
|
|
2057
2071
|
"docs": {
|
|
2058
|
-
"text": "",
|
|
2072
|
+
"text": "This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree",
|
|
2059
2073
|
"tags": []
|
|
2060
2074
|
}
|
|
2061
2075
|
},
|
|
@@ -2071,7 +2085,7 @@ export class HierarchizedPickerComponent {
|
|
|
2071
2085
|
"return": "Promise<void>"
|
|
2072
2086
|
},
|
|
2073
2087
|
"docs": {
|
|
2074
|
-
"text": "",
|
|
2088
|
+
"text": "This method clears the component from any selected value(s)",
|
|
2075
2089
|
"tags": []
|
|
2076
2090
|
}
|
|
2077
2091
|
}
|
|
@@ -17841,6 +17841,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
17841
17841
|
this.hasFocus = undefined;
|
|
17842
17842
|
this.errorToLog = '';
|
|
17843
17843
|
}
|
|
17844
|
+
/**
|
|
17845
|
+
* This method returns the current component's value
|
|
17846
|
+
*/
|
|
17844
17847
|
getValue() {
|
|
17845
17848
|
var _a, _b, _c, _d;
|
|
17846
17849
|
if (!this.theOptions.output) {
|
|
@@ -17936,9 +17939,15 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
17936
17939
|
return !isEqual;
|
|
17937
17940
|
}
|
|
17938
17941
|
}
|
|
17942
|
+
/**
|
|
17943
|
+
* This method replaces the current component's options with the ones passed to the method
|
|
17944
|
+
*/
|
|
17939
17945
|
async setOptions(newOptions) {
|
|
17940
17946
|
this.setNewOption(newOptions);
|
|
17941
17947
|
}
|
|
17948
|
+
/**
|
|
17949
|
+
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
17950
|
+
*/
|
|
17942
17951
|
async filterTree(searchedValue) {
|
|
17943
17952
|
this.search(searchedValue);
|
|
17944
17953
|
}
|
|
@@ -19159,7 +19168,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19159
19168
|
collapseAllNodes() {
|
|
19160
19169
|
document.querySelectorAll('#tree-area-' + this.componentID + ' .treejs-node').forEach((item) => item.classList.add('treejs-node__close'));
|
|
19161
19170
|
}
|
|
19162
|
-
|
|
19171
|
+
/**
|
|
19172
|
+
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
19173
|
+
*/
|
|
19163
19174
|
async showSelectedNodes(addDelay = false) {
|
|
19164
19175
|
if (this.theOptions.multiple) {
|
|
19165
19176
|
console.warn("You are not allowed to scroll to selected nodes in multiple mode");
|
|
@@ -19503,6 +19514,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19503
19514
|
this.displayPickerError('Error(s) when loading tree default value(s)!');
|
|
19504
19515
|
}
|
|
19505
19516
|
}
|
|
19517
|
+
/**
|
|
19518
|
+
* This method clears the component from any selected value(s)
|
|
19519
|
+
*/
|
|
19506
19520
|
async clearPicker() {
|
|
19507
19521
|
let oldValue = await this.getValue();
|
|
19508
19522
|
// Multiple picker : uncheck element
|
|
@@ -17839,6 +17839,9 @@ const HierarchizedPickerComponent = class {
|
|
|
17839
17839
|
this.hasFocus = undefined;
|
|
17840
17840
|
this.errorToLog = '';
|
|
17841
17841
|
}
|
|
17842
|
+
/**
|
|
17843
|
+
* This method returns the current component's value
|
|
17844
|
+
*/
|
|
17842
17845
|
getValue() {
|
|
17843
17846
|
var _a, _b, _c, _d;
|
|
17844
17847
|
if (!this.theOptions.output) {
|
|
@@ -17934,9 +17937,15 @@ const HierarchizedPickerComponent = class {
|
|
|
17934
17937
|
return !isEqual;
|
|
17935
17938
|
}
|
|
17936
17939
|
}
|
|
17940
|
+
/**
|
|
17941
|
+
* This method replaces the current component's options with the ones passed to the method
|
|
17942
|
+
*/
|
|
17937
17943
|
async setOptions(newOptions) {
|
|
17938
17944
|
this.setNewOption(newOptions);
|
|
17939
17945
|
}
|
|
17946
|
+
/**
|
|
17947
|
+
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
17948
|
+
*/
|
|
17940
17949
|
async filterTree(searchedValue) {
|
|
17941
17950
|
this.search(searchedValue);
|
|
17942
17951
|
}
|
|
@@ -19157,7 +19166,9 @@ const HierarchizedPickerComponent = class {
|
|
|
19157
19166
|
collapseAllNodes() {
|
|
19158
19167
|
document.querySelectorAll('#tree-area-' + this.componentID + ' .treejs-node').forEach((item) => item.classList.add('treejs-node__close'));
|
|
19159
19168
|
}
|
|
19160
|
-
|
|
19169
|
+
/**
|
|
19170
|
+
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
19171
|
+
*/
|
|
19161
19172
|
async showSelectedNodes(addDelay = false) {
|
|
19162
19173
|
if (this.theOptions.multiple) {
|
|
19163
19174
|
console.warn("You are not allowed to scroll to selected nodes in multiple mode");
|
|
@@ -19501,6 +19512,9 @@ const HierarchizedPickerComponent = class {
|
|
|
19501
19512
|
this.displayPickerError('Error(s) when loading tree default value(s)!');
|
|
19502
19513
|
}
|
|
19503
19514
|
}
|
|
19515
|
+
/**
|
|
19516
|
+
* This method clears the component from any selected value(s)
|
|
19517
|
+
*/
|
|
19504
19518
|
async clearPicker() {
|
|
19505
19519
|
let oldValue = await this.getValue();
|
|
19506
19520
|
// Multiple picker : uncheck element
|
|
@@ -7,12 +7,29 @@ export declare class HierarchizedPickerComponent {
|
|
|
7
7
|
el: HTMLElement;
|
|
8
8
|
scrollable: HTMLDivElement;
|
|
9
9
|
loader: HTMLDivElement;
|
|
10
|
+
/**
|
|
11
|
+
* The component's options as described in the IConf interface
|
|
12
|
+
*/
|
|
10
13
|
options: IConf;
|
|
14
|
+
/**
|
|
15
|
+
* The callback Function called when the value change of the component is triggered
|
|
16
|
+
*/
|
|
11
17
|
valueChangeCallback: Function;
|
|
18
|
+
/**
|
|
19
|
+
* The disabled property allow the component to be locked when set at true as any standard HTML component would be
|
|
20
|
+
*/
|
|
12
21
|
disabled: boolean;
|
|
13
22
|
isDisabled: boolean;
|
|
14
23
|
theOptions: IConf;
|
|
24
|
+
/**
|
|
25
|
+
* When set, this property allows the replacement of the [options] property of the component with the set value as the method [setOptions] would
|
|
26
|
+
* This property exists as an alternative for react context in which we can't directly call the component's method [setOptions]
|
|
27
|
+
*/
|
|
15
28
|
newoptions: string;
|
|
29
|
+
/**
|
|
30
|
+
* When set, this property triggers a search of the set value inside the tree as the method [filterTree] would
|
|
31
|
+
* This property exists as an alternative for react context in which we can't directly call the component's method [filterTree]
|
|
32
|
+
*/
|
|
16
33
|
newfilter: string;
|
|
17
34
|
componentID: string;
|
|
18
35
|
rawData: any;
|
|
@@ -32,9 +49,23 @@ export declare class HierarchizedPickerComponent {
|
|
|
32
49
|
(message?: any, ...optionalParams: any[]): void;
|
|
33
50
|
};
|
|
34
51
|
errorToLog: string;
|
|
52
|
+
/**
|
|
53
|
+
* This event is emitted when the component's value is modified, providing the new value of the component
|
|
54
|
+
*/
|
|
35
55
|
valueChange: EventEmitter<any>;
|
|
56
|
+
/**
|
|
57
|
+
* This event can only be emitted when the component is in tree mode and the drag and drop feature enabled
|
|
58
|
+
* It will fire when a node is dropped inside of the tree and provides the node after, before or in which the node is dropped along with it's ID
|
|
59
|
+
*/
|
|
36
60
|
itemDropped: EventEmitter<any>;
|
|
61
|
+
/**
|
|
62
|
+
* This event can only be emitted when the component is in tree mode and the menu item context is set
|
|
63
|
+
* It will fire when the user clicks in the menu item, providing the item which has been clicked in the menu along with the focused node's ID
|
|
64
|
+
*/
|
|
37
65
|
itemContextMenuItemClick: EventEmitter<any>;
|
|
66
|
+
/**
|
|
67
|
+
* This method returns the current component's value
|
|
68
|
+
*/
|
|
38
69
|
getValue(): Promise<any>;
|
|
39
70
|
logError(messageToLog: any): void;
|
|
40
71
|
reloadCurrentValues(): void;
|
|
@@ -43,7 +74,13 @@ export declare class HierarchizedPickerComponent {
|
|
|
43
74
|
setNewFilter(newfilter: any): void;
|
|
44
75
|
optionsChange(newValue: any, oldValue: any): void;
|
|
45
76
|
isChangeInOptions(newV: IConf, oldV: IConf): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* This method replaces the current component's options with the ones passed to the method
|
|
79
|
+
*/
|
|
46
80
|
setOptions(newOptions: IConf): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
83
|
+
*/
|
|
47
84
|
filterTree(searchedValue: string): Promise<void>;
|
|
48
85
|
isInstanceOfIConf(object: any): boolean;
|
|
49
86
|
initComponent(): Promise<void>;
|
|
@@ -97,6 +134,9 @@ export declare class HierarchizedPickerComponent {
|
|
|
97
134
|
focusMainInput(): Promise<void>;
|
|
98
135
|
focusModal(): Promise<void>;
|
|
99
136
|
collapseAllNodes(): void;
|
|
137
|
+
/**
|
|
138
|
+
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
139
|
+
*/
|
|
100
140
|
showSelectedNodes(addDelay?: boolean): Promise<void>;
|
|
101
141
|
showTree(focused: any): void;
|
|
102
142
|
editValue(node: any): void;
|
|
@@ -112,6 +152,9 @@ export declare class HierarchizedPickerComponent {
|
|
|
112
152
|
componentDidLoad(): void;
|
|
113
153
|
checkFields(values: any, allowSetValueOnClick?: boolean): void;
|
|
114
154
|
formatDefaultValue(): void;
|
|
155
|
+
/**
|
|
156
|
+
* This method clears the component from any selected value(s)
|
|
157
|
+
*/
|
|
115
158
|
clearPicker(): Promise<void>;
|
|
116
159
|
focusInSearchEvent(_event: any): void;
|
|
117
160
|
focusOutSearchEvent(_event: any): void;
|
|
@@ -8,15 +8,45 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
8
|
import { IConf } from "./utils/utils";
|
|
9
9
|
export namespace Components {
|
|
10
10
|
interface RenecoHierarchizedPicker {
|
|
11
|
+
/**
|
|
12
|
+
* This method clears the component from any selected value(s)
|
|
13
|
+
*/
|
|
11
14
|
"clearPicker": () => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* The disabled property allow the component to be locked when set at true as any standard HTML component would be
|
|
17
|
+
*/
|
|
12
18
|
"disabled": boolean;
|
|
19
|
+
/**
|
|
20
|
+
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
21
|
+
*/
|
|
13
22
|
"filterTree": (searchedValue: string) => Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* This method returns the current component's value
|
|
25
|
+
*/
|
|
14
26
|
"getValue": () => Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* When set, this property triggers a search of the set value inside the tree as the method [filterTree] would This property exists as an alternative for react context in which we can't directly call the component's method [filterTree]
|
|
29
|
+
*/
|
|
15
30
|
"newfilter": string;
|
|
31
|
+
/**
|
|
32
|
+
* When set, this property allows the replacement of the [options] property of the component with the set value as the method [setOptions] would This property exists as an alternative for react context in which we can't directly call the component's method [setOptions]
|
|
33
|
+
*/
|
|
16
34
|
"newoptions": string;
|
|
35
|
+
/**
|
|
36
|
+
* The component's options as described in the IConf interface
|
|
37
|
+
*/
|
|
17
38
|
"options": IConf;
|
|
39
|
+
/**
|
|
40
|
+
* This method replaces the current component's options with the ones passed to the method
|
|
41
|
+
*/
|
|
18
42
|
"setOptions": (newOptions: IConf) => Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
45
|
+
*/
|
|
19
46
|
"showSelectedNodes": (addDelay?: boolean) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* The callback Function called when the value change of the component is triggered
|
|
49
|
+
*/
|
|
20
50
|
"valueChangeCallback": Function;
|
|
21
51
|
}
|
|
22
52
|
}
|
|
@@ -37,13 +67,37 @@ declare global {
|
|
|
37
67
|
}
|
|
38
68
|
declare namespace LocalJSX {
|
|
39
69
|
interface RenecoHierarchizedPicker {
|
|
70
|
+
/**
|
|
71
|
+
* The disabled property allow the component to be locked when set at true as any standard HTML component would be
|
|
72
|
+
*/
|
|
40
73
|
"disabled"?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* When set, this property triggers a search of the set value inside the tree as the method [filterTree] would This property exists as an alternative for react context in which we can't directly call the component's method [filterTree]
|
|
76
|
+
*/
|
|
41
77
|
"newfilter"?: string;
|
|
78
|
+
/**
|
|
79
|
+
* When set, this property allows the replacement of the [options] property of the component with the set value as the method [setOptions] would This property exists as an alternative for react context in which we can't directly call the component's method [setOptions]
|
|
80
|
+
*/
|
|
42
81
|
"newoptions"?: string;
|
|
82
|
+
/**
|
|
83
|
+
* This event can only be emitted when the component is in tree mode and the menu item context is set It will fire when the user clicks in the menu item, providing the item which has been clicked in the menu along with the focused node's ID
|
|
84
|
+
*/
|
|
43
85
|
"onItemContextMenuItemClick"?: (event: RenecoHierarchizedPickerCustomEvent<any>) => void;
|
|
86
|
+
/**
|
|
87
|
+
* This event can only be emitted when the component is in tree mode and the drag and drop feature enabled It will fire when a node is dropped inside of the tree and provides the node after, before or in which the node is dropped along with it's ID
|
|
88
|
+
*/
|
|
44
89
|
"onItemDropped"?: (event: RenecoHierarchizedPickerCustomEvent<any>) => void;
|
|
90
|
+
/**
|
|
91
|
+
* This event is emitted when the component's value is modified, providing the new value of the component
|
|
92
|
+
*/
|
|
45
93
|
"onValueChange"?: (event: RenecoHierarchizedPickerCustomEvent<any>) => void;
|
|
94
|
+
/**
|
|
95
|
+
* The component's options as described in the IConf interface
|
|
96
|
+
*/
|
|
46
97
|
"options"?: IConf;
|
|
98
|
+
/**
|
|
99
|
+
* The callback Function called when the value change of the component is triggered
|
|
100
|
+
*/
|
|
47
101
|
"valueChangeCallback"?: Function;
|
|
48
102
|
}
|
|
49
103
|
interface IntrinsicElements {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reneco-hierarchized-picker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"start": "stencil build --dev --watch --serve",
|
|
20
20
|
"test": "stencil test --spec --forceExit & echo ----------------!! If errors, solve issues in order and retry after each solving !!-------------- TODO > Stencil v3 !!",
|
|
21
21
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
22
|
-
"generate": "stencil generate"
|
|
22
|
+
"generate": "stencil generate",
|
|
23
|
+
"generate-doc": "del src\\components\\hierarchized-picker\\readme.md && npx stencil docs && node customize-readme.js"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
26
|
"@stencil/core": "^2.22.3",
|
package/readme.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# hierarchized-picker
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<!-- Auto Generated Below -->
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Properties
|
|
9
|
-
|
|
10
|
-
| Property | Attribute | Description | Type | Default |
|
|
11
|
-
| --------------------- | ---------- | ----------- | ---------- | ----------- |
|
|
12
|
-
| `disabled` | `disabled` | | `boolean` | `undefined` |
|
|
13
|
-
| `options` | -- | | `IConf` | `undefined` |
|
|
14
|
-
| `valueChangeCallback` | -- | | `Function` | `undefined` |
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Events
|
|
18
|
-
|
|
19
|
-
| Event | Description | Type |
|
|
20
|
-
| ------------- | ----------- | ------------------ |
|
|
21
|
-
| `valueChange` | | `CustomEvent<any>` |
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Methods
|
|
25
|
-
|
|
26
|
-
### `getValue() => Promise<any>`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
#### Returns
|
|
31
|
-
|
|
32
|
-
Type: `Promise<any>`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
### `setOptions(newOptions: any) => Promise<void>`
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
#### Returns
|
|
41
|
-
|
|
42
|
-
Type: `Promise<void>`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Dependencies
|
|
48
|
-
|
|
49
|
-
### Used by
|
|
50
|
-
|
|
51
|
-
- [ns-schema-form](../ns-schema-form)
|
|
52
|
-
|
|
53
|
-
### Depends on
|
|
54
|
-
|
|
55
|
-
- ion-input
|
|
56
|
-
- ion-spinner
|
|
57
|
-
|
|
58
|
-
### Graph
|
|
59
|
-
```mermaid
|
|
60
|
-
graph TD;
|
|
61
|
-
hierarchized-picker --> ion-input
|
|
62
|
-
hierarchized-picker --> ion-spinner
|
|
63
|
-
ns-schema-form --> hierarchized-picker
|
|
64
|
-
style hierarchized-picker fill:#f9f,stroke:#333,stroke-width:4px
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
----------------------------------------------
|
|
68
|
-
|
|
69
|
-
*Built with [StencilJS](https://stenciljs.com/)*
|