reneco-hierarchized-picker 0.4.2-beta.15 → 0.4.2-beta.16

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.
@@ -645,7 +645,7 @@ Tree.prototype.createUlEle = function () {
645
645
  Tree.prototype.createLiEle = function (node, closed) {
646
646
  const li = document.createElement('li');
647
647
  li.classList.add('treejs-node');
648
- if (node.deprecated) {
648
+ if (node.deprecated || node.Is_Deprecated) {
649
649
  li.classList.add('treejs-node__deprecated');
650
650
  }
651
651
  if (node.isDesaturated) {
@@ -18440,7 +18440,7 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18440
18440
  const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
18441
18441
  if (myObject && myObject.length) {
18442
18442
  myObject.forEach(value => {
18443
- var _a, _b, _c;
18443
+ var _a, _b, _c, _d;
18444
18444
  let keyPropFromNode = null;
18445
18445
  let valueTranslatedPropFromNode = null;
18446
18446
  let fullpathPropFromNode = null;
@@ -18450,6 +18450,10 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18450
18450
  valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
18451
18451
  fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_Fullpath;
18452
18452
  fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
18453
+ if (!fullpathPropFromNode)
18454
+ fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_FullPath;
18455
+ if (!fullpathTranslatedPropFromNode)
18456
+ fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
18453
18457
  }
18454
18458
  else {
18455
18459
  keyPropFromNode = getPropertyFromNode(value, 'key');
@@ -18458,7 +18462,9 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18458
18462
  fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
18459
18463
  }
18460
18464
  const childrenPropFromNode = getPropertyFromNode(value, 'children', false);
18461
- const deprecated = getPropertyFromNode(value, 'deprecated', false);
18465
+ let deprecated = getPropertyFromNode(value, 'deprecated', null);
18466
+ if (deprecated === null)
18467
+ deprecated = getPropertyFromNode(value, 'Is_Deprecated', false);
18462
18468
  const objToPush = {
18463
18469
  id: keyPropFromNode,
18464
18470
  nodeId: keyPropFromNode,
@@ -19121,9 +19127,15 @@ const HierarchizedPickerComponent = class {
19121
19127
  }
19122
19128
  getApiSearchURL() {
19123
19129
  if (this.optionsManager.getOptions().origin == 'classification') {
19124
- let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
19125
- let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
19126
- return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
19130
+ const baseURL = this.optionsManager.getOptions().url;
19131
+ if (baseURL.indexOf("getTree") > -1) {
19132
+ return baseURL.replace("/getTree/", "/search/");
19133
+ }
19134
+ else {
19135
+ let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
19136
+ let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
19137
+ return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
19138
+ }
19127
19139
  }
19128
19140
  else {
19129
19141
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
@@ -19143,8 +19155,9 @@ const HierarchizedPickerComponent = class {
19143
19155
  }
19144
19156
  return url;
19145
19157
  }
19146
- getContextualApiParams(search = null) {
19147
- const options = this.optionsManager.getOptions().options;
19158
+ getContextualApiParams(options = null, search = null) {
19159
+ if (!options)
19160
+ options = this.optionsManager.getOptions().options;
19148
19161
  let optionsToReturn = Object.assign({}, options);
19149
19162
  if (options.Reach) {
19150
19163
  delete optionsToReturn.Reach;
@@ -19164,8 +19177,6 @@ const HierarchizedPickerComponent = class {
19164
19177
  delete optionsToReturn.startNode;
19165
19178
  }
19166
19179
  }
19167
- else
19168
- return options;
19169
19180
  return optionsToReturn;
19170
19181
  }
19171
19182
  translateDataForTree(dataToLoad, searchID = null, searched = null) {
@@ -19201,7 +19212,7 @@ const HierarchizedPickerComponent = class {
19201
19212
  if (this.theOptions.source == 'webservice') {
19202
19213
  if (this.theOptions.origin == 'classification') {
19203
19214
  // WS Call
19204
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19215
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19205
19216
  .then((data) => {
19206
19217
  displayResults(data);
19207
19218
  if (!searched) {
@@ -19446,6 +19457,11 @@ const HierarchizedPickerComponent = class {
19446
19457
  if (this.hasFocus.indexOf('hide') > -1 && !isStillInsidePicker) {
19447
19458
  this.hasFocus = [];
19448
19459
  }
19460
+ else {
19461
+ if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
19462
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
19463
+ }
19464
+ }
19449
19465
  const previousShownTree = this.shownTree;
19450
19466
  this.shownTree = this.hasFocus.length > 0;
19451
19467
  if (this.shownTree && !previousShownTree) {
@@ -19494,8 +19510,8 @@ const HierarchizedPickerComponent = class {
19494
19510
  if (!value)
19495
19511
  value = this.value;
19496
19512
  this.displayedValue = value.map(item => {
19497
- var _a, _b;
19498
- return (_b = (_a = item.fullpathTranslated) !== null && _a !== void 0 ? _a : item.shortpathTranslated) !== null && _b !== void 0 ? _b : `Node ${item.nodeid}`;
19513
+ var _a;
19514
+ return (_a = (this.optionsManager.getOptions().isFullpath ? item.fullpathTranslated : item.shortpathTranslated)) !== null && _a !== void 0 ? _a : `Node ${item.nodeid}`;
19499
19515
  }).join(';');
19500
19516
  }
19501
19517
  // Search a value in the tree and triggers a search when necessary
@@ -442,9 +442,15 @@ export class HierarchizedPickerComponent {
442
442
  }
443
443
  getApiSearchURL() {
444
444
  if (this.optionsManager.getOptions().origin == 'classification') {
445
- let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
446
- let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
447
- return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
445
+ const baseURL = this.optionsManager.getOptions().url;
446
+ if (baseURL.indexOf("getTree") > -1) {
447
+ return baseURL.replace("/getTree/", "/search/");
448
+ }
449
+ else {
450
+ let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
451
+ let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
452
+ return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
453
+ }
448
454
  }
449
455
  else {
450
456
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
@@ -464,8 +470,9 @@ export class HierarchizedPickerComponent {
464
470
  }
465
471
  return url;
466
472
  }
467
- getContextualApiParams(search = null) {
468
- const options = this.optionsManager.getOptions().options;
473
+ getContextualApiParams(options = null, search = null) {
474
+ if (!options)
475
+ options = this.optionsManager.getOptions().options;
469
476
  let optionsToReturn = Object.assign({}, options);
470
477
  if (options.Reach) {
471
478
  delete optionsToReturn.Reach;
@@ -485,8 +492,6 @@ export class HierarchizedPickerComponent {
485
492
  delete optionsToReturn.startNode;
486
493
  }
487
494
  }
488
- else
489
- return options;
490
495
  return optionsToReturn;
491
496
  }
492
497
  translateDataForTree(dataToLoad, searchID = null, searched = null) {
@@ -522,7 +527,7 @@ export class HierarchizedPickerComponent {
522
527
  if (this.theOptions.source == 'webservice') {
523
528
  if (this.theOptions.origin == 'classification') {
524
529
  // WS Call
525
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
530
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
526
531
  .then((data) => {
527
532
  displayResults(data);
528
533
  if (!searched) {
@@ -767,6 +772,11 @@ export class HierarchizedPickerComponent {
767
772
  if (this.hasFocus.indexOf('hide') > -1 && !isStillInsidePicker) {
768
773
  this.hasFocus = [];
769
774
  }
775
+ else {
776
+ if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
777
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
778
+ }
779
+ }
770
780
  const previousShownTree = this.shownTree;
771
781
  this.shownTree = this.hasFocus.length > 0;
772
782
  if (this.shownTree && !previousShownTree) {
@@ -815,8 +825,8 @@ export class HierarchizedPickerComponent {
815
825
  if (!value)
816
826
  value = this.value;
817
827
  this.displayedValue = value.map(item => {
818
- var _a, _b;
819
- return (_b = (_a = item.fullpathTranslated) !== null && _a !== void 0 ? _a : item.shortpathTranslated) !== null && _b !== void 0 ? _b : `Node ${item.nodeid}`;
828
+ var _a;
829
+ return (_a = (this.optionsManager.getOptions().isFullpath ? item.fullpathTranslated : item.shortpathTranslated)) !== null && _a !== void 0 ? _a : `Node ${item.nodeid}`;
820
830
  }).join(';');
821
831
  }
822
832
  // Search a value in the tree and triggers a search when necessary
@@ -514,7 +514,7 @@ Tree.prototype.createLiEle = function (node, closed) {
514
514
  const li = document.createElement('li');
515
515
  ;
516
516
  li.classList.add('treejs-node');
517
- if (node.deprecated) {
517
+ if (node.deprecated || node.Is_Deprecated) {
518
518
  li.classList.add('treejs-node__deprecated');
519
519
  }
520
520
  if (node.isDesaturated) {
@@ -51,7 +51,7 @@ export function fillTreeWithObject(tree, myObject, searched, options, depth = 0)
51
51
  const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
52
52
  if (myObject && myObject.length) {
53
53
  myObject.forEach(value => {
54
- var _a, _b, _c;
54
+ var _a, _b, _c, _d;
55
55
  let keyPropFromNode = null;
56
56
  let valueTranslatedPropFromNode = null;
57
57
  let fullpathPropFromNode = null;
@@ -61,6 +61,10 @@ export function fillTreeWithObject(tree, myObject, searched, options, depth = 0)
61
61
  valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
62
62
  fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_Fullpath;
63
63
  fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
64
+ if (!fullpathPropFromNode)
65
+ fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_FullPath;
66
+ if (!fullpathTranslatedPropFromNode)
67
+ fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
64
68
  }
65
69
  else {
66
70
  keyPropFromNode = getPropertyFromNode(value, 'key');
@@ -69,7 +73,9 @@ export function fillTreeWithObject(tree, myObject, searched, options, depth = 0)
69
73
  fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
70
74
  }
71
75
  const childrenPropFromNode = getPropertyFromNode(value, 'children', false);
72
- const deprecated = getPropertyFromNode(value, 'deprecated', false);
76
+ let deprecated = getPropertyFromNode(value, 'deprecated', null);
77
+ if (deprecated === null)
78
+ deprecated = getPropertyFromNode(value, 'Is_Deprecated', false);
73
79
  const objToPush = {
74
80
  id: keyPropFromNode,
75
81
  nodeId: keyPropFromNode,
@@ -642,7 +642,7 @@ Tree.prototype.createUlEle = function () {
642
642
  Tree.prototype.createLiEle = function (node, closed) {
643
643
  const li = document.createElement('li');
644
644
  li.classList.add('treejs-node');
645
- if (node.deprecated) {
645
+ if (node.deprecated || node.Is_Deprecated) {
646
646
  li.classList.add('treejs-node__deprecated');
647
647
  }
648
648
  if (node.isDesaturated) {
@@ -18437,7 +18437,7 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18437
18437
  const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
18438
18438
  if (myObject && myObject.length) {
18439
18439
  myObject.forEach(value => {
18440
- var _a, _b, _c;
18440
+ var _a, _b, _c, _d;
18441
18441
  let keyPropFromNode = null;
18442
18442
  let valueTranslatedPropFromNode = null;
18443
18443
  let fullpathPropFromNode = null;
@@ -18447,6 +18447,10 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18447
18447
  valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
18448
18448
  fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_Fullpath;
18449
18449
  fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
18450
+ if (!fullpathPropFromNode)
18451
+ fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_FullPath;
18452
+ if (!fullpathTranslatedPropFromNode)
18453
+ fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
18450
18454
  }
18451
18455
  else {
18452
18456
  keyPropFromNode = getPropertyFromNode(value, 'key');
@@ -18455,7 +18459,9 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18455
18459
  fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
18456
18460
  }
18457
18461
  const childrenPropFromNode = getPropertyFromNode(value, 'children', false);
18458
- const deprecated = getPropertyFromNode(value, 'deprecated', false);
18462
+ let deprecated = getPropertyFromNode(value, 'deprecated', null);
18463
+ if (deprecated === null)
18464
+ deprecated = getPropertyFromNode(value, 'Is_Deprecated', false);
18459
18465
  const objToPush = {
18460
18466
  id: keyPropFromNode,
18461
18467
  nodeId: keyPropFromNode,
@@ -19119,9 +19125,15 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19119
19125
  }
19120
19126
  getApiSearchURL() {
19121
19127
  if (this.optionsManager.getOptions().origin == 'classification') {
19122
- let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
19123
- let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
19124
- return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
19128
+ const baseURL = this.optionsManager.getOptions().url;
19129
+ if (baseURL.indexOf("getTree") > -1) {
19130
+ return baseURL.replace("/getTree/", "/search/");
19131
+ }
19132
+ else {
19133
+ let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
19134
+ let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
19135
+ return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
19136
+ }
19125
19137
  }
19126
19138
  else {
19127
19139
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
@@ -19141,8 +19153,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19141
19153
  }
19142
19154
  return url;
19143
19155
  }
19144
- getContextualApiParams(search = null) {
19145
- const options = this.optionsManager.getOptions().options;
19156
+ getContextualApiParams(options = null, search = null) {
19157
+ if (!options)
19158
+ options = this.optionsManager.getOptions().options;
19146
19159
  let optionsToReturn = Object.assign({}, options);
19147
19160
  if (options.Reach) {
19148
19161
  delete optionsToReturn.Reach;
@@ -19162,8 +19175,6 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19162
19175
  delete optionsToReturn.startNode;
19163
19176
  }
19164
19177
  }
19165
- else
19166
- return options;
19167
19178
  return optionsToReturn;
19168
19179
  }
19169
19180
  translateDataForTree(dataToLoad, searchID = null, searched = null) {
@@ -19199,7 +19210,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19199
19210
  if (this.theOptions.source == 'webservice') {
19200
19211
  if (this.theOptions.origin == 'classification') {
19201
19212
  // WS Call
19202
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19213
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19203
19214
  .then((data) => {
19204
19215
  displayResults(data);
19205
19216
  if (!searched) {
@@ -19444,6 +19455,11 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19444
19455
  if (this.hasFocus.indexOf('hide') > -1 && !isStillInsidePicker) {
19445
19456
  this.hasFocus = [];
19446
19457
  }
19458
+ else {
19459
+ if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
19460
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
19461
+ }
19462
+ }
19447
19463
  const previousShownTree = this.shownTree;
19448
19464
  this.shownTree = this.hasFocus.length > 0;
19449
19465
  if (this.shownTree && !previousShownTree) {
@@ -19492,8 +19508,8 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19492
19508
  if (!value)
19493
19509
  value = this.value;
19494
19510
  this.displayedValue = value.map(item => {
19495
- var _a, _b;
19496
- return (_b = (_a = item.fullpathTranslated) !== null && _a !== void 0 ? _a : item.shortpathTranslated) !== null && _b !== void 0 ? _b : `Node ${item.nodeid}`;
19511
+ var _a;
19512
+ return (_a = (this.optionsManager.getOptions().isFullpath ? item.fullpathTranslated : item.shortpathTranslated)) !== null && _a !== void 0 ? _a : `Node ${item.nodeid}`;
19497
19513
  }).join(';');
19498
19514
  }
19499
19515
  // Search a value in the tree and triggers a search when necessary
@@ -641,7 +641,7 @@ Tree.prototype.createUlEle = function () {
641
641
  Tree.prototype.createLiEle = function (node, closed) {
642
642
  const li = document.createElement('li');
643
643
  li.classList.add('treejs-node');
644
- if (node.deprecated) {
644
+ if (node.deprecated || node.Is_Deprecated) {
645
645
  li.classList.add('treejs-node__deprecated');
646
646
  }
647
647
  if (node.isDesaturated) {
@@ -18436,7 +18436,7 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18436
18436
  const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
18437
18437
  if (myObject && myObject.length) {
18438
18438
  myObject.forEach(value => {
18439
- var _a, _b, _c;
18439
+ var _a, _b, _c, _d;
18440
18440
  let keyPropFromNode = null;
18441
18441
  let valueTranslatedPropFromNode = null;
18442
18442
  let fullpathPropFromNode = null;
@@ -18446,6 +18446,10 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18446
18446
  valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
18447
18447
  fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_Fullpath;
18448
18448
  fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
18449
+ if (!fullpathPropFromNode)
18450
+ fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_FullPath;
18451
+ if (!fullpathTranslatedPropFromNode)
18452
+ fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
18449
18453
  }
18450
18454
  else {
18451
18455
  keyPropFromNode = getPropertyFromNode(value, 'key');
@@ -18454,7 +18458,9 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
18454
18458
  fullpathTranslatedPropFromNode = getPropertyFromNode(value, 'fullpathTranslated');
18455
18459
  }
18456
18460
  const childrenPropFromNode = getPropertyFromNode(value, 'children', false);
18457
- const deprecated = getPropertyFromNode(value, 'deprecated', false);
18461
+ let deprecated = getPropertyFromNode(value, 'deprecated', null);
18462
+ if (deprecated === null)
18463
+ deprecated = getPropertyFromNode(value, 'Is_Deprecated', false);
18458
18464
  const objToPush = {
18459
18465
  id: keyPropFromNode,
18460
18466
  nodeId: keyPropFromNode,
@@ -19117,9 +19123,15 @@ const HierarchizedPickerComponent = class {
19117
19123
  }
19118
19124
  getApiSearchURL() {
19119
19125
  if (this.optionsManager.getOptions().origin == 'classification') {
19120
- let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
19121
- let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
19122
- return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
19126
+ const baseURL = this.optionsManager.getOptions().url;
19127
+ if (baseURL.indexOf("getTree") > -1) {
19128
+ return baseURL.replace("/getTree/", "/search/");
19129
+ }
19130
+ else {
19131
+ let substringUpToLastSlash = this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/'));
19132
+ let context = substringUpToLastSlash.substring(substringUpToLastSlash.lastIndexOf('/'), substringUpToLastSlash.length);
19133
+ return substringUpToLastSlash.substring(0, substringUpToLastSlash.lastIndexOf('/')) + '/search' + context;
19134
+ }
19123
19135
  }
19124
19136
  else {
19125
19137
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
@@ -19139,8 +19151,9 @@ const HierarchizedPickerComponent = class {
19139
19151
  }
19140
19152
  return url;
19141
19153
  }
19142
- getContextualApiParams(search = null) {
19143
- const options = this.optionsManager.getOptions().options;
19154
+ getContextualApiParams(options = null, search = null) {
19155
+ if (!options)
19156
+ options = this.optionsManager.getOptions().options;
19144
19157
  let optionsToReturn = Object.assign({}, options);
19145
19158
  if (options.Reach) {
19146
19159
  delete optionsToReturn.Reach;
@@ -19160,8 +19173,6 @@ const HierarchizedPickerComponent = class {
19160
19173
  delete optionsToReturn.startNode;
19161
19174
  }
19162
19175
  }
19163
- else
19164
- return options;
19165
19176
  return optionsToReturn;
19166
19177
  }
19167
19178
  translateDataForTree(dataToLoad, searchID = null, searched = null) {
@@ -19197,7 +19208,7 @@ const HierarchizedPickerComponent = class {
19197
19208
  if (this.theOptions.source == 'webservice') {
19198
19209
  if (this.theOptions.origin == 'classification') {
19199
19210
  // WS Call
19200
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19211
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19201
19212
  .then((data) => {
19202
19213
  displayResults(data);
19203
19214
  if (!searched) {
@@ -19442,6 +19453,11 @@ const HierarchizedPickerComponent = class {
19442
19453
  if (this.hasFocus.indexOf('hide') > -1 && !isStillInsidePicker) {
19443
19454
  this.hasFocus = [];
19444
19455
  }
19456
+ else {
19457
+ if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
19458
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
19459
+ }
19460
+ }
19445
19461
  const previousShownTree = this.shownTree;
19446
19462
  this.shownTree = this.hasFocus.length > 0;
19447
19463
  if (this.shownTree && !previousShownTree) {
@@ -19490,8 +19506,8 @@ const HierarchizedPickerComponent = class {
19490
19506
  if (!value)
19491
19507
  value = this.value;
19492
19508
  this.displayedValue = value.map(item => {
19493
- var _a, _b;
19494
- return (_b = (_a = item.fullpathTranslated) !== null && _a !== void 0 ? _a : item.shortpathTranslated) !== null && _b !== void 0 ? _b : `Node ${item.nodeid}`;
19509
+ var _a;
19510
+ return (_a = (this.optionsManager.getOptions().isFullpath ? item.fullpathTranslated : item.shortpathTranslated)) !== null && _a !== void 0 ? _a : `Node ${item.nodeid}`;
19495
19511
  }).join(';');
19496
19512
  }
19497
19513
  // Search a value in the tree and triggers a search when necessary