reneco-hierarchized-picker 0.4.2-beta.2 → 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.
@@ -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.System_Fullpath;
18310
- fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
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');
@@ -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
- export function getNodesFromSearch(data, searched) {
27
- let toret = [];
28
- if (data && data.children) {
29
- data.children.forEach(value => {
30
- if (value && value.valueTranslated) {
31
- if (value.valueTranslated.toLowerCase().includes(searched.toLowerCase())) {
32
- toret.push({
33
- id: value.key,
34
- fullpath: value.fullpath,
35
- fullpathTranslated: value.fullpathTranslated,
36
- text: value.valueTranslated,
37
- deprecated: value.deprecated,
38
- });
39
- }
40
- toret = toret.concat(getNodesFromSearch(value, searched));
41
- }
42
- });
43
- }
44
- return toret;
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.System_Fullpath;
62
- fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
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.System_Fullpath;
18307
- fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
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');
@@ -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.System_Fullpath;
18306
- fullpathTranslatedPropFromNode = (_c = getPropertyFromNode(value, 'Translations')[options.language]) === null || _c === void 0 ? void 0 : _c.translated_fullpath;
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');