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

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.
@@ -343,7 +343,7 @@ Tree.prototype.bindEvent = function (ele) {
343
343
  const contextualApiURL = this.options.parentApi.getContextualApiURL();
344
344
  // WS Call
345
345
  this.options.rawDataManager
346
- .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
346
+ .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
347
347
  .then(data => {
348
348
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
349
349
  });
@@ -355,7 +355,7 @@ Tree.prototype.bindEvent = function (ele) {
355
355
  StartNodeID: target.parentNode.nodeId,
356
356
  lng: this.options.parentApi.theOptions.options.lng,
357
357
  IsDeprecated: this.options.parentApi.theOptions.options.IsDeprecated,
358
- }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
358
+ }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
359
359
  .then(data => {
360
360
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
361
361
  });
@@ -18937,7 +18937,7 @@ const HierarchizedPickerComponent = class {
18937
18937
  return;
18938
18938
  }
18939
18939
  if (((_a = this.optionsManager.getOptions()) === null || _a === void 0 ? void 0 : _a.loading) == 'display') {
18940
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
18940
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
18941
18941
  }
18942
18942
  }
18943
18943
  async initComponent() {
@@ -19141,6 +19141,7 @@ const HierarchizedPickerComponent = class {
19141
19141
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
19142
19142
  }
19143
19143
  }
