ochre-sdk 0.20.28 → 0.20.29
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/index.mjs +8 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2507,12 +2507,12 @@ function buildPropertyStringIncludesGroupMember(query) {
|
|
|
2507
2507
|
const propertyValue = query.propertyValues[0] ?? "";
|
|
2508
2508
|
if (propertyVariables.length > 0) predicateParts.push(buildPropertyLabelPredicate(propertyVariables));
|
|
2509
2509
|
return {
|
|
2510
|
-
rawPredicate:
|
|
2510
|
+
rawPredicate: buildPropertyPredicateExpression([...predicateParts, buildRawStringMatchPredicate({
|
|
2511
2511
|
valueExpression,
|
|
2512
2512
|
value: propertyValue,
|
|
2513
2513
|
matchMode: "includes",
|
|
2514
2514
|
isCaseSensitive: query.isCaseSensitive
|
|
2515
|
-
})])
|
|
2515
|
+
})]),
|
|
2516
2516
|
buildCandidateTermQuery: (termExpression) => buildPropertyStringCandidateBranch({
|
|
2517
2517
|
termExpression,
|
|
2518
2518
|
isCaseSensitive: query.isCaseSensitive,
|
|
@@ -2658,6 +2658,11 @@ function buildPropertyValueAttributePredicate(params) {
|
|
|
2658
2658
|
for (const propertyValue of propertyValues) valuePredicates.push(`value[@${attributeName}=${stringLiteral(propertyValue)}]`);
|
|
2659
2659
|
return buildOrPredicate(valuePredicates);
|
|
2660
2660
|
}
|
|
2661
|
+
function buildPropertyPredicateExpression(propertyPredicates) {
|
|
2662
|
+
let propertyExpression = ".//properties//property";
|
|
2663
|
+
for (const propertyPredicate of propertyPredicates) propertyExpression += `[${propertyPredicate}]`;
|
|
2664
|
+
return propertyExpression;
|
|
2665
|
+
}
|
|
2661
2666
|
function buildPropertyStringValueClause(params) {
|
|
2662
2667
|
const { query, version, queryKey } = params;
|
|
2663
2668
|
const propertyContentNodesExpression = query.matchMode === "includes" && version === 2 ? `value[not(@inherited="true")]/content[@xml:lang="${query.language}"]` : `value/content[@xml:lang="${query.language}"]`;
|
|
@@ -2743,7 +2748,7 @@ function buildPropertyClause(params) {
|
|
|
2743
2748
|
}
|
|
2744
2749
|
return {
|
|
2745
2750
|
declarations,
|
|
2746
|
-
predicate:
|
|
2751
|
+
predicate: buildPropertyPredicateExpression(predicateParts),
|
|
2747
2752
|
candidateQueryVar
|
|
2748
2753
|
};
|
|
2749
2754
|
}
|