feat: add filter chips for news

This commit is contained in:
Jovan Krunić
2021-07-12 16:40:42 +02:00
parent e48134eddc
commit 5435f85cc4
27 changed files with 456 additions and 86 deletions

View File

@@ -19,8 +19,10 @@ import {
SCMultiSearchResponse,
SCSearchRequest,
SCSearchResponse,
SCSearchValueFilter,
SCThingOriginType,
SCThings,
SCThingsField,
SCThingType,
} from '@openstapps/core';
import {SCSaveableThing} from '@openstapps/core';
@@ -88,6 +90,25 @@ export class DataProvider {
*/
storageProvider: StorageProvider;
/**
* Simplify creation of a value filter
*
* @param field Database field for apply the filter to
* @param value Value to match with
*/
static createValueFilter(
field: SCThingsField,
value: string,
): SCSearchValueFilter {
return {
type: 'value',
arguments: {
field: field,
value: value,
},
};
}
/**
* TODO
*