reneco-hierarchized-picker 0.2.3 → 0.2.4

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.
@@ -18485,7 +18485,7 @@ const HierarchizedPickerComponent = class {
18485
18485
  if (!this.ready) {
18486
18486
  this.translateDataForTree(dataToLoad);
18487
18487
  if (this.theOptions.openTreeWhenLoaded) {
18488
- this.showTree("modale");
18488
+ this.showTree("picker");
18489
18489
  }
18490
18490
  }
18491
18491
  }
@@ -18650,15 +18650,17 @@ const HierarchizedPickerComponent = class {
18650
18650
  if (this.theOptions.origin != 'thesaurus' || !dataToLoad)
18651
18651
  return;
18652
18652
  this.mylog('Translate from Thesaurus ! (' + this.theOptions.source + ')', dataToLoad);
18653
- let fillTreeWithObject = (tree, object, depth = 0) => {
18654
- if (object && object.length) {
18655
- object.forEach((value, _index) => {
18653
+ let fillTreeWithObject = (tree, myobject, depth = 0) => {
18654
+ if (myobject && myobject.length) {
18655
+ myobject.forEach((value, _index) => {
18656
18656
  let keyPropFromNode = this.getPropertyFromNode(value, 'key');
18657
18657
  let valueTranslatedPropFromNode = this.getPropertyFromNode(value, 'valueTranslated');
18658
18658
  let fullpathPropFromNode = this.getPropertyFromNode(value, 'fullpath');
18659
18659
  let fullpathTranslatedPropFromNode = this.getPropertyFromNode(value, 'fullpathTranslated');
18660
18660
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
18661
18661
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
18662
+ // Quick fix until I fully understand what is going on ...
18663
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
18662
18664
  let objToPush = {
18663
18665
  id: keyPropFromNode,
18664
18666
  depth: depth,
@@ -19174,7 +19176,7 @@ const HierarchizedPickerComponent = class {
19174
19176
  this.clearAutocomplete(true);
19175
19177
  }
19176
19178
  if (focused == 'picker') {
19177
- this.focusSearchInput();
19179
+ setTimeout(() => { this.focusSearchInput(); }, 0);
19178
19180
  }
19179
19181
  else {
19180
19182
  this.focusModal();
@@ -708,7 +708,7 @@ export class HierarchizedPickerComponent {
708
708
  if (!this.ready) {
709
709
  this.translateDataForTree(dataToLoad);
710
710
  if (this.theOptions.openTreeWhenLoaded) {
711
- this.showTree("modale");
711
+ this.showTree("picker");
712
712
  }
713
713
  }
714
714
  }
@@ -873,15 +873,17 @@ export class HierarchizedPickerComponent {
873
873
  if (this.theOptions.origin != 'thesaurus' || !dataToLoad)
874
874
  return;
875
875
  this.mylog('Translate from Thesaurus ! (' + this.theOptions.source + ')', dataToLoad);
876
- let fillTreeWithObject = (tree, object, depth = 0) => {
877
- if (object && object.length) {
878
- object.forEach((value, _index) => {
876
+ let fillTreeWithObject = (tree, myobject, depth = 0) => {
877
+ if (myobject && myobject.length) {
878
+ myobject.forEach((value, _index) => {
879
879
  let keyPropFromNode = this.getPropertyFromNode(value, 'key');
880
880
  let valueTranslatedPropFromNode = this.getPropertyFromNode(value, 'valueTranslated');
881
881
  let fullpathPropFromNode = this.getPropertyFromNode(value, 'fullpath');
882
882
  let fullpathTranslatedPropFromNode = this.getPropertyFromNode(value, 'fullpathTranslated');
883
883
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
884
884
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
885
+ // Quick fix until I fully understand what is going on ...
886
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
885
887
  let objToPush = {
886
888
  id: keyPropFromNode,
887
889
  depth: depth,
@@ -1397,7 +1399,7 @@ export class HierarchizedPickerComponent {
1397
1399
  this.clearAutocomplete(true);
1398
1400
  }
1399
1401
  if (focused == 'picker') {
1400
- this.focusSearchInput();
1402
+ setTimeout(() => { this.focusSearchInput(); }, 0);
1401
1403
  }
1402
1404
  else {
1403
1405
  this.focusModal();
@@ -18483,7 +18483,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
18483
18483
  if (!this.ready) {
18484
18484
  this.translateDataForTree(dataToLoad);
18485
18485
  if (this.theOptions.openTreeWhenLoaded) {
18486
- this.showTree("modale");
18486
+ this.showTree("picker");
18487
18487
  }
18488
18488
  }
18489
18489
  }
@@ -18648,15 +18648,17 @@ const HierarchizedPickerComponent = class extends HTMLElement {
18648
18648
  if (this.theOptions.origin != 'thesaurus' || !dataToLoad)
18649
18649
  return;
18650
18650
  this.mylog('Translate from Thesaurus ! (' + this.theOptions.source + ')', dataToLoad);
18651
- let fillTreeWithObject = (tree, object, depth = 0) => {
18652
- if (object && object.length) {
18653
- object.forEach((value, _index) => {
18651
+ let fillTreeWithObject = (tree, myobject, depth = 0) => {
18652
+ if (myobject && myobject.length) {
18653
+ myobject.forEach((value, _index) => {
18654
18654
  let keyPropFromNode = this.getPropertyFromNode(value, 'key');
18655
18655
  let valueTranslatedPropFromNode = this.getPropertyFromNode(value, 'valueTranslated');
18656
18656
  let fullpathPropFromNode = this.getPropertyFromNode(value, 'fullpath');
18657
18657
  let fullpathTranslatedPropFromNode = this.getPropertyFromNode(value, 'fullpathTranslated');
18658
18658
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
18659
18659
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
18660
+ // Quick fix until I fully understand what is going on ...
18661
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
18660
18662
  let objToPush = {
18661
18663
  id: keyPropFromNode,
18662
18664
  depth: depth,
@@ -19172,7 +19174,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19172
19174
  this.clearAutocomplete(true);
19173
19175
  }
19174
19176
  if (focused == 'picker') {
19175
- this.focusSearchInput();
19177
+ setTimeout(() => { this.focusSearchInput(); }, 0);
19176
19178
  }
19177
19179
  else {
19178
19180
  this.focusModal();
@@ -18481,7 +18481,7 @@ const HierarchizedPickerComponent = class {
18481
18481
  if (!this.ready) {
18482
18482
  this.translateDataForTree(dataToLoad);
18483
18483
  if (this.theOptions.openTreeWhenLoaded) {
18484
- this.showTree("modale");
18484
+ this.showTree("picker");
18485
18485
  }
18486
18486
  }
18487
18487
  }
@@ -18646,15 +18646,17 @@ const HierarchizedPickerComponent = class {
18646
18646
  if (this.theOptions.origin != 'thesaurus' || !dataToLoad)
18647
18647
  return;
18648
18648
  this.mylog('Translate from Thesaurus ! (' + this.theOptions.source + ')', dataToLoad);
18649
- let fillTreeWithObject = (tree, object, depth = 0) => {
18650
- if (object && object.length) {
18651
- object.forEach((value, _index) => {
18649
+ let fillTreeWithObject = (tree, myobject, depth = 0) => {
18650
+ if (myobject && myobject.length) {
18651
+ myobject.forEach((value, _index) => {
18652
18652
  let keyPropFromNode = this.getPropertyFromNode(value, 'key');
18653
18653
  let valueTranslatedPropFromNode = this.getPropertyFromNode(value, 'valueTranslated');
18654
18654
  let fullpathPropFromNode = this.getPropertyFromNode(value, 'fullpath');
18655
18655
  let fullpathTranslatedPropFromNode = this.getPropertyFromNode(value, 'fullpathTranslated');
18656
18656
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
18657
18657
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
18658
+ // Quick fix until I fully understand what is going on ...
18659
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
18658
18660
  let objToPush = {
18659
18661
  id: keyPropFromNode,
18660
18662
  depth: depth,
@@ -19170,7 +19172,7 @@ const HierarchizedPickerComponent = class {
19170
19172
  this.clearAutocomplete(true);
19171
19173
  }
19172
19174
  if (focused == 'picker') {
19173
- this.focusSearchInput();
19175
+ setTimeout(() => { this.focusSearchInput(); }, 0);
19174
19176
  }
19175
19177
  else {
19176
19178
  this.focusModal();