19144
+ // TODO > Celine would rather like the context (thesaurus or position) to be extracted another way
19144
19145
  getContextualApiURL() {
19145
19146
  const { options, url } = this.optionsManager.getOptions();
19146
19147
  if (options.Reach) {
@@ -19148,7 +19149,9 @@ const HierarchizedPickerComponent = class {
19148
19149
  const base = window.location.origin; // fallback for relative URLs
19149
19150
  const parsedUrl = new URL(url, base);
19150
19151
  const pathSegments = parsedUrl.pathname.split('/');
19151
- const dynamicType = pathSegments[pathSegments.length - 2];
19152
+ let dynamicType = pathSegments[pathSegments.length - 2];
19153
+ if (['thesaurus', 'position'].indexOf(dynamicType) == -1)
19154
+ dynamicType = pathSegments[pathSegments.length - 1];
19152
19155
  const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
19153
19156
  this.optionsManager.dropReach();
19154
19157
  return `${parsedUrl.origin}${newPathname}`;
@@ -19212,7 +19215,7 @@ const HierarchizedPickerComponent = class {
19212
19215
  if (this.theOptions.source == 'webservice') {
19213
19216
  if (this.theOptions.origin == 'classification') {
19214
19217
  // WS Call
19215
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19218
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
19216
19219
  .then((data) => {
19217
19220
  displayResults(data);
19218
19221
  if (!searched) {
@@ -19231,7 +19234,7 @@ const HierarchizedPickerComponent = class {
19231
19234
  searchedValue: searched,
19232
19235
  searchNameOnly: true,
19233
19236
  deprecated: false,
19234
- }, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19237
+ }, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
19235
19238
  .then((data) => {
19236
19239
  displayResults(data);
19237
19240
  if (!searched) {
@@ -19459,7 +19462,7 @@ const HierarchizedPickerComponent = class {
19459
19462
  }
19460
19463
  else {
19461
19464
  if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
19462
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
19465
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
19463
19466
  }
19464
19467
  }
19465
19468
  const previousShownTree = this.shownTree;
@@ -19718,7 +19721,9 @@ const HierarchizedPickerComponent = class {
19718
19721
  this.scrollable = el;
19719
19722
  }, class: 'hierarchized-picker-modal-area ' + (!this.shownTree ? ' hidden ' : ''), onClick: event => {
19720
19723
  clickPickerModalArea(this);
19721
- } }, index.h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, index.h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), index.h("ul", { id: "autocomplete-results-area" }), index.h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (index.h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
19724
+ } }, index.h("div", { class: "loader", ref: el => {
19725
+ this.loader = el;
19726
+ } }, index.h("div", { class: "loader-inner" }, "Loading...")), index.h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, index.h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), index.h("ul", { id: "autocomplete-results-area" }), index.h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (index.h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
19722
19727
  clickPickerModalArea(this);
19723
19728
  } }, index.h("div", { class: "loader", ref: el => {
19724
19729
  this.loader = el;
@@ -249,7 +249,7 @@ export class HierarchizedPickerComponent {
249
249
  return;
250
250
  }
251
251
  if (((_a = this.optionsManager.getOptions()) === null || _a === void 0 ? void 0 : _a.loading) == 'display') {
252
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
252
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
253
253
  }
254
254
  }
255
255
  async initComponent() {
@@ -456,6 +456,7 @@ export class HierarchizedPickerComponent {
456
456
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
457
457
  }
458
458
  }
459
+ // TODO > Celine would rather like the context (thesaurus or position) to be extracted another way
459
460
  getContextualApiURL() {
460
461
  const { options, url } = this.optionsManager.getOptions();
461
462
  if (options.Reach) {
@@ -463,7 +464,9 @@ export class HierarchizedPickerComponent {
463
464
  const base = window.location.origin; // fallback for relative URLs
464
465
  const parsedUrl = new URL(url, base);
465
466
  const pathSegments = parsedUrl.pathname.split('/');
466
- const dynamicType = pathSegments[pathSegments.length - 2];
467
+ let dynamicType = pathSegments[pathSegments.length - 2];
468
+ if (['thesaurus', 'position'].indexOf(dynamicType) == -1)
469
+ dynamicType = pathSegments[pathSegments.length - 1];
467
470
  const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
468
471
  this.optionsManager.dropReach();
469
472
  return `${parsedUrl.origin}${newPathname}`;
@@ -527,7 +530,7 @@ export class HierarchizedPickerComponent {
527
530
  if (this.theOptions.source == 'webservice') {
528
531
  if (this.theOptions.origin == 'classification') {
529
532
  // WS Call
530
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
533
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
531
534
  .then((data) => {
532
535
  displayResults(data);
533
536
  if (!searched) {
@@ -546,7 +549,7 @@ export class HierarchizedPickerComponent {
546
549
  searchedValue: searched,
547
550
  searchNameOnly: true,
548
551
  deprecated: false,
549
- }, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
552
+ }, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
550
553
  .then((data) => {
551
554
  displayResults(data);
552
555
  if (!searched) {
@@ -774,7 +777,7 @@ export class HierarchizedPickerComponent {
774
777
  }
775
778
  else {
776
779
  if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
777
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
780
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
778
781
  }
779
782
  }
780
783
  const previousShownTree = this.shownTree;
@@ -1033,7 +1036,9 @@ export class HierarchizedPickerComponent {
1033
1036
  this.scrollable = el;
1034
1037
  }, class: 'hierarchized-picker-modal-area ' + (!this.shownTree ? ' hidden ' : ''), onClick: event => {
1035
1038
  clickPickerModalArea(this, event);
1036
- } }, h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), h("ul", { id: "autocomplete-results-area" }), h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
1039
+ } }, h("div", { class: "loader", ref: el => {
1040
+ this.loader = el;
1041
+ } }, h("div", { class: "loader-inner" }, "Loading...")), h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), h("ul", { id: "autocomplete-results-area" }), h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
1037
1042
  clickPickerModalArea(this, event);
1038
1043
  } }, h("div", { class: "loader", ref: el => {
1039
1044
  this.loader = el;
@@ -211,7 +211,7 @@ Tree.prototype.bindEvent = function (ele) {
211
211
  const contextualApiURL = this.options.parentApi.getContextualApiURL();
212
212
  // WS Call
213
213
  this.options.rawDataManager
214
- .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
214
+ .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
215
215
  .then(data => {
216
216
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
217
217
  });
@@ -223,7 +223,7 @@ Tree.prototype.bindEvent = function (ele) {
223
223
  StartNodeID: target.parentNode.nodeId,
224
224
  lng: this.options.parentApi.theOptions.options.lng,
225
225
  IsDeprecated: this.options.parentApi.theOptions.options.IsDeprecated,
226
- }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
226
+ }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
227
227
  .then(data => {
228
228
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
229
229
  });
@@ -340,7 +340,7 @@ Tree.prototype.bindEvent = function (ele) {
340
340
  const contextualApiURL = this.options.parentApi.getContextualApiURL();
341
341
  // WS Call
342
342
  this.options.rawDataManager
343
- .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
343
+ .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
344
344
  .then(data => {
345
345
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
346
346
  });
@@ -352,7 +352,7 @@ Tree.prototype.bindEvent = function (ele) {
352
352
  StartNodeID: target.parentNode.nodeId,
353
353
  lng: this.options.parentApi.theOptions.options.lng,
354
354
  IsDeprecated: this.options.parentApi.theOptions.options.IsDeprecated,
355
- }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
355
+ }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
356
356
  .then(data => {
357
357
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
358
358
  });
@@ -18935,7 +18935,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
18935
18935
  return;
18936
18936
  }
18937
18937
  if (((_a = this.optionsManager.getOptions()) === null || _a === void 0 ? void 0 : _a.loading) == 'display') {
18938
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
18938
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
18939
18939
  }
18940
18940
  }
18941
18941
  async initComponent() {
@@ -19139,6 +19139,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19139
19139
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
19140
19140
  }
19141
19141
  }
19142
+ // TODO > Celine would rather like the context (thesaurus or position) to be extracted another way
19142
19143
  getContextualApiURL() {
19143
19144
  const { options, url } = this.optionsManager.getOptions();
19144
19145
  if (options.Reach) {
@@ -19146,7 +19147,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19146
19147
  const base = window.location.origin; // fallback for relative URLs
19147
19148
  const parsedUrl = new URL(url, base);
19148
19149
  const pathSegments = parsedUrl.pathname.split('/');
19149
- const dynamicType = pathSegments[pathSegments.length - 2];
19150
+ let dynamicType = pathSegments[pathSegments.length - 2];
19151
+ if (['thesaurus', 'position'].indexOf(dynamicType) == -1)
19152
+ dynamicType = pathSegments[pathSegments.length - 1];
19150
19153
  const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
19151
19154
  this.optionsManager.dropReach();
19152
19155
  return `${parsedUrl.origin}${newPathname}`;
@@ -19210,7 +19213,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19210
19213
  if (this.theOptions.source == 'webservice') {
19211
19214
  if (this.theOptions.origin == 'classification') {
19212
19215
  // WS Call
19213
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19216
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
19214
19217
  .then((data) => {
19215
19218
  displayResults(data);
19216
19219
  if (!searched) {
@@ -19229,7 +19232,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19229
19232
  searchedValue: searched,
19230
19233
  searchNameOnly: true,
19231
19234
  deprecated: false,
19232
- }, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19235
+ }, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
19233
19236
  .then((data) => {
19234
19237
  displayResults(data);
19235
19238
  if (!searched) {
@@ -19457,7 +19460,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19457
19460
  }
19458
19461
  else {
19459
19462
  if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
19460
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
19463
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
19461
19464
  }
19462
19465
  }
19463
19466
  const previousShownTree = this.shownTree;
@@ -19716,7 +19719,9 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19716
19719
  this.scrollable = el;
19717
19720
  }, class: 'hierarchized-picker-modal-area ' + (!this.shownTree ? ' hidden ' : ''), onClick: event => {
19718
19721
  clickPickerModalArea(this);
19719
- } }, h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), h("ul", { id: "autocomplete-results-area" }), h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
19722
+ } }, h("div", { class: "loader", ref: el => {
19723
+ this.loader = el;
19724
+ } }, h("div", { class: "loader-inner" }, "Loading...")), h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), h("ul", { id: "autocomplete-results-area" }), h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
19720
19725
  clickPickerModalArea(this);
19721
19726
  } }, h("div", { class: "loader", ref: el => {
19722
19727
  this.loader = el;
@@ -339,7 +339,7 @@ Tree.prototype.bindEvent = function (ele) {
339
339
  const contextualApiURL = this.options.parentApi.getContextualApiURL();
340
340
  // WS Call
341
341
  this.options.rawDataManager
342
- .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
342
+ .getFromClassification(contextualApiURL, contextualApiParams, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
343
343
  .then(data => {
344
344
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
345
345
  });
@@ -351,7 +351,7 @@ Tree.prototype.bindEvent = function (ele) {
351
351
  StartNodeID: target.parentNode.nodeId,
352
352
  lng: this.options.parentApi.theOptions.options.lng,
353
353
  IsDeprecated: this.options.parentApi.theOptions.options.IsDeprecated,
354
- }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + ".loader"))
354
+ }, document.querySelector("#hierarchized-picker-" + this.options.parentApi.componentID + " .loader"))
355
355
  .then(data => {
356
356
  this.options.completeCurrentTreeWithTree(this, data, this.options.parentApi.theOptions);
357
357
  });
@@ -18933,7 +18933,7 @@ const HierarchizedPickerComponent = class {
18933
18933
  return;
18934
18934
  }
18935
18935
  if (((_a = this.optionsManager.getOptions()) === null || _a === void 0 ? void 0 : _a.loading) == 'display') {
18936
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
18936
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
18937
18937
  }
18938
18938
  }
18939
18939
  async initComponent() {
@@ -19137,6 +19137,7 @@ const HierarchizedPickerComponent = class {
19137
19137
  return this.optionsManager.getOptions().url.substring(0, this.optionsManager.getOptions().url.lastIndexOf('/')) + '/GetTreeFromSearch';
19138
19138
  }
19139
19139
  }
19140
+ // TODO > Celine would rather like the context (thesaurus or position) to be extracted another way
19140
19141
  getContextualApiURL() {
19141
19142
  const { options, url } = this.optionsManager.getOptions();
19142
19143
  if (options.Reach) {
@@ -19144,7 +19145,9 @@ const HierarchizedPickerComponent = class {
19144
19145
  const base = window.location.origin; // fallback for relative URLs
19145
19146
  const parsedUrl = new URL(url, base);
19146
19147
  const pathSegments = parsedUrl.pathname.split('/');
19147
- const dynamicType = pathSegments[pathSegments.length - 2];
19148
+ let dynamicType = pathSegments[pathSegments.length - 2];
19149
+ if (['thesaurus', 'position'].indexOf(dynamicType) == -1)
19150
+ dynamicType = pathSegments[pathSegments.length - 1];
19148
19151
  const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
19149
19152
  this.optionsManager.dropReach();
19150
19153
  return `${parsedUrl.origin}${newPathname}`;
@@ -19208,7 +19211,7 @@ const HierarchizedPickerComponent = class {
19208
19211
  if (this.theOptions.source == 'webservice') {
19209
19212
  if (this.theOptions.origin == 'classification') {
19210
19213
  // WS Call
19211
- this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19214
+ this.rawDataManager.getFromClassification(this.getApiSearchURL(), Object.assign({}, this.getContextualApiParams(null, searched)), document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
19212
19215
  .then((data) => {
19213
19216
  displayResults(data);
19214
19217
  if (!searched) {
@@ -19227,7 +19230,7 @@ const HierarchizedPickerComponent = class {
19227
19230
  searchedValue: searched,
19228
19231
  searchNameOnly: true,
19229
19232
  deprecated: false,
19230
- }, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"))
19233
+ }, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"))
19231
19234
  .then((data) => {
19232
19235
  displayResults(data);
19233
19236
  if (!searched) {
@@ -19455,7 +19458,7 @@ const HierarchizedPickerComponent = class {
19455
19458
  }
19456
19459
  else {
19457
19460
  if (!this.shownTree && this.theOptions.loading == 'click' && !this.ready) {
19458
- this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + ".loader"));
19461
+ this.loadDataForTree(true, document.querySelector("#hierarchized-picker-" + this.componentID + " .loader"));
19459
19462
  }
19460
19463
  }
19461
19464
  const previousShownTree = this.shownTree;
@@ -19714,7 +19717,9 @@ const HierarchizedPickerComponent = class {
19714
19717
  this.scrollable = el;
19715
19718
  }, class: 'hierarchized-picker-modal-area ' + (!this.shownTree ? ' hidden ' : ''), onClick: event => {
19716
19719
  clickPickerModalArea(this);
19717
- } }, h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), h("ul", { id: "autocomplete-results-area" }), h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
19720
+ } }, h("div", { class: "loader", ref: el => {
19721
+ this.loader = el;
19722
+ } }, h("div", { class: "loader-inner" }, "Loading...")), h("div", { class: 'hierarchized-picker-modal ' + (!this.ready ? 'hidden' : '') }, h("search-input", { placeholder: getLanguageValue(this.optionsManager.getOptions().searchPlaceholder, this.optionsManager.getOptions().language, defaultLanguage), onInputFocus: () => focusInSearchEvent(this), onInputBlur: () => focusOutSearchEvent(this, event), onSearch: (event) => this.search(event.detail) }), h("ul", { id: "autocomplete-results-area" }), h("div", { id: 'tree-area-' + this.componentID, class: 'hierarchized-picker-tree hierarchized-picker-tree-area ' + this.pickerClass }))))) : (h("div", { class: 'hierarchized-picker-raw-tree-area' + (this.isDisabled ? ' readonly' : ''), onClick: event => {
19718
19723
  clickPickerModalArea(this);
19719
19724
  } }, h("div", { class: "loader", ref: el => {
19720
19725
  this.loader = el;