reneco-hierarchized-picker 0.4.2-beta.1 → 0.4.2-beta.3
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 +24 -7
- package/dist/collection/components/hierarchized-picker/hierarchized-picker.js +0 -5
- package/dist/collection/features/tree/tree-utils.js +24 -22
- package/dist/custom-elements/index.js +24 -7
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +24 -7
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-91521a4a.system.entry.js → p-31f8b534.system.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/p-73168a50.system.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-308071e7.entry.js → p-7cf81d75.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/reneco-hierarchized-picker.esm.js +1 -1
- package/dist/types/features/tree/tree-utils.d.ts +0 -1
- package/package.json +1 -1
|
@@ -18291,6 +18291,27 @@ function getPropertyFromNode(node, property, logerror = true) {
|
|
|
18291
18291
|
function findNodeById(tree, nodeId) {
|
|
18292
18292
|
return tree.nodesById[nodeId] || null;
|
|
18293
18293
|
}
|
|
18294
|
+
// TODO Deprecated ?
|
|
18295
|
+
// export function getNodesFromSearch(data: any, searched: string): any[] {
|
|
18296
|
+
// let toret: any[] = [];
|
|
18297
|
+
// if (data && data.children) {
|
|
18298
|
+
// data.children.forEach(value => {
|
|
18299
|
+
// if (value && value.valueTranslated) {
|
|
18300
|
+
// if (value.valueTranslated.toLowerCase().includes(searched.toLowerCase())) {
|
|
18301
|
+
// toret.push({
|
|
18302
|
+
// id: value.key,
|
|
18303
|
+
// fullpath: value.fullpath,
|
|
18304
|
+
// fullpathTranslated: value.fullpathTranslated,
|
|
18305
|
+
// text: value.valueTranslated,
|
|
18306
|
+
// deprecated: value.deprecated,
|
|
18307
|
+
// });
|
|
18308
|
+
// }
|
|
18309
|
+
// toret = toret.concat(getNodesFromSearch(value, searched));
|
|
18310
|
+
// }
|
|
18311
|
+
// });
|
|
18312
|
+
// }
|
|
18313
|
+
// return toret;
|
|
18314
|
+
// }
|
|
18294
18315
|
/**
|
|
18295
18316
|
* Fills the tree with nodes based on the provided object.
|
|
18296
18317
|
*/
|
|
@@ -18303,11 +18324,12 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18303
18324
|
let valueTranslatedPropFromNode = null;
|
|
18304
18325
|
let fullpathPropFromNode = null;
|
|
18305
18326
|
let fullpathTranslatedPropFromNode = null;
|
|
18327
|
+
// TODO Not sure this is correct in the latest versions, may require review during 2025
|
|
18306
18328
|
if (options.origin == "classification") {
|
|
18307
18329
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
18308
18330
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
18309
|
-
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.
|
|
18310
|
-
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, '
|
|
18331
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
18332
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
18311
18333
|
}
|
|
18312
18334
|
else {
|
|
18313
18335
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|
|
@@ -18676,7 +18698,6 @@ const HierarchizedPickerComponent = class {
|
|
|
18676
18698
|
this.setOptions(newoptions);
|
|
18677
18699
|
}
|
|
18678
18700
|
setNewFilter(newfilter) {
|
|
18679
|
-
console.log("newfilter is ", newfilter);
|
|
18680
18701
|
this.filterTree(newfilter);
|
|
18681
18702
|
}
|
|
18682
18703
|
optionsChange(newValue, oldValue) {
|
|
@@ -19016,9 +19037,6 @@ const HierarchizedPickerComponent = class {
|
|
|
19016
19037
|
if (this.theOptions.origin == 'classification') {
|
|
19017
19038
|
// WS Call
|
|
19018
19039
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), {
|
|
19019
|
-
StartNodeID: this.theOptions.options.startNode,
|
|
19020
|
-
lng: this.theOptions.options.lng,
|
|
19021
|
-
deprecated: this.theOptions.options.IsDeprecated,
|
|
19022
19040
|
searchedValue: searched
|
|
19023
19041
|
})
|
|
19024
19042
|
.then((data) => {
|
|
@@ -19313,7 +19331,6 @@ const HierarchizedPickerComponent = class {
|
|
|
19313
19331
|
}
|
|
19314
19332
|
// Search a value in the tree and triggers a search when necessary
|
|
19315
19333
|
search(searched) {
|
|
19316
|
-
console.log("search ", searched);
|
|
19317
19334
|
let searchinput = document.querySelector('#hierarchized-picker-' + this.componentID + ' .hierarchized-picker-search input');
|
|
19318
19335
|
if (this.optionsManager.getOptions().mode == 'input' && searchinput) {
|
|
19319
19336
|
searchinput.classList.remove('fieldError');
|
|
@@ -142,7 +142,6 @@ export class HierarchizedPickerComponent {
|
|
|
142
142
|
this.setOptions(newoptions);
|
|
143
143
|
}
|
|
144
144
|
setNewFilter(newfilter) {
|
|
145
|
-
console.log("newfilter is ", newfilter);
|
|
146
145
|
this.filterTree(newfilter);
|
|
147
146
|
}
|
|
148
147
|
optionsChange(newValue, oldValue) {
|
|
@@ -480,9 +479,6 @@ export class HierarchizedPickerComponent {
|
|
|
480
479
|
if (this.theOptions.origin == 'classification') {
|
|
481
480
|
// WS Call
|
|
482
481
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), {
|
|
483
|
-
StartNodeID: this.theOptions.options.startNode,
|
|
484
|
-
lng: this.theOptions.options.lng,
|
|
485
|
-
deprecated: this.theOptions.options.IsDeprecated,
|
|
486
482
|
searchedValue: searched
|
|
487
483
|
})
|
|
488
484
|
.then((data) => {
|
|
@@ -777,7 +773,6 @@ export class HierarchizedPickerComponent {
|
|
|
777
773
|
}
|
|
778
774
|
// Search a value in the tree and triggers a search when necessary
|
|
779
775
|
search(searched) {
|
|
780
|
-
console.log("search ", searched);
|
|
781
776
|
let searchinput = document.querySelector('#hierarchized-picker-' + this.componentID + ' .hierarchized-picker-search input');
|
|
782
777
|
if (this.optionsManager.getOptions().mode == 'input' && searchinput) {
|
|
783
778
|
searchinput.classList.remove('fieldError');
|
|
@@ -23,26 +23,27 @@ export function getPropertyFromNode(node, property, logerror = true) {
|
|
|
23
23
|
export function findNodeById(tree, nodeId) {
|
|
24
24
|
return tree.nodesById[nodeId] || null;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
// TODO Deprecated ?
|
|
27
|
+
// export function getNodesFromSearch(data: any, searched: string): any[] {
|
|
28
|
+
// let toret: any[] = [];
|
|
29
|
+
// if (data && data.children) {
|
|
30
|
+
// data.children.forEach(value => {
|
|
31
|
+
// if (value && value.valueTranslated) {
|
|
32
|
+
// if (value.valueTranslated.toLowerCase().includes(searched.toLowerCase())) {
|
|
33
|
+
// toret.push({
|
|
34
|
+
// id: value.key,
|
|
35
|
+
// fullpath: value.fullpath,
|
|
36
|
+
// fullpathTranslated: value.fullpathTranslated,
|
|
37
|
+
// text: value.valueTranslated,
|
|
38
|
+
// deprecated: value.deprecated,
|
|
39
|
+
// });
|
|
40
|
+
// }
|
|
41
|
+
// toret = toret.concat(getNodesFromSearch(value, searched));
|
|
42
|
+
// }
|
|
43
|
+
// });
|
|
44
|
+
// }
|
|
45
|
+
// return toret;
|
|
46
|
+
// }
|
|
46
47
|
/**
|
|
47
48
|
* Fills the tree with nodes based on the provided object.
|
|
48
49
|
*/
|
|
@@ -55,11 +56,12 @@ export function fillTreeWithObject(tree, myObject, searched, options, depth = 0)
|
|
|
55
56
|
let valueTranslatedPropFromNode = null;
|
|
56
57
|
let fullpathPropFromNode = null;
|
|
57
58
|
let fullpathTranslatedPropFromNode = null;
|
|
59
|
+
// TODO Not sure this is correct in the latest versions, may require review during 2025
|
|
58
60
|
if (options.origin == "classification") {
|
|
59
61
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
60
62
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
61
|
-
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.
|
|
62
|
-
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, '
|
|
63
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
64
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
63
65
|
}
|
|
64
66
|
else {
|
|
65
67
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|
|
@@ -18288,6 +18288,27 @@ function getPropertyFromNode(node, property, logerror = true) {
|
|
|
18288
18288
|
function findNodeById(tree, nodeId) {
|
|
18289
18289
|
return tree.nodesById[nodeId] || null;
|
|
18290
18290
|
}
|
|
18291
|
+
// TODO Deprecated ?
|
|
18292
|
+
// export function getNodesFromSearch(data: any, searched: string): any[] {
|
|
18293
|
+
// let toret: any[] = [];
|
|
18294
|
+
// if (data && data.children) {
|
|
18295
|
+
// data.children.forEach(value => {
|
|
18296
|
+
// if (value && value.valueTranslated) {
|
|
18297
|
+
// if (value.valueTranslated.toLowerCase().includes(searched.toLowerCase())) {
|
|
18298
|
+
// toret.push({
|
|
18299
|
+
// id: value.key,
|
|
18300
|
+
// fullpath: value.fullpath,
|
|
18301
|
+
// fullpathTranslated: value.fullpathTranslated,
|
|
18302
|
+
// text: value.valueTranslated,
|
|
18303
|
+
// deprecated: value.deprecated,
|
|
18304
|
+
// });
|
|
18305
|
+
// }
|
|
18306
|
+
// toret = toret.concat(getNodesFromSearch(value, searched));
|
|
18307
|
+
// }
|
|
18308
|
+
// });
|
|
18309
|
+
// }
|
|
18310
|
+
// return toret;
|
|
18311
|
+
// }
|
|
18291
18312
|
/**
|
|
18292
18313
|
* Fills the tree with nodes based on the provided object.
|
|
18293
18314
|
*/
|
|
@@ -18300,11 +18321,12 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18300
18321
|
let valueTranslatedPropFromNode = null;
|
|
18301
18322
|
let fullpathPropFromNode = null;
|
|
18302
18323
|
let fullpathTranslatedPropFromNode = null;
|
|
18324
|
+
// TODO Not sure this is correct in the latest versions, may require review during 2025
|
|
18303
18325
|
if (options.origin == "classification") {
|
|
18304
18326
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
18305
18327
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
18306
|
-
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.
|
|
18307
|
-
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, '
|
|
18328
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
18329
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
18308
18330
|
}
|
|
18309
18331
|
else {
|
|
18310
18332
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|
|
@@ -18673,7 +18695,6 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
18673
18695
|
this.setOptions(newoptions);
|
|
18674
18696
|
}
|
|
18675
18697
|
setNewFilter(newfilter) {
|
|
18676
|
-
console.log("newfilter is ", newfilter);
|
|
18677
18698
|
this.filterTree(newfilter);
|
|
18678
18699
|
}
|
|
18679
18700
|
optionsChange(newValue, oldValue) {
|
|
@@ -19014,9 +19035,6 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19014
19035
|
if (this.theOptions.origin == 'classification') {
|
|
19015
19036
|
// WS Call
|
|
19016
19037
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), {
|
|
19017
|
-
StartNodeID: this.theOptions.options.startNode,
|
|
19018
|
-
lng: this.theOptions.options.lng,
|
|
19019
|
-
deprecated: this.theOptions.options.IsDeprecated,
|
|
19020
19038
|
searchedValue: searched
|
|
19021
19039
|
})
|
|
19022
19040
|
.then((data) => {
|
|
@@ -19311,7 +19329,6 @@ const HierarchizedPickerComponent = class extends HTMLElement {
|
|
|
19311
19329
|
}
|
|
19312
19330
|
// Search a value in the tree and triggers a search when necessary
|
|
19313
19331
|
search(searched) {
|
|
19314
|
-
console.log("search ", searched);
|
|
19315
19332
|
let searchinput = document.querySelector('#hierarchized-picker-' + this.componentID + ' .hierarchized-picker-search input');
|
|
19316
19333
|
if (this.optionsManager.getOptions().mode == 'input' && searchinput) {
|
|
19317
19334
|
searchinput.classList.remove('fieldError');
|
|
@@ -18287,6 +18287,27 @@ function getPropertyFromNode(node, property, logerror = true) {
|
|
|
18287
18287
|
function findNodeById(tree, nodeId) {
|
|
18288
18288
|
return tree.nodesById[nodeId] || null;
|
|
18289
18289
|
}
|
|
18290
|
+
// TODO Deprecated ?
|
|
18291
|
+
// export function getNodesFromSearch(data: any, searched: string): any[] {
|
|
18292
|
+
// let toret: any[] = [];
|
|
18293
|
+
// if (data && data.children) {
|
|
18294
|
+
// data.children.forEach(value => {
|
|
18295
|
+
// if (value && value.valueTranslated) {
|
|
18296
|
+
// if (value.valueTranslated.toLowerCase().includes(searched.toLowerCase())) {
|
|
18297
|
+
// toret.push({
|
|
18298
|
+
// id: value.key,
|
|
18299
|
+
// fullpath: value.fullpath,
|
|
18300
|
+
// fullpathTranslated: value.fullpathTranslated,
|
|
18301
|
+
// text: value.valueTranslated,
|
|
18302
|
+
// deprecated: value.deprecated,
|
|
18303
|
+
// });
|
|
18304
|
+
// }
|
|
18305
|
+
// toret = toret.concat(getNodesFromSearch(value, searched));
|
|
18306
|
+
// }
|
|
18307
|
+
// });
|
|
18308
|
+
// }
|
|
18309
|
+
// return toret;
|
|
18310
|
+
// }
|
|
18290
18311
|
/**
|
|
18291
18312
|
* Fills the tree with nodes based on the provided object.
|
|
18292
18313
|
*/
|
|
@@ -18299,11 +18320,12 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18299
18320
|
let valueTranslatedPropFromNode = null;
|
|
18300
18321
|
let fullpathPropFromNode = null;
|
|
18301
18322
|
let fullpathTranslatedPropFromNode = null;
|
|
18323
|
+
// TODO Not sure this is correct in the latest versions, may require review during 2025
|
|
18302
18324
|
if (options.origin == "classification") {
|
|
18303
18325
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
18304
18326
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
18305
|
-
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.
|
|
18306
|
-
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, '
|
|
18327
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
18328
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
18307
18329
|
}
|
|
18308
18330
|
else {
|
|
18309
18331
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|
|
@@ -18672,7 +18694,6 @@ const HierarchizedPickerComponent = class {
|
|
|
18672
18694
|
this.setOptions(newoptions);
|
|
18673
18695
|
}
|
|
18674
18696
|
setNewFilter(newfilter) {
|
|
18675
|
-
console.log("newfilter is ", newfilter);
|
|
18676
18697
|
this.filterTree(newfilter);
|
|
18677
18698
|
}
|
|
18678
18699
|
optionsChange(newValue, oldValue) {
|
|
@@ -19012,9 +19033,6 @@ const HierarchizedPickerComponent = class {
|
|
|
19012
19033
|
if (this.theOptions.origin == 'classification') {
|
|
19013
19034
|
// WS Call
|
|
19014
19035
|
this.rawDataManager.getFromClassification(this.getApiSearchURL(), {
|
|
19015
|
-
StartNodeID: this.theOptions.options.startNode,
|
|
19016
|
-
lng: this.theOptions.options.lng,
|
|
19017
|
-
deprecated: this.theOptions.options.IsDeprecated,
|
|
19018
19036
|
searchedValue: searched
|
|
19019
19037
|
})
|
|
19020
19038
|
.then((data) => {
|
|
@@ -19309,7 +19327,6 @@ const HierarchizedPickerComponent = class {
|
|
|
19309
19327
|
}
|
|
19310
19328
|
// Search a value in the tree and triggers a search when necessary
|
|
19311
19329
|
search(searched) {
|
|
19312
|
-
console.log("search ", searched);
|
|
19313
19330
|
let searchinput = document.querySelector('#hierarchized-picker-' + this.componentID + ' .hierarchized-picker-search input');
|
|
19314
19331
|
if (this.optionsManager.getOptions().mode == 'input' && searchinput) {
|
|
19315
19332
|
searchinput.classList.remove('fieldError');
|