reneco-hierarchized-picker 0.4.0-beta.4 → 0.4.0-beta.5

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.
@@ -18068,11 +18068,31 @@ class RawDataManager {
18068
18068
  }
18069
18069
  // Fetch data from classification
18070
18070
  async getFromClassification(endpoint, options, loader) {
18071
- console.log("getFromClassification", options);
18072
18071
  const urlParams = new URLSearchParams(options);
18073
- await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
18072
+ //------------
18073
+ let pathSegment = '';
18074
+ let keyToRemove = '';
18075
+ for (const [key, value] of urlParams.entries()) {
18076
+ const lowerKey = key.toLowerCase();
18077
+ if (lowerKey === 'startnode' || lowerKey === 'startnodeid') {
18078
+ pathSegment = value;
18079
+ keyToRemove = key;
18080
+ break;
18081
+ }
18082
+ }
18083
+ if (keyToRemove) {
18084
+ urlParams.delete(keyToRemove);
18085
+ }
18086
+ //------------
18087
+ const newUrl = pathSegment
18088
+ ? `${endpoint}/${pathSegment}?${urlParams.toString()}`
18089
+ : `${endpoint}/?${urlParams.toString()}`;
18090
+ await this.makeRequest('GET', newUrl, null, loader).then((data) => {
18074
18091
  this.loadData(data);
18075
18092
  });
18093
+ // await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
18094
+ // this.loadData(data);
18095
+ // });
18076
18096
  return;
18077
18097
  }
18078
18098
  // Fetch data from a generic source
@@ -42,11 +42,31 @@ export class RawDataManager {
42
42
  }
43
43
  // Fetch data from classification
44
44
  async getFromClassification(endpoint, options, loader) {
45
- console.log("getFromClassification", options);
46
45
  const urlParams = new URLSearchParams(options);
47
- await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
46
+ //------------
47
+ let pathSegment = '';
48
+ let keyToRemove = '';
49
+ for (const [key, value] of urlParams.entries()) {
50
+ const lowerKey = key.toLowerCase();
51
+ if (lowerKey === 'startnode' || lowerKey === 'startnodeid') {
52
+ pathSegment = value;
53
+ keyToRemove = key;
54
+ break;
55
+ }
56
+ }
57
+ if (keyToRemove) {
58
+ urlParams.delete(keyToRemove);
59
+ }
60
+ //------------
61
+ const newUrl = pathSegment
62
+ ? `${endpoint}/${pathSegment}?${urlParams.toString()}`
63
+ : `${endpoint}/?${urlParams.toString()}`;
64
+ await this.makeRequest('GET', newUrl, null, loader).then((data) => {
48
65
  this.loadData(data);
49
66
  });
67
+ // await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
68
+ // this.loadData(data);
69
+ // });
50
70
  return;
51
71
  }
52
72
  // Fetch data from a generic source
@@ -18065,11 +18065,31 @@ class RawDataManager {
18065
18065
  }
18066
18066
  // Fetch data from classification
18067
18067
  async getFromClassification(endpoint, options, loader) {
18068
- console.log("getFromClassification", options);
18069
18068
  const urlParams = new URLSearchParams(options);
18070
- await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
18069
+ //------------
18070
+ let pathSegment = '';
18071
+ let keyToRemove = '';
18072
+ for (const [key, value] of urlParams.entries()) {
18073
+ const lowerKey = key.toLowerCase();
18074
+ if (lowerKey === 'startnode' || lowerKey === 'startnodeid') {
18075
+ pathSegment = value;
18076
+ keyToRemove = key;
18077
+ break;
18078
+ }
18079
+ }
18080
+ if (keyToRemove) {
18081
+ urlParams.delete(keyToRemove);
18082
+ }
18083
+ //------------
18084
+ const newUrl = pathSegment
18085
+ ? `${endpoint}/${pathSegment}?${urlParams.toString()}`
18086
+ : `${endpoint}/?${urlParams.toString()}`;
18087
+ await this.makeRequest('GET', newUrl, null, loader).then((data) => {
18071
18088
  this.loadData(data);
18072
18089
  });
18090
+ // await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
18091
+ // this.loadData(data);
18092
+ // });
18073
18093
  return;
18074
18094
  }
18075
18095
  // Fetch data from a generic source
@@ -18064,11 +18064,31 @@ class RawDataManager {
18064
18064
  }
18065
18065
  // Fetch data from classification
18066
18066
  async getFromClassification(endpoint, options, loader) {
18067
- console.log("getFromClassification", options);
18068
18067
  const urlParams = new URLSearchParams(options);
18069
- await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
18068
+ //------------
18069
+ let pathSegment = '';
18070
+ let keyToRemove = '';
18071
+ for (const [key, value] of urlParams.entries()) {
18072
+ const lowerKey = key.toLowerCase();
18073
+ if (lowerKey === 'startnode' || lowerKey === 'startnodeid') {
18074
+ pathSegment = value;
18075
+ keyToRemove = key;
18076
+ break;
18077
+ }
18078
+ }
18079
+ if (keyToRemove) {
18080
+ urlParams.delete(keyToRemove);
18081
+ }
18082
+ //------------
18083
+ const newUrl = pathSegment
18084
+ ? `${endpoint}/${pathSegment}?${urlParams.toString()}`
18085
+ : `${endpoint}/?${urlParams.toString()}`;
18086
+ await this.makeRequest('GET', newUrl, null, loader).then((data) => {
18070
18087
  this.loadData(data);
18071
18088
  });
18089
+ // await this.makeRequest('GET', `${endpoint}/?${urlParams.toString()}`, null, loader).then((data) => {
18090
+ // this.loadData(data);
18091
+ // });
18072
18092
  return;
18073
18093
  }
18074
18094
  // Fetch data from a generic source