reneco-hierarchized-picker 0.2.3-beta.1 → 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
  }
@@ -18660,24 +18660,19 @@ const HierarchizedPickerComponent = class {
18660
18660
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
18661
18661
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
18662
18662
  // Quick fix until I fully understand what is going on ...
18663
- let realChildrenPropFromNode = [];
18664
- childrenPropFromNode.forEach((subvalue, _index) => {
18665
- if (this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode)) {
18666
- realChildrenPropFromNode.push(subvalue);
18667
- }
18668
- });
18663
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
18669
18664
  let objToPush = {
18670
18665
  id: keyPropFromNode,
18671
18666
  depth: depth,
18672
18667
  text: valueTranslatedPropFromNode,
18673
18668
  fullpath: fullpathPropFromNode,
18674
18669
  fullpathTranslated: fullpathTranslatedPropFromNode,
18675
- children: this.getPropertyFromNode(value, 'hasChildren', false) && realChildrenPropFromNode && realChildrenPropFromNode.length == 0 ? [{}] : [],
18670
+ children: this.getPropertyFromNode(value, 'hasChildren', false) && childrenPropFromNode && childrenPropFromNode.length == 0 ? [{}] : [],
18676
18671
  deprecated: deprecated,
18677
18672
  isDesaturated: false,
18678
18673
  searchMatch: false
18679
18674
  };
18680
- let childTree = fillTreeWithObject(objToPush.children, realChildrenPropFromNode, depth + 1);
18675
+ let childTree = fillTreeWithObject(objToPush.children, childrenPropFromNode, depth + 1);
18681
18676
  let pushMe = false;
