reneco-hierarchized-picker 0.5.0 → 0.5.1
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_2.cjs.entry.js +16 -19
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +16 -18
- package/dist/collection/features/keyboard-navigation/keyboard-navigation.js +0 -1
- package/dist/custom-elements/index.js +16 -19
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +16 -19
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +1 -1
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-0e305bec.entry.js → p-ca142f5a.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/{p-9027f23a.system.entry.js → p-d6a25038.system.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/package.json +1 -1
|
@@ -18644,7 +18644,6 @@ function setupKeyboardNavigation(component, optionsManager, navigateInTree) {
|
|
|
18644
18644
|
if (optionsManager.getOptions().mode != "tree" && !optionsManager.getOptions().multiple) {
|
|
18645
18645
|
setTimeout(() => {
|
|
18646
18646
|
component.showTree('hide');
|
|
18647
|
-
// TODO put back? >> focusMainInput(component);
|
|
18648
18647
|
}, 100);
|
|
18649
18648
|
}
|
|
18650
18649
|
}
|
|
@@ -19454,12 +19453,10 @@ const HierarchizedPickerComponent = class {
|
|
|
19454
19453
|
}
|
|
19455
19454
|
}
|
|
19456
19455
|
loadSearchDataInCurrentTree(searchID, searched) {
|
|
19457
|
-
|
|
19458
|
-
if (this.searchToDisplay > -1) {
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
19462
|
-
});
|
|
19456
|
+
const displayResults = () => {
|
|
19457
|
+
if (this.searchToDisplay > -1) {
|
|
19458
|
+
if (!searched)
|
|
19459
|
+
this.setSearchResults([]);
|
|
19463
19460
|
this.triggerTreeDisplay(this.rawDataManager.getData(), searched);
|
|
19464
19461
|
displayAutocompleteWithResults(this.rawDataManager.getData(), searched, this.optionsManager, this.editValue.bind(this), this.showTree.bind(this));
|
|
19465
19462
|
// Deploys all nodes
|
|
@@ -19475,15 +19472,21 @@ const HierarchizedPickerComponent = class {
|
|
|
19475
19472
|
});
|
|
19476
19473
|
}
|
|
19477
19474
|
};
|
|
19475
|
+
const completeLocalTree = (newtree) => {
|
|
19476
|
+
if (this.searchToDisplay > -1) { // TODO > Not working anymore after refact, prevents issues in displaying results when running multiple researchs at the same time && searchID == this.searchToDisplay) {
|
|
19477
|
+
this.rawDataManager.mergeData(newtree, this.theOptions.origin == 'classification' ? "ID" : "key");
|
|
19478
|
+
newtree.children.forEach((value, index) => {
|
|
19479
|
+
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
19480
|
+
});
|
|
19481
|
+
displayResults();
|
|
19482
|
+
}
|
|
19483
|
+
};
|
|
19478
19484
|
if (this.theOptions.source == 'webservice') {
|
|
19479
19485
|
if (this.theOptions.origin == 'classification') {
|
|
19480
19486
|
// WS Call
|
|
19481
19487
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
19482
19488
|
.then((data) => {
|
|
19483
|
-
|
|
19484
|
-
if (!searched) {
|
|
19485
|
-
this.setSearchResults([]);
|
|
19486
|
-
}
|
|
19489
|
+
completeLocalTree(data);
|
|
19487
19490
|
})
|
|
19488
19491
|
.catch(err => {
|
|
19489
19492
|
this.errorToLog = err;
|
|
@@ -19499,10 +19502,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19499
19502
|
deprecated: false,
|
|
19500
19503
|
}, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
19501
19504
|
.then((data) => {
|
|
19502
|
-
|
|
19503
|
-
if (!searched) {
|
|
19504
|
-
this.setSearchResults([]);
|
|
19505
|
-
}
|
|
19505
|
+
completeLocalTree(data);
|
|
19506
19506
|
})
|
|
19507
19507
|
.catch(error => {
|
|
19508
19508
|
this.errorToLog = error;
|
|
@@ -19517,10 +19517,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19517
19517
|
}
|
|
19518
19518
|
else {
|
|
19519
19519
|
if (this.optionsManager.getOptions().source == 'data') {
|
|
19520
|
-
displayResults(
|
|
19521
|
-
if (!searched) {
|
|
19522
|
-
this.setSearchResults([]);
|
|
19523
|
-
}
|
|
19520
|
+
displayResults();
|
|
19524
19521
|
}
|
|
19525
19522
|
else {
|
|
19526
19523
|
console.error("Unhandled picker settings for search scenario !!");
|
|
@@ -722,12 +722,10 @@ export class HierarchizedPickerComponent {
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
loadSearchDataInCurrentTree(searchID, searched) {
|
|
725
|
-
|
|
726
|
-
if (this.searchToDisplay > -1) {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
730
|
-
});
|
|
725
|
+
const displayResults = () => {
|
|
726
|
+
if (this.searchToDisplay > -1) {
|
|
727
|
+
if (!searched)
|
|
728
|
+
this.setSearchResults([]);
|
|
731
729
|
this.triggerTreeDisplay(this.rawDataManager.getData(), searched);
|
|
732
730
|
displayAutocompleteWithResults(this.rawDataManager.getData(), searched, this.optionsManager, this.editValue.bind(this), this.showTree.bind(this));
|
|
733
731
|
// Deploys all nodes
|
|
@@ -743,15 +741,21 @@ export class HierarchizedPickerComponent {
|
|
|
743
741
|
});
|
|
744
742
|
}
|
|
745
743
|
};
|
|
744
|
+
const completeLocalTree = (newtree) => {
|
|
745
|
+
if (this.searchToDisplay > -1) { // TODO > Not working anymore after refact, prevents issues in displaying results when running multiple researchs at the same time && searchID == this.searchToDisplay) {
|
|
746
|
+
this.rawDataManager.mergeData(newtree, this.theOptions.origin == 'classification' ? "ID" : "key");
|
|
747
|
+
newtree.children.forEach((value, index) => {
|
|
748
|
+
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
749
|
+
});
|
|
750
|
+
displayResults();
|
|
751
|
+
}
|
|
752
|
+
};
|
|
746
753
|
if (this.theOptions.source == 'webservice') {
|
|
747
754
|
if (this.theOptions.origin == 'classification') {
|
|
748
755
|
// WS Call
|
|
749
756
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
750
757
|
.then((data) => {
|
|
751
|
-
|
|
752
|
-
if (!searched) {
|
|
753
|
-
this.setSearchResults([]);
|
|
754
|
-
}
|
|
758
|
+
completeLocalTree(data);
|
|
755
759
|
})
|
|
756
760
|
.catch(err => {
|
|
757
761
|
this.errorToLog = err;
|
|
@@ -767,10 +771,7 @@ export class HierarchizedPickerComponent {
|
|
|
767
771
|
deprecated: false,
|
|
768
772
|
}, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
769
773
|
.then((data) => {
|
|
770
|
-
|
|
771
|
-
if (!searched) {
|
|
772
|
-
this.setSearchResults([]);
|
|
773
|
-
}
|
|
774
|
+
completeLocalTree(data);
|
|
774
775
|
})
|
|
775
776
|
.catch(error => {
|
|
776
777
|
this.errorToLog = error;
|
|
@@ -785,10 +786,7 @@ export class HierarchizedPickerComponent {
|
|
|
785
786
|
}
|
|
786
787
|
else {
|
|
787
788
|
if (this.optionsManager.getOptions().source == 'data') {
|
|
788
|
-
displayResults(
|
|
789
|
-
if (!searched) {
|
|
790
|
-
this.setSearchResults([]);
|
|
791
|
-
}
|
|
789
|
+
displayResults();
|
|
792
790
|
}
|
|
793
791
|
else {
|
|
794
792
|
console.error("Unhandled picker settings for search scenario !!");
|
|
@@ -50,7 +50,6 @@ export function setupKeyboardNavigation(component, optionsManager, navigateInTre
|
|
|
50
50
|
if (optionsManager.getOptions().mode != "tree" && !optionsManager.getOptions().multiple) {
|
|
51
51
|
setTimeout(() => {
|
|
52
52
|
component.showTree('hide');
|
|
53
|
-
// TODO put back? >> focusMainInput(component);
|
|
54
53
|
}, 100);
|
|
55
54
|
}
|
|
56
55
|
}
|
|
@@ -18641,7 +18641,6 @@ function setupKeyboardNavigation(component, optionsManager, navigateInTree) {
|
|
|
18641
18641
|
if (optionsManager.getOptions().mode != "tree" && !optionsManager.getOptions().multiple) {
|
|
18642
18642
|
setTimeout(() => {
|
|
18643
18643
|
component.showTree('hide');
|
|
18644
|
-
// TODO put back? >> focusMainInput(component);
|
|
18645
18644
|
}, 100);
|
|
18646
18645
|
}
|
|
18647
18646
|
}
|
|
@@ -19452,12 +19451,10 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19452
19451
|
}
|
|
19453
19452
|
}
|
|
19454
19453
|
loadSearchDataInCurrentTree(searchID, searched) {
|
|
19455
|
-
|
|
19456
|
-
if (this.searchToDisplay > -1) {
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
19460
|
-
});
|
|
19454
|
+
const displayResults = () => {
|
|
19455
|
+
if (this.searchToDisplay > -1) {
|
|
19456
|
+
if (!searched)
|
|
19457
|
+
this.setSearchResults([]);
|
|
19461
19458
|
this.triggerTreeDisplay(this.rawDataManager.getData(), searched);
|
|
19462
19459
|
displayAutocompleteWithResults(this.rawDataManager.getData(), searched, this.optionsManager, this.editValue.bind(this), this.showTree.bind(this));
|
|
19463
19460
|
// Deploys all nodes
|
|
@@ -19473,15 +19470,21 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19473
19470
|
});
|
|
19474
19471
|
}
|
|
19475
19472
|
};
|
|
19473
|
+
const completeLocalTree = (newtree) => {
|
|
19474
|
+
if (this.searchToDisplay > -1) { // TODO > Not working anymore after refact, prevents issues in displaying results when running multiple researchs at the same time && searchID == this.searchToDisplay) {
|
|
19475
|
+
this.rawDataManager.mergeData(newtree, this.theOptions.origin == 'classification' ? "ID" : "key");
|
|
19476
|
+
newtree.children.forEach((value, index) => {
|
|
19477
|
+
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
19478
|
+
});
|
|
19479
|
+
displayResults();
|
|
19480
|
+
}
|
|
19481
|
+
};
|
|
19476
19482
|
if (this.theOptions.source == 'webservice') {
|
|
19477
19483
|
if (this.theOptions.origin == 'classification') {
|
|
19478
19484
|
// WS Call
|
|
19479
19485
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
19480
19486
|
.then((data) => {
|
|
19481
|
-
|
|
19482
|
-
if (!searched) {
|
|
19483
|
-
this.setSearchResults([]);
|
|
19484
|
-
}
|
|
19487
|
+
completeLocalTree(data);
|
|
19485
19488
|
})
|
|
19486
19489
|
.catch(err => {
|
|
19487
19490
|
this.errorToLog = err;
|
|
@@ -19497,10 +19500,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19497
19500
|
deprecated: false,
|
|
19498
19501
|
}, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
19499
19502
|
.then((data) => {
|
|
19500
|
-
|
|
19501
|
-
if (!searched) {
|
|
19502
|
-
this.setSearchResults([]);
|
|
19503
|
-
}
|
|
19503
|
+
completeLocalTree(data);
|
|
19504
19504
|
})
|
|
19505
19505
|
.catch(error => {
|
|
19506
19506
|
this.errorToLog = error;
|
|
@@ -19515,10 +19515,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19515
19515
|
}
|
|
19516
19516
|
else {
|
|
19517
19517
|
if (this.optionsManager.getOptions().source == 'data') {
|
|
19518
|
-
displayResults(
|
|
19519
|
-
if (!searched) {
|
|
19520
|
-
this.setSearchResults([]);
|
|
19521
|
-
}
|
|
19518
|
+
displayResults();
|
|
19522
19519
|
}
|
|
19523
19520
|
else {
|
|
19524
19521
|
console.error("Unhandled picker settings for search scenario !!");
|
|
@@ -18640,7 +18640,6 @@ function setupKeyboardNavigation(component, optionsManager, navigateInTree) {
|
|
|
18640
18640
|
if (optionsManager.getOptions().mode != "tree" && !optionsManager.getOptions().multiple) {
|
|
18641
18641
|
setTimeout(() => {
|
|
18642
18642
|
component.showTree('hide');
|
|
18643
|
-
// TODO put back? >> focusMainInput(component);
|
|
18644
18643
|
}, 100);
|
|
18645
18644
|
}
|
|
18646
18645
|
}
|
|
@@ -19450,12 +19449,10 @@ const HierarchizedPickerComponent = class {
|
|
|
19450
19449
|
}
|
|
19451
19450
|
}
|
|
19452
19451
|
loadSearchDataInCurrentTree(searchID, searched) {
|
|
19453
|
-
|
|
19454
|
-
if (this.searchToDisplay > -1) {
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
19458
|
-
});
|
|
19452
|
+
const displayResults = () => {
|
|
19453
|
+
if (this.searchToDisplay > -1) {
|
|
19454
|
+
if (!searched)
|
|
19455
|
+
this.setSearchResults([]);
|
|
19459
19456
|
this.triggerTreeDisplay(this.rawDataManager.getData(), searched);
|
|
19460
19457
|
displayAutocompleteWithResults(this.rawDataManager.getData(), searched, this.optionsManager, this.editValue.bind(this), this.showTree.bind(this));
|
|
19461
19458
|
// Deploys all nodes
|
|
@@ -19471,15 +19468,21 @@ const HierarchizedPickerComponent = class {
|
|
|
19471
19468
|
});
|
|
19472
19469
|
}
|
|
19473
19470
|
};
|
|
19471
|
+
const completeLocalTree = (newtree) => {
|
|
19472
|
+
if (this.searchToDisplay > -1) { // TODO > Not working anymore after refact, prevents issues in displaying results when running multiple researchs at the same time && searchID == this.searchToDisplay) {
|
|
19473
|
+
this.rawDataManager.mergeData(newtree, this.theOptions.origin == 'classification' ? "ID" : "key");
|
|
19474
|
+
newtree.children.forEach((value, index) => {
|
|
19475
|
+
completeCurrentTreeWithTree(this.loadedTreeJs, value, this.optionsManager.getOptions());
|
|
19476
|
+
});
|
|
19477
|
+
displayResults();
|
|
19478
|
+
}
|
|
19479
|
+
};
|
|
19474
19480
|
if (this.theOptions.source == 'webservice') {
|
|
19475
19481
|
if (this.theOptions.origin == 'classification') {
|
|
19476
19482
|
// WS Call
|
|
19477
19483
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
19478
19484
|
.then((data) => {
|
|
19479
|
-
|
|
19480
|
-
if (!searched) {
|
|
19481
|
-
this.setSearchResults([]);
|
|
19482
|
-
}
|
|
19485
|
+
completeLocalTree(data);
|
|
19483
19486
|
})
|
|
19484
19487
|
.catch(err => {
|
|
19485
19488
|
this.errorToLog = err;
|
|
@@ -19495,10 +19498,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19495
19498
|
deprecated: false,
|
|
19496
19499
|
}, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
|
|
19497
19500
|
.then((data) => {
|
|
19498
|
-
|
|
19499
|
-
if (!searched) {
|
|
19500
|
-
this.setSearchResults([]);
|
|
19501
|
-
}
|
|
19501
|
+
completeLocalTree(data);
|
|
19502
19502
|
})
|
|
19503
19503
|
.catch(error => {
|
|
19504
19504
|
this.errorToLog = error;
|
|
@@ -19513,10 +19513,7 @@ const HierarchizedPickerComponent = class {
|
|
|
19513
19513
|
}
|
|
19514
19514
|
else {
|
|
19515
19515
|
if (this.optionsManager.getOptions().source == 'data') {
|
|
19516
|
-
displayResults(
|
|
19517
|
-
if (!searched) {
|
|
19518
|
-
this.setSearchResults([]);
|
|
19519
|
-
}
|
|
19516
|
+
displayResults();
|
|
19520
19517
|
}
|
|
19521
19518
|
else {
|
|
19522
19519
|
console.error("Unhandled picker settings for search scenario !!");
|