reneco-hierarchized-picker 0.4.3-beta.8 → 0.5.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/loader.cjs.js +1 -1
- package/dist/cjs/reneco-hierarchized-picker.cjs.js +1 -1
- package/dist/cjs/reneco-hierarchized-picker_2.cjs.entry.js +509 -270
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.css +10 -2
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +391 -130
- package/dist/collection/components/search-input/search-input.js +1 -3
- package/dist/collection/components/treejs/index.js +49 -50
- package/dist/collection/core/options-manager.js +2 -0
- package/dist/collection/features/events/focus-handlers.js +15 -11
- package/dist/collection/features/keyboard-navigation/keyboard-navigation.js +83 -56
- package/dist/collection/features/tree/tree-utils.js +12 -3
- package/dist/collection/utils/conf-helper.js +4 -0
- package/dist/collection/utils/constants.js +4 -3
- package/dist/collection/utils/theme-utils.js +1 -0
- package/dist/custom-elements/index.js +509 -270
- package/dist/esm/loader.js +1 -1
- package/dist/esm/reneco-hierarchized-picker.js +1 -1
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +509 -270
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/reneco-hierarchized-picker.js +1 -1
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +2 -2
- package/dist/reneco-hierarchized-picker/p-0e305bec.entry.js +1 -0
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/p-9027f23a.system.entry.js +3 -0
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/dist/types/components/hierarchized-picker/hierarchized-picker.d.ts +13 -2
- package/dist/types/components.d.ts +6 -0
- package/dist/types/core/options-manager.d.ts +1 -1
- package/dist/types/features/keyboard-navigation/keyboard-navigation.d.ts +2 -1
- package/dist/types/features/tree/tree-utils.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/reneco-hierarchized-picker/p-57a928cc.entry.js +0 -1
- package/dist/reneco-hierarchized-picker/p-eea99162.system.entry.js +0 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { IConf } from '../../utils/utils';
|
|
3
|
+
import { OptionsManager } from '../../core/options-manager';
|
|
3
4
|
export declare class HierarchizedPickerComponent {
|
|
4
5
|
el: HTMLElement;
|
|
5
6
|
scrollable: HTMLDivElement;
|
|
6
7
|
loader: HTMLDivElement;
|
|
7
8
|
private rawDataManager;
|
|
8
|
-
|
|
9
|
+
optionsManager: OptionsManager;
|
|
9
10
|
private modaleHeight;
|
|
10
11
|
private modalePosition;
|
|
11
12
|
/**
|
|
@@ -52,6 +53,7 @@ export declare class HierarchizedPickerComponent {
|
|
|
52
53
|
(message?: any, ...optionalParams: any[]): void;
|
|
53
54
|
};
|
|
54
55
|
errorToLog: string;
|
|
56
|
+
lastErrorMessage: string;
|
|
55
57
|
/**
|
|
56
58
|
* This event is emitted when the component's value is modified, providing the new value of the component
|
|
57
59
|
*/
|
|
@@ -74,6 +76,10 @@ export declare class HierarchizedPickerComponent {
|
|
|
74
76
|
* This event is emitted when the user navigates in the tree
|
|
75
77
|
*/
|
|
76
78
|
navigateInTree: EventEmitter<any>;
|
|
79
|
+
/**
|
|
80
|
+
* This event is emitted when the picker suffers an error
|
|
81
|
+
*/
|
|
82
|
+
errorRaised: EventEmitter<any>;
|
|
77
83
|
/**
|
|
78
84
|
* This method returns the current component's value
|
|
79
85
|
*/
|
|
@@ -96,6 +102,7 @@ export declare class HierarchizedPickerComponent {
|
|
|
96
102
|
}>;
|
|
97
103
|
logError(messageToLog: any): void;
|
|
98
104
|
get theOptions(): IConf;
|
|
105
|
+
diffKeys(obj1: any, obj2: any, prefix?: string): string[];
|
|
99
106
|
setNewOption(newValue: IConf, oldValue?: IConf): Promise<void>;
|
|
100
107
|
setNewOptions(newoptions: any): void;
|
|
101
108
|
setNewFilter(newfilter: any): void;
|
|
@@ -106,6 +113,7 @@ export declare class HierarchizedPickerComponent {
|
|
|
106
113
|
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
107
114
|
*/
|
|
108
115
|
filterTree(searchedValue: string): Promise<void>;
|
|
116
|
+
getError(): Promise<string>;
|
|
109
117
|
constructor();
|
|
110
118
|
componentWillLoad(): Promise<void>;
|
|
111
119
|
setDisplayedValueFromDefault(): void;
|
|
@@ -122,7 +130,7 @@ export declare class HierarchizedPickerComponent {
|
|
|
122
130
|
errorLoadingXHR(): void;
|
|
123
131
|
displayPickerError(errorMsg?: string): void;
|
|
124
132
|
getApiSearchURL(): string;
|
|
125
|
-
getContextualApiURL(init?: boolean):
|
|
133
|
+
getContextualApiURL(init?: boolean, forcedOptions?: any): any;
|
|
126
134
|
getContextualApiParams(options?: any, search?: any, init?: boolean): any;
|
|
127
135
|
translateDataForTree(dataToLoad: any, searchID?: any, searched?: any): void;
|
|
128
136
|
loadSearchDataInCurrentTree(searchID: any, searched: any): void;
|
|
@@ -132,13 +140,16 @@ export declare class HierarchizedPickerComponent {
|
|
|
132
140
|
onItemContextMenuItemClick(e: any): void;
|
|
133
141
|
setNodeAsSelected(id: any, treeToUpdate: any, userClick: any): void;
|
|
134
142
|
collapseAllNodes(): void;
|
|
143
|
+
private scrollToNode;
|
|
135
144
|
/**
|
|
136
145
|
* This method display the current selected node to the user by expanding all it's parent nodes and scrolling inside the tree
|
|
137
146
|
*/
|
|
138
147
|
showSelectedNodes(addDelay?: boolean): Promise<void>;
|
|
148
|
+
scrollToNodeWithId(targetNodeId: any, displayChildren?: boolean): Promise<void>;
|
|
139
149
|
showTree(focused: any): void;
|
|
140
150
|
editValue(node: any, userClick?: boolean): void;
|
|
141
151
|
getShortenedFullpath: (realFullpath: any) => any;
|
|
152
|
+
getShortpathFromFullpath(fullpath: any): any;
|
|
142
153
|
setDisplayedValue(value?: any): void;
|
|
143
154
|
search(searched: any): void;
|
|
144
155
|
triggerSearch(searched: any): void;
|
|
@@ -21,6 +21,7 @@ export namespace Components {
|
|
|
21
21
|
* This method triggers a search inside of the tree based on the value passed to the method and displays the result
|
|
22
22
|
*/
|
|
23
23
|
"filterTree": (searchedValue: string) => Promise<void>;
|
|
24
|
+
"getError": () => Promise<string>;
|
|
24
25
|
"getSearchResult": () => Promise<{ data: any; matches: number; }>;
|
|
25
26
|
/**
|
|
26
27
|
* This method returns the current component's value
|
|
@@ -39,6 +40,7 @@ export namespace Components {
|
|
|
39
40
|
*/
|
|
40
41
|
"options": string | IConf;
|
|
41
42
|
"refreshPicker": (resetDefaultValue?: boolean) => Promise<void>;
|
|
43
|
+
"scrollToNodeWithId": (targetNodeId: any, displayChildren?: boolean) => Promise<void>;
|
|
42
44
|
/**
|
|
43
45
|
* This method replaces the current component's options with the ones passed to the method
|
|
44
46
|
*/
|
|
@@ -98,6 +100,10 @@ declare namespace LocalJSX {
|
|
|
98
100
|
* 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]
|
|
99
101
|
*/
|
|
100
102
|
"newoptions"?: string;
|
|
103
|
+
/**
|
|
104
|
+
* This event is emitted when the picker suffers an error
|
|
105
|
+
*/
|
|
106
|
+
"onErrorRaised"?: (event: RenecoHierarchizedPickerCustomEvent<any>) => void;
|
|
101
107
|
/**
|
|
102
108
|
* 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
|
|
103
109
|
*/
|
|
@@ -2,7 +2,7 @@ import { IConf } from '../utils/utils';
|
|
|
2
2
|
export declare class OptionsManager {
|
|
3
3
|
private options;
|
|
4
4
|
constructor(initialOptions: IConf);
|
|
5
|
-
|
|
5
|
+
initializeOptions(options: IConf): IConf;
|
|
6
6
|
get data(): any;
|
|
7
7
|
getOptions(): IConf;
|
|
8
8
|
updateOptions(newOptions: Partial<IConf>): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { HierarchizedPickerComponent } from "../../components/hierarchized-picker/hierarchized-picker";
|
|
2
|
+
import { OptionsManager } from "../../core/options-manager";
|
|
2
3
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
|
-
export declare function setupKeyboardNavigation(component: HierarchizedPickerComponent, navigateInTree: EventEmitter<any>): void;
|
|
4
|
+
export declare function setupKeyboardNavigation(component: HierarchizedPickerComponent, optionsManager: OptionsManager, navigateInTree: EventEmitter<any>): void;
|
|
@@ -9,7 +9,7 @@ export declare function findNodeById(tree: any, nodeId: string): any;
|
|
|
9
9
|
/**
|
|
10
10
|
* Fills the tree with nodes based on the provided object.
|
|
11
11
|
*/
|
|
12
|
-
export declare function fillTreeWithObject(tree: any[], myObject: any[], searched: string | null, options: any
|
|
12
|
+
export declare function fillTreeWithObject(tree: any[], myObject: any[], searched: string | null, options: any): any[];
|
|
13
13
|
/**
|
|
14
14
|
* Updates the current tree with new nodes.
|
|
15
15
|
*/
|