18682
18677
  let searchValue = (obj, strict) => {
18683
18678
  let toret = false;
@@ -19181,7 +19176,7 @@ const HierarchizedPickerComponent = class {
19181
19176
  this.clearAutocomplete(true);
19182
19177
  }
19183
19178
  if (focused == 'picker') {
19184
- this.focusSearchInput();
19179
+ setTimeout(() => { this.focusSearchInput(); }, 0);
19185
19180
  }
19186
19181
  else {
19187
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
  }
@@ -883,24 +883,19 @@ export class HierarchizedPickerComponent {
883
883
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
884
884
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
885
885
  // Quick fix until I fully understand what is going on ...
886
- let realChildrenPropFromNode = [];
887
- childrenPropFromNode.forEach((subvalue, _index) => {
888
- if (this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode)) {
889
- realChildrenPropFromNode.push(subvalue);
890
- }
891
- });
886
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
892
887
  let objToPush = {
893
888
  id: keyPropFromNode,
894
889
  depth: depth,
895
890
  text: valueTranslatedPropFromNode,
896
891
  fullpath: fullpathPropFromNode,
897
892
  fullpathTranslated: fullpathTranslatedPropFromNode,
898
- children: this.getPropertyFromNode(value, 'hasChildren', false) && realChildrenPropFromNode && realChildrenPropFromNode.length == 0 ? [{}] : [],
893
+ children: this.getPropertyFromNode(value, 'hasChildren', false) && childrenPropFromNode && childrenPropFromNode.length == 0 ? [{}] : [],
899
894
  deprecated: deprecated,
900
895
  isDesaturated: false,
901
896
  searchMatch: false
902
897
  };
903
- let childTree = fillTreeWithObject(objToPush.children, realChildrenPropFromNode, depth + 1);
898
+ let childTree = fillTreeWithObject(objToPush.children, childrenPropFromNode, depth + 1);
904
899
  let pushMe = false;
905
900
  let searchValue = (obj, strict) => {
906
901
  let toret = false;
@@ -1404,7 +1399,7 @@ export class HierarchizedPickerComponent {
1404
1399
  this.clearAutocomplete(true);
1405
1400
  }
1406
1401
  if (focused == 'picker') {
1407
- this.focusSearchInput();
1402
+ setTimeout(() => { this.focusSearchInput(); }, 0);
1408
1403
  }
1409
1404
  else {
1410
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
  }
@@ -18658,24 +18658,19 @@ const HierarchizedPickerComponent = class extends HTMLElement {
18658
18658
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
18659
18659
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
18660
18660
  // Quick fix until I fully understand what is going on ...
18661
- let realChildrenPropFromNode = [];
18662
- childrenPropFromNode.forEach((subvalue, _index) => {
18663
- if (this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode)) {
18664
- realChildrenPropFromNode.push(subvalue);
18665
- }
18666
- });
18661
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
18667
18662
  let objToPush = {
18668
18663
  id: keyPropFromNode,
18669
18664
  depth: depth,
18670
18665
  text: valueTranslatedPropFromNode,
18671
18666
  fullpath: fullpathPropFromNode,
18672
18667
  fullpathTranslated: fullpathTranslatedPropFromNode,
18673
- children: this.getPropertyFromNode(value, 'hasChildren', false) && realChildrenPropFromNode && realChildrenPropFromNode.length == 0 ? [{}] : [],
18668
+ children: this.getPropertyFromNode(value, 'hasChildren', false) && childrenPropFromNode && childrenPropFromNode.length == 0 ? [{}] : [],
18674
18669
  deprecated: deprecated,
18675
18670
  isDesaturated: false,
18676
18671
  searchMatch: false
18677
18672
  };
18678
- let childTree = fillTreeWithObject(objToPush.children, realChildrenPropFromNode, depth + 1);
18673
+ let childTree = fillTreeWithObject(objToPush.children, childrenPropFromNode, depth + 1);
18679
18674
  let pushMe = false;
18680
18675
  let searchValue = (obj, strict) => {
18681
18676
  let toret = false;
@@ -19179,7 +19174,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19179
19174
  this.clearAutocomplete(true);
19180
19175
  }
19181
19176
  if (focused == 'picker') {
19182
- this.focusSearchInput();
19177
+ setTimeout(() => { this.focusSearchInput(); }, 0);
19183
19178
  }
19184
19179
  else {
19185
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
  }
@@ -18656,24 +18656,19 @@ const HierarchizedPickerComponent = class {
18656
18656
  let childrenPropFromNode = this.getPropertyFromNode(value, 'children', false);
18657
18657
  let deprecated = this.getPropertyFromNode(value, 'deprecated', false);
18658
18658
  // Quick fix until I fully understand what is going on ...
18659
- let realChildrenPropFromNode = [];
18660
- childrenPropFromNode.forEach((subvalue, _index) => {
18661
- if (this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode)) {
18662
- realChildrenPropFromNode.push(subvalue);
18663
- }
18664
- });
18659
+ childrenPropFromNode = childrenPropFromNode.filter(subvalue => this.getPropertyFromNode(subvalue, 'fullpath').includes(fullpathPropFromNode));
18665
18660
  let objToPush = {
18666
18661
  id: keyPropFromNode,
18667
18662
  depth: depth,
18668
18663
  text: valueTranslatedPropFromNode,
18669
18664
  fullpath: fullpathPropFromNode,
18670
18665
  fullpathTranslated: fullpathTranslatedPropFromNode,
18671
- children: this.getPropertyFromNode(value, 'hasChildren', false) && realChildrenPropFromNode && realChildrenPropFromNode.length == 0 ? [{}] : [],
18666
+ children: this.getPropertyFromNode(value, 'hasChildren', false) && childrenPropFromNode && childrenPropFromNode.length == 0 ? [{}] : [],
18672
18667
  deprecated: deprecated,
18673
18668
  isDesaturated: false,
18674
18669
  searchMatch: false
18675
18670
  };
18676
- let childTree = fillTreeWithObject(objToPush.children, realChildrenPropFromNode, depth + 1);
18671
+ let childTree = fillTreeWithObject(objToPush.children, childrenPropFromNode, depth + 1);
18677
18672
  let pushMe = false;
18678
18673
  let searchValue = (obj, strict) => {
18679
18674
  let toret = false;
@@ -19177,7 +19172,7 @@ const HierarchizedPickerComponent = class {
19177
19172
  this.clearAutocomplete(true);
19178
19173
  }
19179
19174
  if (focused == 'picker') {
19180
- this.focusSearchInput();
19175
+ setTimeout(() => { this.focusSearchInput(); }, 0);
19181
19176
  }
19182
19177
  else {
19183
19178
  this.focusModal();