reneco-hierarchized-picker 0.4.2-beta.2 → 0.4.2-beta.4
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 +31 -3
- package/dist/collection/features/tree/tree-utils.js +31 -23
- package/dist/custom-elements/index.js +31 -3
- package/dist/esm/reneco-hierarchized-picker_2.entry.js +31 -3
- package/dist/esm-es5/reneco-hierarchized-picker_2.entry.js +1 -1
- package/dist/reneco-hierarchized-picker/{p-a2c067f5.system.entry.js → p-48a6a2cf.system.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/{p-06c158f6.entry.js → p-4bbf74c8.entry.js} +1 -1
- package/dist/reneco-hierarchized-picker/p-73168a50.system.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
|
*/
|
|
@@ -18298,7 +18319,7 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18298
18319
|
const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
|
|
18299
18320
|
if (myObject && myObject.length) {
|
|
18300
18321
|
myObject.forEach(value => {
|
|
18301
|
-
var _a, _b, _c;
|
|
18322
|
+
var _a, _b, _c, _d, _e;
|
|
18302
18323
|
let keyPropFromNode = null;
|
|
18303
18324
|
let valueTranslatedPropFromNode = null;
|
|
18304
18325
|
let fullpathPropFromNode = null;
|
|
@@ -18306,8 +18327,15 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18306
18327
|
if (options.origin == "classification") {
|
|
18307
18328
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
18308
18329
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
18309
|
-
|
|
18310
|
-
|
|
18330
|
+
// TODO Not sure this is correct in the latest versions, may require review during second half of 2025
|
|
18331
|
+
if (searched) {
|
|
18332
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
18333
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
18334
|
+
}
|
|
18335
|
+
else {
|
|
18336
|
+
fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_Fullpath;
|
|
18337
|
+
fullpathTranslatedPropFromNode = (_e = getPropertyFromNode(value, 'Translations')[options.language]) === null || _e === void 0 ? void 0 : _e.translated_fullpath;
|
|
18338
|
+
}
|
|
18311
18339
|
}
|
|
18312
18340
|
else {
|
|
18313
18341
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|
|
@@ -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
|
*/
|
|
@@ -50,7 +51,7 @@ export function fillTreeWithObject(tree, myObject, searched, options, depth = 0)
|
|
|
50
51
|
const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
|
|
51
52
|
if (myObject && myObject.length) {
|
|
52
53
|
myObject.forEach(value => {
|
|
53
|
-
var _a, _b, _c;
|
|
54
|
+
var _a, _b, _c, _d, _e;
|
|
54
55
|
let keyPropFromNode = null;
|
|
55
56
|
let valueTranslatedPropFromNode = null;
|
|
56
57
|
let fullpathPropFromNode = null;
|
|
@@ -58,8 +59,15 @@ export function fillTreeWithObject(tree, myObject, searched, options, depth = 0)
|
|
|
58
59
|
if (options.origin == "classification") {
|
|
59
60
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
60
61
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
// TODO Not sure this is correct in the latest versions, may require review during second half of 2025
|
|
63
|
+
if (searched) {
|
|
64
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
65
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_Fullpath;
|
|
69
|
+
fullpathTranslatedPropFromNode = (_e = getPropertyFromNode(value, 'Translations')[options.language]) === null || _e === void 0 ? void 0 : _e.translated_fullpath;
|
|
70
|
+
}
|
|
63
71
|
}
|
|
64
72
|
else {
|
|
65
73
|
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
|
*/
|
|
@@ -18295,7 +18316,7 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18295
18316
|
const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
|
|
18296
18317
|
if (myObject && myObject.length) {
|
|
18297
18318
|
myObject.forEach(value => {
|
|
18298
|
-
var _a, _b, _c;
|
|
18319
|
+
var _a, _b, _c, _d, _e;
|
|
18299
18320
|
let keyPropFromNode = null;
|
|
18300
18321
|
let valueTranslatedPropFromNode = null;
|
|
18301
18322
|
let fullpathPropFromNode = null;
|
|
@@ -18303,8 +18324,15 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18303
18324
|
if (options.origin == "classification") {
|
|
18304
18325
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
18305
18326
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
18306
|
-
|
|
18307
|
-
|
|
18327
|
+
// TODO Not sure this is correct in the latest versions, may require review during second half of 2025
|
|
18328
|
+
if (searched) {
|
|
18329
|
+
fullpathPropFromNode = (_b = getPropertyFromNode(value, 'Properties')) === null || _b === void 0 ? void 0 : _b.System_FullPath;
|
|
18330
|
+
fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'fullpathTranslated')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
|
|
18331
|
+
}
|
|
18332
|
+
else {
|
|
18333
|
+
fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_Fullpath;
|
|
18334
|
+
fullpathTranslatedPropFromNode = (_e = getPropertyFromNode(value, 'Translations')[options.language]) === null || _e === void 0 ? void 0 : _e.translated_fullpath;
|
|
18335
|
+
}
|
|
18308
18336
|
}
|
|
18309
18337
|
else {
|
|
18310
18338
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|
|
@@ -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
|
*/
|
|
@@ -18294,7 +18315,7 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18294
18315
|
const searchResultPresentsUnMatched = options.searchResultPresentsUnMatched;
|
|
18295
18316
|
if (myObject && myObject.length) {
|
|
18296
18317
|
myObject.forEach(value => {
|
|
18297
|
-
var _a, _b, _c;
|
|
18318
|
+
var _a, _b, _c, _d, _e;
|
|
18298
18319
|
let keyPropFromNode = null;
|
|
18299
18320
|
let valueTranslatedPropFromNode = null;
|
|
18300
18321
|
let fullpathPropFromNode = null;
|
|
@@ -18302,8 +18323,15 @@ function fillTreeWithObject(tree, myObject, searched, options, depth = 0) {
|
|
|
18302
18323
|
if (options.origin == "classification") {
|
|
18303
18324
|
keyPropFromNode = getPropertyFromNode(value, 'ID');
|
|
18304
18325
|
valueTranslatedPropFromNode = (_a = getPropertyFromNode(value, 'Translations')[options.language]) === null || _a === void 0 ? void 0 : _a.translated_name;
|
|
18305
|
-
|
|
18306
|
-
|
|
18326
|
+
// TODO Not sure this is correct in the latest versions, may require review during second half of 2025
|
|
18327
|
+
if (searched) {
|
|
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;
|
|
18330
|
+
}
|
|
18331
|
+
else {
|
|
18332
|
+
fullpathPropFromNode = (_d = getPropertyFromNode(value, 'Properties')) === null || _d === void 0 ? void 0 : _d.System_Fullpath;
|
|
18333
|
+
fullpathTranslatedPropFromNode = (_e = getPropertyFromNode(value, 'Translations')[options.language]) === null || _e === void 0 ? void 0 : _e.translated_fullpath;
|
|
18334
|
+
}
|
|
18307
18335
|
}
|
|
18308
18336
|
else {
|
|
18309
18337
|
keyPropFromNode = getPropertyFromNode(value, 'key');
|