@dudousxd/nestjs-durable-core 0.69.1 → 0.70.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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -15
- package/dist/index.d.ts +45 -15
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6205,12 +6205,13 @@ function mergeRunValueFacetRows(rows, opts) {
|
|
|
6205
6205
|
const value = row.value ?? null;
|
|
6206
6206
|
counts.set(value, (counts.get(value) ?? 0) + Number(row.count));
|
|
6207
6207
|
}
|
|
6208
|
+
const needle = opts?.search?.trim().toLowerCase();
|
|
6208
6209
|
const merged = [
|
|
6209
6210
|
...counts
|
|
6210
6211
|
].map(([value, count]) => ({
|
|
6211
6212
|
value,
|
|
6212
6213
|
count
|
|
6213
|
-
})).filter((row) => row.count > 0).sort((a, b) => {
|
|
6214
|
+
})).filter((row) => row.count > 0).filter((row) => !needle || row.value?.toLowerCase().includes(needle)).sort((a, b) => {
|
|
6214
6215
|
const engineA = isEngineMintedTag(a.value);
|
|
6215
6216
|
const engineB = isEngineMintedTag(b.value);
|
|
6216
6217
|
if (engineA !== engineB) return engineA ? 1 : -1;
|
|
@@ -6219,7 +6220,8 @@ function mergeRunValueFacetRows(rows, opts) {
|
|
|
6219
6220
|
if (b.value === null) return -1;
|
|
6220
6221
|
return a.value.localeCompare(b.value);
|
|
6221
6222
|
});
|
|
6222
|
-
|
|
6223
|
+
const offset = opts?.offset ?? 0;
|
|
6224
|
+
return merged.slice(offset, offset + (opts?.limit ?? RUN_VALUE_FACET_LIMIT));
|
|
6223
6225
|
}
|
|
6224
6226
|
__name(mergeRunValueFacetRows, "mergeRunValueFacetRows");
|
|
6225
6227
|
function runValueFacetsFromRuns(runs, axis, opts) {
|