reneco-hierarchized-picker 0.4.2-beta.10 → 0.4.2-beta.12
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.
- package/dist/cjs/reneco-hierarchized-picker_2.cjs.entry.js +13 -9
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +13 -9
- package/dist/custom-elements/index.js +13 -9
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +13 -9
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-c5e8c2f8.entry.js → p-61375f23.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-1a128ef2.system.entry.js → p-a249a122.system.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/package.json +1 -1
|
@@ -18812,7 +18812,10 @@ const HierarchizedPickerComponent = class {
|
|
|
18812
18812
|
const isEqual = lodash.isEqual(newV, oldV);
|
|
18813
18813
|
if (!newV.defaultValue && !oldV.defaultValue)
|
|
18814
18814
|
return;
|
|
18815
|
-
const
|
|
18815
|
+
const newDefault = Array.isArray(newV.defaultValue) ? newV.defaultValue : [newV.defaultValue];
|
|
18816
|
+
const oldDefault = Array.isArray(oldV.defaultValue) ? oldV.defaultValue : [oldV.defaultValue];
|
|
18817
|
+
const changeDefaultValue = newDefault.length !== oldDefault.length ||
|
|
18818
|
+
!newDefault.every(value => oldDefault.includes(value));
|
|
18816
18819
|
if (!isEqual && changeDefaultValue) {
|
|
18817
18820
|
return changeDefaultValue;
|
|
18818
18821
|
}
|
|
@@ -19105,15 +19108,17 @@ const HierarchizedPickerComponent = class {
|
|
|
19105
19108
|
}
|
|
19106
19109
|
}
|
|
19107
19110
|
getContextualApiURL() {
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
+
const { options, url } = this.optionsManager.getOptions();
|
|
19112
|
+
if (options.Reach) {
|
|
19113
|
+
// Use a base URL for relative paths
|
|
19114
|
+
const base = window.location.origin; // fallback for relative URLs
|
|
19115
|
+
const parsedUrl = new URL(url, base);
|
|
19116
|
+
const pathSegments = parsedUrl.pathname.split('/');
|
|
19111
19117
|
const dynamicType = pathSegments[pathSegments.length - 2];
|
|
19112
|
-
const newPathname = `/api/v1/classification/reach/${dynamicType}/${
|
|
19113
|
-
return `${
|
|
19118
|
+
const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
|
|
19119
|
+
return `${parsedUrl.origin}${newPathname}`;
|
|
19114
19120
|
}
|
|
19115
|
-
|
|
19116
|
-
return this.optionsManager.getOptions().url;
|
|
19121
|
+
return url;
|
|
19117
19122
|
}
|
|
19118
19123
|
getContextualApiParams(options = null) {
|
|
19119
19124
|
if (!options)
|
|
@@ -19129,7 +19134,6 @@ const HierarchizedPickerComponent = class {
|
|
|
19129
19134
|
optionsToReturn.startingnode = optionsToReturn.StartNodeID;
|
|
19130
19135
|
delete optionsToReturn.StartNodeID;
|
|
19131
19136
|
}
|
|
19132
|
-
console.log("JE RETOURNE", optionsToReturn);
|
|
19133
19137
|
return optionsToReturn;
|
|
19134
19138
|
}
|
|
19135
19139
|
else
|
|
@@ -156,7 +156,10 @@ export class HierarchizedPickerComponent {
|
|
|
156
156
|
const isEqual = _.isEqual(newV, oldV);
|
|
157
157
|
if (!newV.defaultValue && !oldV.defaultValue)
|
|
158
158
|
return;
|
|
159
|
-
const
|
|
159
|
+
const newDefault = Array.isArray(newV.defaultValue) ? newV.defaultValue : [newV.defaultValue];
|
|
160
|
+
const oldDefault = Array.isArray(oldV.defaultValue) ? oldV.defaultValue : [oldV.defaultValue];
|
|
161
|
+
const changeDefaultValue = newDefault.length !== oldDefault.length ||
|
|
162
|
+
!newDefault.every(value => oldDefault.includes(value));
|
|
160
163
|
if (!isEqual && changeDefaultValue) {
|
|
161
164
|
return changeDefaultValue;
|
|
162
165
|
}
|
|
@@ -447,15 +450,17 @@ export class HierarchizedPickerComponent {
|
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
getContextualApiURL() {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
+
const { options, url } = this.optionsManager.getOptions();
|
|
454
|
+
if (options.Reach) {
|
|
455
|
+
// Use a base URL for relative paths
|
|
456
|
+
const base = window.location.origin; // fallback for relative URLs
|
|
457
|
+
const parsedUrl = new URL(url, base);
|
|
458
|
+
const pathSegments = parsedUrl.pathname.split('/');
|
|
453
459
|
const dynamicType = pathSegments[pathSegments.length - 2];
|
|
454
|
-
const newPathname = `/api/v1/classification/reach/${dynamicType}/${
|
|
455
|
-
return `${
|
|
460
|
+
const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
|
|
461
|
+
return `${parsedUrl.origin}${newPathname}`;
|
|
456
462
|
}
|
|
457
|
-
|
|
458
|
-
return this.optionsManager.getOptions().url;
|
|
463
|
+
return url;
|
|
459
464
|
}
|
|
460
465
|
getContextualApiParams(options = null) {
|
|
461
466
|
if (!options)
|
|
@@ -471,7 +476,6 @@ export class HierarchizedPickerComponent {
|
|
|
471
476
|
optionsToReturn.startingnode = optionsToReturn.StartNodeID;
|
|
472
477
|
delete optionsToReturn.StartNodeID;
|
|
473
478
|
}
|
|
474
|
-
console.log("JE RETOURNE", optionsToReturn);
|
|
475
479
|
return optionsToReturn;
|
|
476
480
|
}
|
|
477
481
|
else
|
|
@@ -18809,7 +18809,10 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
18809
18809
|
const isEqual = lodash.isEqual(newV, oldV);
|
|
18810
18810
|
if (!newV.defaultValue && !oldV.defaultValue)
|
|
18811
18811
|
return;
|
|
18812
|
-
const
|
|
18812
|
+
const newDefault = Array.isArray(newV.defaultValue) ? newV.defaultValue : [newV.defaultValue];
|
|
18813
|
+
const oldDefault = Array.isArray(oldV.defaultValue) ? oldV.defaultValue : [oldV.defaultValue];
|
|
18814
|
+
const changeDefaultValue = newDefault.length !== oldDefault.length ||
|
|
18815
|
+
!newDefault.every(value => oldDefault.includes(value));
|
|
18813
18816
|
if (!isEqual && changeDefaultValue) {
|
|
18814
18817
|
return changeDefaultValue;
|
|
18815
18818
|
}
|
|
@@ -19103,15 +19106,17 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19103
19106
|
}
|
|
19104
19107
|
}
|
|
19105
19108
|
getContextualApiURL() {
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
+
const { options, url } = this.optionsManager.getOptions();
|
|
19110
|
+
if (options.Reach) {
|
|
19111
|
+
// Use a base URL for relative paths
|
|
19112
|
+
const base = window.location.origin; // fallback for relative URLs
|
|
19113
|
+
const parsedUrl = new URL(url, base);
|
|
19114
|
+
const pathSegments = parsedUrl.pathname.split('/');
|
|
19109
19115
|
const dynamicType = pathSegments[pathSegments.length - 2];
|
|
19110
|
-
const newPathname = `/api/v1/classification/reach/${dynamicType}/${
|
|
19111
|
-
return `${
|
|
19116
|
+
const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
|
|
19117
|
+
return `${parsedUrl.origin}${newPathname}`;
|
|
19112
19118
|
}
|
|
19113
|
-
|
|
19114
|
-
return this.optionsManager.getOptions().url;
|
|
19119
|
+
return url;
|
|
19115
19120
|
}
|
|
19116
19121
|
getContextualApiParams(options = null) {
|
|
19117
19122
|
if (!options)
|
|
@@ -19127,7 +19132,6 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19127
19132
|
optionsToReturn.startingnode = optionsToReturn.StartNodeID;
|
|
19128
19133
|
delete optionsToReturn.StartNodeID;
|
|
19129
19134
|
}
|
|
19130
|
-
console.log("JE RETOURNE", optionsToReturn);
|
|
19131
19135
|
return optionsToReturn;
|
|
19132
19136
|
}
|
|
19133
19137
|
else
|
|
@@ -18808,7 +18808,10 @@ const HierarchizedPickerComponent = class {
|
|
|
18808
18808
|
const isEqual = lodash.isEqual(newV, oldV);
|
|
18809
18809
|
if (!newV.defaultValue && !oldV.defaultValue)
|
|
18810
18810
|
return;
|
|
18811
|
-
const
|
|
18811
|
+
const newDefault = Array.isArray(newV.defaultValue) ? newV.defaultValue : [newV.defaultValue];
|
|
18812
|
+
const oldDefault = Array.isArray(oldV.defaultValue) ? oldV.defaultValue : [oldV.defaultValue];
|
|
18813
|
+
const changeDefaultValue = newDefault.length !== oldDefault.length ||
|
|
18814
|
+
!newDefault.every(value => oldDefault.includes(value));
|
|
18812
18815
|
if (!isEqual && changeDefaultValue) {
|
|
18813
18816
|
return changeDefaultValue;
|
|
18814
18817
|
}
|
|
@@ -19101,15 +19104,17 @@ const HierarchizedPickerComponent = class {
|
|
|
19101
19104
|
}
|
|
19102
19105
|
}
|
|
19103
19106
|
getContextualApiURL() {
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
+
const { options, url } = this.optionsManager.getOptions();
|
|
19108
|
+
if (options.Reach) {
|
|
19109
|
+
// Use a base URL for relative paths
|
|
19110
|
+
const base = window.location.origin; // fallback for relative URLs
|
|
19111
|
+
const parsedUrl = new URL(url, base);
|
|
19112
|
+
const pathSegments = parsedUrl.pathname.split('/');
|
|
19107
19113
|
const dynamicType = pathSegments[pathSegments.length - 2];
|
|
19108
|
-
const newPathname = `/api/v1/classification/reach/${dynamicType}/${
|
|
19109
|
-
return `${
|
|
19114
|
+
const newPathname = `/api/v1/classification/reach/${dynamicType}/${options.Reach}`;
|
|
19115
|
+
return `${parsedUrl.origin}${newPathname}`;
|
|
19110
19116
|
}
|
|
19111
|
-
|
|
19112
|
-
return this.optionsManager.getOptions().url;
|
|
19117
|
+
return url;
|
|
19113
19118
|
}
|
|
19114
19119
|
getContextualApiParams(options = null) {
|
|
19115
19120
|
if (!options)
|
|
@@ -19125,7 +19130,6 @@ const HierarchizedPickerComponent = class {
|
|
|
19125
19130
|
optionsToReturn.startingnode = optionsToReturn.StartNodeID;
|
|
19126
19131
|
delete optionsToReturn.StartNodeID;
|
|
19127
19132
|
}
|
|
19128
|
-
console.log("JE RETOURNE", optionsToReturn);
|
|
19129
19133
|
return optionsToReturn;
|
|
19130
19134
|
}
|
|
19131
19135
|
else
|