cocoda-sdk 3.3.2 → 3.3.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/index.cjs
CHANGED
|
@@ -2050,7 +2050,21 @@ var LabelSearchSuggestionProvider = class extends BaseProvider {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
const regexResult = /^[\s\wäüöÄÜÖß]*\w/.exec(label);
|
|
2052
2052
|
label = regexResult ? regexResult[0] : label;
|
|
2053
|
-
|
|
2053
|
+
let results = await this._getResults({ ...config, label, targetScheme, limit });
|
|
2054
|
+
if (!results.length && concept.broader?.length) {
|
|
2055
|
+
for (const broader of concept.broader) {
|
|
2056
|
+
const label2 = import_jskos_tools7.default.prefLabel(broader, {
|
|
2057
|
+
fallbackToUri: false,
|
|
2058
|
+
language
|
|
2059
|
+
});
|
|
2060
|
+
if (!label2)
|
|
2061
|
+
continue;
|
|
2062
|
+
results = await this._getResults({ ...config, label: label2, targetScheme, limit });
|
|
2063
|
+
if (results.length) {
|
|
2064
|
+
break;
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2054
2068
|
let mappings = results.map((result) => ({
|
|
2055
2069
|
fromScheme: sourceScheme,
|
|
2056
2070
|
from: { memberSet: [concept] },
|