@c8y/client 1016.207.0 → 1016.208.0
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/lib/bundles/client.umd.js +12 -2
- package/lib/bundles/client.umd.js.map +1 -1
- package/lib/bundles/client.umd.min.js +1 -1
- package/lib/bundles/client.umd.min.js.map +1 -1
- package/lib/cjs/src/core/QueriesUtil.js +11 -2
- package/lib/cjs/src/core/QueriesUtil.js.map +1 -1
- package/lib/esm2015/src/core/QueriesUtil.js +12 -2
- package/lib/esm2015/src/core/QueriesUtil.js.map +1 -1
- package/lib/src/core/QueriesUtil.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4677,10 +4677,11 @@
|
|
|
4677
4677
|
return `has(${operand})`;
|
|
4678
4678
|
},
|
|
4679
4679
|
__useFilterQueryString: (queryString) => {
|
|
4680
|
+
var _a;
|
|
4680
4681
|
// match everything inside the most exterior parentheses, including them
|
|
4681
|
-
const query = queryString.match(/\(.*\)/)[0];
|
|
4682
|
+
const query = (_a = queryString.match(/\(.*\)/)) === null || _a === void 0 ? void 0 : _a[0];
|
|
4682
4683
|
// get rid of the most exterior parentheses
|
|
4683
|
-
return query.substring(1, query.length - 1);
|
|
4684
|
+
return query === null || query === void 0 ? void 0 : query.substring(1, query.length - 1);
|
|
4684
4685
|
}
|
|
4685
4686
|
};
|
|
4686
4687
|
}
|
|
@@ -4837,6 +4838,15 @@
|
|
|
4837
4838
|
}
|
|
4838
4839
|
return newQuery;
|
|
4839
4840
|
}
|
|
4841
|
+
extractAndMergeOrderBys(queries) {
|
|
4842
|
+
if ((queries === null || queries === void 0 ? void 0 : queries.length) > 0) {
|
|
4843
|
+
const orderByQuery = queries
|
|
4844
|
+
.map(query => { var _a; return (_a = query.match(/\$orderby=(.*)$/)) === null || _a === void 0 ? void 0 : _a[1]; })
|
|
4845
|
+
.filter(orderBy => !!orderBy)
|
|
4846
|
+
.join(',');
|
|
4847
|
+
return orderByQuery ? `$orderby=${orderByQuery}` : '';
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4840
4850
|
glue(stmts, type) {
|
|
4841
4851
|
return stmts.length > 1 ? `(${stmts.join(`) ${type} (`)})` : stmts[0];
|
|
4842
4852
|
}
|